## 4 ESS Controller Parameter Design for Electromechanical Oscillation Suppression
### ROCOF > 0  
When ROCOF is greater than 0, corresponding to Interval I and Interval IV in Figure 7, (15) can be rewritten as  
\[0\leq T_{\rm J}\frac{\mathrm{d}\Delta\omega}{\mathrm{d}t}=-T_{\rm D}\Delta \omega\leq T_{\rm J}m, \tag{16}\]  
From the perspective of reducing the ESS capacity, the fundamental function of the ESS is to further strengthen or weaken the existing dynamic characteristics of the power system, instead of dominating the dynamics of the SG-dominated system. For instance, when the grid frequency accelerates, the ESS merely enhances or slightly weakens the acceleration, rather than trying to change the system from acceleration to deceleration. The former requires significantly less ESS capacity than the latter. Therefore, in this stage (ROCOF greater than 0), the ESS should conform to the existing acceleration trend of the power system, and provide some additional inertia effects to weaken the existing acceleration trend and ensure that the acceleration does not exceed the ROCOF threshold. Therefore, in this period, the P controller parameter \(K_{\rm P}\) should satisfy:  
\[T_{\rm J}\frac{\mathrm{d}\Delta\omega}{\mathrm{d}t}=-T_{\rm D}\Delta\omega=- \big{(}D+K_{\rm q}K_{\rm P}\big{)}\Delta\omega\geq 0, \tag{17}\]  
In this period, the D controller parameter \(K_{\rm d}\) should satisfy:  
\[\big{(}2H+K_{\rm q}K_{\rm d}\big{)}m=T_{\rm J}m\geq T_{\rm J}\frac{\mathrm{d} \Delta\omega}{\mathrm{d}t}=-T_{\rm D}\Delta\omega, \tag{18}\]  
The above constraints all involve \(\Delta\omega\), and its value is related to the interval that the power system is located in. Therefore, the controller parameter design issue is discussed separately according to two cases: \(\Delta\omega\) < 0 and \(\Delta\omega\) > 0. Furthermore, considering that the constraint in (17) is only related to the P controller parameter \(K_{\rm P}\), \(K_{\rm P}\) is designed first, and then the D controller parameter \(K_{\rm d}\) is designed according to the constraint in (18). **Case A**: \(\Delta\omega\) < 0 and ROCOF > 0 when the dynamic process is located in Interval I (Figure 7). In this period, when ROCOF is greater than 0, the grid frequency rises rapidly and gradually deviates from the steady-state point \(\omega_{0}\). In order to shorten the oscillation process, prevent the grid frequency being far from \(\omega_{0}\), and ensure that the grid frequency deviation is less than its threshold, it is necessary to increase the inertia effect in this period. The primary goal of the ESS is to suppress the ROCOF. According to (17), when \(\Delta\omega<0\), the P controller parameter \(K_{\text{p}}\) should satisfy:  
\[K_{\text{p}}\geq-\frac{D}{K_{\text{q}}}, \tag{19}\]  
The above equation shows that the ESS can provide both positive damping torque and a certain amount of negative damping torque that should satisfy the constraint in (19). Obviously, the ESS also can provide zero damping effect. Therefore, in terms of saving ESS capacity, in this period, the ESS does not need to provide damping torque, and the equivalent damping coefficient of the power system can be designed as the inherent damping coefficient of the equivalent SG. Correspondingly, the controller parameter \(K_{\text{p}}\) is 0. Therefore, the constraint in (18) can be simplified as:  
\[K_{\text{d}}\geq-\frac{1}{K_{\text{q}}}\left(2H+\frac{D}{m}\Delta\omega\right), \tag{20}\]  
In order to satisfy the frequency deviation constraint in (12), there is:  
Figure 7: Illustration of proposed control scheme and its parameter design method.