## 3 Parameter Optimization of the Current Controller and PLL  
### Parameter Optimization of the Current Controller  
Since the impedance characteristics of VSC will affect the interaction between VSC and power grid, it is important to optimize parameters of current control to ensure that the  
Figure 8: Relationship between current loop parameters and \(\phi\) diagram. (**a**) \(\phi\) for different parameters; (**b**) Partial enlargement of (**a**); (**c**) Contour map of \(\phi\). Figure 7: Bode diagrams of VSC output impedance and grid impedance. impedance of VSC can be matched with the grid impedance. A classical VSC impedance reshaping method based on active damping is given here [31] to illustrate the control parameter optimization effect brought by the proposed method. The implementation of active damping and the corresponding control block diagram of VSC are shown in Figure 9, in which \(m\) is the coefficient of damping. With the active damping control, the mathematical model of the VSC can be updated as shown in Figure 10. The impedance of the VSC can be updated as Equation (16). \[\mathbf{Z}_{VSC}=[\mathbf{Y}_{Lm}(s)(\mathbf{E}-K_{PWM}\mathbf{G}_{dem}(s)(\mathbf{G}_{y2m}(s)+\mathbf{G}_{im}(s) \mathbf{G}_{y1m}(s)))]^{-1}[\mathbf{E}+\mathbf{Y}_{Lm}(s)K_{PWM}\mathbf{G}_{dem}(s)( \mathbf{G}_{im}(s)+m)] \tag{16}\]  
After introducing active damping, the relationship between the current control parameters and \(\phi\) is shown in Figure 11. Compared to Figure 8, \(\phi\) in Figure 11 is larger than the value of \(\phi\) in Figure 8 for the same control parameters, and the stability margin of the system is significantly improved. The difference between Figures 8c and 11c indicates that the proposed active damping control extends the regulation range of the current loop parameters, widens the \(\phi=0^{\circ}\) boundary, and narrows the region of unstable parameters, allowing more parameter selection. Figure 11: Relationship between current loop parameters and \(\phi\) after active damping. (**a**) \(\phi\) for different parameters; (**b**) Partial enlargement of (**a**); (**c**) Contour map of \(\phi\). Figure 9: Implementation method of active damping. It should be noted that the improvement of the system stability margin brought by the active damping can be influenced by the value of \(m\). Selecting an appropriate value for \(m\) is extremely important for stabilizing the grid-connected VSC. Figure 12 shows the variation of \(\phi\) when the system parameters are set to \(k_{\text{p-c}}=4.66\), \(k_{\text{l-c}}=3700\), \(k_{\text{p-PLL}}=3\), \(k_{\text{l-PLL}}=100\), and the value of \(m\) is changed. As shown in Figure 12, if \(m\) is too small, \(\phi\) is less than \(0^{\circ}\) which means the system is unstable. With the increases of m, \(\phi\) increases as well. However, with the increase of \(m\), the increase rate of \(\phi\) becomes very slow. While improving the system stability, the introduction of active damping can affect the dynamic response of VSC. Therefore, to further determine the feasible value range of \(m\), it is necessary to analyze the dynamic response of VSC when the value of \(m\) varies. From Figure 3, the expression for the VSC output current can be written as the excitation response under grid voltage and current commands:  
\[\mathbf{i}_{\text{{}}odd}=Y_{g}\mathbf{u}_{\text{{}}prec}+H_{g}\mathbf{i}_{\text{{}}dapref}, \tag{17}\]  
where \(Y_{g}\) is the excitation response of the output current to the grid voltage disturbance. \(H_{g}\) represents the ability of the output current to track the current reference. The expression \(H_{g}\) is given as follows, which can be deduced by Figure 3.  
\[H_{g}=\frac{G_{i}(s)G_{de}(s)K_{PWM}Y_{L}}{1+G_{de}(s)K_{PWM}Y_{L}(G_{i}(s)+m )}, \tag{18}\]  
where \(Y_{L}\) is the conductance of the filter inductor \(L_{f}\).