Next Article in Journal
Autonomous Frequency–Voltage Regulation Strategy for Weak-Grid Renewable-Energy Stations Based on Hybrid Supercapacitors and Cascaded H-Bridge Converters
Previous Article in Journal
Proactive Cooling Control Algorithm for Data Centers Based on LSTM-Driven Predictive Thermal Analysis
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Optimizing Energy Storage Systems with PSO: Improving Economics and Operations of PMGD—A Chilean Case Study

by
Juan Tapia-Aguilera
1,
Luis Fernando Grisales-Noreña
2,
Roberto Eduardo Quintal-Palomo
3,*,
Oscar Danilo Montoya
4 and
Daniel Sanin-Villa
5
1
Departamento de Ingeniería Eléctrica, Facultad de Ingeniería, Universidad de Talca, Curicó 3340000, Chile
2
Grupo de Investigación en Alta Tensión–GRALTA, Escuela de Ingeniería Eléctrica y Electrónica, Universidad del Valle, Cali 760015, Colombia
3
School of Engineering, Universidad Autónoma de Yucatán, Mérida 97000, Mexico
4
Grupo de Compatibilidad e Interferencia Electromagnética (GCEM), Facultad de Ingeniería, Universidad Distrital Francisco José de Caldas, Bogotá 110231, Colombia
5
Área de Industria, Materiales y Energía, Universidad EAFIT, Medellín 050022, Colombia
*
Author to whom correspondence should be addressed.
Appl. Syst. Innov. 2026, 9(1), 22; https://doi.org/10.3390/asi9010022
Submission received: 21 November 2025 / Revised: 18 December 2025 / Accepted: 9 January 2026 / Published: 14 January 2026
(This article belongs to the Section Applied Mathematics)

Abstract

This work develops a methodology for operating Battery Energy Storage Systems (BESSs) in distribution networks, connected in parallel with a medium- and small-scale photovoltaic Distributed Generator (PMGD), focusing on a real project located in the O’Higgins region of Chile. The objective is to increase energy sales by the PMGD while ensuring compliance with operational constraints related to the grid, PMGD, and BESSs, and optimizing renewable energy use. A real distribution network from Compañía General de Electricidad (CGE) comprising 627 nodes was simplified into a validated three-node, two-line equivalent model to reduce computational complexity while maintaining accuracy. A mathematical model was designed to maximize economic benefits through optimal energy dispatch, considering solar generation variability, demand curves, and seasonal energy sales and purchasing prices. An energy management system was proposed based on a master–slave methodology composed of Particle Swarm Optimization (PSO) and an hourly power flow using the successive approximation method. Advanced optimization techniques such as Monte Carlo (MC) and the Genetic Algorithm (GAP) were employed as comparison methods, supported by a statistical analysis evaluating the best and average solutions, repeatability, and processing times to select the most effective optimization approach. Results demonstrate that BESS integration efficiently manages solar generation surpluses, injecting energy during peak demand and high-price periods to maximize revenue, alleviate grid congestion, and improve operational stability, with PSO proving particularly efficient. This work underscores the potential of BESS in PMGD to support a more sustainable and efficient energy matrix in Chile, despite regulatory and technical challenges that warrant further investigation.

1. Introduction

1.1. Scope and Problem Description

Over the last few decades, a strong global commitment has emerged to mitigate the adverse effects of climate change on people’s quality of life [1]. These effects have mainly been caused by excessive greenhouse gas emissions into the atmosphere, stemming from agro-industrial processes, C O 2 emissions from living organisms, and electricity generation and consumption, the latter being the most concerning worldwide. To address these challenges, national (Chile) and international agreements have been established, urging governments to implement changes in energy matrices and consumption habits [2]. In Chile, there has been a significant trend toward investing in photovoltaic and wind energy projects over the past few years. This has resulted in a 29.1% increase in installed solar energy capacity between December 2021 and 2022, while wind energy capacity grew by 21.8%. These developments have positioned Chile as a leader in Latin America in Non-Conventional Renewable Energy (NCRE) generation [3].
The integration of numerous renewable energy projects into Chile’s electrical grid has led to a high share of renewable generation, particularly solar power, which reached a gross installed capacity of 7705.5 MW by 2023, accounting for 23.6% of the total national capacity [3]. The energy from these projects is transmitted to high-demand areas through the National Electric System (SEN). However, one major challenge for the SEN is the concentration of photovoltaic projects in northern Chile, a region characterized by excellent solar radiation and the absence of agricultural production. Solar power generation typically peaks between 12:00 and 14:00, causing bottlenecks and overloading transmission and distribution lines, which saturates the system. This forces generators to curtail energy production, wasting solar potential that could mitigate environmental impact and meet national energy needs. Conversely, during low-solar-radiation hours, large amounts of power are required, often supplied by more environmentally damaging and costly generation sources. By November 2022, the unutilized energy amounted to 710.77 GWh [4], a figure with significant economic and environmental implications.
In Chile, photovoltaic projects include large utility-scale plants as well as Small Generation Units (PMG) and Small Distributed Generation Units (PMGD), which can reach capacities of up to 9 MW and are connected via distribution substations [5]. These smaller projects have grown substantially, causing saturations in distributed systems, particularly affecting transformers and feeders [6]. According to PMGD capacity reports from the system operator, most substations are saturated, preventing new projects from connecting to the grid.
This document aims to address the challenge of enhancing energy sales potential in PMGDs while accounting for curtailment-related limitations on hourly sales costs. The objective is to improve solar energy utilization and reduce grid operating costs by enhancing the technical condition of the grid. This can be achieved by storing surplus solar generation and injecting it into the SEN during peak demand hours, typically between 18:00 and 22:00, when marginal costs are higher, thereby increasing energy sales revenue for PMGDs. The proposed solution involves implementing Energy Storage Systems (ESSs), which can manage surplus generation and inject it into the grid during periods most relevant to grid operators or owners [7]. Among these systems, Battery Energy Storage Systems (BESSs) are the most advanced and widely implemented.
The objective of this work is to develop and validate an operational optimization framework that maximizes energy sales revenue from PMGD–BESS systems while rigorously enforcing network and operational constraints. The study does not seek to replace detailed distribution system planning, asset siting, or protection studies, but rather to evaluate the feasibility and performance of optimized dispatch strategies under realistic regulatory and operational conditions.

1.2. State of the Art

The literature contains numerous studies on the optimal operation of batteries aimed at improving the economic performance of electrical grids [8]. These works focus on the charging and discharging processes, in which energy management systems draw energy from the grid during low-cost hours and inject it back into the grid during high-cost hours. This approach enhances utilities’ economic benefits and improves grid performance. The findings from these studies can be applied in this paper to optimize revenue from energy sales by PMGDs when a BESS is installed in parallel.
An example of this is the work reported in [9], where the authors formulated the problem of optimal operation of BESSs in Distribution Electrical Systems (DESs). They integrated all technical and operational aspects of the grid into a distributed energy resource environment, including PV generators and BESSs. To solve the nonlinear problem, a master–slave methodology was proposed, combining the Vortex Search Algorithm (VSA) and an Hourly Power Flow method based on Successive Approximations. This approach successfully reduced grid energy purchasing costs by accounting for variations in power demand and generation across two grids in different regions of Colombia. The study employed statistical analysis to demonstrate the solution’s quality and repeatability compared to other works reported in the literature. However, this work did not consider energy sales to the grid or variations in power demand across regions with different climatic seasons, which affect the performance and effectiveness of the battery operation methodology.
The study presented in [10] analyzed the optimal operation of energy storage systems in electrical networks. The authors proposed two optimization strategies: the Gravitational Search Algorithm and a hybrid method combining Particle Swarm Optimization and Genetic Algorithms. The primary goals of the research were to minimize operational costs, enhance voltage profiles, and reduce greenhouse gas emissions. A 30-node test system was used as a case study, and multiple simulation scenarios were performed to evaluate the effectiveness, computational efficiency, and performance of the proposed methodologies. Nevertheless, the study did not incorporate statistical analyses to assess the robustness and reproducibility of the solutions.
The work reported in [11] addresses optimal energy management in smart homes to minimize electricity purchasing costs. The study considers a system that integrates photovoltaic (PV) panels, a BESS, and electrical loads. To address the optimization problem, the Arithmetic Optimization Algorithm (AOA) was applied, demonstrating its effectiveness in efficiently scheduling energy resources. The results highlight significant reductions in electricity costs and improvements in the load responsiveness index while managing power distribution among eight appliances, EV, PV, and BESS. However, the study does not account for external factors such as dynamic electricity pricing, weather variations, or long-term system performance, which could improve the robustness and applicability of the proposed methodology. Furthermore, the work lacks a comparative analysis with other methods reported in the literature, limiting a comprehensive evaluation of its performance.
The study reported in [12] addresses the challenges posed by fluctuating wind turbine output through the integration of a BESS to minimize power losses in a real DES composed by 68 nodes located in the southern region of Sulawesi. The optimization method employed, Galactic Swarm Optimization (GSO), inspired by gravitational forces, was used to determine the optimal location and size of the BESS within the electrical system. MATLAB R2023b (version 23.2)simulations were performed for two scenarios: wind farm output at 100% and 50% capacity. The results showed that the BESS operation led to marginal reductions in active and reactive power losses in both scenarios. The main limitations of this work are related to the absence of constraints representing the BESS, as well as the current limits of the conductors that compose the DES. In addition, the authors did not consider comparison methods or statistical analysis to evaluate the performance of the proposed methodology in terms of solution quality, repeatability, and processing time.
The work reported by the authors of [13] focuses on optimizing energy management in a distributed energy system integrating photovoltaic and battery energy storage systems. The objective function minimizes operational costs while ensuring compliance with constraints related to the battery energy storage system and the electrical grid. Using model predictive control, the methodology optimizes battery operation over a 24-h horizon, considering variations in solar energy generation and demand. Validations conducted through simulation software and real-time testing platforms demonstrate effective performance under diverse grid conditions, pricing structures, and seasonal variations (summer and winter). The results highlight the grid’s efficient operation and emphasize the importance of proper battery storage management in practical applications, particularly alongside photovoltaic systems operating at maximum power point tracking. However, despite promising results in power optimization and cost reduction, the authors overlooked the multi-nodal telescopic topology of the electrical grid. They failed to include comparison methodologies from the existing literature or to conduct statistical analyses to ensure the reliability and consistency of the obtained solutions.
In recent studies, numerous works have reported on improving the economic conditions of distributed energy systems by optimizing the operation of battery energy storage systems together with photovoltaic distributed generation operating at the maximum power point [9,14]. These studies predominantly use metaheuristic optimization methods due to their advantages in handling a large number of variables, reduced mathematical and implementation complexity, and lower investment and operational costs.
However, the proposed strategies often fail to account for the dynamics associated with varying weather conditions and their effects on power demand and photovoltaic generation. Additionally, they frequently neglect integrating constraints related to distributed energy systems in a distributed generation environment, as well as variable energy purchase and sale costs specific to the region where small- and medium-sized distributed generators are located.
It is essential to conduct a statistical analysis to evaluate the impact on solution quality, repeatability, and processing time of the proposed methodologies, and to identify the approach with the best performance for addressing the problem.
Despite the extensive body of literature on the optimal operation of battery energy storage systems in distribution networks, existing contributions can be broadly classified into three main categories. The first group focuses primarily on economic objectives such as cost minimization or energy arbitrage under simplified network representations, often neglecting line thermal constraints and nodal voltage limits. The second group includes detailed power-flow constraints. Still, it usually assumes fixed electricity prices or neglects seasonal variability in both demand and renewable generation, thereby limiting the realism of long-term economic assessments. A third group explores advanced metaheuristic optimization techniques; however, many of these studies lack a statistical evaluation of solution repeatability, robustness, and computational efficiency across multiple runs. Furthermore, only a limited number of works consider real distribution networks subject to region-specific regulatory constraints, particularly in the context of PMGD operation under stabilized pricing schemes. The lack of comparative statistical analysis across multiple optimization methods and seasonal operating conditions constitutes a significant research gap. This work addresses these limitations by integrating a realistic constrained distribution network, seasonal demand and generation profiles, stabilized and marginal pricing mechanisms, and a statistical comparison of optimization techniques within a unified master–slave optimization framework.

1.3. Summary of the Solution Proposal

To address the problems and needs identified in the previous sections, this work develops a methodology for operating battery energy storage systems (BESSs) in distribution networks, connected in parallel with medium- and small-scale photovoltaic distributed generators (PMGDs). The focus is on a real project in the O’Higgins region of Chile to increase PMGD’s energy sales while ensuring compliance with operational constraints related to the grid, PMGD, and BESS, and optimizing the use of renewable energy.
The methodology includes simplifying a real distribution network comprising 627 nodes (from CGE) into a validated three-node, two-line equivalent model to reduce computational complexity while maintaining accuracy. A mathematical model was designed to maximize economic benefits by optimizing energy dispatch, accounting for solar generation variability, demand curves, and seasonal energy sales and purchase prices.
The study proposes an advanced energy management system based on a master–slave architecture that integrates optimization and power flow analysis. The system employs the PSO algorithm as the central optimization technique, coupled with an hourly power flow analysis using the successive approximation method. For benchmarking purposes, the methodology also incorporates MC simulations and a GAP, enabling comparative evaluation through statistical indicators such as the best and average solutions, repeatability, and computational time. This combination provides a rigorous framework for analyzing the operational performance and economic feasibility of distributed generation systems integrated with energy storage.

1.4. Main Contributions

The main contributions of this research are summarized as follows:
  • Coordinated BESS–PMGD operational framework under real distribution constraints. This work develops a practical and operationally oriented framework for the coordinated management of BESS integrated in parallel with photovoltaic PMGD within distribution networks. The proposed methodology explicitly targets the maximization of PMGD energy sales while rigorously enforcing technical constraints associated with the grid, generation units, and storage systems, including voltage limits, line thermal capacities, and battery operational boundaries. The framework is conceived for operational planning and dispatch analysis, ensuring direct applicability to real PMGD projects under realistic operating conditions.
  • Regulation-consistent economic and mathematical formulation. A comprehensive economic optimization model is formulated in strict alignment with the Chilean PMGD regulatory framework. The model explicitly incorporates stabilized energy selling prices, short-term nodal purchasing prices, seasonal solar irradiance variability, and hourly demand profiles. The objective function maximizes the daily economic balance by jointly considering energy sales, energy purchases, and operation and maintenance costs, while all technical and operational constraints are embedded through a structured penalty-based fitness formulation that preserves physical feasibility.
  • Master–slave energy management system with nonlinear AC power flow. An advanced energy management system is implemented using a master–slave architecture, where Particle Swarm Optimization (PSO) determines the optimal hourly charging and discharging schedule of the BESS, and an hourly nonlinear AC power flow solved via successive approximations verifies compliance with voltage, current, and operational limits. This tight coupling avoids linearized or overly simplified network representations and ensures that all candidate solutions are evaluated under realistic electrical operating conditions.
  • Robust constraint handling through penalty-based fitness evaluation. The proposed framework integrates a structured penalty-based fitness function that explicitly enforces the full set of operational constraints associated with distributed energy resources and the distribution network. These constraints include active and reactive power balance equations, nodal voltage limits mandated by Chilean regulations, thermal current limits of distribution lines, PMGD interconnection power limits, and detailed BESS constraints related to charging and discharging power, state-of-charge bounds, and daily energy balance conditions. The formulation further incorporates the real variability of photovoltaic generation and user demand through seasonal and hourly profiles derived from utility measurements, while the effect of reactive power compensation is implicitly captured through the inclusion of capacitor banks installed along the feeder. This mechanism systematically discards economically attractive but technically infeasible solutions and guides the optimization process toward dispatch strategies that are both profitable and physically admissible. Moreover, the combined mathematical model and test system define a general validation scenario that demonstrates the robustness and replicability of the proposed methodology across other distribution networks and energy contexts.
  • Comparative statistical validation of optimization performance. The proposed methodology is rigorously validated through a comparative statistical analysis against Monte Carlo and population-based Genetic Algorithm approaches. Performance is assessed in terms of best and average solutions, repeatability, and computational efficiency across multiple runs and seasonal operating conditions. The results consistently demonstrate that PSO achieves superior convergence behavior, robustness, and reduced computational effort for the considered operational planning problem.
  • Operational mitigation of renewable energy curtailment in Chilean distribution systems. The results provide practical evidence that properly coordinated BESS operation enables the absorption of photovoltaic energy surpluses during low-demand periods and their injection during peak demand and high-price intervals. This operational strategy not only contributes to mitigating renewable energy curtailment, alleviating feeder congestion, and improving operational stability in saturated distribution networks, but also leads to a direct increase in PMGD revenues from energy sales. By shifting surplus photovoltaic generation toward economically favorable operating periods, the proposed approach enhances the economic balance of PMGD projects and supports the recovery of battery investment and operational costs. These findings confirm that current energy storage–oriented strategies for the Chilean power system constitute a technically sound and economically viable pathway to maximize renewable energy utilization.
From an academic perspective, this work contributes a rigorously formulated and validated operational optimization framework that advances the state of the art by integrating metaheuristic optimization, nonlinear AC power flow constraints, and statistically grounded performance assessment within a unified methodology. The proposed approach provides a robust and replicable reference for future research on energy management and storage integration in active distribution networks.
From the perspective of the energy distribution sector, the study demonstrates that distributed energy storage, when properly managed within PMGD frameworks, constitutes an effective operational tool to address renewable energy curtailment, network congestion, and temporal mismatches between generation and demand. By aligning economic incentives with technical feasibility and regulatory conditions, the proposed strategy supports a more efficient utilization of renewable resources and contributes to the transition toward a more sustainable, resilient, and economically efficient electricity distribution system.

1.5. Document Organization

The article is organized as follows: Section 2 introduces the general optimization problem of increasing energy sales for a PMGD with a BESS installed on the electrical distribution system, while considering all technical and operational constraints in a distributed generation environment. Section 3 describes the optimization methodologies proposed, which employ a master–slave approach combining the PSO algorithm with the hourly power flow via successive approximations. Furthermore, this sections present the comparison methodologies and the tuning process used. Section 4 describes the real test system utilized in this study, along with its simplification process, incorporating daily demand profiles, solar generation data, and the characteristics of the battery energy storage system. Section 5 presents numerical results and an in-depth discussion, evaluating the performance of the proposed master–slave methodology relative to the Monte Carlo and genetic algorithm approaches. The analysis considers an average operational day from summer, autumn, spring, and winter, assessing the economic impact over a full year of operation. Lastly, Section 6 summarizes the study’s key findings and proposes avenues for future research.

2. Mathematical Formulation

This section addresses the operational challenge of BESS connected in parallel with PMGDs operating at the maximum power point. The primary objective is to maximize the project’s economic performance, particularly energy sales to the grid, by optimizing BESS operations. The mathematical model includes an objective function focused on the cost of energy purchasing and selling by the PMGD, subject to technical constraints governing the operation of the distribution network in a distributed generation environment. The objective function, combined with these constraints, is consolidated into a fitness function.

2.1. Objective Function

The objective function determines the profitability of the average daily operation of the solar generation systems associated with a PMGD and a parallel-connected BESS. The aim is to maximize the benefits from energy sales while minimizing maintenance and energy purchasing costs, collectively referred to as the economic balance B e c o n , as expressed in Equation (1).
F O = max B e c o n = max E s a l e E p u r c h C m & o
In Equation (1), the economic balance B e c o n is defined as the difference between energy sales at a stabilized price ( E s a l e ), energy purchases at the short-term nodal price ( E p u r c h ) , and the maintenance cost of the PV and BESS systems ( C m & o ). Energy sales at a stabilized price refer to the fixed energy selling price established semiannually for PMGDs. In contrast, the short-term nodal price represents the energy purchasing price at the substation.
E s a l e = h H p h p v P E h p v Δ h + h H p h b P E p v Δ h si p h b > 0 h H p h p v P E p v Δ h si p h b 0
The daily economic benefits are represented by Equation (2), which sums the revenue generated over the time intervals Δ h within the analyzed period, specifically, an average operational day for this research. These benefits are derived from the power injected into the grid by the PMGDs and the BESS. This equation holds the condition that, if the BESS power p b b is positive, it is treated as power injected into the grid, generating economic benefits. Conversely, if it is negative, it is interpreted as a load, resulting in an energy purchasing cost, as integrated in Equation (3).
The energy selling price, P E h p v , is determined based on the stabilized network prices at the substation supplying and purchasing energy from the PMGD within the analyzed region, further detailed in the test system description. Additionally, p h p v represents the hourly power injected by the installed PV system, which is influenced by temperature, solar radiation, and the PMGD system’s technology type.
E p u r c h = h H p h b C h s e Δ h si p h b < 0 0 si p h b 0
Analyzing the E p u r c h function in greater detail (see Equation (3)), it can be observed that this function relates to the costs associated with energy purchases and is activated only when the battery power is negative, indicating that the battery is absorbing energy from the grid. The purchased energy is valued at the short-term nodal price C h s e , determined from data obtained from the substation supplying the distribution network.
C O & M = C O & M b h H p h b Δ h + C O & M p v h H p h p v Δ h
Finally, the operation and maintenance cost function ( C O & M ), described in Equation (4), is calculated using the maintenance costs of the battery ( C O & M b ) and the PMGDs ( C O & M p v ), which are directly proportional and multiplied by the power managed or generated by the respective device. In the last equation, H denotes the set of periods of time contained in the horizon of time analyzed in an average operation day—24 h in this particular case.

2.2. Technical and Operative Constraints

To effectively model the daily operation of a distribution system, it is crucial to apply constraints and limitations that ensure optimal network and component performance, thereby guaranteeing a safe and stable electricity supply.
The first constraint is associated with the active power balance, as shown in Equation (5). This equation establishes that, at each node i, there must be an equilibrium of active power, where P i , h g represents the power supplied by the feeders or conventional generators in the network, P i , h p v denotes the power injected by photovoltaic generators, P i , h b indicates the active power injected or absorbed by the BESS, and P i , h d represents the power demanded at the node.
P i , h g + P i , h p v + P i , h b P i , h d = v i , h j N Y i j v j , h cos θ i , h θ j , h φ i j , i N , h H
The reactive power balance is represented by Equation (6), where Q i , h g is the reactive power supplied, and Q i , h d is the reactive power demanded at each node i during hour h. Note that, in this case, the distributed energy resources considered within the network (PMGDs and BESS) operate with a unit power factor, meaning they do not affect the reactive power balance. In Equations (5) and (6), N represents the set of buses that compose the electrical grid.
Q i , h g Q i , h d = v i , h j N Y i j v j , h sin θ i , h θ j , h φ i j , i N , h H
Equation (7) describes the relationship between the state of charge (SoC) of the BESS and its ability to inject or absorb power. This relationship can be modeled linearly using a charge/discharge coefficient ( φ b ) [9]. The state of charge at time h, denoted as S o C h b , increases or decreases based on the power p h b supplied or absorbed by the BESS, the coefficient φ b , and the duration of the charge/discharge action Δ h .
S o C h b = S o C h 1 b φ b p h b Δ h , h H
Equation (8) allows for the calculation of φ b , where it can be observed that this factor is inversely proportional to the nominal energy of the battery ( E b ).
φ b = 1 E b ,
The constraints for the charging and discharging power of a Battery Energy Storage System (BESS) are defined by Equations (9)–(11). Equation (9) sets the operational limits for the BESS power output or input at time h, ensuring that the actual power P h b stays within the allowable range. The maximum charging power ( P c h a r g m a x ) represents the upper limit during charging (negative power), while the maximum discharging power ( P d i s c h m a x ) defines the upper limit during discharging (positive power).
P charg m a x P h b P d i s c h m a x , { i Ω B & h Ω H }
Equation (10) describes the maximum discharging power ( P d i s c h m a x ) based on the battery’s nominal energy capacity ( E b ) and the discharge time ( t d b ). This ensures that the battery discharges at a rate compatible with its energy capacity. Similarly, Equation (11) determines the maximum charging power ( P charg m a x ) by dividing the nominal energy capacity by the charging time ( t c b ), with the negative sign reflecting power absorption during charging.
P d i s c h max = E b t d b , { i Ω B }
P c h a r g m a x = E b t c B , { i Ω B }
These equations collectively regulate the power behavior of the BESS, ensuring it operates within safe and efficient limits. By linking the power limits to the battery’s energy capacity and the permitted charge and discharge durations, this model optimizes the performance of energy storage systems in distributed networks while maintaining technical and operational feasibility.
S o C h 0 b S o C h b S o C h f b , h H ,
S o C h 0 b = S o C b , initial , h H
S o C h f b = S o C b , initial , h H
To maintain charge and discharge levels within healthy ranges for battery operation, the state of charge (SoC) is restricted to 10–90%, with 90% representing the maximum energy storage capacity [9]. This restriction is verified during the feasibility assessment of the slave stage using inequality (12). Since average days are analyzed, both the initial and final SoC are set at 10%, as defined by the equalities in (13) and (14). Solutions that fail to meet this condition are penalized by an economic factor, as explained later in this section.
This study focuses on the intelligent operation of a BESS connected in parallel with a PMGD. The upper and lower power limits for the node associated with the PMGD are detailed in inequality (15). It is worth noting that the network is designed to support bidirectional active power flows. This capability is essential when battery operation results in a net energy absorption, leading to a negative value of p h P V + B , thereby enabling flexible and efficient power management under various operating conditions.
P P M G D , max p h P V ± P h B P P M G D , max ,
In this research, photovoltaic generators are assumed to operate at their maximum power points, including the PMGD under study and other generators within the network. The maximum ( P P V , max ) and minimum ( P P V , min ) power bounds related to the PV generation system are described in Equation (16). Generally, P P V , min is a value close to zero, while P P V , max corresponds to the power generated under maximum irradiance conditions in the region where the PV system is located [15].
P P V , min p h P V P P V , max ,
Voltage variations are also subject to strict limitations in the distribution network. For this reason, all nodal voltages at each hour, v i , h , must be maintained within an operating range of ( ± 8 % ) of the network’s nominal voltage, as mandated by Chilean regulatory authorities. This constraint is defined in Equation (17).
V i min v i , h V i max , i N , h H ,
Finally, the current in any line must not exceed the conductor’s thermal limit. This constraint is essential to ensure the integrity and efficiency of the network infrastructure and is formulated in Equation (18). Inequality (18) defines the permissible current limits, where I i j , h represents the current flowing through the line connecting node i to node j during hour h.
0 I i j , h I i j max , i j N , h H .
In this study, both the PMGD and the battery energy storage system are assumed to operate at unity power factor. This assumption is consistent with current Chilean technical regulations for PMGD interconnection, which require photovoltaic inverters to operate at or very close to unitary power factor under normal operating conditions unless explicitly instructed otherwise by the system operator. Similarly, grid-scale BESS installations intended primarily for energy arbitrage are commonly operated at unity power factor to simplify control strategies, avoid unnecessary reactive power circulation, and comply with interconnection agreements. From a modeling perspective, this assumption allows the analysis to focus on the economic optimization of active power dispatch while ensuring compliance with voltage and thermal constraints. Therefore, the unity power factor assumption is technically justified for the operational scenario under analysis and does not affect the validity of the conclusions.

2.3. Fitness Function Proposed

For the master–slave mathematical model, a fitness function is implemented to evaluate and penalize the battery’s charge and discharge profile proposed by the master phase, as well as any violations of voltage and current profiles across the lines. A penalty factor α = 10 6 is used to normalize penalties and reduce the objective function when violations occur, thereby optimizing the economic benefit of the PMGD project. This factor was heuristically tuned during this work. The proposed fitness function ( F a d a p ) is described in Equation (19). This fitness function uses the values obtained from power flow calculations performed in the slave stage and returns them to the master stage to advance the methodology.
F a d a p = F O α P E N v + P E N I + P E N S o C
In Equation (19), F O represents the objective function under study, which aims to maximize the benefits from energy sales of PMGDs through the operation of the BESS. A penalty factor α is applied to each penalty: P E N v , representing the sum of all nodes with voltages outside the permissible range; P E N I , accounting for currents exceeding allowed capacity; and P E N S o C , penalizing violations of the battery’s state of charge limits. All penalization used are explained below:
P E N v = max 0 , i N h H v i , h V i lim + min 0 , i N h H v i , h V i lim , i N , h H .
P E N I = m a x 0 , i N j N I i j , h I i j m a x i , j N , h H .
P E N S o C = max 0 , S o C h f b S o C l i m b
The penalties in Equation (19) are derived from Equations (20)–(22). The m a x and m i n operators ensure that the result captures only violations of the defined limits; if the limits are not exceeded, the penalties take a null value. Otherwise, they assume a value proportional to the violation’s magnitude. The variables v i , h represent the voltage at each node during each time interval, while V l i m + and V l i m are the upper and lower limits for permissible voltage variation. Finally, the variable I i j represents the current in each conductor connecting nodes i and j, and the parameter I i , j m a x defines the thermal limit of the conductor’s capacity. The absolute value operator in Equation (21) is included to account for the bidirectional nature of current flow.
The pseudocode for the complete procedure used to obtain the value of the fitness function, Algorithm 1, is presented below.
Algorithm 1 Fitness Function Evaluation Process
  • Start
  • For each hour of the day:
  •    Load the demand, PV, and BESS power according to the hourly profile
  •    Run a power flow analysis
  •    Calculate sale energy by PMGD
  •    Analyze voltage behavior in the network
  •    Evaluate line loading capacity
  •    Calculate penalties based on predefined criteria
  • End of time loop
  • Calculate the fitness function ( F adap )
  • End
As in all engineering modeling efforts, the proposed framework relies on deliberate abstractions and simplifications aligned with its intended purpose. These modeling choices are not intended to capture all spatial and asset-level phenomena of a real distribution feeder, but to preserve the dominant operational constraints relevant to energy dispatch while enabling tractable multi-scenario optimization.

3. Solution Methodology

The proposed methodology addresses the efficient operation of an energy storage system installed alongside a Distributed Generation Plant. A master–slave optimization strategy was implemented, integrating high-efficiency algorithms from the literature [16,17,18], including the Genetic Algorithm (GA), Particle Swarm Optimization (PSO), and Monte Carlo (MC), combined with a successive-approximation-based power flow method. The selection of these methodologies is based on the excellent results reported by the author for the optimal operation of distributed energy resources in electrical networks. The fitness function evaluated in this process accounts for the energy sale and purchase costs of the PMGD, as well as any violations of operational constraints imposed by the grid operator.

3.1. Master Stage: Energy Storage System Operation

The master stage is responsible for solving the power dispatch problem of the battery system installed in parallel with the PMGD. The PMGD operates at the maximum power point, and the master stage identifies the optimal charging and discharging scheme for the battery through optimization algorithms to maximize profits from energy sales while complying with grid constraints.

3.1.1. Proposed Encoding for Battery Charging and Discharging Scheme

To ensure proper functioning of the optimization algorithms, a suitable encoding was implemented for the battery dispatch problem. A one-day operation period with one-hour intervals was considered, yielding a vector of size 1 × 24 . Each column represents the power injected or absorbed by the battery in each time interval. Table 1 illustrates the proposed encoding scheme.
The power limit for each hour of operation is associated with the maximum charging and discharging power values of the battery, as provided by the manufacturer (see Equation (9)).

3.1.2. Optimization Methods for the Master Stage

Three optimization algorithms were selected for the master stage: Monte Carlo (MC), Population-based Genetic Algorithm (GAP), and Particle Swarm Optimization (PSO). These methods have been widely used in the literature to solve optimal power flow problems in electrical networks with distributed energy resources [19,20,21].
The Monte Carlo method is used exclusively as a random search benchmark, not as a competitive optimizer. Its purpose is to characterize solution dispersion, feasibility rates, and baseline performance under unstructured exploration. Consequently, the comparison between Monte Carlo and the metaheuristic methods is not intended to demonstrate algorithmic superiority, but to highlight the robustness, consistency, and efficiency gains achieved by structured population-based search strategies. The proposed methodology focuses on identifying high-quality and repeatable operating strategies under non-linear AC power-flow constraints and penalty-based feasibility handling.
Monte Carlo Method (MC)
The MC method is a stochastic technique that randomly evaluates multiple solutions [22]. A population of individuals is generated in each iteration, evaluated through the slave stage, and the best results are stored in an elite list. The best solution from the elite list is selected as the final solution. As illustrated in Figure 1, the MC algorithm begins by randomly generating a population of feasible candidate solutions within the predefined battery power and state-of-charge limits. Each candidate is then passed to the slave stage, where an hourly power-flow analysis is performed to verify compliance with voltage, current, and operational constraints and to compute the associated economic benefit. The fitness values obtained are used to update an elite list that stores the best-performing solutions found during the search process. This procedure is repeated for a predefined number of iterations, without modifying candidate solutions based on previous evaluations. At the end of the process, the best solution contained in the elite list is selected as the final output. Due to its purely random exploration strategy, the MC method is employed in this work as a baseline reference to assess solution variability and benchmark the performance of more structured metaheuristic approaches.
Figure 1 presents the flowchart of the Monte Carlo algorithm implemented in this study.
Population-Based Genetic Algorithm (GAP)
The GAP is an evolutionary optimization technique derived from classical genetic algorithms, employing selection, recombination, and mutation operators to improve solution quality [23] iteratively. In this work, each individual encodes a daily BESS power dispatch profile, and a population of such individuals evolves across generations.
As shown in Figure 2, the GAP procedure starts with the initialization of a population of feasible solutions. During each generation, candidate solutions are evaluated in the slave stage using the proposed fitness function, which incorporates economic performance and penalty terms for network and battery constraints. Based on their fitness values, individuals are selected for reproduction, and genetic operators such as crossover and mutation are applied to generate new offspring populations. Unlike conventional genetic algorithms that focus on evolving individual chromosomes, the GAP approach emphasizes population-level evolution, enhancing diversity and improving exploration of the solution space. This population-based evolution reduces the likelihood of premature convergence to local optima. The iterative process continues until the stopping criterion is met, and the best-performing individual obtained throughout the evolutionary process is selected as the final solution.
Figure 2 illustrates the flowchart of the GAP algorithm as implemented in the master stage of the proposed methodology.
Particle Swarm Optimization (PSO)
The PSO algorithm is a population-based metaheuristic inspired by the collective behavior of social organisms such as bird flocks or fish schools [24,25]. In the proposed framework, each particle represents a candidate daily charging-discharging schedule for the BESS.
Figure 3 depicts the PSO flowchart implemented in this study. The algorithm begins by initializing a swarm of particles with random positions and velocities within the battery’s feasible operating limits. Each particle is evaluated at the slave stage, where an hourly power flow analysis assesses the feasibility of the dispatch strategy and computes its economic fitness. During each iteration, particle velocities and positions are updated based on both the individual best solution found by each particle and the global best solution identified by the swarm. This cooperative information-sharing mechanism enables an effective balance between exploring new regions of the solution space and exploiting high-quality solutions. The iterative process continues until the maximum number of iterations is reached or convergence is achieved, and the global best particle is selected as the optimal BESS dispatch strategy. Figure 3 summarizes the sequence of operations of the PSO algorithm within the master–slave optimization framework.

3.1.3. Parameter Tuning for Optimization Algorithms

Parameter tuning is essential to enhance the efficiency of optimization algorithms for solving the BESS management problem. The parameters tuned for each algorithm are shown in Table 2. These values were obtained using a PSO with 300 individuals, 300 iterations, an inertia range of 1 to 0, a maximum velocity of 0.1, and cognitive and social factors of 1.494.

3.2. Slave Stage: Hourly Power Flow Calculation

The slave stage calculates the fitness function ( F a d a p ), which evaluates energy purchase and sale transactions managed by photovoltaic generators and the ESS. The process begins with loading the technical parameters and operational constraints defined by regulations, followed by successive approximation-based hourly power-flow analysis [17]. The iterative power flow ensures compliance with technical constraints while maximizing economic benefits. Convergence is achieved by setting a predefined error threshold, providing accurate results for fitness function evaluation.

4. Test System and Considerations

The Distribution Electrical System (DES) used is a medium-voltage circuit located in the O’Higgins region of Chile and characterized by its rural nature, given its extensive area outside the municipal regulatory plan. The electrical model, based on a real system, was provided by the company Cool Power SpA. The system in DIgSILENT was developed using data supplied by the distribution company Compañía General Eléctrica (CGE). Thus, the values obtained for conducting electrical or economic studies are verified in a real-world context. The circuit topology is presented in Figure 4.
The distribution electrical system (DES) consists of 627 nodes, representing the physical structures supporting conductors and equipment for energy distribution at 15 kV. The network is predominantly three-phase, with only six branches near the end of the main trunk (approximately 1 km) operating as two-phase connections; the rest are three-phase. The total conductor length is 28.27 km, with the farthest point from the feeder’s origin reaching approximately 13.81 km. The medium-voltage circuit (feeder) is connected alongside two other feeders to the 15 kV busbar No. 2 at the substation, which is powered by Transformer No. 2 with a capacity of 30 MVA and a voltage conversion of 66 kV to 15 kV.
The transformer operates with a setpoint of 1.05 p.u. on the medium-voltage bus due to its rural characteristics (substation). Loads are supplied by distributed transformer units that step down the voltage to low-voltage levels for end users. The medium-voltage network includes 68 distributed transformer units acting as loads, with a total capacity of 8.78 MVA. Two voltage regulation devices, specifically capacitors, continuously provide reactive power to the distribution network. Their characteristics are detailed in Table 3.
This system includes the integration of a 9 MW solar power system, connected via a new 15 kV medium-voltage line to the distribution circuit, identified in this paper as a small- and medium-sized PMGD, which is the under-study case. A transformer with the technical specifications detailed in Table 4 is used to step up the voltage from 630 V to 15 kV. This will serve as the PMGD under analysis, to which a battery will be integrated to manage energy and supply it to the grid, aiming to improve economic conditions during a typical day of operation. Its location on the feeder is marked in orange in Figure 4 and is classified as “Under Study,” indicating it is a projected system for connection to the electrical network. The primary objective of this work is to analyze the potential to maximize economic profits while ensuring the operational conditions of the grid.
The photovoltaic energy generated by the project under study is produced as direct current (DC), which must be converted to alternating current (AC) for connection to the grid. This conversion is achieved using six inverters with the specifications detailed in Table 5. The existing 3 MW project within the network provides active and reactive power curves associated with its operation, this information is presented and explained in this section. Additionally, Netbilling projects have their power considered within the demand reported by the meter, meaning that this value has already been reduced based on their output capacity.
In the DES under study, there are two NetBilling projects, which are residential projects that inject their surplus self-consumption into the distribution network. The maximum power allowed for this type of connection is up to 300 kW, according to Chilean regulations. This generation is considered part of the distributed system’s demand and is omitted from the analyses. Table 6 presents the distance from the start of the distribution circuit to the connection points, while Figure 4 shows their location on the feeder.

4.1. Simplification of the DES Studied for the Power Flow Analysis

Using the electrical model in DIgSILENT, which CoolPower utilized for the electrical studies submitted to the distributor, line segments with identical technical specifications were simplified from the project’s connection point to the feeder’s starting point. This simplification involved removing existing nodes and summing their lengths. Although some loads are connected between the nodes to be simplified, they can be disregarded due to their low energy demand.
The simplified circuit of the distribution electrical system in DIgSILENT is shown in Figure 5. It consists of three nodes and two lines, including the system’s loads and generators. Node 1 contains the slack node with no associated demand loads, connected to Node 2 via line 1–2. Node 2 has a demand capacity of 29 kW, representing the small demands between Nodes 2 and 3 in the actual system, and is connected to Node 3 via line 2–3.
Node 3 aggregates the system’s significant loads and integrates generation at that point. For power level calculations, solar generation data of 3 MW and two capacitors of 900 and 450 kVAr were included, resulting in a generation of 2.282 MW and 1.444 MVAr during the period of lowest demand and highest generation analyzed. Node 3 also hosts the PMGD under study, with a final generation capacity of 8.894 MW and a reactive power demand of 0.602 MVAr associated with the generator and interconnection system. This results in a total generation at Node 3 of 11.176 MW and 0.842 MVAr, representing the critical operational state of the network during the hour of highest generation and lowest demand.
To model the line parameters in the equivalent circuit, the lengths and technical specifications of the conductor were used to calculate its resistance and positive-sequence reactance, which are essential for subsequent modeling in MATLAB. The equivalent positive-sequence line parameters for the system are presented in Table 7, corresponding to the parameters to be used in MATLAB’s single-phase model. In this figure, Line 1 connects buses 1 and 2 of the equivalent circuit, while Line 2 connects nodes 2 and 3. The table presents, from left to right, the equivalent resistance and reactance of each line, as well as the equivalent power demanded and supplied at the receiving bus, corresponding to the generation and demand within the DES. As base values, the simplified test system considers a power of 1000 kVA and a voltage of 15 / 3 kV .
The simulation results for the simplified system, compared to the real system and the equivalent MATLAB model, are presented in Figure 5. To develop the MATLAB equivalent model, the same line data was used, with power values adjusted by dividing by three and then multiplying the final results by three, to derive a single-phase equivalent of the DES. Additionally, a load flow analysis was conducted for the simplified single-phase scenario in MATLAB using the successive approximations method reported in [17].
The resulting loadability values for the distribution lines were similar, as shown in Table 8. This table presents, from left to right, the buses connected by each line, the line loadability values for each line in p.u obtained using the complete circuit of 627 nodes in DIgSILENT, the simplified DES model in DIgSILENT, and the power flow results from MATLAB. The analysis showed that the circuit simplification in DIgSILENT closely aligns with the loadability values from the power flow study of the real model, with loadability values of 104.69% for Line 1–2 and 82.26% for Line 2–3, respectively. These results demonstrate that the proposed three-node test system for MATLAB, using the successive approximation power flow method, accurately represents the real scenario. Therefore, it can be effectively used to evaluate the operation of a BESS in parallel with the PMGD.
Table 9 presents the node voltages at the points of receipt for the three analyzed scenarios, aimed at validating the effectiveness of the proposed equivalent system for the test network. A nominal voltage of 15 kV was used in DIgSILENT, while an adjusted nominal voltage of 15 kV / 3 was applied in the single-phase equivalent model implemented in MATLAB to achieve equivalency. Regarding the voltages, the results are identical across the three scenarios, demonstrating that the MATLAB model is equivalent to the real system. Furthermore, it is observed that the voltages at all nodes remain within the regulatory standards in Chile, which establish permissible limits of ± 8 % of the nominal voltage for distribution levels.
These results demonstrate that the equivalent circuit obtained accurately represents the system under analysis and can be used to simulate its operation with the objective of improving the economic and operational conditions of the PMGD.
The simplification of the original 627-node distribution network into a three-node equivalent is conceived as an objective-oriented modeling strategy rather than an attempt to reproduce the full electromagnetic detail of the real system. The studied feeder corresponds to a predominantly rural radial network, in which the PMGD and the BESS are electrically distant from the substation and where the operational behavior is mainly constrained by voltage profiles and line thermal limits along the main feeder corridor between the point of connection and the substation. Under these conditions, the dominant power transfer path governs the feasible operating region, while secondary lateral feeders have a negligible influence on the dispatch decisions addressed in this work. Accordingly, the reduced network is designed to preserve voltage sensitivity and thermal loading along this dominant corridor, without representing detailed internal voltage profiles, branch-level congestion in lateral feeders, or loss allocation mechanisms. The physical consistency of this reduction is validated through a direct comparison with the full 627-node DIgSILENT model under a critical operating scenario corresponding to maximum generation and minimum demand. The results show identical line loadability values and negligible voltage deviations among the full model, the simplified DIgSILENT representation, and the MATLAB implementation. This validation confirms that the reduced model accurately captures the operational constraints relevant to the PMGD-BESS dispatch problem, while enabling an efficient and stable coupling with the hourly master–slave optimization framework through a substantial reduction in computational burden.
From a computational perspective, it should be emphasized that the battery dispatch problem is inherently a highly complex optimization task, particularly when formulated over a 24-h horizon and coupled with nonlinear AC power flow constraints, multiple distributed generators, battery operational limits, and time-varying demand and renewable generation profiles. Under this context, the computational burden is dominated by the repeated solution of power flow equations within the master–slave optimization framework [26]. Therefore, reducing the size of the distribution network becomes a practical and widely adopted strategy to decrease computational effort while preserving the dominant operational constraints relevant to dispatch decisions.
Network reduction techniques are extensively reported in the power systems literature, with classical approaches such as Kron reduction enabling the elimination of electrically non-critical nodes and allowing the analysis to focus on buses of interest, particularly those associated with generation, storage, and interconnection points [27]. In line with this philosophy, the proposed reduction condenses the original distribution feeder into an equivalent low-order model that retains the electrical sensitivity of voltage profiles and power transfers along the dominant path between the PMGD–BESS connection point and the substation.
This reduction significantly accelerates the execution of hourly power flow calculations, thereby enabling the system operator to efficiently evaluate multiple operational scenarios relevant to day-ahead and seasonal planning. As a result, economically and technically feasible battery dispatch strategies can be explored without compromising the enforcement of governing network constraints, as validated through the comparison with the full-scale system. Nevertheless, it is important to emphasize that any operational element that limits system performance in terms of current-carrying capability or power transfer capacity, such as line thermal limits, transformer ratings, or interconnection constraints, must be explicitly integrated into the reduced model. These constraints ultimately define the feasible operating region of distributed generation and storage systems and may restrict the achievable economic benefits. This aspect is explicitly accounted for in the proposed formulation and is further highlighted in the conclusions as a key consideration for the practical deployment of reduced-order models in operational planning studies.

4.2. Power Demand Curves

The analysis period spans from March 2021 to February 2022, aiming to capture the feeder demand behavior across all seasons, namely autumn, winter, spring, and summer. Based on data provided by the grid operator, 89 days were allocated to summer, 93 to autumn, 95 to winter, and 88 to spring, covering the 365 days of the year. Using the average seasonal demand curves reported by CGE measurements, the feeder demand profiles are illustrated in Figure 6, where subfigure (a) corresponds to the average active power demand and subfigure (b) represents the average reactive power demand.
For the required electrical studies, the utility company CGE provides, through Form 7 for each photovoltaic PMGD project, the electrical demand data necessary to analyze the impact of PMGDs within the DES. These measurements are conducted using a current transformer (CT) from the brand ALSTOM, model SDF36, located between the disconnectors and at the beginning of the feeder where the PMGD is connected. This CT is linked to a potential transformer (PT) ALSTOM VLE-15, enabling the measurement of active and reactive power consumption in the network, with a sampling period of 15 min. However, for this research, the data was simplified to a 24-h operational format with 1-h intervals to establish the energy consumption and generation for an average day per season. This approach facilitates the analysis of the batteries’ impact over an average year.

4.3. PV Generation Curves

The generation profiles used in this thesis are based on data provided by CGE, corresponding to those supplied for the analysis of a 9 MW project to be connected within the DES under study. These figures are derived from projections based on the performance of two similar projects already connected to the system, considering factors such as power, location within the region, radiation, and temperature. A total of 33,600 modules of 320 Wp from the brand Risen Solar Technology, model RSM-72-6-320P, were used, achieving a total of 10.752 kWp in direct current energy and 9 MW in alternating current energy.
The analyses conducted in this thesis consider a 3 MW PMGD already present in the network, which is currently under construction on the same feeder. This project impacts the loadability and voltage levels of the distribution circuit. The active generation and reactive power demand of this project are reported by CGE.
To calculate the average generation profiles of both PMGDs, the year is divided according to the previously mentioned climatic seasons, using the same duration for each season. Seasonal photovoltaic generation profiles were derived for two PMGD installed capacities, namely 3 MW and 9 MW, using historical measurements provided by the grid operator. Figure 7 presents the average daily generation profiles for each season, where subfigures (a) and (b) correspond to the active and reactive power generation of the 3 MW PMGD, respectively, while subfigures (c) and (d) show the active and reactive power generation of the 9 MW PMGD. The data for the 9 MW project, reported by CGE, corresponds to the project currently in operation within their network. It is worth noting that the reactive power consumption by the photovoltaic generators, while part of the plant’s operation, represents a much smaller fraction compared to the active power generated.

4.4. Energy Selling Price

In Chile, the energy selling price is regulated by the stabilized price, as established in Supreme Decree 88, “Regulations for Small-Scale Generation Facilities” [28]. These prices are published semiannually by the National Electrical Coordinator (CEN) and the National Energy Commission (CNE). For their calculation, the periods from February to August for the first semester and from January to December for the second semester are considered. Prices are determined for reference substations at a voltage of 220 kV, established by the National Electrical System (SEN). Downstream of these substations, all nodes (distribution substations) share the same assigned cost as the main 220 kV node. Therefore, the same energy selling price is assigned for an average day throughout the entire semester. These values are represented in six 4-hour blocks. The stabilized price applicable to the project under study corresponds to the Alto Jahuel 220 kV node, and its values are detailed in Table 10.

4.5. Energy Purchase Price

To calculate the energy purchase price, in case it is required due to the battery charging process during hours when the PMGD has reduced or no energy production, this study employs the marginal cost price. These energy purchase values are obtained for the Medium Voltage (MV) bus at the main transformer of the Electrical Substation (ES) and are provided by the National Energy Commission (CNE) [29].
It is important to note that the distributor’s cost is excluded from the final price. Since purchase prices are expressed in [USD/MWh], a currency conversion from USD to CLP is applied using the historical exchange rate of the dollar, and the energy prefix is adjusted, resulting in the cost expressed in [CLP/kWh]. Finally, the average price for each hour of the day is calculated, considering the year under analysis and dividing it into its corresponding climatic seasons, as illustrated in Figure 8.

4.6. Battery Energy Storage System

The storage capacity values adopted for the battery energy storage system are based on pioneering utility-scale projects currently under development in Chile, as reported by the Environmental Assessment Service (SEA) [30], which provides publicly available project documentation. A consistent trend identified in these environmental assessment proposals is the consideration of storage durations of approximately five hours at the maximum nominal power of the generation systems, typically around 9 MW. Accordingly, the nominal capacity of the battery energy storage system in this study is set to 45 MWh, corresponding to a storage-to-generation ratio of five times the installed PV capacity, in line with prevailing regulatory and planning practices in Chile. The implemented system is based on lithium-ion technology, designed with a 4-h charging and discharging duration, and installed in parallel with the PMGD at node 3. Its operation is constrained by State of Charge (SoC) limits between 10 % and 90 %, ensuring safe and reliable performance within the adopted operational framework.

4.7. Chilean Technical Regulation for PMGD and BESS Operation

Currently, there are no specific regulations or technical standards for the development of PMGD projects with energy storage in Chile. Therefore, this research work considers all existing restrictions and regulations to achieve the optimal and efficient operation of a PMGD project.
The organizations responsible for overseeing and ensuring the safety and optimal operation of electrical systems include the National Energy Commission (CNE), the National Electrical Coordinator (CEN), and the Superintendency of Electricity and Fuel (SEC). Additionally, the Environmental Assessment Service (SEA) must be considered, and in the case of disputes between developers or operators of electrical systems and the aforementioned entities, it is necessary to seek resolution through a panel of experts designated to address discrepancies and ensure compliance with Chile’s current regulations and standards.
This document also considers all operational restrictions related to energy generation and storage systems, which are reported and detailed in the mathematical model section.
In terms of the operation of the electrical distribution system, this document takes into account a maximum voltage variation of ± 8 % , which corresponds to the maximum allowable voltage fluctuation for medium voltage distribution networks in areas with low and very low network density. This is presented in Table 11, in Article 3–13 of the NTCO [31], for a medium voltage connection (23 kV) applicable to the low-density network where the PMGD project evaluated in this thesis is located. Furthermore, Article 3–30 of the NTCO [31] is considered, which stipulates compliance with the current limits set for conductors permitted by the utility company. The studies ensure that thermal limits are not exceeded, as these are determined by the evaluating utility company. These limitations also account for climatic variations that can affect the maximum current of the conductor.
The economic results reported in this work quantify operational revenue improvements at the dispatch level and should not be interpreted as a complete project-level financial feasibility assessment. Their primary purpose is to reveal the interaction between operational incentives and storage technology characteristics under constrained network operation. The absence of degradation-aware costs within the optimization objective is a deliberate modeling choice that allows the operational consequences of intensive cycling strategies to be explicitly exposed.

5. Simulation Results

This section analyzes the results obtained to evaluate the effectiveness of the operation methodologies based on Monte Carlo (MC), GAP, and PSO applied to an energy storage system installed in parallel with a PMGD within a three-node distribution network used as a test system. These methodologies aim to optimize charging and discharging operations of the energy storage system to improve the economic conditions of the PMGD (maximize energy sales) while ensuring network operational conditions, including voltage levels, line loadability, and battery state of charge.
To validate the effectiveness of the proposed solution methodologies in terms of solution quality, repeatability, and processing times, each methodology was executed 10 times in the test scenario. These tests evaluated the best solution, the average solution, the standard deviation, and processing times for an average day of generation and demand corresponding to each season: summer, autumn, winter, and spring.
Subsequently, the impact of each optimization methodology on the average year of device operation was analyzed, enabling quantification of savings relative to the base case (a scenario without an energy storage system). Additionally, the methodology with the best performance in maximizing PMGD energy sales was identified, considering the inclusion of energy storage systems and variable costs associated with energy buying and selling.

5.1. Analysis for an Average Day of Operation per Season

A detailed analysis of the impact of intelligent PMGD operation with an energy storage system on an average day of operation in each season is presented below. This analysis is based on the generation and demand curves presented in Section 4.2 and Section 4.3, respectively. The average results are illustrated in Figure 9, highlighting the economic advantages achieved through different energy management strategies implemented for the BESS, compared to the base case used as a reference.

5.1.1. Average Daily Results Across Different Seasons

The results from implementing the MC, GAP, and PSO optimization methods are analyzed relative to the base-case values for each season. The base values correspond to the average daily economic revenues without integrating storage systems, amounting to $3,132,256 CLP/day for summer, $1,355,309 CLP/day for autumn, $1,368,308 CLP/day for winter, and $3,078,377 CLP/day for spring. Based on these values, the impact of each method is evaluated in terms of percentage improvement, both for the best solution obtained and for the average across executions. This analysis, complemented by Table 12, highlights the effectiveness of PSO as the method with the best results and performance among the optimization strategies employed.
In summer, PSO achieved the highest percentage improvement over the base case, with an increase of 29.82%, equivalent to $4,463,102.85 CLP/day, maintaining a similarly high average performance of 29.82%, with $4,462,858.85 CLP/day. GAP ranked second among the proposed methodologies, with a maximum percentage improvement of 29.80% ($4,462,002.95 CLP/day) and an average of 29.79% ($4,461,385.04 CLP/day). These figures demonstrate GAP’s competitiveness in scenarios with high generation and demand, although PSO shows a slight consistency advantage. Conversely, MC achieved a maximum percentage improvement of 25.11% ($4,182,737.93 CLP/day) and a lower average of 22.77% ($4,055,959.59 CLP/day), with a significantly higher standard deviation (80,581.45 CLP/day), indicating greater variability in its performance.
In winter, the differences among the optimization methods became notably evident due to the season’s specific characteristics, such as reduced photovoltaic energy generation and a more consistent but lower demand. In this context, PSO stood out significantly, achieving a maximum percentage improvement of 42.28% over the base case, equivalent to daily revenues of $2,370,548.23 CLP, and an average of 42.22% ($2,368,277.72 CLP/day), with a minimal standard deviation of only 2392.79 CLP/day. This superior performance can be attributed to PSO’s ability to handle complex low-generation scenarios, leveraging its exploration of the solution space to identify optimal charging and discharging strategies for the storage system, thereby maximizing revenues during higher-priced periods. GAP also showed competitive performance, achieving a maximum improvement of 41.24% ($2,328,711.17 CLP/day) and an average of 40.93% ($2,316,361.83 CLP/day). Although close to PSO in terms of results, its slightly higher standard deviation (7134.17 CLP/day) indicates that it is less consistent in low-generation scenarios. The difference between these two methods may be due to GAP’s efficiency in exploiting local solutions, but limitations in balancing exploration and exploitation in a seasonal context where optimization margins are more constrained due to low generation. In contrast, MC showed considerably inferior performance, achieving a maximum improvement of only 14.21% ($1,594,896.80 CLP/day) and an average of 11.18% ($1,540,597.49 CLP/day), accompanied by a significantly higher standard deviation (51,240.35 CLP/day). These results reflect the limitations of MC in scenarios where the system’s operating conditions demand greater precision and adaptability. The pronounced difference in winter results compared to other seasons can be explained by the more stringent operational restrictions imposed by reduced solar irradiation, which limits photovoltaic system generation, leaving most of the optimization work to intelligent battery operation. Under these conditions, storage systems must play a significant role in mitigating fluctuations and ensuring optimal revenue.
In spring, PSO continued to demonstrate its leadership with a maximum percentage improvement of 28.34% over the base case, reaching $4,295,757.41 CLP/day, and an average of 28.28% ($4,292,203.86 CLP/day). GAP maintained its characteristic second place in this study, with a maximum improvement of 28.33% ($4,295,020.92 CLP/day) and an average of 28.32% ($4,294,571.61 CLP/day). Both methods showed high consistency, as evidenced by the low standard deviation of GAP (375.28 CLP/day) and PSO (4968.46 CLP/day). On the other hand, MC showed less competitive performance, with a maximum improvement of 24.03% ($4,052,035.75 CLP/day) and an average of 22.32% ($3,962,681.75 CLP/day), with a standard deviation of 66,563.99 CLP/day, indicating greater dispersion.
Overall, PSO emerged as the most efficient and consistent method, maximizing economic benefits across all seasons and showing low variability in the results (Table 13). GAP demonstrated competitive performance, standing out in spring and autumn, though slightly inferior in winter. In contrast, MC, while simpler to implement, showed significant limitations in terms of variability and its ability to capture optimal solutions, especially under challenging atmospheric conditions such as winter.

5.1.2. Annual Results Analysis

The annual analysis highlights the clear superiority of the proposed optimization methods over the base case, which considers only generation revenues and excludes a storage system. The results for total annual profits and economic improvements relative to the base case, and across the different methods, are presented in Table 14, which details the best and average annual results for the base case and each of the proposed methodologies.
In terms of the best annual results, PSO achieved $1,175,947,567.15 CLP, outperforming all other methods. In comparison, GAP reached $1,171,758,170.01 CLP, while Monte Carlo (MC) achieved $1,039,588,274.98 CLP. The base case, which does not consider storage, recorded $805,700,960.84 CLP, highlighting the effectiveness of the optimization methods, particularly PSO, in maximizing profits. In relative terms, PSO showed an improvement of $370,246,606.31 CLP compared to the base case, while the improvements for GAP and MC were $366,057,209.17 CLP and $233,887,314.14 CLP, respectively.
The trend remains consistent when observing average annual results. PSO obtained an annual average of $1,175,397,439.21 CLP, slightly lower than its best result, but demonstrating high consistency. GAP, on the other hand, achieved an average of $1,170,452,995.89 CLP, while MC showed a significantly lower average of $1,006,451,018.07 CLP. In this case, the average improvements over the base case were $369,696,478.37 CLP for PSO, $364,752,035.05 CLP for GAP, and $200,750,057.23 CLP for MC, once again reflecting the superiority of PSO.
When comparing improvements across methods, PSO surpasses GAP by $4,189,397.14 CLP, reinforcing its position as the most effective method for maximizing annual profits. Furthermore, the difference between PSO and MC is $136,359,292.17 CLP, while GAP exceeds MC by $132,169,895.03 CLP, underscoring the significant advantage of advanced optimization methodologies over the stochastic MC approach.
The observed differences are attributed to the ability of the optimization methods, particularly PSO and GAP, to exploit seasonal fluctuations in generation and energy prices efficiently. Both methods identify optimal operational strategies that maximize revenue by storing energy during low-cost periods and discharging it during high-priced hours. On the other hand, MC, while significantly improving results over the base case, exhibits lower capacity for adaptation and consistency due to its stochastic nature and the absence of a clear strategy for exploring and exploiting the solution space. However, for enhancing energy sales through the intelligent operation of batteries in conjunction with PMGDs operating at their maximum power point, PSO stands out as the best-performing method, as shown in Table 14.
Figure 10 shows the percentage improvements achieved by the PSO method compared to the base case, Monte Carlo (MC), and the Population-Based Genetic Algorithm (GAP). In terms of the best solution, PSO achieved a 45.95% improvement over the base case, demonstrating a significant increase in annual economic gains. Compared to MC, the improvement was 13.12%, highlighting the superiority of PSO in optimizing results in complex scenarios. Regarding GAP, although the margin was smaller, PSO outperformed GAP by 0.36%.
For average solutions, PSO maintained a similar trend, achieving a 45.88% improvement over the base case. This reflects not only its effectiveness in identifying optimal solutions but also its consistency in the results obtained. Compared to MC, PSO achieved an improvement of 16.79%, underscoring its ability to produce consistent, less variable solutions. Compared with GAP, PSO demonstrated an advantage of 0.42%, further consolidating its efficiency even against another advanced method with favorable results.
Compared to MC, which adopts a more stochastic approach, PSO demonstrates superior capacity to leverage system characteristics and adapt to operational scenarios. On the other hand, the differences with GAP highlight PSO’s greater efficiency in power networks with significant operational constraints.

5.2. Technical Analysis

The following graphs present the best results for each case, evaluated based on the optimal energy management curves of the BESS. These graphs allow a review of nodal voltage levels and the loadability levels for the 12 configurations derived from the study of the four seasons and the three solution methods applied.
The analysis of nodal voltages in distributed electrical systems is a critical aspect to ensure compliance with technical regulations and service quality. For example, allowable voltage variations are ± 8 % for medium-voltage networks in low and very low load density areas, as mentioned in Section 4.7 and established in the NTCO [31].
Figure 11 shows the voltage deviations observed at nodes 1, 2, and 3 during a typical day of operation for each best result obtained across the four seasons and each method. This single graph shows that no voltage exceeds the technical limits, a behavior observed across all algorithm executions in the different scenarios, confirming the effectiveness of the proposed adaptation function. It is important to note that node 1, being the system’s slack bus, maintains a constant voltage and does not present variations. On the other hand, nodes 2 and 3 exhibit distinct dynamics in their voltage profiles, determined by the system’s operating conditions and power flows. In the left graph within Figure 11, the established technical limits are represented, while the right graph provides a detailed view of each node’s dynamics.
Figure 12 presents graphs showing the load levels of the two lines in the simplified distributed circuit described in Section 4.1. The 12 loadability profiles are expressed in percentage (%) according to the technical specifications for each conductor, corresponding to the average day for each season and solution method.
From Figure 11 and Figure 12, it can be concluded that no node exceeds the established voltage limits, while the loadability of each conductor remains below 100%. This indicates that the solutions proposed by the different methods and for the various seasons comply with the required technical constraints while also improving the associated economic benefits.

5.3. Analysis of the PSO Case in Summer

This section presents a detailed analysis of the PSO method applied specifically to the summer season, as this case demonstrated the highest economic benefit obtained from daily results.
Figure 13 illustrates the behavior of active power associated with the distribution system during an average summer day. This set of powers represents the interactions among energy demands, PMGD injections, and energy management via the BESS. The values shown are the result of the optimal dispatch obtained by implementing the PSO method.
The analysis demonstrates that the PSO method generates an efficient strategy for operating the BESS, allowing the storage of surplus energy from the 9 MW PMGD during periods of lower selling prices. Subsequently, the battery releases this energy at the most economically advantageous time, coinciding with the high-price time block, between 20:00 and 24:00 h. This behavior optimizes both storage use and the system’s economic benefit, taking advantage of stabilized price fluctuations.
Figure 14 analyzes the behavior of the State of Charge (SoC) of the BESS during an average summer day. The results show that the SoC remains within the permitted operational margins, starting at 10% and progressively increasing to 85%. Subsequently, the battery releases its energy during time block 6 (from 20:00 to 24:00 h), returning to the initial value of 10%. This behavior confirms that the system correctly performs charge and discharge cycles within a day, adhering to technical restrictions and ensuring efficient operation, as presented in Figure 15 and Figure 16.
The following graphs present the results of implementing the PSO method, visually evaluating whether it meets the technical conditions for loadability and voltage variation in the system. As detailed in Section 2.3, penalties are applied within the algorithm when technical restrictions are exceeded, ensuring that the results comply with the technical loadability levels for each conductor and the allowable voltage deviations at the nodes.
Since the PMGD and BESS systems have no significant impact on the generation or consumption of reactive power, the voltage variations at the nodes show minimal differences, as observed in Figure 15. The highest deviation recorded is approximately +0.4%, which is entirely within the range allowed by the regulations for this network, enabling variations within ± 8 % .
On the other hand, the loadability of the conductors shown in Figure 16 remains within the permitted limits, with the highest load level occurring during time block 6, where congestion is reduced. This behavior reflects an improvement in the conductors’ capacity, attributable to the system’s efficient energy management. Thanks to this strategy, generation is prevented from flowing into the transmission system during periods of high photovoltaic (PV) energy congestion. It is instead injected during periods when renewable energy generation is scarcer.

5.4. Execution Times

For each optimization method, 100 independent runs were performed to evaluate the reliability and robustness of the results. This allows a comparison of processing times by analyzing the maximum, minimum, and average values recorded. The results are presented in Table 15, expressed in seconds (s).
Table 15 shows that the fastest method to execute is PSO. This result is complemented by the comparative analysis presented in Table 16, which demonstrates the superiority of PSO in terms of temporal efficiency compared to the MC and GAP methods.
According to the literature, PSO is the most efficient method in terms of execution time. Table 16 shows that PSO is approximately 3.78 times faster than the MC method for achieving an average result. This means that, at the same time it takes for the MC method to complete a single simulation, PSO could execute close to four simulations.
In the comparison between PSO and GAP, PSO demonstrates a 257% improvement in temporal efficiency. This means that, if both methods were executed in parallel to solve the same simulation, PSO could achieve approximately two optimal solutions in the time it takes GAP to achieve one. Although GAP’s execution time is comparable to that of the MC method, the economic results are similar to those of PSO, highlighting its ability to achieve high-quality solutions with moderate efficiency.
The selection of key parameters for the battery energy storage system and the optimization algorithms is based on a combination of real project data, regulatory constraints, and values commonly adopted in recent literature. In particular, the battery energy capacity and charging-discharging limits are aligned with utility-scale BESS projects currently under environmental assessment in Chile, which typically consider storage durations of approximately five hours at nominal power. The state-of-charge limits are selected to preserve battery health and to reflect standard operational practices for lithium-ion technologies. Regarding system stability, this work focuses on steady-state operational feasibility rather than transient or small-signal stability analysis. The impact of parameter selection on secure operation is therefore assessed through nodal voltage limits, line thermal loadability, and state-of-charge feasibility, all of which are explicitly enforced through the constraint set and the penalty-based fitness function. The numerical results demonstrate that all optimized solutions satisfy these constraints, indicating stable steady-state operation under the proposed dispatch strategies.
It is important to emphasize that the economic results presented in this study quantify operational revenue improvements at the dispatch level and do not constitute a complete project-level financial feasibility assessment. When battery investment cost and effective lifetime are explicitly considered, the economic viability of intensive energy arbitrage becomes strongly dependent on the storage technology. Under high cycling conditions, lithium-ion batteries reach their end-of-life in approximately 3.5 years, leading to annualized investment costs of about 5.1 MUSD/year, which significantly exceed the achievable operational savings of approximately 1.3 MUSD/year. Consequently, lithium-ion technology does not reach payback within its effective lifetime under the analyzed operating regime. In contrast, flow battery systems, characterized by long service life (15 years) and negligible cycling degradation, distribute the same investment over a longer horizon, resulting in an annualized CAPEX of approximately 1.2 MUSD/year, comparable to the operational savings. This allows investment recovery within the battery lifetime and sustained net benefits thereafter. These results demonstrate that while aggressive energy arbitrage strategies are not economically consistent for lithium-ion technology under intensive operation, they are technically and economically coherent for long-duration storage technologies.

6. Conclusions and Future Work

This study presents a methodology for optimizing the operation of BESSs connected in parallel with PMGDs in a distribution network. The focus is on enhancing the economic and operational performance of the PMGD by employing various optimization techniques, namely Monte Carlo, GAP, and PSO. The proposed master–slave approach effectively integrates energy storage management with network constraints to maximize economic gains from energy sales while maintaining technical feasibility within the grid.
The results demonstrate that integrating a BESS into the PMGD network significantly improves economic performance by efficiently managing energy surpluses and injecting stored energy during periods of high demand and elevated energy prices. The statistical analysis highlights PSO as the most effective optimization method across both solution quality and computational efficiency. PSO achieved the highest economic benefits across all seasons, outperforming the GAP and Monte Carlo methods in both best-case and average scenarios. Additionally, the PSO method demonstrated superior consistency, with minimal variability across runs, indicating robust solution repeatability.
The comparative analysis conducted in this work demonstrates that widely adopted metaheuristic optimization techniques constitute a robust and practical alternative for addressing operational problems in distributed energy resources. The Monte Carlo approach proved useful as an initial exploratory benchmark, offering insight into the solution space, while population-based Genetic Algorithm variants and Particle Swarm Optimization consistently delivered superior solution quality and repeatability. These results confirm that high-impact metaheuristic methods can effectively solve complex dispatch problems without relying on specialized commercial solvers, thereby reducing implementation costs and modeling complexity while preserving flexibility and scalability. Consequently, the proposed framework is well-suited for practical deployment in real-world operational environments. Future research will extend this analysis by systematically benchmarking these metaheuristic solutions against exact optimization methods, enabling an objective assessment of the additional benefits and limitations associated with commercial deterministic solvers.
The three-node equivalent representation of the distribution network proved to be an effective approach for reducing computational complexity while preserving power flow accuracy. Its validation against the full network confirmed its suitability for simulating BESS operation within the PMGD framework. The results demonstrate that reduced-order models provide a valuable tool for operational planning of battery-supported distributed generation, enabling efficient day-ahead and seasonal analyses as long as all elements limiting power transfer, such as line thermal limits, transformer ratings, and interconnection constraints, are explicitly retained, ensuring technical consistency and physical validity.
Future research may explore hybrid optimization strategies that combine complementary features of different metaheuristic algorithms to enhance solution quality and computational efficiency further. In addition, integrating demand response programs and coordinated electric vehicle charging management represents a natural extension of the proposed framework, enabling a more holistic optimization of distribution network operation under high penetration of flexible resources.
While deterministic optimization techniques such as mixed-integer linear programming can be effective under convex or suitably linearized formulations, the inherently non-linear nature of the problem addressed in this work motivates the adoption of heuristic approaches that offer greater modeling flexibility without reliance on commercial solvers. A systematic comparison between the proposed metaheuristic framework and exact deterministic methods is therefore identified as a relevant extension and is proposed as future work to quantify optimality gaps and computational trade-offs under different modeling assumptions.
Furthermore, future work will focus on integrating a usage-dependent battery lifetime model into the proposed optimization framework, allowing degradation processes and effective end-of-life to be quantified as explicit functions of cycling intensity, depth of discharge, power rates, and operating conditions. This extension will enable a tighter coupling between short-term operational decisions and long-term economic performance, incorporating life-cycle indicators such as net present value (NPV), levelized cost of storage (LCOS), replacement strategies, and uncertainty in market conditions. By doing so, the framework will evolve toward a more comprehensive and technology-consistent assessment of battery energy storage systems under realistic intensive operation scenarios, while preserving the operational focus of the present contribution.

Author Contributions

Conceptualization, L.F.G.-N. and R.E.Q.-P.; methodology, J.T.-A., L.F.G.-N., R.E.Q.-P., O.D.M. and D.S.-V.; software, J.T.-A., L.F.G.-N., O.D.M. and D.S.-V.; validation, J.T.-A., L.F.G.-N. and O.D.M.; formal analysis, J.T.-A., L.F.G.-N., O.D.M. and D.S.-V.; investigation, J.T.-A., L.F.G.-N., R.E.Q.-P., O.D.M. and D.S.-V.; resources, R.E.Q.-P.; data curation, J.T.-A. and R.E.Q.-P.; writing—original draft preparation, J.T.-A.; writing—review and editing, L.F.G.-N. and D.S.-V.; visualization, D.S.-V.; supervision, L.F.G.-N.; project administration, L.F.G.-N.; funding acquisition, L.F.G.-N. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

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

The authors acknowledge the support provided by the Thematic Network 723RT0150 ‘‘Red para la integración a gran escala de energías renovables en sistemas eléctricos (RIBIERSE-CYTED)’’ financed by the call for Thematic Networks of the CYTED (Ibero-American Program of Science and Technology for Development) for 2022.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Revesz, R.L.; Unel, B. Managing the future of the electricity grid: Energy storage and greenhouse gas emissions. Harv. Environ. Law Rev. HELR 2018, 42, 139. [Google Scholar]
  2. UNFCCC. Portal de Estrategias a Largo Plazo. 2021. Available online: https://unfccc.int/process/the-paris-agreement/long-term-strategies (accessed on 20 July 2024).
  3. Coordinador. Informe Mensual del Coordinador Eléctrico Nacional. 2022 y 2021. Available online: https://www.coordinador.cl/reportes/documentos/informe-mensual-coordinador-electrico-nacional (accessed on 13 March 2023).
  4. Coordinador. Reducción de Energía Eólica y Solar Durante la Operación en Tiempo Real. 2022. Available online: https://www.coordinador.cl/operacion/documentos/resumen-de-reduccion-de-energia-eolica-y-solar-durante-la-operacion-en-tiempo-real/ (accessed on 22 March 2023).
  5. Errázuriz, C.P. Los mecanismos de estabilización de precios para la energía eléctrica en Chile. Desafíos y lecciones. Rev. Derecho Adm. 2024, 329–338. [Google Scholar] [CrossRef]
  6. Jung, D.; Schönberger, F.; Moraga, F.; Ilgen, K.; Wieland, S. Floating photovoltaic in Chile: Potential for clean energy generation and water protection. Sustain. Energy Technol. Assess. 2024, 63, 103647. [Google Scholar] [CrossRef]
  7. Stecca, M.; Elizondo, L.R.; Soeiro, T.B.; Bauer, P.; Palensky, P. A comprehensive review of the integration of battery energy storage systems into distribution networks. IEEE Open J. Ind. Electron. Soc. 2020, 1, 46–65. [Google Scholar] [CrossRef]
  8. Mallikarjun, P.; Thulasiraman, S.R.G.; Balachandran, P.K.; Zainuri, M.A.A.M. Economic energy optimization in microgrid with PV/wind/battery integrated wireless electric vehicle battery charging system using improved Harris Hawk optimization. Sci. Rep. 2025, 15, 10028. [Google Scholar] [CrossRef]
  9. Grisales-Noreña, L.; Cortés-Caicedo, B.; Montoya, O.D.; Hernandéz, J.; Alcalá, G. A battery energy management system to improve the financial, technical, and environmental indicators of Colombian urban and rural networks. J. Energy Storage 2023, 65, 107199. [Google Scholar] [CrossRef]
  10. Jani, V.; Abdi, H. Optimal allocation of energy storage systems considering wind power uncertainty. J. Energy Storage 2018, 20, 244–253. [Google Scholar] [CrossRef]
  11. Ray, S.; Kasturi, K.; Nayak, M.R. Optimal Operation of Grid-Tied PV & BESS Powered Smart Home with Electric Vehicle using AOA. In Proceedings of the 2022 International Conference on Intelligent Controller and Computing for Smart Power (ICICCSP), Hyderabad, India, 21–23 July 2022; IEEE: Piscataway, NJ, USA, 2022; pp. 1–6. [Google Scholar]
  12. Wahyuni, S.; Gunadin, I.; Muslimin, Z. Study of Optimal Alocation and Sizing of Battery Energy Storage Systems in Wind Turbine Integrated Power Generating Systems Using Metaheuristic AI. In Proceedings of the 2024 International Seminar on Intelligent Technology and Its Applications (ISITIA), Mataram, Indonesia, 10–12 July 2024; IEEE: Piscataway, NJ, USA, 2024; pp. 524–529. [Google Scholar]
  13. Saleem, M.; Saha, S.; Izhar, U.; Ang, L. Optimized energy management of a solar battery microgrid: An economic approach towards voltage stability. J. Energy Storage 2024, 90, 111876. [Google Scholar] [CrossRef]
  14. Zhang, R.; Lee, M.; Huang, L.; Ni, M. Optimization of battery energy storage system (BESS) sizing in different electricity market types considering BESS utilization mechanisms and ownerships. J. Clean. Prod. 2024, 470, 143317. [Google Scholar] [CrossRef]
  15. Wei, L.; Li, Y. Research on maximum power point tracking of photovoltaic power generation based on improved hybrid optimization algorithm. Sci. Rep. 2025, 15, 3991. [Google Scholar] [CrossRef]
  16. Diaz-Bello, D.; Vargas-Salgado, C.; Gomez-Navarro, T.; Aguila-Leon, J. Enhancing energy efficiency and profitability in microgrids through a genetic algorithm approach, analyzing the use of storage systems. Sustain. Energy Technol. Assessments 2025, 73, 104154. [Google Scholar] [CrossRef]
  17. Grisales-Noreña, L.; Cortés-Caicedo, B.; Montoya, O.D.; Sanin-Villa, D.; Gil-González, W. Integration of BESS in grid connected networks for reducing the power losses and CO2 emissions: A parallel master-stage methodology based on PDVSA and PSO. J. Energy Storage 2024, 87, 111355. [Google Scholar] [CrossRef]
  18. Alghamdi, A.S. Microgrid energy management and scheduling utilizing energy storage and exchange incorporating improved gradient-based optimizer. J. Energy Storage 2024, 97, 112775. [Google Scholar] [CrossRef]
  19. Nassef, A.M.; Abdelkareem, M.A.; Maghrabie, H.M.; Baroutaji, A. Review of metaheuristic optimization algorithms for power systems problems. Sustainability 2023, 15, 9434. [Google Scholar] [CrossRef]
  20. Falabretti, D.; Gulotta, F.; Spinelli, L. Participation of aggregated DERs to the ancillary services market: A Monte Carlo simulation-based heuristic greedy-indexing model. Energies 2022, 15, 1037. [Google Scholar] [CrossRef]
  21. Shang, Y.; Wu, W.; Liao, J.; Guo, J.; Su, J.; Liu, W.; Huang, Y. Stochastic maintenance schedules of active distribution networks based on Monte-Carlo tree search. IEEE Trans. Power Syst. 2020, 35, 3940–3952. [Google Scholar] [CrossRef]
  22. He, Y.; Liao, N.; Rao, J.; Fu, F.; Chen, Z. The optimization of investment strategy for resource utilization and energy conservation in iron mines based on Monte Carlo and intelligent computation. J. Clean. Prod. 2019, 232, 672–691. [Google Scholar] [CrossRef]
  23. Dashtdar, M.; Flah, A.; Hosseinimoghadam, S.M.S.; Kotb, H.; Jasińska, E.; Gono, R.; Leonowicz, Z.; Jasiński, M. Optimal operation of microgrids with demand-side management based on a combination of genetic algorithm and artificial bee colony. Sustainability 2022, 14, 6759. [Google Scholar] [CrossRef]
  24. Rodriguez-Cabal, M.A.; Botero-Gómez, V.; Sanin-Villa, D. Optimization of Weight Reduction in Power Transmission Systems Using Bio-Inspired Algorithms and Composite Materials. Coatings 2024, 14, 1586. [Google Scholar] [CrossRef]
  25. Zhou, Y.; Li, Z.; Zhou, H.; Li, R. The application of PSO in the power grid: A review. In Proceedings of the 2016 35th Chinese Control Conference (CCC), Chengdu, China, 27–29 July 2016; IEEE: Piscataway, NJ, USA, 2016; pp. 10061–10066. [Google Scholar]
  26. Grisales-Noreña, L.F.; Ocampo-Toro, J.A.; Montoya-Giraldo, O.D.; Montano, J.; Hernandéz, J. Optimal operation of battery storage systems in standalone and grid-connected DC microgrids using parallel metaheuristic optimization algorithms. J. Energy Storage 2023, 65, 107240. [Google Scholar] [CrossRef]
  27. Mokhtari, O.; Chevalier, S.; Almassalkhi, M. Structure-preserving Optimal Kron-based Reduction of Radial Distribution Networks. arXiv 2025, arXiv:2508.15006. [Google Scholar]
  28. Aprueba Reglamento Para Medios de Generación De Pequeña Escala. 2020. Available online: https://www.bcn.cl/leychile/navegar?idNorma=1150437 (accessed on 20 January 2025).
  29. Costo Marginal Online|Coordinador Eléctrico Nacional. 2024. Available online: https://www.coordinador.cl/mercados/graficos/costos-marginales/costo-marginal-online/ (accessed on 20 March 2024).
  30. Servicio de Evaluación Ambiental. 2024. Available online: https://www.sea.gob.cl/en/ (accessed on 20 March 2024).
  31. CNE. Norma Técnica de Conexión y Operación de PMGD en Instalaciones de Media Tensión. 2019. Available online: https://www.cne.cl/wp-content/uploads/2019/07/NTCO-PMGD-Julio-2019.pdf (accessed on 9 September 2023).
Figure 1. Monte Carlo Algorithm Flowchart.
Figure 1. Monte Carlo Algorithm Flowchart.
Asi 09 00022 g001
Figure 2. GAP Algorithm Flowchart.
Figure 2. GAP Algorithm Flowchart.
Asi 09 00022 g002
Figure 3. PSO Algorithm Flowchart.
Figure 3. PSO Algorithm Flowchart.
Asi 09 00022 g003
Figure 4. Description of electrical distribution system under study.
Figure 4. Description of electrical distribution system under study.
Asi 09 00022 g004
Figure 5. Digsilent simplify model.
Figure 5. Digsilent simplify model.
Asi 09 00022 g005
Figure 6. Average seasonal feeder demand profiles: (a) active power demand (left) and (b) reactive power demand (right).
Figure 6. Average seasonal feeder demand profiles: (a) active power demand (left) and (b) reactive power demand (right).
Asi 09 00022 g006
Figure 7. Average generation profiles by season for the PMGDs under study: (a) active power generation of the 3 MW PMGD, (b) reactive power generation of the 3 MW PMGD, (c) active power generation of the 9 MW PMGD, and (d) reactive power generation of the 9 MW PMGD.
Figure 7. Average generation profiles by season for the PMGDs under study: (a) active power generation of the 3 MW PMGD, (b) reactive power generation of the 3 MW PMGD, (c) active power generation of the 9 MW PMGD, and (d) reactive power generation of the 9 MW PMGD.
Asi 09 00022 g007
Figure 8. Average Marginal Costs for Each Climatic Season.
Figure 8. Average Marginal Costs for Each Climatic Season.
Asi 09 00022 g008
Figure 9. Seasonal comparison of best and average economic increment results obtained by the implemented optimization methods: (a) summer, (b) fall, (c) winter, and (d) spring, evaluated under daily average operating conditions.
Figure 9. Seasonal comparison of best and average economic increment results obtained by the implemented optimization methods: (a) summer, (b) fall, (c) winter, and (d) spring, evaluated under daily average operating conditions.
Asi 09 00022 g009
Figure 10. Percentage improvement of PSO compared to other methods.
Figure 10. Percentage improvement of PSO compared to other methods.
Asi 09 00022 g010
Figure 11. Voltages for nodes 1, 2, and 3. The right side is a zoomed view of the voltage deviation from −0.3% to 0.6%.
Figure 11. Voltages for nodes 1, 2, and 3. The right side is a zoomed view of the voltage deviation from −0.3% to 0.6%.
Asi 09 00022 g011
Figure 12. Loadability of conductors 1 and 2 for all seasons.
Figure 12. Loadability of conductors 1 and 2 for all seasons.
Asi 09 00022 g012
Figure 13. Hourl y power curves in the distributed system.
Figure 13. Hourl y power curves in the distributed system.
Asi 09 00022 g013
Figure 14. Stateof Charge (SoC) evolution of the BESS during an average summer day.
Figure 14. Stateof Charge (SoC) evolution of the BESS during an average summer day.
Asi 09 00022 g014
Figure 15. Voltage profile deviations at nodes 1, 2, and 3 for an average day during the summer season using the PSO method. The right side is a zoomed view of the voltage deviation from −0.2% to 0.5%.
Figure 15. Voltage profile deviations at nodes 1, 2, and 3 for an average day during the summer season using the PSO method. The right side is a zoomed view of the voltage deviation from −0.2% to 0.5%.
Asi 09 00022 g015
Figure 16. Loadability of conductors 1 and 2 for PSO in Summer.
Figure 16. Loadability of conductors 1 and 2 for PSO in Summer.
Asi 09 00022 g016
Table 1. Encoding Scheme for Daily Power Dispatch in a Battery Energy Storage System (BESS).
Table 1. Encoding Scheme for Daily Power Dispatch in a Battery Energy Storage System (BESS).
Hourh = 1h = 2h = 3h = 22h = 23h = 24
Power2−43.51−4−2
Table 2. Tuning Parameters for the Optimization Algorithms Applied to the BESS.
Table 2. Tuning Parameters for the Optimization Algorithms Applied to the BESS.
MethodParameterValueSearch Range
PSOPopulation Size1100[4, 1200]
v max 0.4057[0, 0.5]
Acceleration Factor ( c 1 )1.6168[0, 3]
Acceleration Factor ( c 2 )1.5715[0, 3]
Max Inertia Weight0.8643[0, 1]
Min Inertia Weight0.3521[0, 1]
GAPGenerations2000[0, 2000]
Individuals195[0, 200]
Mutations2[0, 10]
MCIterations184[50, 200]
Population Size1410[100, 2000]
Table 3. Capacitors Information.
Table 3. Capacitors Information.
NodeReactive Power (kVAr)Distance (km)
No. 5415799007
No. 7680564504.1
Table 4. Step-Up Transformer Parameters.
Table 4. Step-Up Transformer Parameters.
Step-Up Transformer
Rated Power (MVA)4.92
Frequency (Hz)50
Rated Voltage (kV)15/0.63
Connection GroupYNd11
Positive Seq. Reactance (X1) [%]8
Zero Seq. Reactance (X0) [%]8
Tap Range5 steps—2.5%
Number of Transformers2
Table 5. Inverter Information.
Table 5. Inverter Information.
Inverters Specifications
Max. AC Power (MW)1.5 kW
Max. DC Voltage (kV)0.63 DC
Brand and ModelINGECON SUN 1640TL B360
Number of Inverters6
Table 6. Netbilling Information.
Table 6. Netbilling Information.
NodePower (kW)Distance (km)
229,261407.8
169,3163004.64
Table 7. Simplified circuit parameters for the critical case.
Table 7. Simplified circuit parameters for the critical case.
Line R ij ( Ω ) X ij ( Ω ) P j ( kW ) Q j ( kVAr )
10.012190.0137290
20.10320.2666−11,176−842
Table 8. Line loadability in p.u. for DIgSILENT PowerFactory and simplified MATLAB circuits.
Table 8. Line loadability in p.u. for DIgSILENT PowerFactory and simplified MATLAB circuits.
LineDIgS. FullDIgS. Simpl.MATLAB
1–2104.69104.69104.69
2–382.2682.2682.27
Table 9. Node voltages in p.u. from respective simulations.
Table 9. Node voltages in p.u. from respective simulations.
NodeDIgS FullDIgS. Simpl.MATLAB
11.03411.03411.0340
21.03471.03471.0346
31.04051.04051.0404
Table 10. Stabilized energy selling prices for the Alto Jahuel 220 kV node.
Table 10. Stabilized energy selling prices for the Alto Jahuel 220 kV node.
Semester00:00–03:5904:00–07:5908:00–11:5912:00–15:5916:00–19:5920:00–23:59
First semester 202147.54947.13137.96534.12439.72053.958
Second semester 202148.46746.18329.93727.36143.40559.442
First semester 202252.71947.48031.15429.61748.86870.623
Table 11. Permitted voltage regulation limits based on network density.
Table 11. Permitted voltage regulation limits based on network density.
Network VoltageHigh and
Medium Density
Low and Very
Low Density
Low Voltage±7.5%±10%
Medium Voltage±6%±8%
Table 12. Results in CLP/day by model and season.
Table 12. Results in CLP/day by model and season.
SeasonModelSummerAutumn
CLP/dayMCGAPPSOMCGAPPSO
Best ResultCLP/day4,182,737.934,462,002.954,463,102.851,712,153.301,886,564.581,887,125.58
Average ResultCLP/day4,055,959.594,461,385.044,462,858.851,617,181.281,886,161.861,887,125.58
Standard DeviationCLP/day80,581.45795.26514.4147,618.03339.340.00
SeasonModelWinterSpring
CLP/dayMCGAPPSOMCGAPPSO
Best ResultCLP/day1,594,896.802,328,711.172,370,548.234,052,035.754,295,020.924,295,757.41
Average ResultCLP/day1,540,597.492,316,361.832,368,277.723,962,681.754,294,571.614,292,203.86
Standard DeviationCLP/day51,240.357134.172392.7966,563.99375.284968.46
Table 13. Comparison of optimization methodologies based on obtained results.
Table 13. Comparison of optimization methodologies based on obtained results.
MethodBest Solution (CLP)Average Solution (CLP)Std. Deviation (CLP)
Monte Carlo (MC)$4,182,738$4,055,96080,581.45
GAP$4,462,003$4,461,385795.26
PSO$4,463,103$4,462,859514.41
Base Case$3,132,256
MethodStd. Deviation (%)Difference (Best vs. Avg.) (%)Avg. Processing Time (s)
Monte Carlo (MC)1.990%3.03%213.73
GAP0.020%0.01%146.56
PSO0.010%0.01%56.64
Base Case
Table 14. Annual results in CLP by optimization method.
Table 14. Annual results in CLP by optimization method.
MethodBase CaseMonte Carlo (MC)GAPPSO
Best Annual Result$805,700,960.84$1,039,588,274.98$1,171,758,170.01$1,175,947,567.15
Average Annual Result$805,700,960.84$1,006,451,018.07$1,170,452,995.89$1,175,397,439.21
Table 15. Comparison of methods in terms of processing time (s).
Table 15. Comparison of methods in terms of processing time (s).
MethodMonte Carlo (s)GAP (s)PSO (s)
Max20814255
Min22114562
Average21114456
Table 16. Comparison of methods in terms of percentage improvement.
Table 16. Comparison of methods in terms of percentage improvement.
MethodMonte Carlo (%)GAP (%)
Max382%261%
Min357%234%
Average378%257%
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

Tapia-Aguilera, J.; Grisales-Noreña, L.F.; Quintal-Palomo, R.E.; Montoya, O.D.; Sanin-Villa, D. Optimizing Energy Storage Systems with PSO: Improving Economics and Operations of PMGD—A Chilean Case Study. Appl. Syst. Innov. 2026, 9, 22. https://doi.org/10.3390/asi9010022

AMA Style

Tapia-Aguilera J, Grisales-Noreña LF, Quintal-Palomo RE, Montoya OD, Sanin-Villa D. Optimizing Energy Storage Systems with PSO: Improving Economics and Operations of PMGD—A Chilean Case Study. Applied System Innovation. 2026; 9(1):22. https://doi.org/10.3390/asi9010022

Chicago/Turabian Style

Tapia-Aguilera, Juan, Luis Fernando Grisales-Noreña, Roberto Eduardo Quintal-Palomo, Oscar Danilo Montoya, and Daniel Sanin-Villa. 2026. "Optimizing Energy Storage Systems with PSO: Improving Economics and Operations of PMGD—A Chilean Case Study" Applied System Innovation 9, no. 1: 22. https://doi.org/10.3390/asi9010022

APA Style

Tapia-Aguilera, J., Grisales-Noreña, L. F., Quintal-Palomo, R. E., Montoya, O. D., & Sanin-Villa, D. (2026). Optimizing Energy Storage Systems with PSO: Improving Economics and Operations of PMGD—A Chilean Case Study. Applied System Innovation, 9(1), 22. https://doi.org/10.3390/asi9010022

Article Metrics

Back to TopTop