**1. Introduction**

When the power generation and the power consumption are not equal, the frequency will deviate from the nominal value [1]. In the power system, if one of the generators fails, it will cause an energy mismatch and the frequency will begin to drop. The system needs to provide for the missing power generation immediately. There are frequency control responses that can be applied during generator contingency. First is the inertia response which comes from the rotating synchronous generator connected to the grid. When the frequency drops, the rotational inertia will be converted from kinetic energy into electrical energy and input into the grid instantly, reducing RoCoF (Rate of Change of Frequency). The second response is the droop control of some generators wherein the governor is controlled automatically to respond when the frequency starts to deviate [2]. This control allows more steam to enter the turbine to generate electricity, matching the grid energy for a few seconds, preventing frequency reduction, and using renewable energy instead of traditional rotation.

In the case of system energy imbalance, the rotational kinetic energy stored in the rotor of the traditional synchronous generator is used to provide inertial support for the power grid, keeping the minimum frequency of accidents at a certain level. However, most inverter-based sources (IBRs) such as wind or solar cannot provide inertia [3]. Replacing traditional generators with IBRs will reduce the inertia of the system, causing a larger RoCoF and a lower minimum frequency when the generator trips [4].

In the past, the power system usually used under-frequency load shedding (UFLS) to balance the insufficient power generation when the generator contingency caused the reduction of supply [4–7]. Some literatures [8–13] used RoCoF and the lowest frequency point to estimate the energy storage system (ESS) capacity and location for the frequency regulation required by the system.

**Citation:** Jhan, J.-Z.; Tai, T.-C.; Chen, P.-Y.; Kuo, C.-C. Research on Dynamic Reserve and Energy Arbitrage of Energy Storage System. *Appl. Sci.* **2022**, *12*, 11953. https:// doi.org/10.3390/app122311953

Academic Editors: Luis Hernández-Callejo, Jesús Armando Aguilar Jiménez and Carlos Meza Benavides

Received: 29 August 2022 Accepted: 21 November 2022 Published: 23 November 2022

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

In [10,14], the virtual inertia and the primary frequency response (PFR) provided by the ESS are taken into account to estimate the required ESS power and capacity. These two studies consider ESSs that can quickly respond to frequencies, but according to [15] not all ESSs have the ability to adjust the frequency.

In [16–18], ESS was added to the economic dispatch (ED) to deal with a high penetration of renewable energy. These two papers used ESS for peak shaving but did not consider frequency stability.

In [19], an ED considering automatic generation control (AGC) is proposed when the proportion of renewable energy is high, but peak shaving ESS is not considered. In [20], it is proposed to consider both PFR and secondary frequency response (SFR) in the unit commitment (UC) and consider the cost rate of ancillary services in different regions to propose a new market settlement strategy to compensate for the regional marginal cost of providing frequency reserves.

At present, most of the ED studies that consider security constraints do not include ESS. Further, most of the EDs that include ESS do not consider frequency security constraints. Therefore, this study proposes a method to incorporate both security constraints and ESS into the ED to find a safe and economical schedule.

In this study, the ESS was first added to the spinning reserve in the ED, which could reduce the generator's online time and thus reduce the cost. The base models are described in [21] with the addition of the ESS. With the inclusion of the ESS, the ESS will reduce the cost in the ED through its charging and discharging, and will automatically perform energy arbitrage, thereby providing two functions at the same time. However, due to the high penetration of renewable energy, the occurrence of N-1 contingency during certain periods will result in very low frequency. It is, therefore, important to calculate how much the ESS needs to be charged during these periods.

When an N-1 contingency occurs, the charging of the ESS can be cut off immediately to compensate for insufficient power generation and not trigger the UFLS during the low frequency. The addition of security constraints in the ED would find a safe ED to schedule.

PSS®E is a software from Siemens widely used in the analysis of power systems [22–24]. The N-1 contingency minimum frequency was also calculated using PSS®E in papers [22,23] and was used in this study. PSS®E mainly uses the dynamic reduction method to calculate contingency minimum frequency [25,26].

The content of the paper is as follows: Section 2 describes the proposed strategy; Section 3 describes the constraints of ED; Section 4 describes the simulation scenarios; Section 5 shows the simulation results; Section 6 is the discussions; and Section 7 is the conclusion.

#### **2. Proposed Preventive Control Strategy**

The flowchart shown in Figure 1, shows the flow of the simulations for the proposed preventive control strategy. The hourly power generation and hourly forecasted data of renewable energy will be first read to calculate the net load. Then, using the MILP, an ED for the new generator and ESS will be determined for the next 24 h. The scheduled ED will be used to determine the minimum frequency (*Fnadir*) that will be calculated at each hour using the PSS®E software. If the minimum frequency is lower than the set value (*Fmin*), then the charging power of the ESS will be calculated by adding 0.1 MW in that hour to meet the *Fmin* requirement. This charge will be added to the ED constraint and rescheduled until the minimum frequency per hour is higher than the set value. If the maximum charge of the ESS is reached, one generator will be added to the schedule and the ED will again be computed. An additional charge will again be included in the ESS schedule to make sure that the new minimum frequency is greater than the set value. In other words, the minimum frequency of N-1 contingency should always be higher than the set value every hour to make sure that the charge from the ESS can support a sudden drop in frequency.

**Figure 1.** Flow chart.
