# Adaptive PI + VPI Harmonic Current Compensation Strategy under Weak Grid Conditions
## 5 Simulation Analysis and Experiment
### Verification of APF Compensation Performance under Weak Grid Conditions
(**a**) The waveform of the three-phase power supply voltage; (**b**) the three-phase load current; (**c**) the fixed frequency VPI control plus SRF-PLL (Fixed VPI/SRF-PLL); (**d**) the frequency adaptive VPI control plus NF-PLL (Adaptive VPI/NF-PLL); (**e**) the frequency adaptive VPI control plus ANF-PLL (Adaptive VPI/ANF-PLL). cannot be realized. The Adaptive VPI/NF-PLL compensation strategy can achieve good harmonic compensation performance both under ideal condition and conditions of unbalanced and distorted grid-side voltage; however, when the grid-side voltage further occurs +4 Hz frequency deviation, it can't achieve effective harmonic compensation results. The VPI/ANF-PLL compensation strategy proposed in this paper can achieve relatively stable and high harmonic compensation performance under the above three working conditions and has obvious advantages in the compensation performance under the complex working conditions of the proposed weak grid. The key to ensuring the harmonic compensation performance of APF is to maintain the resonant gain of PI + VPI control through the frequency estimation given by ANF-PLL. The steady-state compensation performance depends on the THD of the grid current after compensation. For this reason, this paper measures the compensated grid-side current THD under three harmonic compensation strategies when the grid-side voltage frequency changes from 46 Hz to 54 Hz with 1 Hz as the step size. The full-load current THD is basically maintained at approximately 23.8%, and the experimental results are shown in Figure 18.  
Experiments indicate that the proposed adaptive VPI/ANF-PLL can maintain a harmonic distortion rate of less than 3.68% within the frequency deviation range considered, which meets the requirements of THD less than 5% in IEEE STD 519-1992. The adaptive VPI/NF-PLL strategy can achieve a better compensation effect at the rated frequency of 50 Hz, and the harmonic distortion rate after compensation is 3.65%. However, when the frequency deviation is further increased, the THD after compensation continues to increase and finally increases to approximately 8.5%. The THD of the grid-side current after compensation of the Fixed VPI/SRF-PLL strategy at the rated frequency of 50 Hz is  
Figure 18: Comparison of THD of grid side current after compensation by three strategies. \begin{table}
\begin{tabular}{c c c c} \hline \hline \multicolumn{1}{c}{\multirow{2}{*}{**THD after Compensation for 3**}} & \multicolumn{2}{c}{**under Ideal Condition**} & \multicolumn{1}{c}{\multirow{2}{*}{
\begin{tabular}{c} **under the Condition of** \\ **Unbalanced and Distorted** \\ **+ 4 Hz Frequency Deviated** \\ **+ 50 Hz Frequency Deviated** \\ **+ 50 Hz Frequency Deviated** \\ \end{tabular} } \\ \hline Fixed VPI/SRF-PLL & 3.6\% & 7.6\% & 18.8\% \\ Adaptive VPI/NF-PLL & 3.6\% & 3.65\% & 8.5\% \\ Adaptive VPI/ANF-PLL & 3.62\% & 3.65\% & 3.68\% \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Comparison of compensation results under various working conditions. 7.6%, which does not meet the relevant standards. When the frequency is offset, the THD shows an upward trend with the degree of offset, reaching the maximum at 46 Hz and 54 Hz, reaching 28.3% and 18.8%, respectively, which is much higher than the standard of 5%. At this time, the APF system basically cannot achieve harmonic current compensation or even inject harmonic current into the grid side. Based on the compensation strategy proposed in this paper, the dynamic performance of APF system harmonic compensation is verified by a load mutation experiment. The relevant experimental waveforms are shown in Figure 19. When another load with the same parameter is suddenly connected at a certain moment, the power supply voltage is unbalanced and distorted, but the frequency remains unchanged, and the current doubles when the load is connected. Figure 19a shows a three-phase grid voltage waveform, and the green, blue and yellow lines represent the _abc_ three-phase of the three-phase voltage, respectively.