## 3 Reflection of SOC into the System Frequency  
For the grid-feeding DG units to know the SOC of the ESSs based on the system frequency, the grid-forming units must change their output frequency with respect to the SOC. For grid-forming units to change their output frequency appropriately and allow grid-feeding units to support SOC and frequency management, all possible cases where the SOC needs to be supported must be investigated. The SOC has to be supported when it deviates from the allowable operation range, which is determined by the system operator; this situation is closely related to the output power of the ESS and the system load change, as shown in Table 1, where \(P_{ESS,rf}\) and \(P_{ESS}\) are the reference power and output power of the ESS, respectively. The sign of the ESS output power can be positive (discharging) or negative (charging). The case of zero output power is ignored because it does not cause any change in the SOC. It is assumed that, before the load change, the system is in a steady state and \(P_{ESS}\) is equal to \(P_{ESS,rf}\). Hence, from Equation (1), the system frequency has a nominal value before the load change. In Table 1, Cases 1 and 10 never occur because the output power of the grid-forming ESS will not be increased/decreased after the load is decreased/increased. Similarly, Cases 5 and 12 occur neither since the sign of the output power will change without a load change. In Cases 3 and 8, the status of the ESS is changed from charging/discharging to discharging/charging. In these cases, the discharging/charging status of the ESS causes a low/high SOC problem. A simple solution is to restore \(P_{ESS}\) to its reference value, so that the status of ESS can be changed again from discharging/charging to charging/discharging. This can be done by controlling grid-feeding units to recover the frequency to the nominal value (the details will be discussed in the next section). However, there could be cases in which the frequency falls in the dead band range of the frequency support control of the grid-feeding units. Moreover, in the rest of the cases (Cases 2, 4, 6, 7, 9, and 11), frequency recovery cannot solve the low/high SOC problem since the sign of \(P_{ESS}\) is still the same as before the load change. In such cases, the output frequency of grid-forming DG must be changed by triggering the low/high SOC signal and hence allowing the grid-feeding DG units to measure the frequency deviation. By measuring the frequency deviation, grid-feeding DG units can adjust their power to restore the frequency and hence maintain the SOC (the details will be discussed in \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Case No.**} & \multicolumn{2}{c}{**Steady State**} & **Transient State** & \multicolumn{2}{c}{**After Load Change**} \\ \cline{2-5}  &
\begin{tabular}{c} **Sign 1** \\ **(= Sign of \(P_{ESS}\))** \\ \end{tabular} & **Load Change** & **Sign 1** & **of \(P_{ESS}\)** & **Possible Risk** \\ \hline \hline
1 & & & & – & N/A \\
2 & & & & + & Low SOC \\ \hline
3 & + & & & – & High SOC \\
4 & & & & + & Low SOC \\ \hline
5 & & & & – & N/A \\
6 & & & & + & Low SOC \\ \hline
7 & & & & – & High SOC \\
8 & & & & + & Low SOC \\ \hline
9 & & & & – & High SOC \\
10 & & & & + & N/A \\ \hline
11 & & & & – & High SOC \\
12 & & & & + & N/A \\ \hline \hline \end{tabular} \({}^{1}\) Positive and negative signs for discharge and charge, respectively.  
\end{table} 
Table 1: All possible cases of state-of-charge (SOC) change. the next section). To this end, a frequency reference controller for grid-forming DG is proposed as shown in Figure 1, where \(SOC_{min}\) and \(SOC_{max}\) are the allowable minimum and maximum of the SOC operation range determined by the operator, \(P_{res}\) is the active power reference during SOC restoration, \(P_{sched}\) is the hourly scheduled active power with respect to the system's load pattern, and \(m_{PF}\) is \(P\)-\(f\) droop coefficient.