Next Article in Journal
Low-Carbon Economic Dispatch Model for Virtual Power Plants Considering Multi-Type Load Demand Response
Previous Article in Journal
Assessment of the Integration of Photovoltaic Cells with a Heat Pump in a Single-Family House—Energy-Efficiency Research Study Based on Technical Specifications of Devices and Economic Measures
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Optimal Location and Sizing of BESS Systems with Inertia Emulation to Improve Frequency Stability in Low-Inertia Electrical Systems

by
Jorge W. Gonzalez-Sanchez
1,
Jose Aparicio-Ruidiaz
2,
Santiago Bustamante-Mesa
2,* and
Juan D. Velásquez-Gómez
2
1
Transmission and Distribution of Electric Energy Research Group (TyD), Pontifical Bolivarian University, Medellín 050031, Colombia
2
Department of Electrical Engineering, Faculty of Engineering, Pascual Bravo University Institution, Calle 73 No. 73A-226, Medellín 050036, Colombia
*
Author to whom correspondence should be addressed.
Energies 2025, 18(24), 6552; https://doi.org/10.3390/en18246552
Submission received: 11 November 2025 / Revised: 10 December 2025 / Accepted: 11 December 2025 / Published: 15 December 2025
(This article belongs to the Section F1: Electrical Power System)

Abstract

Traditionally, the dynamics of power systems have been governed by synchronous generators and their associated rotating masses. However, with the increasing penetration of renewable generation and power electronic interfaces, the inertia contributed by rotating machines has been gradually displaced. This makes it imperative to study alternative elements capable of mitigating the reduction in inertia in modern power systems. This article addresses the problem of optimal sizing and placement of Battery Energy Storage Systems to enhance frequency response in power grids through the application of optimization techniques such as Genetic Algorithms (GA) and Particle Swarm Optimization (PSO). Several inertia scenarios are analyzed, where the algorithms determine the optimal locations for Battery Energy Storage Systems units while minimizing the total installed Battery Energy Storage Systems capacity. As key contributions, this study models Battery Energy Storage Systems units, which emulate inertial responses based on the system’s Rate of Change of Frequency, and evaluates the impact of Battery Energy Storage Systems on frequency stability by analyzing parameters such as the frequency nadir, zenith, and steady-state frequency according to the installed Battery Energy Storage System’s size and location. A comparative analysis of the optimization scenarios shows that the Particle Swarm Optimization algorithm with 50% rotational inertia is the most efficient, requiring the lowest total installed power (277.11 MW). It is followed by the Particle Swarm Optimization algorithm with 100% rotational inertia (285.79 MW) and Genetic Algorithms with 50% rotational inertia (285.57 MW). In contrast, Genetic Algorithms with 25% rotational inertia demand the highest total installed Battery Energy Storage Systems power (307.44 MW), a result directly associated with a significant reduction in system inertia. Overall, an inverse relationship is observed between the available inertia level and the required Battery Energy Storage Systems capacity: the lower the inertia, the greater the power that the Battery Energy Storage Systems must supply to keep the system frequency within acceptable operational limits.

1. Introduction

The increasing penetration of renewable energy sources in electric power systems has posed significant operational challenges, particularly with respect to frequency stability. Technologies such as wind and photovoltaic generation do not provide synchronous inertia to the system, leading to a reduction in effective inertia and, consequently, an increase in the rate of change of frequency (RoCoF) during disturbances. This decline in the system’s ability to withstand frequency variations compromises the security and reliability of power supply, especially in systems with a high share of renewable generation and low inertia.
In this context, battery energy storage systems (BESS) employing inertia emulation strategies have emerged as a viable solution to mitigate the adverse effects of reduced inertia. Through appropriate control of their frequency response, BESS can provide immediate dynamic support, stabilizing frequency in the initial moments following a disturbance and reducing the RoCoF. However, to maximize their technical and economic effectiveness, it is essential to determine their optimal placement and sizing within the power system.
This article addresses the issue of optimal placement and sizing of BESS with inertia emulation to enhance frequency stability in low-inertia power systems. A methodology is proposed based on (specify the specific method, e.g., metaheuristic algorithms, mathematical programming, modal analysis, etc.), which enables the determination of the optimal location and capacity of BESS, considering both technical and economic criteria. Through simulations on a representative test system, the impact of the placement and sizing strategy on frequency stability is evaluated, providing guidelines for the efficient integration of BESS into grids with high penetration of renewable generation.

1.1. Related Works

The integration of BESS into modern power grids has been the focus of numerous studies proposing innovative control strategies and optimization methods to enhance system performance and stability. In ref. [1], a control strategy combining adaptive droop control with an adaptive state of charge (SoC) recovery mechanism for primary frequency regulation (PFR) was presented, improving frequency stability and reducing mechanical stress on conventional generating units. In ref. [2], a hierarchical control scheme was introduced, integrating BESS SoC into frequency regulation through a multilevel strategy, with its effectiveness validated using Hardware-in-the-Loop testing. In ref. [3], a secondary frequency control strategy based on the degree of participation of BESS was proposed, utilizing a fuzzy logic inference system and a quadratic programming algorithm to optimize task allocation. In ref. [4], a load frequency control (LFC) strategy was presented, incorporating detailed dynamic models of wind turbines, HVDC systems, BESS, and synchronous generators, demonstrating significant improvements in frequency stability. In ref. [5], a control strategy for hybrid energy storage systems was developed, integrating BESS and pumped hydro energy storage to enhance PFR in grids with high renewable penetration. Finally, in ref. [6], the role of BESS in providing additional inertial support in grids with high renewable energy penetration was investigated, emphasizing the importance of optimal BESS sizing to balance costs and stability benefits. These studies underscore the fundamental role of BESS in improving frequency regulation and the stability of modern power grids, especially in contexts of high renewable energy penetration.
The integration of BESS in microgrids and isolated systems has been extensively studied, with various control strategies proposed to enhance frequency regulation and system stability. In ref. [7], a control strategy was presented that integrates SoC management with load frequency control in isolated microgrids, using a shifted droop control mechanism that dynamically adjusts BESS operation based on five distinct SoC scenarios, thereby improving system stability and SoC management. In ref. [8], a frequency control strategy for isolated greenhouses was proposed, integrating BESS and Light-Emitting Diode lighting loads, using a two-stage control that combines the fast response of BESS and Light-Emitting Diode lighting loads with frequency restoration via diesel generators. In ref. [9], a multifunctional adaptive control strategy was introduced for energy management and voltage-frequency regulation in isolated microgrids composed of photovoltaic (PV) units, BESS, and hybrid PV/BESS units, integrating decentralized and distributed control for optimal performance. In ref. [10], an integrated multifunctional control scheme was presented for stand-alone BESS in synchronous generator-based microgrids, highlighting the use of a state of charge-based adaptive high-pass filter for frequency regulation and unbalanced load compensation. In ref. [11], a reserve-based frequency support strategy for BESS in isolated residential microgrids was proposed, introducing a reserve control layer within the conventional LFC architecture to improve frequency stability during emergency conditions. Finally, in ref. [12], a control framework for voltage and frequency regulation in weak grids with wind turbines, PV, and BESS was presented, utilizing a fixed-time containment control strategy that enables BESS to simultaneously regulate voltage and frequency while maintaining SoC balance. These studies highlight the importance of advanced and adaptive control strategies for the effective integration of BESS in microgrids and isolated systems, enhancing system stability and efficiency.
The integration of BESS with renewable energy sources has been extensively studied to enhance frequency stability in low-inertia systems. In ref. [13], a methodology was proposed to mitigate over-frequency events through optimal BESS allocation in wind-dominated systems, using a Particle Swarm Optimization-based model. In ref. [14], the role of BESS in improving frequency response in low-inertia, solar-dominated systems was investigated, integrating inertia response and PFR strategies within the traditional LFC framework. In ref. [15], a virtual inertia control approach was presented, incorporating a coordinated SoC recovery mechanism with secondary frequency control of generators, optimizing battery utilization and reducing BESS energy consumption by 36%. In ref. [16], the use of energy storage systems, including superconducting magnetic energy storage and BESS, was explored to improve frequency response in wind-dominated grids, demonstrating that the combination of superconducting magnetic energy storage and BESS reduced system costs by 76.9% compared to BESS-only solutions. In ref. [17], a strategy for optimal BESS sizing and placement in high wind penetration systems was proposed, integrating model predictive control (MPC) for coordinated frequency and voltage regulation. In ref. [18], a coordinated control strategy between variable-speed wind turbines and BESS was investigated to enhance fast frequency response, using a SoC-based adaptive droop control. In ref. [19], a control strategy was presented to mitigate torsional vibrations in doubly-fed induction generators using a BESS-based damper, improving torsional damping and maintaining frequency stability. In ref. [20], a model predictive control MPC-based strategy was developed to enable a hybrid wind farm and BESS unit to provide fast frequency regulation, validated through Hardware-in-the-Loop simulations. Finally, ref. [21] presents a coordinated control strategy for a voltage-source-converter-based high-voltage direct current-connected wind farms with a BESS for providing frequency support.
The optimization of BESS for participation in energy markets and grid stability has been widely explored in various studies. In ref. [22], the economic viability of residential PV-BESS installations was evaluated, highlighting the importance of storage sizing and self-consumption for profitability, particularly in systems with a capacity factor ≥ 18%. In ref. [23], a revenue stacking model was proposed that combines fast frequency regulation with participation in the Italian balancing market, enhancing efficiency and investment returns by 13%. In ref. [24], the financial viability of BESS in households with dynamic electricity contracts in the Netherlands was analyzed, concluding that the gradual phase-out of net metering negatively affects BESS profitability. In ref. [25], a reinforcement learning framework was presented for adaptive BESS scheduling in dynamic markets, demonstrating greater profitability and resilience to price fluctuations compared to traditional methods. In ref. [26], a probabilistic forecasting framework for BESS SoC under primary frequency control was developed, employing multi-attention recurrent neural networks to enhance prediction accuracy and reliability. In ref. [27], a setpoint frequency control method was introduced to integrate renewable energy sources, optimizing BESS operation and reducing grid balancing costs. These studies underscore the crucial role of BESS in improving profitability, grid stability, and the efficient integration of renewable energy into energy markets.
Control strategies for BESS have been essential in improving the stability of power systems. In ref. [28], a real-time optimal control method was presented that enables the simultaneous provision of primary frequency control and local voltage regulation by dynamically adjusting active and reactive power setpoints, with its effectiveness validated on a utility-scale BESS at EPFL, Lausanne. In ref. [29], a self-adaptive control strategy was proposed that classifies disturbances into step and small continuous types, introducing two models to prevent frequency degradation and ensure SoC recovery, demonstrating improvements in frequency stability and long-term economic operation. Meanwhile, ref. [30] developed a contingency reserve assessment framework for fast frequency response across multiple large-scale BESS, using genetic algorithms to optimize reserves and enhance grid resilience under high renewable penetration. As for ref. [31], a methodology was presented to determine the required BESS capacity in the Korean power system to compensate for reduced inertia under high renewable penetration scenarios, highlighting the effectiveness of BESS in frequency control. In ref. [32], a rule-based programming algorithm was introduced for BESS management in prosumers, optimizing energy flows with lower computational costs and demonstrating scalability for renewable energy communities.
The integration of BESS into grid infrastructures and industrial energy systems has proven essential for enhancing stability and energy efficiency. In ref. [33], the use of BESS to mitigate transmission congestion in the Brazilian Interconnected System was analyzed, highlighting its potential to improve grid flexibility, albeit with challenges related to high comparative costs. Meanwhile, ref. [34] explored the application of BESS in the Puducherry Smart Grid to reduce demand peaks through a Model Predictive Control strategy, achieving a 20% reduction in peak demand and improvements in voltage stability. In ref. [35], an integrated industrial power supply system was developed, combining renewable sources, carbon capture and storage, and BESS, resulting in a 59.78% reduction in carbon emissions and emphasizing the need for policy incentives to ensure economic feasibility. Finally, ref. [36] proposed an optimization model for BESS sizing in microgrids, employing mixed-integer linear programming and Benders decomposition, ensuring frequency stability by integrating transient dynamics into the model. These studies underscore the importance of BESS in improving energy infrastructure, integrating renewable energy, and supporting industrial sustainability.
Other control and optimization strategies for BESS have been proposed to improve frequency stability and economic viability in modern power systems. In ref. [37], a shared-use leasing strategy for distributed BESS in joint energy and frequency control ancillary services markets was proposed, demonstrating economic benefits for both owners and users. In ref. [38], an optimal configuration method with opportunity constraints for BESS in networks with high integration of variable renewable energy was developed, enhancing both frequency stability and economic feasibility. In ref. [39], a Controller Hardware-in-the-Loop simulation approach was introduced to evaluate the fast frequency response of BESS, employing an advanced frequency detection algorithm that improves accuracy and robustness. In ref. [40], the effectiveness of BESS in improving frequency stability in islanded networks with high renewable penetration was investigated using Particle Swarm Optimization to tune control parameters. In ref. [41], a risk-preference-based optimization model for user-side BESS configuration was presented, balancing economic viability and operational stability. In ref. [42], a methodology for optimal placement of frequency regulation energy storage systems was introduced, enhancing frequency recovery in modern networks. In ref. [43], an optimization approach for BESS placement and sizing was developed using metaheuristic algorithms such as PSO, Firefly Algorithm, and Bat Algorithm, showing improvements in frequency stability. In ref. [44], a control strategy for grid-following and grid-forming inverters in microgrids integrated with solar energy and BESS was presented, improving grid stability and frequency response. Lastly, ref. [45] proposed a mixed-integer linear programming model to optimize the sizing of renewable energy communities, enhancing energy self-management and sustainability. These studies underscore the importance of BESS integration for frequency stability, economic viability, and sustainable energy management in modern power grids.
The article ref. [46] proposes a novel optimization algorithm called the Binary Random Dynamic Arithmetic Optimization Algorithm to determine the optimal location and sizing of Electric Vehicle Charging Stations in power distribution networks. The study’s main contribution lies in enhancing the existing Arithmetic Optimization Algorithm by integrating a Binary Search Algorithm and a Random High-Speed Jumping strategy to improve both exploration and exploitation capabilities. This hybridization allows for faster convergence and avoidance of local optima. The method was tested on the IEEE 33-bus network, minimizing a multi-objective function that includes active power losses, total harmonic distortion, and voltage deviation. Results demonstrated that Binary Random Dynamic Arithmetic Optimization Algorithm achieves 2–4% lower line losses and shorter computation time compared to traditional metaheuristics like PSO, HHO, and standard Arithmetic Optimization Algorithm, showing its superior efficiency, robustness, and accuracy for EVCS placement and planning.
Energy Storage Systems are presented as a key solution to mitigate the intermittency of renewable energies and strengthen grid resilience. Among their technologies, batteries stand out by providing emergency backup, black-start capability, and regulation services. Various studies show that ESS balance supply and demand, enable response to extreme events (heat waves, floods, typhoons), and ensure continuity of critical demand, albeit at additional costs. Despite their high initial investment, ESS provide multiple benefits: energy backup, load leveling, improvement of supply quality and reliability, reduced vulnerabilities, and support for the transition toward more efficient and productive decentralized grids [47].
The article [48] analyzes the operation of the Chinese electricity market under a dual scheme, where regulated and deregulated transactions coexist under high wind energy penetration. Its main contribution lies in defining and classifying the so-called “unbalanced funds,” proposing detailed calculation formulas that cover cases of congestion, mismatches between generation and consumption, low-voltage users, purchasing agents, and, in particular, those arising from the coexistence of regulated and deregulated markets. To this end, it develops a market clearing model based on DC power flow with security, ramping, and contract constraints, validated through simulations on the IEEE-39 bus system using real data from a Chinese province. The results show that high wind participation amplifies unbalanced funds due to renewable dispatch priority and its mismatch with demand curves, leading to financial and equity distortions in the market. In this context, although this study does not directly address storage systems, its conclusions are highly relevant to BESS, as these can mitigate imbalances caused by wind intermittency by storing surpluses and releasing them during deficit periods, thereby helping to reduce unbalanced funds, improve the match between generation and demand, and strengthen the stability and reliability of the electricity market.

1.2. Main Contributions

Previous studies have extensively examined BESS technologies, their interaction with power systems, and their role in providing ancillary services. However, a significant knowledge gap remains: no prior work has assessed, in an integrated manner, how the location and sizing of RoCoF-based inertia-emulating BESS influence the overall frequency dynamics of the system, particularly when jointly considering critical metrics such as Nadir, Zenith, RoCoF, and steady-state frequency. Existing contributions typically address synthetic inertia control, BESS optimization, or frequency performance indicators in isolation; yet, there is no methodological framework that simultaneously incorporates inertia emulation, multi-metric frequency assessment, and the optimal spatial and capacity allocation of BESS within the grid. Accordingly, the contributions of this work are as follows:
  • A BESS model that emulates inertia based on the system’s RoCoF is implemented, with the aim of evaluating its impact on key frequency metrics.
  • The impact of BESS placement and sizing on the dynamic behavior of frequency is assessed, jointly considering the metrics of Nadir, Zenith, steady-state frequency, and RoCoF.
  • Two heuristic optimization techniques—Particle Swarm Optimization (PSO) and Genetic Algorithm (GA)—are implemented and compared to determine the optimal placement and sizing of RoCoF-based inertia-emulating BESS within the power grid.
This article presents an original approach that differs from comparable methods through the simultaneous integration of inertia modeling based on the RoCoF and the joint optimization of BESS placement and sizing using PSO and GA.
Traditional BESS sizing methods, such as those based on mixed-integer linear programming [36], MPC [34], or hierarchical predictive control strategies [17], primarily address frequency regulation from a control or energy management perspective, without explicitly considering synthetic inertia response derived from the frequency derivative. Other metaheuristic approaches, such as PSO, the Firefly Algorithm [43], or the Bat Algorithm [43], have focused mainly on optimizing power or location parameters, without incorporating combined dynamic metrics such as Nadir, Zenith, RoCoF, and steady-state frequency.
Table 1 presents a comparative overview of selected studies that address optimal siting and sizing of BESS for frequency stability enhancement. It highlights the strategies used (e.g., metaheuristics, predictive control, mixed-integer linear programming, their application contexts (such as low-inertia systems, high renewable penetration, and microgrids), and the main contributions regarding frequency metrics like RoCoF, Nadir, and steady-state frequency. The proposed article is included for reference, emphasizing its novel approach to jointly optimizing BESS placement and capacity while emulating synthetic inertia based on RoCoF.
This work is organized as follows: Section 1.3 presents fundamental concepts related to the need for virtual inertia in power systems and analyzes the impact of decreasing system inertia. Section 1.4 reviews different approaches to inertia in power systems, including strategies for virtual inertia implementation. In Section 1.5, the implemented model for the BESS system is described, along with the control loop designed for inertia emulation. Section 2 details the methodology employed in the study. Section 3 explains the optimal placement and sizing of the BESS within the power system, highlighting the implementation of GA and PSO techniques. Section 4 presents the results obtained from applying GA and PSO to the optimization problem under various inertia scenarios. Section 5 presents the discussion. Section 5.5 presents limitations and implementation challenges. Section 5.6 explains the practical implementation. Section 5.7 explains the theoretical-practical integration. Finally, Section 6 presents the conclusions of the study.

1.3. Need for Virtual Inertia in Power Systems

Traditionally, inertia in electric power systems has been directly dependent on rotating machines and on the electromagnetic coupling between their rotating masses and the electrical grid [49]. With the integration of power electronic interfaces, a decoupling occurs between generators, rotating loads, and the grid, which prevents the kinetic energy stored in their rotating masses from mitigating transients in the system [50]. As a result, it becomes necessary to define methodologies that enable the grid to maintain inertia levels H such that the magnitude of frequency deviation is minimized during generation-load imbalances.
In this way, the system dynamics would exhibit a slower and more damped response, increasing the critical clearing times for fault removal and allowing sufficient margins to perform switching actions to counteract active power imbalances caused by faults or events such as the loss of transmission lines, generation units, loads, etc. [50].
Figure 1 illustrates how frequency is affected by changes in system inertia levels. The curve labeled Frequency 1 corresponds to the IEEE 39-bus system with a 50% loss of inertia, while the curve labeled Frequency 2 represents the same system operating with 100% of its original inertia. A generation-load imbalance results in frequency excursions, and this imbalance is initially counteracted by the system’s inertia H s , as expressed in Equation (1), where the inertia H g of each generator is defined in Equation (2) [50].
H s = i H g , i S g , i S s
H g , i = E k i n , i S g , i = J ( 2 π f n ) 2 2 S g , i
where E k i n , i is the kinetic energy of the generator, J the moment of inertia, S s the total system power, f n the nominal system frequency, and S g , i the power of each generator.
The RoCoF is the instantaneous rate of change of frequency following an imbalance in the system caused by a disturbance. Generation loss, sudden load disconnection, and islanding operation are examples of such disturbances.
The initial R o C o F , assuming zero load damping [50], is expressed as follows in Equation (3):
R o C o F = d f d t = Δ P 2 H f 0
where Δ P is the size of the contingency (lost MW), H is the system inertia (MW-seconds), f 0 is the frequency at the time of the disturbance (Hz), and d f / d t is the rate of change of frequency (Hz/s).
A slow-response scenario for RoCoF, within the range of seconds to minutes, is associated with the inertia provided by synchronous generators along with their governors, which help to reduce the RoCoF. Enhancing grid inertia control within this physical time frame could be naturally achieved through the use of synchronous condensers. On the other hand, a fast-response scenario for RoCoF control could involve the rapid injection of energy, either by increasing generation or reducing load.
Inverter-Based Power Sources (IBPS), such as wind, solar, batteries, supercapacitors, and flywheels, can provide a fast frequency response. However, these devices inherently lack an inertial response, making a control loop that enables energy delivery proportional to changes in system speed or frequency necessary.
These limitations in the system’s inertial response motivate the review of inertia emulation techniques, which are presented in the following section.

1.4. Inertia in Power Systems

In power systems, frequency reflects the state of balance between generation and demand, serving as an indicator of system speed. This balance is affected by variations in generation or load. For instance, in the event of a generator unit outage, the system enters an overload condition where demand exceeds generation, resulting in a frequency drop as the system slows down. Thus, inertia plays a fundamental role in the behavior of AC power grids, as the magnitude and rate of frequency deviations are directly related to the system’s inertia levels. In other words, the more synchronous machines are directly connected to the system, the more stable it becomes. In this way, by releasing or absorbing energy through the rotating masses of electrical machines, the system instantaneously compensates for imbalances. Subsequently, generator control systems provide additional energy from reserves, activating the Automatic Generation Control (AGC), and in later stages, tertiary control mechanisms [51].
The integration of energy sources that do not provide inertial response alters the system’s ability to effectively respond to frequency disturbances, especially in the initial stages. This highlights the need to implement controlled inertial responses through power electronic interfaces, with the aim of ensuring the safe and reliable operation of the power system.

1.4.1. Inertia Constant and Swing Equation

The inertia constant of a power system, denoted as H, or that of a specific generator, H i , represents the kinetic energy stored in the system’s rotating masses, expressed as E c 0 . This value indicates the time, in seconds, required to replenish that energy under nominal operating conditions, considering the nominal mechanical speed ω s m = ( 2 π f n ) 2 and the nominal apparent power S b a s e . The mathematical relationship that defines the total system inertia can be represented by Equation (2) [49].
The relationship between the frequency measured at the generator f i and the power imbalance Δ P i at its terminals is expressed by Equation (4):
2 H i f n · d f i d t = p m , i p e , i = Δ p i i = 1 , 2 , , N
where p m , i is the mechanical power of the turbine in p.u., p e , i is the electrical power in p.u., Δ p i is the power imbalance between generation and load in p.u., H i is the inertia constant in seconds, f n is the frequency at point i in Hz, f n is the nominal system frequency in Hz, and d f i / d t is the rate of change of frequency in Hz/s.
If the instant at which a disturbance occurs, t = t 0 , is known, along with the power imbalance Δ p i ( t 0 ) and the rate of change of frequency d f i / d t , the inertia delivered by the generator can be calculated using Equation (5):
H ^ i = Δ p i ( t 0 ) f n 2 · d f i d t | t = t 0
This calculation is valid for a limited period following the disturbance, before other factors alter the system dynamics. The frequency change, known as RoCoF, can be estimated through consecutive frequency measurements and calculating the slope using:
d f i d t | t = t 0 f i ( t 0 + ) f i ( t 0 ) t 0 + t 0
where f i ( t 0 + ) and f i ( t 0 ) are the frequency values measured immediately after and before the instant t 0 , respectively.

1.4.2. Synthetic Inertia

BESS systems do not inherently provide inertial response. To address this limitation, control loops are implemented that link grid frequency to the active power delivered by the device, thereby enabling a response to disturbances. According to [52], there are two main strategies for implementing inertia: continuous RoCoF control and single-action RoCoF control. Continuous control uses instantaneous RoCoF measurements, allowing for greater adaptability, although it requires advanced filters to avoid amplifying noise introduced by differentiating the frequency. On the other hand, single-action control is simpler and more predictable, but less adaptable to dynamic changes [53]. After determining the frequency, its time derivative should be filtered before being multiplied by a gain constant known as the synthetic inertia constant Equation (7):
Δ p = 2 H s y n · d f s y s d t
where Δ p is the active power injected by the BESS, H s y n is the synthetic inertia constant, and f s y s is the system frequency.
Inertial energy can come from different sources, including the DC-link capacitor [54], BESS, or the kinetic energy stored in rotating components of wind turbines [55]. Figure 2 illustrates a simplified diagram showing how inertial control can be implemented in BESS devices. P* represents the power setpoint corresponding to the value delivered by the BESS when operating in steady-state conditions. In turn, P denotes the total power supplied, which includes both the power used for inertia emulation and the power specified by the setpoint.
Once the strategies for implementing synthetic inertia have been identified, the following section describes the proposed BESS model with inertia emulation capability.

1.5. Battery Energy Storage Systems

Figure 3 presents the BESS system architecture used in this analysis. It comprises a battery, a charge controller that ensures charging and discharging remain within defined boundaries, and measurement units tasked with tracking key electrical variables such as voltage, real and reactive power, and frequency. At the core of the control scheme is a PQ controller, which governs the flow of real and reactive power to and from the BESS [43].
The regulation of active power is managed via the I d r e f signal, while I q r e f determines the reactive power. These references are transmitted to a PWM-based power converter through the charge controller, which facilitates the power exchange in accordance with the PQ controller’s commands.
The control system also incorporates a frequency control loop, designed to modify the active power reference delivered to the PQ controller in response to frequency deviations in the grid and a preset droop characteristic. This frequency regulation mechanism is depicted in Figure 2. For the purposes of this work, the battery model assumes that its output voltage is a function of its SoC, internal resistance, and nominal capacity (Cbat). With battery capacity treated as a constant, the model follows a standard equation relating terminal voltage to SoC and battery current [43].
V t = [ S o C V M a x + ( 1 S o C ) V M i n ] I R i
where V t represents the terminal voltage of the battery, while S o C denotes the State of Charge. The variable I corresponds to the battery current, and R i is the internal resistance. The maximum voltage, V M a x , indicates the voltage level when the battery is fully charged, whereas V M i n refers to the voltage when the battery is fully discharged.
Figure 3 illustrates the control architecture of a BESS, designed to regulate the injection of active and reactive power, as well as to participate in frequency control of an electrical grid. The system begins with the measurement of key electrical variables such as AC voltage (AC Voltage Measurement), active and reactive power (PQ Measurement), and system frequency (Frequency Measurement). The measured frequency feeds the frequency control block, which compares the measured frequency with a reference and generates an active power adjustment signal ( d P r e f ). This signal, along with the voltage and power measurements, is processed by the power controller (PQ Control), which calculates the required active ( I d r e f ) and reactive ( I q r e f ) current references for the operation of the BESS.
Simultaneously, the battery model provides internal information about the storage system, including cell voltage ( V c e l l ), cell current ( I c e l l ), and state of charge (SOC). These parameters are used by the charge controller (Charge Controller), which integrates the current references and the battery conditions to generate efficient operating commands. Finally, these references are sent to the PWM converter, which regulates the BESS energy output to the electrical grid.
The diagram in Figure 4 presents the control scheme designed to emulate inertia in a BESS, contributing to frequency support in the electrical grid. The system receives the measured frequency signal F r q as input, from which the time derivative d F / d t is calculated using a differentiator block weighted by a gain K. This signal represents the RoCoF, a critical variable under contingency conditions. To mitigate the effect of potential high-frequency noise, the derivative signal is processed through a first-order filter with gain K 1 and time constant T, thereby obtaining the signal d f i l t e r , which provides a smoothed estimate of the RoCoF.
The output of the filter is subsequently amplified by a gain K g , generating a proportional signal that represents the synthetic inertial response power to be delivered by the BESS. In parallel, the measured frequency signal is also used to calculate the deviation from its nominal value, scaled by a gain K m , enabling a control action proportional to the frequency error. Both signals—the one corresponding to the RoCoF and the one for frequency error—are combined along with a compensation constant K c , ultimately generating the active power reference signal P r e f . This reference is used to control the power that the BESS must inject or absorb, thereby emulating the effect of inertia. The gains have been set manually, and their values are presented in Table 2.
As the battery supplies energy to the grid, the SoC value decreases. The SoC under discharge conditions can be estimated using Equation (9):
S o C t = S o C t 1 0 t I C b a t d t
where S o C t is the state of charge of the battery at time t, S o C t 1 is the initial state of charge expressed as a percentage, I is the measured charge/discharge current in amperes (A), t is the time measured in seconds (s), and C b a t is the battery capacity in ampere-hours (Ah).
With the BESS model defined, the next step is to structure the optimization methodology that will enable the assessment of its optimal placement and sizing within the power system.

2. Methodology

The process begins with modeling the key components of the electric power system, including the excitation system, speed governor, generator dynamics, BESS units, and the characteristics of transmission lines and loads.
Following this, an optimization problem is defined with the main goal of minimizing the total installed power of the BESS units ( P B E S S i ), while also identifying their optimal locations within the network. The problem formulation incorporates essential operational constraints such as frequency Nadir and Zenith, RoCoF, and steady-state frequency requirements. Given its nonlinear and non-convex characteristics, the problem is tackled using heuristic optimization techniques.
This study employs two optimization algorithms: the Particle Swarm Optimization (PSO) algorithm and the Genetic Algorithm (GA). The methodology proposed for this study is structured into four stages:

Stage 1: Power System Modeling

In the first stage, the main components of the electric power system are modeled, including:
  • Generator models and their dynamics.
  • Excitation systems (AVR) and speed governors (governor models).
  • Load and transmission line models.
  • BESS.

Stage 2: Formulation of the Optimization Problem

In this stage, an optimization problem is formulated with the objective of minimizing the installed BESS power in the network while complying with the following frequency constraints:
  • Nadir: Minimum frequency value reached after an event.
  • Zenith: Maximum frequency value reached after an event.
  • Steady-State Frequency: Ensures that the frequency reaches a non-critical operating level, from which secondary and tertiary control actions can restore the nominal operating value.

Stage 3: Solution of the Optimization Problem

To solve the problem, two heuristic algorithms are employed:
  • Particle Swarm Optimization (PSO) algorithm.
  • Genetic Algorithm (GA).
Both algorithms were selected for their ability to address complex and nonlinear problems. In addition, specific modifications were made to handle continuous variables (BESS sizes) and discrete variables (BESS locations).

Stage 4: Results and Analysis

In this stage, the obtained results are analyzed to identify the algorithm with the best performance. Based on this analysis, the optimal locations and sizes of the BESS units that maximize system frequency stability following disturbances are determined. These results enable the proposal of practical configurations for implementing BESS in the power system.

Stage 5: Implementation

The GA and PSO algorithms were programmed and executed in Python 3.9, enabling efficient and reproducible simulations, while the power system modeling and electrical simulations were carried out in PowerFactory DigSILENT.

2.1. Iterative Optimization Scheme

2.1.1. Python–PowerFactory Data Exchange

The interaction is established through the PowerFactory API, which enables direct invocation of network model objects from a Python script.
  • Python generates the decision variables.
  • These variables are transmitted to PowerFactory via COM/DIgSILENT-Python API calls, where the parameters of the system elements are updated.
  • PowerFactory executes the power flow or dynamic simulation and returns metrics (minimum frequency, RoCoF, losses, etc.), which are received by Python to feed the objective function and update the solution population of the optimization algorithm.

2.1.2. Synchronization in Iterative Optimization

The cycle follows a master–slave logic:
  • Python (master): selects the candidate parameter set.
  • PowerFactory (slave): runs the simulation with the specified parameters.
  • Python: waits for the execution to complete before proceeding to the next iteration.
Synchronization is managed by blocking execution in Python until PowerFactory returns results, ensuring that there is no overlap of simulations or inconsistent readings of intermediate data. This is critical for evolutionary algorithms, where each individual requires a complete evaluation before proceeding to the next generation.

2.1.3. Error Handling

Since co-simulation processes may fail (due to numerical ill-conditioning, model instability, or API errors), exception handling routines are integrated into Python:
  • If PowerFactory does not converge or returns an error, Python logs the failure and assigns a penalized value to the objective function (penalty technique).
The proposed methodology is implemented within the framework of an optimization problem, whose development is detailed in the following section.

3. Optimal Placement and Sizing of BESS

The mathematical modeling for the optimal placement and sizing of BESS aims to minimize the total power supplied by the BESS units while determining the most strategic locations within the power system. This process is carried out under a set of fundamental technical and operational constraints, including compliance with the frequency Nadir, minimum and maximum size limits of the BESS and steady-state frequency. These constraints ensure that the system operates in a stable and efficient manner while optimizing BESS integration into the grid to enhance the reliability and stability of the power system.

3.1. Mathematical Model

The objective of the model is to minimize the total power supplied by the BESS units while identifying the optimal locations and fulfilling the necessary operational constraints to ensure the stability and reliability of the power system.
In the model, the size of the BESS to be installed at each bus in the power system is denoted as B E S S i and is expressed in megawatts (MW). Each bus considered for BESS installation is identified within the range of possible locations, from B u s 1 to B u s N . The size of the BESS at each bus is determined according to technical constraints, including the minimum and maximum power limits for each system and the total sum of the installed BESS units, which must not exceed the allowed penetration limit, B E S S l i m i t .
The RoCoF and the steady-state frequency are considered to ensure the dynamic stability of the system, meeting established limits such as the allowable RoCoF range (±1.5 Hz/s in a 60 Hz system, equivalent to 0.0025 p.u./s). Likewise, the state of charge (SoC) of the batteries must be maintained within defined limits, between S o C M i n and S o C M a x , to extend their lifespan and ensure efficient operation.

3.1.1. Objective Function

The objective function is defined as follows:
min i = 1 N P B E S S i
where P B E S S i denotes the power supplied by the BESS unit installed at bus i, and N is the total number of buses in the system.

3.1.2. Constraints

  • Frequency Nadir Constraint:
    f n a d i r f m i n
    in which f n a d i r represents the minimum frequency value reached after a disturbance, and f m i n is the acceptable lower limit.
  • Frequency Zenith Constraint:
    f m a x f Z e n i t h
    where f Z e n i t h is the maximum frequency value allowed after a disturbance, and f m a x is the acceptable upper limit.
  • Minimum and maximum size constraint of the BESS:
    P B E S S m i n P B E S S i P B E S S m a x
    where P B E S S m i n and P B E S S m a x represent the minimum and maximum size limits of the BESS system.
  • Steady-state frequency constraint:
    f s s = f n o m i n a l
    where f s s is the steady-state frequency and f n o m i n a l is the nominal system frequency.
The objective function in Equation (10) was formulated under the assumption that the BESS power injection is linearly proportional to the synthetic inertia control action, neglecting converter and storage losses. The optimization considers only the total installed power as a proxy for investment cost, assuming uniform cost per MW. Moreover, the system is modeled as balanced and lossless in steady state, and the dynamic response is evaluated solely through frequency indicators (Nadir, Zenith, RoCoF, and steady-state frequency), disregarding higher-order electromagnetic effects. These simplifications allow the problem to be tractable using heuristic algorithms while preserving the essential dynamics of frequency stability

3.2. Optimization Algorithms

The optimal placement and sizing of Battery Energy Storage Systems (BESS) in power networks constitutes a mixed-integer nonlinear problem. It combines discrete decisions (location of candidate nodes, number of units) with continuous variables (storage capacity), subject to non-convex constraints associated with frequency stability and power limits. In this context, exact methods such as Branch-and-Bound or mixed-integer programming become impractical, as complexity grows exponentially and convergence may become trapped in infeasible solutions for large-scale systems.
Evolutionary algorithms such as Genetic Algorithm (GA) and Particle Swarm Optimization (PSO) offer specific advantages:
  • GA is robust for handling discrete and binary variables (e.g., selecting installation nodes), thanks to its chromosomal encoding and crossover/mutation operators, which enable the exploration of spatial combinations without requiring gradients or continuity in the objective functions.
  • PSO is more efficient in exploring continuous spaces (e.g., energy and power sizing), with fast convergence toward promising regions, making it suitable for tuning capacity magnitudes under the system’s dynamic constraints.
  • Both algorithms tolerate nonlinearities, non-differentiable functions, and multimodal search spaces—features inherent to the BESS problem when aspects such as frequency control, investment costs, and dynamic performance are considered.
Compared to alternatives such as simulated annealing or ant colony optimization, GA and PSO exhibit a better balance between global diversification and local exploitation, and their implementation is more straightforward in co-simulation environments (Python–PowerFactory). Furthermore, numerous reports in the literature validate their effectiveness in electrical planning problems, supporting their selection over more recent hybrid methods which, although promising, still lack maturity and robustness in large-scale applications.
Nature-inspired optimization algorithms, such as the GA and PSO, are techniques inspired by biological processes that aim to solve complex optimization problems [56] through approximations and/or suboptimal solutions. In this work, GA and PSO are employed to address the problem of BESS placement and sizing to improve frequency stability in power systems, as described by Equations (1)–(7).
The selection of the Particle Swarm Optimization (PSO) and Genetic Algorithm (GA) methods is aligned with the specific characteristics of the optimization problem under study, which combines discrete variables (BESS unit locations) and continuous variables (power sizing), and exhibits highly nonlinear and non-convex behavior due to the dynamic constraints associated with system frequency stability. Classical deterministic approaches—such as linear or quadratic programming or gradient-based algorithms—are unsuitable in this context, as they require continuous, differentiable, or convex objective functions, conditions that are not met in the Python–PowerFactory co-simulation used in this work.
In this regard, PSO and GA provide complementary advantages. GA is particularly well suited for handling search spaces with discrete components, owing to its chromosomal encoding and crossover and mutation operators, which enable efficient exploration of spatial combinations of candidate buses without relying on gradient-based information. This makes GA a robust tool for identifying BESS placement configurations in large-scale systems. Conversely, PSO exhibits strong convergence properties in problems involving continuous variables and relatively bounded optimal regions, allowing precise tuning of installed power capacities while satisfying the system’s dynamic constraints. Its update mechanism, based on the individual and collective experience of the particles, supports efficient exploration of high-dimensional search spaces.
Both algorithms also demonstrate tolerance to noisy or discontinuous objective functions, a particularly relevant aspect in this study since each fitness evaluation depends on a full dynamic simulation in PowerFactory, where numerical failures, measurement discontinuities, and variability associated with time integration may occur. Their ability to operate effectively under these conditions, together with their proven applicability in numerous studies on power system planning and stability, supports their selection as the main optimization techniques for this work.

3.2.1. Genetic Algorithm (GA)

Genetic algorithms (GAs) are a class of metaheuristic optimizers inspired by Darwinian evolution. They reproduce the principle of natural selection, whereby the most “fit” members of a population are more likely to pass their traits to subsequent generations. The search begins with an initial population of potential solutions (each encoded as a chromosome (i.e., a solution vector)) and iteratively evolves this population to determine the optimal sizing and placement of M-SSSC devices.
Figure 5 displays the flowchart of the GA implemented in this study. The algorithm begins by randomly generating an initial population, ensuring that the values of the decision variables fall within predefined limits. Each individual in this population is then assessed through a fitness evaluation, where the objective function is computed. Following this, a tournament selection method is applied: a small group of individuals is randomly chosen, and the one with the highest fitness score is selected. These selection rounds are performed in pairs, with the selected individuals advancing to the crossover phase of the algorithm.
During this phase, the selected individuals undergo crossover, where genetic material is exchanged at randomly chosen points to generate a new set of candidate solutions, or offspring. These offspring are then subject to mutation, which involves introducing random alterations with a predefined probability. This step is essential to enhance diversity in the population and avoid premature convergence to local optima. Each mutation respects the predefined limits of the variables to ensure the resulting solutions remain valid. After crossover and mutation, a selection process retains the most fit individuals from both the parent and offspring pools, preserving a fixed population size across generations. The algorithm continues iterating until the predefined number of generations is reached.
Genetic Algorithms have demonstrated strong performance across a wide range of electrical engineering applications. These include vulnerability analysis [57], protection system coordination [58], system expansion planning [59], and the design of Under-Frequency Load Shedding (UFLS) strategies [60]. In addition, numerous studies, such as [61,62], have highlighted the efficacy of GAs in determining the optimal placement and sizing of FACTS devices.

3.2.2. Particle Swarm Optimization (PSO)

PSO is a stochastic, population-based optimization technique introduced in [63], drawing inspiration from the coordinated movement patterns observed in bird flocks and fish schools. In contrast to GAs, PSO does not utilize crossover or mutation operations. Instead, it relies on the motion of particles—each symbolizing a potential solution—within an n-dimensional search space, where their behavior is governed by rules that dictate changes in position and velocity. The operational flow of the PSO algorithm applied in this study is illustrated in Figure 6.
The algorithm initializes a swarm of particles randomly scattered across the search domain, each with associated vectors for position and velocity. As the algorithm iterates, particles update their trajectories by considering two key references: the best solution each particle has encountered individually (personal best) and the best-known solution achieved by the entire swarm (global best).
The mathematical formulations for updating particle velocities and positions are provided in Equations (15) and (16), as detailed in [64]. PSO has demonstrated its versatility and effectiveness across a broad range of electrical engineering challenges, including control systems [65], demand-side management [66], and the optimal siting and sizing of FACTS devices [67], among others.
v i ( t + 1 ) = ω ( t ) v i ( t ) + c 1 r 1 [ x p B e s t i x i ( t ) ] + c 2 r 2 [ x g B e s t x i ( t ) ]
x i ( t + 1 ) = x i ( t ) + v i ( t + 1 )
In this case, t denotes the iteration; w ( t ) is the inertia weight; v i is the velocity vector of the i-th particle; x i is the position vector of the i-th particle; x g B e s t is the global best historical position of the entire swarm; x p B e s t i is the personal best historical position of particle i; c 1 and c 2 are the personal and global learning coefficients, respectively, while r 1 and r 2 are random numbers uniformly distributed in the range [0, 1] [63].

3.3. Co-Simulation Framework

The following are the steps of the flowcharts representing the optimization process in Python using GA and PSO, along with the electrical simulations in PowerFactory, to evaluate the optimal placement and sizing of BESS systems in electric power systems.

3.3.1. GA Co-Simulation

The Figure 7 presents the flowchart of the optimization process for the location and sizing of BESS systems, integrating a genetic algorithm implemented in Python with electrical simulations performed in PowerFactory.
  • Step 1: The vector X [ N i , P B E S S ] is defined to establish the decision variables, where N i represents the location of the BESS and P B E S S represents the power assigned to the BESS.
  • Step 2: The vectors X m i n [ ] and X m a x [ ] are defined, which determine the lower and upper bounds for each variable in the decision vector.
  • Step 3: An initial population of solutions (X vectors) is generated that complies with the established limits.
  • Step 4: Each generated solution ( X [ N i , P B E S S ] ) is sent to PowerFactory for evaluation through electrical simulations.
  • Step 5: A steady-state simulation is run to establish the initial conditions of the system.
  • Step 6: The BESS units are inserted into the system with their respective power ratings and locations according to the X vector.
  • Step 7: A dynamic simulation of the system is performed to observe the frequency behavior after a disturbance.
  • Step 8: Frequency parameter review is carried out, extracting the values of: Nadir (minimum frequency), Zenith (maximum frequency), and steady-state value.
  • Step 9: It is verified whether the parameters comply with technical and regulatory limits.
  • Step 10: Are the constraints satisfied?
    Yes → the solution is returned without penalty.
    No → the objective function is penalized.
  • Step 11: Objective Function Evaluation (Fitness), Each individual in the population is evaluated based on its performance, considering frequency metrics and any applied penalties.
  • Step 12: Individuals are selected for reproduction based on their fitness (best-performing solutions).
  • Step 13: The vectors of selected parents are combined to generate offspring (new solutions).
  • Step 14: Some variables in the offspring are randomly altered to promote diversity.
  • Step 15: A new population is formed with the generated individuals.
  • Step 16: It is checked whether a termination condition has been met.
    Yes → proceed to step 17
    No → return to step 4
  • Step 17: End, if the stopping criterion is met, the process concludes and the best solution found is selected.

3.3.2. Cosimulacion PSO

The Figure 8 shows the flowchart of the optimization process for the location and sizing of BESS systems, based on a PSO optimization algorithm implemented in Python and coupled via co-simulation with PowerFactory for electrical evaluation.
  • Step 1: The vector X [ N i , P B E S S ] is defined to establish the decision variables, where N i represents the location of the BESS and P B E S S represents the power assigned to the BESS.
  • Step 2: The vectors X m i n [ ] and X m a x [ ] are defined, which determine the lower and upper bounds for each variable in the decision vector.
  • Step 3: An initial population of solutions (X vectors) is generated that complies with the established limits.
  • Step 4: Each generated solution ( X [ N i , P B E S S ] ) is sent to PowerFactory for evaluation through electrical simulations.
  • Step 5: A steady-state simulation is run to establish the initial conditions of the system.
  • Step 6: The BESS units are inserted into the system with their respective power ratings and locations according to the X vector.
  • Step 7: A dynamic simulation of the system is performed to observe the frequency behavior after a disturbance.
  • Step 8: Frequency parameters are reviewed, extracting the values of: Nadir (minimum frequency), Zenith (maximum frequency), and steady-state value.
  • Step 9: It is verified whether the parameters meet technical and regulatory limits.
  • Step 10: Are the constraints satisfied?
    Yes → the solution is returned without penalty.
    No → the objective function is penalized.
  • Step 11: Objective Function Evaluation (Fitness). Each individual in the population is evaluated based on its performance, considering frequency metrics and any applied penalties.
  • Step 12: The velocity and position of each particle are updated according to the rules of the algorithm used.
  • Step 13: A new population is built with the updated solutions for the next iteration.
  • Step 14: It is verified whether the stopping criterion has been met.
    Yes → the process ends and the best solution is obtained.
    No → the cycle repeats from step 4.
  • Step 15: The process ends.

4. Results

4.1. Case Studies

For the study, three scenarios are proposed in which the system inertia corresponds to 100%, 50%, and 25%, respectively. The event to which the network is subjected corresponds to the disconnection of the largest generator (generator 06 with 650 MW), assuming that under this fault, the frequency experiences the worst operational case. In addition, the frequency behavior is evaluated under three conditions: without the connection or contribution of BESS systems, with the BESS system configured by the GA, and finally, when the BESS system operates with the configuration optimized by the PSO.

4.2. Analysis of the IEEE 39-Bus System

Table 3 summarizes the electrical properties of the lines in the IEEE 39-Bus system, a more complex test system than the previous one. Key data such as resistance and reactance in ohms, as well as the length of each line, are included. This information is essential for detailed modeling and for simulating load flow and stability.
Table 4 lists the transformers in the IEEE 39-Bus system, indicating their voltage levels (HV/LV), vector group configuration, and short-circuit impedance. These data are relevant for assessing power transfer between voltage levels and the system’s response to disturbances.
Table 5 presents the total installed BESS power, nadir, zenith, and steady-state frequency (Fss) values for each of the studied cases. As system inertia is reduced (from 100% to 25%), frequency stability indicators deteriorate, particularly the nadir and Fss in the absence of BESS. However, the integration of BESS using GA and PSO significantly enhances the system’s dynamic response. In all scenarios, PSO achieves performance that is comparable to or better than GA, while requiring less installed power, positioning it as a more efficient alternative. When comparing inertia levels with the corresponding BESS power requirements, it is observed that Case 3, which corresponds to 25% inertia, demands a higher BESS capacity to compensate for the 75% inertia reduction and maintain acceptable frequency parameters. As inertia is lost, the system loses its natural ability to resist frequency variations.
There is an inverse relationship between the system’s inertia level and the BESS power requirement: the lower the inertia, the greater the power that must be supplied by the BESS to keep the frequency within acceptable operating limits. However, in Case 2, the BESS power requirement is slightly lower than in the case with 100% inertia. This is because, although the system with 100% inertia offers greater resistance to frequency deviations, recovering from the nadir requires more power from the BESS.
The PSO algorithm exhibits the best performance, as shown in Table 5, providing a solution with lower power while satisfying all the constraints.
Table 6 presents the results of the BESS sizing and placement across the buses of the IEEE 39-Bus system. These results are also graphically illustrated in Figure 9. A comparative analysis of the optimization scenarios reveals that the PSO algorithm with 50% rotational inertia (PSO_50) is the most efficient, achieving the lowest total installed power (277.11 MW). It is followed by PSO_100 (285.79 MW) and GA_50 (285.57 MW). However, GA_25 shows the highest total BESS installation (307.44 MW), mainly due to the loss of system inertia. Although PSO_25 slightly improves performance compared to GA_25, it results in high power concentrations in certain buses (e.g., 50 MW at Bus 1). As the level of rotational inertia increases, the total installed power tends to decrease and the distribution becomes more balanced. Nevertheless, some areas still exhibit high concentration levels, such as Buses 35 and 38 in PSO_100.
With the reduction in inertia, the system exhibits a faster and less damped response to disturbances, resulting in a higher RoCoF and more pronounced nadir values. As shown in Figure 10, the frequency response for Case 1, which corresponds to 100% of the original rotational inertia, presents a lower nadir and a gentler rate of decline compared to Cases 2 and 3. Additionally, the solution provided by the PSO algorithm results in a lower nadir with 1.65 MW less BESS power. On the other hand, the case with the lowest BESS power requirement is Case 2, corresponding to 50% rotational inertia, as illustrated in Figure 11. In this case, the PSO-based solution achieves a difference of 8.46 MW and yields a better frequency response.
Case 2, shown in Figure 11, requires less BESS power because the level of inertia allows the BESS to provide virtual inertia without opposing the frequency change, as it does in Case 1. At the same time, it retains sufficient rotational inertia to avoid the high RoCoF observed in Case 3. On the other hand, Figure 12 shows the system behavior when only 25% of the original rotational inertia is available, resulting in a faster frequency response characterized by a higher RoCoF and a more pronounced nadir.
Figure 13 compares the evolution of the objective function for the PSO and GA algorithms. PSO exhibits a rapid decrease during the initial iterations, indicating an effective early exploration of the search space and quickly reaching lower values, although it later stabilizes and stops improving. GA, in contrast, reduces the objective function more slowly: it maintains higher values for a larger number of iterations and decreases gradually, reflecting a broader and more sustained exploration process. Ultimately, PSO reaches the lowest final value, while GA converges to a slightly higher one. Overall, PSO is faster but more prone to premature convergence, whereas GA is slower but more robust in global search.

5. Discussion

The validation of the proposed methodology was carried out through a systematic process combining model verification, consistency checks, and cross-validation of optimization results. Although the study primarily focuses on frequency stability enhancement, it was essential to ensure that the simulation framework and optimization routines produced reliable and reproducible outcomes.

5.1. Model Verification and Numerical Consistency

The dynamic model implemented in PowerFactory was verified by comparing the frequency response of the IEEE 39-bus system against reference studies available in the literature under equivalent inertia conditions. The base case (100% inertia without BESS) was used as a benchmark to confirm that the simulated frequency nadir and steady-state values matched those reported in the literatury within a tolerance of ±0.05 Hz. Furthermore, the co-simulation interface between Python and PowerFactory was validated by repeating identical runs to ensure deterministic results, revealing a maximum deviation below 0.2% between iterations.

5.2. Optimization Algorithm Validation

To assess the robustness of the optimization process, both GA and PSO were executed for multiple independent trials (20 runs per case) using distinct random seeds. The convergence curves demonstrated stable behavior and convergence within 50–60 generations for GA and 35–40 iterations for PSO, with standard deviations below 3% in total installed BESS power. This confirms the repeatability and numerical stability of both algorithms. Additionally, PSO consistently reached near-global optima with faster convergence, whereas GA exhibited higher exploration capacity, particularly for discrete placement variables.

5.3. Cross-Comparison and Sensitivity Analysis

A sensitivity analysis was conducted by varying the inertia constants and controller gains (Ks, Kf, Tf) by ±10% to evaluate the impact on frequency metrics. The results showed that frequency nadir and steady-state deviations remained within acceptable bounds, confirming the resilience of the optimization under parametric uncertainty. Likewise, the relative difference between GA and PSO solutions in total installed BESS power was consistently below 5%, validating the coherence of the results across distinct metaheuristic approaches.

5.4. Future Work

The present study does not explicitly consider voltage magnitude constraints, converter losses, or degradation effects associated with BESS cycling, which simplifies the formulation but may introduce small deviations in absolute performance metrics. Future work will integrate voltage regulation and reactive power control into the optimization framework, enabling a comprehensive multiobjective analysis that jointly addresses frequency and voltage stability.

5.5. Limitations and Implementation Challenges

Although the proposed methodology demonstrates promising results in terms of frequency stability enhancement through optimal BESS allocation and inertia emulation, several limitations should be considered when moving towards real-world applications. First, the study relies on the IEEE-39 bus test system, which provides valuable insights but cannot fully represent the operational complexity of large-scale or hybrid transmission networks. Second, the practical deployment of BESS is subject to regulatory frameworks, market incentives, and cost constraints that were not modeled in this work. Third, the optimization procedure requires detailed dynamic data and high computational resources, which may be challenging to obtain in real-time or in systems with incomplete datasets. Finally, the integration of BESS with existing control and protection schemes may face interoperability and cybersecurity challenges. Addressing these issues in future work will be key to ensuring the scalability and applicability of the proposed approach.

5.6. Practical Implementation

The proposed methodology can be practically implemented in real-world power systems by integrating the optimization and co-simulation framework into existing utility planning and operation tools. The practical deployment involves both the offline planning phase, where the optimal placement and sizing of BESS units are determined, and the online operational phase, where control strategies are applied in real time to emulate synthetic inertia.

5.6.1. Offline Planning Stage

In the planning stage, utilities or system operators can use historical frequency disturbance data and grid topology models (e.g., IEEE 39-bus or equivalent regional networks) to perform the optimization routine. The Python–PowerFactory co-simulation framework can be directly adapted to actual grid databases, allowing iterative evaluations under different inertia and contingency scenarios. The resulting optimal BESS locations and capacities provide a strategic guideline for investment planning, enabling a reduction in total installed storage power while maintaining adequate frequency stability margins.

5.6.2. Real-Time Operation and Control

In practice, once the BESS units are installed at the optimized buses, their control systems can be configured to execute the synthetic inertia emulation loop described in Figure 4. The control algorithm measures the instantaneous frequency and its rate of change (RoCoF), filters the signal, and dynamically adjusts the active power injection through a PQ converter. These actions can be embedded within existing energy management systems (EMS) or grid-forming inverter control software, ensuring seamless coordination with automatic generation control (AGC) and primary frequency response mechanisms.

5.6.3. Hardware and Communication Requirements

For implementation in a transmission or subtransmission network, BESS units must be equipped with:
A high-speed measurement interface capable of sampling frequency and RoCoF with a resolution of at least 50–100 ms;
A low-latency communication link between local controllers and the supervisory EMS to synchronize frequency response actions;
A standardized communication protocol (e.g., IEC 61850 or DNP3) to ensure interoperability with other protection and control systems.

5.6.4. Scalability and Integration Prospects

The methodology is scalable to large interconnected networks or microgrids by segmenting the system into operational zones and running the optimization independently for each zone. Moreover, the optimization framework can be extended to include investment cost functions, voltage regulation objectives, and degradation models to enhance techno-economic feasibility. Future integration with digital twins of the grid could enable continuous re-optimization in response to changes in renewable generation patterns or grid topology, enhancing adaptive grid resilience.

5.7. Theoretical–Practical Integration

While the theoretical formulation presented in Section 2, Section 3, Section 4, Section 5 and Section 6 establishes the mathematical foundation of the problem, its ultimate purpose is to provide a practical framework that engineers and system operators can apply to real networks. Therefore, it is essential to bridge the theoretical derivations with their engineering implications.

5.7.1. Physical Interpretation of the Mathematical Model

The equations describing inertia, frequency deviation, and synthetic inertia control (Equations (1)–(9)) are not intended as abstract mathematical constructs but as tools for quantifying the physical response of the grid to disturbances. Equation (3), for instance, expresses the RoCoF as a function of system inertia and contingency size, directly linking the mathematical derivative d f / d t to the observable rate at which generators decelerate after a loss of generation. Similarly, Equation (7) formalizes the synthetic inertia emulation mechanism, where the BESS injects power proportional to RoCoF—an engineering control action realizable through converter-based systems.

5.7.2. Engineering Meaning of the Optimization Problem

The optimization problem (Equations (10)–(13)) may appear as a pure mathematical minimization task; however, each component has direct operational meaning. Minimizing P B E S S i corresponds to reducing total installed power and cost, while the constraints on Nadir, Zenith, and steady-state frequency reflect compliance with reliability criteria defined by grid codes. Thus, the optimization framework provides a quantitative method for deciding where and how much storage to install to meet system-level frequency performance standards.

5.7.3. Bridging Theory and Practice

The theoretical development was intentionally complemented by simulation-based validation in PowerFactory, enabling engineers to observe how changes in model parameters translate into measurable system behavior. For example, varying the synthetic inertia gain ( K g ) produces a proportional change in frequency Nadir, illustrating how theoretical constants govern physical responses. This combined analytical–simulation approach ensures that the model remains both mathematically rigorous and operationally interpretable.

5.7.4. Engineering Relevance and Applicability

The methodology ultimately supports decision-making in grid operation and planning. Practitioners can use the derived equations to calibrate BESS controllers, estimate required synthetic inertia under reduced-inertia scenarios, and define capacity margins for frequency stability. In this way, the theoretical analysis forms the backbone of a practical engineering tool that bridges academic modeling and real-world implementation.

6. Conclusions

In this article, the impact on system frequency of the IEEE 39-Bus power network was evaluated, considering a multi-unit BESS scheme whose sizes and locations were selected using two optimization algorithms: Genetic Algorithm (GA) and Particle Swarm Optimization (PSO). The objective was to deliver synthetic inertia based on the system’s RoCoF. The test system was developed using the electrical system analysis tool DIgSILENT PowerFactory.
Three simulation scenarios were considered based on the system’s available rotational inertia. Case 1 corresponds to 100% of the original rotational inertia, Case 2 to 50%, and Case 3 to 25%. For all scenarios, the frequency behavior was analyzed by assessing the frequency nadir, zenith, and steady-state frequency.
With the integration of the optimization algorithms, a total of nine scenarios were evaluated, as shown in Figure 10, Figure 11 and Figure 12, including the cases where BESS units were not deployed. The general conclusions of this study are as follows:
The operation of the BESS scheme enables frequency to remain within acceptable limits during frequency events. The frequency curves exhibit improved nadirs compared to cases without BESS deployment. The inclusion of BESS is crucial in systems where rotational inertia decreases due to the integration of renewable energy sources that do not contribute inertia.
Regarding the performance of the GA and PSO algorithms, PSO achieved better nadir values with less installed BESS power, making it a more energy-efficient tool from the perspective of the power system. In all scenarios where the BESS size and location were optimized, a better frequency response was observed.

Author Contributions

Conceptualization, J.A.-R., S.B.-M., J.D.V.-G. and J.W.G.-S.; Data curation, S.B.-M.; Formal analysis, J.A.-R., S.B.-M., J.D.V.-G. and J.W.G.-S.; Funding acquisition, S.B.-M.; Investigation, J.A.-R., S.B.-M., J.D.V.-G. and J.W.G.-S.; Methodology, J.A.-R., S.B.-M., J.D.V.-G. and J.W.G.-S.; Project administration, J.A.-R. and S.B.-M.; Resources, J.A.-R., S.B.-M., J.D.V.-G. and J.W.G.-S.; Software, S.B.-M.; Supervision, J.D.V.-G. and J.W.G.-S.; Validation, J.A.-R.; Test, J.A.-R. and S.B.-M.; Visualization, J.A.-R., S.B.-M., J.D.V.-G. and J.W.G.-S.; Writing—original draft, J.A.-R. and S.B.-M.; Writing—review and editing, J.A.-R., S.B.-M., J.D.V.-G. and J.W.G.-S.; All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported in part by Minciencias and ANH under contract 111259, agreement 112721-046-2025–Flexibility AI, (UPB cod 75430852). And to UPB in the Project under Grant 779C-10/22-26 (51599480).

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.

Acknowledgments

This work was supported in part by Minciencias and ANH under contract 111259, agreement 112721-046-2025–Flexibility AI, (UPB cod 75430852). And to UPB in the Project under Grant 779C-10/22-26 (51599480). The authors would like to acknowledge Institución Universitaria Pascual Bravo, Proyecto de Investigación “Modelo eléctrico para el planeamiento de operación y expansión de la potencial microrred de la Institución Universitaria Pascual Bravo a partir de la medición localizada de las cargas y la generación distribuida existente”, código PCT00085.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
AGCAutomatic Generation Control
BESSBattery Energy Storage Systems
DERsdistributed energy resources
EFREnhanced Frequency Response
ESSenergy storage systems
GAGenetic Algorithm
IBPSInverter-Based Power Sources
IRinertia response
LFCload frequency control
NMnet metering
PFCprimary frequency control
PFRprimary frequency regulation
PMSG-WTGpermanent magnet synchronous generators
PSOParticle Swarm Optimization
PVphotovoltaic
RoCoFRate of Change of Frequency
SoCstate of charge
VIvirtual inertia

References

  1. Tan, Z.; Li, X.; He, L.; Li, Y.; Huang, J. Primary Frequency Control with BESS Considering Adaptive SoC Recovery. Int. J. Electr. Power Energy Syst. 2020, 117, 105588. [Google Scholar] [CrossRef]
  2. Afshar, Z.; Bhogaraju, I.; Rahmanei, H.; Farasat, M. Hierarchical Frequency and SOC Control of Power Grids with Battery Energy Storage Systems. IEEE Trans. Power Electron. 2024, 39, 7925–7937. [Google Scholar] [CrossRef]
  3. Zhang, S.; Liu, H.; Wang, F.; Yan, T.; Wang, K. Secondary Frequency Control Strategy for BESS Considering Their Degree of Participation. Energy Rep. 2020, 6, 594–602. [Google Scholar] [CrossRef]
  4. Trinh, D.T.; Wu, Y.K.; Pham, M.H. A Novel Load Frequency Control Strategy for a Modern Power System by Considering State-Space Modeling and Stability Analysis. IEEE Access 2024, 12, 115085–115101. [Google Scholar] [CrossRef]
  5. Zhou, D.; Zou, Z.; Dan, Y.; Wang, C.; Teng, C.; Zhu, Y. An Integrated Strategy for Hybrid Energy Storage Systems to Stabilize the Frequency of the Power Grid Through Primary Frequency Regulation. Energies 2025, 18, 246. [Google Scholar] [CrossRef]
  6. Okafor, C.E.; Folly, K.A. Provision of Additional Inertia Support for a Power System Network Using Battery Energy Storage System. IEEE Access 2023, 11, 74936–74952. [Google Scholar] [CrossRef]
  7. Sitompul, S.; Hanawa, Y.; Bupphaves, V.; Fujita, G. State of Charge Control Integrated with Load Frequency Control for BESS in Islanded Microgrid. Energies 2020, 13, 4657. [Google Scholar] [CrossRef]
  8. Sanjareh, M.B.; Nazari, M.H.; Hosseinian, S.H. A novel strategy for frequency control of islanded greenhouse with cooperative usage of BESS and LED lighting loads. Electr. Eng. 2020, 103, 265–277. [Google Scholar] [CrossRef]
  9. Rostami, S.M.; Hamzeh, M. An Adaptive Multi-Functional Control Strategy for Power Management and Voltage-Frequency Regulation of PV, BESS, and Hybrid Units in a Microgrid. IEEE Trans. Smart Grid 2024, 15, 3446–3458. [Google Scholar] [CrossRef]
  10. Ghafouri, S.; Gharehpetian, G.B.; Naderi, M.S.; Mahdavi, M.S. An Integrated Multi-Function Control Scheme for Independent BESS in Islanded Synchronous Generator-Based Microgrids. IEEE Trans. Ind. Inform. 2024, 20, 13232–13239. [Google Scholar] [CrossRef]
  11. Som, S.; Chakrabarti, S.; Sahoo, S.R.; Ghosh, A.; Liang, X. BESS Reserve-Based Frequency Support During Emergency in Islanded Residential Microgrids. IEEE Trans. Sustain. Energy 2023, 14, 1702–1713. [Google Scholar] [CrossRef]
  12. Xiong, L.; Huang, S.; Zhou, Y.; Li, P.; Wang, Z.; Khan, M.W.; Wang, J.; Niu, T.; Ma, M. Voltage and Frequency Regulation with WT-PV-BESS in Remote Weak Grids via Fixed-Time Containment Control. IEEE Trans. Power Syst. 2023, 38, 2719–2735. [Google Scholar] [CrossRef]
  13. Masood, N.A.; Shazon, M.N.H.; Ahmed, H.M.; Deeba, S.R. Mitigation of Over-Frequency through Optimal Allocation of BESS in a Low-Inertia Power System. Energies 2020, 13, 4555. [Google Scholar] [CrossRef]
  14. Hasan, A.K.; Haque, M.H.; Aziz, S.M. Enhancing Frequency Response Characteristics of Low Inertia Power Systems Using Battery Energy Storage. IEEE Access 2024, 12, 116861–116874. [Google Scholar] [CrossRef]
  15. Jufri, F.H.; Jung, J.; Sudiarto, B.; Garniwa, I. Development of Virtual Inertia Control with State-of-Charge Recovery Strategy Using Coordinated Secondary Frequency Control for Optimized Battery Capacity in Isolated Low Inertia Grid. Energies 2023, 16, 5463. [Google Scholar] [CrossRef]
  16. Shazon, M.N.H.; Nahid-Al-Masood; Ahmed, H.M.; Deeba, S.R.; Hossain, E. Exploring the Utilization of Energy Storage Systems for Frequency Response Adequacy of a Low Inertia Power Grid. IEEE Access 2021, 9, 129933–129950. [Google Scholar] [CrossRef]
  17. Zhang, Y.; Kou, P.; Zhang, Z.; Tian, R.; Yan, Y.; Liang, D. Optimal Sizing and Siting of BESS in High Wind Penetrated Power Systems: A Strategy Considering Frequency and Voltage Control. IEEE Trans. Sustain. Energy 2024, 15, 642–657. [Google Scholar] [CrossRef]
  18. Phung, B.N.; Wu, Y.K.; Pham, M.H. Coordinated Frequency Regulation between DFIG-VSWTs and BESS Hybrid Systems. Energies 2024, 17, 3099. [Google Scholar] [CrossRef]
  19. Chiu, B.K.; Lee, K.Y.; Hsu, Y.Y. Battery Energy Storage System Damper Design for a Microgrid with Wind Generators Participating in Frequency Regulation. Energies 2023, 16, 7439. [Google Scholar] [CrossRef]
  20. Cirio, D.; Conte, F.; Gabriele, B.; Gandolfi, C.; Massucco, S.; Rapizza, M.R.; Silvestro, F. Fast Frequency Regulation From a Wind Farm-BESS Unit by Model Predictive Control: Method and Hardware-in-the-Loop Validation. IEEE Trans. Sustain. Energy 2023, 14, 2049–2061. [Google Scholar] [CrossRef]
  21. Lin, C.H.; Wu, Y.K. Coordinated Frequency Control Strategy for VSC-HVDC-Connected Wind Farm and Battery Energy Storage System. IEEE Trans. Ind. Appl. 2023, 59, 5314–5328. [Google Scholar] [CrossRef]
  22. Ahmad, A.S.; Chattopadhyay, S.K.; Panigrahi, B.K. A Quantitative Assessment of the Economic Viability of Photovoltaic Battery Energy Storage Systems. Energies 2024, 17, 6279. [Google Scholar] [CrossRef]
  23. Rancilio, G.; Bovera, F.; Merlo, M. Revenue Stacking for BESS: Fast Frequency Regulation and Balancing Market Participation in Italy. Int. Trans. Electr. Energy Syst. 2022, 2022, 1894003. [Google Scholar] [CrossRef]
  24. Dam, M.R.; van der Laan, M.D. Techno-Economic Assessment of Battery Systems for PV-Equipped Households with Dynamic Contracts: A Case Study of The Netherlands. Energies 2024, 17, 2991. [Google Scholar] [CrossRef]
  25. Liu, Y.; Lu, Q.; Yu, Z.; Chen, Y.; Yang, Y. Reinforcement Learning-Enhanced Adaptive Scheduling of Battery Energy Storage Systems in Energy Markets. Energies 2024, 17, 5425. [Google Scholar] [CrossRef]
  26. Mashlakov, A.; Lensu, L.; Kaarna, A.; Tikka, V.; Honkapuro, S. Probabilistic Forecasting of Battery Energy Storage State-of-Charge under Primary Frequency Control. IEEE J. Sel. Areas Commun. 2020, 38, 96–109. [Google Scholar] [CrossRef]
  27. Shobayo, L.O.; Dao, C.D. Smart Integration of Renewable Energy Sources Employing Setpoint Frequency Control—An Analysis on the Grid Cost of Balancing. Sustainability 2024, 16, 9906. [Google Scholar] [CrossRef]
  28. Zecchino, A.; Yuan, Z.; Sossan, F.; Cherkaoui, R.; Paolone, M. Optimal Provision of Concurrent Primary Frequency and Local Voltage Control from a BESS Considering Variable Capability Curves: Modelling and Experimental Assessment. Electr. Power Syst. Res. 2021, 190, 106643. [Google Scholar] [CrossRef]
  29. Meng, Y.; Li, X.; Liu, X.; Cui, X.; Xu, P.; Li, S. A Control Strategy for Battery Energy Storage Systems Participating in Primary Frequency Control Considering the Disturbance Type. IEEE Access 2021, 9, 102004–102018. [Google Scholar] [CrossRef]
  30. Alcaide-Godinez, I.; Bai, F.; Saha, T.K.; Memisevic, R. Contingency Reserve Evaluation for Fast Frequency Response of Multiple Battery Energy Storage Systems in a Large-scale Power Grid. CSEE J. Power Energy Syst. 2023, 9, 873–883. [Google Scholar] [CrossRef]
  31. Chae, D.J.; Kook, K.S. Inertia Energy-Based Required Capacity Calculation of BESS for Achieving Carbon Neutrality in Korean Power System. Energies 2024, 17, 1843. [Google Scholar] [CrossRef]
  32. Becchi, L.; Belloni, E.; Bindi, M.; Intravaia, M.; Grasso, F.; Lozito, G.M.; Piccirilli, M.C. A Computationally Efficient Rule-Based Scheduling Algorithm for Battery Energy Storage Systems. Sustainability 2024, 16, 10313. [Google Scholar] [CrossRef]
  33. Falcão, D.M.; Tao, S.; Taranto, G.N.; Parreiras, T.J.M.A.; Bento, M.E.C.; Huanca, D.H.; Muzitano, H.; Esmeraldo, P.; Lima, P.; Monteath, L.; et al. Case Studies of Battery Energy Storage System Applications in the Brazilian Transmission System. Energies 2024, 17, 5678. [Google Scholar] [CrossRef]
  34. Bhushan, M.A.S.; Sudhakaran, M.; Dasarathan, S.; E, M. Integration of a Heterogeneous Battery Energy Storage System into the Puducherry Smart Grid with Time-Varying Loads. Energies 2025, 18, 428. [Google Scholar] [CrossRef]
  35. Yang, L.; Wu, X.; Huang, B.; Li, Z. Sustainable Industrial Energy Supply Systems with Integrated Renewable Energy, CCUS, and Energy Storage: A Comprehensive Evaluation. Sustainability 2025, 17, 712. [Google Scholar] [CrossRef]
  36. Javadi, M.; Gong, Y.; Chung, C.Y. Frequency Stability Constrained BESS Sizing Model for Microgrids. IEEE Trans. Power Syst. 2024, 39, 2866–2878. [Google Scholar] [CrossRef]
  37. Sun, L.; Qiu, J.; Han, X.; Yin, X.; Dong, Z. Per-use-share rental strategy of distributed BESS in joint energy and frequency control ancillary services markets. Appl. Energy 2020, 277, 115589. [Google Scholar] [CrossRef]
  38. Cao, Y.; Wu, Q.; Zhang, H.; Li, C.; Zhang, X. Chance-Constrained Optimal Configuration of BESS Considering Uncertain Power Fluctuation and Frequency Deviation Under Contingency. IEEE Trans. Sustain. Energy 2022, 13, 2291–2303. [Google Scholar] [CrossRef]
  39. Mitsugi, Y.; Shigemasa, T.; Terazono, T.; Hashiguchi, H.; Ota, Y.; Nakajima, T. Control Hardware-in-the-Loop Simulation on Fast Frequency Response of Battery Energy Storage System Equipped With Advanced Frequency Detection Algorithm. IEEE Trans. Ind. Appl. 2021, 57, 5541–5551. [Google Scholar] [CrossRef]
  40. Nguyen, H.C.; Tran, Q.T.; Besanger, Y. Effectiveness of BESS in Improving Frequency Stability of an Island Grid. IEEE Trans. Ind. Appl. 2024, 60, 8203–8212. [Google Scholar] [CrossRef]
  41. Gao, J.; Sun, Y.; Su, X. A Risk Preference-Based Optimization Model for User-Side Energy Storage System Configuration from the Investor’s Perspective. Electricity 2025, 6, 3. [Google Scholar] [CrossRef]
  42. Lee, J.; Han, S.; Lee, D. Optimizing the Location of Frequency Regulation Energy Storage Systems for Improved Frequency Stability. Batteries 2023, 9, 592. [Google Scholar] [CrossRef]
  43. Parajuli, A.; Gurung, S.; Chapagain, K. Optimal Placement and Sizing of Battery Energy Storage Systems for Improvement of System Frequency Stability. Electricity 2024, 5, 662–683. [Google Scholar] [CrossRef]
  44. Babu, V.V.; Roselyn, J.P.; Nithya, C.; Sundaravadivel, P. Development of Grid-Forming and Grid-Following Inverter Control in Microgrid Network Ensuring Grid Stability and Frequency Response. Electronics 2024, 13, 1958. [Google Scholar] [CrossRef]
  45. Budin, L.; Delimar, M. Renewable Energy Community Sizing Based on Stochastic Optimization and Unsupervised Clustering. Sustainability 2025, 17, 600. [Google Scholar] [CrossRef]
  46. Fotis, G. An improved arithmetic method for determining the optimum placement and size of EV charging stations. Comput. Electr. Eng. 2024, 120, 109840. [Google Scholar] [CrossRef]
  47. Gonçalves, A.C.R.; Costoya, X.; Nieto, R.; Liberato, M.L.R. Extreme weather events on energy systems: A comprehensive review on impacts, mitigation, and adaptation measures. Sustain. Energy 2024, 11, 4. [Google Scholar] [CrossRef]
  48. Li, Y.; Xiao, D.; Chen, H.; Cai, W.; do Prado, J.C. Analyzing the Wind-Dominant Electricity Market under Coexistence of Regulated and Deregulated Power Trading. Energy Eng. 2024, 121, 2093–2127. [Google Scholar] [CrossRef]
  49. Kundur, P. Power System Stability and Control by Prabha Kundur; McGraw-Hill Inc.: Columbus, OH, USA, 1994; pp. 1–1199. [Google Scholar]
  50. Muftić Dedović, M.; Avdaković, S.; Musić, M.; Kuzle, I. Enhancing power system stability with adaptive under frequency load shedding using synchrophasor measurements and empirical mode decomposition. Int. J. Electr. Power Energy Syst. 2024, 160, 110133. [Google Scholar] [CrossRef]
  51. Xiang, M.; Yang, Z.; Yu, J. Hierarchical AGC Dispatch with Detailed Modeling of Energy Storage System Behaviors. IEEE Trans. Power Syst. 2023, 38, 1689–1701. [Google Scholar] [CrossRef]
  52. Johnson, A. System Technical Performance—Simulated Inertia. 2010. Available online: https://www.neso.energy/document/10376/download (accessed on 10 December 2025).
  53. Yu, M.; Dyśko, A.; Booth, C.D.; Roscoe, A.J.; Zhu, J. A review of control methods for providing frequency response in VSC-HVDC transmission systems. In Proceedings of the 2014 49th International Universities Power Engineering Conference (UPEC), Cluj-Napoca, Romania, 2–5 September 2014; pp. 1–6. [Google Scholar] [CrossRef]
  54. Li, Q.; Li, Q.; Tang, W.; Wang, C. Capacitor Inertia Enhanced Control Strategy of Three-Port Grid-Forming Converters. In Proceedings of the 2025 8th International Conference on Electrical Engineering and Green Energy (CEEGE), Yangzhou, China, 4–6 July 2025; pp. 202–206. [Google Scholar] [CrossRef]
  55. Chen, W.; Zheng, T.; Nian, H.; Yang, D.; Yang, W.; Geng, H. Multi-Objective Adaptive Inertia and Droop Control Method of Wind Turbine Generators. IEEE Trans. Ind. Appl. 2023, 59, 7789–7799. [Google Scholar] [CrossRef]
  56. Saldarriaga-Zuluaga, S.D.; López-Lezama, J.M.; Muñoz-Galeano, N. Optimal coordination of overcurrent relays in microgrids considering a non-standard characteristic. Energies 2020, 13, 922. [Google Scholar] [CrossRef]
  57. Almazrouei, O.S.M.B.H.; Magalingam, P.; Hasan, M.K.; Shanmugam, M. A Review on Attack Graph Analysis for IoT Vulnerability Assessment: Challenges, Open Issues, and Future Directions. IEEE Access 2023, 11, 44350–44376. [Google Scholar] [CrossRef]
  58. Saldarriaga-Zuluaga, S.D.; López-Lezama, J.M.; Muñoz-Galeano, N. Adaptive protection coordination scheme in microgrids using directional over-current relays with non-standard characteristics. Heliyon 2021, 7, e06665. [Google Scholar] [CrossRef]
  59. Huamannahui Huanca, D.; Gallego Pareja, L.A. Chu and Beasley Genetic Algorithm to Solve the Transmission Network Expansion Planning Problem Considering Active Power Losses. IEEE Lat. Am. Trans. 2021, 19, 1967–1975. [Google Scholar] [CrossRef]
  60. Bustamante-Mesa, S.; Gonzalez-Sanchez, J.W.; Saldarriaga-Zuluaga, S.D.; López-Lezama, J.M.; Muñoz-Galeano, N. Optimal Estimation of Under-Frequency Load Shedding Scheme Parameters by Considering Virtual Inertia Injection. Energies 2024, 17, 279. [Google Scholar] [CrossRef]
  61. Dandotia, A.; Gupta, M.K.; Banerjee, M.K.; Singh, S.K.; Đurin, B.; Dogančić, D.; Kranjčić, N. Optimal Placement and Size of SVC with Cost-Effective Function Using Genetic Algorithm for Voltage Profile Improvement in Renewable Integrated Power Systems. Energies 2023, 16, 2637. [Google Scholar] [CrossRef]
  62. Bakir, H.; Kulaksiz, A.A. Modelling and voltage control of the solar-wind hybrid micro-grid with optimized STATCOM using GA and BFA. Eng. Sci. Technol. Int. J. 2020, 23, 576–584. [Google Scholar] [CrossRef]
  63. Saldarriaga-Loaiza, J.D.; Saldarriaga-Zuluaga, S.D.; López-Lezama, J.M.; Villada-Duque, F.; Muñoz-Galeano, N. Optimal Structuring of Investments in Electricity Generation Projects in Colombia with Non-Conventional Energy Sources. Sustainability 2022, 14, 15123. [Google Scholar] [CrossRef]
  64. Saldarriaga-Zuluaga, S.D.; López-Lezama, J.M.; Muñoz-Galeano, N. Optimal coordination of over-current relays in microgrids considering multiple characteristic curves. Alex. Eng. J. 2021, 60, 2093–2113. [Google Scholar] [CrossRef]
  65. Iqbal, A.; Singh, G.K. PSO based controlled six-phase grid connected induction generator for wind energy generation. CES Trans. Electr. Mach. Syst. 2021, 5, 41–49. [Google Scholar] [CrossRef]
  66. Zaini, F.A.; Sulaima, M.F.; Razak, I.A.W.A.; Zulkafli, N.I.; Mokhlis, H. A Review on the Applications of PSO-Based Algorithm in Demand Side Management: Challenges and Opportunities. IEEE Access 2023, 11, 53373–53400. [Google Scholar] [CrossRef]
  67. Alajrash, B.H.; Salem, M.; Swadi, M.; Senjyu, T.; Kamarol, M.; Motahhir, S. A comprehensive review of FACTS devices in modern power systems: Addressing power quality, optimal placement, and stability with renewable energy penetration. Energy Rep. 2024, 11, 5350–5371. [Google Scholar] [CrossRef]
Figure 1. Simulation of the impact of a 50% inertia loss in the IEEE 39-bus system. Taken and adapted from.
Figure 1. Simulation of the impact of a 50% inertia loss in the IEEE 39-bus system. Taken and adapted from.
Energies 18 06552 g001
Figure 2. Inertia Emulation Diagram in BESS.
Figure 2. Inertia Emulation Diagram in BESS.
Energies 18 06552 g002
Figure 3. BESS Model.
Figure 3. BESS Model.
Energies 18 06552 g003
Figure 4. BESS Frequency control.
Figure 4. BESS Frequency control.
Energies 18 06552 g004
Figure 5. Flowchart of the implemented GA.
Figure 5. Flowchart of the implemented GA.
Energies 18 06552 g005
Figure 6. Flowchart of Particle Swarm Optimization (PSO).
Figure 6. Flowchart of Particle Swarm Optimization (PSO).
Energies 18 06552 g006
Figure 7. Co-simulation flowchart for the implemented Genetic Algorithm (GA) optimization.
Figure 7. Co-simulation flowchart for the implemented Genetic Algorithm (GA) optimization.
Energies 18 06552 g007
Figure 8. Co-simulation flowchart for the implemented Particle Swarm Optimization (PSO).
Figure 8. Co-simulation flowchart for the implemented Particle Swarm Optimization (PSO).
Energies 18 06552 g008
Figure 9. Heatmap of installed power per BUS.
Figure 9. Heatmap of installed power per BUS.
Energies 18 06552 g009
Figure 10. Frequency Response at 100% Rotational Inertia.
Figure 10. Frequency Response at 100% Rotational Inertia.
Energies 18 06552 g010
Figure 11. Frequency Response at 50% Rotational Inertia.
Figure 11. Frequency Response at 50% Rotational Inertia.
Energies 18 06552 g011
Figure 12. Frequency Response at 25% Rotational Inertia.
Figure 12. Frequency Response at 25% Rotational Inertia.
Energies 18 06552 g012
Figure 13. Objective function value versus number of iterations for the GA and PSO.
Figure 13. Objective function value versus number of iterations for the GA and PSO.
Energies 18 06552 g013
Table 1. Comparative contributions on BESS siting and sizing for frequency stability enhancement.
Table 1. Comparative contributions on BESS siting and sizing for frequency stability enhancement.
ReferenceStrategy/ContributionApplicationKey Benefit
This ArticleBESS model emulating inertia from RoCoF + Optimization (PSO, GA)Low-inertia power systemsJoint optimization of BESS siting and sizing considering Nadir, Zenith, RoCoF, and steady-state frequency
[13]PSO-based optimal sitingHigh wind penetration systemsMitigation of over-frequency events
[17]MPC for coordinated controlHigh wind penetration systemsOptimization of frequency and voltage regulation
[43]Metaheuristic optimization (PSO, FA, BA)Frequency supportOptimal siting and sizing of BESS
[6]Inertial support with BESSHigh renewable energy networksImportance of optimal BESS sizing
[31]Required BESS capacity estimationSouth Korean power systemFrequency control under high renewable penetration
[36]mixed-integer linear programming + Benders decompositionMicrogridsTransient dynamics integration for stability improvement
[40]PSO-based control parameter optimizationIslanded networksEnhancement of frequency stability
[5]Hybrid control of BESS and pumped hydro energy storage (BESS + PHES)Primary Frequency Regulation (PFR)Improvement of frequency support in high-renewable grids
Table 2. Gains of the inertial control module.
Table 2. Gains of the inertial control module.
GainNameParameter
K s Derivative gain1
K f Filter gain12
T f Filter time constant (seconds)20
K m Frequency gain1
K c External gain1
K g Overall gain−1
Table 3. IEEE 39-Bus System lines.
Table 3. IEEE 39-Bus System lines.
NameTerminal iTerminal jR1 ( Ω )X1 ( Ω )Length (km)
Line 01–02Bus 01Bus 024.16587648.91928163.0643
Line 01–39Bus 01Bus 391.1902529.7562599.1875
Line 02–03Bus 02Bus 031.54732517.9727759.90925
Line 02–25Bus 02Bus 258.3317510.2361534.1205
Line 03–04Bus 03Bus 041.54732525.3523384.50775
Line 03–18Bus 03Bus 181.30927515.8303352.76775
Line 04–05Bus 04Bus 050.952200115.235250.784
Line 04–14Bus 04Bus 140.952199915.3542351.18075
Line 05–06Bus 05Bus 060.238053.0946510.3155
Line 05–08Bus 05Bus 080.952199913.330844.436
Line 06–07Bus 06Bus 070.714150110.950336.501
Line 06–11Bus 06Bus 110.83317519.76005132.5335
Line 07–08Bus 07Bus 080.47610015.4751518.2505
Line 08–09Bus 08Bus 092.73757443.20608144.0202
Line 09–39Bus 09Bus 391.1902529.7562599.1875
Line 10–11Bus 10Bus 110.47610015.11807517.06025
Line 10–13Bus 10Bus 130.47610015.11807517.06025
Line 13–14Bus 13Bus 141.07122512.0215340.07175
Line 14–15Bus 14Bus 152.1424525.8284386.09475
Line 15–16Bus 15Bus 161.07122511.1883537.2945
Line 16–17Bus 16Bus 170.833175110.5932335.31075
Line 16–19Bus 16Bus 191.904423.2098877.36625
Line 16–21Bus 16Bus 210.952200116.0683753.56125
Line 16–24Bus 16Bus 240.35707517.02247623.40825
Line 17–18Bus 17Bus 180.83317519.76005132.5335
Line 17–27Bus 17Bus 271.54732520.5913368.63775
Line 21–22Bus 21Bus 220.952200116.663555.545
Line 22–23Bus 22Bus 230.714150111.426438.088
Line 23–24Bus 23Bus 242.6185541.65875138.8625
Line 25–26Bus 25Bus 263.808838.44508128.1503
Line 26–27Bus 26Bus 271.6663517.4966858.32225
Line 26–28Bus 26Bus 285.11807556.41785188.0595
Line 26–29Bus 26Bus 296.78442574.39063247.9688
Line 28–29Bus 28Bus 291.6663517.9727759.90925
Table 4. IEEE 39-Bus System Transformers.
Table 4. IEEE 39-Bus System Transformers.
NameRated Power (MVA)HVVnom AT (kV)/Vnom BT (kV)LVShort-Circuit Voltage (%)
Trf 02–30 YNy01000YN345/16.5Y18.1
Trf 06–31 YNy0700YN345/16.5Y17.5
Trf 10–32 YNy0800YN345/16.5Y16.0
Trf 11–12 YNy0300YN345/138Y13.06
Trf 13–12 YNy0300YN345/138Y13.06
Trf 19–20 YNy01000YN345/230Y13.82
Trf 19–33 YNy0800YN345/16.5Y11.37
Trf 20–34 YNy0300YN230/16.5Y10.81
Trf 22–35 YNy0800YN345/16.5Y11.44
Trf 23–36 YNy0700YN345/16.5Y19.04
Trf 25–37 YNy0700YN345/16.5Y16.25
Trf 29–38 YNy01000YN345/16.5Y15.62
Table 5. Results for different inertia levels and BESS configurations.
Table 5. Results for different inertia levels and BESS configurations.
CaseInertia (%) P BESS -GA P BESS -PSONadir-PSONadir-GAZenith-PSOZenith-GAFss-PSOFss-GA
1100287.4498285.792559.001359.007159.407759.407659.401559.4041
NoNo57.9169-59.0997-59.0997-
250285.5669277.107458.702058.679059.414259.412259.413059.4120
NoNo57.4833-59.0631-59.0503-
325307.4428296.072458.400158.404959.475259.480759.474159.4768
NoNo56.9821-59.0169-59.0112-
Table 6. Results of meta-heuristic techniques.
Table 6. Results of meta-heuristic techniques.
BUSGA_25PSO_25GA_50PSO_50GA_100PSO_100
StatePowerStatePowerStatePowerStatePowerStatePowerStatePower
1111.3818150000000115.9185
2119.912613.64630000115.619400
3000000142.0124125.128100
40010.1111.0413000000
5000000000010.1
60000114.9399000000
70010.1001500000
80000121.635800118.8687150
900000012.03200000
100010.10000118.519910.1
110010.1000015.977000
120000000000150
13135.66970000000000
14136.748910.100000000
150000126.2278000010.3021
16114.852600121.528710.1120.250810.1
17134.916710.100000000
1800000010.10000
190000115.335510.5995127.943510.1
200000128.1772000000
2119.67430000000000
220000113.5072000000
230010.1125.580900119.342400
24124.733200114.0077000000
25000000000000
26131.3633141.42610000120.293410.4824
2700150125.3828111.7561133.515300
280010.1119.256310.10010.1
29000000120.0354125.774200
30113.106010.100000000
3100150111.60831500000
32125.5333000000122.6197118.4893
33129.9492000000126.723200
34119.60071500015016.873510.1
350000000000150
360010.10010.655100150
37000016.9716149.71670000
3800150130.36530000150
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Gonzalez-Sanchez, J.W.; Aparicio-Ruidiaz, J.; Bustamante-Mesa, S.; Velásquez-Gómez, J.D. Optimal Location and Sizing of BESS Systems with Inertia Emulation to Improve Frequency Stability in Low-Inertia Electrical Systems. Energies 2025, 18, 6552. https://doi.org/10.3390/en18246552

AMA Style

Gonzalez-Sanchez JW, Aparicio-Ruidiaz J, Bustamante-Mesa S, Velásquez-Gómez JD. Optimal Location and Sizing of BESS Systems with Inertia Emulation to Improve Frequency Stability in Low-Inertia Electrical Systems. Energies. 2025; 18(24):6552. https://doi.org/10.3390/en18246552

Chicago/Turabian Style

Gonzalez-Sanchez, Jorge W., Jose Aparicio-Ruidiaz, Santiago Bustamante-Mesa, and Juan D. Velásquez-Gómez. 2025. "Optimal Location and Sizing of BESS Systems with Inertia Emulation to Improve Frequency Stability in Low-Inertia Electrical Systems" Energies 18, no. 24: 6552. https://doi.org/10.3390/en18246552

APA Style

Gonzalez-Sanchez, J. W., Aparicio-Ruidiaz, J., Bustamante-Mesa, S., & Velásquez-Gómez, J. D. (2025). Optimal Location and Sizing of BESS Systems with Inertia Emulation to Improve Frequency Stability in Low-Inertia Electrical Systems. Energies, 18(24), 6552. https://doi.org/10.3390/en18246552

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop