# Research on Dynamic Reserve and Energy Arbitrage of Energy Storage System
## 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, 5, 6, 7]. Some literatures [8, 9, 10, 11, 12, 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. 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; 17; 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.