Next Article in Journal
Data-Driven Proactive Early Warning of Grid Congestion Probability Based on Multiple Time Scales
Previous Article in Journal
Identification of Abnormal Electricity Consumption Behavior of Low-Voltage Users in New Power Systems Based on a Combined Method
Previous Article in Special Issue
Convolutional Neural Network for the Classification of the Control Mode of Grid-Connected Power Converters
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

An Interpretable Data-Driven Dynamic Operating Envelope Calculation Method Based on an Improved Deep Learning Model

1
Shenzhen Power Supply Co., Ltd., Shenzhen 518103, China
2
Tsinghua Shenzhen International Graduate School, Tsinghua University, Shenzhen 518055, China
*
Author to whom correspondence should be addressed.
Energies 2025, 18(10), 2529; https://doi.org/10.3390/en18102529
Submission received: 10 January 2025 / Revised: 25 April 2025 / Accepted: 11 May 2025 / Published: 14 May 2025
(This article belongs to the Special Issue Artificial Intelligence and Machine Learning in Smart Grids)

Abstract

:
As the integration of distributed energy resources (DERs) continues to rise, the simultaneous import and export of energy can lead to excessive voltage violations. Therefore, calculating dynamic operating envelopes (DOEs), which represent time-varying export restrictions, is essential for ensuring the safe operation of distribution networks. Traditional methods for calculating DOEs rely on complete distribution network parameters for power-flow calculations. However, acquiring accurate parameters and network topology is often challenging, which limits the practical implementation of these traditional approaches. This paper proposes an interpretable model-free DOE calculation method that leverages smart meter data to address this issue. We train a CNN-LSTM-Attention neural network for voltage estimation, where we employ the whale optimization algorithm (WOA) to adjust hyperparameters automatically. Additionally, this paper employs the SHAP algorithm to interpret the deep learning model, providing insights into the relationship between the bus voltage and the condition of each bus, which enhances the model’s transparency and helps identify the key factors influencing voltage levels. The proposed method is validated through simulations on the IEEE 33−bus distribution network model, demonstrating favorable results.

1. Introduction

In recent years, the growing adoption of distributed energy resources (DERs), including photovoltaic systems, battery storage, and electric vehicles, has significantly altered the operation of distribution grids [1]. These technologies have enabled end users to transition from passive consumers to active participants in electricity generation, contributing to the grid and engaging in energy markets. However, this also raises safety concerns. Simultaneous energy export by DERs can lead to critical issues, such as voltage overruns [2].
To address security concerns, traditional methods typically establish static limits for each DER, restricting energy exports from each bus to ensure the safe operation of the distribution network. However, this approach can result in the underutilization of energy, significantly wasting available export capacity. A promising solution involves calculating dynamic operating envelopes (DOEs) [3,4,5], which define time-varying limits for power output and input at various buses within the network. According to [6], an operating envelope is described as “a convex set that defines the active and reactive power that can be transmitted to and from the network at a given customer connection point or group of customers in a region”. Typically, a dynamic operating envelope is determined using traditional active network management methods [7] or optimal tidal current calculation approaches [8,9]. These studies often incorporate voltage and thermal overload limits as performance constraints when calculating DOEs [5]. Some methods employ iterative techniques to estimate DOEs, considering bus voltage constraints [10], while others apply distributed strategies such as the Alternating Direction Method of Multipliers (ADMM) to allocate DOEs [6]. To address the uncertainty in generation and forecasting, which impacts DOEs and capacity allocation, the concept of the Robust DOE (RDOE) was introduced in [11]. Furthermore, DOEs have been integrated into tiered frameworks to assess BER capacity, offering consumers flexibility to operate at any point within the calculated envelope [12]. Additionally, cooperative game theory combined with DOEs has been used to design a network-aware peer-to-peer (P2P) trading scheme that enhances energy exchange between prosumers and distribution networks [13]. A decentralized P2P grid energy trading mechanism, incorporating DOEs, has also been proposed to prevent network violations [14].
However, the OPF-based approaches presented in these studies face challenges when scaled to real-world networks, as they require direct access to all DERs [15] and often suffer from computational complexity and non-convergence issues [16,17,18]. In addition, these methods typically rely on power-flow analysis to calculate the voltage, which requires accurate distribution network parameters and detailed electrical models [5]. Unfortunately, obtaining accurate data on distribution network topology and parameters such as line impedance is challenging with existing technology [19]. As a result, acquiring these electrical models is both costly and resource-intensive. Therefore, many researchers have tried to utilize data-driven approaches rather than model-based approaches.
The advancement of artificial intelligence (AI) and the widespread adoption of smart meters have created new opportunities for DOE calculations. AI technology has already been extensively applied in power systems, including load forecasting, fault diagnosis, and frequency regulation, by leveraging data-driven approaches to build deep learning models and extract insights from large datasets [20]. Simultaneously, deploying smart meters provides distribution companies with real-time data on the voltage, current, and power factor, offering a rich source of information to support data-driven methods [21]. As a result, data-driven approaches are gradually emerging as a viable alternative to traditional model-based approaches. Recent research has explored various approaches to leveraging artificial intelligence in distribution networks. Some studies employ methods such as linear regression and Gaussian processes to establish relationships between monitoring data and system voltage [22,23]. Others utilize advanced deep learning techniques, including random forests (RF), multilayer perceptrons (MLPs), long short-term memory (LSTM) networks, convolutional neural networks (CNNs), and radial basis function (RBF) neural networks, to model system states based on monitored data [24,25,26,27]. These efforts provide a robust theoretical foundation for model-free approaches to calculating DOEs.
Research on model-free methods for calculating DOEs remains limited, mainly due to the complexity of linking DOEs with monitoring data in a model-free environment. This challenge arises because DOE calculations involve not only state estimation at the bus level in the distribution network but also the consideration of system-level constraints. In [28], methods for calculating DOEs without relying on electrical models were proposed. These methods use historical data from end-customer smart meters to train a neural network (NN) that establishes the relationship between inputs and outputs. The trained neural network, combined with a heuristic algorithm, is then used to compute the operational envelope based on a selected allocation policy. A similar model-free approach, using Deep Reinforcement Learning (DRL) for real-time voltage regulation in active distribution networks, was presented in [29,30]. However, one significant limitation of black-box models and machine learning (ML) techniques is their lack of interpretability. The outputs generated by these models do not always provide a clear explanation of how they were derived. While neural networks are trained on historical data and various algorithms to capture patterns and variations, they can produce inaccurate results when exposed to conditions not encountered during training. This issue arises because the model may not have encountered such variations during the training phase, leading to deviations from the expected output.
In this paper, an interpretable deep learning model is constructed for voltage computation, which is based on a CNN-LSTM architecture, combined with WOA and an attention mechanism to improve the performance of the model. Moreover, the SHAP algorithm is utilized to interpret the model, and the WOA is utilized for DOE allocation. Finally, the proposed method is validated through simulations on the IEEE 33−bus distribution network model, yielding promising results. Overall, the contributions of this paper are as follows:
  • This paper presents a high-performance deep learning model for voltage calculation, utilizing a CNN-LSTM architecture to extract information from input features and voltage sequences. The model incorporates the WOA for automatic parameter optimization, enhancing scalability and performance while eliminating the need for manual tuning. Additionally, the attention mechanism is employed to assign feature weights, further improving computational efficiency. Compared with existing methods, the model proposed in this paper possesses superior computational accuracy and scalability.
  • The SHAP algorithm is employed to elucidate the deep learning model, revealing how the conditions of each bus in the distribution network influence bus voltages and identifying the key features affecting these voltages. Compared with existing methods, this approach enhances the transparency of the model by clarifying its underlying rules and provides valuable insights for optimizing the distribution network’s operation.
  • The WOA is used to allocate DOEs to maximize the total injected power. Compared to existing methods, this approach improves energy utilization and flexibility within the distribution network while ensuring compliance with network constraints.

2. Framework

To bypass the electrical model, we propose a model-free DOE calculation approach based on deep learning and a heuristic algorithm to calculate the voltage and thus the DOEs. Once trained, this neural network can assess the voltage without requiring an electrical model. The workflow of this paper is illustrated in Figure 1. The first step involves collecting smart meter data from each user to calculate the active power P i , t (with injected power treated as negative), reactive power Q i , t , and voltage magnitude V i , t at each bus at a given moment t. Here, i I = { 1 , 2 , , C } , t T = t 1 , t 2 , , T , where I represents the indexed set of all buses, C indicates the total number of buses, and T denotes the time indices in the dataset. This information is essential for constructing the dataset. Next, the constructed dataset is fed into a neural network model for training. The model takes the active power P and the reactive power Q as inputs, while the output is the voltage magnitude V. Through this process, the neural network learns the underlying features and topology of the network automatically. After training, the SHAP algorithm is applied to interpret the model’s results. This step explores the model’s calculations and integrates heuristic algorithms to perform DOE calculations. The algorithm is encapsulated in the model-free module, which calculates and allocates the DOEs for each active customer after inputting the active and reactive power of passive customers and the reactive power of active customers at time t.

3. Methodology

The algorithm proposed in this paper comprises three main components. First, it constructs a dataset by converting smart meter data into a format suitable for training the deep learning model. Second, the deep learning model is trained and optimized to meet the required accuracy standards. Finally, the trained model is integrated with the whale optimization algorithm to facilitate the calculation of the DOEs.

3.1. Dataset Construction

Smart meters typically provide a customer’s voltage magnitude, current magnitude, and power factor at a given time t. This information is essential for calculating the active power (with injected power set as negative), reactive power, and voltage magnitude. It is important to maintain a consistent time interval between data points, such as 15 min, 30 min, or 1 h, depending on the task. The specific data format is illustrated in Equation (1). Once the deep learning model is trained, any changes in the distribution network’s structure or line parameters necessitate dataset reconstruction and model retraining. Additionally, because the model is time-sensitive, it must be updated with new data after a certain period of use. If there is a minor loss of data in the dataset, the temporal correlation of smart meter data makes abrupt changes unlikely; therefore, the average values from the preceding and following time points are used to fill in the gaps.
P = P 1 P T = P t R | T | × | C | Q = Q 1 Q T = Q t R | T | × | C | V = V 1 V T = V t R | T | × | C |

3.2. Neural Network Generation

In this paper, we propose a network architecture that combines a CNN and LSTM. The CNN focuses on mapping the active power and reactive power to the voltage magnitude, while LSTM uncovers deep patterns within the voltage data sequences. This fusion enables multidimensional information extraction, thereby enhancing the model’s accuracy. However, the large scale of the distribution network and the numerous features incorporated into model training can lead to interference from irrelevant features, which impacts overall performance. Therefore, we introduce an attention mechanism to highlight important features while reducing the impact of less relevant ones, ultimately improving the model’s expressive power and generalization capability.
The model developed in this paper is illustrated in Figure 2. The CNN module in this model comprises two convolutional layers and two activation layers. The input data first pass through a 2D convolutional layer (kernel size [3, 1], 32 channels) to extract local features at each time step, followed by a R e L U activation layer to enhance the network’s nonlinear capabilities. Next, a second convolutional layer (kernel size [3, 1], 64 channels) extracts deeper features, which are then processed through another R e L U activation layer.
The network then incorporates a Squeeze-and-Excitation (SE) attention mechanism, constructed using a fully connected layer and a Sigmoid activation function. The SE module first reduces the feature dimensionality to 16 through a fully connected layer and then restores it to 64 dimensions using another fully connected layer. It adjusts the attention weights of the channels by generating channel-specific weights using the Sigmoid activation function. Finally, the output of the attention mechanism is multiplied element-wise with the convolutional feature map to emphasize important features and suppress less significant ones.
The features extracted by the CNN module are first passed through a sequence unfolding layer to reconstruct the sequence, restoring the convolutional features to their original sequential form. Afterward, the tiling layer flattens the high-dimensional convolutional features into one-dimensional data, making them suitable for further sequence processing. The core processing is performed by a BiLSTM layer, using bidirectional LSTMs to capture dependencies in both the forward and backward directions of the time series. The output mode is set to “last”, meaning only the hidden state of the last time step is used for the final prediction. Lastly, a fully connected layer maps the BiLSTM output to the target dimension, followed by a regression layer that produces the final output.
Once trained, the model can process input values for the active power P i , t and the reactive power Q i , t to produce the output voltage magnitude V i , t . This approach enables voltage calculations without relying on traditional electrical modeling or tidal current analysis.

3.3. Optimizing Model Parameters

The deep learning model employed in this paper is based on a CNN-LSTM-Attention architecture. However, optimizing this model is challenging due to the numerous hyperparameters that must be set, making manual adjustments inefficient. Additionally, given the variability in distribution network structures across different regions, as well as the dynamic changes in the distribution network, periodic updates to the model are necessary. Constantly readjusting parameters during each update can be time-consuming and may hinder performance.
To streamline the model updating process, reduce parameter tuning time, and enhance model performance, we employ the WOA to optimize three key hyperparameters: the number of nodes in the hidden layer, the learning rate, and the regularization parameter. Unlike other population optimization methods, the WOA effectively balances global exploration and local exploitation by mimicking the natural behavior of humpback whales as they trap prey using bubble nets.
The WOA simulates the humpback whale’s unique foraging approach, which consists of three main phases: seeking prey, bubble net feeding, and searching for food. In this context, each whale’s position represents a potential solution, with the global optimal solution achieved through continual updates of whales’ positions in the solution space. For the parameter optimization task, the WOA is initialized by setting zero vectors as the position vectors for potential solutions, with the fitness score of the optimal solution initialized to positive infinity. The optimization objective is to minimize the root mean square error (RMSE). During the iterative process, the position of the leading whale is regularly updated. Each search agent compares its fitness to the current global optimal solution to determine whether to update the leader. If a search agent’s fitness exceeds the current optimal solution, the solution and its position are updated. The positions of all search agents are continuously adjusted based on variables (A, C, b, l, p), which are calculated from random numbers r 1 and r 2 . Here, A controls the search agent’s step size within the range [−1, 1], C regulates the moving direction within the range [0, 2], and b is a positive value that controls speed. The variable l determines the movement distance, set randomly within the range [−1, 1]. If p < 0.5 , the agent follows the leader or explores randomly, whereas p > 0.5 activates a local search update, adjusting positions based on proximity to the leader and the parameters b and l. This iterative process continues until the optimal hyperparameters are identified. Its iterative update rule is as follows:
X ( t + 1 ) = X * ( t ) A · D , p 0.5 D × e b I × cos ( 2 π I ) + X * ( t ) , p > 0.5

3.4. DOE Allocation with WOA

Consequently, calculating the DOEs involves determining the maximum allowed injected power at each bus while accounting for distribution grid constraints. This paper focuses on triple-balanced grids, where the primary constraint is the voltage limit, as expressed in Equation (3):
V i , t < 1.05 V 0
V i , t represents the voltage magnitude at bus i at the specified time t, and V 0 is the voltage at the root bus. The objective function aims to maximize the DOEs, which translates to maximizing the sum of the injected power for each active customer. Since the active power is treated as negative when defining the injected power, the objective function is formulated as follows:
f ( x ) = min j J P j , t a
where P j , t a denotes the active power injected by the active customers, J j = { 1 , 2 , , C a } represents the set of active customers, C a is the total number of active customers, and t encompasses the time indices in the dataset t T = { 1 , 2 , , T } . It is important to note that the calculations for the power export and import limits are symmetric; therefore, this paper focuses solely on the power export limit, omitting a separate discussion of power import limits.
This paper employs the WOA to calculate DOEs, and the calculation steps are outlined as follows:
  • Initialization: Set the active power of each active customer to zero (i.e., p j , t a = 0 ). Using the trained model, calculate each bus’s voltage V i , t . If the voltage meets the constraints, this configuration is designated as the optimal solution, and the optimal fitness value f o p t ( x ) is calculated.
  • Optimization Search: Utilize the WOA to search for the optimal p j , t a . After each search iteration, apply the trained model to verify whether the constraints are satisfied. If the constraints are not met, assign a fitness value of infinity; otherwise, calculate the fitness value normally.
  • Determination: Compare the fitness value from the current iteration with the optimal fitness value. If the current fitness is better, update the solution to reflect this new optimal solution and replace the fitness value, then return to step 2. If not, proceed directly to step 2.
  • End Condition: The calculation concludes when the maximum number of iterations is reached or when a stopping criterion is satisfied.
Upon completion of these calculations, the optimal active power for each active customer at time t is obtained. The DOE is defined as
P j , t D O E = P j , t a
The injected power of the jth active customer at time t must satisfy p j , t i n P j , t D O E s , ensuring that the voltage in the distribution network remains within acceptable limits.

4. Case Study

This paper constructs a dataset using simulation data from the IEEE 33−bus distribution network model. The dataset includes the active power, reactive power, and voltage magnitude for each bus, with the root bus voltage set at 12.66 kV. In addition, the photovoltaic penetration rate is assumed to be 100%, i.e., each bus may inject power into the grid, and each bus may have positive and negative active power.

4.1. Training Models

The model presented in this paper utilizes 65 input features, including the active and reactive power along with the root bus voltage, to predict 32 output voltages. The initial training set consisted of 5000 data points, divided into 90% for training and 10% for testing. On the training set, the model achieved an R 2 of 0.9995, a mean absolute error (MAE) of 0.0068 kV, and a mean absolute percentage error (MAPE) of 0.049%. For the test set, the R 2 was 0.9993, with an MAE of 0.0064 kV and an MAPE of 0.053%. The output voltages for bus 33 were analyzed to validate the model’s predictions, as illustrated in Figure 3a. The results demonstrate a high level of accuracy, with most sample points lying along the 45° line and absolute errors primarily below 0.015 kV, while nearly all are under 0.05 kV. The fitting curve further confirms that the model accurately predicted single-point outputs and effectively captured the overall trend of voltage changes.
Recognizing that the distribution network structure may evolve, the model was also tested with a reduced training set of 1000 data points to assess its performance with less data. Notably, the model parameters remained unchanged during this retraining. After reducing the dataset, the test set yielded an average R 2 of 0.9982, an MAE of 0.0131 kV, and an MAPE of 0.082%. Although there was a slight decrease in accuracy, the prediction performance remained commendable. The results for bus 33, as shown in Figure 3b, further illustrate that the model maintained satisfactory predictive performance, with sample points still clustering around the 45° line. Although the error histogram appears more scattered and the maximum absolute error increased to 0.06 kV, the model continued to fit the voltage curves accurately.
An additional experiment was conducted using the IEEE 14−bus distribution network model to explore the model’s applicability across varying distribution network structures. It is important to note that when replacing the dataset and the grid model, the deep learning model did not change any parameters but relied on the whale optimization algorithm to tune the parameters automatically. After replacing the distribution grid model, the average R 2 of all model outputs on the test set was 0.9994, the MAE was 0.0001 kV, and the MAPE was 0.0005%. After replacing the distribution network model, the model increased rather than decreased its prediction accuracy, reflecting the superior adaptivity of the model. In the case of bus 14, the specific output of the model is shown in Figure 3c, and it can be seen that the model has a superior fitting and that most of the absolute errors do not exceed 0.0005 kV.
To evaluate the performance of the proposed method under varying DER environments, we adjusted the photovoltaic penetration rate from 100% to 50%, meaning only half of the buses could inject power into the grid. The model was retrained without altering its parameters. After retraining, the test set achieved an average R 2 of 0.9990, an MAE of 0.0081 kV, and an MAPE of 0.056%. The detailed results, as illustrated in Figure 3d, indicate that the model continued to perform exceptionally well on both the training and test sets. Most errors remained within a narrow range of 0.009 kV, demonstrating the model’s ability to adapt effectively to different DER environments while maintaining high computational accuracy. This highlights the model’s strong scalability and robustness.
In addition, to demonstrate the superior performance of the proposed model, this paper selected other commonly used models for training, including commonly used deep learning models and powerful machine learning algorithms, such as random forest and XGBoost, with the training results summarized in Table 1. The model presented here outperformed the other models in terms of training accuracy and fitting effect, with its RMSE, MAE, and MAPE being approximately one-third of those of the second-ranked deep learning model, RBF. Furthermore, compared to the unoptimized CNN-LSTM model, the optimizations applied in this paper reduced the metrics to about one-sixth of their original values. Figure 4 illustrates the predictions of different models for the voltage and their fitting effects on the voltage curve. Evidently, the model constructed in this paper achieved high accuracy in predicting the voltage and effectively captured its dynamic changes. Unlike the other models, the proposed model consistently provided accurate predictions for each sample point, aligning closely with the original data’s variation. In summary, the deep learning model developed in this paper demonstrates superior prediction accuracy and fitting performance compared to the alternative methods.
This paper further highlights the advantages of the WOA for parameter optimization by comparing it to commonly used tuning methods, such as grid search and random search. The optimization process used the mean squared error (MSE) as the fitness function, with the maximum number of epochs set to 20 to speed up the optimization. The results, as shown in Figure 5, reveal that the WOA algorithm achieved the lowest fitness value of 0.033042 after just five iterations, outperforming both grid search and random search, which were less effective even after 20 iterations. Additionally, the WOA’s optimization curve decreases monotonically, indicating a consistent improvement in model performance. This suggests that, when necessary, increasing the number of iterations can continue to refine the model. In contrast, the curves for grid search and random search exhibit significant randomness, indicating that increasing the number of optimization attempts does not necessarily lead to better results. This unpredictability can complicate the optimization process in practice. In conclusion, the WOA not only improves model performance but also enhances the efficiency of the optimization process, making it a more reliable and practical choice than traditional methods.

4.2. Uncovering Deep Learning Models

Due to the black-box nature of deep learning models, understanding their internal workings can be challenging, complicating their application in practical engineering. This paper employs the SHAP algorithm to highlight the model’s operations and learning dynamics, addressing this issue. The SHAP algorithm, grounded in game theory, interprets machine learning models by treating all features as “contributors”. For each prediction, the model generates a prediction value, and the SHAP value reflects the contribution of each feature to that prediction. This algorithm assesses the importance of individual features and elucidates how each feature influences the output.
In this paper, buses 3, 15, and 20 serve as examples to illustrate how the SHAP algorithm helps explain the model’s calculations of their voltages and the influence of other buses on these voltages. Figure 6a illustrates the impact of each feature on the bus voltages. The left axis identifies the top ten features ranked by importance, while the bottom axis displays the corresponding SHAP values. Each point on the graph represents a sample, with red points indicating higher feature values and blue points indicating lower values. The distribution of sample points reveals that for buses 3, 15, and 20, red points are primarily found on the left, while blue points are on the right. This pattern suggests that a higher active power from other buses correlates with a lower voltage at the target bus. Conversely, as the active power from other buses decreases, the voltage at the target bus tends to increase, aligning with established physical principles. Taking bus 3 as an example, the SHAP summary plot illustrates how the active power at bus 22 impacts the voltage at bus 3 within a range of approximately −0.3 kV to 0.3 kV. Blue data points represent lower active power levels, indicating power injection into the grid. Depending on the magnitude of the injected power, the voltage at bus 3 can increase by up to 0.3 kV. Conversely, if bus 22 transitions from injecting low power (purple data points) to absorbing power from the grid (red data points), the voltage at bus 3 may decrease by approximately 0.4 kV. This shift highlights the sensitivity of bus 3’s voltage to changes in the active power at bus 22. In practical applications, the SHAP algorithm provides valuable insights for controlling the influence of the active power at one bus on the voltage magnitude of other buses. By understanding these relationships, operators can determine effective regulation ranges to maintain network stability.
Figure 6b presents histograms depicting the feature importance for buses 3, 5, and 20. For bus 3, the primary factors influencing its voltage magnitude are the active power at buses 22, 23, and 2, with similar importance levels among these features. This indicates that bus 3 is connected to multiple branches, meaning its voltage is affected by the interactions within the entire distribution network. Consequently, any change in a distant bus can lead to voltage fluctuations at bus 3. For bus 15, the most significant influences come from its adjacent buses, with its active power being the most critical factor. This highlights that, as a central bus in the distribution network, bus 15’s voltage is predominantly shaped by itself and its neighboring buses, although other features also play a noteworthy role. In the case of bus 20, the active powers at buses 19, 21, and itself are particularly crucial for its voltage magnitude, surpassing the importance of other features. This suggests that, as the end bus of the distribution network, bus 20’s voltage is primarily determined by its state and the conditions of nearby buses, in contrast to the influences seen at buses 3 and 15. Similarly, using bus 3 as an example, the SHAP feature importance histogram reveals that the active power at bus 22, bus 23, and bus 2 has the most significant impact on its voltage level. Consequently, if bus 3’s voltage is nearing an overrun and requires prompt and cost-effective mitigation, adjusting the active power injections at these three buses should be prioritized to stabilize the voltage. In practical applications, the SHAP algorithm provides valuable insights by analyzing the correlation between bus voltages and the characteristics of other buses. This enables operators to identify and prioritize effective adjustment targets, ensuring efficient voltage regulation within the network.
Figure 6c presents a heatmap illustrating the influence of each feature on the bus voltages. The color intensity reflects the magnitude of each feature value, and the transparency indicates the degree to which each feature affects the voltage magnitude at each bus. The black bar on the right side highlights the contribution of each feature to the corresponding voltage magnitude. For bus 3, the contributions from various features are relatively similar, suggesting that all features, aside from the most important ones, play a role in determining its voltage. This finding underscores the interconnected nature of the distribution network, where the voltage at bus 3, a critical junction, is influenced by the overall operation of the network. The voltage at bus 15, serving as a central point in the network, is predominantly influenced by its neighboring buses, although other, more distant buses also exert some effect. In contrast, the voltage at bus 20 primarily depends on the conditions of the nearby buses along the same branch. As the terminal bus of the distribution network, local factors significantly influence its voltage. Using bus 3 as an example, the SHAP heatmap indicates that the influence of each feature on its voltage magnitude is relatively uniform. As a result, achieving a wide-range regulation of bus 3’s voltage by adjusting the active and reactive power of only a few buses may not be sufficient. Instead, it may require coordinated regulation across multiple buses to reach the desired voltage level. In contrast, for bus 22, the active power at bus 19, bus 20, and bus 21 has a dominant impact on its voltage magnitude. This means that the voltage at bus 22 can typically be regulated by adjusting the active power at these three buses alone. The SHAP algorithm provides valuable insights by quantifying the influence of each feature on the bus voltage. This enables the formulation of targeted and effective strategies for voltage regulation at specific buses, enhancing operational efficiency and control.
Through SHAP analysis, this paper clarifies how different features affect bus voltages and identifies the primary dependencies for each bus’s voltage magnitude in the deep learning model, enhancing interpretability. Furthermore, when specific bus voltages exceed safe limits, the insights from SHAP analysis can guide targeted adjustments at specific buses, thereby ensuring the overall safety of the distribution network.

4.3. DOE Allocation

After establishing the deep learning model, we calculated the DOEs using two methods: the WOA and equal allocation. The objective function focused on maximizing the injection power while considering voltage constraints. To simulate real-world conditions, we assumed a photovoltaic penetration rate of 20%. The results are illustrated in Figure 7, where each color block represents the assigned DOEs for an active customer, reflecting its upper limit on the injection power. The DOE curve generated by the WOA exhibited rapid fluctuations, in contrast to the relatively flat curve of the equal distribution method. This disparity can be attributed to the WOA’s global optimization capabilities and randomness, which allowed it to identify optimal solutions independently at various times. Consequently, the WOA was more effective at uncovering potential optimal solutions than the equal allocation method. Moreover, the DOE trends for each active customer derived from the WOA were mainly consistent, suggesting that the available DOEs were primarily influenced by the overall operating conditions of the power grid. Additionally, the similar sizes of the DOE color blocks for each active customer at the same time point indicate that simultaneously increasing the maximum injectable power at each bus could lead to a higher total maximum injectable power for the system.
To evaluate the effectiveness of the WOA, we compared the total DOE values obtained at each time point using both the WOA and equal allocation methods, as illustrated in Figure 8. The results indicate that the total DOEs calculated with the WOA were consistently higher than those derived from the equal allocation method, often significantly so at various time points. This enhanced performance can be attributed to the WOA’s ability to identify potential optimal solutions more effectively than the equal allocation method, resulting in a greater total capacity for the injection power. However, there were a few time points where the total DOEs from the WOA were slightly lower than those from the equal allocation method. This discrepancy can be linked to the inherent randomness of the WOA, which could be addressed by increasing the number of iterations. Overall, the findings confirm that the WOA yields a higher total number of DOEs than the equal allocation method, highlighting its superior optimization capabilities.
To assess the feasibility of the WOA, we recalculated the voltage at each bus using the derived DOEs and identified the maximum voltage values to ensure compliance with the voltage limits. The results, as presented in Figure 9, demonstrate that under the WOA calculations, no bus exceeded the voltage limits. The available voltage capacity was primarily optimized, thus enhancing energy utilization while ensuring the safe operation of the distribution network.

5. Conclusions

Power distribution companies often face challenges in accurately calculating DOEs due to difficulties obtaining reliable electrical models of their distribution networks, which complicates power-flow calculations. This paper addresses this issue by employing a deep learning model to effectively capture the topology of the distribution network, thereby eliminating the need for traditional power-flow calculations. Additionally, we integrate the WOA and an attention mechanism to enhance the model’s accuracy, operational efficiency, and adaptability. The SHAP algorithm is also utilized to interpret the model, facilitating its practical application. Ultimately, the proposed approach is validated through simulations on an IEEE 33−bus distribution network model, demonstrating significant improvements in results.

Author Contributions

Conceptualization, Y.L. and Y.Q.; methodology, Y.L.; software, T.C.; validation, Y.L., T.C. and J.L.; formal analysis, Z.H.; investigation, Y.Q.; resources, Y.L.; data curation, T.C.; writing—original draft preparation, Y.L.; writing—review and editing, Y.Q.; visualization, Y.G.; supervision, J.L.; project administration, Y.G.; funding acquisition, Z.H. All authors have read and agreed to the published version of the manuscript.

Funding

This work is supported by the Key Science and Technology Project of China Southern Grid Co., Ltd. (090008KC23020004).

Data Availability Statement

The data will be made available upon request to the corresponding authors.

Conflicts of Interest

Authors Yun Li, Tunan Chen, Jianzhao Liu and Zhaohua Hu are employed by the company Shenzhen Power Supply Co., Ltd., Shenzhen, China. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

References

  1. Abdel-Majeed, A.; Tenbohlen, S.; Schöllhorn, D.; Braun, M. Development of state estimator for low voltage networks using smart meters measurement data. In Proceedings of the 2013 IEEE Grenoble Conference, Grenoble, France, 16–20 June 2013; pp. 1–6. [Google Scholar]
  2. Petrou, K.; Procopiou, A.T.; Ochoa, L.F.; Langstaff, T.; Theunissen, J. Impacts of price-led operation of residential storage on distribution networks: An Australian case study. In Proceedings of the 2019 IEEE Milan PowerTech, Milan, Italy, 23–27 June 2019; pp. 1–6. [Google Scholar]
  3. Petrou, K.; Procopiou, A.T.; Gutierrez-Lagos, L.; Liu, M.Z.; Ochoa, L.F.; Langstaff, T.; Theunissen, J.M. Ensuring distribution network integrity using dynamic operating limits for prosumers. IEEE Trans. Smart Grid 2021, 12, 3877–3888. [Google Scholar] [CrossRef]
  4. Petrou, K.; Liu, M.Z.; Procopiou, A.T.; Ochoa, L.F.; Theunissen, J.; Harding, J. Operating envelopes for prosumers in LV networks: A weighted proportional fairness approach. In Proceedings of the 2020 IEEE PES Innovative Smart Grid Technologies Europe (ISGT-Europe), Delft, The Netherlands, 26–28 October 2020; pp. 579–583. [Google Scholar]
  5. Liu, M.Z.; Ochoa, L.F.; Wong, P.K.; Theunissen, J. Using OPF-based operating envelopes to facilitate residential DER services. IEEE Trans. Smart Grid 2022, 13, 4494–4504. [Google Scholar] [CrossRef]
  6. Attarha, A.; RA, S.M.N.; Scott, P.; Thiébaux, S. Network-secure envelopes enabling reliable DER bidding in energy and reserve markets. IEEE Trans. Smart Grid 2021, 13, 2050–2062. [Google Scholar] [CrossRef]
  7. Yi, Y.; Verbič, G. Fair operating envelopes under uncertainty using chance constrained optimal power flow. Electr. Power Syst. Res. 2022, 213, 108465. [Google Scholar] [CrossRef]
  8. Lankeshwara, G.; Sharma, R. Dynamic operating envelopes-enabled demand response in low-voltage residential networks. In Proceedings of the 2022 IEEE PES 14th Asia-Pacific Power and Energy Engineering Conference (APPEEC), Melbourne, Australia, 20–23 November 2022; pp. 1–7. [Google Scholar]
  9. Yi, Y.; Verbic, G. Operating envelopes under probabilistic electricity demand and solar generation forecasts. arXiv 2022, arXiv:2207.09818. [Google Scholar]
  10. Gerdroodbari, Y.Z.; Khorasany, M.; Razzaghi, R. Dynamic PQ operating envelopes for prosumers in distribution networks. Appl. Energy 2022, 325, 119757. [Google Scholar] [CrossRef]
  11. Liu, B.; Braslavsky, J.H. Robust dynamic operating envelopes for DER integration in unbalanced distribution networks. IEEE Trans. Power Syst. 2023, 39, 3921–3936. [Google Scholar] [CrossRef]
  12. Mahmoodi, M.; Blackhall, L.; RA, S.M.N.; Attarha, A.; Weise, B.; Bhardwaj, A. DER capacity assessment of active distribution systems using dynamic operating envelopes. IEEE Trans. Smart Grid 2023, 15, 1778–1791. [Google Scholar] [CrossRef]
  13. Azim, M.I.; Lankeshwara, G.; Tushar, W.; Sharma, R.; Alam, M.R.; Saha, T.K.; Khorasany, M.; Razzaghi, R. Dynamic operating envelope-enabled P2P trading to maximize financial returns of prosumers. IEEE Trans. Smart Grid 2023, 15, 1978–1990. [Google Scholar] [CrossRef]
  14. Jiang, Z.; Guo, Y.; Wang, J. Dynamic operating envelopes embedded peer-to-peer-to-grid energy trading. Appl. Energy 2025, 377, 124554. [Google Scholar] [CrossRef]
  15. Oikonomou, K.; Parvania, M.; Khatami, R. Coordinated deliverable energy flexibility and regulation capacity of distribution networks. Int. J. Electr. Power Energy Syst. 2020, 123, 106219. [Google Scholar] [CrossRef]
  16. Safdarian, A.; Fotuhi-Firuzabad, M.; Lehtonen, M. Optimal residential load management in smart grids: A decentralized framework. IEEE Trans. Smart Grid 2015, 7, 1836–1845. [Google Scholar] [CrossRef]
  17. Wang, Y.; Wu, L.; Wang, S. A fully-decentralized consensus-based ADMM approach for DC-OPF with demand response. IEEE Trans. Smart Grid 2016, 8, 2637–2647. [Google Scholar] [CrossRef]
  18. Attarha, A.; Scott, P.; Thiébaux, S. Network-aware co-optimisation of residential DER in energy and FCAS markets. Electr. Power Syst. Res. 2020, 189, 106730. [Google Scholar] [CrossRef]
  19. Geth, F.; Vanin, M.; Hertem, D. Data quality challenges in existing distribution network datasets. In Proceedings of the 27th International Conference on Electricity Distribution, Rome, Italy, 12–15 June 2023. [Google Scholar]
  20. Khodayar, M.; Liu, G.; Wang, J.; Khodayar, M.E. Deep learning in power systems research: A review. CSEE J. Power Energy Syst. 2020, 7, 209–220. [Google Scholar]
  21. Sovacool, B.K.; Hook, A.; Sareen, S.; Geels, F.W. Global sustainability, innovation and governance dynamics of national smart electricity meter transitions. Glob. Environ. Change 2021, 68, 102272. [Google Scholar] [CrossRef]
  22. Liu, Y.; Zhang, N.; Wang, Y.; Yang, J.; Kang, C. Data-driven power flow linearization: A regression approach. IEEE Trans. Smart Grid 2018, 10, 2569–2580. [Google Scholar] [CrossRef]
  23. Pareek, P.; Yu, W.; Nguyen, H.D. Optimal steady-state voltage control using gaussian process learning. IEEE Trans. Ind. Inform. 2020, 17, 7017–7027. [Google Scholar] [CrossRef]
  24. Ngo, Q.H.; Nguyen, B.L.; Vu, T.V.; Zhang, J.; Ngo, T. Physics-informed graphical neural network for power system state estimation. Appl. Energy 2024, 358, 122602. [Google Scholar] [CrossRef]
  25. Yu, Y.; Liu, Y. Physics-guided generative adversarial network for probabilistic structural system identification. Expert Syst. Appl. 2024, 239, 122339. [Google Scholar] [CrossRef]
  26. Varghese, A.C.; Shah, H.; Azimian, B.; Pal, A.; Farantatos, E. Deep Neural Network-Based State Estimator for Transmission System Considering Practical Implementation Challenges. J. Mod. Power Syst. Clean Energy 2024, 12, 1810–1822. [Google Scholar] [CrossRef]
  27. Bastos, A.F.; Santoso, S.; Krishnan, V.; Zhang, Y. Machine learning-based prediction of distribution network voltage and sensor allocation. In Proceedings of the 2020 IEEE Power & Energy Society General Meeting (PESGM), Montreal, QC, Canada, 2–6 August 2020; pp. 1–5. [Google Scholar]
  28. Bassi, V.; Ochoa, L.F.; Alpcan, T.; Leckie, C.; Liu, M.Z. Smart Meter Data and Operating Envelopes in LV Networks: A Model-Free Approach. In Proceedings of the 2023 IEEE PES Innovative Smart Grid Technologies Latin America (ISGT-LA), San Juan, PR, USA, 6–9 November 2023; pp. 1–5. [Google Scholar]
  29. Cao, D.; Zhao, J.; Hu, W.; Yu, N.; Ding, F.; Huang, Q.; Chen, Z. Deep reinforcement learning enabled physical-model-free two-timescale voltage control method for active distribution systems. IEEE Trans. Smart Grid 2021, 13, 149–165. [Google Scholar] [CrossRef]
  30. Cao, D.; Zhao, J.; Hu, W.; Ding, F.; Yu, N.; Huang, Q.; Chen, Z. Model-free voltage control of active distribution system with PVs using surrogate model-based deep reinforcement learning. Appl. Energy 2022, 306, 117982. [Google Scholar] [CrossRef]
Figure 1. Model-free DOE calculation framework.
Figure 1. Model-free DOE calculation framework.
Energies 18 02529 g001
Figure 2. Architecture of the deep learning model.
Figure 2. Architecture of the deep learning model.
Energies 18 02529 g002
Figure 3. Predictions of the deep learning model for the output. From left to right: regression plots, error histograms, and prediction curves. (a) The dataset contains 5000 pieces of data. (b) The dataset contains 1000 pieces of data. (c) The distribution network model is changed to the IEEE 14−bus model. (d) The photovoltaic penetration rate is changed to 50%.
Figure 3. Predictions of the deep learning model for the output. From left to right: regression plots, error histograms, and prediction curves. (a) The dataset contains 5000 pieces of data. (b) The dataset contains 1000 pieces of data. (c) The distribution network model is changed to the IEEE 14−bus model. (d) The photovoltaic penetration rate is changed to 50%.
Energies 18 02529 g003
Figure 4. Prediction curves of different models for voltage.
Figure 4. Prediction curves of different models for voltage.
Energies 18 02529 g004
Figure 5. Optimization curves for different tuning algorithms.
Figure 5. Optimization curves for different tuning algorithms.
Energies 18 02529 g005
Figure 6. The model is interpreted using the SHAP algorithm. From left to right: buses 3, 15, and 20. (a) Summary plots. (b) Feature importance histograms. (c) Heatmaps.
Figure 6. The model is interpreted using the SHAP algorithm. From left to right: buses 3, 15, and 20. (a) Summary plots. (b) Feature importance histograms. (c) Heatmaps.
Energies 18 02529 g006
Figure 7. Different methods used to allocate DOEs.
Figure 7. Different methods used to allocate DOEs.
Energies 18 02529 g007
Figure 8. Comparison of DOEs allocated using the WOA and the equal allocation method.
Figure 8. Comparison of DOEs allocated using the WOA and the equal allocation method.
Energies 18 02529 g008
Figure 9. Maximum bus voltage after DOE allocation using the WOA.
Figure 9. Maximum bus voltage after DOE allocation using the WOA.
Energies 18 02529 g009
Table 1. Performance metrics of different deep learning models.
Table 1. Performance metrics of different deep learning models.
RMSE (kV)MAE (kV)MAPE (%)
CNN1.14180.74585.2841
LSTM0.18190.14081.0491
RBF0.02810.01990.1438
DNN0.08810.07060.5119
CNN-LSTM0.05890.04420.3190
ANN0.03780.02950.2115
RF0.28430.21311.471
XGBoost0.06030.04611.5776
WOA-CNN-LSTM-Att0.01160.00740.0537
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

Li, Y.; Chen, T.; Liu, J.; Hu, Z.; Qi, Y.; Guo, Y. An Interpretable Data-Driven Dynamic Operating Envelope Calculation Method Based on an Improved Deep Learning Model. Energies 2025, 18, 2529. https://doi.org/10.3390/en18102529

AMA Style

Li Y, Chen T, Liu J, Hu Z, Qi Y, Guo Y. An Interpretable Data-Driven Dynamic Operating Envelope Calculation Method Based on an Improved Deep Learning Model. Energies. 2025; 18(10):2529. https://doi.org/10.3390/en18102529

Chicago/Turabian Style

Li, Yun, Tunan Chen, Jianzhao Liu, Zhaohua Hu, Yuchen Qi, and Ye Guo. 2025. "An Interpretable Data-Driven Dynamic Operating Envelope Calculation Method Based on an Improved Deep Learning Model" Energies 18, no. 10: 2529. https://doi.org/10.3390/en18102529

APA Style

Li, Y., Chen, T., Liu, J., Hu, Z., Qi, Y., & Guo, Y. (2025). An Interpretable Data-Driven Dynamic Operating Envelope Calculation Method Based on an Improved Deep Learning Model. Energies, 18(10), 2529. https://doi.org/10.3390/en18102529

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