## 2 Modified PLL  
The proposed PLL functions based on a moving average filter (MAF) and enhancement of performance (EP) block. In this way, the problems of offset fault, difficult tuning, sluggish dynamic response of the conventional PLLs, and even the harmonics compensation are overcome. In EP-MAF-PLLs, a pre-filtering block is hired to shift the MAF phase angle to a certain value, and then, there is a phase shift from the phase detector section, resulting in eliminating the system errors and enhancing the transient system response. Furthermore, an improvement is applied to the rotating speed of synchronous reference frame (SRF or \(dq\) frame) to retrieve an appropriate tuning calculation and remove the harmful effects of offset errors. The EP-MAF-PLL exhibits the \(dq\)-PLL phase angle extraction algorithm as well as other approaches. The only malfunction of EP-MAF-PLL is that it needs high frequency performance and phase angle overshoot at the time of fault, because of the defective algorithm used in phase extraction process.  
These above-mentioned difficulties have motivated the authors to develop a novel PLL named stationary frame EP-MAF-PLL (SF-EP-MAF-PLL), which is the mixture of EP-MAF-PLL and the classic \(\alpha\beta\)-PLL. The projected SF-EP-MAF-PLL is able to diminish the frequency overshoots by receiving the subordinate frequency overshoot property of the classic \(\alpha\beta\)-PLL. Moreover, the proposed PLL leads to precise phase angle extraction because of the improvement assimilated for phase offset errors, similar to conventional EP-MAF-PLL. Therefore, SF-EP-MAF-PLL empowers the speedy operation of grid side converter under grid faults by keeping the frequency in permissible range.  
The block diagram of MAF-PLL is represented in Figure 2, which shows a slow dynamic response due to the attendance of MAF in the control loop. The closed loop transfer function consequences in 4 th order system, for which the tuning procedure is complex and relies on a symmetrical technique. This slow dynamic response of MAF-PLL is mostly because of the settling time (ST) that has been chosen on the lower band limit. In [33], an approach is proposed that proves the ST should not be less than 25 ms, results in decreasing phase margin (PM) and exceeding the system instability. In addition, a large offset error is observed for operation in all frequency spectrums, but the fundamental. These drawbacks could not be ignored in sensitive applications.  
In EP-MAF-PLL, a new algorithm is recommended to solve the problems of slow dynamic response, using a pre-filtering stage as shown in Figure 3. The error appeared under off-nominal operation frequency is moderated in this structure. However, in unbalanced conditions, this PLL is not able to mitigate the frequency overshoots caused at the fault happening moments [34; 35].  
In order to compensate the frequency overshoots, the authors added a new phase detector section to the EP-MAF-PLL structures, which is the proposed strategy of this paper. In classic \(\alpha\beta\)-PLL structure, lower frequency overshoot could be decreased while the phase angle overshoot is varied around the set point. An estimation used to obtain the phase angle in low values, could be mathematically represented:  
\[\Delta\theta=\theta_{AC}-\theta_{PLL} \tag{1}\] \[if:(\Delta\theta\to 0)\Rightarrow\left\{\begin{array}{l} \sin(\Delta\theta)\ \sim\Delta\theta\\ \cos(\Delta\theta)\ \sim 1.0\end{array}\right.\]  
Figure 3: The enhancement of performance (EP)-MAF-PLL structure.  
Figure 2: The moving average filter-phase locked loop (MAF-PLL) structure.  
Using trigonometric ratios result in:  
\[\Delta\theta\sim\sin(\Delta\theta)=\sin(\theta_{AC}-\theta_{PLL})=\sin(\theta_{AC}) \cos(\theta_{PLL})-\sin(\theta_{PLL})\cos(\theta_{AC}) \tag{2}\]  
This improvement to classic \(\alpha\)P-PLL leads to compensate the phase angle error observed due to off nominal frequencies, before. The proposed PLL named SF-EP-MAF-PLL is represented in Figure 4, considering \(\Delta\theta\) estimation.