The invention is an algorithm used to measure impedances in balanced three-phase systems. The impedance is a useful tool in the work related to small signal system stability. It is beneficial to both system integrators and component vendors. The extracted impedances of system components can be used to assess the system stability before system integration. The impedances measured in system can also be used to debug existing system stability problems. Impedance measurement takes several steps: creating perturbation in the system, measurement system response, and calculating system impedances. This invention uses the chirp signal used to pertube the system which can significantly increase the measurement speed especially at lower frequency range. Due to the wide bandwidth nature of the injection signal, the power spectrum density is lower compared to traditional sinusoidal signal injection technique. Data processing techniques are developed to deal with such issues to improve the impedance calculation accuracy.