An Impedance Method for Stability Analysis of Power Systems with Large Penetration of Inverter Based Resources