## 3 Modeling the Inverter in the Frequency-Domain
### PR-Based Current Control Method
When \(\rm v_{q}=0\), the output of the regulator \(\rm\omega_{PLL}\) should be the angular velocity of the grid voltage \(\rm\omega_{g}\), and its integral value \(\rm\theta_{PLL}\) should be the phase angle of the grid voltage \(\rm\theta_{g}\). In the steady state case, \(\rm\theta_{PLL}\) is equal to \(\rm\theta_{g}\) and the \(\rm dq\) components of the voltage \(\rm v_{dq}^{PLL}\) calculated by the PLL is equal to the \(\rm dq\) components of the grid voltage \(\rm vdq\). In the case of non-steady state behavior (by small-signal perturbation), due to the influence of the control loop in PLL, the phase angle obtained by the PLL \(\rm\theta_{PLL}\) is no longer equal to the phase angle of the grid voltage \(\rm\theta_{g}\), so the calculated \(\rm dq\) component of the grid voltage \(\rm v_{dq}^{PLL}\) in the controller system does not represent the exact grid situation. We then set the difference between \(\rm\theta_{PLL}\) and \(\rm\theta_{g}\) as \(\rm\delta_{PLL}\). The transfer function from the grid voltage disturbance to the voltage disturbance in the controller is expressed in Equations (9) and (10). \[\rm\widetilde{v}_{dq}^{PLL}=T_{\rm\delta_{PLL}}\rm\widetilde{v}_{dq} \tag{9}\]  
\[\rm T_{\rm\delta_{PLL}}=\left[ \begin{array}{cc}\cos(\rm\delta_{PLL})&\sin( \rm\delta_{PLL})\\ -\sin(\rm\delta_{PLL})&\cos(\rm\delta_{PLL})\end{array} \right] \tag{10}\]  
where the variable with the superscript PLL represents the \(\rm dq\) component in the controller and the variable without the superscript represents the exact \(\rm dq\) component. Adding a small-signal perturbation to Equations (9) and (10) results in Equation (11). \[\left[ \begin{array}{c}\rm v_{d}^{PLL}+\rm\widetilde{v}_{d}^{PLL}\\ \rm v_{q}^{PLL}+\rm\widetilde{v}_{q}^{PLL}\end{array} \right]=\left[ \begin{array}{cc}\cos(\rm\widetilde{\delta}_{PLL})&\sin(\rm\widetilde{ \delta}_{PLL})\\ -\sin(\rm\widetilde{\delta}_{PLL})&\cos(\rm\widetilde{\delta}_{PLL})\end{array}  \right]\cdot\left[ \begin{array}{c}\rm v_{d}+\rm\widetilde{v}_{d}\\ \rm v_{q}+\rm\widetilde{v}_{q}\end{array} \right] \tag{11}\]  
When the phase angle perturbation is negligible, Equation (12) can be derived by Equation (11). \[\left[ \begin{array}{c}\rm v_{d}^{PLL}+\rm\widetilde{v}_{d}^{PLL}\\ \rm\widetilde{v}_{q}^{PLL}+\rm\widetilde{v}_{q}^{PLL}\end{array} \right] \approx\left[ \begin{array}{cc}1&\rm\widetilde{\delta}_{PLL}\\ -\rm\widetilde{\delta}_{PLL}&1\end{array} \right]\cdot\left[ \begin{array}{c} \rm v_{d}+\rm\widetilde{v}_{d}\\ \rm v_{q}+\rm\widetilde{v}_{q}\end{array} \right] \tag{12}\]  
By neglecting the steady state values in Equation (12), Equation (13) is obtained. \[\left[ \begin{array}{c}\rm\widetilde{v}_{d}^{PLL}\\ \rm\widetilde{v}_{q}^{PLL}\end{array} \right]\approx\left[ \begin{array}{c} \rm\widetilde{\delta}_{PLL}v_{q}+\rm\widetilde{v}_{d}\\ -\rm\widetilde{\delta}_{PLL}v_{d}+\rm\widetilde{v}_{q}\end{array} \right] \tag{13}\]  
According to Figure 7b, the output of the PLL can be derived as Equation (14). \[\rm\widetilde{\delta}_{PLL}=\rm\widetilde{v}_{q}^{PLL}H_{PLL}(s)\frac{1}{s} \tag{14}\]  
By merging Equations (13) and (14), the transfer function of the PLL can be written as in Equation (15). \[\rm\frac{\rm\widetilde{\delta}_{PLL}}{\rm\widetilde{v}_{q}}=G_{PLL}(s)=\frac{H_{PLL}(s)}{H_{PLL}(s)v_{d}+s} \tag{15}\]  
According to the block diagram (Figure 6) and considering the orthogonality of \(\rm v\alpha\) and \(\rm v\beta\)[26], the transfer function from the grid side voltage to the current reference can be derived, as expressed in Equation (16). \[\rm\frac{\rm\widetilde{i}^{*}}{\rm\widetilde{v}_{\alpha}}=\frac{\rm\widetilde {i}^{*}}{\rm\widetilde{v}}=i_{m}^{*}T_{PLL}(s)=\frac{i_{m}^{*}}{2}\frac{H_{PLL}(s-j \omega_{0})}{H_{PLL}(s-j\omega_{0})v_{d}+(s-j\omega_{0})} \tag{16}\]  
By applying Equation (16) into Equation (8), the relationship from the grid voltage to the inverter output current by considering the influence of PLL and the inverter output admittance will be obtained as shown in Equations (17) and (18), respectively.