*3.3. ESS*

Inequalities (8) and (9) limit the charge and discharge power of the ESS so that it does not exceed the limit of the maximum charge and discharge power. The *Bbatt*\_*dis*(*t*) and *Bbatt*\_*ch*(*t*) are binary integers representing the discharge or charge states of the ESS at time *t* while. The *Pbatt*\_*dis*\_*max* and *Pbatt*\_*ch*\_*max* on the other hand represent the maximum discharge power and the maximum charging power of the battery ESS, respectively.

$$0 \le P\_{\text{batt}\_{dis}}(t) \le P\_{\text{batt\\_dis\\_max}} B\_{\text{batt\\_dis}}(t) \tag{8}$$

$$-P\_{\text{batt\\_ch\\_max}}B\_{\text{batt\\_ch}}(t) \le \,^\*P\_{\text{batt\\_ch}}(t) \le \,^\*0 \tag{9}$$

Inequality (10) is used to ensure that a single ESS cannot be charged and discharged at the same time.

$$B\_{batt\\_dis}(t) + B\_{batt\\_ch}(t) \le 1\tag{10}$$

Equation (11) describes the charge and discharge cost of the ESS. The purpose is to prevent the ESS from charging and discharging at an unnecessary time. Because if the battery ESS does not add the cost of charging and discharging. It may be charged and discharged in two time periods with the same electricity price. For example, if the average power generation cost of the first hour and the fifth hour is both 4. The battery ESS may be fully charged in the first hour and fully discharged in the fifth hour. This will not affect the final cost. However, this phenomenon is unreasonable in scheduling. Therefore, it is appropriate to add some small costs to the charging and discharging of the ESS to resolve this. Where *COSTbatt* represents the cost of the battery ESS per unit of charge and discharge. In this study, it is set to 0.1 NTD/kWh

$$\mathcal{L}\_{batt}(t) = \left(P\_{batt\_{dis}}(t) + P\_{batt\_{ch}}(t)\right) \times \text{COST}\_{batt} \tag{11}$$

Equation (12) is mainly to calculate the power of the battery ESS at time *t*. *SOC*(*t*) represents the state of charge(SOC) of ESS at time *t*, *δ<sup>t</sup>* is the time interval, *ηInd* and *ηInc* represent discharge and charge efficiency of the ESS, respectively, and *Pbatt*\_*capacity* represents the capacity of the ESS.

In inequality (13), *SOCmin* and *SOCmax* represent the minimum and maximum value of SOC. Table 1 shows the specifications of the different ESSs used for this study. As seen in the table, since different energy storages have different capacities and power characteristics, the two energy storages will not be able to charge or discharge full power when they are close to their full energy or almost no energy [27,28].

**Table 1.** ESS specification.


Originally, the *SOCmin* and *SOCmax* for both ESS2 and ESS3 are 10 and 90%, respectively. However, for this study, it would be set to 19 and 81%, respectively. These two values were adjusted because when an N-1 contingency occurs, the energy storage takes about half an hour (for the case of Kinmen Island) of continuous charging or discharging before a new generator is turned on. This charge or discharge decreases the SOC by 8.33%. Therefore, in order for the ESS2 and ESS3 to join the spinning reserve, their *SOCmin* should be set to 19% and *SOCmax* is set to 81% to make sure that the 8.33% of SOC for the N-1 contingency is always on standby and available at any time period.

In Equation (14), the final SOC must return to its initial value. *SOCini* and *SOCend* represent the initial and end SOC, respectively.

$$\text{SOC}(t) = \text{SOC}(t-1) - \delta\_l \left( \frac{P\_{\text{batt}\_{dis}}(t)}{\eta\_{Ind} \times P\_{\text{batt}\_{cap}}} + \frac{\eta\_{Inc} \times P\_{\text{batt\\_ch}}(t)}{P\_{\text{batt\\_capacity}}} \right) \tag{12}$$

$$\text{SOC}\_{\text{min}} \le \text{SOC}(t) \le \text{SOC}\_{\text{max}} \tag{13}$$

$$SOC\_{\rm ini} = SOC\_{\rm end} \tag{14}$$

#### *3.4. Power Balance Constraint*

Shown in Equation (15) is the power balance constraint of the power system. Where *PPV*(*t*) represents the total power generation of renewable energy at time *t*. *Ptolerance*(*t*) represents the allowable error value for the solution. *PL*(*t*) is the total load at time *t*.

$$P\_{PV}(t) + P\_{Inv}(t) + \sum\_{n=1}^{N} P\_n(t) + P\_{tolerance}(t) = P\_L(t) \tag{15}$$

#### *3.5. Spinning Reserve Constraint*

In inequality (16), the ESS available power is added to the spinning reserve to improve the reliability of the power grid. *Pn*\_*max*(*t*) in (12) represents the maximum power generation of the *n*th generator while *Pspin*\_*reserve* is the required standby capacity of the overall system. The current maximum generating capacity of the system at time *t* is used as the reserve capacity limit, representing the left side of the Equation (16).

$$\sum\_{n=1}^{N} l I\_n(t) \left( P\_{n\\_max}(t) - P\_n(t) \right) + P\_{batt\\_dis\\_max}(t) - P\_{batt\_{dis}}(t) + P\_{batt\_{ch}}(t) \ge P\_{\text{spin\\_resrrw}} \tag{16}$$

#### *3.6. Ramp Rate Constraint*

In inequality (17), *Rrate*\_*n*(*t*) represents the ramp rate of the nth diesel generator per second at the *t*th time. *Rrate*\_*min* represents the minimum required ramp-up and ramp-down per second of the grid.

$$\sum\_{n=1}^{N} \mathcal{U}\_{\mathcal{U}}(t) \mathcal{R}\_{\text{rate\\_n}}(t) \ge \mathcal{R}\_{\text{rate\\_min}} \tag{17}$$

#### *3.7. PV Curtailment Constraint*

Curtailment of generated power is required when the penetration rate is too high. The scheduled PV generation needs to be less than the predicted generation, as shown in (18).

$$0 \le P\_{PV}(t) \le P\_{PV\\_predict}(t) \tag{18}$$

#### *3.8. Security Constraints*

ESS charging power is used to increase the minimum frequency when the grid is vulnerable. The inequality is shown in Equation (19). *Pbatt*\_*ch*\_ESS2(*t*) and *Pbatt*\_*ch*\_ESS3(*t*) represent the respective charge amounts of the two ESSs specifically used for energy arbitrage. The *Pconstraint*\_*batt*\_*ch*(*t*) represents the minimum total charge required to support the N-1 contingency for these two ESSs at time *t*.

$$|P\_{\text{bttt\\_ch\\_ESS2}}(t)| + |P\_{\text{bttt\\_ch\\_ESS3}}(t)| \ge |P\_{\text{constraint\\_butt\\_cht\\_ch}}(t)|\tag{19}$$

#### **4. Description and Introduction of Simulation Environment**

#### *4.1. System Model and Settings*

This study takes the Kinmen grid as the system under study. Kinmen Island is a small island west of Taichung City (R.O.C.), Taiwan, very close to mainland China. The winter load is about 21.9 to 42.95 MW while the summer load is about 43.26 to 73.81 MW.

Kinmen Island uses diesel to generate electricity making its cost usually higher because of the cost of transporting fuel. On the other hand, solar energy is a cheaper replacement for fossil fuel.

Currently Kinmen Island has two power plants and a 12.3 MW PV plant. Power plant 1 has 10 heavy oil diesel generators. Power plant 2 has 6 light oil generators and 2 ESSs. ESS1 is 2 MW/1 MWh lithium-ion batteries used for frequency regulation, while ESS2 is 1.8 MW/10.8 MWh sodium-sulfur batteries used for energy arbitrage. It is expected that an additional 4 MW/24 MWh ESS will be built in 2023 for energy arbitrage.

This study considers the future winter conditions of Kinmen Island. Only heavy oil diesel generators will be used because of the low operational cost of heavy oil diesel generator. There is a 27 MW PV plant with the three ESSs mentioned in the previous paragraph. The system has 4–22.8 kV busbars, 4–11.4 kV busbars, 4 main transformer loads, and 2 substations. A simplified schematic diagram of connections between all facilities is shown in Figure 3. The trip settings for the underfrequency relays has four levels, 57.3, 57.0, 56.5, and 56.0 Hz. After triggering the underfrequency relay, it takes about 5–6 cycles to open the circuit breaker [5,29]. In this study, *Fnadir* is set to 57.3 Hz, in order not to trigger UFLS.

**Figure 3.** System diagram.

The ED is solved using mixed integer linear programming (MILP) using the IBM CPLEX 12.10.0 solver. The computer used is for these simulations is an Intel Core (TM) i5-7500 CPU @ 3.4 GHz. 16G RAM. PSS®E version is 33.4.0. It is coded in a Python program for automated simulation.

#### *4.2. Generator ED Model*

Various parameters of diesel generators and upper and lower limits of power generation in ED is shown in Table 2.


**Table 2.** Parameters of diesel generators.

The fuel cost coefficients *an*, *bn*, and *cn* of the hypothetical heavy oil diesel generator are shown in Table 3. The generator fuel cost after piecewise linearity is shown in Table 4.

**Table 3.** Diesel generator cost factor and startup cost.



**Table 4.** Diesel Generator Linear Fuel Cost.

According to the government website [30], it is assumed that the ramp-up and rampdown rate per sec of each generator set is shown in Table 5. In this study, this value was set to 430 kW/s. Since the highest ramp-up and ramp-down value of a single generator to 420 kW/s, the value of 430 kW/sec is chosen here to ensure that at least two generator sets will be running at any point in time. Two generators are needed because if the system trips contingency, at least one generator can provide the reactive power required for the grid to maintain voltage stability.

**Table 5.** The ramping rate of the generator set.

