scieee AI-readable full text Open interactive document viewer

An evolutionary computational approach for the identification of distribution networks models

Rodríguez del Nozal, Álvaro; Carmona Pardo, Rubén; Mauricio, Juan Manuel; Romero Ramos, Esther

Abstract

In this paper, we present a novel methodology for generating low-voltage distribution network models. The methodology is based on leveraging the existing knowledge of the network topology and a comprehensive catalog of the conductors that are installed in each segment of the grid. By using genetic algorithms and data obtained from the smart-meters in the network, the proposed method can produce highly accurate network models. The effectiveness of this methodology has been confirmed by extensive simulation studies achieving errors of less than 0.4 V in the estimation of nodal voltages in scenarios without measurements noise and on the order of the standard deviation of the error considered in the measurements when disturbances are added to the problem.

Full text

Contents lists available at ScienceDirect Engineering Applications of Artificial Intelligence journal homepage: www.elsevier.com/locate/engappai Research Paper An evolutionary computational approach for the identification of distribution networks models Álvaro Rodríguez del Nozala,∗, Rubén Carmona-Pardoa,b, Juan M. Mauricioa, Esther Romero-Ramosa,c aDepartment of Electrical Engineering, Universidad de Sevilla, Seville, 41092, Spain bIngelectus Innovative Electrical Solutions, Seville, 41092, Spain cENGREEN Laboratory of Engineering for Energy and Environmental Sustainability, Universidad de Sevilla, Seville, Spain ARTICLE INFO Keywords: Distribution networks Genetic algorithms Network modeling ABSTRACT In this paper, we present a novel methodology for generating low-voltage distribution network models. The methodology is based on leveraging the existing knowledge of the network topology and a comprehensive catalog of the conductors that are installed in each segment of the grid. By using genetic algorithms and data obtained from the smart-meters in the network, the proposed method can produce highly accurate network models. The effectiveness of this methodology has been confirmed by extensive simulation studies achieving errors of less than 0.4 V in the estimation of nodal voltages in scenarios without measurements noise and on the order of the standard deviation of the error considered in the measurements when disturbances are added to the problem. 1. Introduction Low voltage (LV) electrical distribution networks are crucial for the reliable delivery of electricity to end-users because most clients are connected to the lowest voltage level of distribution networks. Modeling LV grids is essential for understanding and optimizing their planning and behavior, as well as for evaluating the impact of new technologies and equipment on system performance. With the increasing integration of renewable energy sources and electric vehicle (EV) chargers, the importance of modeling low voltage electrical distribution networks has become even greater in recent years, as it allows for assessing the effect of these technologies on power quality, power flow, and system stability as well as identifying potential bottlenecks and constraints in the network. The LV network identification problem comprises several subproblems: identifying the connectivity among nodes, deducing the phase to which each individual client is connected, and determining the electrical model for each section of the system. Numerous data drivenbased publications have arisen around these challenges (Heng et al., 2021;Qi et al.,2023), many of them dealing with one or a combination of the three aforementioned subproblems. This work focuses on the last of the above issues, that is, the parameter estimation problem of LV distribution networks, assuming that the topology problems have been solved previously. This parameter estimation problem must take ∗Corresponding author. E-mail address: [email protected] (Á. Rodríguez del Nozal). into account the characteristics of these networks, three of which stand out (Al-Jaafreh and Mokryani,2019;Cheng et al.,2023): (i) the use of a wide variety of line segments arrangements for both overhead or underground lines: three-phase four-wire, two-phase three-wire, and single phase two-wire, so the neutral conductor is always present, (ii) the existence of single-phase customers and not only the common balanced three-phase loads/generators of transmission networks, (iii) although most LV networks are planned and operated with a radial topology, in the so called LV grid networks a meshed planning and operation arises, being this topology quite common in high density urban areas. The following is a review of the different data-driven solutions proposed in the specialized literature to address the parameter estimation problem in distribution networks, assuming as initial classification criterion the type of input data required for each published solution. Many papers tackling the parameter estimation problem take advantage of the measurements collected by smart meters (SMs) that are being massively deployed around the world (Iakovlev et al.,2019;Zhang et al.,2020; Wang et al.,2020;Wang and Yu,2022;Wang et al.,2023). Authors in Iakovlev et al. (2019) address only balanced and radial distribution networks with customers necessarily at each network node, i.e., the socalled zero-injection buses (ZIBs) are not allowed; by using the voltage measurement at the substation and the voltage, current and power https://doi.org/10.1016/j.engappai.2024.109184 Received 17 July 2023; Received in revised form 26 April 2024; Accepted 22 August 2024 Engineering Applications of Articial Intelligence 137 (2024) 109184 Available online 5 September 2024 0952-1976/© 2024 The Author(s). Published by Elsevier Ltd. This is an open access article under the CC BY-NC-ND license ( http://creativecommons.org/licenses/bync-nd/4.0/ ). Á. Rodríguez del Nozal et al. factor measurements collected by SMs, an unconstrained linear least square estimation methodology is proposed and tested on a too simple and small system where loads are modeled as impedances instead of using the most common and extended approach that are constant power demands, and assuming simplifications in the network model (the voltage phase increments between adjacent nodes is considered negligible). Also the work (Zhang et al.,2020) tackles balanced systems, although not necessarily with a radial topology; a two-step procedure is presented that optimally solves a linear regression estimation supported by a simplified linearized power flow model, in this case making use of the active powers, reactive powers and voltage magnitudes of SMs as well as the voltage magnitude at the main substation; once again SMs at any bus even ZIBs are needed. The authors in Wang et al. (2020) estimates parameters of symmetrical three-phase three-wire lines of radial networks by using a multiple linear regression technique and assuming again negligible difference in voltage angles; injected power flow and voltage magnitude measurements are needed at all buses including the substation, and it is not able to deal with ZIBs. Threephase three-wire unbalance distribution networks with a radial or mesh topology are considered in Wang and Yu (2022) (neutral conductor is omitted), developing a graph neural network plus a stochastic gradient descent approach to estimate the three-phase series impedance matrices and by using the same measurements as those considered in Zhang et al. (2020), although on this occasion the voltage magnitudes on ZIBs are not required. The last work of this first group (Wang et al., 2023) deals with radial and balance distribution networks, using the same measurements that Zhang et al. (2020) except for the voltage measurement in ZIBs that are not required; a linear regression method that also takes advantage of the specific structure of the load flow equations in radial networks is the methodology proposed. Other works address the problem based exclusively on the information obtained through the use of phasor measurement units (PMUs) (Brouillon et al.,2021;Pegoraro et al.,2019;Yuan et al.,2023; Ardakanian et al.,2019), which provide very relevant information when measuring voltages and currents in a complex way. However, the installation of PMUs is not yet as widespread as SMs, making that solutions still unrealistic , especially since they require the installation of a PMU in each node of the system. Thus, Brouillon et al. (2021) proposes two different methodologies to solve the problem of parameter estimation in balanced distribution networks, no matter the topology: the use of a maximum likelihood or a Bayesian estimator, outperforming the last to the first; a small 10-bus system is the only tested network. A weighted least squares estimation based solution is proposed in Pegoraro et al. (2019), only working for balanced distribution networks but with any topological configuration. Yuan et al. (2023) also addresses balanced distribution networks by solving a nonnegative least squares problem presenting as a novelty the possibility of saving on the number of PMUs to be installed by omitting them in ZIBs; ZIBs are eliminated from the process by means of Kron reduction, which on the other hand leads to not being able to estimate the parameters of the lines that affect these nodes (except for very specific topologies); the proposed solution is not tested in any theoretical or actual distribution network. The authors in Ardakanian et al. (2019) propose a lasso regression analysis for three-phase three-wire distribution networks, radial or meshed operated, not considering the neutral conductor existing in LV distribution networks. Other authors propose intermediate solutions combining information from SMs and PMU measurements (Srinivas and Wu,2022;Yu et al.,2018). Srinivas and Wu (2022) combines different methodologies that successively improve the estimation: a regression analysis that uses the active power, reactive power, and voltage magnitude collected by SMs, a Bayesian estimator fed with PMUs measurements installed in ZIBs, and an unscented Kalman filter followed by a Newton–Raphson method that improve the starting parameter estimation carried out by the two first estimators; it works for radial or meshed networks, although a balanced model is considered. The methodology proposed in Yu et al. (2018) converts the starting maximum-likelihood estimation problem into a generalized low-rank approximation one, that alternatively is converted into a total least squares problem, using as input data the power injection measurements of SMs and the voltage angle of PMUs installed in all the buses; balanced distribution lines are considered, no matter the topology of the network. Finally, the works (Sun et al.,2022;Dutta et al.,2021;Yang and Sen,2023;Prostejovsky et al.,2016) focus on each line of the system in an independent analysis, assuming that power flows and voltage magnitudes are registered at both ends of the line, an assumption quite far from reality. Based on strong probability concepts, the authors in Sun et al. (2022) deal with the unsynchronization of PMUs and SCADA measurements collected at each bus of the distribution network; line parameters of single-phase lines are identified by using the total least squares algorithm. A three-phase three-wire model is considered in Dutta et al. (2021) to estimate the impedance matrix of each line segment and trough a variance-based reweighted nonlinear least squares scheme, while a hyperparameter-tuned general regression neural network is proposed in Yang and Sen (2023). These two last contributions lack in the consideration of the neutral conductor of LV distribution networks assuming three-phase three-wire line segments. Finally, and coming back to balanced systems, the authors in Prostejovsky et al. (2016) proposes a linear least squares minimization methodology that estimates series and shunt impedances of the pi-model of single-phase circuits. A summary comparison table can be found in Table 1. The parameter estimation solution for unbalance three-phase fourwire LV networks proposed in this document aims to take advantage of the effort made by many distribution companies to collect all the data of the assets that make up their distribution networks (Stephen and Damilola,2014;Navarro-Espinosa and Ochoa,2015;Agüero et al., 2019). That collection exercise is done in most cases due to regulatory issues related to the remuneration of the electricity distribution business (Mateo et al.,2018) and not only because of technical purposes. Based on that campaign, it is possible to know the graph topology and attributes of most of the units that conform to the distribution network under study. In addition, this work considers the information provided by the SMs installed at each customer/distributed generator, which provide complex power and voltage magnitudes at the nodes, as well as voltage measurements in secondary substations. Thus, the contributions of this work are the following: •Introduce a methodology based on genetic algorithms for obtaining low voltage network models. To the authors’ knowledge, the use of genetic algorithms to solve the problem has never been proposed before. •Use as input data for the construction of the model data accessible by the distribution companies, trying to bring the problem as close as possible to reality. This makes the proposed solution highly applicable in practice. •Obtain a network model that although not exact, relates with sufficient consistency the input and output data for the network simulation. •Addresses unbalanced three-phase four-wire networks with any operation topology, either radial or meshed. •Keeps ZIBs without the need to install measuring equipment in them, being able to estimate the parameters of the branches coming into these buses. The remainder of this paper is organized as follows. Section 2 describes the hypothesis assumed in the work and introduces the formulation of the problem. In Section 3an evolutionary approach is presented to solve the proposed problem. Section 4evaluates under simulation the method proposed. The main conclusions of the developed work are finally drawn in Section 5. Engineering Applications of Articial Intelligence 137 (2024) 109184 2 Á. Rodríguez del Nozal et al. Table 1 Comparisons among existing methods. Ref. Net.aArrang.bTopologycInput Meas.dMethodologye Iakovlev et al. (2019) B 1P R SMs T LSE Zhang et al. (2020) B 1P R SMs T LRA-NRM Wang et al. (2020) U 3P-3W R/M SMs T MLRA Wang and Yu (2022) U 3P-3W R/M SMs A GNN-SGDA Wang et al. (2023) B 1P R SMs T LRA Brouillon et al. (2021) B 1P R/M PMUs T BE Pegoraro et al. (2019) B 1P R/M PMUs T WLSE Yuan et al. (2023) B 1P R PMUs T NNLSE Ardakanian et al. (2019) U 3P-3W R/M PMUs T LASSO-RA Srinivas and Wu (2022) B 1P R/M SMs-PMUs T RA-BE-UKF-NRM Yu et al. (2018) B 1P R/M SMs-PMUs T TLSE Sun et al. (2022) B 1P R/M PMU-SCADA T TLSE Dutta et al. (2021) U 3P-3W R/M SCADA T RWNLSE Yang and Sen (2023) U 3P-3W R/M SCADA T GRNN Prostejovsky et al. (2016) B 1P R/M SCADA T CLSE PM U 3P-4W R/M SMs A GA aB: Balanced Network Model, U:Unbalanced Network Model. bLine segments arrangement: 1P: single-phase, 3P-3W: three-phase three-wire, 3P-4 W: three-phase four-wire. cR: Radial topology, R/M: Both radial and meshed topology. dT (Theoretical): Meas. at all nodes or branches; A (Actual): Meas. at load/generator nodes. eLSE: Least Squares Estimation; LRA: Linear Regression Analysis; NRM: Newton–Raphson Method; MLRA: Multiple Linear Regression Analysis; GNN: Graph Neural Networks; SGDA: Stochastic Gradient Descent Approach; BE: Bayesian Estimation; WLSE: Weighted Least Squares Estimation; NNLSE: Non-Negative Linear Squares Estimation;LASSO-RA: Lasso regression analysis; RA: Regression Analysis; UKF: Unscented Kalman Filter; TLSE: Total Least Squares Estimation; RWNLSE: Reweighted Nonlinear Least Squares Estimation; GRNN: General regression neural network; CLSE: Constrained Least Squares Estimation; GA: Genetic Algorithms. 2. Problem description The objective of this work is to identify models of low-voltage electrical distribution networks that can accurately capture the behavior of these systems. These models can be divided into two parts: the line and bus interconnection graphs and the impedance matrices that define the lines. The line and bus interconnection graph provides a graphical representation of the network topology, including the locations of generators, loads, and other equipment. The impedance matrices, on the other hand, provide the electrical characteristics of the lines, including resistance, reactance, and conductance. Together, these two parts of the model provide a complete representation of the network and allow for the simulation of different operating scenarios and the evaluation of the impact of new technologies and equipment on system performance. 2.1. Hypotheses of the problem Given the magnitude of the problem addressed, it is important to limit the objectives by setting out a series of hypotheses. It is necessary to emphasize that these hypotheses are as mild as possible in order to pose a problem that can be solved with currently existing resources, thus being a realistic approach for the deduction of the network model. Thus, the hypotheses that have been taken into account in this work are: •Information on the topology of the network is available but not on the type of power line installed in each segment. This hypotheses assumes that the position of the smart-meters is usually georeferenced by the distribution company, but complete or accurate conductor impedance information is not available . •There is a catalog with the history of conductors installed by the distribution company. This hypotheses assumes that the distribution company has records of the different conductors that have been installed in the network, but it is not known with certainty the type of conductor installed in each segment due to a poor record of repairs. •It is assumed that prior work has been done to identify the connection of the smart-meters in the network to each phase. Note that based on the hypotheses formulated, the methodology proposed in this work is limited to the deduction of network models based on this information. The proposed algorithm does not calculate the impedance values of the line segments, but chooses the most appropriate conductor for each of the segments, which has an associated impedance. In addition, the method relies on the knowledge of the connections between nodes as well as the lengths of the individual line segments. Under these assumptions, the problem to be solved can be formally formulated. 2.2. Problem formulation The work considered in this study uses a distribution network model defined by a graph , where the vertices represent the buses, and the edges represent the electrical lines that interconnect them. Mathematically, the graph is defined as = (,), where is the set of vertices or buses, and is the set of edges or electrical lines that interconnect those buses. This work takes into account the unbalanced nature of low voltage distribution networks. Thus, the electrical quantities of the network at each point are represented by a vector of four components corresponding to phases a,band cand the neutral wire. An attribute is associated with each edge of the graph that defines the impedance matrix of the corresponding line. This new attribute can be denoted by 𝑊(𝐸𝑗)where 𝐸𝑗∈and it corresponds to the impedance matrix of that edge or power line of the network. The set = {𝑍0, 𝑍1, 𝑍2,…, 𝑍𝑛}includes the possible impedance matrices that have been derived from the distribution company catalog. The goal of the problem is to find the corresponding impedance matrix of each edge in the graph, identifying the type of conductor of each segment of the network. At this point, it is worth mentioning that the catalog of the facility contains several types of conductors. From the properties of these conductors and assuming their most commonly used installing configuration, it is possible to derive their impedance matrices with dimension 4 ×4 (relating the electrical components of the three phases and the neutral wire) and expressed in Ω∕km. Next, by multiplying these matrices by the length of the corresponding line segment, the value of the final impedance matrix is obtained in 𝛺. Thus, the derived impedance matrices expressed in Ω∕km are the ones gathered in the set and used as input data to the proposed problem. As a starting point for this work, it is assumed that a data collection campaign has been carried out, and that 𝑞samples of nodal voltages Engineering Applications of Articial Intelligence 137 (2024) 109184 3 Á. Rodríguez del Nozal et al. and active and reactive power flows have been acquired from the smartmeters of the network. In addition, the voltage measurement at the low voltage side of the secondary substations is recorded or estimated by a state estimator. It is considered that all samples of data are perfectly synchronized, meaning they were taken at the same instant. Assuming a network model constructed from the known data (interconnection graph, line lengths and clients connectivity) and a set of impedance matrices selected for each line segment, it is possible to feed it with the active and reactive power data from the smart-meters installed in the network. As a result, the estimated profile of nodal voltages in the entire distribution network is obtained. To do that, the set of nonlinear equations that represent the Kirchhoff’s current and voltage laws as well as the power demand/injection at each node of the network must be solved. To simplify the notation used in this paper, these equations are encapsulated in function 𝐡: 𝐯=𝐡(,𝐩,𝐪)(1) where vectors 𝐯,𝐩and 𝐪stack the four-wire three-phase phase-to- neutral nodal voltages at all the buses with smart-meters installed and the active and reactive power measured by the smart-meters, respectively. 3. Proposed evolutionary approach The Darwinian theory of evolution, which holds that the more an individual adapts to its environment, the higher the likelihood that it will have offspring and survive across generations, is the source of inspiration for genetic algorithms (Kramer,2017). The central concept of a genetic algorithm is the iterative evolution of a population of potential solutions (called individuals). Each individual is encoded in a chromosome-like structure (each gene represents a variable of the solution) and is given a fitness rating that assesses how well it has adapted to the search landscape. Certain individuals are stochastically selected to produce new offspring based on their fitness. In general, an individual has a higher chance of being selected as a parent the fitter they are. Through the use of crossover and mutation operators, the new offspring is produced. While the mutation entails changing specific genetic information in a single individual, the crossover operator entails combining the genetic information of two individuals. Genetic algorithms can strike a good balance between exploration and exploitation within the problem search landscape by properly setting the crossover and mutation probabilities. In this work, a 𝜇+𝜆genetic algorithm is implemented (Ter-Sarkisov and Marsland,2011). For this algorithm, individuals (solutions) are encoded in a chromosome-like structure, in which all necessary variables are encoded. Thus, from a population of size 𝜇, an offspring of size 𝜆is generated at each generation. The individuals in 𝜆are generated through the probabilistic genetic operators of crossover and mutation. Therefore, a new individual contained in 𝜆can be generated by crossing or mutating the parents in 𝜇. Once the extended population with a size of 𝜇+𝜆individuals is created, a new selection of 𝜇individuals through a tournament is performed to obtain the new generation. That tournament chooses the best individual from a selection list of an arbitrarily set of individuals from 𝜇+𝜆. Thus, the new offspring must compete with the parents to survive. The crossover and mutation probabilities define the exploration and exploitation capabilities of the algorithm. The optimal values are not universal, so fine tuning must be performed. 3.1. Individual representation In this work, each individual represents a possible model of the distribution network. It is proposed that the coding of individuals is based on a sequential enumeration of the type of power line used in each segment of the distribution network. For instance, Fig. 1 represents an Fig. 1. Arbitrary individual representation of a network model conformed by 10 segments and a catalog with 4 line types. arbitrary individual 𝛥of a network model conformed by 10 segments and a catalog with 4 line types. Thus, let us denote as (𝛥)the graph-based model of the distribution network in which the line types are defined by individual 𝛥, that is, 𝑊(𝐸𝑗) = 𝑍𝛥𝑗with 𝐸𝑗∈and 𝑍𝛥𝑗∈being 𝛥𝑗the 𝑗th component of 𝛥. 3.2. Fitness function For the problem proposed in this work, two fitness functions are defined. Both of them consider the difference between the voltage values acquired from the smart-meters in the network and those obtained from the model provided by the genetic algorithm when it is fed with the smart-meters power measurements. The former, 𝐹2(𝛥), considers the 2-norm of this difference, whereas the latter, 𝐹∞(𝛥), considers the infinity-norm, that is, the maximum voltage deviation in the set of data: 𝐹2(𝛥) = 1 𝑞 𝑞 ∑ 𝑠=1 ‖𝐯𝑠(𝛥) −  𝐯𝑠‖2, 𝐹∞(𝛥) = 1 𝑞 𝑞 ∑ 𝑠=1 ‖𝐯𝑠(𝛥) −  𝐯𝑠‖∞,(2) where 𝐯𝑠(𝛥) = 𝐡((𝛥),𝐩𝑠,𝐪𝑠)is a vector containing the nodal voltages estimated by the network model establishing the impedance matrices defined by individual 𝛥and particularized for the system measurements at sample 𝑠; and  𝐯𝑠is a vector containing the nodal voltages collected from smart-meters for sample 𝑠. Note that the fitness functions in (2) consider the differences in the measured and model-based estimated voltages of the buses in the network for the entire number of samples 𝑞considered. Furthermore, the fitness value is normalized by dividing it by 𝑞to make the results comparable in scenarios with different number of samples. The fitness function 𝐹2(𝛥)increases with voltage differences at each point in the network. However, the function 𝐹∞(𝛥)only considers the greatest voltage deviation from the considered dataset. Both functions are suitable for defining the quality of the developed model. However, it is not possible to know with certainty which one will yield a better model solution. Thus, the behavior of both functions will be evaluated through extensive simulation studies in the following sections. 3.3. Individual generation In sight of the proposed formulation, it is clear that individuals can be generated purely from the random selection of types of power lines for each segment of the network. Thus, each gene of the individual is obtained as a random number that follows a discrete uniform distribution bounded between 0 and the maximum number of power line types considered for each segment of the grid. 3.4. Genetic operators To ensure a good performance of the proposed methodology, tailored algorithms are proposed for mutation and crossover operations. On the one hand, the mutation operator consists in randomly choosing a different type of power line for a specific segment of the network model. This is done by analogy to the individual generation, that is, changing randomly the value of the gene by following a discrete Engineering Applications of Articial Intelligence 137 (2024) 109184 4 Á. Rodríguez del Nozal et al. Fig. 2. Two-point crossover operator illustrative example in which two individuals exchange the genetic information at positions 2 and 3. Table 2 Connections and line parameters for the CIGRE benchmark network. From To Type Conf. From To Type Conf. R1 R2 UG1 Underground C2 C3 OH1 Overhead R2 R3 UG1 Underground C3 C4 OH1 Overhead R3 R4 UG1 Underground C4 C5 OH1 Overhead R4 R5 UG1 Underground C5 C6 OH1 Overhead R5 R6 UG1 Underground C6 C7 OH1 Overhead R6 R7 UG1 Underground C7 C8 OH1 Overhead R7 R8 UG1 Underground C8 C9 OH1 Overhead R8 R9 UG1 Underground C3 C10 OH2 Overhead R9 R10 UG1 Underground C10 C11 OH2 Overhead R3 R11 UG3 Underground C11 C12 OH3 Overhead R4 R12 UG3 Underground C11 C13 OH3 Overhead R12 R13 UG3 Underground C10 C14 OH3 Overhead R13 R14 UG3 Underground C5 C15 OH2 Overhead R14 R15 UG3 Underground C15 C16 OH2 Overhead R6 R16 UG3 Underground C15 C17 OH3 Overhead R9 R17 UG3 Underground C16 C18 OH3 Overhead R10 R18 UG3 Underground C8 C19 OH3 Overhead I1 I2 UG2 Underground C9 C20 OH3 Overhead C1 C2 OH1 Overhead uniform distribution bounded between 0 and the maximum number of power line types considered. On the other hand, a two-point crossover operator is used. This operator randomly selects two points (two positions) to exchange between the genetic information of the individuals. Thus, the two individuals are modified in place and both retain their original length. An illustrative example of this last operator is depicted in Fig. 2. 4. Performance assessment This section describes the experimental results obtained in the simulations. To do that, the section relies in the European LV benchmark distribution network proposed by the CIGRE Task Force C06.04.02 (Barsali,2014) , and a second real LV network documented in Koirala et al. (2020). The benchmark network is depicted in Fig. 3 and, as it can be seen, it is composed by three main feeders, namely residential, industrial and commercial. These feeders are connected to the same MV node through three 20/0.4 kV power transformers. Note that there exist only loads (and consequently smart-meters) at buses R1, R11, R15, R16, R17, R18, I2, C1, C12, C13, C14, C17, C18, C19 and C20 being the rest of the them ZIBs. The network has been modeled in OpenDSS1and the genetic algorithm has been programmed in Python. The six types of conductors defined in Barsali (2014) have been considered. Based on those conductors, size 4 ×4 impedance matrices are derived and coded by assigning 0 to the OH1 type, 1 to OH2, 2 to OH3, 3 to UG1, 4 to UG2 and 5 to UG3. A summary of the type of line and configuration at each line segment is represented in Table 2. Thus, the individual that perfectly defines the distribution network is: 𝛥= [3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,5,(3) 1https://www.epri.com/pages/sa/opendss 4, 0,0,0,0,0,0,0,0,1,1,2,2,2,1,1,2,2,2,2], where we have intentionally written separately the part of the individual corresponding to each feeder (residential, industrial and commercial feeder, respectively). It should be noted as an example of the complexity of the problem that, based on power and voltage data collected from 16 network buses, the algorithm must adjust the type of conductor for 37 line segments. Considering six possible line types for each segment, there are 376combinations, that is, more than 2.5 billions of possibilities. 4.1. Data availability We consider that a data collection campaign has been carried out and four samples of fully synchronized data have been collected. These data include the measurements of active power, reactive power, and voltage magnitudes for all buses in the grid that have smart-meters installed. To analyze the influence of that information on the performance of the methodology, the dataset has been carefully constructed as follows: [Sample 1] Balanced loads on the buses with a power demand between each phase and the neutral wire with the following value: R1 R11 R15 R16 R17 P (kW) 63.3 4.8 16.5 17.4 11.1 Q (kvar) 20.82 1.6 5.4 5.7 3.6 R18 I2 C1 C12 C13 P (kW) 14.9 31.7 38.0 6.3 6.3 Q (kvar) 4.9 10.4 12.5 2.1 2.1 C14 C17 C18 C19 C20 P (kW) 7.9 7.9 2.5 5.1 2.5 Q (kvar) 2.6 2.6 0.8 1.7 0.8 [Sample 2] The power is only demanded at phase 𝑎. The power demanded at this phase is the same than in Sample 1. [Sample 3] The power is only demanded at phases 𝑏and 𝑐. The power demanded at these phases are the same than in Sample 1. [Sample 4] There is only balanced generation at the buses instead of demands of power. The power injections values are the same than in Sample 1. Note that the proposed methodology uses as input data the active and reactive power demanded at each phase. In that way, it has been considered that all consumption buses are an aggregate of the clients (whatever they are single-phase or three-phase) connected to said point. Nevertheless, the proposed method is suitable to any type of consumer, as can be seen in Samples 2 and 3, where only consumption in one or two of the phases is considered. The dataset was created to study the most extreme power flow scenarios in the network. Sample 1 represents a balanced situation where the diagonal terms of the line segment impedance matrix have a significant impact. In contrast, Samples 2 and 3 depict fully unbalanced scenarios and are expected to be highly sensitive to the non-diagonal terms of the impedance matrix. Lastly, Sample 4 examines the impact of prosumers within the network. Fig. 4 depicts the phase-to-neutral nodal voltages within the network for each of the samples and assuming nominal voltage operation at the MV bus, i.e., 20 kV. On the one hand, the highest voltages results for sample 4, which was expected due to the strong presence of prosumers. On the other hand the highest voltage unbalances logically correspond to samples 2 and 3 because of the asymmetrical distribution of loads per phase. Note that the proposed samples, although they are not completely realistic, show extreme scenarios that would allow evaluating the influence of each of them on the suitability of the obtained network after applying the methodology proposed in this work. Engineering Applications of Articial Intelligence 137 (2024) 109184 5 Á. Rodríguez del Nozal et al. Fig. 3. CIGRE European LV benchmark distribution network (Barsali,2014). Red squares denote buses with smart-meters installed. Fig. 4. Voltage profile within the network for Samples 1, 2, 3 and 4. Each plot represents the phase-to-neutral nodal voltage at each phase. 4.2. Genetic algorithm parameters Simulations were conducted using 100 generations, sufficient for convergence. Crossover (𝑃𝑐𝑥) and mutation (𝑃𝑚𝑢𝑡) probabilities were tested using a grid search with 𝑃𝑐𝑥 +𝑃𝑚𝑢𝑡 = 1 to maintain population Table 3 Genetic algorithm simulation parameters. Parameter Value 𝜇300 𝜆300 Generations 100 Selection Tournament (size =3) 𝑃𝑐𝑥 [0.3, 0.4, 0.5, 0.6, 0.7, 0.8] 𝑃𝑚𝑢𝑡 [0.7, 0.6, 0.5, 0.4, 0.3, 0.2] size. The values used are presented in Table 3. Population size was fixed to 300. 4.3. Key performance indicators To evaluate the results obtained in the simulations, it is necessary to define indicators of the quality of the solutions obtained. A priori, a good indicator of the quality of the solution obtained could be considered as the number of network segments in which the algorithm has failed to correctly identify the type of conductor installed. However, it is possible that although the solution given by the algorithm fails to identify some type of line types, the electrical model provided makes a good relation between input (active and reactive power in the loads) and the output magnitudes (voltages and current at the nodes). For instance, consider a very simple network consisting of a slack bus and a single load connected by two successive line segments, both 0.1 km long. Both line segments are constructed with the same conductor whose associated impedance matrix is 𝑍1, so the equivalent impedance from the slack bus to the load is given by 0.2 × 𝑍1. Now, consider two additional conductors included in the distribution network catalog whose derived impedance matrices, 𝑍2and 𝑍3, have the following relation with 𝑍1:𝑍2= 0.8 × 𝑍1and 𝑍3= 1.2 × 𝑍1. Then, the algorithm can return a model that considers that the line segments have the associated impedance matrices 𝑍2and 𝑍3respectively. In that way, the equivalent impedance from the slack bus to the consumer is again given by 0.2×𝑍1. Note that this model is equivalent to the original in terms of input–output quantities, with the only difference being the intermediate node electrical magnitudes from which the model can be abstracted. Following this reasoning, the voltage differences between actual values at consumption or generation points and the actual values for specific demanded or injected powers are considered the best indicators of the quality of the model. Thus, the following two KPIs are proposed: 𝐾𝑃 𝐼2(𝛥) = 1 4 4 ∑ 𝑠=1 ‖𝐯𝑠(𝛥) −  𝐯𝑠‖2, 𝐾𝑃 𝐼∞(𝛥) = 1 4 4 ∑ 𝑠=1 ‖𝐯𝑠(𝛥) −  𝐯𝑠‖∞.(4) Please note that the Key Performance Indicators (KPIs) mentioned above bear similarities to the fitness functions represented in Eq. (2). Engineering Applications of Articial Intelligence 137 (2024) 109184 6 Á. Rodríguez del Nozal et al. Fig. 5. Diagram of the methodology followed to obtain the network models. The main distinction lies in the fact that the KPIs are always specific to the four data samples. For instance, if the genetic algorithm is executed with a single data sample, it will minimize the corresponding fitness function based solely on that sample. Consequently, the model generated by the algorithm may overfit to those particular data, resulting in poor performance when evaluated with the remaining samples. This phenomenon will be uncovered by the KPIs, which will yield significantly higher values compared to the obtained fitness. This fact will be further discussed in the simulation results. 4.4. Simulation results Two blocks of simulation results are presented in this section. First, the performance of the proposed methodology is tested without considering measurement noises. These simulations intend to ensure that the number of generations has been correctly selected to guarantee the convergence of the algorithm as well as to evaluate the influence of the crossover and mutation probabilities in the suitability of the solutions. The algorithm is then tested under a perturbed scenario in which voltage and power measurements are affected by noise. It is worth pointing out that a set of 30 simulations have been carried out for each of the above-mentioned scenarios and for each combination of mutation and crossover probabilities considered. The methodology followed for each case (either with or without measurement noise) is summarized in Fig. 5 by a diagram. As it can be seen, for each sample, power measurements are used as inputs to solve the power flow problem of the network defined by the individual 𝛥. The output nodal voltages are compared with those measured by the smart-meters and the fitness 𝐹(𝛥)of the individual is then evaluated. The genetic algorithm evolves obtaining new generations of individuals that tend to converge to small fitness results. The influence of crossover (𝑃𝑐𝑥) and mutation (𝑃𝑚𝑢𝑡) probabilities is evaluated based on the performance of the final generation individuals. It is worth noting at this point that the power flow problem being solved with OpenDSS fits the individual 𝛥being tested and for an exact network model according to the specific grid under study, i.e., a LV system that can have a radial or meshed topology and with three-phase four-wire line sections maintaining the neutral conductor. 4.4.1. Noiseless scenario When noise is not considered in measurements, the proposed methodology consistently achieves a solution very close to the optimum. To reach this conclusion, 30 executions of the genetic algorithm were performed for each combination of crossover and mutation probabilities considering one, two, three, and four of the samples detailed previously. In addition, the algorithm was executed considering both fitness functions, i.e., 𝐹2(𝛥)and 𝐹∞(𝛥), in order to identify which of them obtains better results. In order to properly analyze the obtained results, Fig. 6 depicts the fitness values of the best individual after running the genetic algorithm using the fitness function 𝐹2(𝛥). Since the algorithm has been executed 30 times, the results are represented in a violin plot, which shows the minimum and maximum fitness achieved, along with the distribution of these results in the form of a histogram. As observed, in some of the scenarios, better fitness values are obtained for algorithm executions with a smaller number of samples. However, as discussed in the previous section, when using a small number of samples, the algorithm attempts to fit the line types as closely as possible to that particular dataset. This fact does not necessarily indicate that the obtained solution is optimal since it may perform poorly for other samples. Therefore, Fig. 7 depicts the values of 𝐾𝑃 𝐼2(𝛥)in addition to 𝐹2(𝛥)(now in blurred violins). As can be seen, the minimum values indicated by the KPI suggest that the models obtained for any set of samples are quite similar, improving or worsening slightly depending on the crossover and mutation probabilities selected. On the other hand, the maximum values of the KPI are higher in executions of the algorithm with a lower number of samples considered. Thus, we can conclude that, as it seemed logical a priori, considering a higher number of samples in the algorithm adjustment will provide more accurate models of the distribution network. Table 4 summarizes the results obtained by the algorithm when considering each of the fitness functions, i.e. 𝐹2(𝛥)and 𝐹∞(𝛥), and probabilities. When running the algorithm considering the fitness function 𝐹∞(𝛥), slightly worse results are obtained. Therefore, the graphical representation of these results has been omitted to avoid overwhelming the reader. In view of the results, it can be concluded that the algorithm obtains more accurate results when considering 𝐹2(𝛥)as both 𝐾𝑃 𝐼2and 𝐾𝑃 𝐼∞reach lower values. Thus, if we focus on the results when the algorithm minimizes the norm two of the voltage errors, it seems that the choice of a set of probabilities 𝑃𝑐𝑥 = 40% and 𝑃𝑚𝑢𝑡 = 60% achieve a good balance between the maximum and minimum values reached by the KPIs. For instance, for the case of four samples, the minimum average voltage errors achieved are lower than 0.243 V and in the worst solution the results are lower than 0.968 V. Finally, the network model is constructed by choosing the one with the lowest fitness value for 4 samples and 𝑃𝑐𝑥 = 40% and 𝑃𝑚𝑢𝑡 = 60%, i.e. 0.709 as shown in Table 4 (note that for this case 𝐾𝑃 𝐼2and 𝐹2 get the same value). Fig. 8 represents the model voltage errors for each of the considered samples. As can be seen, the errors in voltages are minimal, always lower than 0.3 V. It should be noted that this individual that minimizes 𝐾𝑃 𝐼2does not coincide with the one that does the same with 𝐾𝑃 𝐼∞, although it obtains similar performance. A lower 𝐾𝑃 𝐼2indicates that overall, there are lower voltage errors in all nodes, while 𝐾𝑃 𝐼∞only marks the highest value, not giving importance to the number of nodes with voltage differences. 4.4.2. Perturbed scenario This section presents the simulation results when uncertainties are considered in power and voltage measurements. The noise in active and reactive power measurements has been modeled as a normal distribution with mean 0 and standard deviation 3% of the measured value. Conversely, the noise in the voltage measurements follows a Engineering Applications of Articial Intelligence 137 (2024) 109184 7 Á. Rodríguez del Nozal et al. Fig. 6. Violin plots of the fitness values 𝐹2(𝛥)obtained after running the genetic algorithm 30 times for the different number of samples considered as well as different crossover and mutation probabilities. Unperturbed scenario. Fig. 7. Violin plots of the fitness values 𝐹2(𝛥)and 𝐾𝑃 𝐼2(𝛥)obtained after running the genetic algorithm 30 times for the different number of samples considered as well as different crossover and mutation probabilities. Unperturbed scenario. Engineering Applications of Articial Intelligence 137 (2024) 109184 8 Á. Rodríguez del Nozal et al. Fig. 8. Voltage errors for the best individual obtained when running the genetic algorithm minimizing 𝐹2(𝛥)and considering four data samples. Unperturbed scenario. normal distribution with mean 0 and standard deviation 0.6 V. Note that in this scenario we are able to evaluate the performance of the algorithm in scenarios closer to reality in which the measurements are usually highly perturbed due to inaccurate measurement devices. Fig. 9 depicts the fitness values of the best individual after running the genetic algorithm with 𝐹2(𝛥). Once again, the results are plotted on a violin graph to improve the understanding of the output. In this case, as expected, the obtained fitness values are much higher than in the noiseless scenario, since the introduction of noise in the measurements makes it impossible to fit the data to any network model. Again, fitness values are not adequate to evaluate the quality of the solutions and that is why we chose to use the defined KPIs. Fig. 10 represents together with the previous fitness values (now in blurred lines), the values of 𝐾𝑃 𝐼2. For this purpose, this indicator was calculated by removing the noise from the measurements in both power and voltage. Thus, the KPI yields much lower values. Because of this new figure, there is a decreasing trend in the maximum values of the KPI as the number of samples increases. On the other hand, the minimum values of the KPI reach similar scores for all sets of samples, being the lowest for the consideration of two samples. Table 5 summarizes the results obtained by the algorithm when considering each of the fitness functions, i.e. 𝐹2(𝛥)and 𝐹∞(𝛥), and probabilities. When running the algorithm considering the fitness function 𝐹∞(𝛥), again, worse results are obtained. In view of the results, the choice of a set of probabilities 𝑃𝑐𝑥 = 40% and 𝑃𝑚𝑢𝑡 = 60% seems to achieve a good balance between the maximum and minimum values Table 4 Evaluation of the KPIs for the results obtained in the noiseless scenario after executing 30 times the genetic algorithm for different number of samples and fitness functions 𝐹2(𝛥)and 𝐹∞(𝛥). Unperturbed scenario. 𝐾𝑃 𝐼2(min/max) min 𝐹2(𝛥) Samples 1 2 3 4 𝑝𝑐/𝑝𝑚𝑢𝑡 30/70 1.031/4.710 0.517/3.137 0.583/4.902 0.586/3.652 40/60 0.491/4.305 0.818/4.232 0.503/2.945 0.709/3.100 50/50 0.899/4.781 0.669/3.649 0.684/3.473 0.771/3.167 60/40 1.118/4.437 0.946/3.167 0.562/3.041 0.772/3.203 70/30 1.166/5.211 0.874/4.599 0.573/3.176 0.634/3.142 80/20 0.747/4.262 0.820/3.567 0.791/3.391 0.850/3.581 𝐾𝑃 𝐼∞(min/max) min 𝐹2(𝛥) Samples 1 2 3 4 𝑝𝑐/𝑝𝑚𝑢𝑡 30/70 0.368/1.703 0.175/1.100 0.302/2.256 0.285/1.079 40/60 0.223/1.419 0.291/1.738 0.227/1.053 0.243/0.968 50/50 0.328/1.412 0.226/1.449 0.244/1.696 0.295/0.995 60/40 0.376/1.796 0.354/1.152 0.224/1.269 0.298/0.980 70/30 0.422/1.743 0.346/1.639 0.238/1.018 0.309/1.289 80/20 0.335/1.710 0.274/1.729 0.261/1.351 0.291/1.151 𝐾𝑃 𝐼2(min/max) min 𝐹∞(𝛥) Samples 1 2 3 4 𝑝𝑐/𝑝𝑚𝑢𝑡 30/70 1.365/5.547 0.980/4.826 1.305/4.700 1.060/4.839 40/60 0.793/5.195 1.066/5.901 0.838/4.129 0.786/4.753 50/50 0.913/4.587 0.867/4.616 0.995/4.391 1.057/5.076 60/40 1.438/5.470 1.223/5.718 0.926/4.082 1.058/4.430 70/30 0.856/5.442 1.100/4.348 0.991/5.064 0.823/4.810 80/20 1.556/5.279 2.339/5.796 0.867/4.590 0.944/4.658 𝐾𝑃 𝐼∞(min/max) min 𝐹∞(𝛥) Samples 1 2 3 4 𝑝𝑐/𝑝𝑚𝑢𝑡 30/70 0.467/1.543 0.296/1.357 0.437/1.577 0.338/1.296 40/60 0.303/1.774 0.327/1.646 0.298/1.198 0.242/1.396 50/50 0.326/1.374 0.323/1.445 0.298/1.219 0.417/1.571 60/40 0.449/1.654 0.371/1.646 0.324/1.602 0.301/1.260 70/30 0.266/1.815 0.409/1.685 0.372/1.742 0.324/1.454 80/20 0.509/1.736 0.754/1.845 0.308/1.305 0.342/1.395 reached by the KPIs. Note that these probabilities are the same as those chosen in the noiseless scenario. The minimum average voltage errors achieved are lower than 0.599 V and in the worst solution the results are lower than 1.256 V. Finally, the network model is constructed by choosing the one with the lowest fitness value 𝐹2(𝛥)for 4 samples and 𝑃𝑐𝑥 = 40% and 𝑃𝑚𝑢𝑡 = 60%, i.e. 4.38 as can be appreciated in Fig. 9. Note that it is not possible to know in a real implementation if that minimum fitness corresponds to the network model that will present the minimum value for the defined KPIs. For instance, for this individual with minimum 𝐹2(𝛥)a 𝐾𝑃 𝐼2= 1.779 and 𝐾𝑃 𝐼∞= 0.656 are obtained. Fig. 11 represents the model voltage errors for each of the considered samples. As can be seen, the errors in voltages are lower than 0.7 V, that is, similar to the standard deviation of the measurement error, which makes it negligible compared to the former. Finally, it is important to highlight that the results obtained could be even better if the algorithm was provided with additional information that is accessible to the distribution company. For example, the section of a conductor in a tertiary feeder is usually smaller than that of a secondary feeder. This factor could restrict the number of possible conductor combinations in certain segments of the electrical network, making it easier for the algorithm to provide a proper model. 4.4.3. Electrical indicators This section compares certain electrical indicators of the developed model and the baseline network. Specifically, the maximum voltage and current deviations considered and the total losses. To do that, we Engineering Applications of Articial Intelligence 137 (2024) 109184 9