1. Introduction
During the process of delivering energy to final consumers, a substantial portion of energy is dissipated in the transmission and distribution systems, resulting in both technical and non-technical losses. Technical losses, which include inefficiencies in equipment and infrastructure, cause economic losses and environmental impacts on a national scale [
1]. Therefore, optimizing these losses must be addressed comprehensively and nationally, regardless of the institutional structure of the electricity sector or the ownership of concessionary companies. The volume of losses in transmission and distribution systems is significant, typically ranging between 3% and 13%, highlighting their relevance to the efficiency of the system as a whole [
1]. The analysis of electrical power systems often uses load flow calculation, a fundamental and widely used approach [
2,
3,
4]. Many applications, from expansion planning to network reconfiguration and storage capacity, depend on these calculations [
5,
6,
7]. The classical formulation based on Newton’s method is commonly adopted due to its effectiveness in both transmission and distribution systems [
8]. However, a significant drawback of this method is the need to construct and factorize the Jacobian matrix at each iteration, which can be computationally expensive, especially for large-scale systems [
9,
10].
Continuation power flow (CPF) is an approach to determine the total losses of the electrical system for each load increment until reaching the critical point (CP). It is crucial to identify this point, as it marks the transition between the region of stability and the region of instability of the system. However, accurately obtaining this point can be challenging due to the singularity of the Jacobian matrix, requiring the use of parameterization techniques for its determination [
11]. These additional techniques can significantly increase the computational cost of the process. In this context, it is desirable in engineering that even well-established energy systems analysis methods are revisited and eventually improved. In recent decades, an alternative formulation based on artificial neural networks (ANN) has been widely employed [
12,
13,
14,
15,
16]. In [
12], two artificial neural networks (ANN) were presented, the Multi-Layer Perceptron and the Radial-Based Perceptron, with the objective of estimating the magnitudes of voltages on the buses of electrical power systems, taking into account several parameters, such as the loading factor, the real and reactive power in the slack bus, and the contingent branch number. The results indicated that the Radial Base ANN was able to accurately estimate the desired output, presenting an error of around 10
−4. In [
13], promising results were obtained in which an artificial neural network (ANN) reproduced the same results with high accuracy and speed compared to traditional voltage stability calculation methods. For this, the loading parameter and the voltage stability margin index were calculated using eight different input variables and fourteen different training functions. This approach allowed us to identify which training function was most efficient and offered the best ability to predict the loading margin and voltage stability index.
In the study [
14], artificial intelligence (AI) was used to identify predictive biomarkers relevant to the prognosis of diffuse large B-cell lymphoma. Two neural networks, using Multi-Layer Perceptron (MLP) and Function Network Radial Base (RBF), demonstrated an efficient methodology for identifying these biomarkers. In [
15], an application of an MLP model for fast and automatic prediction of the geometry of finished products is presented. The results show that both the training and the tests carried out were highly accurate, with an accuracy rate that exceeded 92%, demonstrating the feasibility and effectiveness of the proposed method. In the study mentioned in [
16], several artificial neural networks (ANNs) algorithms were proposed to estimate voltage instability in power systems. These ANN models, based on different training algorithms, were developed and subjected to a comparative analysis, aiming to accurately predict the voltage collapse phenomenon.
Existing power loss estimators have many weaknesses, such as complicated methods, many static assumptions, and dependency on the slack unit. If the existing configuration of any network is randomly changed from its base case, then these estimators may produce negligible and unacceptable errors [
17]. A different technique was proposed in [
17] that has the ability to solve the problems mentioned in a constant and direct way. A large number of power flow solutions are used to create a large dataset for training artificial neural networks. Therefore, through some numerical experiments, this technique proves to be an effective tool for accurately and cost-effectively estimating real and reactive power losses, but with a relatively high number of iterations and CPU time.
In this context, this study proposes an alternative methodology to obtain the power curve versus total loss of real and reactive power, avoiding the complexities associated with the Jacobian matrix, in addition to identifying the maximum loading point or critical point (CP) in electrical power systems. The objective is to develop an alternative and effective tool that can quickly assist in obtaining the total power loss curve with a low number of iterations and CPU time in relation to the works presented in the literature. Continuation power flow methods consist of several nonlinear equations, and as mentioned, singularity in the Jacobian matrix at the CP of electrical systems. Additionally, these methods require many iterations and consume a significant amount of CPU time, in contrast to the use of artificial neural networks (ANNs), as proposed in this article. The following sections will present the materials and methods, systems, ANNs, a flowchart, and analyses (MSE, MAPE, and Kruskal–Wallis test) for evaluating the error between the obtained and desired vectors. Subsequently, the results of the network’s training and validation performance will be discussed, along with comparisons of the applied analyses. Finally, a discussion of the obtained results and conclusions will be provided.
2. Materials and Methods
The system analyzed in this study corresponds to the configuration of IEEE 14, 30, and 57-bus systems, as illustrated in
Figure 1a–c. The IEEE 14 system is composed of 1 slack bus, 4 generation buses, 9 load buses, and 20 transmission lines. Meanwhile, the IEEE 30 system has 1 slack bus, 5 generation buses, 24 load buses, and 41 transmission lines. Finally, the IEEE 57 system consists of 1 slack bus, 6 generation buses, 50 load buses, and 80 transmission lines.
For the IEEE 14-bus system, 213 samples were utilized, while for the IEEE 30-bus system, 184 samples were used, and for the IEEE 57-bus system, 202 samples were employed, resulting in a total of 599 samples. These samples were acquired according to the parameterization continuation power flow (PCPF) method described in [
2,
11] and were used for training and validation of ANN. Each sample is composed of five pieces of data: three input data for the ANN, which include the loading factor (λ) and the real and reactive powers generated at the slack bus (P
gslack and Q
gslack), and two output data representing the loss total real (
Pa) and reactive (
Pr) power of the system. The ANN used is an MLP (Multi-Layer Perceptron) with a backpropagation learning algorithm with three layers: input with 3 neurons, hidden with 10 neurons, and 2 neurons in the output layer, as shown in
Figure 2. The software used to obtain the results was Matlab
®, version 2024 [
18].
Continuation power flow (CPF), unlike experimental random classification, is characterized by a sequence of nonlinear equations. Its resolution is achieved by varying the load factor parameter, resulting in different values for the real (
Pa) and reactive (
Pr) power losses of the system in each case. For this type of dataset, MLP networks prove to be well-suited.
Figure 3 illustrates the flowchart of the MLP network used to estimate the total real (
Pa) and reactive (
Pr) power losses of electrical power systems.
The activation functions used were the hyperbolic tangent for the hidden layer (1) and linear for the output layer (2).
where,
= hyperbolic tangent activation function;
= estimate of the parameter that determines the slope of the curve;
= function activation potential.
The mean square error (MSE) vector of the ANN is calculated according to Equation (3), where
Yob and
Ydes represent the obtained and desired outputs of the ANN, respectively. The more similar these outputs are to each other, the smaller the error, indicating a more accurate weight adjustment.
where,
= number of data;
= desired values (target via experiment);
= values obtained via ANN.
As the MSE, the Mean Absolute Percentage Error (MAPE) was also applied to the performance of the models used in Equation (4). The Mean Absolute Percentage Error (MAPE) is one of the most commonly used Key Performance Indicators to measure forecast accuracy. The results are presented in
Table 1.
A test used in the literature is the Kruskal–Wallis test, which is a nonparametric version of classical one-way ANOVA, and an extension of the Wilcoxon rank sum test to two groups or more. It compares the medians of the groups of data in x to determine if the samples come from the same population (or, equivalently, from different populations with the same distribution) [
18]. Within this context, several papers have been published in the literature on the Kruskal–Wallis test [
19,
20]. In Bayram and Çıtakoğlu, 2023, the predictive power of three different machine learning (ML)-based approaches was investigated for long-term monthly reference evapotranspiration prediction. Satisfactory results were found.
Table 1 also shows the
p_values corresponding to the Kruskal–Wallis test analysis. It is observed that when applied at 5%, a comparison between the obtained output (
Yob-ANN) and the desired output (
Ydes) showed similar distributions.
3. Results
Of the 599 samples, 80% were randomly selected for training (479 samples) and 20% for validation (120 samples).
Figure 4a shows the performance of the neural network during training and validation. It is evident that the best performance, measured by the mean squared error (MSE), was achieved after 14 iterations (epochs) for training, with an error of 9.68 × 10
−4, while for validation, the error was 1.023 × 10
−3 in the 14th iteration. The total training time was 3 s for the 14 iterations, as indicated in
Table 1.
Figure 4b displays the error histogram, represented by the difference between the desired output and the obtained output (|
Ydes −
Yob|) relative to zero error. It is notable that the error remained around zero for the analyzed data.
Figure 5 illustrates the correlation between the desired output (
x-axis) and the obtained output (
y-axis). It is observed that, for training the network in
Figure 5a with 80% of the samples, that is, 479 samples, the value of the coefficient of determination (R
2) was 0.9994, indicating a strong correlation between the outputs obtained by the ANN and those desired by the CPF. To validate the model in
Figure 5b, with 20% of the samples that were not used in training (120 samples), the R
2 value was 0.9993, demonstrating a strong correlation between the outputs (similarity between the outputs). A similar result was observed in
Figure 5c for 100% of the samples (599 samples), with an R
2 of 0.9994. Based on these results, we can infer that the ANN was able to predict the total power losses (real and reactive) with a low error (MSE), both during training and, especially, during model validation, which are samples that were not part of the training.
- A.
Results for the IEEE 14-bus system
Figure 6 shows the total real (
Pa) and reactive (
Pr) power losses, both desired (targets-
Ydes) and obtained by the ANN (
Yob). In
Figure 6a, the results during the training phase with 80% of the samples (173) are presented, showing a high similarity between the obtained output and the desired one, and the same pattern is observed for
Pr. During the validation, in which
Pa and
Pr losses were predicted,
Figure 6b displays the results for the 40 samples (20%) that were not used in training, for both
Pa and
Pr. A similar behaviour is noticed between the outputs in both curves, indicating that the network managed to approximate
Yob very closely to
Ydes. Finally,
Figure 6c shows the total losses of
Pa and
Pr desired (
Ydes) and the outputs obtained (
Yob) by ANN for 100% of the samples (213 samples), where a similar behaviour is also observed between the outputs on both curves.
Figure 7 shows the total real (
Pa) and reactive (
Pr) power loss curves, both desired and obtained, as a function of the loading factor (λ) for the IEEE 14 bus system. In the study of continuation power flow (CPF) in electrical power systems, reaching the critical point (CP) with a minimum error is extremely important, since this point defines the stability and instability of the system. In this work, the CP value for
Pa obtained via ANN was (λ,
Pa) = (1.7680, 0.8008), while the desired value is (λ,
Pa) = (1.7680, 0.7855). This resulted in an error of 0.0153 for
Pa in CP. As for
Pr, the CP obtained value was (λ,
Pr) = (1.7680, 3.1245), while the desired value is (λ,
Pr) = (1.7680, 3.1321), with an error of 0.0076, according to
Table 2 presented at the end of the results.
- B.
Results for the IEEE 30-bus system
Similar results are also observed for the IEEE 30 bus system. In
Figure 8, the total real (
Pa) and reactive (
Pr) power losses desired (
Ydes) are presented, as well as those obtained (
Yob) via ANN, for the two phases: training (80% of samples), validation (20% of samples), and for all samples (100%). In
Figure 8a, the training results (148 samples) are shown, while in
Figure 8b, the validation results (36 samples) are shown. It is important to highlight that the validation samples were not used in training the network; however, even so, the ANN was able to estimate
Pa and
Pr values very close to those desired. Finally, in
Figure 8c, the total real (
Pa) and reactive (
Pr) power losses desired (
Ydes) and obtained (
Yob) for all samples (184 samples) are shown.
Figure 9 shows, on the left, the curves of real power loss (
Pa) as a function of load λ, including both the desired one via CPF and that obtained via ANN. It is observed that there was a difference in the values in the region of maximum real power loss. However, at the critical point (CP), the values obtained were quite close: (λ,
Pa) = (1.5335, 0.8036) for
Ydes and (λ,
Pa) = (1.5335, 0.8316) for
Yob, resulting in an error of 0.0280. On the right of
Figure 8, the reactive power loss curves (
Pr) as a function of load λ (
Ydes-desired and
Yob-obtained) show similarities between both, resulting in very close CP values: (λ,
Pr) = (1.5335, 2.9657) for
Ydes and (λ,
Pr) = (1.5335, 3.0070) for
Yob, resulting in an error of 0.0423. These values can be seen in
Table 2.
- C.
Results for the IEEE 57-bus system
Figure 10 illustrates the results (
Pa on the left and
Pr on the right) obtained by the artificial neural network (ANN) during network training and validation.
Figure 10a shows training with 80% of the samples (158 samples). Validation is demonstrated in
Figure 10b, with 20% of the samples (44 samples) that were not used in training, providing estimated
Pa and
Pr data. Finally,
Figure 10c shows the results for all samples (202 samples).
Figure 11 shows the total real and reactive power losses (
Pa and
Pr) in relation to the increase in load (λ). The similarity of the values obtained via ANN is noticeable when compared to the desired outputs. This is due to the high correlation between the outputs, highlighting the robustness of the ANN developed for this application.