# Development of Energy Storage Systems for High Penetration of Renewable Energy Grids
## 3 Frequency Regulation Technology Model
### Virtual Inertia Control Model  
The WECC second-generation generic model is not able to make detailed changes to the hardware and control methods, such as the switch switching methods and component values. To address this, a swing equation emulation for virtual inertial control is adopted. Next, the theory of virtual inertia control model is introduced in this section.  
A generator converts mechanical energy into electrical energy by cutting through magnetic lines of force with the rotation of its rotor. This means that, when there is an object with mass and rotational speed, the object generates kinetic energy. The equation for the rotational kinetic energy contained in a virtual rotating mass with rotational inertia can be written as follows:  
\[E=\frac{1}{2}J\omega^{2} \tag{8}\]The mechanical power of a virtual rotating mass is the time derivative of kinetic energy, and both the angular frequency and rotational inertia are functions of time. The equation for the mechanical power of a virtual rotating mass can be written as follows:  
\[P_{mech}=\frac{1}{2}\omega(t)^{2}\frac{d}{dt}I(t)+J(t)\omega(t)\frac{d}{dt} \omega(t) \tag{9}\]  
To simplify the analysis, let us assume that the rotational inertia of the virtual mass is constant, and the angular velocity of the virtual rotating mass is equal to the grid's angular velocity, which is at its rated value [24]. The simplified dynamic equation for the swing equation emulation can be written as follows:  
\[P_{mech}=J\omega_{grid}\frac{d}{dt}\omega_{grid}(t) \tag{10}\]  
Equations (8)-(10) are defined as follows:  
\(E\), kinetic energy of virtual rotating mass (J);  
\(J\), rotational inertia of virtual mass (kg m\({}^{2}\));  
\(\omega\), angular velocity of virtual mass (rad/s);  
\(P_{mech}\), mechanical power of virtual rotating mass (W);  
\(\omega_{grid}\), rated angular velocity of the power system (rad/s);  
\(\frac{d}{dt}\omega_{grid}(t)\), rate of change of angular velocity of the power system.  
The equation for the inertia constant, \(H\), can be written as Equation (11). By combining Equation (10) with Equation (11), the dynamic swing equation with the inertia constant can be written as follows:  
\[H=\frac{J\omega_{grid}{}^{2}}{2S_{B}} \tag{11}\]  
\[P_{mech}=\frac{2 HS_{B}}{\omega_{grid}}\frac{d}{dt}\omega_{grid}(t) \tag{12}\]  
Equations (11) and (12) are defined as follows: \(H\), inertia constant (s); and \(S_{B}\), capacity of a battery energy storage system (VA).  
The mechanical power is written per unit, and the grid frequency parameter is used instead of the angular velocity parameter. The dynamic swing equation per unit can be written as follows:  
\[P_{mech(pu)}=\frac{P_{mech}}{S_{B}}=\frac{2H}{f_{grid}}\frac{d}{dt}f_{grid}(t) \tag{13}\]  
We assume that the output power of the battery energy storage system is a positive value, which means that the output power is injected into the grid. The relationship between the mechanical power equation of the virtual rotating mass and the output power of the battery energy storage system can be written as follows:  
\[P_{BESS(pu)}=-P_{mech(pu)}=-\frac{2H}{f_{grid}}\frac{d}{dt}f_{grid}(t) \tag{14}\]  
Equations (13) and (14) are defined as follows:  
\(P_{mech}(\)pu), mechanical power of virtual rotating mass per unit (pu);  
\(f_{grid}\), rated frequency of power system;  
\(\frac{d}{dt}\)/\(f_{grid}\)(t), rate of change of frequency of power system;  
\(P_{BESS}(\)pu), output power of battery energy storage system per unit (pu).