The invention discloses a simple and practical method for measuring frequency of
alternating current voltage with
software. The method comprises the following steps: acquiring a
voltage value with a sampling time interval, carrying out
discrete Fourier transform on the acquired
voltage value, calculating a phase real part and a phase imaginary part of voltage, taking a product of the phase real part and the phase imaginary part as an input value of an interpolation fitting method, searching same direction
zero crossing of the product of the phase real part and the phase imaginary part, and calculating frequency of the product of the phase real part and the phase imaginary part according to the
zero crossing, wherein the frequency is the frequency of the
alternating current voltage. According to the method, a filtering function of the
discrete Fourier transform is fully utilized, influence of
harmonic wave and
direct current component on frequency measurement is eliminated, anti-interference capability is strong, a calculated value has high precision and small discrete,
measurement precision is high, the method is simple and practical, high precision can be achieved both in
stable state and
transient state processes of a power
system, realization of frequency measurement in a protection apparatus with a DSP as a core CPU is facilitated, and a requirement of the power
system automatic field is satisfied.