## 1. Introduction

With the widespread application of nonlinear loads such as uninterruptible power supply, electric arc furnaces, and other power-electronic devices in power electronic systems, resulting power quality problems have drawn much attention. Frequency estimation is a very important issue in the power system because of the need for an assessment of the power quality [1, 2]. In addition, the frequency of a distribution network can extremely vary during transient events, and it can be very difficult to track the frequency with enough accuracy [3].

In the past years, various methods have been presented to estimate the power system frequency [4, 5]. The DFT-based methods provide a nonparametric approach and require a low computational effort [6–8]. Unfortunately, they have inherent limitations due to the picket fence and spectral leakage effects caused by the noncoherent sampling. Since the system fundamental frequency may deviate from its nominal value because of the power mismatch between the generation and load demands, it is almost impossible to achieve the strict coherent sampling and thus some degree of spectral leakage cannot be avoided. A commonly used frequency estimation methods to compensate both spectral leakage and picket fence effects are the so-called windowed interpolated FFT (WIFFT) method [9]. However, the WIFFT can only reduce, but not completely remove, the estimation errors at the cost of an increment in the computation burden of the frequency estimation.

Other popular frequency estimation methods include the zero-crossing technique, Kalman filter, least-squares method, and artificial neural networks, which are characterized by high resolution. However, they may either suffer from low accuracy or less computational efficiency [10]. For example, the Prony method can provide high-accuracy frequency estimates when the model order is known; however, the determination of the model order is often a difficult task, which requires intensive computational algorithms [5].

Trigonometric decomposition is a well-known technique for determine different frequency components of periodic signals. According to the Fourier analysis, general functions or signals may be represented or approximated by sums of simpler trigonometric functions. So, it is relatively easy to estimate the frequency of a pure sine-wave by trigonometric decomposition. However, estimating frequency of a real signal distorted by harmonics and noise is much more difficult. This is because the frequency estimation errors due to the interference from the harmonics and noise remain significant in trigonometric decomposition, especially when the number of acquired signal cycles is very small. To reduce the frequency estimation errors, an iteration procedure can be applied in trigonometric decomposition; however, the computation would much more complex than the fast Fourier transform. For real-time processing requirements, most of the aforementioned methods offer a tradeoff between accuracy and speed [3]. Therefore, seeking efficient methods to estimate power system frequency for power-quality assessment and solutions has been a significant challenge.

This chapter proposes a parallel iteration method for frequency estimation based on trigonometric decomposition. According to the theory of trigonometric decomposition, a multifrequency signal can be expressed using matrix algebra, which provides a base for the parallel iteration to solve the nonlinear mapping functions of frequency estimation. By using the gradient-descent method in the iteration procedure, the frequency is estimated with the minimized square errors and thus the interferences from harmonics and noise can effectively be restrained. The organization of this chapter is as follows: in Section 2, the proposed method is presented. Simulation and experiment results are provided in Section 3, and the conclusion is made in Section 4.

## 2. Proposed frequency estimation method

### 2.1. Trigonometric decomposition of periodic signal

Let us consider a multifrequency electrical waveform *x*(*n*) sampled at a known frequency *f*_{s}, i.e.,

where *n* = 0,1,…, *N −* 1; *f* is the fundamental frequency, *H* is the number of frequency components, *U*_{h} and *φ*_{h} are, respectively, the amplitude and phase of the *h*th component, *U*_{0} is the offset, and *N* is the acquisition length. To satisfy the Nyquist criterion, the frequency of the *H*th harmonic is assumed to be smaller than *f*_{s}/2.

By applying trigonometric decomposition, it can be rewritten Eq. (1) as follow:

For the sake of simplicity, the *a*_{h} and *b*_{h} can be used to represent *U*_{h}sin *φ*_{h} and *U*_{h}sin *φ*_{h}, respectively, i.e.,

So, Eq. (1) can be expressed as

By using the matrix operation, Eq. (4) can also be written as

where *X* = [*x*(1), *x*(2),…, *x*(*N*)] denotes the vector of the sampled signal, *Z* = *U*_{0}, *D* = [1_{1},1_{2},…, 1_{N}], *A* = [*a*_{1},*a*_{2},…, *a*_{H}], *B* = [*b*_{1}, *b*_{2}, …, *b*_{H}],

and

with *η* = 2*πf*/*f*_{s}.

### 2.2. Parallel iteration algorithm

From Eq. (5), the frequency estimation for each component can be regarded as a nonlinear mapping problem through *N* samples, which can be defined as

where *F*_{m} is the nonlinear mapping functions for the fundamental frequency. The solution procedure for detecting the fundamental frequency of Eq. (8) is not easy. This is because it is difficult to determine the nonlinear mapping functions *F*_{m}, which should be implicit function. It has been noticed that the iteration is one of the approaches developed to solve the nonlinear mapping problem. In the following, the procedure with parallel iteration for solving the nonlinear mapping functions *F*_{m} of Eq. (8) with a fast convergence is proposed.

Suppose *Y* = [*y*(1), *y*(2),…, *y*(*N*)] denote the vector of the estimated signal. According to the least-squares method, the estimated frequency *f*_{e} should be the one that minimizes the square error, which can be expressed as

where (•)^{T} denotes the transpose operation.

By using the gradient-descent method, a group of equations can be obtained by setting each partial derivative of *E*^{2} equal to zero. Then, the parallel iteration equations can be obtained as following,

(10) |

where * denotes the element-by-element multiplication; *γ* = 2/*U*_{1}^{2} and *λ* are the descent coefficients, *ψ* is a matrix of constants

### 2.3. Convergence of parallel iteration procedure

From Eq. (9), the Lyapunov function can be defined as

and the gradient can be calculated by

where ||•||^{2} denotes the square of the **F**-norm.

By using the Taylor expansion, the *E*^{(k+1)} can be rewritten as

where the partial derivatives can be calculated as

By using Eq. (9), Eq. (14) can be expressed as

where *I* is an identity matrix. By substituting Eq. (16) into Eq. (13), the gradient can be expressed as

According to the triangle inequality of the matrix norm, the following inequality can be obtained

Substitute Eq. (17) into Eq. (18), one can obtain

In Eq. (19), considering the ||*E*^{(k)}||^{2}||*D*^{T}*D* + *C*^{T}*C* + *S*^{T}*S*|| ≥ 0, to guarantee the convergence of the parallel iteration procedure, i.e., *ΔJ*_{k} < 0, it is required to hold the following condition

That is to say the convergence of parallel iteration procedure can be guaranteed if *λ* satisfy the following condition

where ||•||_{F} denotes the **F**-norm.

### 2.4. Workflow of the proposed method

**Figure 1** shows the workflow of the parallel iteration method for frequency estimation using trigonometric decomposition, where *ε* denotes the tolerance. The major steps are as follows:

Initialize the parallel iteration parameters. Set the initial frequency

*f*to be 50 Hz, the initial value of both*A*and*B*to be random values within the range (0–1), the initial value of*Z*to be zero.Calculate the iteration values of

*C, S, Y, E*based on Eqs. (5)–(7).Update iteration values by using Eq. (10).

Check if the early-stopping constraint, i.e.,

*E*^{(k+1)}<*E*^{(k)}, is met. If not, adjust the*λ*and return to step (1).Check if the stopping constraint, i.e.

*E*<*ε*, is met. If not, return to step (3). If yes, keep the value of*f*_{e}and output.

It is worth mentioning that the early stopping constraint is to guarantee that the error differences between two iterations are decreasing.

## 3. Simulation and experimental results

To evaluate the performances of the proposed algorithm, we perform a series of simulations on an electrical power signal with and without white noise in this section. To make comparisons, the WIFFT algorithm and discrete phase difference correction (DPDC) algorithm [7] based on the Hanning window (HNW), 3-term Max decay window (MDW), and the proposed method are adopted. At last, the proposed algorithm is evaluated by practical measurements.

### 3.1. Comparison with other algorithms without noise

An electrical power signal with 11 orders of harmonics, whose amplitudes are actually measured in an electric power network, is analyzed. This signal model is also used in Ref. [11] and can be expressed as

where the fundamental frequency *f* is set as 50.2 Hz, the sampling frequency is 3200 Hz, the amplitude *A*_{h} and the phase *φ*_{h} of each harmonic component are given in **Table 1**.

The WIFFT and DPDC algorithms and the proposed method are adopted to make a comparison. The absolute errors of fundamental and harmonic frequencies by using different algorithms are listed in **Table 2**, where *a*E-*b* represents *a* × 10^{−b}.

**Table 2** shows that the accuracy of frequency estimation obtained by the proposed method is higher than those obtained by the WIFFT and DPDC algorithms.

### 3.2. With white Gaussian noise

To analyze the influence of white noise, the signal is superposed with zero-mean Gaussian noise. For each SNR value 3000 runs are performed by using *N* = 512 samples.

The estimation variances of fundamental frequency by using different algorithms are listed in **Table 3**. From **Table 3**, it can be seen that the proposed method can achieve the lowest variances of frequency estimation among all the four adopted algorithms making it to be a good choice for high accurate frequency estimation.

### 3.3. With frequency varying

In addition, the signal is simulated with SNR = 40 dB and frequency varying from 48.5 and 51.5 Hz to investigate the influences of both the white noise and frequency variations on frequency estimation.

The biases of frequency estimation by using different algorithms with frequency variations and SNR = 40 dB are listed in **Table 4**. As shown in **Table 4**, the biases of the frequency estimation obtained by the proposed method are 1–2 orders of magnitude lower than those obtained by the adopted WIFFT and DPDC algorithm.

### 3.4. Experimental results

The experiments are carried out by using the electrical power standard HBS1030, the data acquisition system ELVIS II of National Instrument. The measurement scheme is depicted in **Figure 2**.

As shown in **Figure 2**, the electrical power standard HBS1030 is used to generate multisine waves with the accuracy 0.05%. The signal is sampled by the data acquisition system ELVIS II with 16-bit analog-to-digital (A/D) converter. The sampling frequency is set as 3.2 kHz. The measurement results of the fundamental frequency are shown in **Table 5**, where the “true” values for calculating the measurement absolute errors are provided by the electrical power standard HBS1030. The experimental results demonstrate that the presented algorithms have high accuracy in practice.

## 4. Conclusion

Since frequency estimation errors caused by harmonic interference and noise remain significant when the number of acquired signal cycles is very small, this chapter presents a parallel iteration method for frequency estimation using trigonometric decomposition. Due to the nature of trigonometric decomposition of periodic signal, the parallel iteration can be effectively executed to solve the nonlinear mapping functions of frequency estimation with a fast convergence. Additionally, the minimized square errors can be achieved by using the gradient-descent method in the iteration procedure. By observing the simulation and experimental results, it is seen that the proposed method is more accurate than the WIFFT and DPDC in comparisons.