An unbalanced line-to-line current is injected at an injected frequency in a three-phase ac circuit. A first set of voltages and currents are obtained. A first set of transformed voltages and transformed currents are produced. The circuit is injected with a second unbalanced line-to-line current at a frequency linearly independent of the injected frequency. A second set of voltages and current are obtained. A second set of transformed voltages and transformed currents are produced The impedance of a source portion and a load portion of the circuit are calculated using the first and second set of transformed voltages, and the first and second set of transformed currents.