# Large-Scale Grid Integration of Renewable Energy Resources with a Double Synchronous Controller
## 6 Angular Frequency Error Evaluation  
The other important issue related to the high penetration of renewable energy resources into the power grid is that how much the active and reactive power sharing can affect grid frequency regulation and vice versa. To accomplish an accurate analysis, this section is focusing on this issue. By using the two first terms of (2), the relationship between the angular frequency error and both active and reactive power error of the NSC can be achieved as:  
\[\Delta\omega=\frac{\left(\begin{array}{c}\Delta Q^{2}+\left(\frac{-R\Delta u_ {d}P_{c1}^{*}-Ru_{d}^{*}\Delta P_{c1}+R\Delta P_{d}}{\omega^{*}L}\right) \Delta Q\\ +\Delta P^{2}+\left(\frac{-R\Delta u_{q}P_{c1}^{*}-Ru_{q}^{*}\Delta P_{c1}+R \Delta P_{dq}}{\omega^{*}L}\right)\Delta P\\ -\left(\frac{LQ^{*}\Delta Q+P^{*}L\Delta P}{\omega^{*}L}\right)\end{array}\right) \tag{20}\]  
By accomplishing the same process for (14) and (15), the relation between the angular frequency error and both active and reactive power errors of DSC are given by:  
\[\Delta\omega= \sqrt{\left(\beta\left(\Delta P,\Delta Q\right)\right)^{2}+\rho_ {2}\Delta P^{2}+\rho_{1}\Delta P+\sigma_{2}\Delta Q^{2}+\sigma_{1}\Delta Q} \tag{21}\] \[+\beta\left(\Delta P,\Delta Q\right)\]  
\[\rho_{2}=\frac{1}{\left(\left(\omega^{\prime}f\right)Q^{*}+\left(\frac{\omega ^{\prime}lP^{2}}{Q^{*}}\right)\right)},\;\rho_{1}=\left(\frac{\Delta P_{m}(LQ ^{*}\omega^{\prime})}{LQ^{*}\omega^{\prime}\left(-\left(\omega^{\prime}lP^{2} \right)\right)}\right),\;\sigma_{2}=\frac{1}{\left(\left(\omega^{\prime}f \right)Q^{*}+\left(\frac{\omega^{\prime}lP^{2}}{Q^{*}}\right)\right)},\; \sigma_{1}=\frac{\left(\frac{\left(\omega^{\prime}lP^{2}\Delta P_{m}\right)} {LQ^{*}\omega^{\prime}}\right)}{\left(\left(\omega^{\prime}f\right)Q^{*}+ \left(\frac{\omega^{\prime}lP^{2}}{Q^{*}}\right)\right)}\]  
The parameters in (21) are given at the footnote of the previous page. By noticing (21) and (22), it can be clearly seen that the angular frequency error is highly dependent on the values of the SG features, i.e., the virtual inertia, the mechanical power reference, and also the virtual mechanical power error. Thus, in the same operating conditions considered for the NSC and the DSC, the SG features can be regulated in order to decrease the angular frequency error as much as possible.  
By the use of (20)-(22), the angular frequency error curves based on the active and reactive power error of the NSC and the DSC are drawn in Figure 9. According to Figure 9b, the simultaneous changes of the active and reactive power error can lead to the smaller angular frequency error compared to the NSC, as shown in Figure 9a. These results are achieved based on considering the same values for the same variables and parameters used in (20)-(22). Consequently, it can be understood that the better results of the proposed DSC are due to the embedded SG features. In further analysis of the DSC basic operation, the effects of the simultaneous changes of the angular frequency and virtual mechanical power error on active and reactive power errors of the DSC are shown in Figure 10. As can be seen, the smallest circle is driven though the smallest values of the angular frequency and virtual mechanical power error. On the other hand, the largest values of both angular frequency and virtual mechanical power error can lead to the worst response for the active and reactive power errors of the DSC, which is much more critical compared to the critical one in Figure 5.  
Figure 9: The angular frequency error curves based on the active and reactive power errors of (**a**): the NSC and (**b**): the DSC.