# Frequency estimation and tracking by two-layered iterative DFT with re-sampling in non-steady states of power system

- 109 Downloads

**Part of the following topical collections:**

## Abstract

Frequency deviation off the nominal one is incurred by sudden changes of frequency and could introduce harmonics and inter-harmonics in the power system, which influences the accuracy of frequency estimation with method of discrete Fourier transform (DFT). A two-layered iterative DFT (TLI-DFT) with re-sampling was presented to measure the frequency in non-steady states. A simple frequency estimation method named exponential sampling is amended to calculate the initial sampling frequency in the inner-layered process of the DFT iteration. In reality, frequencies of two consecutive cycles are always interrelated with each other, so an idea of frequency tracking by outer-layered DFT between cycles is adopted. TLI-DFT can track the frequency in non-steady state in different scenarios, e.g., sudden and random frequency change, signal modulated by a cosine signal, and contaminated by decaying direct current offsets. Mean squared error of measured frequency, rate of change of frequency, and total vector error at different transient conditions indicate that the proposed algorithm is valid and more accurate than the traditional one in the non-steady states of a power system.

## Keywords

Synchrophasor Frequency measurement Frequency tracking Transient condition Discrete Fourier transform (DFT) Re-sampling## Abbreviations

- AES
Amended exponential sampling

- AWGN
Additive white Gaussian noise

- DC
Direct current

- DFT
Discrete Fourier transform

- FFT
Fast Fourier transform

- LPF
Low-pass filters

- MSE
Mean squared error

- PLL
Phase locked loop

- PMU
Phasor measure unit

- ROCOA
Rate of change of amplitude

- ROCOF
Rate of change of frequency

- SNR
Signal-to-noise ratio

- TLI-DFT
Two-layered iterative DFT

- TVE
Total vector error

- WT
Wavelet transform

- X/R
Inductive reactance to resistance

## 1 Introduction

Protecting and controlling of the smart grid require accurate and timely estimation of frequency. Measurement of frequency provides information of state estimation in the power networks around the wide area measurement system. The signal in a power system is easy to be distorted by harmonics, inter-harmonics, decaying direct current (DC) offset, and to be modulated in dynamic states. Therefore, methods of frequency estimation and measurement should have the ability of frequency-tracking under noisy, distorted, and distributed circumstances.

In the past few decades, many researchers have put emphasis on frequency measurement and analysis, and kinds of frequency estimation strategies have been reported, e. g., zero crossing [1, 2], least error squares [3], Newton approach [4], Kalman filter [5, 6, 7], prony algorithm [8], artificial neural networks [9], discrete Fourier transform (DFT), fast Fourier transform (FFT) [1, 10, 11] and demodulation technique [1]. DFT algorithm is the most well-known method for its capabilities of harmonics rejection and implementation of recursion. It is preferable for its availability, understandability, and simplicity when it is implemented by advanced digital signal processing chips.

Full-cycle DFT is a kind of window-based method requiring integral samples in each cycle. If the number of samples in a window is not an integer, which is common because of some off-nominal components in reality, DFT may provide certain errors [12]. DFT can approximate the instantaneous frequency, suppress the harmonics and smooth the noise by least squares method [13] in a steady state. However, the fundamental frequency of a signal would change and this signal may contain many off-nominal components as listed above, in which the decaying DC offset cannot be eliminated by simple DFT.

The fixed sampling rates are adopted by most data acquisition systems including the power system. It contains some drawbacks in frequency estimation and measurement. As a uniform sampling method, the sampling period of traditional DFT is constant. A simple frequency estimation method via exponential sampling and dyadic rational was provided in [14]. Other kinds of non-uniform sampling methods, e.g., log-time sampling [15], extended staggered under-sampling [16], logarithmic sampling [17], and near optimal sampling [18] were introduced. These sampling methods indicate that designing of phase-locked loop is important [19, 20]. Methods such as higher-order lags of the sample auto-correlation [21] and high-order Yule-Walker estimation [22] were utilized in calculating the sinusoidal frequency, and a variable-window-based algorithm for frequency tracking and phasor estimation was narrated in [23].

In this paper, a new method for frequency estimation and tracking was proposed, in which DFT algorithm iterates with re-sampling to confront frequency change in dynamic states of a power system. In each cycle, precise frequency estimation is accomplished by iterative DFT. In the following cycle, the initial sampling frequency is given by this converged frequency, and so on. The proposed iterative DFT by re-sampling is a two-rounded process to provide precise frequency estimation and frequency tracking ability dynamically in a power system.

The algorithm of frequency estimation by DFT was presented and the error caused by an off-nominal signal was analyzed in Section 2. Frequency tracking by iterative DFT with re-sampling was discussed. Recommended by IEEE Std. C37.118 [24, 25], analysis of three types of step-changed signal was made in Section 3. Performance of the new algorithm in different scenarios was shown in Section 4. Additional discussions about wavelet transform were made in Section 5. Conclusions were given in Section 6. Some formula derivations and auxiliary figures were provided in the Appendix.

## 2 Method of frequency estimation by DFT

### 2.1 Algorithm of classic DFT

*ω*and

*A*are the angular frequency and amplitude respectively.

*ω*is supposed to be 2π

*f*

_{0},

*f*

_{0}is the nominal frequency, and

*φ*

_{0}is the initial phase angle. In order to precede the DFT calculation, signal is always truncated and finite samples should be taken by kinds of windows. The process of making a phasor estimation will require sampling the waveform over some interval of time which can lead to some confusion if the number of samples is not an integer in a window. The magnitude is compensated by dividing the magnitude with a sine at the actual signals frequency. The 2-cycle triangular window produces a faster roll off than a standard 1s-cycle rectangular window, but the frequency deviation is spread with an additional factor of 1.625 to increase compensation [25]. A simple rectangular window is adopted in this study. By the way, the length of a rectangular window could be selected easily and arbitrarily according to the requirements of accuracy and computational burden. DFT converts the equally spaced and uniform samples into a finite combination of complex sinusoids, ordered by their frequency. According to DFT, a phasor is calculated by

*N*is number of samples,

*x*(

*n*) =

*A*cos(2

*πn*/

*N*+

*φ*

_{0}), (

*n*= 0,1, 2,…,

*N*− 1) are the samples taken uniformly within the length of a rectangular window;

*k*is the order of harmonic; especially if

*k*= 1, it stands for the phasor of the nominal component. The amplitudes and phase angles of

*k*th harmonics are

*X*

_{k_real}and

*X*

_{k_imag}are real part and imaginary part of

*X*

_{k}. According to Eq. 2 and Eq. 3, if

*k*= 1, the phasor of the nominal signal is calculated by

*X*

_{1_real}is the real part of the phasor of nominal component, and

*X*

_{1_imag}is the imaginary part. In front of the summation sign, a multiplier of 2/

*N*is used to generate the normalized amplitude of DFT, i.e., 1 p.u.. The phasor of nominal signal is expressed as

### 2.2 Frequency estimation by classic DFT

*t*

_{r}=

*rT*

_{s},

*r*= 0,1,2,…,+∞, where

*T*

_{s}is the sampling interval,

*T*

_{s}= 1/

*f*

_{s}. A synchrophasor at time

*t*

_{r}is represented as

*A*, if the signal is a nominal one. The phase angles of serial synchrophasor are {

*φ*

_{0},

*φ*

_{0}+ 2π/

*N*,

*φ*

_{0}+ 4π/

*N*,…,

*φ*

_{0}+ 2π

*r*/

*N*,…}. In the following, we use

*X*

^{r}as the nominal phasor instead of \( {X}_1^r \) for simplicity. Frequency is defined as the speed of rotation of a phasor and can be calculated by two consecutive measured phases

*φ*

^{r}is the phase angle calculated by DFT. If

*φ*

^{r}is not the nominal one,

*f*

^{r}would be inaccurate.

### 2.3 Frequency analysis for an off-nominal signal

*f*

_{0}+ Δ

*f*. If Δ

*f*is a fixed frequency deviation. The representation of input signal is

*x*(

*n*) are the samples taken in one window with length of

*NT*

_{s},

*x*(

*n*) =

*A*cos[2

*πf*

_{0}

*nT*

_{s}+ 2

*π*Δ

*fnT*

_{s}+

*φ*

_{0}], (

*n*= 0,1, 2,…,

*N*− 1). The nominal phasor is recorded as\( {X}_{\mathrm{nomi}}^r={Ae}^{j{\varphi}_{\mathrm{nomi}}^r} \), where \( {\varphi}_{\mathrm{nomi}}^r={\varphi}_0+2\pi r/N \)at time

*t*

_{r}. The measured one is\( {X}_{\mathrm{meas}}^r={A}_{\mathrm{meas}}^r{e}^{j{\varphi}_{\mathrm{meas}}^r} \), and the measured phasor \( {X}_{\mathrm{meas}}^r \)for the off-nominal signal

*x*(

*t*) according to DFT is

*f*,

*N*,

*T*

_{s}) is constant if the

*N*, Δ

*f*, and

*T*

_{s}are all constant (detail formula derivations are in Appendix); and symbol “*” denotes the conjugation of a complex number.

*f*→0, \( \underset{\Delta f\to 0}{\lim}\mid \mathrm{H}\left(\Delta f,N,{T}_s\right)\mid \to 1 \) as shown in Fig. 18 in Appendix. The phase angle \( {\varphi}_1^r \) at time

*t*

_{r}in Eq. 9 is

*f*→0, \( \underset{\Delta f\to 0}{\lim}\mid \mathrm{H}\left(2{f}_0+\Delta f,N,{T}_s\right)\mid \to 0 \) is also shown in Fig. 18 in Appendix. \( {\varphi}_2^r \)is a very small phase angle as shown in Fig. 2 and can be calculated as

*N*> > 4 and Δ

*f*< <

*f*

_{0}, and suppose

*φ*

_{0}= 0, such in-equation of 0 < cos[(2

*N*+ 1)

*π*Δ

*fT*

_{s}] < 1 can be fulfilled. We have

## 3 Frequency tracking by iterative DFT with re-sampling

### 3.1 Inner-layered DFT iteration by re-sampling

*f*

_{meas}would approach

*f*

_{0}+ Δ

*f*more and more closely if we change the sampling frequency

*f*

_{s}=

*Nf*

_{meas}consecutively. Especially when the sampling frequency becomes closely enough to the value of

*N*(

*f*

_{0}+ Δ

*f*), DFT calculated iteratively would give a measured frequency

*f*

_{meas}as the input and off-nominal frequency

*f*

_{0}+ Δ

*f*exactly. It means that there are integral samples in 1 cycle of the input frequency again. The process of iterative DFT algorithm within 1 cycle (i.e., inner-layered iteration) is shown in Fig. 3.

*f*

_{s}is set to be

*Nf*

_{0}and two phasor are calculated to get the frequency

*f*

_{meas}. Then in the following cycle, new \( {f}_{\mathrm{meas}}^{\hbox{'}} \) is gotten according to the sampling frequency of \( {f}_s^{\hbox{'}}={Nf}_{\mathrm{meas}} \), until difference of two successive frequencies \( {f}_{\mathrm{meas}}^{\hbox{'}} \) and

*f*

_{meas}is less than a threshold

*δ*. In Fig. 4, samples are taken by a rectangular overlapping shifting window at time

*t*

_{r}=

*rT*

_{s}(

*r*= 0 and 1 respectively) as shown in Fig. 4. The first rectangle window contains

*N*samples

*s*

_{0},

*s*

_{1},…,

*s*

_{N − 1}but not the sample of

*S*

_{N}; however, the length of this window is

*N**

*T*

_{s}, where

*T*

_{s}is the sampling period. In the second rectangle window,

*N*samples

*s*

_{1},

*s*

_{2},…,

*s*

_{N}are taken with the same length

*N**

*T*

_{s}and so on.

### 3.2 Outer-layered DFT iteration between cycles

#### 3.2.1 Determination of initial frequency by amended exponential sampling

In the dynamic states or under the circumstance of low signal-to-noise ratio (SNR), the input frequency may change in every cycle. It introduces lots of harmonics and spectrum leakage, and also limits the application of exponential sampling in such situation. Exponential sampling is a kind of simple frequency estimation algorithm, which can simplify the process of sampling by exponential sampling and need only few samples distributed exponentially along the time [14]. Frequency is estimate based on a modified exponential sampling method, which is amended to be used in non-steady states.

*P*defines the bit accuracy, and

*Q*defines the maximal frequency

*f*

_{max}= 2

^{Q}. The samples are

*f*is the instantaneous frequency at

*t*

_{p}, and it is not a constant anymore in the dynamic states. According to [14], the signal is a kind of sinusoidal signal. If a cosine signal is used in accordance with Eqs. 1, 8, and 16, we have

^{Q−P}Hz, we get

*s*(

*t*

_{p}) = 0 for some

*p*=

*p*

_{0}≤

*P*, and \( {b}_{p_0}=1 \), the Eq. 18 is rewritten to be

*p*

_{0}is a terminator of exponential sampling. For example, if a power system with a nominal frequency of 60 Hz and the dynamic frequency range is [− 5, + 5] Hz, it indicates that off-nominal frequency may be 65 Hz > 64 = 2

^{6}Hz. Hence, we set

*Q*= 7 and

*P*= 7 for an accuracy of 1 Hz. We get

*x*(

*t*

_{p}) = {− 0.9809, 0.9239, 0.7071, 0, − 1, 1, 1}, and let us suppose

*φ*

_{0}= 0,

*s*(

*t*

_{p}) = {0.1951, − 0.3827, − 0.7071, − 1, 0, 0, 0} and

*b*= {0, 1, 1, 1, 1, 0, 0}, where

*p*

_{0}= 5 without regard of noise.

Two factors influence the accuracy or even the correctness of frequency estimation by exponential sampling: first of all, if at the first sampling time *t*_{1} = 1/128 (s), the system frequency is suddenly changed to 65 Hz, we have *s*(*t*_{1}) = − 0.0491, which means *b*_{1} = 1 and introduces frequency estimation error of 2^{Q−1} = 64 Hz; secondly, if the noise is big enough, values of samples may change from negative to positive (e.g., *b*_{2} = − 0.3827 may change to a positive value because of noise), which introduce frequency error of 2^{Q−2} = 32 Hz. So in the algorithm of amended exponential sampling (AES), we may set *b*_{0} = 0 and *b*_{1} = 1 constantly for *P* = *Q* = 7.

#### 3.2.2 Process of frequency tracking cycle-by-cycle

*L*is the total number of cycles to be generated and \( {f}_{meas}^l \),

*l*= 1,2,…,

*L*are the measured frequency in the

*l*th cycle by inner-layered calculation. In the following, we named the algorithm as “TLI-DFT (Two-layered iterative DFT) aided by AES”. In Fig. 5, the inner-layered iteration processes are implemented by iterative DFT in 1 cycle as shown in Fig. 3.

#### 3.2.3 Rate of change of amplitude and frequency

*A*

^{r + 1}and

*A*

^{r}in the period of

*T*

_{s}. It is calculated by taking the time-derivative of the estimated amplitude numerically

### 3.3 DFT analysis of off-nominal stepped-signals

In general, voltage and current waveforms are not always nominal sinusoids or cosine wave, particular in a distributed power system. Researchers have done some works on correcting this asynchronous effect [13, 28, 29]. Transients are non-unsteady states that occur in the power system. They are electrical transients and electromechanical transients generally.

The former are caused by faults and other switching operations, while the latter ones are generated by dynamic movement of rotors of generators and following power system disturbances [26, 30]. Phasors calculated in electrical transients often display a step change in phase angles and amplitude, but not the frequency. However, the motor speed in modern power systems may deviate from synchronous speed by 0.1~5 Hz, the phase angle behavior during the phasor estimation window is approximately linear [26, 30]. Recommend by IEEE Std. C37.118-2005 [30], three step-changing models are adopted.

#### 3.3.1 Scenario of amplitude step

*A*and

*A*

^{'}(we have

*A*

^{′}∈ {0.9

*A*, 0.8

*A*, 0.7

*A*}) are the amplitudes of a voltage or current signal. An example of an amplitude step is shown in Fig. 6, in which

*A*= 1 p.u.. A step change occurs (

*A’*→

*A*) at time

*t*= 2

*T*(cycle) in Fig. 6a. Amplitude given by phasor is shown in Fig. 6b. The total vector error (TVE) accuracy criterion detects errors in time synchronization, and phasor magnitude and angle estimation errors shown in Fig. 6c, where an amplitude variation of 0.1

*A*generates 10% TVE.

*X*

_{meas}is the measured vector, and

*X*

_{nomi}is the nominal one.

The theoretical values of a synchrophasor representation of a sinusoid and the values obtained from a PMU (phasor measure unit) may include differences in both amplitude and phase. Although they could be separately specified, the amplitude and phase differences are considered together in this standard in the quantity called TVE. TVE is an expression of the difference between a “perfect” sample of a theoretical synchrophasor and the estimate given by the unit under test at the same instant of time [25].

The amplitude step change can influence phase angle of a phasor, the measured frequency, and ROCOF.

ROCOA, ROCOF, and frequency calculated by traditional DFT algorithm is shown in Fig. 6c–e. We find that an amplitude step can influence phasor measurement whose samples contains the stepped one and the variation starts from the beginning of first cycle to beginning of second cycle (in time-axis) as shown in Fig. 6.

#### 3.3.2 Scenario of phase step

*ω*(Δ

*ω*∈ {

*π*/2,

*π*/3,

*π*/6}) at time

*t*= 2

*T*(cycle) is shown in Fig. 7, in which

*A*= 1 p.u.,

*f*

_{0}= 60 Hz,

*φ*

_{0}= 0. We have

Phase step influences amplitude and phase of measured phasor in a great deal. The measured TVE, frequency, and ROCOF are influenced as well as shown in Fig. 7.

#### 3.3.3 Scenario of frequency step

*f*is the frequency step of the signal as shown in Fig. 8, in which

*A*= 1 p.u.,

*f*

_{0}= 60 Hz, and

*φ*

_{0}= 0. Step occurs at the beginning of the second cycle

*t*= 2

*T*(cycle).

A phasor is severely influenced by step frequency as long as it exists in the signal. The circumstances of phase step and frequency step are similar as shown in Figs. 7 and 8.

## 4 Simulation results and data analysis

*T*

_{s}is adopted. Based on a feedback system, if the sampling frequency

*f*

_{s}equals to

*N*times of the frequency of the incoming signal

*f*

_{input}, it provides that the incoming signal does not fluctuate in frequency [31]. New algorithm is compared with the traditional one. Parameters used in simulation are listed in Table 1.

Parameters used in simulation

Symbol | Quantity | Value | Unit |
---|---|---|---|

| Fundamental frequency | 60 | Hz |

| Angular frequency of fundamental signal | – | Radian |

| Amplitude of fundamental signal | 1 | p.u. |

| Initial phase angle | 0 | Degrees |

| Number of samples per cycle | 12 | – |

| Sampling frequency | – | Hz |

| Sampling interval | – | Seconds |

| Length of signal (in cycles) | 1000 | Cycles |

| Length of 1 cycle | 0.0167 | Seconds |

Δ | Shifting frequency off the nominal one | [− 5, 5] | Hz |

SNR | Signal-to-noise ratio | dB |

Weighted mean of *f*_{r}, *f*_{r} + 1, and *f*_{r} + 2 that are calculated by three successive windows is adopted as a substitute of *f*_{r}, which can provide a more smooth value for evaluation [25].

Five more complicated scenarios are considered to demonstrate the performance of the algorithms in the following text.

Scenario 1: Frequency changes randomly in every cycle.

*f*

_{l}= {Δ

*f*

_{1}, Δ

*f*

_{2}, …, Δ

*f*

_{L}} and the integral Δ

*f*

_{l}∈ [−5, 5]Hz are generated stochastically.

*N*

_{noise}which can influence convergence of DFT iteration, especially in the situation of low SNR. Results of frequency tracking cycle-by-cycle by three algorithms are listed in Table 2, in which the smallest MSE is gotten by TLI-DFT aided by AES. Mean squared error (MSE) of frequencies versus SNR and the number of iterations are shown in Fig. 9.

Comparison of three algorithms (iterative process stops at third iteration)

| Algorithm | Δ | Total MSE | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|

1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | |||

0 (60) | 0 (60) | 5 (65) | − 3 (57) | 2 (62) | − 2 (58) | − 2 (58) | 4 (64) | 0 (60) | 1 (61) | |||

20 dB | DFT iteration aided by AES | 60.0333 | 58.4136 | 64.0000 | 57.9770 | 60.6543 | 57.1513 | 57.5411 | 63.5073 | 58.9226 | 61.1667 | 1.9778 |

DFT iteration | 59.2771 | 58.7789 | 65.5311 | 57.7068 | 60.6949 | 56.6914 | 57.1799 | 64.4430 | 59.3222 | 62.5303 | 1.4521 | |

Variable sampling measurement [31] | 57.4167 | 62.9167 | 62.7500 | 60.3333 | 61.0000 | 58.4167 | 60.2500 | 64.8333 | 55.7500 | 61.8333 | 5.5808 | |

15 dB | 3 (63) | 2 (62) | 5 (65) | − 3 (57) | 4 (64) | 0 (60) | 2 (62) | − 4 (56) | − 3 (57) | 5 (65) | ||

DFT iteration aided by AES | 64.0144 | 60.2727 | 62.6321 | 55.2965 | 60.7808 | 58.0518 | 65.3453 | 57.9144 | 58.0186 | 64.9271 | 3.8810 | |

DFT iteration | 63.6640 | 61.2829 | 57.7354 | 56.3717 | 65.5300 | 57.5044 | 62.4709 | 55.4884 | 56.9142 | 60.9407 | 3.6784 | |

Variable sampling measurement [31] | 58.2500 | 61.0833 | 64.0000 | 60.2500 | 62.0833 | 51.5167 | 60.0000 | 51.6667 | 58.8333 | 68.9167 | 10.9262 |

Because Δ*f*_{l} is generated stochastically in every cycle, frequencies of different cycles are irrelevant. Iterative DFT algorithm was utilized according to Fig. 3.

Comparing with algorithm of DFT iteration (red curve) in 1 cycle, algorithm of “DFT aided by AES (Green curve)” would not do much help as shown in Fig. 9. It is due to the fact that frequency step happens at the beginning of every cycle randomly, and the frequency calculated in previous cycle would not help to give a more precise initial frequency for the following cycle. In the algorithm of [31], the sampling frequency at each iteration is re-calculated till the value of tan(*φ*_{m}/2) approaching the nominal and fixed value tan(*φ*_{0}/2) [31].

Scenario 2: Amplitude modulated by a cosine signal.

*a*and

*f*

_{m}are the modulating factor and the modulation frequency. Performances of three algorithms are compared and shown in Fig. 10, from which we find performance of algorithm TLI-DFT aided by AES is better than other two if the SNR is less than 20 dB. And two or three times of iteration can give a satisfying result as shown in Fig. 10b.

*f*

_{m}and

*a*. Using trigonometric function, Eq. 29 is rewritten to be

The amplitude modulation can be look on as adding inter-harmonics into a nominal signal from Eq. (30).

*f*

_{m}is generally much smaller than the nominal frequency, the inter-harmonics are quite close to the nominal one in spectrum. It is hard to be eliminated by low-pass filters (LPF) or smoothed by windows. Influence of inter-harmonics on TVE is shown in Fig. 12 with different

*f*

_{m}and

*a*.

Scenario 3: Phase modulated by a cosine signal.

*a*is modulation factor and

*f*

_{m}is modulation frequency. Adopting second-order Taylor expansion and trigonometric function, we have

*a*< < 1. The phase modulation is the same as amplitude modulation in Eq. 30. And if the amplitude and phase modulations occur simultaneously, the signal

*x*(

*t*) contains the sum and difference frequencies of sine and cosine components, which is called inter-modulation. TVE of phasor in phase modulation with different modulation frequency is shown in Fig. 13.

Scenario 4: Frequency modulated by a cosine signal.

*a*and the modulation frequency

*f*

_{m}is represented as

*t*. Fortunately, three kinds of modulation in scenario 2~4 are all of short-time characteristic, which lasts only several cycles in transient states of a power system. So the representations of three modulation models are all similar in transient conditions.

Scenario 5: Decaying direct current offset components.

*N*

_{DC}is the number of DC offset components,

*I*

_{i}and

*τ*

_{i}are the amplitude and time constant of the

*i*th DC offset component.

*T*

_{DC}is the operation time of decaying DC offsets. DC offset is a non-periodic signal whose frequency encompasses the whole spectrum, and it cannot be removed by simple anti-aliasing LPF.

*N*

_{DC}= 2). Their parameters are listed in Table 3. Their wave-forms are shown in Figs. 14 and 15. Speed of decaying of DC offset 1 is faster than that of DC offset 2. But the absolute value of amplitude of DC offset 2 is smaller.

Parameters of decaying DC offset components

Number | Amplitude | Time constant |
---|---|---|

1 | − 1 | 0.5 |

2 | − 0.125 | 5 |

*T*

_{DC}= 10 cycle). MSE of our proposed algorithms would not obtain much more gain when number of iterations is more than 3 or 4 as shown in Fig. 16b.

## 5 Additional discussions

Chaari et al. proposed a new tool of wavelets for the resonant-grounded power distribution systems [47, 48, 49]. An earth-phase fault was simulated, and then a wavelet transform (WT) is applied on two kinds of fault currents in the transient signals. The meaningful information is contained in fault signals and was obtained by this recursive wavelet transformation.

They also used wavelets-associated artificial neural networks to classified fault currents. They chose “mother wavelet” by fast decaying oscillation function in a simulated 20 kV resonant grounded relaying networks.

According to WT theory, Zhang et al. constructed a mother wavelet that is suitable for processing transient signals in a power system [50]. WT was carried out to detect transform inrush current. This recursive WT consist of two parts: backward transform based on historical data and forward transform, the latter one is calculated with future data and is based on the detection of the singularity of the power signals.

WT is more suitable in detecting disturbances than DFT/FFT when the time varies. With the time-frequency localization characteristics embedded in wavelets, the information of frequency and time combined might be presented as a visualized scheme [51]. Morlet wavelets was adopted and tested of various simulated disturbances, e.g., harmonics analysis, momentary interruption and oscillatory, voltage swell, and sag. It is feasible and practical to use WT in supervising disturbances in a power system [52]; however, more suitable WT approaches should be found and evaluated.

Trapezoid WT was supposed to be better than other WT methods, such as Mexico hat wavelet, Haar wavelet, and Morlet wavelet, in localizability and symmetry, and it had a more even frequency characteristics [53]. Trapezoid WT required less time-window data to detect characteristics in the fault signal and was better continuous than Shannon wavelet function in frequency tracking.

Lin et al. proposed a two-stepped approach to filter the high order harmonics by a bi-orthogonal WT and then extract the oscillation feature from the remnant signal by a complex WT. And in order to be implemented for real-time applications, they used a Mallat algorithm and the recursive version for torsional oscillation [54]. And furthermore, an improved boundary protection scheme based on a complex WT (which was used as a band-pass filter to contain enough higher frequencies) and spectrum energy evaluation was put forward to distinguish internal faults from different kinds of external ones with higher reliability [55]. Their scheme provides an option to implement boundary protection and transient-based protection.

Within three samples of an input signal, a recursive WT was capable of estimating the frequency known as fast response. It also could achieve accurate estimation over a wide range of frequency changes [56, 57, 58]. To meet the needs of high accuracy and low amount of calculation, people could select the signal sampling rate and data window length arbitrarily. In their conclusions, selecting sampling frequency of 18 kHz, a phasor could be computed within 0.5 cycle of input signal and the error was less than 1% TVE. How to select the two parameters of sampling rate and window length is the key issue.

## 6 Conclusions

A new approach of two-layered iterative DFT is proposed to track the input frequency in dynamic states. Inner-layered DFT iteration is adopted in every cycle, and frequency estimated in the previous cycle is used as the initial frequency in the following one. And a simple and fast method, exponential sampling is amended to adapt to the non-steady states. This algorithm is more accurate than the traditional one. New algorithms are compared with the old one with different situations, e.g., input frequencies changing randomly, signal modulated by a cosine signal, and in the presence of decaying DC offsets. New algorithms are tested with different simulation parameters, such as different SNR and maximal numbers of iteration predefined to stop the iteration process.

Simulation results show that SNR of 20 dB is about the point of inflection. Low SNR would influence the performance of proposed algorithm. Fortunately, many researches show that wide-band AWGN is not a serious problem is power system, which is always more than 40 dB. And maximal numbers of iteration is better to be three or four. More iteration would not do much help to increase the accuracy of frequency estimation.

In practical, variable sampling algorithms are highly connected with phase locked loop (PLL) of the frequency generator and the digital signal processor. Multiple-rated structure of adaptive PLL and time-varying PLL-based sampling methods is the main work for implementation of the proposed TLI-DFT algorithm.

In the following study, Hamming window, Hanning window, Blackman window, and other kinks of windows should be compared with rectangle window used in this study.

## Notes

### Acknowledgements

Not applicable

### Funding

This work in partly supported by High Tech. of Key Research and Development Project of Hainan Province (ZDYF 2018012) and by National Natural Science Foundation of China (no. 61661018).

### Authors’ contributions

HL contributed 100%. The author read and approved the final manuscript.

### Competing interests

The authors declare that they have no competing interests.

A small part of this paper was submitted to 2018 International Conference on Communications, Signal processing and Systems (CSPS 2018) previously. However, the vast majority of this study is original, and new algorithms and scenarios are introduced firstly in the paper. In this paper, a frequency estimation method named exponential sampling is amended to calculate the initial sampling frequency in the inner-layered process of the DFT iteration. Performance of new algorithm were studied and analyzed in some non-steady states of different scenarios (e.g., sudden and random frequency change, signal modulated by a cosine signal).

### Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## References

- 1.M.M. Begovic, P.M. Djuric, S. Dunlap, A.G. Phadke, Frequency tracking in power networks in the presence of harmonics. IEEE Trans. Power Del
**8**(2), 480–486 (1993)Google Scholar - 2.C.T. Nguyen, K. Srinivasan, A new technique for rapid tracking of frequency deviation based on level crossings. IEEE Trans. Power App. Syst
**PAS-103**(8), 2230–2236 (1984)Google Scholar - 3.M.S. Sachdev, M.M. Giray, A least error squares technique for determining power system frequency. IEEE Trans. Power App. Syst
**PAS-104**(2), 437–444 (1985)Google Scholar - 4.V.V. Terzija, M.B. Djuric, B.D. Kovacevic, Voltage phasor and local system frequency estimation using Newton type algorithm. IEEE Trans. Power Del
**9**(3), 1368–1374 (1994)Google Scholar - 5.H.C. Wood, N.G. Johnson, M.S. Sachdev, Kalman filtering applied to power system measurements for relaying. IEEE Trans. Power App. Syst
**PAS-104**(12), 3565–3573 (1985)Google Scholar - 6.A. Routray, A.K. Pradhan, K.P. Rao, A novel Kalman filter for frequency estimation of distorted signals in power systems. IEEE Trans. Instrum. Meas
**51**(3), 469–479 (2002)Google Scholar - 7.E.M. Siavashi, S. Afshania, M.T. Bina, M.K. Zadeh, M.R. Baradar,
*Frequency estimation of distorted signals in power systems using particle extended Kalman filter*(2nd Int. Conf. PEITS, Shenzhen, 2009), pp. 174–178Google Scholar - 8.T. Lobos, J. Rezmer, Real-time determination of power system frequency. IEEE Trans. Instrum. Meas
**46**(4), 877–881 (1997)Google Scholar - 9.R. Vianello, M.O. Prates, C.A. Duque, A.S. Cequeira, P.M. da Silveira, P.F. Ribeiro,
*New phasor estimator in the presence of harmonics, DC-offset and interharmonics*(14th ICHQ, Bergamo, 2010), pp. 1–5Google Scholar - 10.J.Z. Yang, C.W. Liu,
*A new family of measurement technique for tracking voltage phasor, local system frequency, harmonics and DC offset, IEEE PES Summer Meeting*(IEEE, Seattle, 2000), pp. 1327–1332Google Scholar - 11.B. Zeng, Z.S. Teng, Y.L. Cai, S.Y. Guo, B.Y. Qing, Harmonic phasor analysis based on improved FFT algorithm. IEEE Trans. Smart Grid
**2**(1), 51–59 (2011)Google Scholar - 12.M. Karimi-Ghartemani, B. Ooi, A. Bakhshai, in
*Investigation of DFT-based phasor measurement algorithm*. IEEE PES General Meeting (IEEE, Minneapolis, 2010), pp. 1–6Google Scholar - 13.A.G. Phadke, J.S. Thorp, M.G. Adamiak, A new measurement technique for tracking voltage phasor, local system frequency and rate of change of frequency. IEEE Trans. on Power App. Syst
**PAS-102**(5), 1025–1038 (1983)Google Scholar - 14.S. Kay, Simple frequency estimation via exponential samples. IEEE Signal Process. Lett
**1**(5), 73–75 (1994)Google Scholar - 15.H. Olkkonen, J.T. Olkkonen, Log-time sampling of signals: Zeta transform. Open J. Discrete Mathematics
**1**(2), 62–65 (2011)MathSciNetzbMATHGoogle Scholar - 16.I. Sadinezhad, V.G. Agelidis, in
*Extended staggered undersampling synchrophasor estimation technique for wide area measurement systems*. IEEE PES ISGT (IEEE, Perth, 2011), pp. 1–7Google Scholar - 17.C. Rusu, P. Kuosmanen, Phase approximation by logarithmic sampling of gain. IEEE Trans. Circuits Syst. II Analog Digit. Signal Process
**50**(2), 93–101 (2003)Google Scholar - 18.S. Trittle, F.A. Hamprecht, Near optimum sampling design and an efficient algorithm for single tone frequency estimation. Digit. Signal Process
**19**(4), 628–639 (2009)Google Scholar - 19.C.S. Yen, Phase-locked sampling instruments. IEEE Trans. Instrum. Meas
**14**(1/2), 64–68 (1965)Google Scholar - 20.H. Karimi, M. Karimi-Ghartemani, M.R. Iravani, Estimation of frequency and its rate of change for applications in power systems. IEEE Trans. Power Del
**19**(2), 472–480 (2004)Google Scholar - 21.R. Elasmi-Ksibi, H. Besbes, R. Lopez-Valcarce, S. Cherif, Frequency estimation of real-valued single-tone in colored noise using multiple autocorrelation lags. Signal Process
**90**(7), 2303–2307 (2010)zbMATHGoogle Scholar - 22.P. Stoica, R.L. Moses, T. Soderstrom, J. Li, Optimal high-order Yule-Walker estimation of sinusoidal frequencies. IEEE Trans. Signal Process
**39**(6), 1360–1368 (1991)Google Scholar - 23.D. Hart, D. Novosel, H. Y, B. Smith, M. Egolf, A new frequency tracking and phasor estimation algorithm for generator protection. IEEE Trans. Power Del
**12**(3), 1064–1073 (1997)Google Scholar - 24.A.G. Phadke, B. Kasztenny, Synchronized phasor and frequency measurement under transient conditions. IEEE Trans. Power Del
**24**(1), 89–95 (2009)Google Scholar - 25.IEEE Standard for Synchrophasors Measurement for Power Systems. IEEE Power & Energy Society. IEEE Std. C37.118.1-2011 (Revision of IEEE Std. C37.118
^{TM}-2005). 2011Google Scholar - 26.K. Martin, D. Hamai, M.G. Adamiak, S. Anderson, M. Begovic, G. Benmouyal, G. Brunello, J. Burger, J.Y. Cai, B. Dickerson, V. Gharpure, B. Kennedy, D. Karlsson, A.G. Phadke, J. Salj, V. Skendzic, J. Sperr, Y. Song, C. Huntley, B. Kasztenny, E. Price, Exploring the IEEE Standard C37.118-2005 synchrophasors for power systems. IEEE Trans. Power Del
**23**(4), 1805–1811 (2008)Google Scholar - 27.S. Gomes, N. Martins, A. Stankovic, in
*Improved controller design using new dynamic phasor models of SVC’s suitable for high frequency analysis*. IEEE PES Transm. Distrib. Conf. Exhibi (IEEE, Dallas, 2006), pp. 1436–1444Google Scholar - 28.K. Nakano, Y. Ota, H. Ukai, K. Nakamura, H. Fujita,
*Frequency detection method based on recursive DFT algorithm*(14th PSCC, Sevilla, 2002), pp. 1–7Google Scholar - 29.M.H. Wang, Y.Z. Sun, A practical method to improve phasor and power measurement accuracy of DFT algorithms. IEEE Trans. Power Del
**21**(3), 1054–1062 (2006)MathSciNetGoogle Scholar - 30.IEEE Standard for Synchrophasors for Power Systems. IEEE Power Engineering Society. IEEE Std. C37.118-2005 (Revision of IEEE Std. 1344
^{TM}-1995). 2006Google Scholar - 31.G. Benmouyal, An adaptive sampling-interval generator for digital relaying. IEEE Trans. Power Del
**4**(3), 1602–1609 (1989)Google Scholar - 32.G. Benmouyal, Removal of DC–offset in current waveforms using digital mimic filtering. IEEE Trans. Power Del
**10**(2), 621–630 (1995)Google Scholar - 33.C.S. Yu, A discrete Fourier transform-based adaptive mimic phasor estimator for distance relaying applications. IEEE Trans. Power Del
**21**(4), 1839–1846 (2006)MathSciNetGoogle Scholar - 34.A.A. Girgis, R.G. Brown, Application of Kalman filtering in computer relaying. IEEE Trans. App. Syst
**PAS-100**(7), 3387–3397 (1981)Google Scholar - 35.T.S. Sidhu, X. Zhang, F. Albasri, M.S. Sachdev, Discrete-Fourier transform-based technique for removal of decaying DC offset from phasor estimates. IEE Proc. Gen. Transm. Distrib
**150**(6), 745–752 (2003)Google Scholar - 36.V. Balamourougan, T.S. Sidhu, in
*A new filtering technique to eliminate decaying dc and harmonics for power system phasor estimation*. IEEE Power India Conf (IEEE, New Delhi), p. 2006Google Scholar - 37.D. Belega, D. Petri, in
*Accuracy of a DFT phasor estimator at off-nominal frequency in either steady state of transient conditions*. IEEE Int. Conf. SMFG (IEEE, Bologna, 2011), pp. 45–50Google Scholar - 38.S.H. Kang, D.G. Lee, S.R. Nam, P.A. Crossley, Y.C. Kang, Fourier transform-based modified phasor estimation method immune to the effect of the DC offsets. IEEE Trans. Power Del
**24**(3), 1104–1111 (2009)Google Scholar - 39.D.G. Lee, Y.J. Oh, S.H. Kang, B.M. Han, in
*Distance relaying algorithm usinga DFT-based modified phasor estimation method*. IEEE Bucharest Power Tech. Conf (IEEE, Bucharest, 2009), pp. 1–6Google Scholar - 40.A.D. de Oliveira, L.R.M. Silva, C.H. Martins, R.R. Aleixo, C.A. Duque, A.S. Cerqueira, in
*An improved DFT based method for phasor estimation in fault scenarios*. IEEE PES General Meeting (IEEE, San Diego, 2012), pp. 1–5Google Scholar - 41.H.B. ElRefaie, A.I. Megahed, in
*A novel technique to eliminate the effect of decaying DC component on DFT based phasor estimation*. IEEE PES General Meeting (IEEE, Minneapolis, 2010), pp. 1–8Google Scholar - 42.Y.H. Lin, C.W. Liu, in
*A new DFT-based phasor computation algorithm for transmission line digital protection*. Asia Pacific IEEE/PES Transm. Distrib. Conf. Exhibi (IEEE, Yokohama, 2002), pp. 1733–1737Google Scholar - 43.X. Liu, M. Jia, X. Zhang, W. Lu, A novel multi-channel internet of things based on dynamic Spectrum sharing in 5G communication. IEEE Internet Things J. (Early Access)
**99**, 1–1 (2018)Google Scholar - 44.X. Liu, F. Li, Z.Y. Na, Optimal resource allocation in simultaneous cooperative Spectrum sensing and energy harvesting for multichannel cognitive radio. IEEE Access
**5**, 3801–3812 (2017)Google Scholar - 45.G. JC, Y. SL, Removal of DC offset in current and voltage signals using a novel Fourier filter algorithm. IEEE Trans. Power Del
**15**(1), 73–79 (2000)Google Scholar - 46.X. Liu, M. Jia, Z.Y. Na, W. Lu, F. Li, Multi-modal cooperative Spectrum sensing based on Dempster-Shafer fusion in 5G-based cognitive radio. IEEE Access
**6**, 199–208 (2018)Google Scholar - 47.M. Kezunovic, P. Spasojevic, B. Perunicic, New digital signal processing algorithms for frequency deviation measurement. IEEE Trans. Power Del
**7**(2), 1563–1573 (1992)Google Scholar - 48.O. Chaari, M. Meunier, in
*A recursive wavelet transform analysis of Earth fault currents in Petersen-coil-protected power distribution networks*. IEEE-SP international symposium on time- frequency and time-scale analysis (IEEE, Philadelphia, 1994), pp. 162–165Google Scholar - 49.O. Chaari, M. Meunier, F. Brouaye, Wavelets: A new tool for the resonant grounded power distribution system relaying. IEEE Trans. Power Del
**11**(3), 1301–1308 (1996)Google Scholar - 50.C.L. Zhang, Y.Z. Huang, X.X. Ma, W.Z. Lu, G.X. Wang, in
*A new approach to detect transformer inrush current by applying wavelet transform*. International Conference on Power System Technology. Proceedings (IEEE, Beijing, 1998), pp. 1040–1044Google Scholar - 51.S.J. Huang, C.T. Hsieh, C.L. Huang, Application of Morlet wavelets to supervise power system disturbances. IEEE Trans. Power Del
**14**(1), 235–243 (1999)Google Scholar - 52.O. Poisson, P. Rioual, M. Meunier, in
*Detection and measurement of power quality disturbances using wavelet transform*. 8th International Conference on Harmonics and Quality of Power (IEEE, Athens, 1998), pp. 1125–1130Google Scholar - 53.Z. Ren, Q.G. Huang, L. Guan, W.Y. Huang, in
*A new method for power systems frequency tracking based on trapezoid wavelet transform*. 5th APSCOM (IEEE, Hongkong, 2000), pp. 364–369Google Scholar - 54.X.N. Lin, H. Zhang, P. Liu, O.P. Malik, Wavelet based scheme for detection of torsional oscillation. IEEE Trans. Power Sys
**17**(4), 1096–1101 (2002)Google Scholar - 55.X.N. Lin, H.F. Liu, in
*A fast recursive wavelet based on boundary protection scheme*. IEEE Power Engineering Society General Meeting (IEEE, San Francisco, 2005), pp. 1–6Google Scholar - 56.J. Ren, M. Kezunovic, in
*Use of recursive wavelet transform for estimating power system frequency and phasors*. IEEE PES T&D (IEEE, New Orleans, 2010), pp. 1–6Google Scholar - 57.J. Ren, M. Kezunovic, in
*A wavelet method of power system frequency and harmonic estimation*. North American Power Symposium (IEEE, Arlington, 2010), pp. 1–6Google Scholar - 58.J. Ren, M. Kezunovic, Real-time power system frequency and phasors estimation using recursive wavelet transform. IEEE Trans. Power Del
**26**(3), 1392–1402 (2011)Google Scholar

## Copyright information

**Open Access**This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.