Next Article in Journal
Comparative Performance Analysis of Deep Learning-Based Diagnostic and Predictive Models in Grid-Integrated Doubly Fed Induction Generator Wind Turbines
Previous Article in Journal
How Do Carbon Market and Fossil Energy Market Affect Each Other During the COVID-19, Russia–Ukraine War and Israeli–Palestinian Conflict?
Previous Article in Special Issue
Enhanced Singular Value Decomposition Modulation Technique to Improve Matrix Converter Input Reactive Power Control
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Deep Neural Network-Based Optimal Power Flow for Active Distribution Systems with High Photovoltaic Penetration

Department of Electrical Engineering, Myongji University, Yongin 17058, Republic of Korea
*
Author to whom correspondence should be addressed.
Energies 2025, 18(17), 4723; https://doi.org/10.3390/en18174723
Submission received: 3 August 2025 / Revised: 20 August 2025 / Accepted: 1 September 2025 / Published: 4 September 2025
(This article belongs to the Special Issue Energy, Electrical and Power Engineering: 4th Edition)

Abstract

The integration of photovoltaic (PV) generation into distribution systems supports decarbonization and cost reduction but introduces challenges for secure and efficient operation due to voltage fluctuations and power flow variability. Traditional centralized optimal power flow (OPF) methods require full system observability and significant computational resources, limiting their real-time applicability in active distribution systems. This paper proposes a deep neural network (DNN)-based OPF control framework designed for active distribution systems with high PV penetration under limited measurement availability. The proposed method leverages offline convex chance-constrained OPF (convex-CCOPF) solutions, generated through iterative simulations across a wide range of PV and load conditions, to train the DNN to approximate optimal control actions, including on-load tap changer (OLTC) positions and inverter reactive power dispatch. To address observability constraints, the DNN is trained using a reduced set of strategically selected measurement points, making it suitable for real-world deployment in distribution systems with sparse sensing infrastructure. The effectiveness of the proposed framework is validated on the IEEE 33-bus test system under varying operating conditions. The simulation results demonstrate that the DNN achieves near-optimal performance with a significantly reduced computation time compared to conventional OPF solvers while maintaining voltage profiles within permissible limits and minimizing power losses.

1. Introduction

The large-scale deployment of distributed energy resources (DERs) has significantly transformed the structure and operation of modern distribution systems. Among these resources, photovoltaic (PV) generation has experienced the most rapid growth due to the declining cost of solar technology, supportive government policies, and global decarbonization initiatives [1,2,3]. This expansion enables cost-effective and sustainable electricity supply but also introduces new operational complexities. PV generation is inherently intermittent and non-dispatchable, depending heavily on solar irradiance and weather conditions [4,5]. These characteristics lead to rapid and unpredictable power fluctuations, resulting in voltage deviations, reverse power flows, and bidirectional energy transfers in distribution feeders [6,7,8]. Furthermore, the increasing adoption of electric vehicles and other DERs compounds these challenges, making voltage regulation a critical requirement for maintaining secure and efficient distribution system operation [9,10].
Traditional voltage regulation devices, such as on-load tap changers (OLTCs), line voltage regulators, and capacitor banks, were primarily designed for radial distribution systems with unidirectional power flows and slowly varying loads [11,12]. In active distribution systems with high PV penetration, these devices are subject to excessive switching operations and increased degradation, which shorten their operational lifetime [13,14]. Moreover, their slow response limits their effectiveness in mitigating rapid voltage variations caused by fluctuating PV generation [15]. To address these challenges, numerous studies have proposed centralized optimal power flow (OPF)-based coordination strategies to jointly manage OLTCs, capacitor banks, and inverter-based resources [16,17,18]. Such approaches can achieve near-optimal voltage profiles by solving nonlinear optimization problems that capture system constraints and DER operating limits. Recent advances, including dynamic OPF models based on linear second-order cone relaxation [19] and recursive conic approximation methods for bipolar DC grids [20], have further improved computational efficiency compared to conventional OPF formulations. Nevertheless, despite their reduced computational burden, these methods still require a large number of real-time measurements and extensive communication infrastructure, which pose significant barriers to practical deployment in large-scale distribution systems.
In response to these challenges, numerous studies have investigated distributed voltage control strategies. A distributed optimization framework using the alternating direction method of multipliers (ADMM) was presented in [17], effectively improving voltage regulation while reducing dependence on detailed global system information. A distributed hierarchical control method was proposed in [21] to coordinate PV inverters and OLTCs, significantly reducing voltage deviations while limiting tap operations. In [22], a multi-agent consensus-based algorithm for Volt-VAR control (VVC) was developed, enabling local controllers to collaboratively maintain voltage profiles with minimal communication.
To enhance dynamic performance and integrate multiple device types, hybrid hierarchical frameworks have also been introduced. In [23], a bi-level distributed control scheme was developed, where an upper-level consensus algorithm determines reactive power setpoints for inverter clusters and a lower-level ADMM-based controller adjusts individual inverter outputs, enabling coordinated VVC without centralized computation. In [24], a hierarchical multi-stage framework was proposed that leverages high-resolution phasor measurements from µPMUs and a central phasor data concentrator (PDC) to coordinate inverter responses across multiple stages, improving voltage regulation performance under dynamic PV variations. Adaptive hierarchical designs were explored in [25], employing distributed model predictive control with ADMM-based coordination to dynamically adjust control actions for varying operating conditions. Although these distributed and hybrid approaches improve responsiveness and reduce reliance on centralized computation, they still rely on iterative optimization processes to reach convergence, which hinders their ability to deliver real-time control and may degrade performance under rapid PV fluctuations or highly uncertain operating conditions.
Recent studies have demonstrated the potential of deep neural networks (DNNs) to approximate OPF solutions and provide fast, high-quality control actions for active distribution systems. In [26], a data-driven coordinated voltage control strategy was proposed for active distribution systems. This approach learns the relationship between PV inverter outputs and system voltages directly from data, which are then used in a coordinated framework to determine reactive power setpoints for inverters, improving voltage regulation without relying on explicit system models or computationally intensive OPF solvers. Building on this concept, the authors of [27] presented DeepOPF, a neural-network-based surrogate for DC-OPF that replaces iterative solvers with a direct mapping model. While this approach achieved solution quality comparable to classical OPF with much faster computation, it requires voltage and power measurements from all system nodes, which may limit its practical deployment in real-world distribution systems. In [28], a DNN-based autonomous control framework was developed for predicting OLTC tap positions in feeders with high penetrations of DERs and electric vehicles. Although it demonstrated effective control of OLTC tap operations, it did not include reactive power control, limiting its ability to fully coordinate inverter-based resources. In contrast, [29] proposed a proxy-based model trained on chance-constrained OPF solutions to determine reactive power setpoints for smart inverters. While this enabled efficient VVC, it only managed the reactive power of smart inverters and did not incorporate OLTC or other device controls, thereby limiting its impact on broader system voltage coordination. In [30], a robust local coordination framework was introduced where a DNN emulated the outputs of a linearized CCOPF to coordinate inverters, OLTC, and static voltage controllers using only local information. This decentralized approach reduces communication requirements and computational burden. However, its reliance on local information may compromise global optimization, and the use of a linearized OPF to generate training data can limit its accuracy in highly nonlinear operating regions.
To overcome these gaps, we propose a deep learning-based framework for coordinated voltage regulation in distribution systems with high PV penetration. Two task-specific DNN models are developed: a regression model to predict continuous reactive power setpoints for PV inverters and a classification model to determine discrete OLTC tap positions. These models are trained on a comprehensive synthetic dataset of load and solar irradiance scenarios, ensuring robust performance across diverse operating conditions. The key contributions of this work are as follows:
  • Leveraging a scenario-based convex-CCOPF formulation to generate high-quality training data that account for errors introduced by measurement noise and communication delays;
  • Reducing measurement and communication requirements by relying only on data exchange between the substation and PV buses;
  • Enabling fast, OPF-quality decision-making for the reactive power of multiple inverters and OLTC tap positions through a data-driven approach.
In contrast to prior DNN-based OPF approaches that approximate the entire optimization problem with a single model and rely on full-system observability, our framework introduces a dual-DNN architecture tailored to heterogeneous control devices—discrete OLTCs and continuous PV inverters—while requiring only limited, practically measurable inputs. Combined with scenario-based training under uncertainty, this design achieves near-optimal voltage regulation with significantly reduced computation and communication requirements, thereby enhancing both robustness and real-world applicability. The rest of this paper is organized as follows: Section 2 introduces the convex-CCOPF formulation used to generate training data. Section 3 describes the proposed DNN-based framework for coordinated voltage regulation. Section 4 presents the testing process and simulation results, evaluating the performance of the proposed method against benchmark approaches. Finally, Section 5 concludes the paper and outlines directions for future work.

2. Convex-CCOPF Formulation

Traditional OPF formulations are inherently non-convex due to the nonlinearities in power flow equations, making them computationally demanding and prone to convergence to local minima. These drawbacks limit their applicability for real-time operation and large-scale scenario generation. To overcome these challenges, we adopt a convex relaxation of the OPF problem, ensuring global optimality and computational efficiency. Such convex formulations have been widely recognized for providing tractable and reliable solutions in distribution-level optimization problems.

2.1. Distribution System Model

Consider G(N, E) as a graph representing a radial distribution system, where N denotes the set of buses and E represents the distribution lines connecting them. The buses are indexed as i = 1 ,   2 ,   ,   N . The complex voltage at bus i is denoted by V i , while I ij , P ij , and Q ij represent the complex current, active power, and reactive power flows, respectively, from bus i to bus j. At each bus i, p i c and q i c are the active and reactive power demands, respectively, while p i g and q i g are the active and reactive power generated by the connected PV. If no load is connected to bus i, p i c and q i c are set to zero. Similarly, p i g and q i g are set to zero for buses without PV connections. The resistance and reactance of the line connecting bus i and bus j are represented by r ij and x ij , respectively.

2.2. Distribution Power Flow (DistFlow)

As described in [31], the power flow equations representing the distribution system can be written as follows:
P ij k : ( j , k ) E P jk = r ij I ij 2 + p j c p j g
Q ij k : ( j , k ) E Q jk = x ij I ij 2 + q j c q j g
V j 2 = V i 2 2 r ij P ij + x ij Q ij + r ij 2 + x ij 2 I ij 2
I ij 2 = P ij 2 + Q ij 2 V i 2

2.3. Online Load Tap Changer (OLTC)

The OLTC is widely used in distribution systems to regulate bus voltage by adjusting the transformer turn ratio. By changing its tap position, the OLTC modifies the effective voltage at the distribution bus relative to the substation voltage.
Let T p denote the tap position (in per-unit steps) and a represent the step size of the OLTC. The relationship between the distribution bus voltage V 1 and the substation voltage V sub can be expressed as follows:
V 1 2 = 1 a T p 2 V sub 2

2.4. Operational Constrains

To ensure reliable system operation, the following physical and operational constraints are imposed in the OPF formulation.

2.4.1. Voltage Magnitude Limits

The voltage magnitude at each bus is constrained to remain within the allowable range, expressed as
V min 2 V i 2 V max 2
where V min and V max denote the minimum and maximum voltage limits, respectively. Maintaining voltage within this range is critical for protecting customer equipment and ensuring compliance with distribution system operational standards under variable PV output.

2.4.2. PV Generation and Inverter Capability

The instantaneous active power capability of each PV depends on its peak capacity p pv , i peak and the solar irradiance G i at its location. This relationship determines the available PV power at bus i. In addition, the inverter output is constrained such that the combined active and reactive power does not exceed its rated apparent power s inv , i rate . These constraints ensure that each PV operates within safe limits while adapting to varying solar conditions. The following equations are imposed to constrain the PV generation and inverter capabilities:
p i g = p pv , i peak × G i
p i g 2 + q i g 2 s inv , i rate 2

2.4.3. Power Flow and Thermal Limits

The power flow in each distribution line must not exceed its thermal limit:
P ij 2 + Q ij 2 ( S ij max ) 2
where S i j max denotes the maximum apparent power capacity of the distribution line between bus i and j. This constraint prevents overheating and ensures that conductors operate within their safe thermal limits.

2.5. Objective Function

The objective of the optimization is to ensure secure and efficient operation of the active distribution system by co-optimizing inverter reactive power dispatch and the OLTC position. It integrates multiple performance goals into a single cost function that minimizes renewable energy curtailment, system losses, and voltage deviations, while also limiting excessive OLTC tap changes to prevent mechanical degradation. The overall objective can be expressed as
min X ω 1 ( i , j ) E r ij I ij 2 + ω 2 i N V i 2 V N 2 + ω 3 T p T prev
where ω 1 , ω 2 , and ω 3 are weighting coefficients that balance system efficiency, voltage profile quality, and OLTC mechanical degradation, respectively. V N and T prev denote the nominal voltage and the OLTC position in the previous state, respectively. Optimization is performed over the decision variable set X = P ,   Q ,   I 2 ,   p g ,   p c ,   q g ,   q c ,   V 2 ,   T p .

2.6. Model Convexification

While the DistFlow formulation provides a tractable representation of power flows in radial distribution systems, several constraints involve nonlinear relationships among branch currents, power flows, and bus voltages, rendering the model non-convex. To address this, a convex relaxation is applied to ensure global optimality and improve computational efficiency.
To address the non-convexity arising from the nonlinear constraints in (4), the relaxation approach proposed in [4] is applied. The equality constraints are relaxed into second-order cone inequalities as follows:
I ij 2 P ij 2 + Q ij 2 V i 2
The nonlinear nature of constraints (1)–(3) arises from their dependence on the current–flow equality in (4), which couples power flows with bus voltages in a non-convex form. By relaxing (4) into its second-order cone form, as expressed in (11), this coupling becomes convex. Consequently, replacing (4) with its convexified form renders the power balance and voltage drop constraints in (1)–(3) convex with respect to the decision variables.
The nonlinear constraint in (5) can be convexified by neglecting the quadratic term a T p 2 , which is negligible compared to the linear components and has little impact on the optimized solution. After this simplification, constraint (5) can be rewritten in a convex form as follows:
V 1 2 = 1 2 a T p V sub 2

2.7. Scenario-Based Convex-CCOPF

In practical distribution systems, the input data for OPF, such as load demands and PV outputs, are often affected by measurement and communication errors. To account for these uncertainties, the convex-OPF is extended into a scenario-based chance-constrained formulation. This method balances robustness and computational tractability by ensuring that network constraints are satisfied with high probability rather than under every possible realization of uncertainty.
Let uncertain load and PV generations be represented as random vectors:
ξ = p c ,   q c ,   p g ,   q g  
a set of N s scenarios ξ ( 1 ) ,   ξ ( 2 ) ,   ,   ξ ( N s ) is generated by perturbing the nominal profiles with zero-mean Gaussian noise:
ξ ( k ) = ξ - × ( 1 + δ ( k ) ) ,   δ ( k ) ~ N   ( 0 ,   σ 2 )
in this study, the standard deviation σ was set to 0.1, with 400 scenarios generated and subsequently reduced to 20 representative cases using a clustering algorithm.
The scenario-based CCOPF minimizes the expected operating cost by extending the deterministic objective across all scenarios:
min X ω 1 k = 1 N s ( i , j ) E r ij I ij ( k ) 2 + ω 2 k = 1 N s i N V i ( k ) 2 V N 2 + ω 3 T p T prev
where I ij ( k ) and V i ( k ) are the branch currents and bus voltages under scenario k, respectively. The coefficients ω 1 , ω 2 , and ω 3 are constrained to be non-negative and normalized to sum to one, and their final values were determined through iterative simulations as 0.485, 0.485, and 0.030.
The deterministic power flow equations, device operating limits, overload conditions, and voltage magnitude constraints are reformulated for each scenario k, yielding an additional dimension of variables and constraints. To avoid over-conservatism, bus voltage magnitude and thermal operation limit are enforced in a probabilistic form, expressed as chance constraints:
P V m i n 2 V i ( k ) 2 V m a x 2 ,   k 1 ε v
P P i j ( k ) 2 + Q i j ( k ) 2 ( S i j m a x ) 2 ,   k 1 ε t h
where ε v and ε t h denote the allowable probabilities of voltage and thermal violations, respectively. In this study, ε v is set to 5%, while ε t h is set to 15%, with the apparent power capacity of each distribution line limited to 6.6 MVA. The higher threshold for thermal violations reflects the relatively large PV capacities connected to the system, which can cause substantial line loading under high irradiance conditions.

3. Proposed DNN-Based OPF

Although the scenario-based convex-CCOPF formulation provides global optimal solutions, solving it online for every operating timestep is computationally intensive, particularly in distribution systems with high PV penetration and frequent variations in load and generation. Moreover, the scenario-based convex-CCOPF requires full system state measurements, which are often impractical in real-world distribution systems. To overcome these challenges, we propose a DNN-based approach that approximates the scenario-based convex-CCOPF solution in real time. The DNN is trained to map a limited set of real-time measurements, reflecting the partial observability of practical systems, to near-optimal control actions. Once trained, it enables fast and efficient decision-making.

3.1. Structure of the Proposed Method

In this study, two separate DNNs are designed to estimate the optimal setpoints for PV inverters and the OLTC, respectively. The first DNN is formulated as a regression model to predict continuous setpoints for reactive power injections of the PV inverters. The second DNN is formulated as a classification model to determine the discrete tap position of the OLTC, which is inherently a categorical decision variable. This separation allows each DNN to specialize in its respective control task, thereby improving accuracy and computational efficiency: the regression DNN focuses on continuous inverter control, while the classification DNN handles discrete tap adjustments for system-wide voltage regulation. Although their outputs differ, both DNNs share the same input feature set, carefully selected to capture key operating conditions of the distribution system while remaining practical for real-world implementation.
The input features used for the proposed DNN models are illustrated in Figure 1, which shows their relation to the distribution system in a simplified form. These include: (1) the previous OLTC tap position, which provides information about the transformer’s configuration and serves as a baseline for predicting the next tap adjustment; (2) the feeder active and reactive power at the substation, representing the overall loading condition and the power exchange with the upstream grid; (3) the magnitude of branch currents flowing into PV buses, which reflects local power flow patterns and loading conditions; (4) the active and reactive power outputs of PV inverters, indicating their real-time contribution to the grid and remaining reactive capability; and (5) the voltage magnitudes at PV buses, serving as direct indicators of the local voltage profile and highlighting buses that may require corrective action. The figure illustrates a single PV connection for clarity; however, if additional PV units are connected to the network, the corresponding features (3)–(5) for those PV buses are also included in the DNN input set.
This set of features has been chosen for two main reasons. First, it provides a comprehensive view of the distribution system’s operating state by incorporating substation-level, feeder-level, and PV-bus-level measurements that are strongly correlated with voltage behavior. Second, although the proposed framework is tested on a conceptual system without a specific measurement setup, the feature selection is based on the reasonable assumption that measurements at PV buses are available. Focusing on PV buses is practical, as they are critical points for observing voltage variations and power flow changes in distribution systems with high PV penetration. This assumption aligns with typical data collection practices in real-world distribution systems, making the approach conceptually feasible for practical applications. By using this reduced yet strategically chosen feature set, the DNNs can effectively approximate the optimal OPF solutions while keeping the input dimensionality low. Consequently, training stability is improved, and fast, real-time inference is achieved.

3.2. Training Dataset Generation

The workflow for generating the training dataset used in this study is illustrated in Figure 2. The process begins by loading the distribution system model, including line and bus parameters, as well as PV and OLTC configurations. Next, load profiles and solar irradiance data are imported to establish the baseline operating conditions. A power flow analysis is then conducted to obtain the pre-optimized state of the distribution system, and selected results from this step are recorded as input features for training.
To account for measurement and communication errors, the baseline load profile and solar irradiance values are not used directly. Instead, zero-mean Gaussian random noise is added to these deterministic values, creating multiple perturbed realizations that represent possible true system conditions. These realizations are then used to form a scenario-based convex-CCOPF problem, which ensures that operational constraints such as voltage and flow limits are satisfied with a specified probability. In this formulation, the scenario-based convex-CCOPF is solved to obtain an optimal solution that satisfies the operational constraints across all generated scenarios within the predefined violation probability. The resulting PV inverter setpoints and OLTC tap positions are stored as labels for the training dataset.
This process is repeated until the target dataset size is achieved. The collected data are then preprocessed, including normalization and feature scaling, and subsequently used to train two DNNs: a regression model for PV inverter setpoints and a classification model for OLTC tap positions.

3.3. DNN Models and Training Process

Each DNN is implemented as a fully connected feed-forward network with one to five hidden layers. The hidden layers use either ReLU or tanh activation functions, while the output layers are task-specific: linear activation for the regression model and softmax activation for the classification model. To enhance generalization and mitigate overfitting, dropout regularization and batch normalization are applied. Hyperparameter tuning is performed using Bayesian optimization, exploring a search space that includes the number of hidden layers, neurons per layer, activation functions, dropout rates, and learning rates.
Before training, all input features and regression outputs are normalized to zero-mean and unit variance to improve numerical stability, while the classification labels (OLTC tap positions) are shifted to a non-negative range and one-hot encoded for categorical prediction. The models are trained using the Adam optimizer, with mean absolute error (MAE) loss for the regression network and categorical cross-entropy loss for the classification network. Early stopping, adaptive learning rate reduction, and model checkpointing are employed to ensure convergence and prevent overfitting. The dataset generated from the scenario-based convex-CCOPF process is split into training, validation, and test sets, with an 80–20 split used for training and validation.

4. Numerical Simulation Results

4.1. Simulation Setup

This section presents the evaluation of the proposed DNN-based OPF method’s performance. Its effectiveness is assessed by comparing it with two benchmark approaches: deterministic convex-OPF and scenario-based chance-constrained OPF. All tasks were implemented in Python 3.13.7. The power flow calculations were performed using Pandapower [32], while the optimization problems were formulated in CVXPY [33,34] and solved using Gurobi [35]. The machine learning models were implemented and trained in TensorFlow, with Keras Tuner employed for hyperparameter optimization [36,37]. All simulations and training were conducted on a Windows 11 workstation equipped with an Intel(R) Core(TM) i7–9700 CPU (3.00 GHz) and 16 GB of RAM.
Figure 3 illustrates the workflow used to test and compare the performance of the proposed DNN-based OPF method. After loading the distribution system model and importing the load and solar irradiance profiles, noise is added to account for real-world measurement errors and communication uncertainties. The processed inputs are then evaluated using three different methods: (1) the proposed DNN-based approach, which generates inverter setpoints and OLTC positions directly from the trained neural networks; (2) deterministic convex-CCOPF, which solves the standard OPF problem without considering uncertainty; and (3) scenario-based convex-CCOPF, which provides a robust optimization benchmark under noisy conditions.
The control actions of each method are applied to the distribution system through a power flow simulation to verify their feasibility and evaluate optimization performance. The resulting system states are recorded for comparison. This process is repeated iteratively for all test cases until the predefined number of scenarios is completed, ensuring a comprehensive evaluation of the proposed method against both deterministic and scenario-based convex-CCOPF approaches.

4.2. Testing System and Dataset

To evaluate the proposed approach, simulations are conducted on a modified IEEE 33-bus radial distribution system as shown in Figure 4. The system operates at a nominal voltage of 12.66 kV with a total apparent power base of 10 MVA. The line and bus parameters are adopted from [38]. Three PV plants are integrated at buses 3, 12, and 30, respectively, each with a peak capacity of 3 MW. To enhance operational flexibility, the associated inverters are sized with a 20% capacity margin, resulting in an inverter rating of 3.6 MVA for each plant. A power transformer equipped with an OLTC is installed at the substation (bus 1). The OLTC has 33 discrete tap positions (±16 around the nominal position), with a step size of 0.00625 per unit (p.u.), and permits up to three tap changes per control interval.
To generate the training dataset, 3000 synthetic load scenarios were created to represent a wide range of operating conditions. For each scenario, the total apparent system load was uniformly sampled within the range of 0.2 to 0.6 p.u., while the system power factor was drawn from 0.9 to 1.0 p.u. The corresponding total active and reactive powers were then computed from these values. At the bus level, the apparent load share of each bus was independently sampled from a uniform distribution between 0 and 1, and the bus-specific power factors were likewise generated within 0.9–1.0. The resulting active and reactive bus loads were subsequently scaled to ensure that the sum of all bus-level loads matched the pre-determined total system load for each scenario. In addition, solar irradiance data from a selected geographical location were incorporated to reflect realistic PV generation conditions in the training dataset.
Overall, this process yielded 3000 datasets that effectively captured a broad spectrum of operating conditions, thereby minimizing the risk of overfitting. To further ensure generalization, the dataset was randomly shuffled and divided into training (80%) and validation (20%) subsets for DNN development, while a separate set of unseen operating conditions was reserved exclusively for testing the final model performance. This data handling strategy, combined with the inherent variability introduced during scenario generation, ensured that the proposed DNN models maintained robustness and predictive accuracy when applied to unseen cases. Using this synthetic dataset, the hyperparameters of the DNN models were systematically fine-tuned through Bayesian optimization with Keras Tuner, and the optimized parameters are summarized in Table 1.

4.3. Testing Results

To evaluate the performance of the proposed method, historical daily bus-level load data were used. Figure 5 illustrates the total active and reactive power of all buses over time, along with the corresponding solar irradiance profiles. The dataset represents a full day of operation with a 15–minute time resolution, capturing typical variations in both load demand and solar generation. The active and reactive loads exhibit morning and evening peaks, while the solar irradiance profile follows a bell-shaped curve during daylight hours, providing diverse operating conditions for testing the proposed framework.
Figure 6 illustrates the voltage profiles across the IEEE 33-bus system using four strategies: no OPF, deterministic convex-CCOPF, scenario-based convex-CCOPF, and the proposed DNN-based OPF. Without optimization (no OPF), the system exhibits significant voltage deviations, particularly at downstream buses (18–31), where voltages rise above 1.08 p.u. due to uncontrolled PV outputs and load variations. On the other hand, the deterministic convex-CCOPF method improves voltage regulation through a structured optimization approach but remains sensitive to PV output fluctuations and load variations, resulting in occasional voltage spikes or drops. The scenario-based convex-CCOPF further enhances performance by accounting for multiple uncertainty scenarios, including unpredictable load variations, PV output fluctuations, measurement errors, and communication errors. This comprehensive consideration results in a more uniform and stable voltage profile across all buses, maintaining voltages near the ideal range. Similarly, the DNN-based OPF achieves results comparable to the scenario-based convex-CCOPF under limited measurement availability. It maintains voltages within acceptable limits (≈0.95–1.05 p.u.). This comparison demonstrates that the DNN-based approach can effectively learn and replicate optimal control behaviors even under complex conditions and can therefore be regarded as a robust and practical solution for voltage regulation in modern distribution systems with high PV penetration.
Figure 7 presents the OLTC tap position profiles under the three optimization methods. Over the course of the simulated day, the deterministic convex-CCOPF results in 4 tap operations, while the scenario-based convex-CCOPF increases this to 6 operations due to its scenario-driven adjustments. In comparison, the proposed DNN-based OPF performs 10 tap changes, reflecting its greater responsiveness to system condition variations. Although the DNN-based method exhibits more frequent switching than the benchmark approaches, the increase remains moderate and does not impose excessive operational stress on the OLTC. This behavior highlights the method’s ability to leverage real-time inference for more proactive voltage regulation, while still maintaining practicality given the reduced measurement requirements. Overall, the results indicate that the proposed approach achieves improved adaptability with only a slight increase in tap operation frequency.
Figure 8 illustrates the loss profiles and objective function values for the four OPF methods, while Table 2 summarizes their total daily energy losses. The no-OPF case records the lowest total energy loss of 3.56 MWh, since no control actions are imposed on the system. However, as shown in Figure 8b, this case results in the highest objective function value due to severe voltage fluctuations and repeated violations of operational constraints. By contrast, the convex-CCOPF, scenario-based convex-CCOPF, and DNN-based OPF methods achieve improved voltage regulation and secure operation, reflected in much lower objective function values. Their corresponding total energy losses are 6.43 MWh, 5.84 MWh, and 5.63 MWh, respectively. Although these values are higher than the no-OPF case, they represent a necessary trade-off between minimizing losses and ensuring feasibility under voltage and thermal constraints. Among them, the proposed DNN-based OPF achieves the lowest energy loss while maintaining real-time applicability, demonstrating its potential as a practical solution for large-scale deployment.
The computation times of the three OPF methods are summarized in Table 3. Among the tested approaches, the scenario-based convex-CCOPF exhibited the highest computational burden, requiring 557.33 s due to the need to solve multiple scenarios simultaneously. The deterministic convex-CCOPF was significantly faster, with a computation time of 48.35 s. In contrast, the proposed DNN-based OPF achieved the shortest time at only 11.98 s, even when including data preprocessing. This corresponds to a reduction of nearly 98% compared to the scenario-based convex-CCOPF and approximately 75% compared to the deterministic convex-CCOPF. These results clearly highlight the efficiency of the proposed method, demonstrating its strong potential for real-time and large-scale distribution system applications.

5. Conclusions

This study presents a novel deep learning-based framework for coordinated voltage regulation in active distribution systems with high PV penetration. By combining two specialized deep neural networks—a regression model for continuous reactive power control of PV inverters and a classification model for discrete OLTC tap selection—the framework successfully achieves near-optimal voltage profiles while reducing energy losses. Simulation results on the IEEE 33-bus test system demonstrated that the proposed approach reduced total energy losses to 5.63 MWh, compared with 6.43 MWh under convex-CCOPF, while also offering significant computational advantages. The DNN-based OPF required only 11.98 s to compute, nearly 98% faster than scenario-based convex-CCOPF (557.33 s) and 75% faster than deterministic convex-CCOPF (48.35 s), confirming its suitability for real-time applications. In terms of OLTC operation, the proposed method performed slightly more tap changes (10 per day) than the benchmark methods (4–6 per day), but this increase is offset by the reduced measurement requirements and improved overall loss performance. Importantly, the framework relies only on substation-to-PV-bus measurements rather than full-system observability, making it more practical for real-world deployment where measurement infrastructure is limited.
The key findings can be summarized as follows: (1) the effectiveness of the proposed two-stage DNN-based OPF in coordinating PV inverters and OLTC for voltage regulation; (2) the reduction in energy losses compared with deterministic and scenario-based convex-CCOPF methods; and (3) the substantially lower computational time achieved by the DNN-based OPF, demonstrating its suitability for real-time applications.
Beyond the specific test case, the proposed method demonstrates scalability and generalization potential. While validated on the IEEE 33-bus system, its reliance on PV-bus features and OLTC states makes it inherently adaptable to larger radial networks. For meshed distribution systems, extensions such as feature expansion to account for loop flows and enriched scenario-based training would be required, but the underlying framework remains applicable. Taken together, these results highlight that the proposed DNN-based OPF provides an efficient, scalable, and practically feasible solution for modern distribution systems with high levels of PV penetration. Future research will focus on extending the proposed framework to incorporate additional control devices, such as capacitor banks, step voltage regulators, and distributed energy storage systems, in order to enhance flexibility and reliability of active distribution networks. Particular attention will be paid to addressing the technical challenges that arise in such multi-device environments, including potential communication failures and the need to ensure stable operation under rapidly changing conditions. In addition, future work will involve validating the proposed framework in real-time environments, where issues such as measurement noise, communication delays, and data uncertainty must be carefully managed.

Author Contributions

Conceptualization, P.Y.L. and S.-R.N.; methodology, P.Y.L., J.-W.L. and S.-R.N.; supervision, S.-R.N.; validation, P.Y.L. and J.-W.L.; writing—original draft, P.Y.L. and S.-R.N.; writing—review and editing, P.Y.L., J.-W.L. and S.-R.N. All authors have read and agreed to the published version of the manuscript.

Funding

This research was supported by Korea Electric Power Corporation (Grant number: R23XO05-07).

Data Availability Statement

Data are contained within the article.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
ADMMAlternating direction method of multipliers
Convex-CCOPFConvex chance-constrained optimal power flow
DERDistributed energy resource
DNNDeep neural network
OLTCOnload tap changer
p.u.Per unit
PVPhotovoltaic
VVCVolt-Var control

References

  1. Turiman, M.S.B.; Sarmin, M.K.N.B.M. Reverse Power Flow Analysis in Distribution Network. In Proceedings of the 2021 IEEE International Conference in Power Engineering Application (ICPEA), Shah Alam, Malaysia, 8–9 March 2021; pp. 127–132. [Google Scholar]
  2. Iannarelli, G.; Bosisio, A.; Greco, B.; Moscatiello, C.; Boccaletti, C. Flexible Resources Dispatching to Assist DR Management in Urban Distribution Network Scenarios Including PV Generation: An Italian Case Study. In Proceedings of the 2020 IEEE International Conference on Environment and Electrical Engineering and 2020 IEEE Industrial and Commercial Power Systems Europe (EEEIC/I&CPS Europe), Madrid, Spain, 9–12 June 2020; pp. 1–6. [Google Scholar]
  3. Glenk, G.; Meier, R.; Reichelstein, S. Cost Dynamics of Clean Energy Technologies. Schmalenbach J. Bus. Res. 2021, 73, 179–206. [Google Scholar] [CrossRef]
  4. Farivar, M.; Neal, R.; Clarke, C.; Low, S. Optimal Inverter VAR Control in Distribution Systems with High PV Penetration. In Proceedings of the 2012 IEEE Power and Energy Society General Meeting, San Diego, CA, USA, 22–26 July 2012; pp. 1–7. [Google Scholar]
  5. Wang, J.; Lan, J.; Wang, L.; Lin, Y.; Hao, M.; Zhang, Y.; Xiang, Y.; Qin, L. Voltage Hierarchical Control Strategy for Distribution Networks Based on Regional Autonomy and Photovoltaic-Storage Coordination. Sustainability 2024, 16, 6758. [Google Scholar] [CrossRef]
  6. Majeed, I.B.; Nwulu, N.I. Impact of Reverse Power Flow on Distributed Transformers in a Solar-Photovoltaic-Integrated Low-Voltage Network. Energies 2022, 15, 9238. [Google Scholar] [CrossRef]
  7. Nagarajan, A.; Coddington, M.; Brown, D.; Hassan, S.; Franciosa, L.; Sison-Lebrilla, E. Studies on the Effects of High Renewable Penetrations on Driving Point Impedance and Voltage Regulator Performance; National Renewable Energy Laboratory: Golden, CO, USA, 2018; NREL/TP-5000-70517. [Google Scholar]
  8. Iioka, D.; Fujii, T.; Orihara, D.; Tanaka, T.; Harimoto, T.; Shimada, A.; Goto, T.; Kubuki, M. Voltage Reduction Due to Reverse Power Flow in Distribution Feeder with Photovoltaic System. Int. J. Electr. Power Energy Syst. 2019, 113, 411–418. [Google Scholar] [CrossRef]
  9. Azzopardi, B.; Gabdullin, Y. Impacts of Electric Vehicles Charging in Low-Voltage Distribution Networks: A Case Study in Malta. Energies 2024, 17, 289. [Google Scholar] [CrossRef]
  10. Lyu, S.; Han, H.; Li, J.; Yuan, X.; Wang, W. Voltage Regulation in Distribution Networks by Electrical Vehicles with Online Parameter Estimation. Front. Energy Res. 2024, 12, 1506211. [Google Scholar] [CrossRef]
  11. Sarimuthu, C.R.; Ramachandaramurthy, V.K.; Agileswari, K.R.; Mokhlis, H. A Review on Voltage Control Methods Using On-Load Tap Changer Transformers for Networks with Renewable Energy Sources. Renew. Sustain. Energy Rev. 2016, 62, 1154–1161. [Google Scholar] [CrossRef]
  12. Srivastava, P.; Haider, R.; Nair, V.J.; Venkataramanan, V.; Annaswamy, A.M.; Srivastava, A.K. Voltage Regulation in Distribution Grids: A Survey. Annu. Rev. Control 2023, 55, 165–181. [Google Scholar] [CrossRef]
  13. Otchere, I.K.; Ampofo, D.; Dantuo, J.; Frimpong, E.A. The Influence of Voltage Regulation Devices Based Distributed Generation in Distribution Networks. Electr. Electron. Eng. 2023, 13, 1–5. [Google Scholar]
  14. Daccò, E.; Falabretti, D.; Ilea, V.; Merlo, M.; Nebuloni, R.; Spiller, M. Decentralised Voltage Regulation through Optimal Reactive Power Flow in Distribution Networks with Dispersed Generation. Electricity 2024, 5, 134–153. [Google Scholar] [CrossRef]
  15. Olatunde, O.; Hassan, M.Y.; Abdullah, M.P.; Rahman, H.A. Real-Time Multiperiod Voltage Control Algorithm with OLTC and Switched Capacitors for Smart Distribution Networks in the Presence of Energy Storage System. Int. Trans. Electr. Energy Syst. 2020, 30, e12475. [Google Scholar] [CrossRef]
  16. Sun, X.; Qiu, J.; Yi, Y.; Tao, Y. Cost-Effective Coordinated Voltage Control in Active Distribution Networks with Photovoltaics and Mobile Energy Storage Systems. IEEE Trans. Sustain. Energy 2022, 13, 501–513. [Google Scholar] [CrossRef]
  17. Li, C.; Disfani, V.R.; Haghi, H.V.; Kleissl, J. Coordination of OLTC and Smart Inverters for Optimal Voltage Regulation of Unbalanced Distribution Networks. Electr. Power Syst. Res. 2020, 187, 106498. [Google Scholar] [CrossRef]
  18. Wang, G.; Kekatos, V.; Conejo, A.J.; Giannakis, G.B. Ergodic Energy Management Leveraging Resource Variability in Distribution Grids. IEEE Trans. Power Syst. 2016, 31, 4765–4775. [Google Scholar] [CrossRef]
  19. Meng, W.; Song, D.; Deng, X.; Dong, M.; Yang, J.; Rizk-Allah, R.M.; Snášel, V. Dynamic Optimal Power Flow of Active Distribution Network Based on LSOCR and Its Application Scenarios. Electronics 2023, 12, 1530. [Google Scholar] [CrossRef]
  20. Montoya, O.D.; Grisales-Noreña, L.F.; Hernández, J.C. A Recursive Conic Approximation for Solving the Optimal Power Flow Problem in Bipolar Direct Current Grids. Energies 2023, 16, 1729. [Google Scholar] [CrossRef]
  21. Liu, Z.; Wang, Z.; Chen, Y.; Ren, Q.; Zhao, J.; Qiu, S.; Zhao, Y.; Zhang, H. A Hierarchical Distributed and Local Voltage Control Strategy for Photovoltaic Clusters in Distribution Networks. Processes 2025, 13, 1633. [Google Scholar] [CrossRef]
  22. Inaolaji, A.; Savasci, A.; Paudyal, S.; Kamalasadan, S. A Consensus ADMM-Based Distributed Volt-VAr Optimization for Unbalanced Distribution Networks. In Proceedings of the 2022 IEEE Industry Applications Society Annual Meeting, Detroit, MI, USA, 9–14 October 2022. [Google Scholar]
  23. Ju, Y.; Zhang, Z.; Wu, W.; Liu, W.; Zhang, R. A Bi-Level Consensus ADMM-Based Fully Distributed Inverter-Based Volt/Var Control Method for Active Distribution Networks. IEEE Trans. Power Syst. 2022, 37, 476–487. [Google Scholar] [CrossRef]
  24. Zafari, A.; Gargoom, A.; Hosseinzadeh, N.; Islam, S.; Haque, M.E.; Arif, M.T.; Abdelrazek, M. A Hierarchical Multi-Stage Co-ordination of Inverters for Voltage Control in Active Distribution Networks with a µPMU-PDC. Energies 2023, 16, 4650. [Google Scholar] [CrossRef]
  25. Xu, G.; Liu, L.; Lu, Y.; Zhao, Y.; Li, Y.; Gao, J. Hierarchical Distributed Voltage Control for Active Distribution Networks with Photovoltaic Clusters Based on Distributed Model Predictive Control and Alternating Direction Method of Multipliers. Eng. Rep. 2024, 6, e12796. [Google Scholar] [CrossRef]
  26. Cheng, Z.; Wang, L.; Su, C.; Zhang, R.; Li, X.; Zhang, B. Data-Driven Coordinated Voltage Control Strategy for Distribution Networks with High Proportion of Renewable Energy Based on Voltage–Power Sensitivity. Sustainability 2025, 17, 4955. [Google Scholar] [CrossRef]
  27. Pan, X.; Zhao, T.; Chen, M. DeepOPF: Deep Neural Network for DC Optimal Power Flow. In Proceedings of the IEEE International Conference on Communications, Control, and Computing Technologies for Smart Grids (SmartGridComm), Beijing, China, 21–23 October 2019; pp. 1–6. [Google Scholar]
  28. Musiqi, D.; Kastrati, V.; Bosisio, A.; Berizzi, A. Deep Neural Network-Based Autonomous Voltage Control for Power Distribution Networks with DGs and EVs. Appl. Sci. 2023, 13, 12690. [Google Scholar] [CrossRef]
  29. Gupta, S.; Kekatos, V.; Jin, M. Controlling Smart Inverters Using Proxies: A Chance-Constrained DNN-Based Approach. IEEE Trans. Smart Grid 2022, 13, 1310–1321. [Google Scholar] [CrossRef]
  30. Gush, T.; Kim, C.-H. Robust Local Coordination Control of PV Smart Inverters with SVC and OLTC in Active Distribution Networks. IEEE Trans. Power Deliv. 2024, 39, 1610–1621. [Google Scholar] [CrossRef]
  31. Baran, M.E.; Wu, F.F. Optimal Sizing of Capacitors Placed on a Radial Distribution System. IEEE Trans. Power Deliv. 1989, 4, 735–743. [Google Scholar] [CrossRef]
  32. Thurner, L.; Scheidler, A.; Schäfer, F.; Menke, J.H.; Dollichon, J.; Meier, F.; Meinecke, S.; Braun, M. Pandapower—An Open-Source Python Tool for Convenient Modeling, Analysis, and Optimization of Electric Power Systems. IEEE Trans. Power Syst. 2018, 33, 6510–6521. [Google Scholar] [CrossRef]
  33. Diamond, S.; Boyd, S. CVXPY: A Python-Embedded Modeling Language for Convex Optimization. J. Mach. Learn. Res. 2016, 17, 1–5. [Google Scholar]
  34. Agrawal, A.; Verschueren, R.; Diamond, S.; Boyd, S. A Rewriting System for Convex Optimization Problems. J. Control. Decis. 2018, 5, 42–60. [Google Scholar] [CrossRef]
  35. Gurobi Optimization, LLC. Gurobi Optimizer Reference Manual; Gurobi Optimization, LLC: Houston, TX, USA, 2024; Available online: https://www.gurobi.com (accessed on 26 July 2025).
  36. Abadi, M.; Barham, P.; Chen, J.; Chen, Z.; Davis, A.; Dean, J.; Devin, M.; Ghemawat, S.; Irving, G.; Isard, M.; et al. TensorFlow: A System for Large-Scale Machine Learning. In Proceedings of the 12th USENIX Symposium on Operating Systems Design and Implementation (OSDI 2016), Savannah, GA, USA, 2–4 November 2016; pp. 265–283. [Google Scholar]
  37. O’Malley, T.; Bursztein, E.; Long, J.; Chollet, F.; Jin, H.; Invernizzi, L. KerasTuner. 2019. Available online: https://keras.io/keras_tuner/ (accessed on 26 July 2025).
  38. Baran, M.E.; Wu, F.F. Network Reconfiguration in Distribution Systems for Loss Reduction and Load Balancing. IEEE Trans. Power Deliv. 1989, 4, 1401–1407. [Google Scholar] [CrossRef]
Figure 1. Simplified distribution system with input features measurement point.
Figure 1. Simplified distribution system with input features measurement point.
Energies 18 04723 g001
Figure 2. Workflow for generating the training dataset.
Figure 2. Workflow for generating the training dataset.
Energies 18 04723 g002
Figure 3. Workflow for testing and comparing the proposed DNN-based OPF.
Figure 3. Workflow for testing and comparing the proposed DNN-based OPF.
Energies 18 04723 g003
Figure 4. Modified IEEE 33-bus distribution system.
Figure 4. Modified IEEE 33-bus distribution system.
Energies 18 04723 g004
Figure 5. Solar irradiance and total load profile used for testing.
Figure 5. Solar irradiance and total load profile used for testing.
Energies 18 04723 g005
Figure 6. Voltage profiles from testing different OPF methods. (a) no OPF; (b) deterministic convex-CCOPF; (c) scenario-based convex-CCOPF; (d) DNN-based OPF.
Figure 6. Voltage profiles from testing different OPF methods. (a) no OPF; (b) deterministic convex-CCOPF; (c) scenario-based convex-CCOPF; (d) DNN-based OPF.
Energies 18 04723 g006
Figure 7. Tap position profiles of the OLTC under different OPF methods.
Figure 7. Tap position profiles of the OLTC under different OPF methods.
Energies 18 04723 g007
Figure 8. Comparison of the four OPF methods. (a) Loss profile; (b) Objective function Value.
Figure 8. Comparison of the four OPF methods. (a) Loss profile; (b) Objective function Value.
Energies 18 04723 g008
Table 1. Optimized hyperparameters of the DNN-based OPF.
Table 1. Optimized hyperparameters of the DNN-based OPF.
DNN ModelsLayersNumber of NodeActivation FunctionDropout (%)Learning Rate
Regression DNNDense 116ReLU00.0001–0.1
Dense 2128ReLU10
Output3linear0
Classification DNNDense 1112tanh5
Dense 272tanh25
Dense 396tanh40
Dense 432tanh0
Output33softmax0
Table 2. Total energy losses of different OPF methods.
Table 2. Total energy losses of different OPF methods.
MethodTotal Energy Loss (MWh)
No OPF3.559177
convex-CCOPF6.431050
Scenario-based convex-CCOPF5.835950
DNN-based OPF5.625800
Table 3. Comparison of Computation Times for OPF Methods.
Table 3. Comparison of Computation Times for OPF Methods.
MethodComputation Time (s)Relative Reduction Compared to
Scenario-Based Convex-CCOPF (%)
Relative Reduction Compared to Convex-CCOPF (%)
Scenario-Based Convex-CCOPF557.33--
Convex-CCOPF48.3591.33-
Proposed DNN-Based OPF11.9897.8575.21
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

Lak, P.Y.; Lim, J.-W.; Nam, S.-R. Deep Neural Network-Based Optimal Power Flow for Active Distribution Systems with High Photovoltaic Penetration. Energies 2025, 18, 4723. https://doi.org/10.3390/en18174723

AMA Style

Lak PY, Lim J-W, Nam S-R. Deep Neural Network-Based Optimal Power Flow for Active Distribution Systems with High Photovoltaic Penetration. Energies. 2025; 18(17):4723. https://doi.org/10.3390/en18174723

Chicago/Turabian Style

Lak, Peng Y., Jin-Woo Lim, and Soon-Ryul Nam. 2025. "Deep Neural Network-Based Optimal Power Flow for Active Distribution Systems with High Photovoltaic Penetration" Energies 18, no. 17: 4723. https://doi.org/10.3390/en18174723

APA Style

Lak, P. Y., Lim, J.-W., & Nam, S.-R. (2025). Deep Neural Network-Based Optimal Power Flow for Active Distribution Systems with High Photovoltaic Penetration. Energies, 18(17), 4723. https://doi.org/10.3390/en18174723

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