# 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
Due to the unbalance and distortion of the voltage, the phase angle detection accuracy of the SRF-PLL is affected, which further affects the performance of the harmonic current reference link and the VPI controller link so that the THD after compensation at the rated frequency is higher than 5%. After the frequency mutation, the compensation performance is further reduced to 18.8% because the VPI current control link does not have frequency adaptability. At this time, the APF harmonic compensation system basically cannot play a compensation role. Figure 17d presents the a-phase current compensated by the adaptive VPI/NF-PLL compensation strategy. It can be seen from the figure that, at the rated frequency, the notch link in the NF-PLL suppresses the disturbance caused by voltage unbalance and distortion and improves the accuracy of phase angle prediction. Therefore, the steady-state compensation performance is better, and the THD after compensation reaches 3.65%. However, when the frequency changes abruptly, the frequency non-adaptive phase angle prediction accuracy of the NF-PLL is greatly reduced, which affects the harmonic current setting and VPI tracking control link so that the THD of the compensated grid-side current reaches 8.5%. The compensation effect is poor. Figure 17e presents the a-phase grid-side current waveform when the adaptive VPI/ANF-PLL compensation strategy is adopted. After the rated frequency and frequency deviation occur, the system can better achieve harmonic current compensation, and the compensated grid-side current THD can be maintained at approximately 3.65%. It is proven that the proposed phase-locked loop can accurately estimate the phase angle and grid frequency under unbalanced, distorted and frequency deviation conditions. The adaptive VPI link adaptively adjusts the control law parameters according to the above \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Parameters** & **Values** & **Parameters** & **Values** \\ \hline \multirow{2}{*}{Rated voltage/frequency} & Three-phase & Sampling frequency (equal to & 12.8 kHz \\  & 380 V/50 Hz & switching frequency) & \\ \multirow{2}{*}{Dc-link capacitor} & \multirow{2}{*}{\(C_{dc}\) = 2000 \(\mu\)F} & DC side voltage PI & \multirow{2}{*}{\(k_{\text{pdc}}\) = 1.1, \(k_{\text{idc}}\) = 105} \\  & & regulator parameters & \\ DC side voltage setting value & \(V^{*}\)\({}_{dc}\) = 850 V & Current PI controller parameters & \multirow{2}{*}{\(k_{\text{pi}}\) = 0.75, \(k_{\text{hi}}\) = 123.8} \\ APF output filter inductance & \(L_{F}\) = 1 mH & Current VPI controller parameters & \\ \multirow{2}{*}{APF output equivalent resistance} & \multirow{2}{*}{\(R\) = 0.5 \(\Omega\)} & PLL algorithm parameters & \multirow{2}{*}{Table 2} \\  & & 2.5 \(\mu\)s & Grid-side voltage parameters & \\ \multirow{2}{*}{Resistive-inductive nonlinear load} & \multirow{2}{*}{\(L\) = 5 mH} & \multirow{2}{*}{} & \\  & & & \\ \multirow{2}{*}{parameters} & \multirow{2}{*}{\(R\) = 10 \(\Omega\)} & \multirow{2}{*}{} & \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Parameters of the experimental systems. information and finally achieves high steady-state compensation performance before and after the frequency deviation occurs. The steady-state harmonic compensation results of the above various non-ideal and ideal conditions are given in Table 5. By comparing the THD of the grid-side current after steady-state compensation, it can be concluded as follows. The Fixed VPI/SRF-PLL compensation strategy can effectively compensate the harmonic current under ideal conditions; however, when the grid-side voltage is unbalanced and distorted, the compensation performance decreases, and the compensation result does not reach the standard in IEEE STD 519-1992. When the grid-side voltage further occurs +4 Hz frequency deviation, the compensation result decreases significantly, and the effective compensation of harmonics  
Figure 17: Comparative experiment of the harmonic compensation performance under frequency deviation.