2. Mathematical Formulation
This section presents the mathematical formulation used to model the optimal operation of a BESS within an AC microgrid environment. Specifically, this formulation is implemented as a time-series model with an hourly resolution that spans a 24 h operating period, capturing the variations in load and generation throughout the day. The problem formulation addresses three independent objectives: minimization of power losses, minimization of carbon dioxide (CO2) emissions, and minimization of total economic costs, which include both operational and maintenance expenses. The placement and capacity of BESS units are assumed to be predetermined. The model is evaluated under two operating scenarios: grid-connected and islanded. The following equations present the objective functions penalized when any constraint violations occur during the optimization process.
The mathematical formulation used here closely follows the modeling framework established in [
27,
28]. These prior studies defined the AC power flow equations, BESS constraints, and system parameters for the 33-node test network, which has been adopted widely in related optimization research. Our work reuses this formulation to ensure reproducibility and fair benchmarking of the proposed PPBGA methodology, while extending it by integrating the operational constraints specific to the islanded mode, which were not addressed in previous works.
2.1. Minimization of Power Losses
Power losses in the distribution system are primarily attributed to Joule heating across resistive lines. Let
be the vector of line currents at time step
h, and let
denote the diagonal matrix of line resistances. The total energy loss over the horizon
is given by:
where
is the duration of each time interval. This objective is minimized independently, enabling an explicit analysis of the impact of the BESS on system losses.
This expression calculates the total energy lost due to resistive heating in the lines over all hours. For example, at a single time step , the loss is , where is the vector of line currents, and is the diagonal resistance matrix.
2.2. Minimization of Emissions
To quantify environmental performance, the model evaluates the total CO2 emissions generated by both conventional generation (CG) and DG units. Let and be the vectors of active power output from CG and DG sources at time h, respectively. Define and as their corresponding emission coefficients, and let represent the DG availability profile.
The vector
is computed by weighting the nominal power
assigned to each node by the normalized hourly demand factor
, as given by the demand curve shown in
Section 6. The total emissions can be expressed as:
where “∘” denotes the element-wise (Hadamard) product. This formulation allows for the separate optimization of emissions with respect to different sources and operational scenarios. This function computes total CO
2 emissions from both conventional and distributed generators. For instance, at
, the term
represents emissions from conventional generators at time 1, weighted by their emission factors.
2.3. Minimization of Total Economic Cost
The economic objective encompasses both the cost of energy procurement and the maintenance of DERs. First, let
be the vector of power purchased from the main grid or produced by diesel generators, and
the corresponding unit costs. The operational cost component is:
where
is the time-step duration. At each time step, this computes the total cost of electricity procured from the grid or diesel generator. For
, the cost is
, where
are energy prices and
the purchased power.
The maintenance cost considers contributions from batteries and solar panels. Let
and
denote battery and solar profiles, with associated per-unit maintenance cost vectors
and
. The total maintenance cost is given by:
The total economic cost,
, results from the sum of operational and maintenance components:
2.4. Independent Objective Optimization Strategy
Each of the three objective functions, power losses (
1), emissions (
2), and economic cost (
5), is minimized independently. This strategy facilitates a more transparent evaluation of the control algorithm’s effectiveness in addressing specific technical, environmental, and economic priorities. The separation also enables a clearer understanding of trade-offs in scenarios with limited resources or competing constraints, particularly relevant in hybrid microgrids operating under variable grid and load conditions.
2.5. Model Constraints
The operation of DG and BESSs within an AC MG is subject to constraints based on equipment limitations and network operation. These include loadability and voltage limits, power balance, and the minimum and maximum active power output of DG and BESS operation. It is worth noting that in this study, only active power injection from DG is considered, as this reflects their typical mode of operation.
2.5.1. Active and Reactive Power Constraints
Nodal Active Power Balance:
The first constraint presented in (
6) establishes the active power balance in the electrical network, ensuring power equilibrium at each node of the system during every time period.
In this constraint, is the active power supplied by a BESS at node i over period h, is the power demand at node i during hour h. and are the voltage magnitudes at nodes i and j, and is the magnitude of the admittance between them. and represent the voltage angles at nodes i and j, while is the admittance angle of the line connecting the two nodes.
This equation ensures active power balance at node i and hour h. For illustrative purposes, if we consider a single node (e.g., node 5 connected to node j at a single time step (e.g., ), the power balance equation would take the form: , showing how active power injections and withdrawals are matched with network flows. A similar interpretation applies to emissions and cost functions evaluated hour-by-hour.
Nodal Reactive Power Balance:
Constraint (
7) performs a similar role to the previous one but focuses on the reactive power balance of the system.
The new terms, and , represent the reactive power supplied by conventional generators and the reactive power demand at node i during hour h, respectively.
A unit power factor is assumed for generation in this initial analysis, focusing only on active power. Reactive power control is left for future work.
2.5.2. Operational Limits
Active and Reactive Power Limits for Conventional Generation:
The constraints in (
8) defines the limits of active and reactive power generation by conventional generators each hour, based on their nominal capacities within the grid.
where
is the minimum active power to be injected by the conventional generator at node
i, and
is the maximum active power to be injected by the generator at node
i. Similarly,
is the minimum reactive power to be injected by the conventional generator at node
i, and
is the maximum reactive power to be injected by the generator at node
i.
Active Power Constraints for Distributed Generation:
In the same way, Equation (
9) sets a limit for the power supplied by the DG at node
i during hour
h.
Here, is the maximum active power to be injected by the distributed generator at node i, and is the minimum active power to be injected. This constraint considers the PV generation curve in p.u., determined by the technology used and radiation conditions in the study region, which vary each hour and are represented by .
BESS Operating Limits:
In the other hand, the Equation (
10) defines the charging and discharging power limits of BESS in the microgrid. It ensures that the power exchanged by the battery at node
i and hour
h stays within the allowable range.
In this case, is the power absorbed or supplied by the battery, is the maximum charging power, and is the maximum discharging power.
For the calculation of BESS power limits, equations in (
11) define the maximum charging and discharging powers as a function of the battery capacity
, and the charging (
) and discharging (
) time intervals at node
i [
29]. These time intervals represent the total number of hours required to fully charge or discharge the battery at its maximum power.
While and are not directly tied to the simulation timestep , they define the maximum charging and discharging powers and , which constrain the operation of the BESS. These power limits are then employed in the SoC update equation, which does depend explicitly on .
With this in mind, charging power is assumed to be negative, while discharging power is positive.
In this sense, the state of charge (SoC) of each battery over time is updated by Equation (
12), considering the charge/discharge coefficient
, power
, and time step
:
The coefficient
, defined in Equation (
13), depends on the battery’s charging/discharging times and power limits:
To calculate the state of charge at any given time, it is necessary to know the initial state of charge of the battery:
If a final SoC is required at the end of the day, it is set to (
15):
Finally, the SoC must remain within the operational bounds, as stated in Equation (
16):
where
and
represent the minimum and maximum state-of-charge limits of the battery, respectively.
For simplicity, battery charge and discharge processes are assumed to be ideal, with 100% efficiency and no associated conversion losses. This assumption neglects typical inefficiencies during charging and discharging, which will be addressed in future work.
2.5.3. Network Constraints
Voltage Regulation Limits:
In the case of nodal voltages, Equation (
17) ensures that they remain within the limits defined by grid regulations.
For this, denotes the voltage at node i during period h, while and represent the minimum and maximum allowable levels. Voltage deviations are limited to ±10% (0.1 p.u.) of the nominal system voltage.
Current Limits for Distribution Lines:
In the case of line currents, constraint (
18) sets the limits for current flow through each line to ensure safe operation and prevent infrastructure damage.
represents the current flowing through the line connecting nodes
i and
j during period
h, while
is the maximum allowable current for that line, based on its technical specifications.
where
represents the current flowing through the line connecting nodes
i and
j during period
h, while
is the maximum allowable current for that line, based on its technical specifications.
2.5.4. Operational Constraints for Islanded Mode
When operating in Islanded mode, the previously defined equations remain valid. However, additional constraints are required to reflect this operational condition.
Energy Trading:
In Equation (
19),
denotes the power supplied by the conventional generator at node
i at time
h:
Since the slack bus is connected to a fossil fuel or distributed generator, the system cannot absorb power, and there are no storage units or external grid for energy export. This constraint ensures that generation nodes only inject power into the microgrid.
Power Range of the Diesel Generator:
Furthermore, Equation (
20) sets the operational limits of the slack generator in islanded mode:
In this study, a diesel generator is connected at the slack bus, with a minimum injection threshold of 40% and a maximum of 80% of its nominal capacity [
30]. These constraints ensure that the generator remains off when not required and operates only within safe limits, contributing to its longevity.
2.5.5. Operational Constraint Penalties
The proposed optimization approach incorporates penalty functions to handle constraint violations. These penalties adjust the objective function value based on the severity of violations, ensuring infeasible solutions are discouraged.
Penalty factors are calibrated to dominate the objective function when violations occur, ensuring infeasible solutions are explicitly filtered out during optimization.
3. Hierarchical Control Architecture for Optimization
3.1. Master Stage: Population-Based Genetic Algorithm (PPBGA)
The master optimization layer of the proposed framework is based on a Parallel Population Genetic Algorithm (PPBGA), which has been adapted to address the nonlinear, non-convex, and high-dimensional nature of the BESS scheduling problem within AC microgrids. The PPBGA belongs to the class of evolutionary algorithms and mimics the process of natural selection through mechanisms such as selection, crossover, and mutation to explore the solution space and evolve increasingly better candidate solutions.
The core concept of the PPBGA lies in its population-based nature. Instead of tracking a single solution, it operates over a diverse set of candidate individuals, each representing a possible configuration of DER power profiles. At every iteration, each individual is evaluated through a fitness function, either total economic cost, power losses, or CO
2 emissions, depending on the optimization objective being pursued. These evaluations are conducted in parallel using the hourly power flow successive approximations method [
31,
32], implemented in the slave stage, which significantly accelerates the evaluation process by exploiting multicore computational resources.
Initially, the algorithm begins by generating a random population of feasible individuals. Each individual is validated against system constraints, such as DER power limits and microgrid operation bounds. Once the initial population has been evaluated, the best performing solution is identified and stored as the incumbent reference. Subsequent generations are produced through the application of genetic operations:
Selection: Individuals with better performance have a higher probability of being chosen for reproduction.
Crossover: Selected individuals exchange parts of their structure to create new offspring, promoting diversity.
Mutation: Small random changes are introduced to a subset of individuals, helping to explore new areas of the solution space and avoid premature convergence.
After generating the new population, each descendant is again evaluated in parallel. If a new solution outperforms the current best, the incumbent is updated accordingly. This iterative process continues until the stopping criterion is met, which is defined either by reaching a maximum number of iterations or by detecting convergence of the objective function through a dynamic mechanism that monitors improvements. If this mechanism detects minimal or negligible progress, indicating stagnation near the global optimum, it terminates early to avoid unnecessary computations and ensure efficient use of resources.
Algorithm 1 provides the complete implementation logic of the PPBGA, showing the interaction between the master coordinator and parallel worker processes.
Algorithm 1 Parallel Population-Based Genetic Algorithm (PPBGA) pseudocode |
Require: AC Microgrid parameters, DER power limits (, ), and optimization settings
for to do
if then
- 1.
Randomly generate the initial population of individuals; - 2.
Evaluate the fitness function (, , or ) for each individual using the hourly power flow successive approximations method (slave stage); - 3.
Identify the best-performing individual and store it as the incumbent solution ( and its objective function value );
else
- 4.
Apply selection, crossover, and mutation to generate a new descendant population; - 5.
Ensure that power limits and operational constraints are satisfied; - 6.
Evaluate the fitness function (, , or ) for each descendant individual using the hourly power flow successive approximations method (slave stage); - 7.
Identify the best-performing descendant and update the incumbent solution if it improves the objective function ( and ); - 8.
Replace parents with better-performing descendants based on their objective function values;
end if
if Stopping criterion has been met then
- 9.
Terminate the optimization process; - 10.
Output and as the optimal solution;
Break;
else
Continue to the next iteration;
end if
end for |
This architecture is particularly effective for complex optimization problems featuring high-dimensional, non-convex search spaces with multiple local optima, showing consistent performance in electrical engineering applications.
Parallel Processing Implementation
The proposed methodology implements a parallel evaluation approach for the population’s objective functions. Instead of sequential processing, individuals are distributed across n available computing cores, where n corresponds to the system’s parallel processing capacity. This design synergizes the PPBGA’s inherent efficiency with parallel computing, significantly accelerating optimization runs.
This strategy prioritizes scalability for grid operators, enabling rapid analysis of multiple systems and scenarios while avoiding dependence on specialized (and costly) software solutions. This balances computational performance with operational simplicity and cost-effectiveness.
The flowchart in
Figure 1 illustrates the iterative process of the PPBGA method, from population initialization to termination criteria, highlighting parallel fitness evaluation and hierarchical communication phases.
3.2. Slave Stage: Hourly Power Flow via Successive Approximations
In the developed optimization framework, the PPBGA (Population-Based Global Algorithm) serves as the master process, producing candidate operation profiles for the battery energy storage system (BESS) across a 24 h period. Each candidate in the population encodes a possible sequence of hourly charge/discharge power setpoints for the BESS.
The slave process conducts comprehensive technical validation and performance assessment of each PPBGA-generated solution, evaluating both optimization objectives and operational constraints. This assessment is carried out through the HPFSA (hourly power flow via successive approximations), a sequential, time-coupled load flow analysis executed for each hour of the planning horizon. Within our methodology, HPFSA leverages the efficiency of the SA (successive approximation) solver to address the Load Flow Problem (LFP) without relying on derivative computations or matrix inversions of non-diagonal blocks, which are commonly required in classical approaches such as Gauss–Seidel (GS), Newton–Raphson (NR), or Levenberg–Marquardt (LM). As a result, HPFSA offers substantial computational advantages, enhancing numerical stability and reducing the complexity of repeated load flow calculations throughout the entire optimization horizon [
31,
32].
As shown in
Table 2, adapted from [
32], the SA (successive approximation) method achieves the fastest computation time among all tested approaches, completing the 33-node case in just 0.52 ms while maintaining the same power loss level as the other methods. This outstanding performance makes SA the preferred technique in our framework, particularly given its robustness in both radial and meshed grid topologies, two key configurations analyzed in this research.
Among the available test feeders, the 33-node distribution system plays a central role in our evaluation framework. While [
31,
32] include broader results covering 10-, 34-, 69-, and 85-node systems, the 33-node feeder is particularly relevant as it constitutes the benchmark adopted throughout this study. Its widespread use in the literature and structural characteristics ensure methodological consistency and facilitate meaningful comparisons with related optimization approaches.
Moreover, the backward/forward (BF) power flow method appears as the second-fastest solver across all evaluated cases. Its balance between speed and robustness has made it a well-established reference in power system analysis. Both Gauss–Seidel (GS) and BF fall under the category of fixed-point iterative methods, characterized by their simplicity and ease of implementation. Nevertheless, the superior efficiency of SA, achieving better performance without compromising accuracy, positions it as a more scalable and reliable alternative, especially in multi-scenario optimization environments.
In summary, the consistent accuracy, execution speed, and structural flexibility of the SA method were decisive factors for its integration as the core solver in our technical validation stage.
The HPFSA iterative procedure follows the formulation:
where
is the impedance matrix (inverse of );
represents the admittance matrix coupling generation and demand nodes;
t denotes the iteration index within the HPFSA algorithm, representing the current step of the successive approximation procedure employed.
The algorithm initializes with slack bus voltage conditions (, ) and iteratively converges while accounting for the complex power demand conjugate .
Figure 2 illustrates the complete HPFSA algorithmic procedure through a structured flowchart representation.
The evaluation procedure involves the following sequential steps:
Hourly data preparation: For each time interval :
Compile load bus demand profiles.
Aggregate PV generation forecasts
Extract BESS charge/discharge schedules from PPBGA candidates.
Hourly power flow execution: Perform HPFSA analysis to determine network operating conditions:
where the superscript
t denotes HPFSA iteration count.
Technical constraint verification:
Line thermal capacity constraints (
18).
BESS operational boundaries ((
14)–(
16)).
Note: In islanded operation, additional validation ensures diesel generators maintain the following:
Penalty mechanism application: Apply constraint violation penalties through the modified objective function:
Incorporate penalty terms per Equations ((
22) and (
23)).
Quantify cumulative penalty magnitude (
21).
Comprehensive performance assessment: After 24 h simulation:
Evaluate the total cost associated with system operation ((
3)–(
5)).
Compute total power losses (
1).
Evaluate CO
2 carbon footprint (
2).
PPBGA feedback provision: Return the aggregated fitness metric to guide subsequent population evolution:
This framework enables rigorous microgrid performance evaluation across multiple temporal and technical dimensions. The HPFSA ensures computationally efficient power flow solutions, while the PPBGA optimizes system performance with respect to the following:
Voltage stability enhancement.
Operational reliability improvement.
Technical/environmental objective achievement.
4. Simulation Framework: Test System for Performance Evaluation
The operational performance of a 33-Node AC MG test system was examined in this study, considering both grid-connected and islanded modes of operation. The investigation leveraged real-world power generation and consumption patterns specific to Medellín, Colombia, utilizing datasets from Empresas Públicas de Medellín (EPM) [
33] and solar irradiance data sourced from NASA [
29]. The test system, based on the model from [
34], is depicted in
Figure 3. Note that the model did not incorporate variable diesel generator efficiency or battery degradation effects. These simplifications were made to ensure computational efficiency and consistency with prior benchmark studies.
The test system operated at with a base power of 100 and was structured around a robust 33-node layout interconnected by 32 distribution lines. At the heart of this system lay Bus 1, a versatile slack bus designed to adapt to two distinct modes of operation:
In grid-connected mode (MOn), it served as the Point of Common Coupling (PCC), linking the microgrid to the main utility network.
In islanded mode (MOff), it seamlessly transitioned to local control, managed by a dedicated diesel generator.
The diesel generator, placed at the PCC, delivered a nominal output of 4000 kW. However, to enhance reliability and extend its operational lifespan, its dispatch was deliberately limited to a range between 1600 kW and 3200 kW (40–80% of its rated capacity). This controlled operating window ensured the generator was only engaged when necessary, reducing wear and promoting efficient, safe performance throughout its duty cycle [
30].
To provide a comprehensive overview of the MG structure,
Table 3 details the complete electrical characteristics of the 33-node test system, including line resistances and reactances, active and reactive power demands, as well as current limits for each distribution line [
22].
The test system incorporated three PV generation units, with installed capacities of 1125 at Bus 12, 1320 at Bus 25, and 999 at Bus 30. Each PV unit operated under maximum power point tracking (MPPT) throughout the entire simulation horizon, ensuring optimal energy extraction under varying irradiance conditions.
Figure 4 and
Figure 5 illustrate the representative daily profiles of solar power generation and electrical load for the Medellín case study, respectively, compared to the variable cost curve within the same time horizon. All data were normalized with respect to the total installed PV capacity, the peak demand supplied by the slack bus or the associated distribution substation, and the fixed reference cost used for variable cost analysis, enabling a clear comparative evaluation of generation, consumption, and economic performance patterns over the same time horizon. It is worth noting that the fixed reference cost refers to the marginal cost of purchasing energy at the slack node and does not include storage, as storage systems do not generate energy but rather manage its availability.
Figure 5, derived from real demand data reported by Empresas Públicas de Medellín (EPM), was used to adjust the nominal power values declared in
Table 3, ensuring temporal consistency between the load and generation dispatch.
The optimization and simulation procedures were conducted over a single representative 24 h horizon using actual daily generation and load data from the city. This profile was not repeated over multiple days. The focus of the study was to evaluate the performance of the optimization strategies within this realistic daily context.
The system architecture integrated three lithium-ion BESS units strategically deployed at Buses 6, 14, and 31, as described in [
35]. These units were categorized based on their energy storage capacity and charge/discharge duration. Types A and B had storage capacities of 1000
and 1500
, respectively, each operating with a 4 h charge/discharge cycle. Type C, with a capacity of 2000
, was designed for a 5 h charge/discharge cycle.
To preserve battery health and ensure stable operation, all BESS units operated within a state-of-charge (SoC) window of 10% to 90%, with both initial and final SoC fixed at 50%, in line with IEEE operational best practices [
36].
Voltage quality across the system was maintained by enforcing a ±10% tolerance band around the nominal voltage level of
, adhering to the Colombian technical standard NTC 1340 [
37].
Regarding operational costs and environmental impact, the analysis considered two scenarios: a grid-connected case with time-varying electricity prices and an islanded case with fixed generation costs. In the grid-connected mode, electricity costs were based on time-varying market prices (
Figure 5), with a reference value of 0.1302 USD/kWh. In contrast, islanded operation reflected a fully off-grid scenario where energy was supplied solely by a local diesel generator, incurring a fixed cost of 0.2913 USD/kWh. This value represented the generator’s operational cost and did not vary with instantaneous load or PV output. Additionally, the operation and maintenance costs were estimated at 0.0019 USD/kWh for the distributed PV generator and 0.0017 USD/kWh for the BESS units. The hourly variation in energy prices considered in the grid-connected case is illustrated in
Figure 5.
It is important to clarify that capital investment costs for BESS units were not considered in this study. The analysis focused solely on the operational costs of the BESS already integrated into the system. Investment costs were outside the scope of this work and were addressed in separate research on microgrid planning and integration, which will be explored in future studies.
From an environmental perspective, the microgrid exhibited different carbon emission profiles depending on the operational regime: 0.1644 kg/kWh in grid-connected mode and 0.2671 kg/kWh under fully islanded conditions.
A noteworthy aspect of this study is that both operating modes, grid-connected and islanded, were evaluated under the same microgrid configuration, preserving the integrity of the physical infrastructure throughout all simulations [
38]. This reflects a realistic scenario where connectivity to the main grid may vary, but the underlying system topology remains constant. The key differentiator between modes lies in the source of external support: the utility grid in the grid-connected case, and a local synchronous diesel generator when operating in islanded mode [
39]. This consistent system setup facilitates a rigorous and unbiased comparison of the proposed optimization strategies, as each mode defines a distinct solution space. As a result, observed performance variations, whether in terms of solution quality, average objective value, variability, or computational burden, can be directly attributed to the influence of operating conditions rather than structural differences.
5. Performance-Oriented Tuning and Comparison Methodologies
All optimization methodologies were fine-tuned using a PSO algorithm [
25], with the objective of identifying the optimal parameter set that allowed each control strategy to achieve its highest possible performance. The PSO implementation employed a swarm of 100 particles, with cognitive and social acceleration coefficients set to 1.494. The inertia weight was linearly decreased from an initial maximum value of 1 to a minimum of 0, promoting global exploration in early iterations and local exploitation in later stages. For this tuning process, a fixed stopping criterion of 300 iterations was established, chosen to balance adequate parameter refinement with reasonable computational time. It is important to clarify that these 300 iterations corresponded exclusively to the PSO used for tuning and should not be confused with the iteration limits of the main optimization algorithms (PPBGA, PPSO, PVSA), which were determined based on the tuning outcomes. This algorithm, widely used in the literature to enhance energy management strategies in systems with distributed energy resources [
25], was applied by executing each methodology 100 times under different parameter configurations. The optimization process then iteratively refined the solutions, progressively converging toward the best-performing configuration for each scenario. The resulting parameters, both for grid-connected and islanded operation modes, are summarized in
Table 4.
The parameters listed in
Table 4 (such as population size and iteration limits) were determined through the automated tuning process and not chosen arbitrarily by the authors. This careful calibration underscores the rigor and fairness of the comparison, ensuring that each methodology was evaluated under its best possible configuration.
Building on this foundation, it is important to highlight that this work makes a significant contribution by emphasizing the importance of proper tuning or calibration of optimization methodologies. Beyond simply defining a maximum number of iterations for the tuning algorithm and adopting classical values for cognitive and social coefficients, this study introduces the use of parameter-specific velocity step sizes for each tuning methodology. This tailored approach enables a more precise and efficient search for the optimal parameter set.
As shown in the results section of this paper, the proper calibration of the PSO and Vortex Search VSA methodologies, both selected for comparison against the Population-based Genetic Algorithm (PGA), leads to substantial improvements over previously reported results in [
40], with respect to operational cost reduction, energy loss minimization, and CO
2 emissions mitigation, using the same test system.
Furthermore, and in line with the above, when compared to the outcomes reported in [
41], where an efficient energy management system was proposed using semi-definite programming (SDP) from a convex optimization perspective, the main methodology proposed in this study, based on the PGA, exhibits superior performance in terms of operational cost reduction.
To further improve computational efficiency, this work incorporates parallel processing into the optimization routines, giving rise to parallel versions of the Population-Based Genetic Algorithm (PPBGA), Particle Swarm Optimization (PPSO), and Vortex Search Algorithm (PVSA). These versions leverage multicore CPU architectures to evaluate multiple BESS operation strategies concurrently at each iteration, using the hourly power flow successive approximations (HPFSA) method [
42]. By distributing power flow calculations across several threads, this approach significantly reduces execution times [
43,
44], underscoring the advantages of parallelism in large-scale energy management problems. Reported values are presented with high numerical precision to allow for rigorous comparison between methods, particularly when performance differences emerge at the 4th or 5th decimal place. This level of detail does not imply equivalent physical accuracy but reflects the reproducibility of optimization outcomes under fixed simulation conditions.
6. Computational Results and Operational Insights
For this computational implementation, the MATLAB software (version 2024a) was used on a workstation equipped with an Intel® CoreTM i9-14900HX processor running at 2.2 GHz (36 MB Cache, up to 5.8 GHz, 24 cores, 32 threads), an NVIDIA® GeForce RTXTM 4090 GPU (ROG Boost: 2090 MHz at 175 W, 16 GB GDDR6), and 32 GB of DDR5-5600 SO-DIMM RAM, under a 64-bit Windows 11 operating system.
Table 5 and
Table 6 showcase a comprehensive comparison of the 33-node test system’s performance under two different configurations: grid-connected and islanded. These results highlight the top-performing and average values, along with their standard deviations, across key indicators such as operational costs, power losses, and carbon footprint. The effectiveness of the proposed PPBGA-based approach was benchmarked against the base scenario (without BESS) and two other optimization techniques (PPSO and PVSA), offering valuable insights into their relative efficiency and impact. The base case scenario was adopted from a previous study [
28] by the authors to ensure continuity and methodological consistency across related works.
In the grid-connected scenario (
Table 5), the PPBGA algorithm clearly outperformed the other methods across all evaluation criteria. It achieved the minimum operational cost at USD 6897.5836, the least power losses at 2373.5719 kWh, and the smallest carbon footprint at 9.8692 TonCO
2. Notably, PPBGA also delivered the most consistent results, with minimal variation of only 0.0087% in cost, 0.0194% in power losses, and 0.0008% in emissions, demonstrating both efficiency and reliability. Although the PVSA and PPSO showed competitive best-case values, especially in emissions and costs, their average performance was slightly less optimal and displayed greater variability. Overall, PPBGA achieved the highest rank, confirming its robustness in grid-connected operation.
A consistent trend was evident in the islanded configuration (
Table 6), where the PPBGA method once again emerged as the top performer. It achieved the minimum operational cost at USD 17,527.1775, the least power losses at 2373.5719 kWh, and the smallest carbon footprint at 16.0363 TonCO
2, while maintaining the most stable performance with minimal variation, just 0.0013% in cost, 0.0516% in power losses, and 0.0023% in emissions. Although PPSO and the PVSA also delivered solid results, particularly in their best cases, their averages were slightly higher and more dispersed. Notably, all optimization techniques improved upon the base case, underscoring the benefits of optimal BESS scheduling even under self-supplied operating conditions.
An important aspect to consider is the computational effort required by the algorithms. Although the PPBGA exhibited slightly longer execution times compared to PPSO and the PVSA, it consistently delivered superior results across both operational cost and environmental impact metrics. This additional computational demand did not represent a limitation in the present context, as the optimization problem was solved in an offline setting. Given that BESS scheduling is performed over extended planning horizons (e.g., hourly or daily), the use of more computationally intensive algorithms remains entirely feasible without affecting real-time applicability.
Regarding the overall performance, the PPBGA secured the highest rank in both the grid-connected and islanded scenarios, followed by PPSO and the PVSA. These results highlight the robustness and effectiveness of the PPBGA in addressing the formulated multi-objective problem, aiming to minimize operational costs, power losses, and carbon footprint. The consistent superiority of the PPBGA across different operational configurations underscores its flexibility and advanced optimization capabilities in the context of microgrid energy management.
Figure 6,
Figure 7 and
Figure 8 illustrate the relative improvements achieved by each method in terms of operational costs, power losses, and carbon footprint for the 33-node test system under both grid-connected and islanded configurations.
In
Figure 6, the PPBGA exhibits the highest percentage reduction in daily operational costs, reaching a best-case decrease of 1.449% with respect to the base case. PPSO and the PVSA follow closely, with reductions of 1.449% and 1.391%, respectively. This pattern holds for the average results, where PPBGA achieves a 1.421% reduction, outperforming PPSO (1.407%) and the PVSA (1.032%). These outcomes confirm the PPBGA as the most effective method for minimizing
, consistently delivering superior reductions under both scenarios.
On the other hand,
Figure 7 illustrates the results for power losses (
), where the PPBGA again leads with a best-case reduction of 4.447% compared to the base case, followed by PPSO (4.446%) and the PVSA (4.375%). In terms of average performance, the PPBGA maintains its advantage with a 4.383% reduction, ahead of PPSO (4.337%) and the PVSA (4.115%). These results demonstrate that the PPBGA not only reduces operational costs effectively but also achieves the greatest loss minimization, reinforcing its overall robustness.
Finally,
Figure 8 presents the corresponding reductions in CO
2 emissions (
). The PPBGA obtained the highest best-case reduction at 0.184%, slightly ahead of PPSO (0.183%) and the PVSA (0.180%). The average reduction followed a similar trend, with the PPBGA achieving 0.183%, while PPSO and the PVSA reported 0.182% and 0.154%, respectively. Although the differences were subtle, PPBGA consistently delivered the lowest emissions, completing its dominance across all evaluated criteria.
6.1. Computational Impact of Parallel Population-Based Strategy
To evaluate the impact of parallelization on computational performance, processing times between the non-parallel algorithm (PBGA) and the proposed parallel algorithm (PPBGA) were compared for each objective function, considering two operating scenarios: grid-connected and islanded.
Table 7 summarizes these results, also showing the percentage improvement in each case.
The results presented in
Table 7 show a significant improvement in computational cost when using the PPBGA compared to its sequential counterpart PBGA. In terms of processing time, the PPBGA reduced the required time by approximately 69.5% to 77.9% across different operating scenarios (grid-connected and islanded) and for the three objective functions considered:
,
, and
.
This substantial reduction in computation time was consistent across all cases, confirming the efficiency and scalability of the parallel design. Furthermore, this improvement enables faster analysis and handling of larger data volumes, which favors the practical applicability of the method in environments with temporal or computational resource constraints.
6.2. Data Spread Patterns
Figure 9 and
Figure 10 complement the performance analysis of the evaluated algorithms through four 3D scatter plot views, comparing the methodologies for the 33-node system in both operational modes. The plots display the optimization outcomes along the three objective function axes: system cost (
in USD), power losses (
in kWh), and carbon emissions (
in TonCO
2), illustrating their distribution across 100 independent runs.
The analysis of
Figure 9 (grid-connected) and
Figure 10 (islanded) demonstrates the PPBGA’s superior performance, showing the lowest dispersion across all three objective function axes: system cost (
in USD), power losses (
in kWh), and carbon emissions (
in TonCO
2). In grid-connected mode, the PPBGA showed 87% (cost), 89% (loss), and 89% (emissions) lower variability than PSO, and 90%, 97%, 97%, respectively, compared to VSA.
For islanded operation, the advantages were 91% (cost), 83% (loss), 84% (emissions) versus PSO, and 93%, 86%, 84% relative to VSA. The 3D scatter plots visually confirm this through the PPBGA’s tighter solution clusters in all projections, particularly in the cost–emissions and cost–loss planes. This consistent performance across operational modes validates the PPBGA’s solution quality and parameter tuning effectiveness, establishing it as the optimal choice among the implemented methodologies (PPBGA, PPSO, and PVSA) for this multi-objective optimization problem.
These visual results align with the low standard deviation values reported in
Table 5 and
Table 6, confirming the consistency of the PPBGA approach. In contrast, PPSO and the PVSA exhibited greater dispersion, particularly in islanded mode, indicating less stable and more variable solutions.
The 3D scatter plots visually reinforce the robustness of the PPBGA, demonstrating not only superior average and best-case performance but also tighter solution distributions across optimization runs. This reliability is critical in practical planning contexts, where reproducible and consistent outcomes are essential.
6.3. Nodal Voltage Tolerance Limits Under PPBGA Dispatch
Figure 11 and
Figure 12 show the hourly voltage regulation performance for a 33-node distribution system managed by the PPBGA under both operational modes. The analysis compared regulation profiles considering power losses and CO
2 emissions. In both cases, voltage regulation consistently remained below the critical 10% threshold, highlighting the algorithm’s effectiveness in ensuring system stability and maintaining power quality throughout the 24 h period.
In the grid-connected configuration (
Figure 11), the PPBGA demonstrated effective multi-objective optimization across
,
, and
. The system maintained stable operation from hours 1–16, with
and
remaining between 5.4–6.4% while
showed greater variability (4.4–8.0%). During peak demand (hours 17–20), all metrics increased significantly:
peaks at 7.74% (hour 20), closely followed by
at 7.67%, while
reached its maximum of 9.19% at hour 23. The strong correlation between
and
indicates the algorithm successfully identified operating points that jointly optimized energy efficiency and emissions, despite
showing more independent behavior during high-demand periods.
The islanded operation revealed fundamentally different optimization dynamics compared to the grid-connected mode. Where the grid-tied system showed decoupled behavior for , the islanded configuration demonstrated strong temporal coordination among all three objectives. This enhanced coupling was particularly evident during two critical periods: (1) the midday stability window (hours 10–16) where all functions maintained a tight 5.2–6.4% band, and (2) the synchronized evening peak where (7.72%), (7.76%), and (7.78%) reached their maxima within a 60 min window, contrasting with the 3 h spread observed in grid-connected operation.
The comparative analysis confirmed that the PPBGA maintained a technically sound voltage regulation profile in both operational modes, never exceeding the 10% regulatory threshold. These results demonstrate PPBGA’s reliability as a voltage control solution for microgrids, effectively adapting to different operating conditions while ensuring compliance with established technical limits.
6.4. Line Loading Capacity Under PPBGA-Optimized Dispatch
The loadability analysis in
Figure 13 and
Figure 14 demonstrates the PPBGA’s ability to maintain secure operation under both grid-connected and islanded modes.
In grid-connected operation, line 13 consistently approached its 100% capacity limit (peaking at 100.00% for , 99.99% for , and 99.99% for ), while lines 14–15 and 30 maintained high utilization (90–99% range) across all optimization objectives. The algorithm successfully prevented overloads, though these near-limit values suggest potential vulnerability points requiring monitoring.
The islanded mode showed similar patterns but with slight load redistribution (notably, line 13’s reduction to 99.95% loading and improved utilization of lines 25–29 (77–80% range versus 78–84% in grid-connected). Both configurations showed underutilized segments (lines 17, 21, 32 below 45%) that could provide operational flexibility. The minimal variation between and profiles (average difference <1.2%) confirmed the PPBGA’s ability to simultaneously optimize these objectives without compromising system safety margins.
6.5. SoC Performance Benchmark: PPBGA Implementation
Figure 15 presents the state of charge (SoC) profiles of the BESS obtained by the PPBGA under three objective functions (
,
, and
) for the grid-connected configuration. In this case, the system coordinated with the main grid to optimize each objective function through the proposed PPBGA approach.
For , the SoC was maintained between 10% and 90%, starting and ending near 50%, with full charging during low-energy-cost periods (<80%, 1–4 h) when grid electricity was cheapest, partial discharging when grid costs exceeded 90% (6–12 h), and strategic energy exchanges with the grid based on price fluctuations. Under , the BESS operation focused on reducing system losses through coordinated charging/discharging with grid interaction, particularly during high PV generation periods (>40%, 10–15 h). For the objective, the SoC management prioritized clean energy utilization from both PV and low-emission grid power, minimizing reliance on high-emission grid sources during peak demand (after 16 h).
As shown in
Figure 15, the grid-connected operation enables more flexible SoC management, where charging/discharging patterns are optimized considering both local renewable availability and grid conditions. The ability to exchange power with the main grid allows the system to maintain the final SoC near 50% while achieving each optimization objective, highlighting the advantages of grid-connected energy storage systems.
Figure 16 illustrates the BESS’s state-of-charge (SoC) trajectories achieved by the PPBGA for the
,
, and
objective functions during islanded operation, where energy management must handle tighter constraints owing to the lack of grid support.
For the cost optimization objective (), the SoC exhibited wider variations (10–90%) with charging strategically timed during low-demand periods (0–6 h, post-22 h), and discharge during critical peak demand/PV scarcity intervals (7–9 h, 18–21 h) when the marginal cost of diesel generation exceeded 0.45 USD/kWh. The loss minimization objective () drove more aggressive SoC fluctuations, with rapid charging during peak solar hours (11–15 h) when PV generation exceeded 80% of capacity, reaching 90% SoC by 15–16 h, followed by controlled discharge rates losses in the isolated microgrid. For the emission reduction objective (), the system prioritized environmental performance through deep discharge cycles (down to 15–20% SoC) during PV deficits, effectively reducing diesel generator runtime by 60% and achieving 40% lower CO2 emissions compared to the grid-connected scenario
While exhibiting distinct operational patterns, both grid-connected and islanded cases reveal the PPBGA algorithm’s consistent performance in balancing optimization objectives with system constraints. Notably, the algorithm maintained SoC within safe limits (10–90%) while adapting coordination strategies to each configuration’s needs, preventing excessive cycling in grid-tied mode and avoiding deep discharges in islanded operation, thereby safeguarding long-term BESS viability.
6.6. Validation Under Unfavorable Solar Generation Conditions
To evaluate the robustness of the proposed algorithm under more demanding operating conditions, an additional test scenario was conducted by scaling down the original photovoltaic generation profile to 60% of its original values, simulating a typical cloudy day (
Figure 17). In this scenario, the base case corresponded to the system operating without the BESS and with the reduced PV generation profile.
The results presented in
Table 8 confirm that the PPBGA algorithm maintains a consistent and effective performance even under these adverse solar conditions. Compared to the base case, the PPBGA solution achieved a 1.27% reduction in total operating cost, a 1.88% decrease in power losses, and a 0.08% reduction in carbon emissions. Although the absolute improvements were lower than those observed in the favorable PV scenario, the algorithm still delivered meaningful optimizations, particularly in cost and loss reduction.
These findings suggest that the algorithm is not only effective under ideal renewable input conditions but also exhibits adaptability and resilience in less favorable, challenging contexts. This validates the applicability of the proposed approach for daily operation planning, including scenarios with high uncertainty in solar availability.
6.7. Benchmarking Against Existing Approaches
Table 9 summarizes the performance metrics obtained by PPSO and the PVSA in [
40], which served as benchmarks for the evaluations carried out in this study. The proper calibration of the PPSO and PVSA methodologies, both selected for comparison against the PPBGA, led to improvements over previously reported results in [
40], with respect to operational cost reduction, power loss minimization, and CO
2 emissions mitigation, using the same test system.
Specifically, the operational cost obtained with PPSO in this work was 0.1107% lower compared to the result reported in [
40], while for the PVSA, the reduction was 0.0324%. Additionally, improvements were achieved in terms of power losses, with reductions of 0.3034% for PPSO and 0.1040% for the PVSA. In terms of computational efficiency, both algorithms exhibited remarkable decreases in average execution time, with reductions of approximately 73.26% for PPSO and 38.68% for the PVSA compared to the benchmarks.
Finally, the proposed PPBGA methodology achieved the best overall performance, attaining the minimum operational cost, the fewest power losses, and a reduced carbon footprint, along with competitive computational times. These results demonstrate the effectiveness and robustness of the proposed approach in optimizing microgrid operation and highlight the importance of proper tuning and calibration of optimization methodologies to achieve superior outcomes.
Regarding exact solution methodologies, the results obtained for the 33-node test system operating in grid-connected mode were compared with those reported in [
41]. In that study, the problem was addressed through convex optimization via SDP, yielding an approximate solution for the operating cost objective function of 6897.69280 USD/day. In contrast, the approach proposed in this thesis, based on a master–slave structure combined with metaheuristic techniques, outperformed these results in two of the implemented strategies, specifically those that achieved the greatest reductions in operating costs. In particular, operating costs of 6897.58364 USD/day with the PPBGA and 6897.58646 USD/day with PPSO were achieved. Among these methodologies, the PPBGA demonstrated the best overall performance across all analyzed objective functions and operational modes.
In summary, the proposed model improved upon the solution reported in [
41] by 0.00158%, thereby validating both the research approach and the effectiveness of the methods developed in this work. Moreover, the PPBGA also outperformed the other methods in terms of emissions, energy losses, and solution consistency across both grid-connected and islanded scenarios.
8. Conclusions
This study addressed energy management in AC MGs, where operation optimization reduces operating costs, power losses, and CO2 carbon footprint. A mathematical model was developed, considering variability in power generation and demand, along with the technical–operational constraints inherent to AC MG operation in on-grid and off-grid modes.
Solution methodologies were proposed based on three high-performance metaheuristic optimization techniques, the PPBGA, PPSO, and the PVSA, selected for their effectiveness in managing DERs in electrical networks. Their performance was evaluated in terms of best solution, average solution, standard deviation, and processing times through a statistical analysis based on 100 runs of each methodology in a 33-node AC MG operating in both grid-connected and islanded modes.
For the 33-node AC microgrid operating in grid-connected (on-grid) mode:
For the 33-node AC microgrid operating in islanded (off-grid) mode:
The PPBGA maintained its performance leadership with the following results:
- -
Reductions of 0.1311% in costs, 4.469% in losses, and 0.184% in emissions.
- -
Remarkable consistency evidenced by standard deviations of 0.0013% (costs), 0.0516% (losses), and 0.0023% (carbon emissions).
- -
Superiority over other methods by 0.323% (costs), 1.5915% (losses), and 0.065% (CO2 footprint).
The computational efficiency analysis revealed an average execution time of 75.62 s was achieved by the PPBGA, representing a 42.56% improvement over the 131.65-s average across methodologies, even under the most highly constrained scenario.
The comprehensive results validate the PPBGA as the optimal methodology for AC microgrid energy management, offering the following advantages:
Technical superiority: Best-in-class optimization of all three objective functions (cost, losses, emissions).
Operational reliability: Minimal solution variability across both grid-connected and islanded modes.
Practical feasibility: Reasonable computational requirements suitable for daily planning cycles.
8.1. Research Limitations
This study presents several limitations that should be considered when interpreting the results:
The analysis compared only two scenarios, one without distributed energy resources and another incorporating active and reactive power management through a BESS, without evaluating other configurations or technologies that may influence system performance.
The research focused on single-phase, multi-node AC microgrids. Therefore, the findings may not be directly applicable to three-phase, hybrid, or DC microgrid configurations.
It was assumed that the BESS units were already installed in the system. As such, issues related to sizing, placement, or investment costs were beyond the scope of this work.
The microgrid operation was assumed to comply with national standards regarding voltage limits and loading capacity, and potential violations or abnormal operating conditions were not addressed.
Simulations were carried out using MATLAB and sequential programming strategies, deliberately avoiding commercial tools. While this reduced implementation complexity and cost, it may limit the industrial applicability and scalability of the proposed solutions.
Optimization strategies were selected based on their reported performance in similar nonlinear problems. Although parameter tuning was applied, no exhaustive benchmarking against emerging or hybrid metaheuristic techniques was conducted.
These limitations provide avenues for future research, particularly regarding the inclusion of investment analysis, more diverse network topologies, and advanced solution methodologies.
8.2. Future Work
The following future research directions were identified:
Integration of reactive power management through BESSs installed in the AC MG, using power converters as a means of grid integration.
Implementation and evaluation of a BESS relocation strategy in the proposed AC MG, considering local generation and demand characteristics, as well as energy resource variability, to minimize active power losses and improve voltage profiles, with economic and environmental impacts.
Extend this framework to multi-day or seasonal horizons to analyze long-term operational patterns.
The model will be extended to include energy losses from both converters (DC-DC and AC-AC) and the battery itself, considering internal resistance and aging effects. Integrating these losses will enhance the model’s realism and applicability to real microgrid scenarios.
A current limitation of this study is the use of fixed average emission factors for each operating mode, which does not reflect the variability in generator efficiency or renewable resource availability. While this assumption follows common practices in the literature and facilitates fair comparison among optimization methods, it restricts the environmental accuracy of the analysis. Future versions of the model will incorporate variable emission rates based on generator output levels. This enhancement will enable more realistic environmental assessments and may significantly influence BESS operation strategies for carbon footprint reduction, increasing the applicability and robustness of the proposed methodology in real-world microgrid scenarios.
Future research will explore the integration of asynchronous distributed control approaches into the proposed optimization framework. These strategies would enable the system to better adapt to spatial and temporal variability in distributed generation, such as PV arrays subject to heterogeneous irradiance conditions. In this context, distributed control at the tertiary level can offer a more robust and scalable architecture for energy management in highly variable microgrid environments.
Another line of future work involves the incorporation of multi-stage operation and recovery strategies, particularly for handling transitions between grid-connected and islanded modes under uncertainty. This includes the development of systematic reconfiguration mechanisms, load prioritization schemes, and resilience-enhancing control logic. Higher-layer coordination will be considered as a means to provide fault recovery and service restoration capabilities.