# Modelling, Analysis and Performance of a Low Inertia AC-DC Microgrid
## 2 System Model
### Voltage Source Converter Model  
The VSC interfaces the DC microgrid with the AC microgrid under investigation. Moreover, the VSC control contributes to the microgrid's stability in cases of contingency by supporting the microgrid frequency in terms of rate of change of frequency (RoCoF) and nadir by providing virtual inertia support. The VSC supports the microgrid frequency by reflecting the dynamics of the frequency to the DC voltage bus through an inertial gain and either a high-pass filter (HPF) or a low-pass filter (LPF). The results of the two methods are introduced in the following sections to compare dynamic behavior and performance.  
The total power injected by the DC microgrid to support the AC side is given as (\(P_{ex}\)); it is the result of subtracting the constant power source and the constant power load (\(P_{CPL}\)) as well as the resistive load in the DC microgrid side while the power transferred to the AC  
Figure 1: Microgrid system under study.  
microgrid is given by (\(P_{s}\)). Equation (1) represents the dynamics of the DC link capacitor (\(C_{dc}\)) of the interlinking VSC.  
\[\frac{1}{2}C_{dc}V_{dc}^{2}=P_{ex}-P_{s}. \tag{1}\]  
Ignoring the VSC losses, the power injected into the AC microgrid is defined in (2), where \(V_{d},V_{q}\) are AC grid voltages in the DQ reference frame and \(I_{d}\), \(I_{q}\) are the VSC output currents of the VSC in the DQ reference frame.  
\[P_{s}=V_{d}\ I_{d}+V_{q}\ I_{q}. \tag{2}\]  
The renewable energy resources in the DC microgrid can be modelled as a constant power source with power \(P_{DG}\), injecting a constant power into the AC grid, where the DC grid voltage is regulated via the interlinking VSC. This action is due to the slow power variation nature of the renewable energy resources compared to the inertia support loop. The DC microgrid resistive loads are modelled as a resistance R. Therefore, the excess power available from the DC microgrid can be calculated as follows:  
\[P_{ex}=P_{DG}-P_{CPL}-\frac{V_{dc}^{2}}{R}. \tag{3}\]  
The Equations (4a)-(4c) describe the dynamics of the VSC control loop shown in Figure 2, where \(\tau_{i}\) is the time constant of the closed loop current controller, \(k_{p},k_{i}\) are the DC link voltage controller gains, \(I_{dVSC}^{*}I_{dVSC}^{*}\) are the reference values of the currents in the DQ frame. For unity power factor operation, the q-reference current is set to zero.  
\[I_{d}=\frac{I_{d}^{*}}{\tau_{i}\delta+1}, \tag{4a}\] \[I_{q}=\frac{I_{q}^{*}}{\tau_{v}}-\frac{I_{q}}{\tau_{i}},\] (4b) \[I_{d}^{*}=\frac{1}{1.5\ V_{d}}\bigg{(}\bigg{(}k_{p}+\frac{k_{i}}{s}\bigg{)} \bigg{(}V_{dc}^{2*}-V_{dc}^{2}\bigg{)}+P_{s}\bigg{)}. \tag{4c}\]  
Figures 3 and 4 show the proposed virtual inertia controller using an HPF \(G_{HPF(s)}\) and LPF controller \(G_{LPF(s)}\), respectively. The results of both controllers are compared in the Simulation results section. The equations that describe the virtual inertia loop are given in Equations (5a) and (5c) for the HPF and LPF methods, respectively.  
\[V_{dc}^{*}=V_{dcref}^{*}+K*G_{HPF(s)}\omega_{s}, \tag{5a}\]  
Figure 2: Control of the VSC.  
\[G_{HPF(s)}=\frac{s}{s+\omega_{HPF}}, \tag{5b}\] \[V_{dc}^{*}=V_{dcrf}^{*}+K*G_{LPF(s)}(\omega^{*}-\omega_{meas}),\] (5c) \[G_{LPF(s)}=\frac{\omega_{LPF}}{s+\omega_{LPF}}. \tag{5d}\]