# Adaptive PI + VPI Harmonic Current Compensation Strategy under Weak Grid Conditions
## 1 Introduction
In the above paper, the frequency deviation is basically limited to a small range, and there is little discussion on the case of reaching \(\pm 4\) Hz. With the development of weak grid systems, large frequency deviations may become a real problem. Therefore, it is of great practical significance to discuss how to effectively estimate the grid frequency and phase under the condition of grid frequency deviation from the perspective of the working mechanism. One of the key factors in determining the performance of harmonic compensation is the tracking control of the harmonic reference current [16; 17], which has always been a hot topic for scholars. Repetitive control, proportional resonance (PR) control and vector proportional integral (VPI) control are all based on the internal model principle and have good steady-state tracking performance. APF system with a traditional repetitive controller has drawbacks in terms of poor dynamic performance. The disturbance begins to work after a fundamental period, and the system takes a long time to reach a new steady state [18; 19]. Proportional resonant (PR) control has a poor effect on high-frequency harmonic compensation [20], and the compensation performance will decrease significantly when the grid frequency fluctuates [21; 22]. To pursue better compensation performance, scholars at home and abroad have introduced vector proportional integral (VPI) current tracking control. VPI control can eliminate the peak delay of the PR controller in the closed-loop response [23; 24]. However, VPI control is also very sensitive changes in grid-side frequency. When the frequency deviation occurs, the amplitude gain will decrease sharply, which will reduce the accuracy of harmonic compensation. To enhance the frequency adaptation performance of the VPI controller, the effective bandwidth of the control frequency can be appropriately increased, and good robustness can be achieved for a small range of frequency deviations [25; 26]. Using the real-time grid frequency provided by the adaptive PLL to dynamically update the fundamental frequency parameters in the VPI controller is a potentially effective method [27; 28]. [PERSON] proposed a proportional + lattice controller (PL controller) for grid-connected control of voltage source photovoltaic inverters. The controller is an adaptive resonant controller. Based on the analysis of its stability, it is proven by experiments that the controller keeps the grid-connected current \(\mathrm{THD_{i}}\) below 4% when the grid voltage is unbalanced, distorted and +5 Hz frequency deviation occurs, showing good frequency adaptability. The key link of the proposed algorithm is that an enhanced adaptive lattice filter three-phase synchronous PLL (ALSRF-PLL) can provide accurate phase and frequency estimation [27]. The research results have good enlightenment for the adaptive control of APF harmonic compensation systems under complex conditions of weak grid. [PERSON] proposed an adaptive digital control strategy for APF with grid voltage distortion and frequency deviation. The strategy consists of a frequency adaptive resonant current controller and an enhanced three-phase synchronous PLL. The control strategy shows good harmonic current compensation performance under the conditions of a grid-side voltage \(\mathrm{THD_{v}}\) of 5.4% and a frequency deviation range of 50 \(\pm\) 2 Hz. However, the convergence performance of the adaptive lattice filter is not analyzed [28]. This paper proposes a frequency adaptive PI + VPI resonant current tracking control strategy. The core of the control strategy is to introduce a high-performance adaptive SRF-PLL considering the \(\pm\)4 Hz frequency deviation range to form a PI + VPI resonant current controller with adjustable resonant frequency parameters.