# Robust Gradient Estimator for Unknown Frequency Estimation in Noisy Environment: Application to Grid-Synchronization

Hafiz Ahmed, Ivan Salgado, Isaac Chairez, Mohamed Benbouzid

► To cite this version:

Hafiz Ahmed, Ivan Salgado, Isaac Chairez, Mohamed Benbouzid. Robust Gradient Estimator for Unknown Frequency Estimation in Noisy Environment: Application to Grid-Synchronization. IEEE Access, 2020, 8, pp.70693-70702. 10.1109/access.2020.2986409. hal-05317423

HAL Id: hal-05317423

https://hal.univ-brest.fr/hal-05317423v1

Submitted on 16 Oct 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
Received February 28, 2020, accepted March 29, 2020, date of publication April 8, 2020, date of current version April 27, 2020.

Digital Object Identifier 10.1109/ACCESS.2020.2986409

# Robust Gradient Estimator for Unknown Frequency Estimation in Noisy Environment: Application to Grid-Synchronization

HAFIZ AHMED<sup>1,2</sup>, (Member, IEEE), IVÁN SALGADO<sup>1,3</sup>, ISAAC CHAIREZ<sup>1,4,5</sup>, AND MOHAMED BENBOUZID<sup>1,6,7</sup>, (Fellow, IEEE)

Corresponding author: Hafiz Ahmed (hafiz.h.ahmed@ieee.org)

This work was supported by the U.K. Biotechnology and Biological Sciences Research Council through the Magnetic and Wireless Sensor Technology for improving profit, biosecurity and carbon footprint of regional oyster production (NOSy) under Grant BB/S004203/1. Data availability: The datasets and models generated during the current study are available from the corresponding author on reasonable request.

**ABSTRACT** Grid-connected converters are an important class of power electronic systems. Many power and energy applications require grid-connected converters. To control grid-connected converters, precise information of the grid voltage frequency and phase are required. Gradient estimators can be very useful in this regard. They are suitable to estimate the frequency and phase of the grid voltage signal. Various gradient estimators are already available in the literature e.g. regression-based techniques. However, most of them are designed by using the instantaneous estimation error as the cost-function. This amplifies the effect of noise in the estimated parameters. To overcome this issue, an integral cost-function is considered in this paper. The integral cost-function tries to minimize the estimation error over the integration window leading to reduce the effect of noise in the estimated frequency and phase. Moreover, the cost-function uses tunable forgetting factor to give more importance to recent data. The proposed gradient estimator assumes the grid frequency to be constant. However, in practice the frequency is variable with known nominal value. To overcome this problem, a frequency estimation block is coupled with the gradient estimator. The frequency estimation block uses the idea of phase-based frequency estimation. Comparative numerical simulation and experimental studies are performed to demonstrate the suitability of the proposed technique over three other advanced techniques from the literature.

**INDEX TERMS** Gradient estimator, frequency estimation, phase estimation, grid synchronization, noise robust estimation, single-phase system.

## I. INTRODUCTION

Renewable energy sources (RES) are playing a very important role in decarbonization of the existing electric power grid. The penetration of RES in the power grid is increasing at a very encouraging rate. RES are generally connected to the grid through grid-connected power converters [1]–[7]. Grid-connected converters are also used in various other power and energy systems applications, e.g. grid-connected

The associate editor coordinating the review of this manuscript and approving it for publication was Taha Selim Ustun<sup>1,8</sup>.

rectifier [8], electric vehicles (EV) on-board charger [9], islanding detection [10], active power filter [11], [12], dynamic voltage restorer [13], [14], etc. All these applications highlight the importance of designing efficient controllers of grid-connected converters.

Control of grid-connected converter is a well-studied technical problem and many results have been presented so far. Many of these results require the precise information of the grid voltage frequency and instantaneous phase. However, frequency and instantaneous phase can not be directly measured rather to be estimated from the grid voltage signal.

<footnote n="1">¹School of Mechanical, Aerospace and Automotive Engineering, Coventry University, Coventry CV1 5FB, U.K.</footnote>

<footnote n="2">²Institute for Future Transport and Cities, Coventry University, Coventry CV1 5FB, U.K.</footnote>

<footnote n="3">³Centro de Innovación y Desarrollo Tecnológico en Computo, Instituto Politécnico Nacional, Gustavo A. Madero 07340, Mexico</footnote>

<footnote n="4">⁴Departamento de Bioprocesos, Unidad Profesional Interdisciplinaria de Biotecnología, Instituto Politécnico Nacional, Gustavo A. Madero 07340, Mexico</footnote>

<footnote n="5">⁵Escuela de Ingeniería, Instituto Tecnológico de Estudios Superiores de Monterrey, Campus Guadalajara, Zapopan 64849, Mexico</footnote>

<footnote n="6">⁶UMR CNRS 6027 IRDL, University of Brest, 29238 Brest, France</footnote>

<footnote n="7">⁷Logistics Engineering College, Shanghai Maritime University, Shanghai 201306, China</footnote>
<figure><img src="image_2.png" /><figcaption>FIGURE 1. An overview of the control scheme used in grid-connected solar PV system.</figcaption></figure>

Frequency and instantaneous phase are then used to syn-
chronize the output voltage of the power converter to that
of the grid voltage. This process is generally known as grid
synchronization. An overview of the control scheme used in
a single-stage grid-connected solar photovoltaic (PV) system
is given in Fig. 1. Figure 1 shows that grid synchroniza-
tion is an important part of the current control scheme of
grid-connected converters typically used in solar PV system.

Owing to the huge importance of grid synchronization
technique, many results are available on this topic. Some pop-
ular grid synchronization techniques are: regression-based
techniques [15]–[17], demodulation techniques [18]–[20],
statistical methods [21], discrete Fourier transformation
(DFT) [22], [23], adaptive observers [24]–[27], Phase-
locked loop (PLL) [28]–[34], frequency-locked loop (FLL)
[35]–[38], Kalman filtering [39], [40], self-tuning filter [41],
[42], linear and nonlinear harmonic oscillator [43]–[45],
open-loop technique [46], [47].

Since grid voltage signal is periodic in nature, frequency
domain techniques such as DFT [22], [23] are very suit-
able for grid voltage parameter estimation. However, DFT
implementation can be computationally expensive due to
large memory requirement. Recursive implementation over-
comes this issue. Controllers for power converters are often
implemented in digital micro-processor or micro-controller.
This may lead to accumulation error. This issue has been
solved in [23], however, through additional computational
cost. Although the nominal frequency of power grid is fixed
at either 50Hz or 60Hz, in practice it moves around the
nominal value. Moreover, sometime the frequency can drop
or increase. Spectral leakage in DFT can occur in these
types of off-nominal conditions. Moreover, in the presence
of harmonics, large window size is required which can limit
the application of DFT-based control technique in low-cost
micro-controllers.

Demodulation [18]–[20] is another well known technique
to estimate the parameters of a grid voltage signal. Its imple-
mentation is very simple and based on the idea of demod-
ulation originally used in telecommunication to extract the
message from the carrier signal. In this type of approach, the
grid voltage signal is multiplied independently with sine and
cosine signal of fixed frequency to obtain the demodulated
signals. Then by using low-pass filters (LPF) with high

cut-off frequency on the demodulated signals, the parameters
can be estimated easily. Due to the non-ideal behavior of
practical LPF, demodulation-based techniques are sensitive
to off-nominal operating conditions as large attenuation of the
signals amplitude can be caused by the LPFs.

Adaptive observer [24]–[27] is another technique that got
some attention in recent time. Using the theory of Luenberger
type linear observers, this type of technique can provide
globally asymptotically convergent estimation of the grid
voltage parameters. One big limitation of this technique is
that it does not use gain normalization in the frequency
update law. This can be limiting in the case of providing
low-voltage ride through capability to grid-connected con-
verter. Moreover, the performance deteriorates significantly
in off-nominal conditions.

Phase locked-loop (PLL) [28]–[34] is undoubtedly the
most popular technique available in the literature. Moreover,
it has wider acceptability in the industrial applications as well.
A big number of PLL techniques available in the literature
rely on the synchronous reference frame PLL (SRF-PLL)
concept. In this approach, using the Park transformation [36],
two DC (constant) signals (direct and quadrature axes)
are generated. Then, by passing the quadrature axis signal
through a low-pass filter (typically of proportional-integral
type), the unknown frequency can be easily estimated.
To implement Park transformation, orthogonal signals are
required. Single-phase system has only one measured signal.
As such a quadrature signal generator (QSG) is required.
Most of the variations of PLL proposed in the literature
are based on different techniques of generating the quadra-
ture signal from the measured signal. The traditional PLL
structure is simple, easy-to-implement, and has excellent per-
formance in nominal conditions. However, the performance
suffers in presence of harmonics and/or DC offset. More-
over, there is a trade-off between fast dynamic response and
accuracy.

Frequency locked-loop (FLL) [35]–[38] is another
approach to estimate the unknown frequency of the grid volt-
age signal. Unlike PLL-type techniques, FLLs can directly
estimate the frequency by exploiting the relationship between
the direct axis signal estimation error and the quadrature axis
signal. FLLs require QSG similar to various variants of PLL.
The quadrature signals can be generated by using various
techniques e.g. linear harmonic oscillator [43], nonlinear
harmonic oscillator [48].

Regression-based technique [15]–[17] generally use a
parameterized linear model of the grid voltage signal. Using
this model, least-squares type algorithms are used for param-
eter estimation purpose. This type of techniques generally can
not estimate the frequency directly. They are often equipped
with PLL. The performance of regression-based techniques
are often dependent on the performance of the PLL.

Kalman filter [39], [40] is another technique that has a
long history in the literature. Kalman filter is very suitable
in noisy environment. It is well known from the literature
that Kalman filter is the optimal linear estimator in the case
of Gaussian noise. Most of the existing Kalman filters used in grid-connected converter applications assume the noise covariance to be constant. As the Hall effect sensor or the analog-to-digital converter (ADC) ages with time, the noise property of the sensor and ADC also change. This may degrade the performance of the Kalman filter in the long run. One solution is to use adaptive Kalman filter that estimate the noise online. However, this adds additional computational complexity to already computation heavy Kalman filter.

Noise is inevitable in designing the control system for grid-connected converters. The control systems are often implemented in discrete-time in micro-controller. Many low-cost micro-controllers use cheap ADC. ADC introduces noise in the measured voltage signal. Moreover, Hall effect sensors are often used to measure the grid voltage signal. Sensors also introduce noise in the measurement. As such, if proper cares are not taken, then the grid voltage signal feedback to the controller can be very noisy. This is most often the case in low-cost implementation.

To overcome the effect of noise, Kalman filter can be a suitable solution. However, as previously mentioned, adaptive Kalman filters need to be used as opposed to traditional non-adaptive Kalman filter. However, this increases the computational cost. One potential solution is to use gradient estimators that use integral cost-functions. Gradient estimators are not new in in grid-synchronization application. Regression-based techniques e.g. various variants of least-squares are actually gradient estimators. These estimators are designed by considering the instantaneous estimator error as the cost-function. Then the closed-form solution of the estimator can be obtained by calculating the gradient of the instantaneous cost-function. However, in noisy environment, minimizing the instantaneous error can be problematic as this will amplify the effect of noise. To overcome this issue, integral of the estimation error cost-function is more suitable. This cost-function tries to minimize the error over the integration window leading to reduce the effect of the noise. Moreover, if a tunable forgetting factor can be included in the cost-function, this will give the designer the choice to give importance to recent data. One such cost-function has already been considered in the adaptive estimation literature [49], [50]. In this paper, a frequency adaptive gradient estimator will be developed by considering the integral of the estimation error as the cost-function to minimize the effect of the noise. The proposed gradient estimator-based synchronization technique will be very suitable for grid-synchronization application in noisy environment. Moreover, the technique presented in this paper is very general and can be applied to unknown frequency estimation of any sinusoidal signal as well.

The rest of the article is organized as follows: details of the proposed approach is given in Sec. II while the comparative experimental results and discussions are given in Sec. III. Finally, Sec. IV concludes this paper.

## II. PROPOSED APPROACH

A single-phase grid voltage signal can be written as:

$$y = A \sin(\omega t + \varphi) \underbrace{\Phi}_{\varphi} \qquad (1)$$

where A is the amplitude, $\omega = 2\pi f$ is the angular frequency (with nominal value being $\omega_n = 100\pi$), $\varphi$ is the phase angle, and $\Phi \in [0, 2\pi)$ is the instantaneous phase of the grid voltage signal. Considering the phase angles as state variables [39], model (1) can be written as:

$$y = \underbrace{[A \sin(\varphi) \ A \cos(\varphi)]}_{\theta^T} \underbrace{\begin{bmatrix} \cos(\omega t) \\ \sin(\omega t) \end{bmatrix}}_{\Phi} \qquad (2)$$

If we assume that the grid voltage is constant, then eq. (2) is a linear parametric model of the grid voltage (1), where the unknown amplitude and phase angle i.e. unknown parameter vector $\theta$ is linearly parameterized w.r.t. the known vector $\Phi$. In practice, the frequency $\omega$ is also unknown with known nominal value. However, this issue will be dealt later on in this Section. Gradient estimators are generally designed by considering the estimation error as the cost-function and try to minimize the estimation error. To demonstrate this fact, let us consider the following cost-function for model (2) [49]:

$$J(\theta) = \frac{(y - \hat{y})^2}{2} = \frac{(y - \hat{\theta}^T \Phi)^2}{2} \qquad (3)$$

where $\hat{\theta}$ indicates estimated value. Gradient estimators generally involve the gradient of the cost-function (3) and has the following form:

$$\hat{\theta} = -\Gamma \Delta J \qquad (4)$$

where $\Gamma = \Gamma^T > 0$ is the tuning parameter and the gradient $\Delta J$ is given by:

$$\Delta J = -\phi \underbrace{(y - \hat{\theta}^T \Phi)}_{\epsilon} \qquad (5)$$

Cost-function (3) considers the instantaneous error. This may be problematic in a noisy environment. To overcome this problem, considering an integral cost-function could be interesting from practical point of view. In this context, the following cost-function has been proposed in the literature [50]:

$$J(\theta) = \frac{1}{2} \int_{0}^{t} \{\phi^{T}(\tau)\hat{\theta}(\tau) - y(\tau)\}^{2} e^{-q(t-\tau)} d\tau, \quad \tau \le t \qquad (6)$$

where $q > 0$ is a positive design constant that works as a forgetting factor. Cost-function (6) is also known as discount integral cost-function in the literature. An advantage of cost-function (6) is that it penalizes all past estimation error i.e. integral of the estimation error within the integration window. Moreover, the decaying exponential term in (6) gives more importance to recent data by giving less weight to earlier data. Similar to the instantaneous cost-based gradient estimator,
integral cost-based gradient estimator also takes the same form and given below:

$$ \dot{\hat{\theta}} = -\Gamma \Delta J, \quad \Gamma = \Gamma^T > 0 \qquad (7) $$

where the gradient of the cost-function is given below [49]:

$$ \Delta J = R\hat{\theta} + Q \qquad (8) $$

where R and Q are defined as:

$$ R := \int_{0}^{t} \phi(\tau)\phi(\tau)^{T} e^{-q(t-\tau)} d\tau, $$

$$ Q := -\int_{0}^{t} \phi(\tau)y(\tau)e^{-q(t-\tau)} d\tau. $$

where $R \in \mathbb{R}^{2 \times 2}$ and $Q \in \mathbb{R}^{2 \times 1}$. By plugging in the gradient (8) in eq. (7), the integral cost-based gradient estimator can be obtained as:

$$ \dot{\hat{\theta}} = -\Gamma (R\hat{\theta} + Q) \qquad (9a) $$

As presented in [50], the integrals involved in the definition of R and Q can be considered as convolution integral. As such, R and Q can be generated by the following differential equations:

$$ \dot{R} = -qR + \phi\phi^T \qquad (9b) $$

$$ \dot{Q} = -qQ - y\phi \qquad (9c) $$

From the estimated parameters $\hat{\theta} = [\hat{\theta}_1; \hat{\theta}_2]$, the phase angle can be estimated as:

$$ \hat{\phi} = \arctan \left( \frac{\hat{\theta}_1}{\hat{\theta}_2} \right) \qquad (10) $$

From the estimated phase angle $\hat{\phi}$, using phase angle based frequency estimation technique e.g. [18], the unknown frequency can easily be estimated. To implement the proposed integral cost-based gradient estimator (GE), eq. (9) and (10) are required. The block diagram of the proposed estimator is given in Fig. 2. Details are given in Fig. 3.

The proposed frequency adaptive gradient estimator has three parameters to tune. They are $\Gamma$ and $q$ in the gradient estimator block and $\kappa$ in the frequency estimation block. The parameter $\Gamma$ is a diagonal matrix and can be written as $\Gamma = \gamma I_2, \gamma > 0$, where $I_2$ is the identity matrix of dimension $2 \times 2$. The convergence speed of the proposed estimator depends on $\gamma$ while $q$ is the forgetting factor. The parameter $q$ should be always selected much smaller than $\gamma$. Through extensive numerical simulation we found $\gamma = 10000$ and $q = 100$ to be good values. The parameter $\kappa$ determines the convergence speed of the frequency estimation. This parameter has to be selected as a trade-off between fast convergence speed and acceptable transient performance. In this regard, $\kappa = 150$ was found to be a good value.

<figure><img src="image_3.png" /><figcaption>FIGURE 2. Block diagram of the proposed estimator. This estimator requires the value of the estimated frequency, which is obtained from Fig. 3.</figcaption></figure>

<figure><img src="image_4.png" /><figcaption>FIGURE 3. Phase angle-based frequency estimation technique using the proposed gradient estimator. Input of the frequency estimation block are obtained from Fig. 2.</figcaption></figure>

<figure><img src="image_5.png" /></figure>

<figure><img src="image_6.png" /><figcaption>FIGURE 4. Experimental setup, (a): overview, (b): actual setup.</figcaption></figure>

### III. RESULTS AND DISCUSSIONS

In this section, comparative simulation and experimental studies are considered. Numerical simulation studies are performed in Matlab/Simulink. As experimental platform, the dSPACE 1104 board has been considered. The experimental setup considered in this work is similar to [46, Fig. 12]. Overview of the experimental setup is given in Fig. 4. As mentioned in the Introduction Section, Kalman filter is well known technique in grid synchronization literature. Kalman filter performs well in noisy environment. As such we have selected the linear Kalman filter frequency-locked loop (LKF-FLL) [51] as one of the comparison technique.
<figure><img src="image_7.png" /><figcaption>FIGURE 5. Simulation test results for −0.5p.u. amplitude step change.</figcaption></figure>

In addition, instantaneous cost-function-based gradient estimator (IGE) [18] and second-order generalized integrator FLL (SOGI-FLL) [36] are also considered as the comparative techniques. The parameters of the proposed technique have been selected as: $γ = 10^6$, $q = 100$, and $κ = 150$. The parameters of LKF-FLL are selected as: $P_0 = 1000I_2$, $Q = 0.02I_2$, $R = 1$, $x_0 = [0.01; 0.01]$, and $γ = 40ω_n$. Parameters of IGE have been selected as: $α = 400$ and $k = 50$. Parameters of SOGI-FLL are selected as: $k = \sqrt{2}$ and $γ = 50$. All the continuous integrator are discretized using trapezoidal method with a sampling period $T_s = 10^{-4}$ sec. To emulate noisy environment, Gaussian noise has been added to the voltage signal. The considered noisy signal has signal-to-noise ratio (SNR) of 27dB.

### 1) TEST-I: −0.5P.U. AMPLITUDE STEP CHANGE

In this test, the grid voltage was initially set as 1p.u. Suddenly the voltage dropped to 0.5p.u. Many grid codes require the grid-connected converters to be connected to the grid despite this kind of low-voltage condition. The numerical simulation and experimental results for Test-I are given in Figs. 5 and 6. Results show that all techniques are very quick to respond to large change in the amplitude. SOGI-FLL and LKF-FLL have very high peak overshoot of ≈ 2Hz. Gradient estimators have significantly smaller overshoot w.r.t. FLL techniques. FLL techniques demonstrated high peak overshoot for phase

<figure><img src="image_8.png" /><figcaption>FIGURE 6. Experimental test results for −0.5p.u. amplitude step change.</figcaption></figure>

estimation error also. The proposed technique has a peak overshoot of only ≈ 4° while it is 5 times more for SOGI-FLL at ≈ 20°. These results demonstrate the suitability of the proposed technique when large voltage sag occurs in the grid voltage signal.

### 2) TEST-II: −45° PHASE STEP CHANGE

In this test, the phase angle suddenly changed from 0° to −45°. This type of test condition is very challenging for any grid-synchronization algorithm. The numerical simulation and experimental results for Test-II are given in Figs. 7 and 8. Experimental results show that all techniques have similar convergence speed. However, the proposed technique has significantly smaller peak overshoot w.r.t. FLL-based techniques. The peak frequency overshoot of the gradient estimators are similar. However, zoomed figure shows that the proposed technique is less sensitive to noise than IGE. Similar performance can be observed for the phase estimation error as well. These demonstrate the suitability of the proposed technique when sudden large jump in phase angle occurs in the grid voltage signal.

### 3) TEST-III: +2HZ FREQUENCY STEP CHANGE

In this test, the frequency suddenly changed from 50Hz to 52Hz. The numerical simulation and experimental results for Test-III are given in Figs. 9 and 10. Experimental results
<figure><img src="image_9.png" /><figcaption>FIGURE 7. Simulation test results for –45° phase step change.</figcaption></figure>

<figure><img src="image_10.png" /><figcaption>FIGURE 8. Experimental test results for –45° phase step change.</figcaption></figure>

<figure><img src="image_11.png" /><figcaption>FIGURE 9. Simulation test results for +2Hz frequency step change.</figcaption></figure>

<figure><img src="image_12.png" /><figcaption>FIGURE 10. Experimental test results for +2Hz frequency step change.</figcaption></figure>

demonstrate that the convergence times all techniques are similar. Except LKF-FLL, the estimated frequency by the

other techniques did not show any peak overshoot. Zoomed figure shows that the proposed technique is less sensitive to
<figure><img src="image_13.png" /><figcaption>FIGURE 11. Simulation test results for +0.1p.u. DC step change.</figcaption></figure>

noise than the other techniques. In term of phase estimation, the proposed technique has the slowest convergence time. However, the proposed technique showed least sensitivity to noise.

### 4) TEST-IV: +0.1P.U. DC STEP CHANGE

In this paper, we did not consider the effect of DC offset in model development. However, due to signal conversion or transformer saturation issue, sometimes DC offset is unavoidable. This test consider the effect of DC offset in the estimated parameters. In this test, a DC offset +0.1p.u. is suddenly added to the grid voltage signal. In the presence of DC offset, estimation ripples are present in the estimated frequency and phase by all techniques. However, the proposed technique has the lowest ripple magnitude. The ripple magnitudes are ≈ 2 times smaller than SOGI-FLL. These results demonstrate the suitability of the proposed technique in the presence of DC offset.

### 5) TEST-V: DISTORTED GRID VOLTAGE

In today's power system, the effect of harmonics cannot be longer neglected. The rise of nonlinear loads and switch mode power supplies are making the grid more and more distorted. To test the effectiveness of the proposed technique, a distorted grid voltage is considered. In this test, the grid voltage is suddenly corrupted with 6.75% total harmonic distortions (THD). The considered harmonics are: 20Hz

<figure><img src="image_14.png" /><figcaption>FIGURE 12. Experimental test results for +0.1p.u. DC step change.</figcaption></figure>

<figure><img src="image_15.png" /><figcaption>FIGURE 13. Summary of the harmonics robustness test.</figcaption></figure>

sub-harmonics - 2.7%, 3rd - 2.2%, 160Hz inter-harmonics - 2.5%, 5th - 2.7%, 7th - 1.5%, 9th - 2.5%, and 11th - 2.3%. A summary of the harmonics generated by the comparative techniques are given in Fig. 13. Figure 13 shows that the proposed technique has the lowest total harmonic distortion (THD). The numerical simulation results for Test-V are given in Fig. 14. Despite the grid voltage being highly distorted, the proposed technique's frequency estimation ripple is bounded by mere ±0.1Hz while it is at least 4 times higher for LKF-FLL. However, the performance of LKF-FLL improved in phase estimation error case as the peak-to-peak estimation error ripple of LKF-FLL is comparable to the proposed technique. Simulation results demonstrated the suitability of the proposed technique in heavily distorted grid.
<figure><img src="image_16.png" /><figcaption>FIGURE 14. Simulation test results for the harmonics test case.</figcaption></figure>

## IV. CONCLUSION AND FUTURE WORKS

This paper developed an integral cost-function-based gradient estimator for frequency and phase estimation of single-phase grid voltage signal. First, a linear parametric model of the grid voltage is considered. The model assumed the grid frequency to be known while amplitude and phase angle to be unknown. Then using existing results from the adaptive estimation literature, an integral of the estimation error cost-function is considered. Unlike instantaneous error cost-function, this cost-function penalizes the estimation error over the integration window. This helps to reduce the effect of noise. Based on the integral cost-function, a gradient estimator is designed to estimate the unknown frequency and phase of the grid voltage signal. To make the gradient estimator frequency-adaptive, a frequency estimation law is proposed. Extensive comparative numerical simulation and experimental studies are considered using various challenging test scenarios. Comparative results with linear Kalman filter frequency-locked loop (LKF-FLL) demonstrated the suitability of the proposed technique. Control parameters of the proposed integral of estimation error cost-function-based gradient estimator are chosen using trial and error method. However, this is not systematic. Small-signal modeling-based parameter tuning will be considered in a future work. The proposed technique requires the calculation of integrals. This comparatively slows down the dynamic response with respect to some other techniques available in the literature. As such

the application of this technique can be limiting where very fast dynamic response is required. Dynamic performance improvement will also be considered as a future work.

## REFERENCES

[1] A. Safa, E. L. M. Berkouk, Y. Messlem, and A. Gouichiche, "A robust control algorithm for a multifunctional grid tied inverter to enhance the power quality of a microgrid under unbalanced conditions," *Int. J. Elect. Power Energy Syst.*, vol. 100, pp. 253-264, Sep. 2018.

[2] M. A. Hannan, Z. A. Ghani, M. M. Hoque, P. J. Ker, A. Hussain, and A. Mohamed, "Fuzzy logic inverter controller in photovoltaic applications: Issues and recommendations," *IEEE Access*, vol. 7, pp. 24934-24955, 2019.

[3] K. Elyaalaoui, M. Ouassaid, and M. Cherkaoui, "Primary frequency control using hierarchical fuzzy logic for a wind farm based on SCIG connected to electrical network," *Sustain. Energy, Grids Netw.*, vol. 16, pp. 188-195, Dec. 2018.

[4] M. Merai, M. W. Naouar, I. Slama-Belkhodja, and E. Monmasson, "An adaptive PI controller design for DC-link voltage control of single-phase grid-connected converters," *IEEE Trans. Ind. Electron.*, vol. 66, no. 8, pp. 6241-6249, Aug. 2019.

[5] H. M. Boulouihia, M. Khodja, D. Rahiel, A. Allali, F. Kaddour, and M. Denai, "Power quality enhancement in electricity grids with wind energy using multicell converters and energy storage," *J. Renew. Sustain. Energy*, vol. 11, no. 1, Jan. 2019, Art. no. 013302.

[6] A. Benali, M. Khiat, T. Allaoui, and M. Denai, "Power quality improvement and low voltage ride through capability in hybrid wind-PV farms grid-connected using dynamic voltage restorer," *IEEE Access*, vol. 6, pp. 68634-68648, 2018.

[7] A. Ahmad, N. Ullah, N. Ahmed, A. Ibeas, G. Mehdi, J. Herrera, and A. Ali, "Robust control of grid-tied parallel inverters using nonlinear backstepping approach," *IEEE Access*, vol. 7, pp. 111982-111992, 2019.

[8] A. Rahoui, A. Bechouche, H. Seddiki, and D. O. Abdeslam, "Grid voltages estimation for three-phase PWM rectifiers control without AC voltage sensors," *IEEE Trans. Power Electron.*, vol. 33, no. 1, pp. 859-875, Jan. 2018.

[9] S. Lacroix, E. Laboure, and M. Hilairet, "An integrated fast battery charger for electric vehicle," in *Proc. IEEE Vehicle Power Propuls. Conf.*, Lille, France, Sep. 2010, pp. 1-6.

[10] M. Mishra, M. Sahani, and P. K. Rout, "An islanding detection algorithm for distributed generation based on Hilbert-Huang transform and extreme learning machine," *Sustain. Energy, Grids Netw.*, vol. 9, pp. 13-26, Mar. 2017.

[11] S. Ouchen, H. Steinhart, M. Benbouzid, and F. Blaabjerg, "Robust DPC-SVM control strategy for shunt active power filter based on $H_\infty$ regulators," *Int. J. Elect. Power Energy Syst.*, vol. 117, May 2020, Art. no. 105699.

[12] S. Ouchen, A. Betka, S. Abdeddaim, and A. Menadi, "Fuzzy-predictive direct power control implementation of a grid connected photovoltaic system, associated with an active power filter," *Energy Convers. Manage.*, vol. 122, pp. 515-525, Aug. 2016.

[13] S. Biricik, H. Komurcugil, N. D. Tuyen, and M. Basu, "Protection of sensitive loads using sliding mode controlled three-phase DVR with adaptive notch filter," *IEEE Trans. Ind. Electron.*, vol. 66, no. 7, pp. 5465-5475, Jul. 2019.

[14] S. Biricik and H. Komurcugil, "Optimized sliding mode control to maximize existence region for single-phase dynamic voltage restorers," *IEEE Trans. Ind. Informat.*, vol. 12, no. 4, pp. 1486-1497, Aug. 2016.

[15] Y. Amirat, Z. Oubrahim, G. Feld, and M. Benbouzid, "Phasor estimation for power quality monitoring: Least square versus Kalman filter," in *Proc. 43rd Annu. Conf. IEEE Ind. Electron. Soc. (IECON)*, Beijing, China, Oct. 2017, pp. 4339-4343.

[16] M. Bettayeb and U. Qidwai, "Recursive estimation of power system harmonics," *Electr. Power Syst. Res.*, vol. 47, no. 2, pp. 143-152, Oct. 1998.

[17] Y. Terriche, J. M. Guerrero, and J. C. Vasquez, "Performance improvement of shunt active power filter based on non-linear least-square approach," *Electr. Power Syst. Res.*, vol. 160, pp. 44-55, Jul. 2018.
[18] H. Ahmed and M. Benbouzid, "Demodulation type single-phase PLL with DC offset rejection," *Electron. Lett.*, vol. 56, no. 7, pp. 344–347, Mar. 2020.

[19] C. A. G. Marques, M. V. Ribeiro, and E. A. B. da Silva, "Enhanced demodulation-based technique for estimating the parameters of fundamental component in power systems," *IET Gener., Transmiss. Distrib.*, vol. 5, no. 9, pp. 979–988, 2011.

[20] I. Kamwa, M. Leclerc, and D. McNabb, "Performance of demodulation-based frequency measurement algorithms used in typical PMUs," *IEEE Trans. Power Del.*, vol. 19, no. 2, pp. 505–514, Apr. 2004.

[21] V. Choqueuse, A. Belouchrani, F. Auger, and M. Benbouzid, "Frequency and phasor estimations in three-phase systems: Maximum likelihood algorithms and theoretical performance," *IEEE Trans. Smart Grid*, vol. 10, no. 3, pp. 3248–3258, May 2019.

[22] B. P. McGrath, D. G. Holmes, and J. J. H. G. Galloway, "Power converter line synchronization using a discrete Fourier transform (DFT) based on a variable sample rate," *IEEE Trans. Power Electron.*, vol. 20, no. 4, pp. 877–884, Jul. 2005.

[23] H. A. Darwish and M. Fikri, "Practical considerations for recursive DFT implementation in numerical relays," *IEEE Trans. Power Del.*, vol. 22, no. 1, pp. 42–49, Jan. 2007.

[24] H. Ahmed, M. Benbouzid, M. Ahsan, A. Albarbar, and M. Shahjalal, "Frequency adaptive parameter estimation of unbalanced and distorted power grid," *IEEE Access*, vol. 8, pp. 8512–8519, 2020.

[25] C. M. Hackl and M. Landerer, "A unified method for online detection of phase variables and symmetrical components of unbalanced three-phase systems with harmonic distortion," *Energies*, vol. 12, no. 17, p. 3243, 2019.

[26] H. Ahmed, S.-A. Amamra, and I. Salgado, "Fast estimation of phase and frequency for single-phase grid signal," *IEEE Trans. Ind. Electron.*, vol. 66, no. 8, pp. 6408–6411, Aug. 2019.

[27] C. M. Hackl and M. Landerer, "Modified second-order generalized integrators with modified frequency locked loop for fast harmonics estimation of distorted single-phase signals," *IEEE Trans. Power Electron.*, vol. 35, no. 3, pp. 3298–3309, Mar. 2020.

[28] Z. Chedjara, A. Massoum, S. Massoum, P. Wira, A. Safa, and A. Gouichiche, "A novel robust PLL algorithm applied to the control of a shunt active power filter using a self tuning filter concept," in *Proc. IEEE Int. Conf. Ind. Technol. (ICIT)*, Lyon, France, Feb. 2018, pp. 1124–1131.

[29] A. A. Ahmad, M. Pichan, and A. Abrishamifar, "A new simple structure PLL for both single and three phase applications," *Int. J. Elect. Power Energy Syst.*, vol. 74, pp. 118–125, Jan. 2016.

[30] M. Karimi-Ghartemani, *Enhanced Phase-Locked Loop Structures for Power and Energy Applications*. Hoboken, NJ, USA: Wiley, 2014.

[31] A. Bechouche, D. O. Abdeslam, T. Otmane-Cherif, and H. Seddiki, "Adaptive neural PLL for grid-connected DFIG synchronization," *J. Power Electron.*, vol. 14, no. 3, pp. 608–620, May 2014.

[32] M. E. Meral and D. Çelik, "Benchmarking simulation and theory of various PLLs produce orthogonal signals under abnormal electric grid conditions," *Electr. Eng.*, vol. 100, no. 3, pp. 1805–1817, Sep. 2018.

[33] M. Ciobotaru, R. Teodorescu, and F. Blaabjerg, "A new single-phase PLL structure based on second order generalized integrator," in *Proc. 37th IEEE Power Electron. Specialists Conf.*, Jeju, South Korea, May 2006, pp. 1–6.

[34] I. Ullah and M. Ashraf, "Comparison of synchronization techniques under distorted grid conditions," *IEEE Access*, vol. 7, pp. 101345–101354, 2019.

[35] A. Bendib, A. Chouder, K. Kara, A. Kherbachi, S. Barkat, and W. Issa, "New modeling approach of secondary control layer for autonomous single-phase microgrids," *J. Franklin Inst.*, vol. 356, no. 13, pp. 6842–6874, Sep. 2019.

[36] R. Teodorescu, M. Liserre, and P. Rodriguez, *Grid Converters for Photovoltaic and Wind Power Systems*, vol. 29. Hoboken, NJ, USA: Wiley, 2011.

[37] A. Bendib, A. Chouder, K. Kara, A. Kherbachi, and S. Barkat, "SOGI-FLL based optimal current control scheme for single-phase grid-connected photovoltaic VSIs with LCL filter," in *Proc. Int. Conf. Electr. Sci. Technol. Maghreb (CISTEM)*, Alger, Algeria, Oct. 2018, pp. 1–6.

[38] H. Ahmed and M. Benbouzid, "Simplified second-order generalized integrator-frequency-locked loop," *Adv. Electr. Electron. Eng.*, vol. 17, no. 4, pp. 405–412, 2019.

[39] A. A. Girgis and T. L. D. Hwang, "Optimal estimation of voltage phasors and frequency deviation using linear and nonlinear Kalman filtering: Theory and limitations," *IEEE Power Eng. Rev.*, vol. PER-4, no. 10, pp. 46–47, Oct. 1984.

[40] R. Cardoso, R. F. de Camargo, H. Pinheiro, and H. A. Gründling, "Kalman filter based synchronisation methods," *IET Gener., Transmiss. Distrib.*, vol. 2, no. 4, pp. 542–555, 2008.

[41] S. Biricik, Ö. C. Özerdem, S. K. Khadem, M. Basu, and S. Redif, "Real-time control of shunt active power filter under distorted grid voltage and unbalanced load condition using self-tuning filter," *IET Power Electron.*, vol. 7, no. 7, pp. 1895–1905, Jul. 2014.

[42] T. Ngo, S. Biricik, and M. Basu, "A self-tuning grid synchronization method for active power filters," *Electr. Power Compon. Syst.*, vol. 44, no. 17, pp. 1947–1957, Oct. 2016.

[43] A. Kherbachi, A. Chouder, A. Bendib, K. Kara, and S. Barkat, "Enhanced structure of second-order generalized integrator frequency-locked loop suitable for DC-offset rejection in single-phase systems," *Electr. Power Syst. Res.*, vol. 170, pp. 348–357, May 2019.

[44] H. Ahmed, S.-A. Amamra, and M. Bierhoff, "Frequency-locked loop-based estimation of single-phase grid voltage parameters," *IEEE Trans. Ind. Electron.*, vol. 66, no. 11, pp. 8856–8859, Nov. 2019.

[45] H. Ahmed, M. Bierhoff, and M. Benbouzid, "Multiple nonlinear harmonic oscillator-based frequency estimation for distorted grid voltage," *IEEE Trans. Instrum. Meas.*, early access, Jul. 25, 2019, doi: 10.1109/TIM.2019.2931065.

[46] A. Safa, E. M. Berkouk, Y. Messlem, Z. Chedjara, and A. Gouichiche, "A pseudo open loop synchronization technique for heavily distorted grid voltage," *Electr. Power Syst. Res.*, vol. 158, pp. 136–146, May 2018.

[47] Y. Terriche, M. U. Mutarraf, M. Mehrzadi, A. Lashab, J. M. Guerrero, J. C. Vasquez, and D. Kerdoun, "Adaptive CDSC-based open-loop synchronization technique for dynamic response enhancement of active power filters," *IEEE Access*, vol. 7, pp. 96743–96752, 2019.

[48] M. L. Pay and H. Ahmed, "Modeling and tuning of circular limit cycle oscillator FLL with preloop filter," *IEEE Trans. Ind. Electron.*, vol. 66, no. 12, pp. 9632–9635, Dec. 2019.

[49] P. Ioannou and B. Fidan, *Adaptive Control Tutorial*. Philadelphia, PA, USA: SIAM, 2006.

[50] G. Kreisselmeier, "Adaptive observers with exponential rate of convergence," *IEEE Trans. Autom. Control*, vol. AC-22, no. 1, pp. 2–8, Feb. 1977.

[51] M. S. Reza, M. Ciobotaru, and V. G. Agelidis, "Frequency adaptive linear Kalman filter for fast and accurate estimation of grid voltage parameters," in *Proc. IEEE Int. Conf. Power Syst. Technol. (POWERCON)*, Auckland, New Zealand, Oct. 2012, pp. 1–6.

<figure><img src="image_17.png" /></figure>

**HAFIZ AHMED** (Member, IEEE) received the B.Sc. degree in electrical and electronic engineering from the Ahsanullah University of Science and Technology, Dhaka, Bangladesh, in 2011, the M.Sc. degree in systems, control and information technology from Joseph Fourier University, Grenoble, France, in 2013, and the Ph.D. degree in automatic control from the University of Lille 1, France, in 2016.

He was a Postdoctoral Fellow with Clemson University, Clemson, SC, USA, followed by academic appointments in Bangladesh with the University of Asia Pacific and North South University. Since September 2017, he has been with the School of Mechanical, Aerospace and Automotive Engineering, Coventry University, U.K. He is interested in applied control engineering with special focus in energy and environment. For the Ph.D. thesis, he received the European Embedded Control Institute (EECI) Ph.D. Award, in 2017. He has also received the Best Ph.D. Theses Award from the Research Cluster on Modeling, Analysis and Management of Dynamic Systems (GDR-MACS) of the National Council of Scientific Research (CNRS) in France, in 2017. He is an Associate Editor of the *International Journal of Electrical Engineering & Education*.
<figure><img src="image_18.png" /></figure>

**IVÁN SALGADO** received the degree in biomedical engineering from the National Polytechnic Institute (IPN), Mexico City, Mexico, in 2009, the master's degree in automatic control from the Universidad Nacional Autónoma de México, Mexico City, in 2011, and the Ph.D. degree in computer sciences from CIC-IPN. His current research interests include the design, control, and optimization of robotic systems and adaptive control.

<figure><img src="image_19.png" /></figure>

**ISAAC CHAIREZ** received the B.S. degree in biomedical engineering from the National Polytechnic Institute (IPN), Mexico City, Mexico, in 2002, and the master's and Ph.D. degrees from the Center of Investigation and Advanced Research, Department of Automatic Control, IPN, in 2004 and 2007, respectively. He is currently with the Professional Interdisciplinary Unit of Biotechnology, IPN. His current research interests include neural networks, fuzzy control theory, nonlinear control, adaptive control, and game theory.

<figure><img src="image_20.png" /></figure>

**MOHAMED BENBOUZID** (Fellow, IEEE) received the B.Sc. degree in electrical engineering from the University of Batna, Batna, Algeria, in 1990, the M.Sc. and Ph.D. degrees in electrical and computer engineering from the National Polytechnic Institute of Grenoble, Grenoble, France, in 1991 and 1994, respectively, and the Habilitation à Diriger des Recherches degree from the University of Picardie "Jules Verne," Amiens, France, in 2000.

After receiving the Ph.D. degree, he joined the Professional Institute of Amiens, University of Picardie "Jules Verne," where he was an Associate Professor of electrical and computer engineering. Since September 2004, he has been with the University of Brest, Brest, France, where he is currently a Full Professor of electrical engineering. He is also a Distinguished Professor and a 1000 Talent Expert with Shanghai Maritime University, Shanghai, China. His main research interests and experience include analysis, design, and control of electric machines, variable-speed drives for traction, propulsion, and renewable energy applications, and fault diagnosis of electric machines.

Prof. Benbouzid has been elevated as a Fellow of the IEEE for his contributions to diagnosis and fault-tolerant control of electric machines and drives. He is also a Fellow of IET. He is the Editor-in-Chief of the *International Journal on Energy Conversion* and *Applied Sciences* (MDPI) Section on Electrical, Electronics and Communications Engineering. He is a Subject Editor of *IET Renewable Power Generation*. He is also an Associate Editor of the IEEE *TRANSACTIONS ON ENERGY CONVERSION*.

...