# Adaptive PI + VPI Harmonic Current Compensation Strategy under Weak Grid Conditions
## Influence of Weak Grid Conditions on the APF System
### SRF-PLL Based on the Notch Filter  
Through the above analysis and derivation, it can be concluded that under the condition of unbalanced and distorted grid voltage, the conventional SRF-PLL cannot suppress each \(v_{q}\) harmonic pollution item well. Although the bandwidth of the system can be reduced by increasing the low-pass filter to obtain better harmonic suppression, the dynamic response characteristics of the SRF-PLL will deteriorate.  
For a specific number of harmonic pollution items, the interference items can be selectively removed, that is, the notch filter is used to form a notch filter-based SRF-PLL (NF-PLL), as shown in Figure 4. Each notch filter removes an unwanted harmonic disturbance item. The second-order notch filter structure is commonly expressed in two forms: (21) and (22), which are the direct form and lattice form, respectively.  
\[N_{k}(z)=\frac{1+a_{k}z^{-1}+z^{-2}}{1+r_{k}a_{k}z^{-1}+r_{k}^{2}z^{-2}}\quad- 1<a_{k}<1 \tag{21}\]  
where the notch frequency is \(\omega_{0k}=\arccos(-a_{k}/2)\) and \(r_{k}\) determines the notch bandwidth. The relationship between \(r_{k}\) and bandwidth satisfies \(B_{k}=\pi(1-r_{k})\).  
\[N_{k}(z)=\frac{1+\sin\theta_{2k}}{2}\frac{1+2\sin\theta_{1k}z^{-1}+z^{-2}}{1+ \sin\theta_{1k}(1+\sin\theta_{2k})z^{-1}+\sin\theta_{2k}z^{-2}} \tag{22}\]  
where \(|\theta_{1k}|<\pi/2\), \(\omega_{0k}=\theta_{1k}+\pi/2\). If taken \(-3\) dB bandwidth is \(B\), then \(B\) is only related to satisfy  
\[\sin\theta_{2k}=\frac{1-\tan(B_{k}/2)}{1+\tan(B_{k}/2)} \tag{23}\]  
Figure 3: Influence of the frequency and phase angle estimation error on the APF system.  
Taking the second-order notch filter with lattice structure as an example, when the notch frequency parameters and bandwidth control parameters of the notch filter constructed by (22) are selected differently, the frequency response is shown in Figure 5. Figure 5 presents the frequency characteristics of three notch filters in series with a fixed bandwidth of 20 Hz determined by \(\theta_{2k}\) and notch center frequencies of 100 Hz, 300 Hz and 600 Hz determined by \(\theta_{1k}\). Figure 5 presents the frequency characteristics of four notch filters with different bandwidths of 10 Hz, 20 Hz, 40 Hz and 60 Hz determined by \(\theta_{2k}\) and fixed center frequencies of 100 Hz determined by \(\theta_{1k}\).  
Based on the above transfer function of the notch filters, the open-loop transfer function of the PLL system can be expressed as:  
\[G(z)=-\sqrt{\frac{3}{2}}V_{1}\cdot G_{\text{PI}}(z)\cdot Int(z)\cdot N_{1}(z) \cdot\cdot\cdot\cdot N_{n}(z) \tag{24}\]  
At this time, the equivalent disturbance \(p=p_{qu}+p_{qd}\), caused by Equations (14) and (18) to the estimator \(\hat{\theta}\) transfer function, can be expressed as:  
\[\phi_{\theta p}(z)=\frac{\sqrt{2}}{\sqrt{3}V_{1}}\frac{G(z)}{1+G(z)} \tag{25}\]  
When the notch frequency \(\omega_{0k}\) of \(N_{k}(z)\) in the system shown in (24) is taken as \(2\omega_{0}\), \(6\omega_{0}\) and \(12\omega_{0}\), the Bode diagram of disturbance to output shown in (25) is shown in Figure 6. The notch filter ensures that the NF-PLL can well suppress the 2 nd, 6 th and 12 th harmonic interference signals caused by unbalance and voltage distortion in the control loop and can provide nearly \(-130\) dB attenuation at the notch center frequency.  
Figure 4: The small signal block diagram of NF-PLL.  
Figure 5: Frequency response of lattice notch filters (**a**) under different notch frequency parameters and (**b**) under different bandwidth parameters.