# Adaptive PI + VPI Harmonic Current Compensation Strategy under Weak Grid Conditions
## 3 Adaptive SRF-PLL Based on a Lattice Notch Filter
### SRF-PLL Based on Adaptive Notch Filter  
SRF-PLL based on an adaptive notch filter has been successfully applied in photovoltaic inverters and APFs [27; 28]. The algorithm structure diagram is shown in Figure 10a. Three adaptive notch filters, \(N_{2}(z)\), \(N_{6}(z)\) and \(N_{12}(z)\), are used to suppress the influence of the three-phase grid voltage unbalance and distortion caused by the 5 th, 7 th, 11 th and 13 th harmonics on phase or frequency tracking. According to the previous analysis, the corresponding frequency components of the above disturbance signal in the rotating coordinate system after Park transformation are the 2 nd, 6 th and 12 th harmonic disturbances, so the above three notch filters are set. If the grid frequency deviates, the center frequency of the notch filter will be adjusted adaptively, which can fundamentally ensure that the \begin{table}
\begin{tabular}{c c} \hline \hline
**Variables Known at Time \(n\)** & **Adaptive Calculation Formula** \\ \hline Notch filter frequency parameters \(\theta_{1}(n)\) & \(\begin{bmatrix}\delta_{1}\\ w\end{bmatrix}=\begin{bmatrix}\cos\theta_{2}&-\sin\theta_{2}\\ \sin\theta_{2}&\cos\theta_{2}\end{bmatrix}\begin{bmatrix}u(n)\\ x_{2}(n)\end{bmatrix}\) \\ Filter state parameters \(x_{1}(n)\) and \(x_{2}(n)\) & \(\hat{q}(n)=\frac{1}{2}[u(n)+w]\) \\ \(\theta_{1}(n+1)=\theta_{1}(n)-\mu\hat{q}(n)x_{1}(n)\) \\ Input signal \(u(n)\) & \(\begin{bmatrix}x_{1}(n+1)\\ x_{2}(n+1)\end{bmatrix}=\begin{bmatrix}\cos\theta_{1}(n+1)&-\sin\theta_{1}(n+1 )\\ \sin\theta_{1}(n+1)&\cos\theta_{1}(n+1)\end{bmatrix}\begin{bmatrix}g_{1}\\ x_{1}(n)\end{bmatrix}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Simplified gradient algorithm. Figure 9: Comparison of the gradient algorithm and simplified gradient algorithm driver: (**a**) Wide bandwidth (\(\theta_{2}=0.2\pi\)); (**b**) narrow bandwidth (\(\theta_{2}=0.4\pi\)). phase-locked loop can effectively suppress the above harmonic interference when the grid frequency deviates over a wide range. To further study the stability and interference suppression capability of the phase-locked loop, a linearized small-signal model of the system is given as shown in Figure 10b. On the one hand, \(G_{\rm PI}(z)\) is a digital PI controller; \(Int(z)\) is a digital integrator; and V\({}_{1}\) is the amplitude of the fundamental positive sequence grid voltage. \(N_{2}(z)\), \(N_{6}(z)\) and \(N_{12}(z)\) are lattice adaptive notch filters with center frequencies set at the 2 nd, 6 th and 12 th harmonic frequencies, respectively. The open-loop transfer function of the system can be expressed as Equation (41). The transfer function of the perturbation \(p\) to the estimator \(\hat{\theta}\) can be obtained by Equation (25). \[G(z)=-\sqrt{\frac{3}{2}}V_{1}\cdot G_{\rm PI}(z)\cdot Int(z)\cdot N_{2}(z)N_{6} (z)N_{12}(z) \tag{41}\]  
In the case of grid voltage distortion and unbalance, the corresponding parameters of ANF-PLL shown in Table 2 are selected, where \(f_{s}\) is the sampling frequency. At this time, the system disturbance transmission characteristics are at the rated frequency and \(\pm 4\) Hz frequency deviation, and the Bode diagram of the disturbance \(p\) to the open-loop transfer function of the estimator \(\hat{\theta}\) is shown in Figure 11. In the case of the rated grid frequency and \(\pm 4\) Hz frequency deviation, the open-loop system Bode diagram of the PLL after the adaptive steady-state can stabilize the system. The shear frequency \(f_{c}\) is maintained at approximately 44 Hz, and the phase margin PM is maintained above 70\({}^{\circ}\) so that the system maintains good relative stability. In addition, it can be clearly seen that the adaptive notch filter suppresses the interference of unbalance, distortion and frequency deviation at the same time. The frequency of the grid voltage is offset, and the notch filter is effectively suppressed by adjusting the center frequency. It can provide nearly \(-130\) dB attenuation, and its attenuation degree satisfies (42). \[\left\{