*4.3. Selection of Diesel Generator Model in PSS®E*

The generator model selected in PSS®E is as shown in Table 6. All ESS models use second generation ESS general model of Western Electricity Coordinating Council (WECC). It consists of REPC\_A, REEC\_A and REGC\_A.

**Table 6.** Diesel Generator model in PSS®E.


#### *4.4. ESS's Response in Trip Contingency*

Different ESSs will respond differently when a N-1 contingency fault occurs. The following will show the grid frequency and the actual power output of the two ESSs when a N-1 contingency fault occurs.

#### 4.4.1. ESS1(Frequency Regulation)

ESS1 is used for frequency regulation. When the frequency exceeds the deadband (59.85–60.12 Hz), the ESS will start to discharge power. The rising time from 0 to full output is 167 ms. The response is shown in Figure 4.

Using the calibrated generator parameters set in Section 4.3, as also use in the paper [29], the ESS1 response can be replicated using the PSS®E, as shown in Figure 5. Figure 5 shows the data measured during an N-1 contingency when the load is 36.3 MW on 13 December 2019. At this time, the ESS1 and ESS2 has not been completed. Figure 6 shows the frequency measurement and simulation results for this N-1 contingency. A good match exists of *Fnadir* between calibrated simulation and measurement.

**Figure 4.** ESS1 real power output and grid frequency when N-1 contingency occurs.

**Figure 5.** Output response of ESS1 to an N-1 contingency from PSSE and as measured from phasor measurement Unit (PMU).

**Figure 6.** Frequency response simulation (PSSE) of ESS2 and ESS3 to a N-1 contingency and as measured from PMU.

4.4.2. ESS 2 and ESS 3 (Energy Arbitrage)

The responses of ESS2 and ESS3 during charging and discharging are as follows:

When the ESS is charging and a fault occurs, the ESS will quickly stop charging using low frequency relay tripping. As shown in Figure 7.

**Figure 7.** ESS 2 and ESS 3 grid frequency and real power output when N-1 contingency occurs while charging.

When the ESS is discharging and a fault occurs, the ESS will keep discharging. As shown in Figure 8.There would be a time delay of 83.33 ms from exceeding the deadband (59.85–60.12 Hz) to cutting off the ESS.

**Figure 8.** Grid frequency and real power output when contingency occurs during ESS2 and ESS3 discharge.

When ESS2 and ESS3 are discharging and the contingency occurs. As long as the voltage does not exceed the allowable range of high voltage ride through (HVRT) and low voltage ride through (LVRT), the ESS will continue to discharge and not cut off from the grid.

The transient performance of ESS2 and ESS3 depends on the circuit breaker, it is assumed that the local circuit breaker can cut off the electricity after about 5 cycles [27]. It can be seen from the picture that the simulated energy storage transient output and the lowest frequency of the contingency have a good match with the actual measurement.

#### **5. Simulation Results**

#### *5.1. Case 1: Multi-Function ESS (Proposed Method)*

Figure 9 show the results of the first ED or the initial ED. The N-1 contingency minimum frequency per hour is shown in Figure 10 with a blue line. Two generators are operating on at the 9th hour, with values of 6.4 and 7.1 MW. In the 15th hour, two

generators are operating with output of 6.6 and 7.1 MW. The N-1 contingency minimum frequency for the 9th and 15th hours are 56.079 and 56.074 Hz, respectively.

**Figure 9.** Case 1: result of first ED of (**a**) PV generation and the charge and discharge of ESS and (**b**) the power output of the diesel generators.

**Figure 10.** Minimum frequency of N-1 contingency per hour for three schedules of case 1.

The 9th hour frequency simulation results with generator active power outputs are shown in Appendix A. The ESS2 and ESS3 were not charged in both hours. The total cost of this third ED is 2422 kNTD. Using the process flow as discussed in Figure 1, the ESS requires 1.7 MW to charge at 9th hour and 1.7 MW to charge at 15th hour to get the frequency above the set value, equivalent to the 8.33% of SOC. Adding these two limits for the said hours, the second ED is rescheduled.

The results of the second ED are shown in the Figure 11. Case 1: result of second ED of (a) PV generation and the charge and discharge of ESS and (b) the power output of the diesel generators.

**Figure 11.** Case 1: result of second ED of (**a**) PV generation and the charge and discharge of ESS and (**b**) the power output of the diesel generators.

The minimum frequency of the N-1 contingency per hour is shown in Figure 10 in the orange line. Notice that the minimum frequency touches the set value of the frequency. The minimum frequency of N-1 contingency for the 9th hour and the 15th hour are 57.287 and 57.287 Hz, respectively. Using the proposed procedure to determine the required ESS charging for the 9th and 15th hours, the charging power required are 1.8 MW for the 9th hour and 1.8 MW for the 15th. Again, it is required to add this in the charging limits for the next ED. The total cost of this third ED is 2422 kNTD.

The result of the third ED is shown in Figure 12. The minimum frequency of N-1 contingency per hour is shown in Figure 10 in the green line. The 9th hour frequency simulation results with generator active power outputs are shown in the Appendix A. The minimum frequency of each hour is higher than the set value. Therefore, this is the final ED to support the N-1 contingency. The total cost of this third ED is 2422 kNTD.

**Figure 12.** Case 1: result of third ED of (**a**) PV generation and the charge and discharge of ESS and (**b**) the power output of the diesel generators.

The Figure 13 shows the changes in ED of the ESS2 and ESS3. In the second and third results, the two energy storages are in the state of charge and discharge at the 9th and 15th hours, so that *Fnadir* can be increased, and keep close to the original total output of that hour.

**Figure 13.** ED results of the ESSs (**a**)Result of 1st ED (**b**) Result of 2nd ED (c) Result of 3rd ED.

*5.2. Case 2: ESS Functioning as a Frequency Support*

Removing the two ESS, that function as energy arbitrage, verifies energy arbitrage function of our proposed method. The Figure 14 shows the ED result when the ESS2 and ESS3 are removed. According to the system conditions, two generators must be turned on to maintain the system stability.

**Figure 14.** Case 2: Result of the scenario without ESS for (**a**) the PV generation and (**b**) the power output of the diesel generators.

Since there are no ESS performing energy arbitrage, low net load causes the PV power generation to be curtailed, as shown in the Figure 14a, as the pink bar is lower than the red bar. Furthermore, without energy arbitrage, the total operating cost raises to 2555 kNTD from 2422 kNTD.
