Optimizing Solar PV Placement for Enhanced Integration in Radial Distribution Networks using Deep Learning Techniques

This study introduces a highly effective technique to address the load flow challenge in Radial Distribution Networks (RDNs). The proposed approach leverages two matrices derived from the topological features of distribution networks to provide an optimal solution to handle load flow challenges. To assess the efficacy of this technique, simulations were executed on an IEEE 33-bus radial distribution system using MATLAB. Deep Learning (DL) has become a powerful artificial intelligence technique that excels at interpreting power grid datasets. Thus, a data-driven methodology is presented that incorporates an advanced Long-Short-Term-Memory (LSTM) network. Employing the Recurrent Neural Network with the LSTM (RNN-LSTM) technique based on these simulations, the study precisely identifies the optimal placement of an integrated PV generator within the radial network. The application of DL techniques, specifically LSTM networks, exemplifies the potential of data-driven approaches in enhancing decision-making processes. The results of this study highlight the potential of RNN-LSTM for the optimal integration of PV generators and for ameliorating the reliability of RDNs


INTRODUCTION
RDNs featuring main feeders and lateral distributors are gaining popularity due to their simplicity and costeffectiveness.Power flow analysis is crucial in designing efficient distribution networks, considering factors, such as maximum feeder currents, voltage dips, energy loss, and reliability [1].Optimization of these networks relies on algorithms that require multiple power flow runs, with uncertainties arising from estimated inputs, namely load forecasts and network parameters.In complex distribution systems, practical challenges in data collection contribute to non-statistical uncertainties.The following characteristics distinguish electric distribution networks: radial or weakly mesh topologies, unbalanced operation with scattered loads, a large number of buses and branches, varying resistance and reactance values, as well as operation in numerous phases [2].
Conventional power flow techniques, like Newton-Raphson and rapidly decoupled methods, are effective in managing power systems.However, difficulties arise when applying these methods to faulty or improperly initialized systems [3][4].Additionally, the Gauss-Seidel method, although robust, demonstrates inefficiency when dealing with large power systems [5].Distribution networks, characterized by their illconditioned nature, pose challenges due to the presence of diverse resistance and reactance values and their radial structure.As renewable energy sources become more integrated, it becomes imperative to address these challenges in distribution systems.Therefore, it is crucial to adapt the load flow method to overcome these challenges [6].
The incorporation of renewable PV energy sources in power distribution networks is rapidly expanding [7].The swift advances in Photovoltaic Generator (PG) technology and their integration into distribution networks present a multitude of benefits.These advantages encompass the reduction of the highest loads, greater system security, improved dependability, increased voltage stability, strengthened grid resilience, incurred peak operating expenses, and diminished network losses [8][9].This study proposes an approach that uses Machine Learning (ML) techniques, specifically an Artificial Neural Network (ANN) to determine the optimal placement of PGs [10].Deep Learning (DL) is viewed as a progression from ML, integrating algorithms that can learn from data to perform tasks without the need for explicit programming [11].Its ability to extract advanced features from extensive input data, known as feature engineering, sets it apart from ML. Consequently, DL is increasingly favored for its groundbreaking applications in natural language processing, computer vision, and predictive modeling [12].Various types of DL modeling approaches have been presented, including vector space models, Convolutional Neural Networks (CNNs), Recurrent Neural Networks (RNNs), and hybrid neural networks [13].
This study employed a DL technique, specifically RNN-LSTM, to enhance the placement of PV generators.This approach effectively addresses load flow challenges by utilizing two matrices derived from the topology of the distribution network.The efficiency of the proposed technique is demonstrated through simulations conducted on an IEEE 33bus RDN using MATLAB.The prediction procedure exhibits significant improvements in the efficacy and performance of the proposed technique.The findings demonstrate the potential of the proposed RNN-LSTM technique for optimizing PG placement in distribution networks, leading to enhanced network performance and efficiency.

II. PHOTOVOLTAIC INTEGRATION IN RDNS
The control of load flow in an RDN is achieved by incorporating Bus Injections into the Branch Current (BIBC) matrix and applying comparable current injections [14].The model based on current injection, especially beneficial for distribution networks, is employed.The formula for the load apparent power at the node ci is given by: . ( where represents the active load power, represents the reactive load power for each bus, and takes values from 1 to .The ii-th current injection can be expressed similarly as: . / * (2) At the ii th iteration, the bus voltage and current injection are symbolized as V c ii and I c ii , respectively, and s 2 = -1.The real and imaginary parts of the current injection at this iteration are denoted by I ci i and I ci r , respectively.

A. Development of Relationship Matrices
Figure 1 illustrates a basic RDN.Equation ( 2) is used to compute the injected currents, and Kirchhoff's current law is applied to determine the branch currents in the RDN.As a result, the branch currents can be expressed as functions of their respective current injections: Therefore, the branch currents can be obtained as follows: Equation ( 4) may be rewritten as: The BIBC matrix is characterized by an upper triangular structure, with its elements exclusively taking values of 0 or 1.

B. Development of BIBC Matrices
The process for forming the BIBC matrix, as delineated (4), can be outlined as shown in [15].

C. Development of the Bus Voltage
To determine the receiving-end bus voltages, a forward sweep is performed across the ladder network utilizing the following generalized equations: In this context, the symbols cm1 and cm2 represent the transmitting and receiving ends, respectively, and Br(jj) denotes the branch current number.The following equation can be used to calculate the correlation between branch currents and bus voltages: These relationships can be illustrated in a matrix form: with: The Branch Current to Bus Voltage (BCBV) matrix facilitates the computation of equivalent bus voltage fluctuations corresponding to variations in branch currents.The expression below can be employed to articulate the correlation between bus voltages and current injections: The updated voltage values are employed for a new topdown iteration.The next equation can be deployed to calculate the connection between branch currents and bus voltages.Additionally, the actual and reactive power loss of the branch ij, with j=i+1, can be determined using: with R(ij) and X(ij) being the resistance and reactance of the line section ij.

D. Development of PV Bus
The most favorable PG location on an RDN, in terms of minimizing losses, is near the line's termination point.The maximum power capacity of a solar plant is expressed by [16]: where E c represents the panel insolation (W/m 2 ), E cref and T jcref are equal to 1000 W/m 2 and 25°C, and P 1 , P 2 , and P 3 are fixed values.This simplified model enables the calculation of the maximum PG power at a given panel irradiation and temperature, with only three constant variables and a straightforward equation.The active power at bus i varies to the following factors: The initial power consumption at bus before the injection of power from the PG, is denoted as P ci0 .

A. DL Techniques
DL modeling techniques facilitate the acquisition of feature representations in data through the utilization of multiple processing layers and various levels of abstraction [17].Advanced DL models, founded on ANNs [18], demonstrate proficiency across diverse domains.Despite their effectiveness, ANNs exhibit drawbacks, such as the absence of guaranteed convergence to an optimal solution and susceptibility to overfitting in the training data.The term "deep" in DL reflects the numerous processing layers traversed by data within the network.A DL model comprises stacked layers, as shown in Figures 2 and 3.The initial layer (input) consists of units with values distributed to neurons in the first hidden layer, leading to the final layer where predicted results emerge.The number of units in the final layer corresponds to the desired output classes.Hidden layers positioned between the input and output layers apply weights to inputs, passing them through an activation function that introduces non-linearity, facilitating the learning of complex data relationships.The backpropagation algorithm computes the error between predicted results and the desired output class and then adjusts the weights in the hidden layer to minimize loss.This iterative process continues until the output achieves sufficient accuracy for practical use [19].Given the aforementioned neural network concepts, numerous DL modeling techniques have been explored [20].

B. RNN with LSTM
RNNs have exhibited promising results in various natural language processing tasks, excelling in areas, such as sentiment classification [21], image captioning [22], and language translation [23].Many scenarios involve data sequences that inherently convey the essence of the information, as noticed in tasks like language modeling where the meaning is derived from the sequential arrangement of words.Traditional neural networks assume no interdependence between input and output, but in cases where sequential order matters, a network that incorporates prior information becomes essential for meaningful comprehension of the data.RNNs address this need by performing the same computation for each element in a sequence, establishing a connection to previous information.This recurrent nature enables RNNs to maintain a memory that retains information from prior computations [24].
An LSTM network consists of distinct memory blocks known as cells.These cells are formed by gates that regulate the information flow, including forget, input, and output gates.The forget gate eliminates information from the cell configuration, while the input gate incorporates newly entered data into the cell.The input gate governs the pace at which new data is introduced to the cell, and the output gate restricts the data within the cell, determining the output activation of the LSTM unit.The equations below can be used to define the gating mechanism in an LSTM network: where:  K L is the forget gate output at the time step V.This element decides the extent to which the information from the previous cell state should be disregarded.
 L is the input gate output at V, dictating the proportion of the candidate cell state to be added to the existing cell state.
 , U L is the candidate cell state at V, referring to a novel piece of information that can be incorporated into the cell state.
 , L is the current cell state at V. This signifies the memory aspect of the LSTM cell.
 Y L is the output gate output at V. This factor decides the proportion of the current cell state to be produced as the output.
 ℎ L is the hidden state output at V. This is the result or output produced by the LSTM cell.
 O FF , O , O XX , and O ;; are matrices representing the weights for the forget gate, input gate, candidate cell state, and output gate, respectively.
 S FF , S , S XX , and S ;; are bias vectors.
 M denotes the sigmoid activation function.
These equations describe the gating mechanism in an LSTM network.The forget gate (13) determines which information should be discarded from the cell state, while the input gate (14) decides the amount of new information that should be added.The output gate (15) controls the information flow from the cell to the output activation of the LSTM unit.LSTM networks can be used to effectively model the interdependencies and sequential patterns in the input data, allowing the capture of relevant information for the problem at hand.These insights are incorporated into the objective function to ensure that the input signals are appropriately represented.

IV. SIMULATION RESULTS
The proposed algorithm was implemented on the IEEE 33bus RDN, both with and without a PG.The system consists of 33 buses and 32 lines, as depicted in Figure 4.By applying the proposed algorithm to this real-world distribution system, it is possible to assess its performance and evaluate its applicability in several scenarios.The IEEE 33-bus system is widely utilized as a benchmark in power system analysis, making it an ideal test case for validating the capabilities of the proposed algorithm.The Advance Power API-M370 PV module is wellsuited to meet current requirements, and its characteristics are illustrated in Figure 5 and Table I.    operating conditions of the distribution system.Analyzing the load flow solution provides valuable insights into voltage profiles and power flows across the network.These data aid in evaluating system stability, detecting possible voltage violations, and comprehending the overall performance of the distribution system under standard operating conditions.Table II presents Active Power Loss (APL) and Reactive Power Loss (RPL) in the case where a PG is integrated in nodes 2 to 33 of the distribution system, providing a comprehensive overview of the power losses associated with the integration of the PG and quantifying the impact of renewable energy integration on the overall power losses of the system.Specifically, the PG has a power capacity of 500 kW, representing a renewable energy integration rate of 10.77% into the electrical grid.By analyzing the active and reactive power losses in each case, the effectiveness of PG integration in reducing power losses and improving system efficiency can be assessed.The results in Table II highlight the importance of renewable energy integration in mitigating power losses and its potential as a means to enhance the sustainability and economic viability of the electrical grid.Table III illustrates the power loss solution for branches 15-16, 16-17, and 17-18 in the distribution system, offering valuable information on the power losses that occur in these specific branches.Tables II and III indicate that the PG installed on node 16 plays a significant role in supplying a substantial amount of energy, highlighting its contribution to reducing power losses and enhancing the overall performance of the system.Furthermore, nodes 17 and 18, which are part of branches 15-16, 16-17, and 17-18, consume the highest amount of energy.This demonstrates their importance in the distribution system and emphasizes the need for efficient energy management in these nodes.As moving away from node 16 and traverse the branches, the current flowing through the branches gradually decreases.This reduction in current leads to a decrease in power losses along the branches.Consequently, node 16 emerges as the optimal location for integrating the PG system, as it exhibits the lowest active and reactive power losses among the nodes considered.Positioning the PG system at node 16 can effectively minimize power losses and improve the overall performance of the distribution system.This information serves as a guide for the optimal placement of renewable energy sources, such as PG systems, to maximize their impact and achieve greater energy efficiency in the network.Figure 7 showcases the active and reactive power losses in the IEEE 33 bus network with and without PG.Case 1 represents the scenario in which PG is injected at node 16, while Case 2 represents the absence of PG.These results indicate a significant reduction in both active and reactive power losses compared to previous works.The reductions achieved were 23.27% in APL and 24.48% in RPL, highlighting the strong performance of the proposed approach.This decrease is achieved even without the need for additional shunt capacity, effectively reducing system installation costs.Furthermore, when the integrated PG case at node 16 was compared with other cases, it was found that it offers a more reliable voltage profile.This suggests that integrating the PG at node 16 not only reduces power losses, but also expands the overall voltage stability and reliability of the system.
The RNN-LSTM approach was used to train a collection of localized PV generator data points, leveraging simulation results for various injected PG power datasets.Figure 8  illustrates the results obtained from the RNN-LSTM model, indicating that the actual and predicted trajectories are closely aligned and displaying the high level of performance and accuracy achieved by this technique.The RNN-LSTM method demonstrates remarkable performance, achieving an impressive accuracy level of up to 97%, as observed in Figure 9.This accuracy level provides compelling evidence of the superiority of the RNN-LSTM approach compared to traditional and ANN algorithms commonly employed in similar tasks [10,25].Comparing the proposed RNN-LSTM method with algorithms, such as Artificial Bee Colony (ABC), Water Wave Optimization (WAO), Genetic Algorithm/Particle Swarm Optimization (GA/PSO), Genetic Algorithm (GA), and Firefly Algorithm (FA) can provide valuable insights into its performance and potential advantages [26][27][28].By surpassing other methods in terms of accuracy, the RNN-LSTM technique proves its effectiveness in precisely predicting and analyzing data.This exceptional accuracy underscores the robustness and reliability of the RNN-LSTM approach, establishing it as a highly valuable tool in various applications and domains.The evaluation considered key metrics, like the calculation time, the convergence rate, and the accuracy of the optimal solutions.In terms of calculation time, the RNN-LSTM technique demonstrated notable efficiency, significantly reducing the time required for training and prediction compared to the existing algorithms.Additionally, the convergence rate of the RNN-LSTM technique was superior, requiring fewer iterations to achieve a satisfactory solution.Furthermore, the accuracy of the optimal solutions (97%) obtained from the RNN-LSTM technique surpassed that of existing algorithms.This comparative analysis allows for a comprehensive assessment of the deep learning method's performance compared to other established algorithms, as it facilitates a better understanding of its potential benefits, namely improved convergence, accuracy, and robustness, while also identifying any areas where other algorithms may outperform it.The proposed RNN-LSTM approach for optimal PV placement in the distribution network offers several advantages and some disadvantages.V. CONCLUSION This study presented a proficient method to address the load flow problem in RDNs.By harnessing the topological characteristics of distribution networks, two matrices were derived that facilitated an optimal solution to the load flow challenge.The BIBC matrix, computed through the application of Kirchhoff's current law, and the BCBV matrix, illustrating the correlation between bus voltages and branch currents, were instrumental in resolving the load flow.Simultaneous utilization of these matrices presents a direct and effective method to address load flow issues.The proposed method demonstrated excellent performance in practical applications.The simulation results showcased its effectiveness in dealing with widespread RDNs.In addition, considering the integration of PG into the radial system under investigation, simulation results were presented and discussed concerning voltage amplitudes, current branches, and active and reactive power losses.These results helped identify the optimal location for integrating a PG, which was determined to be the farthest node providing reliable voltage and minimizing power loss.Furthermore, the RNN-LSTM technique was applied to accurately locate a PG that had already been incorporated into the RDN.This prediction procedure caused a significant improvement in the efficacy and performance of this technique, as evidenced by the results obtained.

Figure 6
Figure 6 portrays the voltage load flow solution obtained from the radial network analysis conducted on an IEEE 33-bus distribution system in the absence of a PG.The load flow solution offers important information on the steady-state www.etasr.comZdiri et al.: Optimizing Solar PV Placement for Enhanced Integration in Radial Distribution Networks …

Fig. 7 .Fig. 9 .
Fig. 7.APL and RPL for the two cases of the IEEE 33 bus network.

TABLE II .
PG-IEEE 33 BUS RDN'S POWER LOSS SOLUTION

TABLE III .
PG-IEEE 33 BUS RDN'S BRANCH POWER LOSS SOLUTIONWithout

TABLE IV .
ADVANTAGES AND DISADVANTAGES OF THE PROPOSED METHOD.