Sizing of Hybrid Energy Storage Systems for Inertial and Primary Frequency Control

The exponential rise of renewable energy sources and microgrids brings about the challenge of guaranteeing frequency stability in low-inertia grids through the use of energy storage systems. This paper reviews the frequency response of an ac power system, highlighting its different time scales and control actions. Moreover, it pinpoints main distinctions among high-inertia interconnected systems relying on synchronous machines and low-inertia systems with high penetration of converter-interfaced generation. Grounded on these concepts and with a set of assumptions, it derives algebraic equations to rate an energy storage system providing inertial and primary control. The equations are independent of the energy storage technology, robust to system nonlinearities, and rely on parameters that are typically defined by system operators, industry standards, or network codes. Using these results, the authors provide a step-by-step procedure to size the main components of a converter-interfaced hybrid energy storage system. Finally, a case study of a wind-powered oil and gas platform in the North Sea demonstrates with numerical examples how the proposed methodology 1) can be applied in a practical problem and 2) allows the system designer to take advantage of different technologies and set specific requirements for each storage device and converter according to the type of frequency control provided.


INTRODUCTION
Planning, design, and operation of ac power systems (ACPSs) are becoming more involved. For instance, conversion from primary sources and storage is performed using not only synchronous machines (SMs) but also converter-interfaced generators (CIGs). Moreover, groups of interconnected loads and distributed energy resources, also known as microgrids (MGs) (IEEE, 2018a;IEEE, 2018b), can form islands and operate independently from the interconnected power system.
From this perspective, energy storage systems (ESSs) can help to balance demand and supply and control frequency, voltage, and power flows in isolated power systems or MGs operating in islanded mode. These features increase not only the stability and security of the system but also its efficiency and asset utilization (Fu et al., 2013;Strbac et al., 2015). Nonetheless, these desired features can be achieved only with the proper sizing of ESSs.
In particular, sizing the components of a converter-interfaced ESS is one of the main challenges in MGs and large ACPSs with high penetration of CIGs, the main reason being the trade-off among key technical characteristics in storage solutions, where no single technology stands out (Koohi-Kamali et al., 2013;Farhadi and Mohammed, 2016;Gallo et al., 2016). For instance, ultracapacitors and flywheels are appropriate for inertia simulation as they offer high power density and efficiency. However, their low energy density and high cost per kWh make them unsuitable for primary and secondary control. Further examples are the several types of batteries and fuel cell technologies. These solutions are well-suited for secondary control because they offer reasonable power and energy densities and cost per kWh. Nevertheless, their lifetime can be extremely reduced if applied in inertia simulation and primary control due to the abrupt current changes and number of charge and discharge cycles required. In summary, there is no one-sizefits-all technology for ESSs, so hybrid solutions are currently becoming the preferred choice not only in transportation but also in ACPS applications (Hemmati and Saboori, 2016).
When considering all that, sizing an ESS to provide inertial and primary frequency control becomes an intricate task. Many researchers have been devoting time to untangle this problem. For MGs, Aghamohammadi and Abdolahinia (2014) optimally sized a battery ESS for primary frequency control considering overloading characteristics and limitation of the state of charge. For that, the authors proposed an iterative procedure based on time-domain simulations that considers the battery permissible overload coefficient and duration. Bijaieh et al. (2020a) and Bijaieh et al. (2020b) presented a control-based approach applying the Hamiltonian surface shaping and power flow control to size the ESS and to address how communication and controller bandwidth can affect the sizing and filtering requirements. For large ACPSs with high penetration of CIGs, Knap et al. (2016) introduced a methodology to size ESSs for the provision of inertial response and primary frequency regulation. In this work, a linearized version of the swing equation was applied to determine the ESS rated power and energy capacity, and it was shown that this converter-interfaced system can achieve similar performance to a conventional peak power plant. Sandelic et al. (2018) focused on primary control and proposed a broader three-stage methodology, which evaluates not only the battery dynamic response and provision of frequency reserves but also the lifetime and economic assessment.
From a system operator or developer point of view, the main limitations in these previous works are the following: 1) the extensive use of time-domain simulations to support their sizing methodology, 2) the assumption that the required ESS technology and model parameters are well-known beforehand, and 3) the linearization of the swing equation to study the frequency-control problem.
For the first limitation, it must be noted that defining the rated active power and energy capacity of an ESS is a multi-stage process involving a techno-economical evaluation as emphasized by Sandelic et al. (2018) and Riboldi et al. (2021). Hence, the analysis of the ESS dynamic response is only one step of the problem, which requires integration into a broad optimization involving several time scales. Nonetheless, an inspection of recent literature reviews on ac MG planning (Gamarra and Guerrero, 2015; Al-Jaafreh and Mokryani, 2019) reveals that conditions for frequency stability are largely overlooked in the problem formulation, and most optimization algorithms consider that matching power demand with generation is the only required dynamic constraint, without imposing minimum requirements on system damping or frequency reserves. This is typically justified by the argument that frequency stability analysis in ACPSs requires computationally demanding simulation models that can turn the optimization into an intractable problem. Therefore, ESS sizing models should be efficient and, if possible, algebraic to be directly incorporated as constraints in larger optimization algorithms.
For the second limitation, system operators of ACPSs are fundamentally interested in specifying the minimum equivalent inertia, damping, deadband, and time delay of equipment supplying inertial response and primary frequency regulation (Duckwitz, 2019). Indeed, in many regulated ACPSs, such as transmission and distribution grids, system operators avoid requiring specific technologies and prefer to limit specifications to functionalities to be provided (ENTSO-E, 2019). For instance, Chang et al. (2013) solved the unit commitment problem for an islanded ACPS with high penetration of CIGs including constraints on frequency reserves using mixed-integer linear programming. For that, the authors determined the minimum system damping empirically relying on the load-frequency sensitivity index. Moreover, frequency stability constraints have also been proposed in planning and operation studies of large ACPSs, such as optimal power flow problems, by Wen et al. (2016); Abhyankar et al. (2017); Geng et al. (2017);and Nguyen et al. (2019).
For the third limitation, it is reported in the literature that the linearized swing equation may underestimate frequency variations during transients (Caliskan and Tabuada, 2015) and, as a consequence, the required damping of an ACPS ). Accordingly, a certain level of robustness must be considered when sizing an ESS to account for nonlinear effects, especially in low-inertia systems.
Considering this context, the contributions of this work are threefold: 1) It offers an updated literature review of the frequency response of ACPSs, highlighting the different time scales of the frequency-control problem and the main distinctions among traditional systems, MGs and large systems with high penetration of CIGs. 2) Based on the type of frequency control being supplied by a converter-interfaced ESS, it proposes an algebraic method to calculate the rated energy of its energy storage (ES) devices and the rated power of its converters. The proposed method is robust to system nonlinearities and based on parameters typically defined by system operators, industry standards, or network codes. 3) It provides a step-by-step systematic procedure to size the main components of hybrid ESSs independently from the technologies used in the ES devices and requiring knowledge of few ACPS parameters. angular frequency ω s [rad s −1 ]. The rotating masses of all synchronous generators and motors connected to the ACPS are represented by an equivalent moment of inertia J. On the driving end of the shaft, all generators deliver energy to the flywheel via a torque T G , whereas the consumers remove energy through T L . The natural and controlled damping of the system is represented by a coefficient B.
Equation 1 is obtained by applying Newton's second law of motion to this simplified flywheel model. The moment of inertia J(t, ω) is in kg m 2 , the damping coefficient B(t, ω) is in Nm s rad −1 , the average (center of inertia) angular speed ω is in rad s −1 , and the equivalent torques T G (t, ω) and T L (t, ω) are in Nm: The representation of an ACPS as an equivalent rotating mass and Eq. 1, also referred to as the swing equation, was already applied in the interwar period by Doherty and Nickle (1927) and reported in many classical power systems books such as Concordia (1951); Grainger and Stevenson (1994); Kimbark (1995); Kundur et al. (1994); and Machowski et al. (2008). Moreover, limitations of this model have been discussed in the last 40 years (Tavora and Smith, 1972;Caliskan and Tabuada, 2015). Mainly, a proper transient analysis of an ACPS must include voltage dynamics, which requires very detailed models and knowledge of the network topology and characteristics, time delays of controllers, and so on (Dörfler and Bullo, 2012). This level of detail is often not available during the planning phases of ACPSs and, still today, the swing equation model is a useful concept to evaluate the frequency response in the early design of a project (Delille et al., 2012;Egido et al., 2015;Riboldi et al., 2020) or in operation planning (Chang et al., 2013;Ahmadi and Ghasemi, 2014;Wen et al., 2016).
It is convenient to normalize and express the balance of torques in Eq. 1 as a balance of power. The normalization starts by dividing Eq. 1 by the rated apparent power of the system S b [VA], whereas the balance of power requires a multiplication by the angular frequency ω, as shown in the following equation: The above equation contains two variables that are not yet normalized, namely, ω and _ ω. The normalization can be performed by introducing an equivalent inertia constant M(t, ω) J(t, ω)ω 2 s /S b in s and a damping coefficient D(t, ω) B(t, ω)ω 2 s /S b in pu. Furthermore, one can obtain a state-space representation by defining the state x ω/ω s , as in the following equation, where u(t, x) and w(t, x) are the normalized power generation P G /S b and power consumption P L /S b from Eq. 2: The dynamics from Eq. 3 is better understood when rearranging it and defining a state centered at the rated angular frequency, i.e.,x x − 1, which results in the following equation: When inspecting Eq. 4 and assuming that D(t,x) > 0 and M(t,x) > 0, it becomes clear thatx 0 (i.e., ω ω s ) is an equilibrium point of the system whenever there is balance between power generation and consumption (i.e., u(t,x) w(t,x)). Moreover, the dynamics ofx are governed by three terms: M(t,x), D(t,x), and u(t,x) − w(t,x). Each of them is affected by the strategies for frequency control in ACPSs, namely, inertial, primary, and secondary control.
In traditional interconnected ACPSs with high inertia (M > 10 s) and centralized power generation and dispatch, these control strategies are implemented as follows: • Inertial control is physically embedded in SMs because their rotors are flywheels providing the inertial effect required to oppose frequency variations. In other words, M(t,x) increases whenever a SM is directly connected to the power system. Conversely, it reduces if a SM is disconnected. The inertial control is offered by both generators and motors with a practically instantaneous reaction time, as the rotor of a SM is electromagnetically coupled to the ACPS. • Primary control is offered by generators or loads sensing frequency deviations from the rated value and automatically adjusting their active power accordingly. This control scheme is known as frequency-droop control (IEEE, 2018a) or frequency sensitivity mode (FSM) (EU Commission Regulation, 2016). The slope of the FSM curve (solid black line) shown in Figure 1 represents the value of D(t,x). Note that, for a specific generator, the damping coefficient D(t,x) is equal to zero within the deadband (solid orange line), if the power reaches the maximum level (solid teal line), or if it reaches a minimum level (solid violet line). The primary control FIGURE 1 | Frequency droop, the main mechanism for primary frequency control.
Frontiers in Energy Research | www.frontiersin.org May 2021 | Volume 9 | Article 649200 reaction time is in the order of seconds, and it is directly connected to the actuation delay of turbines and their governors (Eto et al., 2018;ENTSO-E, 2019). In Europe, the set of generators and loads offering primary control is called frequency containment reserves (FCRs) (EU Commission Regulation, 2017). • Secondary control is provided by a central controller typically in a dispatch center and requires communication infrastructure. When a frequency deviation is detected in the system and after a pre-defined time delay, this controller remotely changes the active power setpoint of generators or loads to match the power demand, i.e., make u(t,x) w(t,x). This process can be done by an automatic controller or manually by an operator. In general, the secondary control reaction time is in the order of minutes. In Europe, the set of generators and loads offering secondary control is called frequency restoration reserves (FRRs) (EU Commission Regulation, 2017).
In MGs and ACPSs with high penetration of CIGs, where inertia may be low (M < 5s) and power generation is typically more distributed, the alternatives are the following: • Inertial control is usually implemented in grid-forming units (Vandoorn et al., 2013) using virtual inertia emulation (D'Arco and Suul, 2013;Fang et al., 2019). In this case, the value of M(t,x) is a parameter of the inertia emulator. The inertial control reaction time is not instantaneous and will depend heavily on the frequency measurement algorithm and filtering techniques applied (Marchgraber et al., 2020). Furthermore, it may consume part of FCRs when activated, as grid-forming units typically provide primary control (ENTSO-E, 2019). In Europe, the set of CIGs offering inertial control is called fast frequency reserves (FFRs) (ENTSO-E, 2019). • Primary control is provided by grid-forming and gridfollowing units using the frequency-droop mechanism (Vandoorn et al., 2013) akin to interconnected ACPSs. However, the reaction time is a fraction of a second because the bandwidth of a CIG controller is at least one order of magnitude larger than that of traditional turbine governors and motor drives (Fang et al., 2019). • Secondary control is provided by grid-following units (Vandoorn et al., 2013). Considering that a MG may contain a large number of small units, manual operation can become unfeasible and automatic dispatch coordinated by a central unit, such as a MG controller, may be necessary. The dynamic behavior of the average system frequency after an active power imbalance is similar for high-and low-inertia ACPSs, despite their differences, and can be divided in three periods (Eto et al., 2018): 1. Arrest: It starts immediately after the imbalance occurs.
If there is lack of generation (u < w), the frequency will decrease until it reaches its minimum value (nadir). If there is excess of generation (u > w), the frequency will increase until it reaches its maximum value (zenith). At first, most of the balancing power P a required to stabilize the system is provided by the inertial control. Then, primary controllers gradually take over P a as the absolute value of the frequency deviationx increases. Important metrics of this period are the rate of change of frequency (RoCoF) and the total time required to reach the nadir/zenith t a . 2. Rebound: It starts immediately after the nadir/zenith is reached. During this period, the primary control is fully activated and will bring the frequency to a new equilibrium condition. This settling point is below the rated value when u < w and above the rated value when u > w. In general, the balancing power P a is provided only by the primary control. However, the inertial control may work against the frequency restoration, as the sign of the frequency derivative can be inverted. In SMs, this negative effect is counteracted by adding damper windings in the rotor (Kundur et al., 1994). The same result can be obtained in CIGs by applying adaptive virtual inertia emulation (Fang et al., 2019). One of the important metrics of this period is the settling time t b , i.e., the total time required to reach the settling point. 3. Recovery: It starts after the settling point is reached and secondary control is activated. Primary control does not have the capacity to restore the frequency to its rated value after an imbalance. Hence, the system frequency remains at the settling point until the secondary control is activated. In traditional high-inertia systems, the frequency is often restored to its rated value slowly due to practical limitations and to avoid counteraction of inertial control. However, when secondary control is fast, the rebound period can be considerably shortened and even eliminated [i.e., t a t b andx(t a ) x(t b )]. In the FIGURE 2 | Three periods of frequency variation (arrest, rebound, and recovery) and control actions (inertial, primary, and secondary) following a perturbation caused by lack of generation.
Frontiers in Energy Research | www.frontiersin.org May 2021 | Volume 9 | Article 649200 recovery period, the primary control is still active, but the secondary control gradually takes over the balancing power P a , until the balance u(t) w(t) is restored. One of the important metrics of this period is the recovery time t c , i.e., the total time required to reestablish the rated frequency. Figure 2 illustrates the three control actions and the three periods following a perturbation caused by lack of generation. Even though the three periods following an active power imbalance are similar for both high-and low-inertia ACPSs, their energy management strategies for frequency control may differ considerably.
During the arrest period, a high-inertia system relies on the rotating masses of SMs as their main energy buffer. In other words, the kinetic energy is drained from or stored into the rotor of SMs limiting the RoCoF and bounding the nadir or zenith. This energy exchange happens "automatically" without any dedicated power or control equipment because the rotor of an SM is electromagnetically coupled to its stator and, hence, the ACPS. For low-inertia systems, on the contrary, the energy buffer formed by rotating masses may not be large enough to guarantee the stable operation after a large power imbalance. In such cases, CIGs must participate as FFRs and support the system by either supplying or absorbing energy during the arrest period. The dc-link capacitor of CIGs could be considered an obvious candidate for storing the additional FFR energy. However, for power systems applications in the MW range, the required capacitance or voltage values become so high such that this solution becomes unfeasible with current technology. Therefore, an additional ESS must be sized specifically for this purpose (Milano et al., 2018).
As mentioned earlier, primary reserves are responsible for bringing the frequency from its extreme values to an acceptable settling point during the rebound phase. In traditional highinertia systems, some generators are selected to operate with spare up and down power capacity and form FCRs. Commonly, those are dispatchable and fast-acting generating units, such as those in gas and hydropower plants, and have a large energy buffer in the form of chemical or potential energy. However, low-inertia systems may not have the necessary power or energy reserves for primary frequency control. This is because CIGs are typically connected to renewable energy sources operating in maximum power point tracking. Those have no available power up capacity and have limited down capacity. Moreover, as is the case with FFRs, the dc-link capacitor of CIGs is not designed to store the energy amount required by FCRs. In summary, an ESS must be sized to provide the energy and power capacity demanded by FCRs in low-inertia systems.
The main goal of this paper is, thus, establishing a procedure for sizing an ESS's power and energy capacities according to its expected use (inertial control or FFRs, primary control or FCRs, or both) based on parameters that are 1) typically defined by system operators, industry standards, or network codes, 2) independent of the energy storage technology, and 3) robust to system nonlinearities. It is worth mentioning, though, that sizing the ESS for secondary control or FRRs is outside the scope of this paper. In addition, the procedure presented in the following sections assumes that a thorough stability analysis was carried out beforehand in the ACPS where the ESS will perform frequency control. This stability analysis must include measurement and actuation time delays, nonlinearities and, as a result, select or at least restrict the possible values of M and D. This type of assessment is typically a task of the transmission system operator in large and regulated ACPSs. However, this responsibility might be debatable in smaller and unregulated systems such as MGs. A detailed discussion about this topic is outside the scope of this paper, but it is worth highlighting that if ε max < M/D, where ε max is the maximum time delay of all active power sources in an ACPS, then this system can be frequency stable in the presence of time delays. For details and proofs, refer to appendix B of Alves et al. (2020) and Dörfler and Bullo (2012). However, this single criterion does not guarantee global stability of the ACPS, and other aspects such as voltage, load-angle, and phase-locked loop stability must be carefully investigated.
Additional information about frequency control in highinertia ACPSs is discussed by Kundur et al. (1994); Machowski et al. (2008) Lastly, tertiary control and generator rescheduling are further alternatives to frequency control. They are long-term, slowresponse strategies based on communication infrastructure and/ or electricity markets that are outside the scope of this paper. A throughout description of the European approach to these strategies is given by EU Commission Regulation (2015), while the North American approach is summarized by Eto et al. (2018).

Sizing of the Converter-Interfaced ESS Elements
This section includes the proposed procedure to size the energy capacity of the ES device and the rated power of an ES converter providing inertial or primary frequency control. Based on this initial estimation and selected references from the literature, it describes a methodology to dimension the remaining ESS power unit components. Figure 3 presents an overview of the main elements of a converter-interfaced ESS, namely, the power and control units. In general terms, the power unit can be further subdivided into the ES device and its converter, the dc link, and the grid converter and its LC filter.

The ES Device and Its Converter
This section proposes a method to calculate the ES converter rated power P es [W] and the ES device storage capacity E es [J] according to the type of frequency control being provided. These variables are chosen as the starting point of the sizing procedure because they are the key drivers of the ESS equipment cost (Akhil et al., 2015).
The calculation of P es and E es starts by categorizing the terms of Eq. 3 in three sub-components according to the type of frequency control required to keep the power balance in the ACPS, as in the following equation, where p iner , p pri , and p sec are, respectively, the amount of power in pu required for inertial, primary, and secondary control: Using this framework, algebraic expressions of P es and E es can be obtained with the following assumptions: 1. Constant inertia and damping during the interval 0 ≤ t < t c : M(t,x) and D(t,x) are constant throughout the power imbalance. 2. Primary control linearly takes over the inertial control during the interval 0 ≤ t < t a : During the arrest period, the primary control linearly takes over the balancing power from the inertial control and the contributions of the secondary control are minimal compared to the overall balancing power required. Possible time delays of controllers are ignored for the energy calculations. In addition, the RoCoF upper bound during this period can be approximated by _ x 0a x(t a )/t a . 3. The frequency nadir and zenith are bounded: The frequency nadir and zenith are enforced by either a proper combination of inertia, damping, and primary control delays or the actuation of extreme control actions such as automatic generation curtailment or load shedding (EU Commission Regulation, 2017;Eto et al., 2018). In this case, the normalized angular speed errorx(t a ) is upper and lower bounded byx max tr andx min tr , respectively. In other words, if u < w, then the frequency nadir is greater thanx min tr . Conversely, if u > w, then the frequency zenith is lower thañ x max tr . Hence, if the transient frequency limit is defined as r tr max(x max tr ,x min tr ), then x(t a ) ≤ r tr . 4. Only primary control is active during the interval t a ≤ t < t b : During the rebound period, only the primary control is active and the contributions of the inertial control and secondary control are minimal compared to the overall balancing power required. Moreover, the RoCoF lower bound during this period can be approximated by _ x ab (x(t b ) − x(t a ))/(t b − t a ). 5. The settling point is bounded: After a power imbalance, the primary control is capable of driving the angular frequency back from the frequency zenith or nadir to within an acceptable steady-state frequency deviation r ss . The normalized angular speed error at the settling pointx(t b ) is upper and lower bounded byx max ss andx min ss , respectively. In ss . Hence, if the steady-state frequency limit is defined as r ss max(x max ss ,x min ss ), then x(t b ) ≤ r ss . 6. Secondary control linearly takes over during the interval t b ≤ t < t c : During the recovery period, the secondary control linearly takes over the balancing power from the primary control and the contributions of the inertial control are minimal. In addition, the RoCoF lower bound during this period can be approximated by _ Using assumption 2, P es can be defined as the maximum between the components p iner and p pri in Eq. 5, as presented in Eq. 6. Using assumption 3, the bounds for p iner are given by Eq. 7. However, obtaining a bound to p pri requires an involved mathematical analysis, which is described by Alves et al. (2020), and Eq. 8 presents only the main result of this analysis: P es S b max p iner es , p pri es , P pri es ≤ S b Dr ss (1 − r tr ).
The energy required by the inertial control E iner and the primary control E pri can be calculated as the time integral of their power components defined in Eq. 2, as seen in Eq. 9 and Eq. 10. To solve these integrals analytically, it is necessary to 1) remember that _ x _ x dx/dt and 2) use assumptions 2, 4, and 6. In Eqs. 10-13, the terms E arr pri , E reb pri , and E rec pri are, respectively, the energy required by the primary control during the arrest, rebound, and recovery periods: To define the worst-case value for E es , the bounds defined in assumptions 3 and 5 can be applied in Eqs. 9, 11-13, leading to the following equations: In short, a bound for P es and the rated power of the ES converter can be obtained with Eqs. 6-8, whereas Eqs. 14-19 can be employed for bounding E es and calculating the rated capacity of the ES device.
Note that r tr , r ss , t a , t b , and t c are typically defined in industry standards and network codes such as IEEE (2018a), and EU Commission Regulation, 2016. Likewise, boundaries for M, _ x , and D can be specified based on system operator requirements or power system stability and protection coordination studies. The latter can also be used to define less conservative values ofx(t a ) andx(t b ). In doing so, Eqs. 9, 10 can be applied to calculate E es . Not least, the use of normalized terms M and D allows system operators to specify inertia and damping requirements at the system level without knowing the installed power of a specific subsystem or installation.

The dc Link
The main goal of this section is to define the rated capacitance C dc [F] of the dc link. The dc-link capacitor is a required energy source that provides balance between the ES converter and the grid converter, allowing them to be decoupled and controlled independently. Its capacitance is defined by the following equation (Malesani et al., 1995) where U dc [V] is the dc-link rated voltage and ΔU max dc is its maximum tolerable variation [V]; T r [s] represents the total time delay of the U dc controller; and ΔP max dc is the maximum power variation in the dc link [W]: Typically, U dc and ΔU max dc are parameters associated with 1) the capacitor material and technology (Sarjeant et al., 2001), 2) the voltage class of the power switch (Infineon Technologies, 2020), and 3) network codes and requirements because variations in U dc will influence the maximum voltage that can be delivered by the grid converter.
The value of T r will be affected by the parameters of the U dc controller. If the latter is modeled as a transport delay, an estimate is given by the following equation where T m , T c , and T a are the U dc measurement, controller, and actuator (i.e., the ES converter) delays, respectively: Finally, ΔP max dc can be approximated by the active power step applied immediately after the inertial or primary controllers leave their deadband zones, as seen in Eqs. 23, 24, where x iner DB and x pri DB [pu] are the deadband bounds of the inertial and primary control, respectively: In the approximation of Eqs. 22-24, it is assumed thatx is a smooth function. However, this assumption will not hold in an ACPS where all generators and loads are interfaced by converters because M → 0 in Eq. 4 and the model and analysis presented in section 2.2.1 will no longer be valid.

The Grid Converter and Its LC Filter
This section discusses briefly the sizing of the grid converter and recommends references for the design of the LC filter. Figure 4 shows a schematic representation of the grid converter, the dc link, and the LC filter.
Contractual and grid code requirements have to be taken into consideration when defining the rated apparent power of the grid converter. Among those requirements, one can mention minimum reactive power injection capacity, short-term overload, and low-voltage ride through capability (EU Commission Regulation, 2016; IEEE, 2018a). However, a relatively simple and common practice in the industry is adopted in this paper. It uses a defined or required power factor λ. The rated apparent power of the converter, S gc [VA], is then calculated as in the following equation: This practice generally limits the equipment size and cost. Nevertheless, it does not necessarily guarantee unsaturated operation for systems with high penetration of CIGs and MGs. In such cases, the grid converter sizing may have to Frontiers in Energy Research | www.frontiersin.org May 2021 | Volume 9 | Article 649200 consider the compensation of harmonic distortions and the definition of S gc will become more involved. More information about this topic can be obtained in Tenti et al. (2014). Once S gc is defined, the design of the grid converter's LC filter can start. For grid-connected converters, the LCL configuration is preferred as it limits the influence of the switching frequency harmonics in other equipment and reduces the filter size and cost (Beres et al., 2016b). Typically, the second inductance of the LCL configuration is provided by the series inductance of a step-up transformer between the ESS and the grid. The design of an LCL filter is an iterative procedure well documented in the literature, see Erickson and Maksimović, 2001;Liserre et al., 2004;Peña-Alzola et al., 2013;and Beres et al., 2016b. It can be summarized in the following steps: 1. Calculate the converter side inductance L gc based on the desired maximum current ripple ΔI gca on the ac side of the converter, its switching frequency f sw , and the dc-link voltage V dc . 2. Choose the step-up transformer series inductance L g upperbounding the total inductance L T L gc + L g to avoid excessive voltage drop across the inductors. Note that L g is usually higher than 0.04 pu for medium-voltage transformers (ABB, 2016;Siemens, 2017). When 5 kHz ≤ f sw ≤ 10 kHz, it is usually possible to adopt L T ≤ 0.1 pu. On the contrary, a lower f sw may demand a higher L T . 3. Select the filter capacitance C c upper-bounding its value to 0.05 pu (with converter rated power and voltage as the base). 4. Check if the filter resonance frequency f res lies between 0.2 and 0.5 times f sw . 5. Calculate the filter damping resistance R c based on the optimal quality factor Q and maximum power losses, limiting it to R min c 1/(10π f res C c ) to avoid instabilities.
For that, the following equations can be used as guidelines: where L b Z b /ω s and Z b U 2 2n /S gc are the base inductance and impedance of the grid-side converter, in which U 2n is the rated line voltage on the low-voltage side of the step-up transformer.
It is worth emphasizing that the design of an LCL filter is iterative. Failure to comply with requirements implies restarting the whole process and changing the initial assumptions, i.e., ΔI gca , f sw , and U dc . Moreover, additional optimization objectives and constraints may require the use of high-order filters or active damping. These topics are outside the scope of this paper but can be further explored in Jalili and Bernet, 2009;Channegowda and John, 2010;Rockhill et al., 2011;Muhlethaler et al., 2013;Beres et al., 2016a;and Xu and Xie, 2018. Finally, alternative topologies to the one presented in Figure 3 and Figure 4 are possible. Nonetheless, the principles discussed earlier in this section can also be applied to more complex solutions. For instance, ES devices using different technologies may be connected in parallel, such as ultracapacitors and batteries. The hybridization is possible because the requirements for each type of frequency control (inertial and primary) are set independently, as discussed in section 2.2.1. This also allows control strategies to operate in parallel and ES converters to share the same dc link, grid converter, and LC filter in a hybrid solution, which may help to reduce equipment costs, volume, and weight (Rocabert et al., 2019). Not least, ESSs may require more complex and robust configurations for the grid converter and consider aspects such as operating costs, efficiency, reliability, power quality, and others, as discussed by Xavier et al. (2019). However, note that these considerations will not affect the rated energy of ES devices nor the rated power of their converters, which are the variables being focused in the procedure presented in this paper. This section presents a case study with numerical examples demonstrating how the method and equations presented in the previous section are applied to size the main components of a hybrid, converter-interfaced ESS supplying primary and secondary frequency control to an ACPS, supported by inertial control of traditional synchronous generators.

Case Study: A Wind-Powered Offshore Platform in the North Sea
The system used as a reference is depicted in Figure 5 and represents an isolated ACPS of an offshore oil and gas platform in the North Sea. This installation operates at 60 Hz (ω s 377 rad s −1 ) and is equipped with two turbo-generators composed of an LM2500+ gas turbine from GE and an AMS 1250LG synchronous generator from ABB. Their combined active power is 70 MW, which is the value adopted for S b . The normalized moment of inertia for these turbo-generators M GT is equal to 5.1 s. This offshore installation must comply with IEC (2019), which requires equipment to withstand frequency variations of up to 5% continuously. However, it is a goal to keep frequency variations below 2% to limit excessive overheating of electrical machines and transformers. Therefore, r ss 0.02 pu and r tr 0.05 pu.
An initial techno-economical study of this installation (Riboldi et al., 2020) suggests that a reduction of up to 30% of its annual CO 2 emissions is possible when connecting it to a 12 MW offshore wind farm and employing an ESS based on 4 MW of proton exchange membrane (PEM) fuel cells and 6 MW of PEM electrolyzers. The main goal of this hydrogen-based ESS is to stabilize the wind farm output, allowing turbo-generators to operate with optimized setpoints and, hence, attaining higher efficiencies and lower emissions. From a frequency-control perspective, the turbogenerators provide inertial control and the ESS is responsible for primary and secondary control in normal operational conditions. To limit the size of the ESS, the turbo-generators contribute with additional primary and secondary control when the ESS saturates during occasional large-frequency excursions.
Nevertheless, a high number of start-stop and load-change cycles are known to be the main drivers of PEM devices' deterioration and performance decay (Pei et al., 2008). To avoid that, PEM fuel cells and electrolyzers are assigned to secondary control only and their load ramp rate is restricted to 0-100% in 120 s. The latter is also the value assumed for the recovery period (t c − t b ). Hence, an additional ES device must be considered to provide primary frequency control and to allow operation of the PEM fuel cells and electrolyzers in more favorable conditions. Further on the topic primary control, it is important to mention that electric loads of this platform are divided into two groups: fixed (P fix 37 MW) and flexible (P flex 7.6 MW). The first group represents equipment that cannot be influenced by the energy management system (EMS) because changes in their setpoint are not possible or would affect negatively the oil and gas extraction and processing. Meanwhile, the second group represents loads whose setpoint can be temporarily raised or lowered by the EMS or primary control. An example of flexible load is the water injection system, which is responsible to maintain overall and hydrostatic reservoir pressures and force the oil toward the production wells (Devold, 2013). This type of load is flexible because reservoir pressures can vary within a certain range without considerable impacts on production. In addition, this system time constant is large (minutes) when compared to the electrical system dynamics (seconds). This concept is explored in detail by DNV-GL (2016); Sanchez et al. (2017); and Alves et al. (2019).
Hence, the water injection system can also be considered a short-term ESS that is capable of offering primary frequency control to the ACPS. When assuming that 20% of the installed flexible load can be used for primary frequency control, the following damping coefficient is obtained:   Finally, the load demand was obtained from the platform's supervisory control and data acquisition (SCADA) system for one representative week with a sampling period of 1 s. Figure 6 presents the histogram of this dataset, which is fit by a normal distribution when ignoring outliers below 0.6 pu. The distribution gives a load variation of 0.0428 pu or 3 MW in normal operational conditions with 99.9% of probability, which should be covered by primary control. Using Eq. 8, Thus, the ES device responsible for primary control should provide the following additional damping: D es D min − D flex 1.16 pu. With these parameters, initial simulations of the case study installation for a 3 MW load perturbation give an arrest period (t a − t 0 ) 25 s and a rebound period (t b − t a ) 15 s. Table 1 presents a summary of the installation parameters and the ESS requirements listed above.

Sizing of the Energy Storage System
Applying Eqs. 8, 16 using the values from Table 1, the rated power P es1 and energy capacity E es1 of the ES device providing primary control can be defined as P es1 1.54 MW and E es1 113.6 MJ or 31.56 kWh. Note, however, that the primary control must be bidirectional, i.e., it must compensate either lack or excess of power in the system. Therefore, a 50% state of charge for the ESS in normal operation should be considered. Hence, E es1 113.6/0.5 227.2 MJ or 63.12 kWh.
The most suitable ES device is chosen based on the calculated P es1 and E es1 , on the parameters in Table 1, and on a technoeconomical evaluation. The latter is not covered in this paper. It is assumed, however, that a commercial lithium-ion system such as Saft Intensium Max+ 20P (Saft, 2017) is selected. This system incorporates the ES device and converter in one assembly with two regulated dc output voltages of 771 ± 96 V that can be connected in series or parallel and losses of about 25 kW at rated conditions. Considering the requirements of commercial grid converters such as Siemens SINACON PV (Siemens, 2020), the ES device is assumed to have its two outputs connected in series and the following characteristics: U dc 1500 V, ΔU max dc 150 V, P es1 losses 25 kW, and T r 2.1 ms (one-eighth of a grid cycle).
To define ΔP max dc , the value x pri DB 0.0025 pu or 150 mHz is obtained from industry standards or grid codes such as IEEE (2018a), and EU Commission Regulation, 2016. Then, ΔP max dc 360.5 kW is attained when applying Eqs. 22, 24. With these values defined, the dc-link capacitor is calculated using Eq. 20 and C dc ≥ 1.7 mF is retrieved.
The next step in the procedure is defining S gc . Assuming that all ES devices share the same dc link and that the fuel cell and electrolyzer do not operate simultaneously, the active power bound will be defined by P ELY + P es1 + P es1 losses 7.57 MW, where P ELY denotes the electrolyzer rated power. To have a buffer for the grid converter and LC filter losses, a safety margin of 2% is added to this value resulting in P gc 7.72 MW. Additionally, λ 0.8 is adopted to limit the size of the grid converter. It then follows that S gc 9.65 MVA.
The final step is calculating the components of the LC filter. For the sake of brevity, this design is not presented in this paper. The recommended procedure and references are listed in section 2.2.3. Nonetheless, the algorithm for calculating the LC filter is available for the reader in Alves (2021). The grid converter's switching frequency is adopted as f sw 5.4 kHz and its maximum current ripple as ΔI gca 0.25 pu. This results in the following values for the filter components: L gc 5.61 μH, L g 6.92 μH, C c 2.5 mF, and R c 0.189 mΩ. Refer to Figure 4 for the placement of each filter element. It is worth mentioning that R c yields an over-damped characteristic at the filter's resonance frequency, which is f res 1.80 kHz or 0.334 times f sw . Table 2 presents a summary of the parameters obtained above for the ESS providing primary control in the case study installation.

Sizing Validation
To validate the calculations presented in section 3.2, a surrogate model of the case study installation was implemented in MATLAB Simulink R2018a. It has the level of details required to represent the frequency dynamics of the installation and to validate the proposed sizing of the ES device responsible for primary frequency control. It includes all main elements represented in Figure 5, namely, the turbogenerators, the fixed and flexible loads, the wind farm and 120 s -- its transmission line, the ESS, and the EMS. Figure 7 gives an overview of these elements in Simulink. The model was implemented using blocks of the Simscape Electrical Specialized Power Systems toolbox complemented by an open library developed by the authors (Alves, 2020). The latter includes a generalized nonlinear droop controller that is presented in Figure 8. This block is used as the main primary frequency controller in the turbo-generators, ESSs, and flexible load subsystems with their parameters as presented in Table 3. Moreover, the secondary control is implemented in the EMS subsystem using a nonlinear integral controller from the open library with anti-windup and hold functionalities.  To minimize CO 2 emissions, the EMS gives priority for changes in the ESS setpoint when the secondary control is active. The redispatch of turbo-generators happens only when the limits of fuel cells or electrolyzers are reached, and those may be considered a supplementary FRR.
It should be emphasized that it is not the goal of this model to validate the design of the grid converter, its controllers, or its LC filter nor to evaluate harmonics or possible power quality problems. Moreover, the validation of the fuel cell and electrolyzer stack size and their required H 2 storage is presented by Riboldi et al. (2021). For the sake of brevity, the validation model is not described further in this section. However, the interested reader can inspect it and find all necessary details, parameters, and simulation files to reproduce the results presented below in Alves (2021).
To create the power imbalance required for checking the ESS sizing, a load of 3 MW (step load) is connected to the system at t 0 2 s. As presented earlier in section 3.1, this is the expected maximum load variation under normal operational conditions with 99.9% of probability. Figure 9 shows the results of two simulations of the case study behavior during a load increase of 3 MW: Case 1 does not include the ESS in the installation, while Case 2 does include it.
From a frequency-control standpoint, a closer look at Figures  9A,B reveals that the angular speed behaves similarly in both cases, i.e., with and without the ESS. The minor deviations among the cases are explained by the different deadbands and actuation delays of the turbo-generator and the ESS. Indeed, the smaller deadband and actuation delay of the converter-interfaced ESS make its performance slightly superior, achieving a higher nadir (0.9797 pu) than the turbine governor (0.9793 pu) and a smaller steady-state error (0.29 vs. 0.39%) after secondary control is deactivated. This better performance is reflected in the results seen in Figures 9E,F, which show a marginal reduction of the flexible-load active power deviation from its original setpoint while the primary control is active. Foremost, Figures 9C,D corroborate the idea proposed in section 3.2, i.e., a properly sized battery ESS would allow turbo-generators to operate at a constant setpoint when a 3 MW load variation happens suddenly while respecting the load ramp-rate limit of the PEM fuel cell, as shown in Figures 9E,F. From a sizing perspective, the ES device responsible for primary control (battery system) delivered a peak active power of 0.0196 pu or 1.37 MW and consumed 29.2 kWh of energy. The latter was calculated by trapezoidal numerical integration of the curve ES1 in Figure 9E using a step of 100 ms. When compared to the calculated values (1.54 kWh and 31.56 kWh) from section 3.2, the proposed procedure oversized the battery system's active power by 13% and its energy by 8%. Nonetheless, as opposed to the simulation model used for validation, the proposed procedure 1) requires knowledge of very few ACPS parameters and 2) relies only on algebraic equations, which are easy to integrate in optimization algorithms typically necessary for technoeconomical evaluation of ESSs.
At this point, it is important to recap that the energy of the ES device responsible for primary control is dependent on 1) the damping D es provided, 2) the frequency limits r ss and r tr , and 3) the duration of the arrest (t a − t 0 ), rebound (t b − t a ), and recovery (t c − t b ) periods, as seen in Eqs. 17-19. Thus, when defining these variables, it is critical to evaluate if the ESS must provide frequency control uninterruptedly during high-impact, low-probability events. A complete disconnection of the wind farm under full production (12 MW) is an example of such event for the case study presented. Figure 10 presents the results of two simulations of the case study behavior during this condition: Case 3 does not include the ESS in the installation, while Case 4 does. It is important to highlight that, for Case 3, the turbo-generator May 2021 | Volume 9 | Article 649200 permanent droop must be increased to guarantee frequency stability and display the same dynamics of Case 4, as seen in Table 3. Figures 10A,C Figure 10B suggests that the angular speed behaves similarly with and without the ESS during the arrest and rebound periods. However, a closer look at Figure 10A reveals that the dynamics of the recovery period in Cases 3 and 4 are distinct. This happens because the secondary controller acts differently in these two simulations.
In Case 3, the turbo-generator is the sole contributor to the FRR, and as seen in Figure 10C, its active power increases exponentially in the recovery period. As a consequence, the angular speed deviation decreases exponentially, until it reaches the deadband of the droop controller.
In Case 4, there are two sources for the FRR: the hydrogenbased ESS (preferential) and the turbo-generator (supplementary). Hence, the secondary controller ramps up the PEM fuel cell (ES2) until it reaches its rated power, as seen in Figure 10E. At the same time, the angular speed deviation decreases, and as a consequence, the droop controller reduces the turbo-generator active power, as shown in Figures 10A,C. When the ES2 limit is hit, the secondary controller starts increasing the turbo-generator active power. However, the latter is also reduced by its droop controller because the angular speed is still decreasing. These adversarial contributions continue until the deadband of the turbo-generator droop controller is reached. After that, only the secondary controller is active and the angular speed deviation decreases exponentially, until it reaches the deadband of the ES2 droop controller.
From a sizing frame of reference, the peak active power delivered by the battery system was 1.54 MW and the energy supplied was 95.8 kWh. The peak active power was limited by the nonlinear droop controller and matches the value defined in section 3.2. On the contrary, the energy obtained in the simulation is more than three times larger than the calculated value. Naturally, this happens because the parameters of the 3 and 12 MW load-increase events are disparate.
By inspection of Figure 10A, one will note that the frequency limits r ss 0.02 and r tr 0.05 were obeyed. However, the duration of the arrest, rebound, and recovery periods was approximately 8 s, 120 s, and 165 s. When substituting these new values in Eqs. 17-19, the energy obtained is 113.3 kWh, i.e., the proposed procedure oversizes the battery system's energy by about 18% when compared to the simulation results. This shows that the proposed procedure can produce correct upper bounds for the ESS power and energy even when large disturbances and nonlinearities are considered.

CONCLUSIONS
This paper reviewed the frequency response theory in ac power systems, highlighting the different time periods (arrest, rebound, recovery) and control actions (inertial, primary, secondary) of the frequency-control problem. It also highlighted the main distinctions among traditional high-inertia systems relying on synchronous machines and low-inertia systems such as those with high penetration of converter-interfaced generation and microgrids. Grounded on these concepts and some assumptions, it derived analytical equations to rate the energy capacity and active power required by an energy storage system for providing inertial and primary control to an ac power system. The proposed equations rely on parameters typically defined by system operators, industry standards, or network codes, namely, the steady-state and transient frequency ranges, the maximum rate of change of frequency, and the desired equivalent moment of inertia and damping coefficient. Note that these parameters are independent of the technologies or topologies used in the energy storage devices and converters.
Using these results, this work also provided a step-by-step systematic procedure to initially size the remaining components of a converter-interfaced hybrid energy storage system connected to three-phase ac systems, i.e., the shared dc link and the grid converter and its LC filter. Finally, a case study of a wind-powered oil and gas platform in the North Sea was presented. It demonstrated with numerical examples how the proposed equations and the step-by-step procedure can be applied in a practical problem, where simulations in MATLAB Simulink validated the algebraic calculations and showed they slightly oversize energy storage devices. Not least, the case study demonstrated that the proposed method allows the system designer to take advantage of different energy storage technologies and set specific requirements for each storage device and converter in a hybrid system according to the type of frequency-control action being provided and requirements set by industry standards and grid codes.

DATA AVAILABILITY STATEMENT
The datasets presented in this study can be found in online repositories. The names of the repository/repositories and accession number(s) can be found below: at https://zenodo. org/record/4601067 (doi 10.5281/zenodo.4384697).

AUTHOR CONTRIBUTIONS
EA and ET conceptualized the idea. EA and DM developed the software and performed the formal analysis and investigation. EA developed the methodology, validated the results, curated the data, wrote the original draft, and produced figures and tables. ET acquired the funding, supervised and administrated the project. DM and ET reviewed and edited this paper.