## 2 Introduction of the Proposed Control Technique
### The Dynamic Model Analysis  
To design an appropriate control technique for the control of interfaced converters, the dynamic model of the proposed model is needed. By considering the interfaced converter in Figure 1, the initial mathematical model is obtained as:  
\[ \begin{array}{l}L\frac{d\dot{q}_{d}}{dt}+Ri_{d}-\omega Li_{q}-u_{d}v_{dc}+v_{d}= 0\\ L\frac{d\dot{q}_{d}}{dt}+Ri_{q}+\omega Li_{d}-u_{q}v_{dc}+v_{q}=0\\ C\frac{d\dot{q}_{dc}}{dt}+u_{d}i_{d}+u_{q}i_{q}+i_{dc}=0\end{array}  \tag{1}\]  
As it is known that \(P=i_{d}v_{d}\) and \(Q=-i_{q}v_{d}\). Considering the aforementioned relationships, (1) can be rewritten as:  
\[ \begin{array}{l}\frac{L}{R}\frac{dP}{dt}+P+\frac{\omega L}{R}Q-u_{d}P_{c1}+P_ {d}=0\\ \frac{L}{R}\frac{dQ}{dt}+Q-\frac{\omega L}{R}P+u_{q}P_{c1}-P_{dq}=0\\ \text{RC}\frac{dP_{c1}}{dt}+u_{d}P-u_{q}Q+P_{c2}=0\end{array}  \tag{2}\]  
where, \(P_{c1}=v_{dc}v_{d}/R\), \(P_{c2}=i_{dc}v_{d}\), \(P_{pd}=v_{d}^{2}/R\), and \(P_{pdq}=v_{d}v_{q}/R\). The PMSG swing equation is equal to:  
\[J\frac{d\omega}{dt}=\frac{P_{m}-P}{\omega} \tag{3}\]  
Small signal linearization is applied to (3) which leads to,  
\[Js\Delta\omega=\frac{(\Delta P_{m}-\Delta P)\omega^{*}-(P_{m}^{*}-P^{*})\Delta \omega}{\omega^{*2}} \tag{4}\]  
As a result, by the use of (4), the grid angular frequency variation is achieved as:  
\[\Delta\omega=\frac{1}{\omega^{*}}\cdot\frac{\Delta P_{m}-\Delta P}{s+(P_{m}^{* }-P^{*})/\omega^{*2}\} \tag{5}\]  
Figure 1: General structure of the high penetration renewable energy sources. RERs: Renewable Energy Sources. The relationship (5) can be rewritten as the following,  
\[\Delta P_{m}-\Delta P=\omega^{*}J\Big{(}s+(P_{m}^{*}-P^{*})/\omega^{*2}J\Big{)} \Delta\omega \tag{6}\]  
Based on the active power control, the active power error relationship is driven through dividing the Laplace operator \"\(s\)\" by (6) as:  
\[\frac{\Delta P}{s}=\frac{\Delta P_{m}}{s}-\bigg{(}\omega^{*}J+\frac{(P_{m}^{* }-P^{*})}{\omega^{*}s}\bigg{)}\Delta\omega \tag{7}\]  
It is assumed that the interfaced converter in this paper has a nominal apparent power to generate total limited currents. It means that \(S\) = constant. Thus, by considering the relations \(P^{2}+Q^{2}=S^{2}\) = constant, the relation between the small signal variables of active and reactive power can be written as,  
\[2P^{*}\Delta P+2Q^{*}\Delta Q=0 \tag{8}\]  
Using Equations (7) and (8), the reactive power control-based term can be achieved as:  
\[\frac{\Delta Q}{s}=-\frac{P^{*}}{Q^{*}}\frac{\Delta P_{m}}{s}+\frac{P^{*}}{Q^{ *}}\bigg{(}\omega^{*}J+\frac{(P_{m}^{*}-P^{*})}{\omega^{*}s}\bigg{)}\Delta\omega \tag{9}\]  
Equations (5), (7) and (9) are employed to design the personnel controller as:  
\[ \begin{array}{ll}\frac{\Delta\omega}{s}=\frac{-1/\omega^{*}Js}{s+(P_{m}^{* }-P^{*})/\omega^{*2}J}\Delta P+\frac{1}{\omega^{*}Js}\frac{1}{s+(P_{m}^{*}-P^ {*})/\omega^{*2}J}\Delta P_{m}\\ \frac{\Delta P}{s}=-\Big{(}\omega^{*}J+\frac{(P_{m}^{*}-P^{*})}{\omega^{*}s} \Big{)}\Delta\omega+\frac{1}{s}\Delta P_{m}\\ \frac{\Delta Q}{s}=\frac{P^{*}}{Q^{*}}\Big{(}\omega^{*}J+\frac{(P_{m}^{*}-P^ {*})}{\omega^{*}s}\Big{)}\Delta\omega-\frac{P^{*}}{Q^{*}}\frac{1}{s}\Delta P_{ m}\end{array}  \tag{10}\]  
In fact, the Equation (10) is a new description of the interfaced converter that now has the PMSG characteristics included the virtual inertia, VMPE (virtual mechanical power error), and angular frequency error. According to (10), both \(d\) and \(q\) components of the proposed control technique can be drawn as Figure 2a,b. Noticing Equation (10) and Figure 2, the compensators coefficients can be stated as:  
\[ \begin{array}{ll}k_{pp}=\omega^{*}J,k_{ip}=\frac{P_{m}^{*}-P^{*}}{\omega^{* }},&k_{pq}=\omega^{*}JP^{*}/Q^{*}\\ k_{iq}=\frac{(P_{m}^{*}-P^{*})P^{*}}{\omega^{*}Q^{*}},&\omega_{1}=1/\omega^{*} J,\omega_{2}=\frac{P_{m}^{*}-P^{*}}{\omega^{*2}J}\end{array}  \tag{11}\]  
Figure 2: The proposed control technique, (**a**) the \(d\)-component, and (**b**) the \(q\)-component. PMSG: permanent magnet synchronous generator; LPF: low pass filter.