## 3 Parameter Optimization of the Current Controller and PLL
### Optimized Design of PLL Parameters  
PLL is responsible for the synchronization between VSC and the power grid, it is responsible for ensuring that PLL can strictly synchronize the grid and VSC to avoid oscillation. Therefore, inappropriate parameters of PLL can cause oscillation problems. The existing research has indicated that parameter optimization can improve the anti-interference ability of PLL so that the influence on the interaction between VSC and grid caused by the PLL can be weakened, and the instability risk caused by PLL can be decreased. With this thought, this section further optimizes the parameters of PLL based on the quantitative stability analysis. According to Equation (7), the PLL perturbation transfer function can be equivalently transformed as,  
\[T_{\text{PLL}}(s)=\frac{\Delta\theta}{\Delta u_{pcq}^{s}}=\frac{2\xi\omega_{n }s+\omega_{n}^{2}}{s^{2}+2\xi\omega_{n}s+\omega_{n}^{2}}, \tag{19}\]  
where \(\omega_{n}{}^{2}=v_{m}k_{\text{i-PLL}}\), \(2\xi\omega_{n}=v_{m}k_{\text{p-PLL}}\). \(\xi\) is the damping ratio, \(\omega_{n}\) is the natural angular frequency, and \(v_{m}\) is the voltage amplitude at the PCC. From Figure 1 and Equation (7), an equivalent block diagram of PLL can be obtained as shown in Figure 15 in which \(K_{P}=2\xi\omega_{n}=v_{m}k_{\text{p-PLL}}\) and \(K_{I}=\omega_{n}{}^{2}=v_{m}k_{\text{i-PLL}}\). Figure 14: Range of values for the coefficient \(m\). Figure 13: Evaluation of system control performance after introduction of active damping. Combining the expressions of \(K_{P}\) and \(K_{I}\), may as well suppose that,  
\[K_{I}=\mathrm{g}K_{P}^{2} \tag{20}\]  
where g is a coefficient. From Figure 15, the open-loop transfer function of PLL is,  
\[G_{o}(s)=\frac{K_{P}s+K_{I}}{s^{2}} \tag{21}\]  
Since the output of VSC contains 5 th, 7 th, 11 th, and 13 th harmonics, i.e., the voltage at PCC contains 5 th, 7 th, 11 th, and 13 th high harmonics. After Park transformation, the input voltage of the PLL contains mainly 6\(k\) (\(k\) = 1,2...) harmonic disturbances. Therefore, the main consideration is the anti-interference ability of the 6 th harmonics, the open-loop transfer function of PLL should satisfy Equation (22), where \(\omega_{d}\) = 600 \(\pi\) rad/s. \[R=20\mathrm{lg}|G_{\mathrm{O}}(j\omega_{d})|=20\mathrm{lg}\left|\frac{K_{P} \sqrt{\omega_{d}{}^{2}+\mathrm{g}^{2}K_{P}^{2}}}{\omega_{d}{}^{2}}\right| \tag{22}\]  
Based on Equations (19)-(21), the stability margin of the open-loop transfer function in the PLL system \(\beta_{pm\text{-PLL}}\) can be written as Equation (23),  
\[\beta_{pm-PLL}=\arctan(\frac{\omega_{c}}{\mathrm{g}K_{P}})=\arctan\sqrt{\frac {1+\sqrt{1+4g^{2}}}{2g^{2}}} \tag{23}\]  
where \(\omega_{c}\) is the cut-off frequency of PLL system. According to Equation (23), the relationship between\(\beta_{pm\text{-PLL}}\) and \(g\) is shown in Figure 16, the curve shows that \(\beta_{pm\text{-PLL}}\) decreases with the increase of \(g\). Once the range of \(\beta_{pm\text{-PLL}}\) is determined, the corresponding range of g can be found through the curve in Figure 16. Considering the stability of PLL phase tracking and the dynamic response of phase tracking [33], \(\beta_{pm\text{-PLL}}\) is selected as 35\({}^{\circ}\)-60\({}^{\circ}\). The range of g can be obtained from Equation (23) and Figure 16 as [0.668, 2.489]. When the value of \(R\) is [\(-40\) dB, \(-20\) dB], PLL has a better ability of anti-disturbance. The selection range of \(K_{P}\) and g can be obtained by combining Equation (22) and Figure 16 as shown in Figure 17. In combination with the stability evaluation method proposed in this article, contours of \(\phi\) are added to Figure 17 as shown in Figure 18. The system has better stability performance by selecting parameters with large \(\phi\) in the dashed range of Figure 14:0  
Figure 19 shows \(\phi\) of the VSC with different PLL parameters.