Real-Time Estimation of Power System Frequency Using a Three-Level Discrete Fourier Transform Method

This paper proposes a three-level discrete Fourier transform (DFT) method to provide an accurate estimate of power system frequency in real time. The first level decomposes a power system signal into two orthogonal cosineand sine-filtered signals. The second and third levels are used to determine the amplitude ratio of the cosineand sine-filtered signals without encountering the zero-crossing problem and with an increase in ability to suppress harmonics and inter-harmonics. The performance of the three-level DFT method is evaluated using computer-simulated signals with harmonics and inter-harmonics. The three-level DFT method is also implemented on a digital signal processor (DSP)-based hardware prototype, and its performance in the hardware implementation is evaluated using a real-time digital simulator (RTDS). The evaluation results show that the three-level DFT method can achieve real-time estimation of power system frequency with satisfactory performance.


Introduction
The frequency is one of the most important quantities in the operation of power systems, and its deviation is a good indicator of abnormal operating conditions.Therefore, estimation of the power system OPEN ACCESS frequency is an important task in the monitoring, protection and control of power systems.In particular, accurate estimation of the power system frequency in real time is a prerequisite for rapid-response applications, including load shedding, generator protection, and renewable energy control [1][2][3].Although the power system frequency may deviate from the nominal value due to unexpected system disturbances, the transient response of rapid-response applications should be no longer than four to five power system frequency cycles [1].
In this paper we propose a three-level DFT method for real-time and accurate estimation of the power system frequency.Triple use of DFTs allows accurate frequency estimation with a particular increase in ability to suppress harmonics and inter-harmonics.Although the three-level DFT method leads to an additional two-cycle delay compared with other DFT-based orthogonal approaches, it is fast enough for rapid-response applications where the delay should be no more than five cycles in total.Evaluation results confirm the efficiency and validity of the three-level DFT method to achieve real-time estimation of the power system frequency.
The remainder of this paper is organized as follows: frequency estimation using the three-level DFT method is formulated in Section 2, and the performance is evaluated in Section 3 using both computer simulations and a digital signal processor (DSP)-based hardware implementation.Conclusions are drawn in Section 4.

Frequency Estimation
Assuming that a power system signal has a purely sinusoidal waveform with an amplitude A , power system frequency f, and phase θ, it can be described in discrete time steps as: where f0 is the nominal frequency and N0 is the number of samples per cycle at f0.The power system signal can be decomposed into two orthogonal signals via DFT, using cosine and sine filters.The coefficients of the cosine filter in the DFT are: The amplitude and phase response of the cosine filter can be found from the unilateral Z-transform of Equation (2): Applying Equations ( 3) and (4) to ) (n x in Equation ( 1) yields a cosine-filtered signal of the first-level DFT: where . Note that AC and θC depend on the power system frequency.Similarly, the coefficients of the sine filter in the DFT are: The amplitude and phase response of the sine filter can be also found from the unilateral Z-transform of Equation (6): Applying Equations ( 7) and (8) to ) (n x in Equation (1) yields a sine-filtered signal of the first-level DFT: where and applying this relation to Equation (9) yields the following expression: The amplitude ratio of C A to S A can be determined from Equations ( 3) and ( 7) as follows: From this, the power system frequency can be determined using: As can be seen from Equation ( 13), the amplitude ratio should be known prior to determining the power system frequency.To determine this amplitude ratio, a second-level DFT is applied to the output signals of the first-level DFT, as shown in Figure 1.The second-level DFT provides four output signals, including , which is obtained from applying a second cosine filter to Equation (5): where can be obtained from applying a second sine filter to Equation (11): where

 
. The amplitude ratio can be determined using Equations ( 14) and ( 15): Since ) (n x SS has an instantaneous value, the zero-crossing problem introduces considerable errors into the calculation of the amplitude ratio.These errors may be magnified when ) (n x SS has an instantaneous value near to a zero crossing, due to the resolution of the hardware implementation.
To overcome this problem, a third-level DFT is applied to the output signals of the second-level DFT.The output signals of the third-level DFT, , are obtained from applying cosine and sine filters to , and: where are obtained from applying cosine and sine filters to ) (n x SS , respectively: where , and: does not need to be obtained from the second-level DFT.For a similar reason, does not need to be obtained from the second-level DFT.To overcome the zero-crossing problem that occurred in Equation ( 16), the pseudo amplitude of where Finally, the amplitude ratio can be determined using Equations ( 21) and ( 22) as: It should be noted that the pseudo amplitude in Equation ( 22) has a value far from zero, even though it may have an instantaneous value that depends on M(n).It follows that we can avoid the zero-crossing problem by using the expression in Equation (23).Substituting Equation (23) into Equation ( 13) yields the following estimate of the power system frequency:

Computer Simulations
To evaluate the performance of the three-level DFT method, the results were compared with those obtained using the Prony method [1], which is one of the most commonly used orthogonal approaches to estimate the power system frequency.The Prony method estimates the power system frequency by applying Prony analysis to a sine-filtered signal: where M is the total number of sine-filtered samples used to calculate the best estimate of the power system frequency.Considering that the three-level DFT method requires three cycles, here we also used the Prony method with the same amount of samples for the sake of comparison.Since one-cycle samples are required for the sine filter in the Prony method, M was set to the number of samples corresponding to two cycles.In the simulations, a moving average filter with a length of two cycles was applied at the last step to obtain a stable response.Therefore, both the Prony and three-level DFT methods used five cycles as a data window.
The simulation results described in this section were processed using Matlab, and the sampling frequency was set to 1920 Hz (32 samples per cycle in a 60-Hz system).To evaluate the performance of the three-level DFT method, three types of frequency variation were considered: a ramp-up frequency variation: where ) (n u is the unit-step function, a ramp-down frequency variation: and a sinusoidal frequency variation: A clean signal described by Equation ( 29) was provided as an input to both the Prony and threelevel DFT methods: With the sinusoidal frequency variation, the two methods also had an almost identical time response, as shown in Figure 3.The Prony and three-level DFT methods estimated the peak frequency to be smaller than the reference frequency by 0.008 and 0.006 Hz, respectively, due to the smoothing effect of the moving average filter.To investigate the influence of harmonics, the following signal with a total harmonic distortion of 30% was considered: Figures 4 and 5 demonstrate the ability of the three-level DFT method clearly.When the reference frequency was close to the nominal frequency in the presence of harmonics, the simulation results show a good response of both methods; however, when the reference frequency deviated from the nominal frequency, the Prony method resulted in considerable errors.In contrast, the time responses of the three-level DFT method were almost identical to those for the clean signal.This is because triple use of DFTs allows accurate frequency estimation that is insensitive to harmonics.
Figures 6 and 7 demonstrate the ability of the three-level DFT method in the presence of inter-harmonics in addition to harmonics.A comparison of Figures 5a and 6 shows that inter-harmonics have an adverse effect on both methods in the case of the ramp-up frequency variation.Although the effect of inter-harmonics resulted in some errors, the three-level DFT method exhibit improved frequency estimation compared with the Prony method.This is because triple use of DFTs allows accurate frequency estimation that is insensitive to harmonics and inter-harmonics.Similar results can be confirmed by comparing Figure 4 with Figure 7a, which shows the response of the two methods to the ramp-down frequency variation.Energies 2015, 8 88

Hardware Implementation
The three-level DFT method was implemented on a 50-MHz TMS320C31 DSP-based hardware prototype.Its performance in the hardware implementation was evaluated through the testing procedure shown in Figure 8. PSCAD/EMTDC was used to simulate the voltage and rotor-speed waveforms of the modified IEEE 5-bus system shown in Figure 9.The simulated voltage waveform was imported to the real-time digital simulator (RTDS) and Playback library in the RTDS generated a 16-bit analog voltage waveform in the range ±10 V.This voltage waveform was passed through a first-order low-pass RC filter to a 12-bit analog-to-digital (A/D) converter on the hardware prototype.The −3-dB cutoff frequency of the low-pass RC filter was 132 Hz, and the sampling rate of the A/D converter was 1920 Hz.The three-level DFT method completed real-time estimation of the power system frequency within each timer-interrupt interval of the DSP (520.83 µs), which corresponds to the sampling rate of the A/D converter.
In the modified IEEE 5-bus system, two 200-MVA generators supplied electric power to the load, which was initially set to 170 MVA (0.97 lag).Two types of dynamic conditions were considered: a load increase and single phase-to-ground faults.
The load switch shown in Figure 9 was closed at time t = 5.00 s, thus loading the generators with an additional 34 MVA.This caused the terminal voltage of generator A to decrease instantaneously from 16.89 kV to 16.39 kV, as shown in Figure 10a.The estimated frequency using the three-level DFT method implemented on the DSP-based hardware prototype is shown in Figure 10b together with the reference frequency, which corresponds to the rotor speed obtained from the PSCAD/EMTDC simulation.The instantaneous variation in the terminal voltage was responsible for a −0.11-Hz spike at 5.05 s in the estimated frequency.There is, of course, no corresponding instantaneous variation in the rotor speed, and so the power system frequency did not vary in the same manner.Disregarding this artifact, Figure 10b clearly shows that the estimated frequency of the three-level DFT method closely followed the reference frequency with an estimation delay of approximately 0.04 s.The fault switch shown in Figure 9 was closed at t = 5.00 s and then opened at t = 5.10 s, creating an "a" phase-to-ground (a-g) 90° fault with a duration of 0.10 s.As shown in Figure 11a, the a-g 90° fault caused the amplitude of the generator terminal voltage to decrease instantaneously from 16.89 kV to 9.31 kV.This instantaneous decrease in the terminal voltage caused a −1.54-Hz spike at 5.06 s in the estimated frequency of the three-level DFT method.After removing the fault at 5.10 s, the generator terminal voltage increased to 18.33 kV and then settled to the initial value.Due to the instantaneous increase in the terminal voltage, the estimated frequency had a 2.45-Hz spike at 5.16 s.Similar to the a-g 90° fault, the fault switch was closed at t = 5.00 s and then opened at t = 5.10 s, creating an a-g 0° fault.As shown in Figure 12b, the instantaneous decrease in the terminal voltage caused a −1.51-Hz spike at 5.05 s in the estimated frequency of the three-level DFT method.After removing the fault at 5.10 s, the estimated frequency had a 2.37-Hz spike at 5.15 s.
With the exception of the spikes during the a-g faults, the estimated frequency using the three-level DFT method followed the reference frequency closely.These results show that the hardware prototype can accurately estimate the power system frequency in real time.

Conclusions
We have proposed a three-level DFT method for real-time estimation of power system frequency.The method is based on the fact that the amplitude gains of cosine and sine filters differ when the power system frequency deviates from the nominal frequency.Since the amplitude ratio of the cosine-and sine-filtered signals should be known prior to estimating the power system frequency, a second-level DFT was applied to these cosine-and sine-filtered signals.Although the amplitude ratio can be determined using the output signals of the second-level DFT, the errors in the amplitude ratio may be large when the output signals of the second-level DFT are near to a zero crossing.
To overcome this problem, a third-level DFT was applied to the output signals of the second-level DFT.After the amplitude ratio was accurately determined using the output signals of the third-level DFT, the power system frequency was estimated.This triple use of DFTs allows accurate frequency estimation that is insensitive to harmonics and inter-harmonics.Although the three-level DFT method may lead to an additional two-cycle delay compared with other DFT-based orthogonal approaches, it is fast enough to be used in rapid-response applications where the transient response should be no longer than five cycles.
The performance of the three-level DFT method was evaluated using computer-simulated signals with harmonics and inter-harmonics.The simulation results confirmed that the method was able to estimate the power system frequency accurately, even in the presence of harmonics and inter-harmonics.The method was then implemented on a TMS320C31 DSP-based hardware prototype.The RTDS was used to evaluate its performance under dynamic conditions, including a load increase and single phase-to-ground faults on the modified IEEE 5-bus system.The results of this implementation showed that the hardware prototype was able to accurately estimate the power system frequency in real time.

Figure 1 .
Figure 1.Amplitude and phase relations of the output signals in the three-level DFT method.

Figure 2 .
Figure 2. Estimation of a ramp-up frequency variation.(a) Estimated frequency; (b) Close-up of the convergence.

Figure 3 .
Figure 3. Estimation of a sinusoidal frequency variation.(a) Estimated frequency; (b) Close-up of the convergence.

Figure 4 .Figure 5 .
Figure 4. Estimation of a ramp-down frequency variation in the presence of harmonics.(a) Estimated frequency; (b) Close-up of the convergence.

Figure 6 .Figure 7 .
Figure 6.Estimation of a ramp-up frequency variation in the presence of harmonics and inter-harmonics.(a) Estimated frequency; (b) Close-up of the convergence.

Figure 11 .
Figure 11.Estimation of the power system frequency when a single line-to-ground 90° fault occurred.(a) Terminal voltage of generator A; (b) Estimated frequency.

Figure 12 .
Figure 12.Estimation of the power system frequency when a single line-to-ground 0° fault occurred.(a) Terminal voltage of generator A; (b) Estimated frequency.