Multiagent based fault localisation and service restoration in Tanzanian secondary distribution network

Abstract Fault Localisation and Service Restoration (FLSR) is a fundamental function during the distribution system’s fault management process for improved service reliability and resilience. In Tanzania, fault management in the Secondary Distribution Network (SDN) is accomplished manually through customer calls and manual-line inspections. Service restoration’s decision relies on prior experiences, rated capacity of transformers and peak hour demand, causing prolonged service restoration and load shedding. Approaches devised to solve the FLSR problem include centralised and distributed ones. The study aimed at designing and developing a distributed algorithm based on the Multiagent System (MAS) for FLSR in SDN. Data from the Tanzanian utility company, including load demand, distribution network topology, and emergency reports, enabled the development of the MAS for FLSR. An intensive literature review has also been conducted. Five agents, namely Control Agent, Grid Agent, Load Agent, Renewable Distributed Generation Agent and Switch Agent have been developed to support the FLSR process. The agents facilitated decision-making by locating faults and perform a restoration process through load transfer to the nearby transformer and shedding loads. Consideration of the stochastic nature of load demand through using the LSTM model maximised the restored load. Future work will focus on deploying and testing the developed algorithm on a real power system.


PUBLIC INTEREST STATEMENT
Fault Localisation and Service Restoration in electrical secondary distribution network after the occurrence of fault need to be accomplished as soon as possible to reduce unexpected losses to customers and utilities. Distribution systems are evolving towards self-healing systems that can quickly recognise and restore power to customers. The unpredictability of load contributes significantly to the increased uncertainty in the distribution systems during the service restoration process. The availability of insufficient supply also causes overloading and voltage instability. Both centralised and distributed approaches were devised to solve the restoration problem. Distributed approaches based on multiagent technologies have emerged as a vital tool in controlling complex networks. This work developed a distributed control algorithm for fault localisation and service restoration in distribution networks considering the variable nature of load demand and optimal load shedding for improved reliability in the electrical secondary distribution network.

Introduction
Electricity will continue to be a significant engine and play a vital role in global economic growth (Zhao & Mutale, 2016). Maintaining electric power reliability is among the main challenge facing the electric utility company. The efficient Fault Localisation and Service Restoration (FLSR) mechanism helps to a great extent to improve electrical reliability (Kumar et al., 2006). FLSR mechanisms as part of fault management involve techniques used to find the location where a fault has occurred and then determine strategies for returning power to unserved customers. In Tanzania, fault management in the Secondary Distribution Network (SDN) is accomplished manually in which faults locating and restoration of power is accomplished through customer calls, prior experiences, rated capacity of transformers and peak hour demand (Andegelile et al., 2019;Joseph & Mvungi, 2014;Mnyanghwalo et al., 2018). Significant effort has been put in by the utility company to enhance fault monitoring in the distribution network, especially on the primary side, where faults can be detected and services restored with limited or no human interaction. However, in SDN, the automation is minimal as there is only Automatic Meter Reading (AMR) at the distribution transformers for facilitating billing and data analytics on power consumption. More effort is required to realise smart grid features in this part of the network.
Incorporating smart grids in power distribution systems to ensure electrical power service reliability includes integrating energy management programs and renewable distribution networks in the SDN and enhancing FLSR (Qiao & Yang, 2016). Improvement of service reliability efforts can be achieved if the overall network topology can be changed to support network reconfiguration during service restoration. This requires a well-planned communication infrastructure, equipment for monitoring and controlling, and efficient decision-making algorithms .
Centralised approaches are used to perform FLSR in electrical distribution networks for improved service reliability (Chidanandappa et al., 2016;Kumar et al., 2006;Watanabe et al., 2006). However, distributed approaches are better in terms of communication overhead and robustness (Raju et al., 2017). This study takes advantage of advancements in information and communication technologies and improved processing capabilities of computing devices (Mwifunyi et al., 2019) to that perform FLSR in a distributed manner. Distributed control approaches use a Multiagent System (MAS), a collection of autonomous computational entities (agents), which can be effective in broad applications performing tasks based on goals in an environment that can be difficult to be defined analytically (Habib et al., 2017). MAS-based fault localisation was studied by J. Ghorbani et al. (2013); M. J. Ghorbani, Mohammadi, et al. (2014);and Thejas et al. (2014) and service restoration using MAS was studied by Li et al. (2012); Shirazi & Jadid (2019); and Tsai and Pan (2011). An increasing need for self-healing systems increases the need for fault locating and service restoration operations to be performed jointly.
The stochastic nature of load demand substantially impacts the FLSR plan, leading to further blackout after restoration (Salim et al., 2009;Zidan & El-Saadany, 2013). Load management through load shedding and curtailment is crucial to the future smart grid for increased adaptability if capacity is insufficient (AlOwaifeer et al., 2015). It is challenging to determine the load to shed or curtail when loads change dynamically (M. J. Ghorbani, Choudhry et al., 2014). Little attention has been paid to integrate forecasting demand models and load management in distributed control approach for FLSR. A distributed algorithm for performing FLSR was proposed by Chouhan et al. Different techniques have also been employed in consideration of the stochastic nature of load demand during service restoration like ARIMA (Sharma et al., 2018), fuzzy (M. J. Ghorbani, Choudhry et al., 2014), fixed load profile (Zidan & El-saadany, 2012) and least square boosting (Avila et al., 2015). To the best of the authors' knowledge, limited studies have been conducted in service restoration problems integrating advanced deep learning models with reasonable accuracy in forecasting load demand data with non-linear characteristics and optimal load shedding mechanisms in the distributed algorithm. This paper focuses on making FLSR operational by developing a distributed algorithm for locating the fault and performing optimal service restoration in the complex SDN with many interconnections. The paper's main contribution is to extend the reliability optimisation problem on service restoration with load balancing through optimal load shedding while considering the stochastic nature of load demand using distributed approach and deep learning forecasting model. Tanzanian electrical secondary distribution network was used as the case study.
The rest of the paper is organised as follows: Section 2 presents the situation analysis of fault management in Tanzanian SDN, Section 3 describes the material and methods used in developing the distributed algorithm, section 4 presents results and discussion of the designed distributed algorithm, and section 5 concludes the paper.

Situational analysis of fault management in Tanzanian electrical SDN
The SDNs are invisible in the control centre as there is only Automated Meter Reading (AMR) at transformers for transferring data to central databases for analysis and billing purposes and fuses at some parts (Joseph & Mvungi, 2014). Fault management of SDN thus relies on customers calls and line inspections, and patrols by field crews. Figure 1 represents different types of faults that mainly occur in the distribution network and their occurrence frequency. The common causes for faults/outages are earth fault, load shedding and overcurrent. The proposed fault localisation and service restoration mechanism minimises the impact of such faults on the customers. Analysis of the time taken to repair different fault types to estimate the required restoration time for determining the available capacity and forecasted load demand was made. It was observed that the fault repair process takes 1 hour to 5 hours, or even up to 24 h, depending on the severity of the problem, as seen in Figure 2. Results from Figure 2 helped in determining the lookahead time steps for the load demand forecasting model, which was set at 24 future values. Therefore, the forecasting model used in this study can forecast load demand up to 24 future values. Comparison between the planned and unplanned power outages and their respective repair time has also been conducted, as seen in Figure 3. Many faults of about 93% are unplanned, and the observation justifies the need to minimise clearance time for these unplanned outages as they may take longer during tracing and finding appropriate restoration mechanisms.
The sample load profile of Tanzanian electrical SDN is shown in Figure 4, it changes with the time of the day and frequently increases as new customers or new electrical equipment is connected at the customers' side. Therefore, relying on the pre-configured information during service restoration is no longer valid for the continuously growing electrical network. Thus, service restoration based on rated capacity values cannot prevent the loss of essential loads like hospitals and schools. Therefore, this paper proposes a capacity-based distributed fault localisation and service restoration algorithm considering the uncertain nature of load demand.

Materials and methods
This study used the document analysis method to determine existing mechanisms for the FLSR, and Tanzanian utility company systems on gathering load demand data, distribution network topology data, and emergency report data. Experiments were used during the designing, implementation and evaluation of the algorithms and models. Fault locating and restoration decisions are achieved through distributed agents' negotiation. An optimisation mechanism has been employed to facilitate optimal load shedding if the available power is not sufficient. The problem formulation for decision-making during service restoration, distributed control algorithm  implementation strategies, fault localisation algorithm, and load forecasting modelling have been explained in the following subsections.

Problem formulation
The service restoration problem in the power distribution system is a multi-objective, multiconstraint and non-linear optimisation problem. Service reliability is a key objective that can be achieved by maximising the number of restored customers (Ibrahim et al., 2018;Xu et al., 2017) and minimising the cost associated with load shedding (Kleinberg et al., 2011). In addition, voltage limits and available power capacity for the load transfer constraints need to be respected. In addition, the cost associated with load shedding and its relationship with the amount of load demand, the priority of load for high and low priority customers has been taken into account. Due to the nature of the service restoration problem, a discrete decision variable representing the load status at each bus has been used.

(a) Objective Functions
The objective functions considered in this study are as follows: 3.0.1.1. Maximising the restored loads based on their priorities. The Maximum Restored Loads (MRL) is given by Eq. (1).
where L i is the load at bus i, y i : status of the load at the bus i (1: restored and 0: not restored),p i : priority level of the load at bus iand N: total number of buses.
3.0.1.2. Minimising cost (C) associated with load shedding. The cost associated with load shedding is directly related to the load shed and the criticality of the shedding load. The minimising cost associated with load shedding is given by Eq. (2).
where C LS i is the cost of shedding load at bus i and LS i is the amount of load to be shed at bus i.
(a) Constraints Changing the network topology during service restoration results in new bus voltages, branch current and power loss. For satisfactory system operation, the following constraints have been considered during service restoration: 3.0.1.3. Bus voltage levels should be within the acceptable limit as expressed by Eq. (3) .
where V i is the voltage at a bus i, V min : minimum acceptable bus voltage (0.9 p.u) and V max : maximum acceptable bus voltage (1.1 p.u).
3.0.1.4. The backup feeder transfer capacity limit. The power of the load to be supplied by the backup feeder must not exceed the available capacity of the feeder as expressed by Eq. (4).
where P available is the available power.
3.0.1.5. The radial structure of the network should be maintained. The radial nature of the distribution network should be retained during the service restoration process. The optimisation is performed by the control agent in case of insufficient power supply or violation of operation constraints after the restoration decision. The optimisation starts by receiving the distribution network parameters, including forecasted load data, available feeder capacity, and optimisation algorithm parameters. The decision-making in the optimisation algorithm relies on evaluating the obtained solution using the fitness function value obtained from the objective functions. The optimisation problem has been modelled as a minimisation problem in which the MRL was converted into minimisation of the unrestored load and combined with minimisation of the cost associated with load shedding. The multiobjective optimisation problem was solved as a weighted sum objective function; the maximisation of restored customers is equivalent to minimisation of unrestored customers was assigned a weight w1 of 0.7 due to its importance while minimising the load shedding cost assigned a weight w2 of 0.3. Utility company preferences have been used during weight assignment. The fitness function for the objective functions given by Eq. (1) and Eq. (2) is expressed by Eq. (5). The best solution with the lowest fitness function value is selected if it does not violate any constraint. Voltage limits with a range of 0.9 p.u and 1.1 p.u based on Tanzania utility operation, power supply limit and radial structure maintenance have been considered as operation constraints. Constraint's violation is tested through a power flow analysis using the direct load flow method. An estimate of the cost associated with load shedding for different loads was used as the load shedding costs were not available in which higher priority loads were given higher cost compared to lower priority loads. V-shaped (hyperbolic tan) Binary Particle Swarm Optimization (BPSO) was used as the optimisation algorithm.

Distributed control
Distributed control algorithms for FLSR were developed using MAS having five agents for FLSR process; the Control Agent (CA), Grid Agent (GA), Load Agent (LA), Renewable Distributed Generation Agent (RDGA), and Switch Agent (SA). A Control Agent is the controller for decisionmaking based on optimisation, agents' negotiation, power flow analysis and fault localisation. The grid agent is responsible for providing available capacity for the estimated fault duration. It acts as a control agent if faults reside in its domain. The load agent sends power supply requests and forecasted demand to the control agent after the occurrence of a fault. RDGA provides information on the available output power to support the service restoration after the occurrence of a fault. The Switch agents are responsible for performing switching operations. The proposed architecture for the MAS for FLSR is presented in Figure 5.

Agents based algorithm implementation strategies
The distributed software for realising the distributed control in FLSR has been implemented using the Java agent development framework (JADE). CA, GA, LA, RDGA, and SA have also been implemented in JADE and its Graphical User Interface (GUI) presented in Figure 6. JADE was chosen due to its compliance with Foundation of Intelligent Physical Agents (FIPA) specifications and its suitability in both development and deployment of power system analysis is also conducted using JADE using the Direct Load Flow (DLF) method. The distribution network used for power flow analysis was also modelled in the JADE environment. Integrating the electrical distribution network model and distributed algorithms for decision-making results in a comprehensive algorithm for realising the distributed computation in power system smart grid applications (Shum et al., 2018). There is no need for interfacing and synchronising between the two models as both MAS and the power system model were implemented in JADE. The MAS and power system model can work in real-time, which provided a simpler and more accurate simulation model. Figure 7. Decision-making in MAS used both available capacities from backup feeders and load demand. If the available capacity is higher than the demand, only power flow analysis is performed to confirm the operational constraints, and then switching operation. If the available capacity is below the demand, the control agent executes an optimisation algorithm for optimal load shedding, followed by power flow analysis for constraints' violation confirmation.

The flow chart for agent negotiation with the flow of information during FLSR is presented in
. A sample agents' coordination during FLSR is presented in Figure 8. Sniffer Agent, a JADE platform for tracking message exchange between agents, has been used to show agent coordination.

Case study
The study was conducted in the Tanzania Distribution network, in which three transformers have been selected as the case study. The selected transformers are the BBQ village, Kimweri Avenue and Abiudi Street, as seen in Figure 9. The BBQ Village has 79 buses, Abiudi street has 25 buses, and Kimweri Avenue has 20 buses; the buses for BBQ village has been shown in Figure 9. The grid agent is allocated at each distribution transformer, and once affected by the fault; it acts as the control agent. The grid agent at the BBQ village transformer was used as a control agent, and the other two as grid agents to provide backup power during service restoration. The stochastic nature of load was considered using the developed load demand forecasting models based on the dataset extracted from the AMR meter at the BBQ village transformer. The BBQ village transformer has data measurements only at distribution transformers; load data to other network parts were obtained using available peak demand for all BBQ Village SS2 network nodes (Kawambwa et al., 2021) and distribution transformer meter readings. During the generation of load demand data, it has further been assumed that the buses follow the same load profile trend as the distribution transformer. Line data for the selected transformers were also acquired for power flow calculation during service restoration. Priority levels for all nodes in the case study networks have also been assigned to support load shedding operations.
The service restoration process requires switches to be installed along the network starting from the distribution transformers. The existing secondary distribution network is equipped with only protective fuses at the distribution network; this study proposes the placement of normally closed switches along with the network and normally open switches at the interconnection of two networks to support the load transfer process. The criteria for determining the number of switches and their location include the first branch of the distribution transformer, the number of customers connected, the span of the network, and a point of interconnection with nearby networks from other distribution transformers. Based on the selected criteria, eleven switches containing four tie switches and seven normally closed switches are optimal for supporting self-healing in the pilot secondary distribution network, as seen in Figure 9.

Fault localisation algorithm
In this study, fault localisation was accomplished by finding the fault section. The fault localisation algorithm use sensors installed in the SDN to determine where the fault has occurred using the distributed approach in which different agents cooperate. Sensors with fault detection capability distributed within the network can detect the faults, and their measurements are used to find the fault location. Load agents use information extracted from sensor data. In this study, power flow results were used as the sensor data for agents' decision-making instead of measurements from the real network. The fault localisation starts at the control agent after receiving fault information from load agents or change of status of the distribution control unit located at the distribution transformer if it is faulty. If the control agent receives fault information from one of its agents, the load agents are requested to send their status to map the fault area. Upon receiving the request, the load agents send their status to the control agent through an informed message. The control agent determines which area/section is faulty. It then sends the request message to the switch agent, asking it to open its boundary switch.

Load demand forecasting model during service restoration
The load demand forecasting model used in this study has been developed in our previous study (Mwifunyi et al., 2020). Long Short-Term Memory (LSTM) showed good performance with an accuracy of 96.4% as compared to Recurrent Neural Network and Gated Neural Network and hence used in this study during service restoration. In Mwifunyi et al. (2020), the focus was developing a forecasting model to be used during SR; in this study, the real application of the developed model has been realised and used in the distributed algorithm for FLSR. After the fault, the model is executed, in which the previous 48 load demand values were used as input based on the time of fault occurrence. The historical datasets were used to generate the previous 48 values and used in the forecasting model during service restoration as the model was not deployed in a real power system with real-time load demand measurements.

Results and discussion
This study focused on the development of distributed algorithms for fault localisation and service restoration. The algorithm can successfully locate the faults and then find the optimal restoration mechanism through agent negotiation.

Fault localisation
The Fault localisation algorithm has been implemented in JADE and then extended to perform visualisation using the GUI interface. The algorithm can locate the fault and then display the affected part using red colour, as seen in Figure 10. After fault localisation, the service restoration was conducted.

Service restoration
Service restoration has been conducted in two ways based on the network state. Network reconfiguration was the first option if the nearby transformer can serve the load under fault. The second option is optimal load shedding if the available capacity is insufficient to serve the load demand. Optimal load shedding is ensured by shedding low priority loads while maximising the restored demand and minimising the cost of shedding loads.
Analysis was initially conducted to choose an efficient approach for optimal load shedding based on comparing S-shaped (Sigmoid) and V-shaped (hyperbolic tan) BPSO and Binary Grey Wolf Optimization (BGWO), and results are presented in Table 1. S-shaped and V-shaped transfer functions are used in the transformation of continuous algorithms to binary versions. V-shaped BPSO showed promising results compared to the BGWO in terms of response time and increased number of restored customers. Therefore, a V-shaped BPSO optimisation algorithm was selected and implemented in the JADE to perform optimal load shedding.
The operation and effectiveness of the proposed algorithm were demonstrated using two scenarios, in which the first scenario was the case with fixed load demand, and the second scenario was the case with variable demand. In both scenarios, optimal load shedding was conducted in case of insufficient supply. Variable load demand was accomplished using the LSTM model developed in our previous study (Mwifunyi et al., 2020). The first scenario has been conducted in which a fault happened at the BBQ Village at 1200 h between bus 30 and 31; S31-33  and S1-17 were opened, and the agent negotiation between BBQ Village and Abiudi street GAs resulted in the closing of the tie switch TS_45.
However, the decision resulted in voltage violation in some buses from 0.934 to 0.867, as seen in Figure 11. Optimal load shedding has been performed using the V-shaped BPSO to improve voltage level, and the results are also presented in Figure 11. Optimal load shedding leads to an improved voltage profile from 0.867 to 0.901 p.u by removing the low-priority customers.
In the first scenario, the BBQ Village was also overloaded due to the addition of load demand in some buses. The agent negotiation was unsuccessful as no grid had excess power to serve the BBQ Village needed demand. Optimal load shedding was then conducted using V-BPSO, and a significant improvement of voltage profile from 0.846 p.u to 0.900 p.u was attained, as seen in Figure 12 and Figure 13. In Figure 13, about 31.64% of all buses were shed and presented with red colour. All shedding buses have a low priority level.  In the second scenario, the same fault simulated for the first scenario happened at 1200 h. In this case, the agent negotiation shifted the load from BBQ Village to Abiudi Street without causing a voltage drop as the forecasted load demand was used instead. Results for the reconfigured networks are presented in Figure 14. Further analysis of the load shedding due to the use of forecasted demand and peak demand was considered. It was assumed that the fault occurred at 1900 h at BBQ village at the same point as previous scenarios. There were no voltage limit violations with forecasted demand, and all load was restored with a minimum voltage of 0.9037 p.u., as seen in Figure 15. The use of peak demand resulted in restored demand of 92.8% with a minimum voltage of 0.9003 p.u. Details on the load shedding for the use of forecasted demand and peak demand are presented in Table 2. Only low priority nodes are being shed, as seen in Table 3. These results have revealed that it is highly recommended to consider the stochastic nature of load demand due to reduced load shedding if faults occur during off-peak hours. The use of an optimal load shedding mechanism is also essential for ensuring only low priority loads are shed while maximising restored load in case of insufficient supply.

Conclusion
This paper discusses the proposed distributed algorithm for fault localisation and service restoration in secondary distribution networks. Five agents have been designed to support the fault localisation and service restoration process, and strategies for implementing the proposed algorithm have also been highlighted.
The design was illustrated through case studies. The effectiveness and validity of the design were demonstrated by applying it in a practical secondary distribution network. Promising results have been obtained from the proposed algorithm. The results revealed that considering the stochastic nature of load demand, reduced load shedding occurs if faults occur during offpeak hours. It has further been observed that optimal load shedding reduces the outage area by serving high-priority customers if the power supply is insufficient. The integration of renewable energy sources in the actual network during the implementation of the distributed algorithm for FLSR is omitted for future work. Future work will also focus on deploying and testing the developed algorithm on a real power system.