## 2 Research the Basic Characteristics and Compensation Strategy of SVG  
SVG uses fully-controlled switching devices to form a self-commutation inverter, and then uses a small-capacity energy storage element as an auxiliary to perform the corresponding reactive power compensation work, so it can realize the function of instantaneous reactive power compensation [25; 26; 27]. The control method of SVG is mainly composed of two layers: outer loop control and inner loop control. The outer loop control mainly includes the following parts: the reactive power control part, the DC voltage control part, and the grid connection point voltage control part; its main function is to generate \(d\), \(q\) axis current reference values \(i_{\text{dref}}\), \(i_{\text{qref}}\). The DC voltage control part is used to further compare the DC side voltage \(U_{\text{dc}}\) and its reference value voltage \(U_{\text{dref}}\). The voltage value is also used to generate the d-axis current reference value \(i_{\text{dref}}\), which is used to further stabilize the DC side voltage \(U_{\text{dc}}\), and \(i_{\text{dref}}\) satisfies the following equation. \[i_{\text{dref}}=(K_{\text{dp}}+\frac{K_{\text{di}}}{s})(U_{\text{dref}}-U_{ \text{dc}}) \tag{1}\]  
In Formula (1), \(K_{\text{di}}\) and \(K_{\text{dp}}\) represent the integral coefficient and proportional coefficient of the d-axis PI controller, respectively. The control method of the reactive power and grid connection point voltage is to compare the reactive power output in the grid connection point voltage \(U_{\text{pcc}}\) or SVG with the reactive power reference, and to obtain the \(q\)-axis current reference value \(i_{\text{qref}}\). The voltage of the stable grid-connected point is determined through the reference value, or the reactive power required for the output with the reference value is directly adjusted [28; 29]. The current reference value satisfies the following equation:  
\[i_{\text{qref}}=(K_{\text{qp}}+\frac{K_{\text{qi}}}{s})(U_{\text{PCCref}}-U_{ \text{PCC}}) \tag{2}\]  
In terms of reactive power, it needs to meet:  
\[i_{\text{qref}}=(K_{\text{qp}}+\frac{K_{\text{qi}}}{s})(Q_{\text{ref}}-Q) \tag{3}\]  
In the above formula, \(K_{\text{qi}}\) and \(K_{\text{qp}}\) represent the integral coefficient and proportional coefficient in the PI controller corresponding to the \(q\)-axis, respectively. The main purpose of the current inner loop control is to enable the output current \(i_{\text{d}}\), and for the \(i_{\text{q}}\) of the SVG to be further controlled and regulated by \(U_{\text{Ad}}\) and \(U_{\text{Aq}}\). However, for the dynamic reactive power compensation device SVG, there is a certain coupling relationship between the \(d\)-axis and the \(q\)-axis of each voltage and current amount. With the further change in the current amount \(i_{\text{d}}\), it will directly cause the \(U_{\text{Aq}}\) and \(i_{\text{q}}\) values to change accordingly. For coupled loops, with the general treatment, it is difficult to separate them for separate numerical analysis, and decoupling is necessary when encounteringthis situation. To the PI output value of the inner loop circuit control, two feedforward compensations are added, namely \(\omega Li_{\text{d}}\) and \(\omega Li_{\text{q}}\). The control situation is shown in Figure 1 below. In the above figure, the voltage transfer function output by SVG is given as follows. \[\left\{ \begin{array}{l}U_{\text{Ad}}=(K_{\text{p}}+\frac{K_{1}}{\dot{s}})(i_ {\text{dref}}-i_{\text{d}})-\omega Li_{\text{q}}+U_{\text{s}}\\ U_{\text{Aq}}=(K_{\text{p}}+\frac{K_{1}}{\dot{s}})(i_{\text{qref}}-i_{\text{q}}) +\omega Li_{\text{d}}\end{array} \right. \tag{4}\]  
In Formula (4), \(K_{1}\) and \(K_{\text{p}}\) represent the integral coefficient and proportional coefficient of the PI controller, respectively. Formula (1) is substituted into Formula (4), and the following equation is obtained after simplification:  
\[L\frac{d}{dt}\left[ \begin{array}{c}i_{\text{d}}\\ i_{\text{q}}\end{array} \right]=-