## 5 Second Generation: Optimization of Virtual Inertia Systems
### Second Generation of Virtual Synchronous Generators  
In terms of improvement in VSG topologies, some researchers have developed techniques to try to minimize the frequency nadirs/peaks in the system at the expense of higher energy usage and peak transient power exchange through the virtual inertia systems [87; 88]. Other researchers, meanwhile, have focused on reducing the energy storage requirements and limiting peak transient power in virtual inertia systems even though it leads to slightly higher frequency nadirs/peaks [89; 90]. A self-tuningVSG was developed in [89] using an online optimization technique to tune the \(K_{I}\) and \(K_{D}\) parameters of the VSG control algorithm (described in Section 3.4) to minimize the frequency excursions, the ROCOF, and the power flow through the ESS. Although the frequency excursions were slightly higher in the case of the self-tuning algorithm, the power flow through the ESS was reduced by 58%. Moreover, the technique used less energy per Hz of frequency reduction than a constant parameter VSG. On a similar note of energy saving, an online neural-network based controller was proposed in [90; 91]. It used an adaptive dynamic programming (ADP) based approach to optimize the system and minimize energy usage while limiting the transient power. The controller supplemented the power references generated by the main VSG algorithm \(P_{VSG}\) with a supplementary signal \(P_{ADP}\) to give the total reference \(P_{VSG,TOTAL}\) as shown in Figure 15a. The aim of this supplementary signal was to improve the dynamics of virtual inertia. The proposed ADP controller used a neural network structure with two different networks--an action network and a critic network as shown in Figure 15b. The idea behind the design of the critic network was to adapt its weight such that the optimal cost function \(J^{*}(X(t))\) satisfies the Bellman principle of optimally as given by:  
\[J^{*}(X(t))=_{u(t)}^{min}\left\{J^{*}(X(t+1))+r(X(t))-U_{c}\right\} \tag{26}\]  
where, \(r(t)\) is the reinforcement signal for the critic network and \(U_{c}\) is a heuristic term used to balance. The input to the supplementary ADP controller was the state vector \(X(t)\) where the elements were the frequency error and the one and two time-step delayed frequency error signals. Based on a reinforcement learning approach, the ADP controller generated auxiliary power reference signals \(P_{ADP}\) to return the frequency back to its steady-state value faster and as a consequence reduced the energy exchange as explained in [90; 91]. The main concern with adding virtual inertia to the system is that it can increase the frequency settling time, leading to increased energy exchange from the ESS, which subsequently shortens the life of the ESS. The online controller was able to reduce the frequency settling time and the transient peak power. Figure 16a shows the frequency of a PV-hydro system under step load changes with and without the ADP controller. The frequency excursion was slightly higher than using constant parameter VSG, but there was a reduction in the frequency settling time. This led to lower energy usage and lower transient power as observable in Figure 16b. Table 3 summarizes the improvement achieved through the ADP-based virtual inertia controller. Figure 15: _Cont._  
A similar online learning controller was proposed for virtual inertia implementation in a double fed induction generator (DFIG) based system in [87]. In this case, the controller was trained so as to restrict the frequency excursions to a minimum while maintaining the rotor speed of the DFIG within a safe operating range, rather than saving the energy flow from ESS. Other techniques to optimize the virtual inertia have been proposed in [88] using Linear-quadratic-regulator (LQR) and in [92] using fuzzy logic to minimize frequency deviations and ROCOF.