Capacitor switching is a common operation to measure network harmonic impedance and discrete Fourier analysis on transient voltage and current component after capacitor switching can be used to calculate network harmonic impedance of PCC. TLS-ESPRIT(Total Least Square-Estimation of Signal Parameters based on the Rotational Invariance Technique) can be applied to filter noise and fundamental component simultaneously to obtain accurate transient voltage and current component. Comparing with Prony, TLS-ESPRIT can resist noise interference more strongly and identify mode reference more accurately. The validity of TLS-ESPRIT on network harmonic impedance measurement based on capacitor switching is testified by simulation.