Next Article in Journal
A Study on the Determinants of the Service-Oriented Transformation of Manufacturing Enterprises
Next Article in Special Issue
Sustainable Energy Performance Optimization of Occupancy Sensor Placement in Smart Lighting Systems for University Classrooms
Previous Article in Journal
Energy Transition and Systemic Enterprise Upgrading: The Role of Carbon Markets, Digitalization, and Financing Constraints
Previous Article in Special Issue
A Contingency-Aware Sensitivity-Based Framework for Sustainable Shunt Compensation Planning in Transmission Systems Under N–1 Security Constraints
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Sustainable Multi-Period AC Optimal Power Flow in Active Networks with Photovoltaic Generation, Battery Energy Storage Systems, and a Data-Driven Pathway Toward Warm-Start Strategies

by
Carlos Barrera-Singaña
1,*,
Diego Francisco Carrión
1,
Manuel Dario Jaramillo
1,
Luis Fernando Tipán
1 and
Alex Valenzuela
2
1
Department of Electrical Engineering, Universidad Politécnica Salesiana, Quito EC170702, Ecuador
2
Master’s Program in Electricity, Universidad Técnica de Cotopaxi, Latacunga EC050101, Ecuador
*
Author to whom correspondence should be addressed.
Sustainability 2026, 18(11), 5704; https://doi.org/10.3390/su18115704
Submission received: 7 May 2026 / Revised: 27 May 2026 / Accepted: 2 June 2026 / Published: 4 June 2026
(This article belongs to the Special Issue Smart Grid and Sustainable Energy Systems)

Abstract

This paper presents a multi-period formulation of alternating current optimal power flow for active networks with conventional generation, photovoltaic generation, battery energy storage systems, renewable curtailment, and hourly electricity prices. The model is implemented on the IEEE 14-bus system over a 24 h horizon and solved as a nonlinear optimization problem to minimize total operating cost while preserving electrical feasibility. The formulation includes nodal active and reactive power balances, generator operating limits, photovoltaic inverter constraints, BESS charging and discharging dynamics, state of charge, voltage limits, and branch flow constraints. The results show a total demand of 5796.42 MWh, conventional generation of 5412.56 MWh, photovoltaic generation of 562.40 MWh, and active losses of 167.07 MWh, equivalent to 2.88% of the supplied energy. No photovoltaic curtailment was required, and the BESS exhibited a clear energy arbitrage pattern, charging during low-price hours and discharging during periods of higher economic value. In addition, a supplementary IEEE 39-bus assessment confirmed the computational applicability of the proposed formulation on a larger benchmark system. Furthermore, the optimal solutions enabled the construction of a supervised dataset to support the future development of machine learning-based warm-start strategies.

1. Introduction

The ongoing energy transition is reshaping the operational requirements of modern power systems. High penetrations of distributed renewable energy resources, increasing electrification, and the deployment of flexible assets such as battery energy storage systems (BESSs) are transforming passive grids into active networks with bidirectional power flows and stronger temporal variability. In this context, sustainable system operation requires optimization frameworks that simultaneously capture economic efficiency, renewable integration, network security, and temporal coordination. These requirements are particularly relevant in active distribution systems and hybrid distribution–transmission environments, where voltage regulation, reactive power management, and dynamic operational coupling become critical [1,2,3].
Among the available tools for secure and economically efficient operation, the alternating current optimal power flow (AC-OPF) remains one of the most rigorous formulations because it preserves the nonlinear electrical relationships associated with active and reactive power balance, voltage magnitudes, phase angles, and branch power flows. Compared with simplified DC or linearized formulations, AC-OPF is better suited to assess voltage-sensitive operation and the technical feasibility of renewable-rich networks, especially when distributed generation and flexible resources interact at multiple nodes [1,4,5]. This is particularly important in active networks, where distributed photovoltaic (PV) systems and storage devices can improve efficiency and flexibility but may also intensify operational complexity if their interaction is not properly coordinated [6,7,8].
A further source of complexity arises from the temporal nature of operational decisions. While single-period OPF remains useful for snapshot analysis, it is not sufficient to represent inter-temporal phenomena such as battery charging and discharging, state-of-charge evolution, or the effect of time-varying electricity prices. For such cases, multi-period formulations are required. In multi-period OPF, the solution at each time step is coupled to previous and future operating points, which enables coordinated scheduling over a finite horizon and a more realistic representation of flexibility resources [9,10,11]. This temporal coupling is especially relevant for active networks with BESSs, since storage is inherently a dynamic resource whose operating value depends on both current and anticipated system conditions.
The literature has shown that multi-period OPF can significantly improve system operation when storage and variable renewable generation are explicitly modeled. Stochastic and deterministic formulations have been proposed for day-ahead and short-term scheduling under time-varying load and generation conditions, with applications ranging from benchmark test feeders to real distribution systems [1,4,5,12]. These studies highlight that the benefits of storage depend not only on its location and size, but also on the temporal structure of demand, renewable availability, and energy prices. In this sense, the integration of time-of-use pricing into multi-period AC-OPF is not merely an economic extension; it is a fundamental mechanism to reveal flexibility value, enable arbitrage, and support sustainable dispatch decisions.
PV integration has also received sustained attention in the OPF literature due to its strategic role in decarbonization and distributed energy transition. However, the integration of PV in active networks creates several operational challenges, including voltage rise, reverse power flow, uncertainty, inverter capability management, and possible renewable curtailment under constrained conditions [3,13,14]. Different studies have addressed PV modeling through deterministic profiles, probabilistic representations, or forecast-based scheduling, and some have incorporated advanced inverter functionalities such as Volt–VAr and Volt–Watt regulation [3,9,15]. These developments confirm that PV should not be treated as a purely exogenous injection in active networks; instead, its operational coordination with network constraints and flexible assets is essential for secure and efficient operation.
BESS has emerged as a key enabling technology to increase renewable hosting capacity, smooth net load, reduce losses, improve voltage profiles, and shift energy across time periods [2,6,7]. In the OPF context, storage is typically represented through charging/discharging power limits, state-of-charge constraints, round-trip efficiency, and sometimes degradation-aware operation [8,9,10]. When coordinated with PV generation, BESS can absorb surplus renewable energy during low-demand or low-price periods and discharge during high-demand or high-price intervals, thereby supporting both economic and technical objectives [5,6,16]. Several studies have also shown that storage can contribute to ancillary services, peak shaving, and voltage support in active distribution networks [2,8,17].

State of the Art

Recent research on multi-period OPF has explored a wide spectrum of formulations and solution strategies. Nonlinear AC-based models remain predominant when physical fidelity is prioritized, while linearized and mixed-integer formulations are often preferred when computational tractability or global optimality is emphasized [1,4,16]. For example, multi-period AC formulations have been applied to stochastic scheduling in active distribution systems [1,12], storage-integrated operation in radial networks [4], and large-scale optimization with dynamic programming [11]. In parallel, simplified MILP-based models have been proposed to facilitate the integration of BESS and distributed generation over multi-hour horizons [16,18]. Although these contributions are valuable, simplified formulations may not fully capture the voltage and reactive power dynamics that are central to active network operation.
With respect to PV integration, existing studies have examined uncertainty-aware scheduling, smart inverter control, and coordinated renewable management. Sperstad and Korpås [9] considered storage scheduling under wind and PV uncertainty, while Inaolaji et al. [3] embedded smart inverter droop settings in multiphase distribution OPF. Srithapon et al. [13] addressed probabilistic OPF under PV and electric vehicle penetration through surrogate-assisted optimization, and Makanju et al. [14] proposed intelligent coordination of PV and voltage-regulating devices in uncertain distribution settings. Collectively, these works demonstrate that PV integration is not only a generation scheduling problem but also a voltage-constrained and inverter-limited operation problem.
In the case of BESS, numerous studies have confirmed its value for temporal flexibility and arbitrage. Sidea et al. [6] presented GPU-accelerated storage scheduling in active networks, while Blasi et al. [2] incorporated ancillary service provisioning in a multi-period OPF framework. Molina-Martin et al. [7] used BESS to jointly reduce losses and greenhouse gas emissions in AC distribution networks, and Kotsalos et al. [8] studied coordinated BESS and tap changer operation in low-voltage systems. In addition, stochastic dispatch formulations have shown that storage can improve resilience to uncertainty and reduce voltage violations when properly scheduled [5]. Nevertheless, the majority of these studies focus either on specific operational services, simplified network assumptions, or problem variants that do not explicitly combine full AC network representation, PV, storage, renewable curtailment, and hourly price signals in a unified framework.
Another major issue identified in the literature is computational burden. Multi-period AC-OPF problems are nonlinear, nonconvex, and, when integer variables are included, potentially mixed-integer and difficult to solve at scale [10,11,19]. The problem becomes even more demanding when uncertainty, ancillary services, demand response, or large time horizons are considered [1,20]. This has motivated the development of approximation methods, decomposition techniques, accelerated solvers, and high-performance implementations [6,11,19]. Despite these advances, there is still a clear need for computational strategies that preserve electrical realism while improving solution speed and scalability.
In this context, machine learning is increasingly being explored as a promising complement to OPF rather than a replacement for physics-based optimization. Recent contributions have investigated graph neural networks, deep reinforcement learning, surrogate models, and feasibility-aware learning for OPF approximation or acceleration [15,21,22,23]. Rajaei et al. [21] proposed spatio-temporal graph neural networks for multi-period OPF, while Ajeyemi et al. [23] emphasized feasibility guarantees in learning-based AC-OPF solution pursuit. Surrogate-assisted probabilistic OPF has also shown computational advantages in renewable-rich systems [13]. Even so, the use of learning models as warm-start mechanisms for nonlinear multi-period AC-OPF in active networks with coordinated PV and BESS operation is still at an early stage.
Beyond AC-OPF itself, recent literature also shows that data-driven methods are rapidly expanding across several power-system and distribution-network applications. For example, feature-driven ensemble models have been proposed for complex power-quality disturbance classification, while multi-temporal feature-learning approaches have also been applied to electricity theft detection [24,25]. In parallel, data-enhanced operational optimization has also been explored in related scheduling and energy-management problems, such as the optimal scheduling of renewable power grid–hydrogen integrated systems considering flexible energy transfer [26]. Although this work does not directly address the present problem of supervised warm-start development for multi-period AC-OPF in active networks, it does confirm the broader and fast-moving transition toward feature-driven and data-supported decision-making in modern power systems.
To better position the present contribution with respect to the recent literature, Table 1 summarizes representative studies on AC-OPF, multi-period operation, photovoltaic integration, battery energy storage, time-coupled scheduling, and machine learning-based acceleration.
As shown in Table 1, previous studies have typically addressed only subsets of the overall problem, such as storage scheduling, photovoltaic integration, stochastic OPF, or learning-based acceleration. By contrast, the framework proposed here brings together multi-period AC network modeling, coordinated PV and BESS operation, time-of-use pricing, renewable curtailment, and a machine learning-oriented initialization pathway within a single formulation.
Therefore, a relevant research gap remains at the intersection of four elements: (i) physically faithful multi-period AC-OPF, (ii) coordinated operation of PV and BESS, (iii) explicit time-of-use pricing to reveal temporal flexibility value, and (iv) machine learning-assisted acceleration without compromising electrical feasibility. Although the literature has made important progress on each of these dimensions separately, comparatively fewer works combine them in a unified, reproducible, and sustainability-oriented framework suitable for active network studies.
Motivated by this gap, this paper develops a sustainable multi-period AC-OPF framework for active networks that explicitly models conventional generation, distributed PV generation, BESS operation, renewable curtailment, and hourly electricity pricing over a 24 h horizon. The proposed formulation is implemented on the IEEE 14-bus system and preserves the main electrical and temporal couplings required for realistic operation. In addition, the resulting optimal OPF solutions are used to build a supervised dataset that supports the future development of warm-start strategies based on machine learning.
The main contributions of this work are threefold:
  • a multi-period AC-OPF formulation for active networks that jointly considers conventional generation, PV units, BESS scheduling, renewable curtailment, and time-of-use pricing;
  • a 24 h IEEE 14-bus case study demonstrating coordinated renewable integration, storage arbitrage behavior, admissible voltage operation, and loss-aware dispatch;
  • supervised data generation from optimal OPF solutions to support the future development of machine learning-based warm-start strategies.
Overall, the proposed framework contributes to the sustainable operation and digitalization of active power networks by linking rigorous nonlinear optimization with a clear data-driven extension pathway, while preserving a strong focus on renewable integration, operational flexibility, and physically feasible system performance.

2. Mathematical Formulation of the Problem

This section presents the mathematical formulation of the alternating current optimal power flow (AC-OPF) problem for a multi-period active network.
Recent multi-period OPF studies have addressed photovoltaic generation, storage integration, and learning-assisted acceleration from different perspectives, but generally as partially separated problem settings. For example, de Souza et al. developed a multi-period OPF model with photovoltaic generation and optimized power factor control, focusing on loss minimization and voltage-profile improvement without explicitly incorporating battery storage systems or hourly time-of-use pricing [27]. In turn, da Silva et al. and Salazar Vanegas et al. addressed the coordinated integration of photovoltaic generation and battery energy storage systems over a 24 h horizon, but from allocation, sizing, and planning-oriented MINLP and MILP formulations rather than from the present operational AC-OPF perspective [16,28]. More recently, Deihim et al., Kim et al., and Xie et al. explored graph-neural-network initial estimates and machine learning-assisted warm-start strategies for AC-OPF and multi-period AC-OPF, showing the relevance of data-driven initialization for convergence improvement [29,30,31]. However, these works do not explicitly formulate the coordinated operation of conventional generation, distributed photovoltaic generation, renewable curtailment, BESS temporal dynamics, degradation-aware storage operation, hourly time-of-use pricing, and full AC network constraints within a single deterministic multi-period active-network framework. Therefore, the methodological contribution of this paper is not the introduction of a new OPF theory, but the development of a unified and physically consistent formulation that integrates these economic, temporal, and electrical couplings over a 24 h horizon, while also enabling the construction of supervised datasets for future warm-start development.
The model considers conventional generation, photovoltaic generation, battery energy storage systems (BESS), network constraints, and an hourly price signal to induce energy arbitrage decisions. The scheduling horizon is given by the time set T = { 1 , , T } , with an hourly resolution Δ t .
Let N be the set of nodes, G the set of conventional generators, R the set of photovoltaic units, B the set of BESS systems, and  L the set of network branches. Likewise, G i , R i , and  B i represent, respectively, the subsets of generators, photovoltaic units, and BESS connected to bus i N .
The decision variables include the active and reactive power of the generators, the active and reactive power of the photovoltaic units, the charging and discharging power of the BESS, the state of charge of the batteries, and the grid state variables, namely the voltage magnitude and voltage angle at each bus and time step.

2.1. Objective Function

The objective is to minimize the total operating cost of the system over the study horizon, taking into account: (i) the cost of conventional generation, (ii) the penalty associated with the supplied energy according to the hourly price, (iii) the cost associated with active losses in the grid, (iv) the penalty for photovoltaic power curtailment, (v) the storage degradation cost, and (vi) the penalty for the deviation of the voltage profile from the nominal value. Consequently, the objective function is expressed as:
min J = t T [ g G a g P g , t 2 + b g P g , t + c g + g G π t P g , t + c loss ( i , j ) L P i j , t loss + c curt r R P r , t curt + b B c b deg P b , t ch + P b , t dis Δ t + λ V i N V i , t 1 2 ]
where a g , b g , and  c g are the quadratic cost coefficients of generator g. In this work, the term conventional generation refers to dispatchable benchmark generators represented through quadratic production cost functions. These units are not assigned to a specific physical technology such as hydroelectric or thermal generation, since the purpose of the study is to evaluate the coordinated multi-period AC-OPF behavior of the network rather than to reproduce technology-specific unit commitment or fuel-dependent generation modeling. π t represents the hourly energy price, c loss is the loss penalty coefficient, c curt is the cost associated with photovoltaic generation curtailment, c b deg is the equivalent degradation cost of BESS b. It should be emphasized that c loss is a system-level penalty coefficient applied to the total active power losses in the network, rather than to a specific generation technology. Therefore, it is not associated exclusively with conventional generation, photovoltaic generation, or battery storage. Instead, it indirectly influences all of them through the AC network equations, since any change in conventional dispatch, photovoltaic injection, or BESS charging/discharging modifies branch flows and, consequently, the total active losses. And λ V weights the voltage deviation relative to 1 p.u.
Accordingly, the total operating cost reported in this work should not be interpreted as the fuel or production cost of conventional generation alone. Instead, it represents the aggregate objective value of the multi-period AC-OPF model, including conventional generation cost, the hourly energy price term, active-loss penalization, photovoltaic curtailment penalization, BESS degradation cost, and voltage deviation penalization.
The active power loss in branch ( i , j ) during period t is defined as:
P i j , t loss = P i j , t + P j i , t .

2.2. Nodal Power Balance Constraints

For each bus i N and each period t T , the active power balance is imposed as:
g G i P g , t + r R i P r , t PV + b B i P b , t dis P b , t ch P i , t D = P i , t inj , i N , t T
while the reactive power balance is given by
g G i Q g , t + r R i Q r , t PV + b B i Q b , t B Q i , t D + Q i , t sh = Q i , t inj , i N , t T
where P i , t D and Q i , t D correspond to the active and reactive demand at bus i, respectively, and  Q i , t sh represents the reactive injection of shunt elements. The injected nodal powers P i , t inj and Q i , t inj are obtained from the AC power flow equations:
P i , t inj = V i , t j N V j , t G i j cos ( θ i , t θ j , t ) + B i j sin ( θ i , t θ j , t )
Q i , t inj = V i , t j N V j , t G i j sin ( θ i , t θ j , t ) B i j cos ( θ i , t θ j , t )

2.3. Conventional Generator Constraints

The active and reactive power supplied by each conventional generator must satisfy:
P g min P g , t P g max , g G , t T
Q g min Q g , t Q g max , g G , t T
Additionally, for PV buses and the reference bus, a voltage setpoint may be imposed:
V g , t = V g set , g G , t T .

2.4. Photovoltaic Generation Constraints

The dispatched active power of each photovoltaic unit is limited by its hourly availability:
0 P r , t PV P ^ r , t PV , r R , t T
where P ^ r , t PV is the maximum available power of photovoltaic plant r during period t.
Photovoltaic power curtailment is defined as:
P r , t curt = P ^ r , t PV P r , t PV , r R , t T
with the corresponding non-negativity constraint:
0 P r , t curt P ^ r , t PV , r R , t T
The apparent power capability of the photovoltaic inverter is modeled as:
P r , t PV 2 + Q r , t PV 2 S r max 2 , r R , t T .

2.5. BESS Constraints

The net power of the BESS is obtained from the difference between discharging and charging power:
P b , t B = P b , t dis P b , t ch , b B , t T
Charging and discharging powers are bounded by:
0 P b , t ch P b ch , max , b B , t T
0 P b , t dis P b dis , max , b B , t T
To prevent simultaneous charging and discharging, a binary variable z b , t is introduced:
P b , t ch ( 1 z b , t ) P b ch , max , b B , t T
P b , t dis z b , t P b dis , max , b B , t T
z b , t { 0 , 1 } , b B , t T
The state-of-charge (SOC) dynamics are expressed as:
S O C b , t = S O C b , t 1 + η b ch P b , t ch Δ t 1 η b dis P b , t dis Δ t , b B , t T
with initial condition:
S O C b , 0 = S O C b 0 , b B
and energy capacity constraints:
E b min S O C b , t E b max , b B , t T
To ensure daily cyclic operation, the terminal condition is imposed as:
S O C b , T = S O C b 0 , b B
Finally, the apparent power capability of the BESS inverter is modeled as:
P b , t B 2 + Q b , t B 2 S b max 2 , b B , t T

2.6. Voltage and Angular Reference Constraints

The voltage magnitude at each bus must remain within admissible operating limits:
V i min V i , t V i max , i N , t T
In addition, to fix the angular reference of the system, the following condition is imposed:
θ slack , t = 0 , t T
In the reported case study, these voltage bounds correspond to the standard admissible limits adopted for the benchmark system and were not additionally tightened to account for photovoltaic variability. The impact of PV integration is instead represented through the nodal power balance equations, the inverter capability constraints, and the coordinated interaction with storage and network operating limits.

2.7. Branch Flow Equations and Thermal Limits

For each branch ( i , j ) L , active and reactive power flows are computed from the AC branch equations, considering series admittance, shunt susceptance, and transformer tap ratio when applicable. In general terms, the flows from bus i to bus j are represented as P i j , t and Q i j , t , while the flows in the opposite direction are denoted by P j i , t and Q j i , t .
Thermal limits are imposed at both the sending and receiving ends:
P i j , t 2 + Q i j , t 2 S i j max 2 , ( i , j ) L , t T
P j i , t 2 + Q j i , t 2 S i j max 2 , ( i , j ) L , t T

2.8. Compact Form of the Model

In compact form, the problem can be written as:
min x , u , z J ( x , u , z )
subject to:
g ( x , u , z ) = 0
h ( x , u , z ) 0
z { 0 , 1 } | B | | T |
where x groups the system state variables, mainly voltage magnitudes and voltage angles, u contains the continuous control variables associated with conventional generation, photovoltaic generation, and storage, and  z groups the binary variables of the BESS. Consequently, the formulated problem corresponds to a nonconvex mixed-integer nonlinear optimization model.
It should be noted that the full formulation includes binary variables to prevent simultaneous charging and discharging of the BESS. However, for the numerical experiments reported in Section 3, these binary variables were relaxed to the continuous interval [ 0 , 1 ] , and the resulting model was solved as a nonlinear programming problem. This choice was adopted to improve computational tractability over the 24 h horizon and to facilitate the generation of consistent OPF solutions that can later be used for supervised data construction.
From an optimization standpoint, the complete formulation includes both equality and inequality constraints. The equality constraints are mainly given by the nodal active and reactive power balance equations, the AC network equations, the BESS state-of-charge dynamics, the initial and terminal SOC conditions, and the slack-bus angular reference. The inequality constraints include generator operating limits, photovoltaic availability and inverter capability limits, BESS charging/discharging and energy bounds, voltage magnitude limits, and branch thermal limits. Accordingly, the complete model is a nonconvex mixed-integer nonlinear programming problem. For the numerical experiments reported in this paper, the relaxed formulation was treated as a nonlinear programming problem and solved in Pyomo with IPOPT, which is a primal-dual interior-point solver that handles the constrained problem numerically through an internal barrier formulation and the associated KKT system.
Although this relaxation weakens the strict combinatorial interpretation of the BESS operating mode, it does not alter the main physical structure of the multi-period AC-OPF. In the reported simulations, the resulting schedules still preserved the intended operational logic, producing physically meaningful trajectories for charging/discharging behavior, state of charge, nodal voltages, and active losses.
To provide an operational summary of the proposed methodology, Algorithm 1 presents the solution workflow in mathematical form. This scheme summarizes the construction of the multi-period OPF model, the solution of the relaxed nonlinear problem over the full scheduling horizon, and the post-processing of the optimal trajectories for performance assessment. The resulting optimal solutions can also be stored and organized for future supervised data generation aimed at developing warm-start strategies.
Algorithm 1 Solution procedure of the proposed multi-period AC-OPF
Require: 
Network data N , L , G , R , B ; branch parameters; generator limits; PV limits; BESS parameters; hourly demand profiles; hourly PV availability; hourly electricity prices; scheduling horizon T
Ensure: 
Optimal operating trajectories of generation, storage, and network state variables
1:
Read the electrical network data and define the sets of buses, branches, generators, PV units, and BESS
2:
Define the scheduling horizon T and the time step Δ t
3:
Construct the branch admittance coefficients and the parameters required by the AC power flow model
4:
Build the hourly active and reactive demand profiles, PV availability profiles, and electricity price profile
5:
Define the decision variables:
  • generator outputs ( P g , t , Q g , t )
  • photovoltaic outputs ( P r , t P V , Q r , t P V )
  • battery variables ( P b , t c h , P b , t d i s , Q b , t B , S O C b , t )
  • network state variables ( V i , t , θ i , t )
6:
Formulate the multi-period objective function:
  • minimize conventional generation cost, energy price term, active loss penalty,
  • PV curtailment penalty, BESS degradation cost, and voltage deviation penalty
7:
Add the nodal active power balance constraints for all i N and t T
8:
Add the nodal reactive power balance constraints for all i N and t T
9:
Add generator active and reactive output limits
10:
Add PV availability, curtailment, and inverter capability constraints
11:
Add BESS charging/discharging power limits and apparent power limits
12:
Add BESS state-of-charge dynamics:
     S O C b , t = S O C b , t 1 + η b c h P b , t c h Δ t P b , t d i s η b d i s Δ t
13:
Add initial and terminal cyclic SOC constraints
14:
Add voltage magnitude limits and slack-bus angular reference
15:
Add branch active/reactive power flow equations and branch capacity constraints
16:
Replace the binary BESS operating variables by their continuous relaxation z b , t [ 0 , 1 ] for the reported numerical experiments
17:
Solve the resulting relaxed multi-period AC-OPF using IPOPT
18:
Extract the optimal values of P g , t , Q g , t , P r , t P V , Q r , t P V , P b , t c h , P b , t d i s , S O C b , t , V i , t , and  θ i , t
19:
Compute the main technical and economic indicators:
     total demand, conventional generation, PV generation, net BESS power, and active losses
20:
Return optimal operating schedules, electrical performance indicators, and data records for future supervised dataset construction

3. Case Study and Results

3.1. Case Study Description

The case study was carried out on the IEEE 14-bus system using the proposed multi-period AC-OPF formulation with a 24 h horizon and hourly resolution. The active network considered in this work includes conventional generation, distributed photovoltaic generation, and two battery energy storage systems. Three PV units were placed at buses 4, 9, and 14, with maximum capacities of 35, 25, and 20 MW, respectively, while the BESS units were located at buses 5 and 10, with charging/discharging power ratings of 20/20 MW and 12/12 MW, and energy capacities of 60 and 36 MWh, respectively. The conventional generators in the IEEE 14-bus test system are treated here as generic dispatchable units with benchmark quadratic cost coefficients. Therefore, they should not be interpreted as an explicit representation of hydroelectric, thermal, or mixed generation technologies. In particular, no hydro reservoir dynamics, pumping capability, fuel-specific thermal characteristics, or technology-dependent startup and shutdown constraints are included in the present formulation.
The temporal demand profile was modeled through hourly multipliers applied to the base system load, whereas photovoltaic generation was represented through a bell-shaped daily profile with maximum output around midday. In addition, an hourly electricity price signal was incorporated, with low values during the early morning and peak values during the evening-night block, in order to induce economically meaningful storage arbitrage decisions.
For the reported proof-of-concept validation, the hourly demand, photovoltaic availability, and electricity price profiles were treated as deterministic inputs over the full 24 h horizon. Therefore, the present formulation assumes perfect foresight with respect to these time-varying signals and does not explicitly model forecast errors or stochastic uncertainty. Under uncertain operating conditions, the optimal schedules may differ from those reported here, and additional mechanisms such as scenario-based stochastic optimization, robust formulations, or receding-horizon updating would be required to improve operational adaptability.
For this validation stage, two modeling decisions were adopted in order to prioritize interpretability and computational tractability. First, the option USE_USER_LINE_LIMITS = False was maintained, so strict line thermal limits were relaxed. Second, the binary BESS operating variables were handled through the continuous relaxation described in Section 2.8. Accordingly, the reported results should be interpreted as a proof-of-concept validation of the coordinated multi-period AC-OPF framework under relaxed network congestion and relaxed BESS operating mode conditions.
These assumptions make it possible to focus the analysis on the interaction among demand, conventional generation, photovoltaic generation, storage scheduling, and the electrical state of the network, without introducing additional combinatorial complexity or artificial congestion effects at this stage. Accordingly, although the reported schedules satisfy the modeled nodal power balance equations, voltage magnitude limits, generation bounds, and storage state-of-charge dynamics, they should not be interpreted as fully congestion-certified operating schedules under strict branch thermal loading. Instead, they should be understood as electrically consistent and economically meaningful solutions under the relaxed thermal-limit assumptions adopted for this proof-of-concept validation stage. Table 2 summarizes the main case study configuration.

Relaxed Modeling Assumptions

To improve computational tractability and facilitate proof-of-concept validation of the proposed multi-period AC-OPF framework, two modeling relaxations were adopted in the reported numerical experiments. First, strict branch thermal limits were relaxed by maintaining the option USE_USER_LINE_LIMITS = False, so that the case study would not be dominated by congestion effects at this stage. Second, the binary BESS operating variables were relaxed to the continuous interval [ 0 , 1 ] , as described in Section 2.8, thereby converting the reported implementation from the full nonconvex MINLP formulation to a nonlinear programming problem. These relaxations were introduced to prioritize interpretability, computational tractability, and the generation of consistent optimal trajectories over the 24 h horizon. Accordingly, the reported results should be interpreted as a proof-of-concept validation under relaxed thermal-limit and relaxed BESS operating-mode assumptions, rather than as a fully congestion-certified benchmark of practical network operation.

3.2. Implementation and Solver Settings

The proposed multi-period AC-OPF model was implemented in Python 3.13.9 using the Pyomo optimization environment and solved with IPOPT as a nonlinear programming solver. For the numerical experiments reported in this paper, the binary BESS operating variables were relaxed to the continuous interval [ 0 , 1 ] , as described in Section 2.8, so that the resulting model could be handled as a nonlinear programming problem over the full 24 h horizon.
All simulations were executed on a Parallels ARM virtual machine equipped with an Apple Silicon processor (3.07 GHz, 4 processors), 8 GB of RAM, and Windows 11 Pro 25H2 (64-bit operating system, ARM-based processor). The IPOPT solver was configured with a convergence tolerance of 10 6 and a maximum number of 5000 iterations. Under these settings, the reported case study converged successfully with solver status ok and termination condition optimal. The total wall-clock solution time for the 24 h case study was 2.5112 s.
In the present numerical experiments, no machine learning-based warm-start mechanism was implemented. Therefore, the reported computational time corresponds to the direct solution of the relaxed multi-period AC-OPF model with IPOPT and should not be interpreted as a warm-start versus cold-start benchmark. In this study, the optimal solutions are used to construct a consistent supervised dataset intended to support the future development and quantitative evaluation of warm-start strategies.
Although the full formulation is written as a mixed-integer nonlinear optimization problem, the relaxed implementation adopted in this work was selected to improve computational tractability and to facilitate the generation of consistent OPF solutions for subsequent supervised data construction.

3.3. Global Operational Indicators

The optimal solution yielded a total objective function value of 391,365.14. From an energy standpoint, the total daily demand was 5796.42 MWh, while conventional generation supplied 5412.56 MWh and photovoltaic generation contributed 562.40 MWh. In turn, the accumulated net storage energy exchange with the grid was 11.47 MWh, reflecting the losses inherent to the charge–discharge cycle under the cyclic SOC constraint. Total active energy losses in the network reached 167.07 MWh, which is approximately 2.88% of the demanded energy. This value should not be interpreted as a universal minimum-loss benchmark for the IEEE 14-bus system, but as the endogenous outcome of the proposed multi-period AC-OPF formulation under the adopted objective function, operating constraints, and case-study assumptions. In this sense, the reported 2.88% loss-to-demand ratio reflects the loss level associated with the economically optimal coordinated dispatch of conventional generation, photovoltaic generation, and BESS over the 24 h horizon.
Table 3 summarizes the most relevant global indicators. It can be observed that maximum demand occurs at hour 20, coinciding with the highest electricity price, while maximum PV production occurs at hour 13. Likewise, maximum losses are observed at hour 21, when the system is still operating under the high-demand, high-price period.
Figure 1 shows the hourly electricity price profile, while Figure 2 presents PV production by unit. Taken together, both figures clearly reveal the economic and energy structure of the problem: the maximum price occurs during the nighttime period, whereas the highest renewable production is concentrated in the middle of the day.

3.4. Comparative Benchmark Scenarios

To further assess the operational value of the proposed framework, three benchmark scenarios were analyzed: (i) a reference case without photovoltaic generation and without BESS, (ii) a case with photovoltaic generation but without BESS, and (iii) the proposed case with both photovoltaic generation and BESS. This comparison makes it possible to isolate the individual and combined effects of renewable integration and storage flexibility on total operating cost, conventional generation requirements, active losses, and renewable utilization.
Table 4 summarizes the main results of the three scenarios. The comparison shows that the incorporation of photovoltaic generation significantly improves system performance with respect to the reference case. In particular, the transition from the No PV/No BESS case to the PV/No BESS case reduces the total objective value from 439,288.23 to 399,604.03, decreases conventional generation from 6005.98 MWh to 5404.78 MWh, and lowers total active losses from 209.56 MWh to 170.76 MWh. This confirms the strong contribution of photovoltaic generation to reducing both operating cost and conventional energy dependence.
When BESS is added to the photovoltaic case, the total objective value is further reduced to 391,365.14, while total active losses decrease to 167.07 MWh. In addition, the peak conventional generation requirement falls from 324.42 MW to 301.38 MW, showing that storage contributes effectively to peak-shaving and temporal flexibility. Although the total conventional generation in the PV + BESS case is slightly higher than in the PV/No BESS case, this behavior is physically consistent with the round-trip losses of the storage systems, which lead to a net BESS energy exchange of 11.47 MWh over the daily horizon.
Therefore, within the set of benchmark configurations evaluated in this study, the PV with BESS case yields the lowest total active losses. This provides a comparative justification for interpreting the reported 167.07 MWh, or 2.88% of daily demand, as the optimal loss outcome for the tested configuration under the adopted formulation, rather than as an absolute minimum independent of the modeling assumptions.
Another relevant result is that photovoltaic curtailment remains negligible in all scenarios with renewable generation, which indicates that, under the adopted assumptions, the system is able to absorb the full available photovoltaic output. Overall, the benchmark analysis confirms that photovoltaic generation provides the largest reduction in conventional energy use, while the coordinated incorporation of BESS adds operational flexibility, lowers the total cost, reduces losses, and mitigates peak conventional generation requirements.

3.5. Sensitivity Analysis with Respect to BESS Capacity

To further examine the role of storage sizing in the proposed multi-period AC-OPF framework, a sensitivity analysis was carried out by varying the energy capacity of both BESS units around the base case while keeping their locations, charging/discharging power ratings, hourly demand profile, photovoltaic profile, electricity price signal, and all other modeling assumptions unchanged. In particular, five capacity levels were considered, corresponding to 50%, 75%, 100%, 125%, and 150% of the base BESS energy capacities. Therefore, the total installed storage energy in the system varied from 48 MWh to 144 MWh.
Table 5 summarizes the main results of this analysis. The results show a clear and physically meaningful trend: as the available BESS energy capacity increases, the total objective value decreases monotonically, from 395,100.82 in the 50% case to 388,342.81 in the 150% case. This behavior indicates that, within the analyzed range, additional storage capacity provides a net operational benefit even when the BESS degradation cost is already internalized in the objective function.
A similar trend is observed in the active losses, which decrease gradually from 167.55 MWh at 50% capacity to 166.34 MWh at 150% capacity. Although the absolute reduction is moderate, it confirms that larger storage capacity improves the temporal redistribution of power flows and slightly reduces network losses over the daily horizon. Likewise, the peak conventional generation requirement decreases from 311.79 MW in the 50% case to 290.65 MW in the 125% and 150% cases, showing that additional storage capacity strengthens the peak-shaving effect during the most demanding hours.
At the same time, the total conventional generation over the day increases slightly as BESS capacity grows, from 5409.10 MWh to 5415.78 MWh. This behavior is physically coherent and should not be interpreted as contradictory. As storage capacity increases, the BESS is able to perform deeper and more effective charge–discharge cycles, which increases the amount of shifted energy but also makes the round-trip losses of the storage process more visible in the daily energy balance. This interpretation is consistent with the net BESS energy exchange, which becomes more negative as capacity increases, moving from −7.53 MWh at 50% capacity to −15.41 MWh at 150% capacity.
Another relevant result is that photovoltaic curtailment remains zero in all analyzed cases, while the voltage range remains unchanged within 1.01–1.09 p.u. Therefore, the sensitivity analysis suggests that increasing BESS capacity improves the economic performance of the system, slightly reduces active losses, and enhances peak-shaving capability without creating additional voltage-related issues under the adopted assumptions.
Figure 3 presents the normalized evolution of the main indicators with respect to the base case. The figure makes it easier to visualize the overall trend and confirms that the most noticeable improvements are associated with the objective value and the peak conventional generation, whereas the reduction in active losses is more gradual. It can also be observed that the computational time increases moderately as storage capacity becomes larger.
Overall, this analysis reinforces the role of storage capacity as an important design parameter in the proposed multi-period AC-OPF framework. It also shows that the degradation-aware formulation adopted in this work is able to capture, in a consistent manner, the trade-off between increased storage utilization and the corresponding cost of battery cycling.

3.6. Operation of the Energy Storage System

The behavior of the storage systems was fully consistent with the imposed economic signal. The results show that both BESS units charge during low-price hours and discharge during periods of higher economic value, reproducing a clear temporal arbitrage pattern.
In aggregate terms, the main charging windows occur at hours 3–4, 13–14, and 24, whereas the main discharging windows appear at hours 10–11 and 19–21. The aggregated net storage power, shown in Figure 4, confirms this behavior: negative values correspond to energy absorption from the grid, while positive values represent power injection into the system.
Figure 5 shows the charging and discharging powers of both storage systems separately. It can be seen that the BESS at bus 5 reaches a maximum charging power close to 20 MW and a maximum discharging power of 20 MW, while the BESS at bus 10 reaches approximately 12 MW in both operating modes. Although the formulation employs a continuous relaxation of the BESS mode variable, the final solution clearly separates charging and discharging intervals, without significant overlap between the two modes.
The evolution of the state of charge is presented in Figure 6. This figure shows that both systems rapidly reach their maximum stored energy value after the first charging block, remain at that plateau for several hours, and then discharge during the highest-price period until approaching their lower bound. Finally, both systems return exactly to their initial SOC at hour 24, thereby validating the daily cyclic condition imposed in the problem.
Table 6 summarizes the operation of both storage systems. The BESS at bus 5 absorbed 74.06 MWh and delivered 66.84 MWh, while the BESS at bus 10 absorbed 43.61 MWh and delivered 39.36 MWh. In both cases, the ratio between discharged and charged energy is consistent with an approximate overall efficiency of 90.25%, corresponding to the product of the individual charging and discharging efficiencies.
From an economic perspective, the simple average price during charging hours was 35.6 $/MWh, while the simple average price during discharging hours was 89.2 $/MWh. When weighted by the exchanged energy, these values are approximately 34.06 $/MWh for charging and 95.68 $/MWh for discharging. This confirms that the storage systems not only respond to the price signal, but do so in the economically expected direction.
Although the reported case study was solved using a continuous relaxation of the BESS mode variable, the resulting schedules show a clear temporal separation between charging and discharging intervals. As illustrated in Figure 5, no material overlap between both operating modes is observed in the final solution. Therefore, for the present proof-of-concept study, the relaxed implementation preserves the intended physical interpretation of BESS operation while reducing computational complexity.

3.7. System Dispatch and Utilization of Photovoltaic Generation

Figure 7 presents the evolution of demand, conventional generation, PV generation, and net BESS power. During the central part of the day, PV injection reduces the need for conventional generation, while storage complements this behavior by selectively charging during lower-price hours and discharging during periods of higher economic value.
Table 7 summarizes several representative operating periods of the optimal solution. At hours 3 and 4, with minimum price, the BESS units charge intensively. At hour 10, the combination of 49.6 MW of PV production and an aggregated storage discharge of 32 MW significantly reduces the required conventional generation. At hour 13, renewable production reaches its maximum, while at hour 20 the maximum demand, the maximum electricity price, and a significant storage discharge occur simultaneously. Finally, at hour 24 the system charges both BESS units again to satisfy the terminal SOC condition.
It should be emphasized that the available PV energy was fully utilized throughout the entire horizon, since renewable curtailment was zero in all periods. This indicates that, under the conditions of the case study, the combined flexibility of conventional generation and storage was sufficient to absorb all available photovoltaic production.

3.8. Active Losses and Voltage Behavior

The evolution of system active losses is presented in Figure 8. A growing trend can be observed from the lowest-demand hours to the nighttime block with the highest loading, reaching a maximum of 12.49 MW at hour 21. This behavior is consistent with the increase in power flows through the network during peak hours.
Regarding the electrical state, voltage magnitude remained between 1.01 and 1.09 p.u. throughout the simulation. This result confirms that the coordination among conventional generation, PV, and storage leads to an electrically feasible and secure operating condition. Figure 9 presents the voltage magnitude heatmap, where buses controlled by generators and buses with greater temporal sensitivity can be clearly distinguished. In particular, buses 1, 2, 3, 6, and 8 maintain nearly constant profiles, which is consistent with the voltage setpoints imposed at generation buses.
Figure 10 shows the hourly voltage magnitude profiles by bus. It can be seen that the largest variations are concentrated at load buses and at nodes associated with the active network, although without compromising operating margins. The global minimum value corresponds to 1.01 p.u., while the maximum value is 1.09 p.u., associated with bus 8.
Additionally, Figure 11 presents the voltage angle heatmap. The reference bus maintains a zero angle in all periods, whereas electrically more distant buses exhibit larger angular deviations, especially during high-demand hours. The minimum recorded angle was approximately 16 . 17 at bus 14 during hour 21, which coincides with the most demanding operating block of the system.

3.9. Discussion of Results

The obtained results support four main observations. First, the inclusion of hourly electricity pricing induces a clear arbitrage pattern in the storage systems, with charging during low-price periods and discharging during high-value hours. This confirms that the proposed formulation captures the temporal coupling required to represent economically meaningful BESS operation within a multi-period AC-OPF framework.
Second, photovoltaic generation was fully absorbed throughout the analyzed horizon, with zero renewable curtailment in all periods. Under the considered operating conditions, the combined flexibility of conventional generation and storage was sufficient to accommodate the available PV energy. This result suggests that coordinated scheduling can improve renewable utilization when adequate temporal flexibility is available.
Third, the interaction between PV generation and BESS operation reduces the need for conventional generation during key operating periods, especially around midday and during the transition toward the evening peak. In this sense, the proposed framework not only captures the economic benefit of storage arbitrage but also shows how temporal flexibility can reshape conventional dispatch patterns in an active network environment.
Fourth, the resulting operation remained electrically consistent. Voltage magnitudes stayed within admissible bounds, voltage angle behavior remained coherent with the loading conditions of the system, and active losses evolved in a physically plausible manner. These results indicate that the proposed formulation preserves the essential electrical feasibility of the network while coordinating renewable generation and storage over time.
At the same time, the interpretation of these results should be made within the modeling assumptions adopted for this validation stage. In particular, the absence of photovoltaic curtailment and the reported dispatch patterns correspond to a setting with relaxed strict line thermal limits and a continuous relaxation of the BESS binary operating variables. Therefore, the present results should be understood as a consistent proof of concept of the proposed methodology rather than as a congestion-limited benchmark of network operation.
Overall, this case study confirms that the proposed formulation is capable of representing the coupled economic and electrical operation of a multi-period active network in a coherent and interpretable way. Moreover, the resulting optimal solutions provide a suitable foundation for supervised data generation and for the future incorporation of machine learning as an accelerated OPF initialization mechanism.

3.10. Scalability Assessment on a Larger Benchmark System

The IEEE 14-bus system was selected as a transparent and computationally tractable platform for the initial proof-of-concept validation of the proposed framework. To strengthen the scalability assessment and provide additional benchmarking evidence, an adapted IEEE 39-bus test system was also evaluated under the same 24 h multi-period AC-OPF structure.
For this additional study, the larger benchmark was equipped with three photovoltaic units located at buses 4, 16, and 27, with maximum active power capacities of 350, 300, and 250 MW, respectively. In addition, two BESS units were incorporated at buses 15 and 24, with charging/discharging power ratings of 120/120 MW and 80/80 MW, and energy capacities of 360 MWh and 240 MWh, respectively. As in the IEEE 14-bus case, the same hourly demand multipliers, photovoltaic profile shape, electricity price signal, relaxed strict thermal-limit setting, and continuous relaxation of the BESS operating-mode variables were maintained.
To preserve a compact presentation, the larger benchmark was not analyzed with the same level of graphical and tabular detail as the IEEE 14-bus case. Instead, the IEEE 39-bus system is used here as an additional validation stage aimed at assessing whether the proposed formulation remains operationally consistent on a network of higher dimensionality.
Table 8 summarizes the three benchmark scenarios considered for the adapted IEEE 39-bus system. The comparison confirms that photovoltaic integration continues to provide a clear benefit in the larger network. In particular, the transition from the No PV/No BESS case to the PV/No BESS case reduces the total objective value from 8,999,974.55 to 8,613,775.18, decreases conventional generation from 140,521.62 MWh to 134,154.39 MWh, and lowers total active losses from 803.82 MWh to 735.70 MWh.
When BESS is incorporated into the photovoltaic case, the behavior becomes more configuration-dependent. In the tested setup, the PV with BESS case slightly reduces the peak conventional generation requirement from 7367.00 MW to 7361.10 MW, which confirms that storage still contributes to peak shaving. However, the total objective value increases to 8,649,990.90, while total active losses rise to 903.16 MWh and renewable curtailment increases to 25.51 MWh. This indicates that, in the larger benchmark and under the adopted sizing and placement assumptions, storage does not provide the same net economic benefit observed in the IEEE 14-bus case. Instead, its effect becomes more sensitive to the specific configuration of the system, the spatial distribution of renewable injections, and the resulting network power-flow patterns.
Even so, the larger-system study remains relevant for the present work. First, it confirms that the proposed multi-period AC-OPF formulation can still be solved consistently on a benchmark of substantially higher dimensionality. From a computational standpoint, the adapted IEEE 39-bus PV with BESS case was solved in 20.2664 s, compared with 2.5112 s for the IEEE 14-bus case, corresponding to an increase of approximately 8.07 times in wall-clock solution time. This result provides a direct indication of the additional computational burden associated with a larger benchmark, while confirming that the proposed formulation remains numerically tractable. Second, it shows that the coordination of conventional generation, photovoltaic generation, and storage remains electrically feasible, with voltage magnitudes staying within 0.982–1.06 p.u. in all scenarios. Third, it provides additional benchmarking evidence showing that the operational value of storage in larger systems may be more dependent on siting and sizing decisions than in smaller proof-of-concept cases.
Figure 12 presents the total system dispatch for the PV with BESS case in the IEEE 39-bus system. The figure shows that the largest demand occurs at hour 20, coinciding with the maximum electricity price, while photovoltaic production reaches its maximum around hour 13. In turn, the BESS contribution becomes more visible during the evening peak, when storage injects power and slightly reduces the peak conventional generation requirement. Therefore, although the net storage benefit is less favorable than in the IEEE 14-bus case, the larger benchmark still confirms the computational applicability and operational consistency of the proposed formulation beyond the initial proof-of-concept system.

4. Conclusions

This paper developed a multi-period AC-OPF formulation for an IEEE 14-bus active network that integrates conventional generation, distributed photovoltaic generation, battery energy storage systems, renewable curtailment, and an hourly electricity price signal. The proposed model makes it possible to represent, within a unified framework, both the economic and electrical dimensions of network operation while preserving nodal feasibility, generation operating limits, inverter constraints, and the temporal dynamics of storage.
The results of the case study confirmed that the hourly price signal effectively induces an energy arbitrage pattern in the BESS units. In particular, the storage systems charged during lower-price hours and discharged during higher-value periods, while also satisfying the cyclic state-of-charge condition at the end of the horizon. Likewise, the available photovoltaic generation was fully utilized under the analyzed operating conditions, without requiring renewable curtailment. From the system perspective, the resulting operation was coherent in terms of demand evolution, conventional dispatch, renewable utilization, storage scheduling, and active losses.
The analysis of voltage magnitudes and nodal angles further showed that the resulting operating points remained within electrically admissible margins, with consistent profiles throughout the time horizon. This indicates that the coordination among conventional generation, photovoltaic generation, and storage yields coherent operational and economic behavior while preserving nodal feasibility and admissible electrical states under the modeling assumptions adopted in this study.
From a methodological standpoint, the work also establishes a suitable basis for the generation of supervised datasets derived from optimal OPF solutions. In this sense, the proposed framework opens a clear pathway toward the future incorporation of machine learning models as warm-start mechanisms for multi-period OPF, particularly in settings where computational complexity increases with the time horizon and the level of model detail.
It should also be emphasized that the reported results correspond to a proof-of-concept validation under relaxed strict line thermal limits and a continuous relaxation of the BESS operating mode, which should be considered when interpreting the operational scope of the case study.
Therefore, the main contribution of this work lies in providing a physically grounded and computationally consistent multi-period AC-OPF framework for active networks with coordinated PV and BESS operation under hourly pricing. In addition, the supplementary IEEE 39-bus assessment confirmed that the proposed formulation remains computationally applicable and electrically consistent on a larger benchmark system, with the expected increase in solution time and with storage benefits that become more configuration-dependent.
Future work will focus on extending the proposed framework in two complementary directions: first, by explicitly integrating a trained machine learning model into the optimization workflow to quantify potential reductions in computation time, number of iterations, and convergence robustness with respect to the conventional solution process, and second, by evaluating the model under uncertain photovoltaic generation, demand, and electricity price conditions in order to assess its robustness beyond the deterministic proof-of-concept setting adopted in this study.

Author Contributions

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

Funding

This research received no external funding. The APC was funded by Universidad Politécnica Salesiana (UPS), Quito, Ecuador.

Data Availability Statement

The data supporting the findings of this study are available from the corresponding author on reasonable request. The minimal dataset provided during submission contains the processed simulation outputs used to generate the main tables and figures of the manuscript, including hourly dispatch results, BESS operation, photovoltaic generation, nodal voltages, and benchmark scenario summaries for the IEEE 14-bus and adapted IEEE 39-bus multi-period AC-OPF case studies.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
ACAlternating Current
AC-OPFAlternating Current Optimal Power Flow
 BESS  Battery Energy Storage System
 IEEE  Institute of Electrical and Electronics Engineers
 ML  Machine Learning
 MINLP  Mixed-Integer Nonlinear Programming
 NLP  Nonlinear Programming
 OPF  Optimal Power Flow
 p.u.  per unit
 PV  Photovoltaic
 SOC  State of Charge
 TOU  Time-of-Use

References

  1. Usman, M.; Capitanescu, F. Three Solution Approaches to Stochastic Multi-Period AC Optimal Power Flow in Active Distribution Systems. IEEE Trans. Sustain. Energy 2023, 14, 178–192. [Google Scholar] [CrossRef]
  2. Blasi, T.M.; Fernandes, T.S.P.; Aoki, A.R.; Tabarro, F.H. Multiperiod Optimum Power Flow for Active Distribution Networks with Provisioning of Ancillary Services. IEEE Access 2021, 9, 110371–110395. [Google Scholar] [CrossRef]
  3. Inaolaji, A.; Savaşci, A.; Paudyal, S. Distribution Grid Optimal Power Flow in Unbalanced Multiphase Networks with Volt-VAr and Volt-Watt Droop Settings of Smart Inverters. IEEE Trans. Ind. Appl. 2022, 58, 5832–5843. [Google Scholar] [CrossRef]
  4. Grangereau, M.; Ackooij, W.; Gaubert, S. Multi-stage Stochastic Alternating Current Optimal Power Flow with Storage: Bounding the Relaxation Gap. Electr. Power Syst. Res. 2021, 206, 17774. [Google Scholar] [CrossRef]
  5. Nazir, N.; Almassalkhi, M. Stochastic multi-period optimal dispatch of energy storage in unbalanced distribution feeders. Electr. Power Syst. Res. 2020, 189, 106783. [Google Scholar] [CrossRef]
  6. Sidea, D.O.; Picioroaga, I.I.; Bulac, C. Optimal Battery Energy Storage System Scheduling Based on Mutation-Improved Grey Wolf Optimizer Using GPU-Accelerated Load Flow in Active Distribution Networks. IEEE Access 2021, 9, 13922–13937. [Google Scholar] [CrossRef]
  7. Molina-Martin, F.; Montoya, O.D.; Grisales-Noreña, L.F.; Hernández, J.C.; Ramírez-Vanegas, C.A. Simultaneous Minimization of Energy Losses and Greenhouse Gas Emissions in AC Distribution Networks Using BESS. Electronics 2021, 10, 1002. [Google Scholar] [CrossRef]
  8. Kotsalos, K.; Miranda, I.; Domínguez-García, J.L.; Leite, H.; Silva, N.; Hatziargyriou, N. Exploiting OLTC and BESS Operation Coordinated with Active Network Management in LV Networks. Sustainability 2020, 12, 3332. [Google Scholar] [CrossRef]
  9. Sperstad, I.B.; Korpås, M. Energy Storage Scheduling in Distribution Systems Considering Wind and Photovoltaic Generation Uncertainties. Energies 2019, 12, 1231. [Google Scholar] [CrossRef]
  10. Marley, J.F.; Hiskens, I.A. Multi-period AC-QP optimal power flow including storage. In Proceedings of the 2016 Power Systems Computation Conference (PSCC), Genoa, Italy; IEEE: Piscataway, NJ, USA, 2016; pp. 1–7. [Google Scholar] [CrossRef]
  11. Agarwal, A.; Pileggi, L. Large Scale Multi-Period Optimal Power Flow With Energy Storage Systems Using Differential Dynamic Programming. IEEE Trans. Power Syst. 2022, 37, 1750–1759. [Google Scholar] [CrossRef]
  12. Usman, M.; Capitanescu, F. A Stochastic Multi-period AC Optimal Power Flow for Provision of Flexibility Services in Smart Grids. In Proceedings of the 2021 IEEE Madrid PowerTech, Madrid, Spain, 28 June–2 July 2021. [Google Scholar] [CrossRef]
  13. Srithapon, C.; Fuangfoo, P.; Ghosh, P.K.; Siritaratiwat, A.; Chatthaworn, R. Surrogate-Assisted Multi-Objective Probabilistic Optimal Power Flow for Distribution Network With Photovoltaic Generation and Electric Vehicles. IEEE Access 2021, 9, 34395–34414. [Google Scholar] [CrossRef]
  14. Makanju, T.D.; Hasan, A.N.; Famoriji, O.J.; Shongwe, T. An Intelligent Technique for Coordination and Control of PV Energy and Voltage-Regulating Devices in Distribution Networks Under Uncertainties. Energies 2025, 18, 3481. [Google Scholar] [CrossRef]
  15. Liu, X.; Fan, B.; Tian, J. Deep Reinforcement Learning Based Approach for Dynamic Optimal Power Flow in Active Distribution Network. In Proceedings of the Cybersecurity and Cyberforensics Conference, Hefei, China, 25–27 July 2022. [Google Scholar] [CrossRef]
  16. Salazar Vanegas, C.E.; Gallego Pareja, L.A.; Gómez Carmona, O. A multi-period MILP model for optimal integration of battery energy storage systems and distributed generation in power distribution systems. Results Eng. 2025, 27, 106806. [Google Scholar] [CrossRef]
  17. Memarzadeh, G.; Keynia, F.; Memarzadeh, R.; Amirteimoury, F. Integrated Planning and Operation of Distributed Power Generators and Energy Storages for Active Distribution Networks by New ML-Based Two-Level Optimization Model. Results Eng. 2026, 29, 108871. [Google Scholar] [CrossRef]
  18. Baghban-Novin, S.; Hamidi, A.; Golshannavaz, S.; Nazarpour, D. ESOP’s contribution in a technoeconomic and clean operation of distribution networks: A multiobjective optimization approach based on linear models. Int. Trans. Electr. Energy Syst. 2020, 30, e12235. [Google Scholar] [CrossRef]
  19. Zaferanlouei, S.; Farahmand, H.; Vadlamudi, V.V.; Korpås, M. BATTPOWER Toolbox: Memory-Efficient and High-Performance Multi-Period AC Optimal Power Flow Solver. IEEE Trans. Power Syst. 2020, 36, 3921–3937. [Google Scholar] [CrossRef]
  20. Zarei, A.; Ghaffarzadeh, N.; Shahnia, F.; Shafiekhah, M. Optimal Scheduling of Demand Response-Based AC OPF by Smart Power Grid’ Flexible Loads Considering User Convenience, LSTM-Based Load Forecasting, and DERs Uncertainties. IEEE Access 2024, 12, 171617–171633. [Google Scholar] [CrossRef]
  21. Rajaei, A.; Arowolo, O.; Cremer, J.L. Spatio-Temporal Graph Neural Networks for Multi-Period Optimal Power Flow. In Proceedings of the 2025 IEEE PES Innovative Smart Grid Technologies Conference Europe (ISGT Europe), Valletta, Malta, 20–23 October 2025. [Google Scholar] [CrossRef]
  22. Al-Saffar, M.; Musílek, P. Distributed Optimization for Distribution Grids with Stochastic DER Using Multi-Agent Deep Reinforcement Learning. IEEE Access 2021, 9, 63059–63072. [Google Scholar] [CrossRef]
  23. Ajeyemi, D.; Chen, Y.; Colot, A.; Cortes, J.; Dall’Anese, E. Learning to Pursue AC Optimal Power Flow Solutions with Feasibility Guarantees. arXiv 2025, arXiv:2505.22399. [Google Scholar] [CrossRef]
  24. Liu, Y.; Yuan, D.; Fan, H.; Jin, T.; Mohamed, M.A. A Multidimensional Feature-Driven Ensemble Model for Accurate Classification of Complex Power Quality Disturbance. IEEE Trans. Instrum. Meas. 2023, 72, 1501613. [Google Scholar] [CrossRef]
  25. Yang, M.; Huang, Q.; Liu, Y.; Zheng, X.; Jin, T.; Mohamed, M.A. A multi-temporal granularity feature driven convolutional ensemble model for electricity theft detection. Eng. Appl. Artif. Intell. 2025, 152, 110795. [Google Scholar] [CrossRef]
  26. Sui, Q.; Zhang, J.; Li, J.; Li, Z.; Su, C.; Liu, C. Optimal scheduling for renewable power grid and vessel-based hydrogen chain integrated systems considering flexible energy transfer. Appl. Energy 2024, 367, 123401. [Google Scholar] [CrossRef]
  27. de Souza, C.A.; da Silva, D.J.; Rossoni, P.; Belati, E.A.; Pelizari, A.; López-Lezama, J.M.; Muñoz-Galeano, N. Multi-Period Optimal Power Flow with Photovoltaic Generation Considering Optimized Power Factor Control. Sustainability 2023, 15, 14334. [Google Scholar] [CrossRef]
  28. da Silva, D.J.; Belati, E.A.; López-Lezama, J.M.; Pourakbari-Kasmaei, M. Optimal Allocation and Operation of Battery Energy Storage Systems with Photovoltaic Generation in Modern Distribution Networks: A New Hybrid Approach. Iet Renew. Power Gener. 2025, 19, e70114. [Google Scholar] [CrossRef]
  29. Deihim, A.; Apostolopoulou, D.; Alonso, E. Initial estimate of AC optimal power flow with graph neural networks. Electr. Power Syst. Res. 2024, 234, 110782. [Google Scholar] [CrossRef]
  30. Kim, J.; Park, S.; Kang, D.; Shin, H. Spatio-Temporal Deep Learning-Assisted Multi-Period AC Optimal Power Flow. Electronics 2026, 15, 761. [Google Scholar] [CrossRef]
  31. Xie, R.; Xu, L.; Li, C.; Yu, X. Neural-optimization integration for AC optimal power flow: A differentiable warm-start approach. Cyber-Phys. Energy Syst. 2025, 1, 104–115. [Google Scholar] [CrossRef]
Figure 1. Hourly electricity price profile.
Figure 1. Hourly electricity price profile.
Sustainability 18 05704 g001
Figure 2. Photovoltaic power output by unit over the study horizon.
Figure 2. Photovoltaic power output by unit over the study horizon.
Sustainability 18 05704 g002
Figure 3. Normalized effect of BESS energy capacity on the main operational indicators. All values are expressed relative to the base case (100% capacity).
Figure 3. Normalized effect of BESS energy capacity on the main operational indicators. All values are expressed relative to the base case (100% capacity).
Sustainability 18 05704 g003
Figure 4. Aggregated net power of the BESS units.
Figure 4. Aggregated net power of the BESS units.
Sustainability 18 05704 g004
Figure 5. Charging and discharging powers of the BESS units.
Figure 5. Charging and discharging powers of the BESS units.
Sustainability 18 05704 g005
Figure 6. State-of-charge evolution of the BESS units.
Figure 6. State-of-charge evolution of the BESS units.
Sustainability 18 05704 g006
Figure 7. Total system dispatch: demand, conventional generation, photovoltaic generation, and net BESS power.
Figure 7. Total system dispatch: demand, conventional generation, photovoltaic generation, and net BESS power.
Sustainability 18 05704 g007
Figure 8. System active losses over the study horizon.
Figure 8. System active losses over the study horizon.
Sustainability 18 05704 g008
Figure 9. Heatmap of nodal voltage magnitude.
Figure 9. Heatmap of nodal voltage magnitude.
Sustainability 18 05704 g009
Figure 10. Hourly voltage magnitude profiles at all buses.
Figure 10. Hourly voltage magnitude profiles at all buses.
Sustainability 18 05704 g010
Figure 11. Heatmap of nodal voltage angle.
Figure 11. Heatmap of nodal voltage angle.
Sustainability 18 05704 g011
Figure 12. Total system dispatch for the adapted IEEE 39-bus system in the PV with BESS case: demand, conventional generation, photovoltaic generation, and net BESS power.
Figure 12. Total system dispatch for the adapted IEEE 39-bus system in the PV with BESS case: demand, conventional generation, photovoltaic generation, and net BESS power.
Sustainability 18 05704 g012
Table 1. Comparative summary of representative studies on multi-period OPF in active networks.
Table 1. Comparative summary of representative studies on multi-period OPF in active networks.
ReferenceAC-OPFMulti-PeriodPVBESSTOU PricingML-Based AccelerationActive Network FocusMain ContributionLimitation with Respect to This Work
Usman and Capitanescu [1]YesYesIndirectLimitedNoNoYesStochastic multi-period AC-OPF for active distribution systemsDoes not explicitly integrate PV, BESS, TOU pricing, and ML-assisted warm-start in a unified framework
Blasi et al. [2]YesYesNoYesNoNoYesMulti-period OPF for active distribution networks with ancillary servicesDoes not include coordinated PV integration, TOU pricing, or ML support
Inaolaji et al. [3]YesNoYesNoNoNoYesOPF in unbalanced multiphase networks with smart inverter settingsNot multi-period and does not include storage or ML-assisted acceleration
Grangereau et al. [4]YesYesNoYesNoNoYesMulti-stage stochastic AC-OPF with storageFocused on storage and stochasticity, without PV–price–storage coordination and ML warm-start
Nazir and Almassalkhi [5]YesYesIndirectYesNoNoYesStochastic multi-period dispatch of storage in unbalanced feedersDoes not explicitly combine PV, TOU pricing, and ML-assisted OPF acceleration
Sidea et al. [6]YesYesNoYesNoNoYesGPU-accelerated BESS scheduling in active networksFocuses on computational acceleration, but not on PV integration and ML-based warm-start
Molina-Martin et al. [7]YesNoNoYesNoNoYesJoint minimization of losses and emissions in AC networks using BESSSingle-period perspective without PV–price–storage temporal coordination
Kotsalos et al. [8]YesYesNoYesNoNoYesCoordinated OLTC and BESS operation in LV networksDoes not include PV curtailment, TOU pricing, or learning-based initialization
Sperstad and Korpås [9]NoYesYesYesNoNoYesStorage scheduling under wind and PV uncertaintyNot formulated as a full multi-period AC-OPF with explicit voltage-state optimization
Srithapon et al. [13]YesLimitedYesNoNoYesYesSurrogate-assisted probabilistic OPF with PV and EVsDoes not address BESS arbitrage and ML-assisted warm-start for nonlinear multi-period AC-OPF
Rajaei et al. [21]YesYesIndirectIndirectNoYesYesSpatio-temporal graph neural networks for multi-period OPFFocuses on learning architecture rather than a physically detailed PV–BESS–TOU operational framework
Ajeyemi et al. [23]YesNoNoNoNoYesNoFeasibility-aware learning for AC-OPF solutionsNot centered on multi-period active networks with PV, storage, and hourly pricing
This workYesYesYesYesYesNoYesMulti-period AC-OPF for active networks with coordinated PV, BESS, renewable curtailment, hourly pricing, and supervised data generation for future warm-start development
Table 2. Case study configuration.
Table 2. Case study configuration.
ParameterValue
Test systemIEEE 14-bus system
Time horizon24 h
Time resolution1 h
Network modelMulti-period AC-OPF
Strict thermal limitsDisabled (USE_USER_LINE_LIMITS = False)
BESS operating modeContinuous relaxation of binary variables
PV unitsBuses 4, 9, and 14
Installed PV capacity35, 25, and 20 MW
BESS 1Bus 5, ± 20 MW, 60 MWh
BESS 2Bus 10, ± 12 MW, 36 MWh
Initial SOC30 MWh (bus 5), 18 MWh (bus 10)
Terminal SOC conditionFinal SOC equal to initial SOC
Charging/discharging efficiency95%/95%
Hourly price range24–118 $/MWh
Objective componentsGeneration cost, energy price, active power losses, PV curtailment, BESS degradation, and voltage deviation penalty
Table 3. Global system operational indicators.
Table 3. Global system operational indicators.
IndicatorValue
Total objective function value391,365.14
Total daily demand [MWh]5796.42
Total conventional generation [MWh]5412.56
Total photovoltaic generation [MWh]562.40
Net BESS energy exchange with the grid [MWh] 11.47
Total active losses [MWh]167.07
Loss-to-demand ratio [%]2.88
Average price [$/MWh]55.46
Minimum price [$/MWh]24.00
Maximum price [$/MWh]118.00
Peak demand [MW]310.80 (hour 20)
Maximum PV generation [MW]76.80 (hour 13)
Maximum losses [MW]12.49 (hour 21)
Voltage range [p.u.]1.01–1.09
Table 4. Operational comparison of the benchmark scenarios.
Table 4. Operational comparison of the benchmark scenarios.
  IndicatorNo PV
No BESS
PV
No BESS
PV with
BESS
Total objective value439,288.23399,604.03391,365.14
Total conventional generation [MWh]6005.985404.785412.56
Total photovoltaic generation [MWh]0.00562.40562.40
Net BESS energy exchange [MWh]0.000.00 11.47
Total active losses [MWh]209.56170.76167.07
Renewable curtailment [MWh]0.000.000.00
Peak conventional generation [MW]324.42324.42301.38
Voltage range [p.u.]1.01–1.091.01–1.091.01–1.09
Table 5. Sensitivity analysis with respect to BESS energy capacity.
Table 5. Sensitivity analysis with respect to BESS energy capacity.
Capacity
Scale
Total BESS
Energy
[MWh]
Objective
Value
Conv. Gen.
[MWh]
Active Losses
[MWh]
Peak Conv.
Gen. [MW]
Net BESS
[MWh]
Solver
Time [s]
0.5048395,100.825409.10167.55311.79 7.53 1.44
0.7572393,195.035410.86167.34310.96 9.50 1.44
1.0096391,365.145412.56167.07301.38 11.47 1.73
1.25120389,730.065414.15166.69290.65 13.44 1.84
1.50144388,342.815415.78166.34290.65 15.41 2.16
Table 6. Operational summary of the BESS units.
Table 6. Operational summary of the BESS units.
IndicatorBESS at Bus 5BESS at Bus 10
Initial SOC [MWh]30.0018.00
Final SOC [MWh]30.0018.00
Minimum SOC [MWh]12.007.20
Maximum SOC [MWh]60.0036.00
Total charged energy [MWh]74.0643.61
Total discharged energy [MWh]66.8439.36
Maximum charging power [MW]20.0012.00
Maximum discharging power [MW]20.0012.00
Table 7. Representative hours of the optimal operation.
Table 7. Representative hours of the optimal operation.
HourPriceDemandConv. Gen.PVNet BESSSOC5SOC10
[$/MWh] [MW] [MW] [MW] [MW] [MWh] [MWh]
324168.35198.080.00 24.56 44.8126.52
424165.76196.860.00 25.96 60.0036.00
1058259.00182.3349.6032.0038.9523.37
1348284.90219.3576.80 4.83 41.0024.60
1446274.54240.2773.60 32.00 60.0036.00
19110305.62282.312.4032.0038.9523.37
20118310.80290.650.0032.0017.8910.74
21105297.85301.380.008.9612.007.20
2436207.20245.120.00 30.32 30.0018.00
Table 8. Comparative benchmark scenarios for the adapted IEEE 39-bus system.
Table 8. Comparative benchmark scenarios for the adapted IEEE 39-bus system.
IndicatorNo PV
No BESS
PV
No BESS
PV with
BESS
Total objective value8,999,974.558,613,775.188,649,990.90
Total conventional generation [MWh]140,521.62134,154.39134,619.50
Total photovoltaic generation [MWh]0.006326.176301.50
Net BESS energy exchange [MWh]0.000.00 48.17
Total active losses [MWh]803.82735.70903.16
Renewable curtailment [MWh]0.000.8325.51
Peak conventional generation [MW]7367.007367.007361.10
Voltage range [p.u.]0.982–1.060.982–1.060.982–1.06
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

Barrera-Singaña, C.; Carrión, D.F.; Jaramillo, M.D.; Tipán, L.F.; Valenzuela, A. Sustainable Multi-Period AC Optimal Power Flow in Active Networks with Photovoltaic Generation, Battery Energy Storage Systems, and a Data-Driven Pathway Toward Warm-Start Strategies. Sustainability 2026, 18, 5704. https://doi.org/10.3390/su18115704

AMA Style

Barrera-Singaña C, Carrión DF, Jaramillo MD, Tipán LF, Valenzuela A. Sustainable Multi-Period AC Optimal Power Flow in Active Networks with Photovoltaic Generation, Battery Energy Storage Systems, and a Data-Driven Pathway Toward Warm-Start Strategies. Sustainability. 2026; 18(11):5704. https://doi.org/10.3390/su18115704

Chicago/Turabian Style

Barrera-Singaña, Carlos, Diego Francisco Carrión, Manuel Dario Jaramillo, Luis Fernando Tipán, and Alex Valenzuela. 2026. "Sustainable Multi-Period AC Optimal Power Flow in Active Networks with Photovoltaic Generation, Battery Energy Storage Systems, and a Data-Driven Pathway Toward Warm-Start Strategies" Sustainability 18, no. 11: 5704. https://doi.org/10.3390/su18115704

APA Style

Barrera-Singaña, C., Carrión, D. F., Jaramillo, M. D., Tipán, L. F., & Valenzuela, A. (2026). Sustainable Multi-Period AC Optimal Power Flow in Active Networks with Photovoltaic Generation, Battery Energy Storage Systems, and a Data-Driven Pathway Toward Warm-Start Strategies. Sustainability, 18(11), 5704. https://doi.org/10.3390/su18115704

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

Article Metrics

Back to TopTop