# Robust Power System Frequency Estimation Based on a Sliding Window Approach

Authors: Dun Pei; Yili Xia
Journal: Mathematical Problems in Engineering
 (2019)

---

## Abstract

A novel framework for online estimation of the fundamental frequency of power system in both the single-phase and three-phase cases is proposed. This is achieved based on the consideration of the relationship among the samples within every four consecutive sliding windows and the use of the Wiener filtering approach and an adaptive filter trained by the least mean square (LMS) algorithm. Compared with the original work proposed in Vizireanu, 2011, which employs the scalar samples, the proposed vector-valued methods alleviate the drawbacks, such as sensitivity to initial phase value, noise, harmonics, DC offset, and system unbalance. Simulations on both benchmark synthetic cases and for real-world scenarios support the analysis.


---

## Body

## 1. Introduction

Frequency is a critical parameter for appropriate operation, control, and protection of an electric power system. The importance of accurate frequency estimation has become even more emphasized owing to the trends for electricity industry deregulation [1] and the subsequent penetration of distributed generation into the power grid [2, 3], where the frequency variation is an indication of unbalance between the actual power generation and the load demand. A frequency decline from its nominal value indicates a shortage of energy supply, while a frequency higher than the nominal value implies more generation than the connected load [4].To deal with these issues in a timely and efficient way, fast and accurate frequency estimation has attracted much attention. A variety of architectures and algorithms have been developed for this purpose, including zero crossing techniques [1, 5], discrete Fourier transform (DFT) based algorithms [6–10], phase-locked loops (PLLs) [11, 12], least mean square based adaptive filters [13, 14], adaptive notch filters [15, 16], and Kalman filters [17, 18].A recent class of algorithms for this purpose have made use of the mathematical advantages provided by employing a relation between the information available in consecutive data samples [19–21]. However, the main drawback of this class of approaches is that the presence of only one sample in the denominator when estimating the frequency, making the approach very sensitive and imprecise when the observed voltage is very small, for instance, due to noise or the observed region being in the vicinity of zero. To make this approach more robust, while benefiting from mathematical elegance of the original methods, one recent solution considers estimation over four successive samples, resulting in two voltage samples in the denominator and reduced sensitivity [22]. This makes these approaches well suited for online frequency estimation, especially when the number of observed voltage samples is small, and facilitates the development of portable DSP instrumentation. Despite the many advantages, owing to the use of a single data window and thus ‘scalar samples’, the reliability, and the sensitivity to signal initial phase value, noise and harmonics are still open problems, and are only partially mitigated by preprocessing, such as denoising and prefiltering [22, 23].To this end, embarking upon the analysis proposed in [24], we here present a sliding window framework which is a robust extension from a scalar into a vector windowed case. The richer available information in the proposed vector-valued approach allows for the use of more sophisticated estimation techniques, such as the Wiener filter, to extract the instantaneous frequency. We further equip the proposed framework with enhanced performance and robustness in the presence of noise and harmonics and the ability to operate in time-varying environments by developing an adaptive windowed algorithm based on the least mean square (LMS) adaptive filter. Crucially, this also allows for a recursive estimation of the mathematical relation between the four consecutive moving windows of vector-valued data samples, whereby the instantaneous frequency is estimated from the adaptive weight coefficient. Furthermore, we also extend the introduced adaptive frequency estimator for the purpose of frequency estimation in three-phase power systems.This paper is organized as follows. An overview of the scalar voltage samples based frequency estimation approaches is given in Section2. In Section 3, we derive the sliding window based Wiener and LMS estimation algorithms for both the single-phase and three-phase cases. In Section 4, the performances of the proposed windowed algorithms and the original approach are compared for various benchmark and real-world scenarios. Finally, Section 5 concludes the paper.


## 2. The Scalar Frequency Estimation Algorithms

In this section, the scalar voltage samples based frequency estimators in the context of power system frequency estimation are summarized. Consider a discrete-time noise-free voltage signal, given by(1)vk=Acos⁡ωk△T+ϕwhere A is the peak value of the voltage v(k), k a discrete-time instant, △T=1/fs sampling interval, fs sampling frequency, ϕ phase of fundamental component, and ω=2πf the angular frequency, with f being the system frequency to be estimated.Following the approach in [22], consider the difference between v(k) and v(k-3); that is,(2)vk-vk-3=Acos⁡ωk△T+ϕ-Acos⁡ωk△T+ϕ-3ω△T=-2Asin⁡ωk△T+ϕ-32ω△Tsin⁡32ω△TIn a similar way, the difference between v(k-1) and v(k-2) is given by(3)vk-1-vk-2=Acos⁡ωk△T+ϕ-ω△T-Acos⁡ωk△T+ϕ-2ω△T=-2Asin⁡ωk△T+ϕ-32ω△Tsin⁡12ω△TIf v(k-1)≠v(k-2), upon dividing (2) by (3) and subtracting a unity, we obtain(4)vk-vk-3vk-1-vk-2-1=sin⁡3/2ω△Tsin⁡1/2ω△T-1=sin⁡3/2ω△T-sin⁡1/2ω△Tsin⁡1/2ω△T=2cos⁡ω△Tsin⁡1/2ω△Tsin⁡1/2ω△T=2cos⁡ω△Tand the instantaneous system frequency can be estimated as(5)f^k=fs2πcos-1⁡12vk-vk-3vk-1-vk-2-1This gives statistical advantages compared with other algorithms belonging to the same class [19–21], which have only one voltage sample in the denominator; that is,(6)2cos⁡ω△T=vk+vk-2vk-1f^k=fs2πcos-1⁡vk+vk-22vk-1Estimates based on (6) are vulnerable, as there exist instants in each period of the voltage signal when the value of v(k-1) is in the vicinity of zero, resulting in unstable and incorrect frequency estimates. Although the frequency estimation approach based on four consecutive samples alleviate this problem by considering the difference between two voltage samples, that is, v(k-1)-v(k-2), in the denominator of the arccosine argument in (5), this only partially solves the problem since there still exist some specific values of the initial phase ϕ, which lead to a zero-valued denominator in both approaches. For instance, consider the case when v(k-1)-v(k-2)=0, and from (3) this condition is equivalent to(7)sin⁡ωk△T+ϕ-32ω△T=0which gives(8)ϕ=mπ-k-32ω△T,k,m∈NFrom (8), it is clear that the initial phase value, causing the instability of the frequency estimators, is dependent on the system frequency and the sampling frequency, while the number of those singularities, wrapped within [0,2π), increases when the sampling frequency is high, causing the performance of the frequency estimators to degrade. One can expect that in a noisy environment, some initial phase values ϕ around the singularities, expressed in (8), would cause the difference between the two samples in the denominator of the frequency estimators to be very small. Thus, a direct real-world application would not produce reliable estimates, and preprocessing techniques, such as denoising and prefiltering, are necessary [23]. It is also worth mentioning that a general N scalar samples based model for frequency estimation can be found in [25].


## 3. The Proposed Windowed Approaches

To alleviate the drawbacks of the scalar frequency estimators, inspired by a recent work in [24], we here introduce a vector-valued sliding window technique into the four scalar voltage samples based frequency estimator. Based on the fact that the relationship between the scalars {v(k-3),v(k-2),v(k-1),v(k)} in (4) holds at every time instant and the reasonable assumption that the system frequency is constant within this window, the proposed vector windowed technique is a generic extension from the scalar case. Consider the following four data windows of multiple samples with length L: so (9)vk≜vk,…,vk-L+1Tvk-1≜vk-1,…,vk-LTvk-2≜vk-2,…,vk-L-1Tvk-3≜vk-3,…,vk-L-2TUsing (9), we can extend the relationship in (4) to obtain(10)vk-vk-3=vk-1-vk-22cos⁡ωΔT+1By virtue of the vector-valued approach, we now have a sufficient number of data samples for a robust estimate on cos⁡(ωΔT) by using the standard Wiener filtering approach, when the voltage is contaminated by the measurement noise [26], given by (consider a linear model y=wx, where x is a vector of independent variables, y the vector of dependent variables, and w the fixed coefficient. The Wiener filtering solution gives an estimate of w in a sense of minimization of mean square error (MSE) as w = E[xTx]-1E[xTy] = E[xTy]/Ex22)(11)2cos⁡ω^ΔT+1=vk-1-vk-2Tvk-vk-3vk-1-vk-222and(12)f^k=fs2πcos-1⁡12vk-1-vk-2Tvk-vk-3vk-1-vk-222-1Note that the scalar-valued approach in (5) is a special case of (12) when L=1.


### 3.1. A Single-Phase Windowed LMS Approach

However, in the Wiener filtering approach, the filter weights are kept fixed with the assumption that the signal is stationary, making such an approach ill-equipped for the operation in unbalanced system conditions and in the presence of random disturbances, higher order harmonics, and DC offsets. To deal with these issues, we further introduce adaptive frequency estimation based on the least mean square (LMS) algorithm, widely used in adaptive signal processing. We show that the evolution of the corresponding weight coefficient can be used to estimate the system frequency recursively and, in real time, while at the same time giving unbiased estimates. In the context of adaptive filtering, the left hand side of (10) can be estimated by a linear model:(13)yk=vk-1-vk-2wk where y(k) is the filter output and w(k) the time-varying filter weight (coefficient) at time instant k. The estimation error e(k) and the cost function J(k) can be, respectively, defined as(14)ek=vk-vk-3-yk(15)Jk=12eTkekwhere v(k)-v(k-3) serves as the desired signal that we wish to estimate. The weight update of the adaptive coefficient w(k) can be evaluated as(16)wk+1=wk-μ∇wJkwhere μ is the step-size that controls the trade-off between the convergence speed and steady-state estimation error variance [26]. The gradient in (16) can be derived in the form(17)∇wJk=∂Jk∂wk=12eTk∂ek∂wk+∂eTk∂wkek=-eTk∂yk∂wk=-eTkvk-1-vk-2Hence, the recursive weight update of the proposed estimate takes the form(18)wk+1=wk+μeTkvk-1-vk-2and the estimated transient frequency and the instantaneous system frequency are calculated as(19)f^k=fs2πcos-1⁡wk-12The stability of such a closed-loop adaptive system based on the windowed LMS is addressed in the Appendix. Note that the proposed windowed LMS scheme is not limited to the voltage modeling based on (4); it can be applied to extend any frequency estimation method which uses relationships between consecutive voltage samples based on a pure sinusoidal/exponential signal model, such as those in [4, 13, 27].


### 3.2. A Three-Phase Windowed LMS Approach

In a three-phase power system, if line-to-line voltages are considered, no single-phase frequency estimation method adequately characterizes system frequency, because up to six different single-phase voltage signals may exist [28]. Therefore, an optimal solution would be based on a framework which simultaneously considers all the three-phase voltages, thus enabling a unified estimation of system frequency as a whole and providing enhanced robustness. To this end, we extend the proposed windowed LMS approach to cater for the system frequency estimation in three-phase power systems. Consider the following noise-free unbalanced three-phase power system, given by [10, 29](20)vak=Vacos⁡ωk△T+ϕavbk=Vbcos⁡ωk△T+ϕbvck=Vccos⁡ωk△T+ϕcwhere Va,Vb,Vc and ϕa,ϕb,ϕc are, respectively, the peak values and initial phases of each fundamental voltage component. A composite sliding window which comprises L consecutive samples in all the three phases is then given by(21)v3pk=vakvbkvckIt therefore holds that(22)v3pk-v3pk-3=v3pk-1-v3pk-22cos⁡ωΔT+1Similar to the analysis in Section 3, the corresponding windowed LMS algorithm for the estimation of the system frequency can be summarized as(23)yk=v3pk-1-v3pk-2w3pkek=v3pk-v3pk-3-ykf^3pk=fs2πcos-1⁡w3pk-12w3pk+1=w3pk+μ3peTkv3pk-1-v3pk-2The stability analysis for this approach conforms with the analysis for a single-phase frequency estimate, given in the Appendix.


### 3.3. Differences between the Proposed Windowed LMS Frequency Estimators and Some Existing Ones

The proposed windowed LMS frequency estimators are derived without the assumption that the actual system frequency does not deviate too much from its nominal value, and, hence, they can still work when the power system experiences large frequency variations, as compared with phasor measurement units [9, 30]. More specifically, as illustrated in Section 3.2, the proposed three-phase windowed LMS approach is generically designed for unbalanced power systems. While both the conventional DFT and adaptive filter based approaches, such as those in [6, 14], render unreliable frequency estimates, represented by bias and oscillations at twice the system frequency, in unbalanced power conditions, because the αβ-transformed system voltage is no longer a single complex-valued exponential [31–37], a breakdown of the underlying voltage model employed in [6, 14].


## 3.1. A Single-Phase Windowed LMS Approach

However, in the Wiener filtering approach, the filter weights are kept fixed with the assumption that the signal is stationary, making such an approach ill-equipped for the operation in unbalanced system conditions and in the presence of random disturbances, higher order harmonics, and DC offsets. To deal with these issues, we further introduce adaptive frequency estimation based on the least mean square (LMS) algorithm, widely used in adaptive signal processing. We show that the evolution of the corresponding weight coefficient can be used to estimate the system frequency recursively and, in real time, while at the same time giving unbiased estimates. In the context of adaptive filtering, the left hand side of (10) can be estimated by a linear model:(13)yk=vk-1-vk-2wk where y(k) is the filter output and w(k) the time-varying filter weight (coefficient) at time instant k. The estimation error e(k) and the cost function J(k) can be, respectively, defined as(14)ek=vk-vk-3-yk(15)Jk=12eTkekwhere v(k)-v(k-3) serves as the desired signal that we wish to estimate. The weight update of the adaptive coefficient w(k) can be evaluated as(16)wk+1=wk-μ∇wJkwhere μ is the step-size that controls the trade-off between the convergence speed and steady-state estimation error variance [26]. The gradient in (16) can be derived in the form(17)∇wJk=∂Jk∂wk=12eTk∂ek∂wk+∂eTk∂wkek=-eTk∂yk∂wk=-eTkvk-1-vk-2Hence, the recursive weight update of the proposed estimate takes the form(18)wk+1=wk+μeTkvk-1-vk-2and the estimated transient frequency and the instantaneous system frequency are calculated as(19)f^k=fs2πcos-1⁡wk-12The stability of such a closed-loop adaptive system based on the windowed LMS is addressed in the Appendix. Note that the proposed windowed LMS scheme is not limited to the voltage modeling based on (4); it can be applied to extend any frequency estimation method which uses relationships between consecutive voltage samples based on a pure sinusoidal/exponential signal model, such as those in [4, 13, 27].


## 3.2. A Three-Phase Windowed LMS Approach

In a three-phase power system, if line-to-line voltages are considered, no single-phase frequency estimation method adequately characterizes system frequency, because up to six different single-phase voltage signals may exist [28]. Therefore, an optimal solution would be based on a framework which simultaneously considers all the three-phase voltages, thus enabling a unified estimation of system frequency as a whole and providing enhanced robustness. To this end, we extend the proposed windowed LMS approach to cater for the system frequency estimation in three-phase power systems. Consider the following noise-free unbalanced three-phase power system, given by [10, 29](20)vak=Vacos⁡ωk△T+ϕavbk=Vbcos⁡ωk△T+ϕbvck=Vccos⁡ωk△T+ϕcwhere Va,Vb,Vc and ϕa,ϕb,ϕc are, respectively, the peak values and initial phases of each fundamental voltage component. A composite sliding window which comprises L consecutive samples in all the three phases is then given by(21)v3pk=vakvbkvckIt therefore holds that(22)v3pk-v3pk-3=v3pk-1-v3pk-22cos⁡ωΔT+1Similar to the analysis in Section 3, the corresponding windowed LMS algorithm for the estimation of the system frequency can be summarized as(23)yk=v3pk-1-v3pk-2w3pkek=v3pk-v3pk-3-ykf^3pk=fs2πcos-1⁡w3pk-12w3pk+1=w3pk+μ3peTkv3pk-1-v3pk-2The stability analysis for this approach conforms with the analysis for a single-phase frequency estimate, given in the Appendix.


## 3.3. Differences between the Proposed Windowed LMS Frequency Estimators and Some Existing Ones

The proposed windowed LMS frequency estimators are derived without the assumption that the actual system frequency does not deviate too much from its nominal value, and, hence, they can still work when the power system experiences large frequency variations, as compared with phasor measurement units [9, 30]. More specifically, as illustrated in Section 3.2, the proposed three-phase windowed LMS approach is generically designed for unbalanced power systems. While both the conventional DFT and adaptive filter based approaches, such as those in [6, 14], render unreliable frequency estimates, represented by bias and oscillations at twice the system frequency, in unbalanced power conditions, because the αβ-transformed system voltage is no longer a single complex-valued exponential [31–37], a breakdown of the underlying voltage model employed in [6, 14].


## 4. Simulations

To illustrate the benefits of the proposed windowed methods in both the single-phase and three-phase cases, a comparative performance analysis was performed with the standard scalar based solutions [19, 22], for several typical power system operating conditions. Simulations were conducted in the Matlab programming environment at a sampling frequency of 500 Hz. The step-size of a one-phase LMS was set to μ = 0.02 and the length of the sliding window was fixed at L = 6. Owing to the fact that the effective filter length of a three-phase LMS is three times that of the one-phase LMS, to make a fair comparison, the step-size of three-phase LMS was set to a third of μ. The performances of all the algorithms were quantified by the mean square error (MSE) in dB, defined as(24)MSEdB=10log10⁡∑k=1Kf0-f^k2Kwhere the MSE was evaluated over the segment of 0.5 sec; hence K=250.


### 4.1. Synthetic Benchmark Cases

The simulated power system in its normal operating condition had the frequency of 50 Hz and the initial phaseΦ=0.2, with a balanced three-phase voltages with unity magnitudes. In the first set of simulations, we considered the performances of all the approaches in a noisy environment with the signal to noise ratio (SNR) = 60 dB. Figure 1 illustrates the estimation performances with all the estimators initialized at 50.5 Hz. As expected, the 4-sample based approach in (5) alleviated the sensitivity to noise of the 3-sample based one in (6), by considering two samples in the denominator and hence reducing the likelihood of close-to-zero input. However, a direct application of this 4-sample based estimator was still unreliable, giving large oscillations at close-to-zero points, whereas the proposed Wiener filtering and windowed approach obtained frequency estimates with small error power. Note that, due to the recursive nature of the weight update involved in the proposed windowed LMS approaches for both single-phase and three-phase cases, both needed around 0.1 sec to converge. To further illustrate the robustness of the proposed sliding window techniques, the estimated MSEs of all the algorithm against different levels of white Gaussian noise were investigated. As illustrated in Table 1, the 4-sample based estimator maintained around 3 dB improvement as compared with the 3-sample based estimator, over a range of different noise levels, whereas the advantage of the proposed sliding window technique is evidenced by the 20 dB improvement obtained by the Wiener filtering solution as compared with the existing 4 scalar samples based estimator. A further improvement of 18 dB on the average, over different noise levels, was achieved by employing the recursive LMS estimator as compared with the fixed Wiener filtering solution within the proposed sliding window structure. As expected, by considering all the information within the three-phase channels, the 3-phase windowed LMS maintained around 5 dB improvement as compared with its 1-phase counterpart in the high SNR region, however, this advantage reduced when the SNR was below 40 dB. As compared, both the extended Kalman filter [17] and the recursive DFT technique [38], with the same observation length L=6, had better noise immunities than the proposed sliding windowed approaches for the single-phase power system, achieved at a higher cost paid in the computational complexity.Table 1
Steady-state estimation performance (MSE (dB)) of all the considered algorithms under different noise levels, achieved by averaging 500 independent trials.
SNR (dB) 80 70 60 50 40 30 20 3-sample approach [19] -27.47 -17.40 -7.36 2.61 13.73 22.69 30.17 4-sample approach [22] -30.73 -20.70 -10.72 -0.70 9.61 20.82 28.19 1-phase Wiener filter -51.68 -41.64 -31.60 -21.61 -11.65 -1.48 9.68 1-phase LMS -69.80 -59.76 -49.72 -39.63 -28.80 -14.10 4.52 1-phase extended Kalman filter [17] -72.56 -62.52 -52.48 -42.45 -31.38 -18.11 1.31 1-phase recursive DFT [38] -74.84 -64.81 -54.77 -44.74 -33.52 -20.21 -1.43 3-phase LMS -74.77 -64.63 -54.67 -44.42 -32.21 -15.41 4.10Figure 1
Frequency estimation in noisy conditions with SNR=60 dB.In the next simulation, the sensitivities of the considered frequency estimation approaches to higher order harmonics were addressed. When the voltage was contaminated with harmonics, the estimated frequency was subject to unavoidable oscillations due to the breakdown of the relationships between voltage samples, such as those in (4) and (6), caused by the presence of higher order harmonics. To alleviate the deteriorating effect of harmonics, voltage prefiltering is usually necessary. In this experiment, the distorted power system considered was contaminated by a 20% third and fifth harmonic, respectively, and a 6th-order bandpass Butterworth filter with cutoff frequencies of 30 Hz and 90 Hz was used to preprocess the voltages. Table 2 illustrates the steady-state performance of all the algorithms in this scenario. Even when the prefiltering was performed, harmonic distortion significantly deteriorated the performances of the 4-scalar-sample based approach and the proposed 1-phase Wiener filtering approach. On the other hand, both the 1-phase and 3-phase windowed LMS approaches obtained acceptable performance, with the MSEs of -61.58 dB and -79.39 dB, respectively.Table 2
Steady-state estimation performance (MSE (dB)) of all the algorithms for a distorted power system with higher order harmonics.
3-sample approach [19] -15.53 dB 4-sample approach [22] -19.90 dB 1-phase Wiener filter -37.68 dB 1-phase LMS -61.58 dB 3-phase LMS -79.39 dBIn some applications, e.g., in power system protection, it is important for the frequency estimators to remain insensitive to an exponentially decaying DC component. In the simulations, the distorted power system considered was contaminated by a 50% the nominal value of the voltage with the time constant of the exponentially decaying DC offset at 1.5 cycles. The robustness of the proposed sliding window based approaches is illustrated in Figure2. Note that initially around 0.1 sec is needed for the LMS adaptive filtering based approaches to converge; however, after convergence, they can track the correct frequency accurately, while the other approaches conceded.Figure 2
Frequency estimation performances of all the algorithms for a distorted power system with exponentially decaying DC offset.Next, the performances of all the algorithms were investigated for the case of frequency variation. The instantaneous angular frequencyω(k) was made time-variant as(25)ωk=2π50+sin⁡4πkΔT+sin⁡8πkΔTand contained two variation components at 2 Hz and 4 Hz, respectively. The accurate tracking capability of the proposed windowed approaches is evident from Figure 3.Figure 3
Frequency estimation of all the algorithms on the power system with system frequency variation.In the simulations so far, all the parameters in the design of the proposed frequency estimators were fixed. We now investigate the influence of two important parameters involved in the design of adaptive filters, that is, the step-sizeμ and the filter length L. In adaptive filters literature, it is well known that the step-size controls the convergence speed and steady-state error in the way that a smaller step-size leads to a higher steady-state performance and a slower convergence whereas a higher step-size results in a faster convergence but a higher steady-state estimation error [26]. Figure 4 illustrates learning curves of the proposed 1-phase and 3-phase LMS algorithms with L=6, SNR = 50 dB, and different step-sizes. As expected, a smaller step-size enables the proposed algorithms to track the system frequency more accurately but at a cost of slower convergence as compared with a larger step-size. By considering all the information within the three phases, the proposed 3-phase LMS algorithm achieved both faster tracking ability and enhanced steady-state performance at around 5 dB as compared with the 1-phase algorithm, and this advantage was robust over various step-sizes.Figure 4
Learning curves of the proposed 1-phase and 3-phase LMS algorithms against step-sizeμ with L=6 and SNR at 50 dB, achieved by averaging 500 independent trials.Filter length, or the number of the tap coefficients, is another important parameter that significantly influences the frequency estimation performance of an adaptive filter. In principle, the minimum mean squared error (MMSE) is a monotonically nonincreasing function of the filter length, but the decrease of the MMSE due to the filter length increase always becomes trivial when the filter length is long enough. Obviously, it is not suitable to have “too” long a filter, as this not only increases the complexity but also introduces more adaptation noise. Therefore, there exists an optimum filter length which best balances the steady-state performance and computational complexity; however, such an optimum filter length may vary in different environments. When the computational complexity is not an issue, one can design a variable filter length adaptive filter for frequency estimation; for more analysis, we refer to [39]. Figure 5 illustrates the frequency estimation results by the proposed 1-phase and 3-phase LMS algorithms with μ=0.02 and SNR = 50 dB over different filter length in the range between 1 and 100. The optimal filter length for both the 1-phase and 3-phase frequency estimators is around 80, which indicates that, to achieve the best performance, (80∗50)/500=8 cycles voltage samples are needed to feed the adaptive filters and seem to be unrealistic in a real-time measurement, where a timely and efficient frequency estimation is always a priority. To this end, from Figure 5, it is recommended that a small filter length less than 10 should be used. Note that the 5 dB improvement in the power system frequency estimation of the proposed 3-phase algorithm over the single-phase one is always maintained over different filter lengths.Figure 5
Steady-state estimation performance of the proposed 1-phase and 3-phase LMS algorithms as a function of filter lengthL with μ=0.02 and SNR at 50 dB, achieved by averaging 500 independent trials.In [22], it is stated that the scalar frequency estimator is not affected by the signal initial phase; however, the analysis in Section 2 illustrates that indeed the initial phase has a profound effect on its performance, especially in a noisy environment. For the example considered, where the sampling frequency fs was 500 Hz and the power system frequency f at 50 Hz, the condition in (8), leading to a zero-valued denominator of the 4 voltage samples based frequency estimator, becomes(26)ϕ=mπ-k-32ω△T=mπ-k-32∗0.2π,k,m∈Nwhere the specific values of these singularities lying in [0,2π) are ϕ=0.1π, 0.3π, 0.5π, …, 1.9π. Figure 6 illustrates the steady-state estimation performance of all the algorithms as a function of the voltage initial phase under 50 dB noise, which is achieved by averaging 500 independent trails. It conforms with the theoretical analysis in (8) and (26), showing that the accuracy of the scalar frequency estimator depends strongly on the initial phase of the sine wave and the worst performance of the 4-sample approach occurred for the initial phase set to 0.1π,0.3π,0.5π,…,1.9π. It is also interesting that the best choice for ϕ was 0, 0.2π, 0.4π, …, 1.8π, and those values gave sin⁡ωk△T+ϕ-3/2ω△T=1. As expected, the proposed windowed approaches completely solved the problem of sensitivity to the initial phase encountered by the scalar frequency estimator, and their performances were immune to the initial values of ϕ.Figure 6
Steady-state estimation performance of all the algorithms as a function of the initial phase, which was normalized byπ. The filter length of the proposed 1-phase Wiener filter and 1-phase and 3-phase LMS algorithms was L=6, the step-size μ=0.02, and SNR was 50 dB. The results were achieved by averaging 500 independent trials.


### 4.2. Real-World Case Study

In the last set of simulations, a real-world measurement was considered. The three-phase voltages were recorded at a 110/20/10 kV transformer station. The REL 531 numerical line distant protection terminal, produced by ABB Ltd., was installed in the substation and was used to monitor changes in the three-phase-ground voltages. In the three-phase power system at the transformation level, one of the common power-quality disturbances is the voltage sag, despite its relatively short duration. A voltage sag is referred to as a short-term (up to a few seconds) reduction in voltage magnitude, whereby the three-phase angles also deviate from their nominal positions. Voltage sags are mainly triggered by a short-term increase in load current or fast reclosing of circuit breakers [10, 29]. Despite their short duration, such events can cause serious problems for a wide range of equipment and also cause difficulties in frequency estimation. A typical real-world voltage sag was recorded by the REL 531 distant protection terminal with 1000 Hz sampling frequency and is shown in Figure 7(a), where the phase voltage vb of the power system experienced an earth fault, causing the voltage to drop to 48% of its nominal value; meanwhile there were 48% and 23% voltage swells on va and vc, respectively. The voltage was normalized with respect to its normal peak voltage value. The phasor representation of the three-phase voltage was calculated by using the DFT technique as proposed in [38] and is shown in Figure 7(b). Besides the unbalanced voltage magnitudes, the phase differences between va and vb and between va and vc were 115∘ and 80∘, respectively, and both deviated from the nominal 120∘. Although the investigated power system was in the unbalanced condition, Figure 7(a) indicated that the system frequency was still around 50 Hz. All the frequency estimators were applied on this unbalanced power system. A sliding window of 6 samples was used by the proposed windowed approaches and the step-size of the 1-phase and 3-phase LMS algorithms was set to be 0.02. Figure 7(c) illustrates the frequency estimation performance of all the algorithms. A direct application of the 4-sample frequency estimator gave an unsatisfactory result with large estimation oscillations whereas the proposed windowed approaches, especially adaptive windowed LMS ones, alleviated this problem efficiently. As expected, the 3-phase windowed LMS algorithm tracked the system frequency most accurately, with around 0.05 sec needed for convergence.Figure 7
Frequency estimation performances for a real-world unbalanced three-phase power system.
(a)
Time-series of a real-world unbalanced three-phase power system (b)
Phasor representation of the unbalanced three-phase power system (c)
A comparison of estimation performances of all the algorithms


## 4.1. Synthetic Benchmark Cases

The simulated power system in its normal operating condition had the frequency of 50 Hz and the initial phaseΦ=0.2, with a balanced three-phase voltages with unity magnitudes. In the first set of simulations, we considered the performances of all the approaches in a noisy environment with the signal to noise ratio (SNR) = 60 dB. Figure 1 illustrates the estimation performances with all the estimators initialized at 50.5 Hz. As expected, the 4-sample based approach in (5) alleviated the sensitivity to noise of the 3-sample based one in (6), by considering two samples in the denominator and hence reducing the likelihood of close-to-zero input. However, a direct application of this 4-sample based estimator was still unreliable, giving large oscillations at close-to-zero points, whereas the proposed Wiener filtering and windowed approach obtained frequency estimates with small error power. Note that, due to the recursive nature of the weight update involved in the proposed windowed LMS approaches for both single-phase and three-phase cases, both needed around 0.1 sec to converge. To further illustrate the robustness of the proposed sliding window techniques, the estimated MSEs of all the algorithm against different levels of white Gaussian noise were investigated. As illustrated in Table 1, the 4-sample based estimator maintained around 3 dB improvement as compared with the 3-sample based estimator, over a range of different noise levels, whereas the advantage of the proposed sliding window technique is evidenced by the 20 dB improvement obtained by the Wiener filtering solution as compared with the existing 4 scalar samples based estimator. A further improvement of 18 dB on the average, over different noise levels, was achieved by employing the recursive LMS estimator as compared with the fixed Wiener filtering solution within the proposed sliding window structure. As expected, by considering all the information within the three-phase channels, the 3-phase windowed LMS maintained around 5 dB improvement as compared with its 1-phase counterpart in the high SNR region, however, this advantage reduced when the SNR was below 40 dB. As compared, both the extended Kalman filter [17] and the recursive DFT technique [38], with the same observation length L=6, had better noise immunities than the proposed sliding windowed approaches for the single-phase power system, achieved at a higher cost paid in the computational complexity.Table 1
Steady-state estimation performance (MSE (dB)) of all the considered algorithms under different noise levels, achieved by averaging 500 independent trials.
SNR (dB) 80 70 60 50 40 30 20 3-sample approach [19] -27.47 -17.40 -7.36 2.61 13.73 22.69 30.17 4-sample approach [22] -30.73 -20.70 -10.72 -0.70 9.61 20.82 28.19 1-phase Wiener filter -51.68 -41.64 -31.60 -21.61 -11.65 -1.48 9.68 1-phase LMS -69.80 -59.76 -49.72 -39.63 -28.80 -14.10 4.52 1-phase extended Kalman filter [17] -72.56 -62.52 -52.48 -42.45 -31.38 -18.11 1.31 1-phase recursive DFT [38] -74.84 -64.81 -54.77 -44.74 -33.52 -20.21 -1.43 3-phase LMS -74.77 -64.63 -54.67 -44.42 -32.21 -15.41 4.10Figure 1
Frequency estimation in noisy conditions with SNR=60 dB.In the next simulation, the sensitivities of the considered frequency estimation approaches to higher order harmonics were addressed. When the voltage was contaminated with harmonics, the estimated frequency was subject to unavoidable oscillations due to the breakdown of the relationships between voltage samples, such as those in (4) and (6), caused by the presence of higher order harmonics. To alleviate the deteriorating effect of harmonics, voltage prefiltering is usually necessary. In this experiment, the distorted power system considered was contaminated by a 20% third and fifth harmonic, respectively, and a 6th-order bandpass Butterworth filter with cutoff frequencies of 30 Hz and 90 Hz was used to preprocess the voltages. Table 2 illustrates the steady-state performance of all the algorithms in this scenario. Even when the prefiltering was performed, harmonic distortion significantly deteriorated the performances of the 4-scalar-sample based approach and the proposed 1-phase Wiener filtering approach. On the other hand, both the 1-phase and 3-phase windowed LMS approaches obtained acceptable performance, with the MSEs of -61.58 dB and -79.39 dB, respectively.Table 2
Steady-state estimation performance (MSE (dB)) of all the algorithms for a distorted power system with higher order harmonics.
3-sample approach [19] -15.53 dB 4-sample approach [22] -19.90 dB 1-phase Wiener filter -37.68 dB 1-phase LMS -61.58 dB 3-phase LMS -79.39 dBIn some applications, e.g., in power system protection, it is important for the frequency estimators to remain insensitive to an exponentially decaying DC component. In the simulations, the distorted power system considered was contaminated by a 50% the nominal value of the voltage with the time constant of the exponentially decaying DC offset at 1.5 cycles. The robustness of the proposed sliding window based approaches is illustrated in Figure2. Note that initially around 0.1 sec is needed for the LMS adaptive filtering based approaches to converge; however, after convergence, they can track the correct frequency accurately, while the other approaches conceded.Figure 2
Frequency estimation performances of all the algorithms for a distorted power system with exponentially decaying DC offset.Next, the performances of all the algorithms were investigated for the case of frequency variation. The instantaneous angular frequencyω(k) was made time-variant as(25)ωk=2π50+sin⁡4πkΔT+sin⁡8πkΔTand contained two variation components at 2 Hz and 4 Hz, respectively. The accurate tracking capability of the proposed windowed approaches is evident from Figure 3.Figure 3
Frequency estimation of all the algorithms on the power system with system frequency variation.In the simulations so far, all the parameters in the design of the proposed frequency estimators were fixed. We now investigate the influence of two important parameters involved in the design of adaptive filters, that is, the step-sizeμ and the filter length L. In adaptive filters literature, it is well known that the step-size controls the convergence speed and steady-state error in the way that a smaller step-size leads to a higher steady-state performance and a slower convergence whereas a higher step-size results in a faster convergence but a higher steady-state estimation error [26]. Figure 4 illustrates learning curves of the proposed 1-phase and 3-phase LMS algorithms with L=6, SNR = 50 dB, and different step-sizes. As expected, a smaller step-size enables the proposed algorithms to track the system frequency more accurately but at a cost of slower convergence as compared with a larger step-size. By considering all the information within the three phases, the proposed 3-phase LMS algorithm achieved both faster tracking ability and enhanced steady-state performance at around 5 dB as compared with the 1-phase algorithm, and this advantage was robust over various step-sizes.Figure 4
Learning curves of the proposed 1-phase and 3-phase LMS algorithms against step-sizeμ with L=6 and SNR at 50 dB, achieved by averaging 500 independent trials.Filter length, or the number of the tap coefficients, is another important parameter that significantly influences the frequency estimation performance of an adaptive filter. In principle, the minimum mean squared error (MMSE) is a monotonically nonincreasing function of the filter length, but the decrease of the MMSE due to the filter length increase always becomes trivial when the filter length is long enough. Obviously, it is not suitable to have “too” long a filter, as this not only increases the complexity but also introduces more adaptation noise. Therefore, there exists an optimum filter length which best balances the steady-state performance and computational complexity; however, such an optimum filter length may vary in different environments. When the computational complexity is not an issue, one can design a variable filter length adaptive filter for frequency estimation; for more analysis, we refer to [39]. Figure 5 illustrates the frequency estimation results by the proposed 1-phase and 3-phase LMS algorithms with μ=0.02 and SNR = 50 dB over different filter length in the range between 1 and 100. The optimal filter length for both the 1-phase and 3-phase frequency estimators is around 80, which indicates that, to achieve the best performance, (80∗50)/500=8 cycles voltage samples are needed to feed the adaptive filters and seem to be unrealistic in a real-time measurement, where a timely and efficient frequency estimation is always a priority. To this end, from Figure 5, it is recommended that a small filter length less than 10 should be used. Note that the 5 dB improvement in the power system frequency estimation of the proposed 3-phase algorithm over the single-phase one is always maintained over different filter lengths.Figure 5
Steady-state estimation performance of the proposed 1-phase and 3-phase LMS algorithms as a function of filter lengthL with μ=0.02 and SNR at 50 dB, achieved by averaging 500 independent trials.In [22], it is stated that the scalar frequency estimator is not affected by the signal initial phase; however, the analysis in Section 2 illustrates that indeed the initial phase has a profound effect on its performance, especially in a noisy environment. For the example considered, where the sampling frequency fs was 500 Hz and the power system frequency f at 50 Hz, the condition in (8), leading to a zero-valued denominator of the 4 voltage samples based frequency estimator, becomes(26)ϕ=mπ-k-32ω△T=mπ-k-32∗0.2π,k,m∈Nwhere the specific values of these singularities lying in [0,2π) are ϕ=0.1π, 0.3π, 0.5π, …, 1.9π. Figure 6 illustrates the steady-state estimation performance of all the algorithms as a function of the voltage initial phase under 50 dB noise, which is achieved by averaging 500 independent trails. It conforms with the theoretical analysis in (8) and (26), showing that the accuracy of the scalar frequency estimator depends strongly on the initial phase of the sine wave and the worst performance of the 4-sample approach occurred for the initial phase set to 0.1π,0.3π,0.5π,…,1.9π. It is also interesting that the best choice for ϕ was 0, 0.2π, 0.4π, …, 1.8π, and those values gave sin⁡ωk△T+ϕ-3/2ω△T=1. As expected, the proposed windowed approaches completely solved the problem of sensitivity to the initial phase encountered by the scalar frequency estimator, and their performances were immune to the initial values of ϕ.Figure 6
Steady-state estimation performance of all the algorithms as a function of the initial phase, which was normalized byπ. The filter length of the proposed 1-phase Wiener filter and 1-phase and 3-phase LMS algorithms was L=6, the step-size μ=0.02, and SNR was 50 dB. The results were achieved by averaging 500 independent trials.


## 4.2. Real-World Case Study

In the last set of simulations, a real-world measurement was considered. The three-phase voltages were recorded at a 110/20/10 kV transformer station. The REL 531 numerical line distant protection terminal, produced by ABB Ltd., was installed in the substation and was used to monitor changes in the three-phase-ground voltages. In the three-phase power system at the transformation level, one of the common power-quality disturbances is the voltage sag, despite its relatively short duration. A voltage sag is referred to as a short-term (up to a few seconds) reduction in voltage magnitude, whereby the three-phase angles also deviate from their nominal positions. Voltage sags are mainly triggered by a short-term increase in load current or fast reclosing of circuit breakers [10, 29]. Despite their short duration, such events can cause serious problems for a wide range of equipment and also cause difficulties in frequency estimation. A typical real-world voltage sag was recorded by the REL 531 distant protection terminal with 1000 Hz sampling frequency and is shown in Figure 7(a), where the phase voltage vb of the power system experienced an earth fault, causing the voltage to drop to 48% of its nominal value; meanwhile there were 48% and 23% voltage swells on va and vc, respectively. The voltage was normalized with respect to its normal peak voltage value. The phasor representation of the three-phase voltage was calculated by using the DFT technique as proposed in [38] and is shown in Figure 7(b). Besides the unbalanced voltage magnitudes, the phase differences between va and vb and between va and vc were 115∘ and 80∘, respectively, and both deviated from the nominal 120∘. Although the investigated power system was in the unbalanced condition, Figure 7(a) indicated that the system frequency was still around 50 Hz. All the frequency estimators were applied on this unbalanced power system. A sliding window of 6 samples was used by the proposed windowed approaches and the step-size of the 1-phase and 3-phase LMS algorithms was set to be 0.02. Figure 7(c) illustrates the frequency estimation performance of all the algorithms. A direct application of the 4-sample frequency estimator gave an unsatisfactory result with large estimation oscillations whereas the proposed windowed approaches, especially adaptive windowed LMS ones, alleviated this problem efficiently. As expected, the 3-phase windowed LMS algorithm tracked the system frequency most accurately, with around 0.05 sec needed for convergence.Figure 7
Frequency estimation performances for a real-world unbalanced three-phase power system.
(a)
Time-series of a real-world unbalanced three-phase power system (b)
Phasor representation of the unbalanced three-phase power system (c)
A comparison of estimation performances of all the algorithms


## 5. Conclusion

We have introduced a sliding window technique into the frequency estimation approach based on the relationship among four voltage samples, in order to enhance the accuracy and robustness in real-world operating conditions. Within this windowed structure, two vector based frequency estimation approaches have been developed, that is, an optimal Wiener solution and an adaptive filter trained by the LMS algorithm. The advantages of the proposed vector methods over the original scalar approach have been illuminated over a range of power system conditions, such as in the presence of noise, harmonic distortion, DC offset, and frequency variation and for a real-world unbalanced power system.



---

*Source: 3254258-2019-03-12.xml*