Impedance model analysis and measurement for power system stability