Coordinated Flexible Energy and Self-Healing Management According to the Multi-Agent System-Based Restoration Scheme in Active Distribution Network

This study presents the optimal model of the coordinated flexible energy and self-healing management (C-FE&SHM) in the active distribution network (ADN) including renewable energy sources (RESs), electric vehicles (EVs) and demand response program (DRP).The flexible energy management (FEM) is extracted using coordination between the RESs, EVs and DRP. The self-healing method (SHM) is related to multi-agent system-based restoration process (MAS-based RP) that is obtained the optimal restoration pattern at the fault condition according to the different zone agents (ZAs) distributing along with the network. This method minimizes the difference between energy cost and flexibility benefit related to the FEM part and difference between the number of switching operation and priority loads restored based on the SHM part. Also, this problem subjects to power flow equations, RESs and active loads constraints, restoration process formulation and system operation limits. Stochastic programming is used to model the uncertainty of loads, energy prices, RESs and EVs. Hereupon, the suggested strategy is implemented on the 33-bus radial distribution network and it is solved by the crow search algorithm (CSA). Ultimately, the obtained results imply the high flexibility and security of the operation, incorporating the proposed strategy, and delineate the optimal restoration scheme for the ADN.


Introduction
Today, the penetration rate of renewable energy sources (RESs) is increased in the power system, because, it includes low operation cost and provide clean energy (green energy). But, it is noted that the RESs have high uncertainty; hence, the system flexibility is reduced at this condition [1][2]. Flexibility is defined as "the modification of generation injection and/or consumption patterns in reaction to an external price or activation signal in order to provide a service within the electrical system" [3]. Moreover, the connection of a high number of RESs in the electrical network is caused that the system operational indices are placed in an inappropriate situation. In other words, the voltage magnitude and power loss will be increased, and the overloading of power lines will be occurred in this condition due to high injection power by RESs [4][5]. Therefore, the advantage of the flexible energy management (FEM) approach can be appeared in these cases, where it manages the electrical energy between RESs and flexible sources (FSs), i.e., demand response program (DRP) [6], energy storage system (ESS) [7], non-RES and conventional generation units [8] to obtain the high flexibility, reliability, security, and stability with low operation cost in the power system or active distribution network (ADN) [9][10][11].
To reduce the environmental concerns due to the mismanagement of fossil fuel in cars, a high number of electric vehicles (EVs) have been entered the worldwide car market in recent years [12]. Generally, the EVs are connected to the distribution network to provide their required energy during the trip [13], and also they can be connected to this network by the on-board unidirectional charger at peak load time, i.e., 17:00 to 22:00, to charge their battery [14]. Hence, the voltage drop [15][16] and power losses [17][18] are increased, and overloading occurs [19] in the network lines at the case of high EVs penetration rate. To cope with this issue, the vehicle-to-grid (V2G) technology [20][21] and energy management strategy [22][23][24] can be used which they can remove the negative impacts of EVs energy mismanagement in the power system. For this condition, EVs are equipped to the bidirectional charger; thus, each EV can control the injection/receiving active and reactive power to/from distribution network [25][26]. Besides, the new capabilities are defined for EV or EVs parking lot [27][28][29][30][31]. In [27][28][29], power management is used for EVs to improve the network voltage profile and their financial benefits, respectively. Also, the capability of EVs was investigated in [30] to voltage stability of the ADN, and the [31] presented the EVs potential for reactive power management and harmonic compensation in the ADN. Moreover, the authors of [32] proposed that the EVs can be used as a storage system. Therefore, it is forecasted that the FEM method is able to flexibility, reliability, security, and stability management of ADN by EVs equipping to V2G technology based on the different researches in [25][26][27][28][29][30][31][32]. It is noted that based on the U.S. Department of Energy (DOE) report, the outage in the distribution network is more than 80% considering other parts of the power system [33]. Hereupon, distribution network restoration can aim at finding a healthy path for restoring the maximum possible out of service loads of a faulted feeder [34]. Different researches have investigated the restoration methods in this network. In [35], the heuristic algorithm-based decentralized strategy is used to obtain a fast and suitable restoration pattern. Also, the multi-agent system (MAS)-based restoration process, including different zone agents distributed along with the network, was represented in [36], where it is based on a decentralized restoration method; thus, it uses the expert system rules to find the restored path. The reported strategy of [36] is upgraded in [37] by using the artificial bee colony algorithm, and it was used in [38][39] in the presence of distributed generations (DGs). The decentralized MAS for distribution network restoration in the uncertainty environment was presented in [40]. Finally, the taxonomy of recent research works is expressed in Table 1. According to the literature review and Table 1, there are three main research gaps for the coordination between the flexible energy management and the self-healing method: -Based on the results of [25][26][27][28][29][30][31][32], EVs' battery storage system is an important flexible source due to its high responsible speed, and it acts as a local power source that can control the different network variables in consumption points to obtain high reliability, security, stability and flexibility in ADN. But, it is noted that this capability of EVs is not considered in different researches such as . -In the many types of research, the energy management and restoration process of ADN have been investigated, separately . In other words, the coordination of zone agents and RESs, as well as FSs with the distribution system operator (DSO), has not been considered such as works in . In contrast, this coordination can obtain the high advantage and optional to ADN from reliability, security, stability, flexibility, and operationally viewpoints. For example, it is forecasted that the load not supplied and the total number of switches operation at fault condition will be reduced if the restoration process is coordinated with FEM, in comparison with the cases including only the self-healing method. -Moreover, the restoration approach needs to calculate the network variables before fault occurrence, where research related to this approach such as [33][34][35][36][37][38][39][40] uses power flow analyses for this purpose. But, noted that the power flow method is not suitable for ADN that includes different sources and active loads; for this reason, it needs optimal operation formwork to obtain the network variables. Therefore, the restoration process in the ADN needs optimal power flow analysis.
To cope with the above issues, this paper presents the optimal formwork as Fig. 1 to model the coordinated flexible energy and self-healing management (C-FE&SH-M) in the ADN to obtain the high flexibility and security for this network and optimal restoration pattern at the fault condition. It is noted that the proposed ADN includes the RESs due to low operation cost and flexible sources (FSs), i.e., EVs and DRP, to manage the negative impacts due to the RES power uncertainty based on the proposed flexible energy management (FEM) approach. Moreover, one of the important factors in the ADN is the self-healing that is referred to the ability of ADN to restore themselves after permanent faults [41][42] automatically. Accordingly, the coordination between RESs and FSs is proposed in this paper to extract the optimal FEM, and MAS-based RP, including different ZAs along with the network, that is implemented on the ADN to obtain the suitable self-healing method (SHM). Therefore, the proposed strategy uses the coordination between all sources and ZAs with DSO to explain the optimization formulation that has minimized the objectives of FEM and SHM as a normalized objective function equation. In this equation, the FEM part minimizes the difference between energy cost and flexibility benefit, and the SHM part minimizes the difference between the number of switching operations and priority loads restored. Also, this optimization problem includes the ADN constraints and operation limits, RESs and FSs equations as well as restoration process formulation. Besides, the RES active power, energy price, active and reactive load, charge/discharge rate, and energy demand of EVs in the parking lot are uncertainty that is modeled by scenariobased stochastic programming (SBSP). The proposed SBSP is based on the Roulette Wheel Mechanism (RWM) and Kantorovich method related to scenario generation and reduction techniques. Noted that the proposed formulation is non-linear, where it solves with the crow search algorithm (CSA) to obtain a reliable and secure solution with low standard deviation and high calculation speed. Finally, the main contributions of this paper can be summarized as follows: -Modeling the coordinated flexible energy and selfhealing management strategy in the active distribution network to obtain the high flexibility, security, and reliability in fault or non-fault conditions. -Coordination between renewable energy and flexible sources and multi-agent system-based restoration approach with the distribution system operator to improve the restoration indexes such as load not supplied and the total number of switch numbers at fault conditions. -Achieving the reliable and secure solver with low standard deviation and high calculation speed in the proposed large-scale problem.
The rest of the paper is organized as follows: Section 2 formulates the proposed scheme of the C-FE&SH-M strategy in the ADN. Section 3 presents the solution method, and Section 4 demonstrates numerical simulations. Finally, the main conclusion and contributions of the proposed study are highlighted in Section 5.

Proposed problem formulation
This section presents the mathematical model of the proposed C-FE&SH-M that has minimized the energy cost and the number of switching operations and maximized the flexibility benefit and the amount of priority loads to be restored as a normalized function. Also, the problem constraints are AC power flow equations, EVs parking lot and DRP constraints, restoration process, and ADN limits.

Objective Function
The objective function in this section considers the FEM and SHM tasks in coordination between them and DSM as follows:

Flexible Energy Management in ADN:
The first term of equation (1) is applied for this part of the proposed problem, where it minimizes the difference between energy cost obtained from upstream network and flexibility benefit that is depended on flexibility incentive price (FIP) and flexible energy (FE). Therefore, it is forecasted that the optimal scheduling obtains for RESs and FSs according to low energy cost and high flexibility as well as suitable and allowed value for ADN operation variables, e.g., voltage and line flow [9][10][11].

Self-healing Method:
The second part of equation (1) refers to the SHM that is dependent on the operation of MAS-based RP uses in the fault conditions. This part refers to minimizing the difference between the number of switching operations and the amount of priority loads to be restored at these conditions. So, it is expected the optimal restoration path for ADN based on these objectives in fault conditions [42].
Finally, the proposed objective function is normalized using weight factors of 1 to 3 that are calculated based on the same variation range for all parts in this equation. In other words, with considering 1 = 1, 2 is equal to the difference between maximum and minimum values of the first part of (1) division to maximum and minimum values of the second part of (1), where this format is the same for calculation of 3. Moreover, to obtain the maximum and minimum values of the objective function terms, the proposed problem is solved in three stages, where it considers only one of the parts of the objective function in each stage [43].
(1)   (2) to (7) that expresses the stored energy of all EVs in parking lot, EVs energy at arrival and departure hours, charging and discharging data limits related to EVs batteries in parking lot, and logical constraint that prevents simultaneous operation between charging and discharging mode of EVs, respectively. Note, E arr /E dep is equal to the summation of the initial/final energy of each EV battery at arrival/departure hour, where the initial and final energy of the EVs are expressed as (1 -SOC)BC and BC, respectively. The terms of BC and SOC respectively represent the "EV battery capacity" and "state of charge", and SOC is formulated as L/AER, where L is the traveled distance by EV in electrical mode, and AER is "all electrical range" that refers to the total distance which EV can be driven in electric mode. In addition, CR/DR is the summation of each EV battery charge/discharge rate [31].

DRP Equations:
The incentive model of DRP is used in the proposed problem with constraints (8) and (9). Equation (8) presents the DRP power limitation, and (9) expresses that the total daily energy of DRP should be zero. Besides, the demand can be shifted from peak load time to off-peak load periods based on electrical energy prices. Because, the peak load time are the same with high energy price hours, and off-peak load period includes low energy price, generally. Moreover, the DRP benefit is defined in the energy cost formulation that is presented in (1), because, this equation considers the total power consumption of passive and active load as well as power loss of total network equipment. Therefore, the proposed DRP is sensitive to energy prices based on the first part of (1), and it can shift its consumption according to (8) and (9). Also, the term of  defines the co-participation rate of loads in DRP, where it changes between zero and one [44].

MAS-based RP:
In this method, each bus between two switches as Fig. 2 defines a zone agent (ZA) that is as follows based on its location to fault point [35]: -Faulted zone agent (FZA): This ZA is the decisionmaking agent that is used in the faulted zone.  Thus, the situation of all ZAs is determined according to fault location, and in the next step, each ZA plays its role based on restoration objectives and technical constraints. In the proposed method, FZA receives the information of DZAs load demand; thus, it sends this data to ZTA. In the next step, ZTA closes the switches B and C to provide the DZAs load according to HZA and ADN limitations, i.e., radial structure of ADN, (10), line capacity, (11), allowed voltage limit in fault and healthy feeders, (12) and (13), while FZA opens Z2 switches form fault feeder. It is noted that the corresponding current limit with voltage limit in healthy and fault feeder, Ivh, and Ivf, are used in the proposed MAS-based RP as constraints (12) and (13) 15) If the group restoration condition isn't possible, thus, multi ZTA connect to ADN based on limits (10)- (13) In equations (12) and (13), Vh and Vt refer to voltage magnitude of buses h and t based on Fig. 2. Also, impedance between distribution station and bus h is defined as Zh in (12), and Zf in (13) is expressed as |Zst + 0.5Zt|, where Zst and Zt respectively refer to impedance magnitude between distribution station and bus t and restoration section (tie-line) impedance based on Fig. 2. Finally, more details of MASbased on RP are presented in [35] that follows Algorithm 1.

Fig. 2. Restoration process based on MAS technique
Noted that according to Fig. 2, location between two switches is as zone agent. Thus, if there is a bus between two switches, this zone agent can be operated as FZA, DZA or HZA. However, if there is a tie line between two switches, it acts as ZTA. Therefore, for a network, where its total number buses is NB and its total tie lines is NTL, thus, total number of agents is NB+NTL-1. Also, it can be defined as Nsw/2, where Nsw is total number of switches.  (14) and (15) introduce the nodal active and reactive power balance, where the active and reactive power flow of distribution lines are calculated as (16) and (17), and the voltage angle should be zero in slack bus base on (18). It is noted that these equations are related to fault and non-fault conditions. In addition, the system operation limits, i.e., voltage magnitude, distribution line capacity and distribution station capacity, for before and after of fault conditions are expressed in (19) to (21).

Flexibility constraints:
In this paper, the flexible sources are DRP and EVs parking lot, where the upward and downward flexibility of DRP and EVs are calculated as (22) and (23), respectively [44]. Accordingly, the flexible power in scenario w is equal to the difference between FS power in scenario w and scenario with forecasted value for uncertain parameters. Hence, total flexible energy is daily summation of FS upward and downward flexibility as (24) [44].
, , , It should be said that the network operation in the presence of the different sources and active loads implemented by DSO, hence, this section of the problem (1)- (24) includes centralized method of energy management. Also, restoration part is based on MAS that is in accordance with distributed approach, but, all agents are coordinated by DSO. Therefore, this problem, (1)- (24), considers centralized and distributed approaches. Moreover, each agent only uses local information.

Uncertainty Model
In the proposed problem model, (1)- (24), the parameters of active and reactive load, P D and Q D , energy price, , RES active power, P R , charge/discharge rate and initial/final energy of EVs in parking lot, CR/DR and E arr /E dep , are as uncertainty parameters. Therefore, this paper applies scenario-based stochastic programming (SBSP) to model these uncertain parameters. In this approach, the roulette wheel mechanism (RWM) generates a large number of scenario samples for these parameters. Then, it calculates occurrence probability of P D , Q D and  by normal probability distribution function (PDF) [6], P R by Beta/Weibull PDF for solar/wind system [45], and EVs parameters by Rayleigh PDF [30]. In the following, probability of each generated scenario is equal to the product probability of all uncertain parameters. In the next step, the Kantorovich approach is used as the scenario reduction method to obtain scenarios with the higher probabilities, where the more details of this approach are expressed in [6].

Solution Method
It should be noted that the proposed formwork of C-FE&SH-M, (1)-(28) is as a non-linear problem; hence, this paper solves the proposed problem using the crow search algorithm (CSA) that is reliable and secure solver with high calculation speed and low standard deviation [46]. The more details of this algorithm are presented in [46], and its format follows Algorithm 2. Finally, the flowchart of the proposed solution for the C-FE&SH-M is expressed in Fig. 3.

Case Study
The proposed C-FE&SH-M strategy is applied on 1-MW and 12.66-kV ADN as 33-bus radial distribution network that plotted in Fig. 4 [44], where full and crimping lines in this figure show the distribution and tie lines, respectively. The line characteristics and load value at peak hours are presented in [45], and the load value at other hours is obtained using a daily load factor curve as Fig. 5 [45]. Moreover, the RESs in this study are a 300-kW wind system and 200-kW photovoltaic system, where their location is determined in Fig. 4, and the daily power percentage curve of these sources are based on Fig. 5 [45]. Also, the daily energy price curve is shown in Fig. 6, and the minimum and maximum voltage are 0.9 and 1.05 p.u, respectively. In addition, this study is considered that buses 2-33 include EVs parking lot, where their capacities according to Fig. 7, are 21, 30 and 60 EVs based on peak active load range of (0, 100 kW], (100-kW, 200-kW] and (200-kW, +), respectively. Also, the EVs number into ADN at each hour is plotted in Fig. 8 [43], and EV characterizes such as, efficiency, SOC, BC, etc. are expressed in [31]. Moreover, the co-participation rate of loads () in proposed DRP, (8) and (9), is considered to be 0.3. Also, it is noted that each bus, i.e., buses 2-33, is a zone agent which is located between two switches. The left/right side switch of bus b is defined as SWb l /SWb r , and the switch of sending/receiving bus side of the tie line between buses b and j shows Evaluate the decision variables, x ch , x dch , P ch , P dch , P DR using CSA Check the constraints (2)-(4), (7) and (9) Evaluate the ADN variables according to AC power flow constraints, (14)-(18) that is solved by forward-backward method [42] Check the constraints (19)

Results
The proposed C-FE&SH-M problem is simulated in MATLAB software, and it is solved by CSA solver [46]. The parameters of this solver such as N, imax, ap, and fl are 50, 1000, 0.1, and 2, respectively. Also, the forwardbackward method is used to solve the AC power flow equations, (14)-(21) [45].  Table 2 expresses the economic and technical indexes of the proposed FEM strategy. Accordingly, Case III includes the low operation cost or energy cost receiving from the upstream network and daily energy loss with respect to other cases due to injection power of RESs into ADN and shifted the power of loads from peak hours to off-peak time based on the DRP strategy, (8) and (9). The discharging energy level of EVs is less than the EVs charging energy level, because, the high/low level of EVs charging energy is used to EVs trip/discharging mode. Therefore, the operation cost and energy loss in Case V is greater than Case III. However, it is able to obtain high flexibility and low maximum voltage deviation or drop in comparison with other cases due to scheduling management of FSs, where this statement can explain one of the important advantages of the proposed FEM strategy. Also, the daily optimal scheduling power of ADN, RESs, DRP, and EVs parking lot are shown in Fig. 9. Based on Fig. 9(a), the daily apparent power curve of ADN station shifts downward in cases II-V with respect to Case I at the period of 1:00-24:00, 5:00-22:00, 8:00-24:00 and 8:00-22:00, respectively due to RESs and FSs injection active power into the network based on Figs. 9(b)-9(d). But, this curve shifts upward in cases III-V at the period of 1:00-3:00 and 23:00-24:00, 1:00-7:00, and 1:00-7:00 and 23:00-24:00, respectively. Because, the FSs charging at these periods are based on Figs. 9(c) and 9(d) to obtain a low operation cost. Moreover, it is noted that according to Fig. 9(d), EVs are charged at period 1:00-7:00 to provide the required consumption energy of EVs in the trip, but they are charged/discharged at period 13:00-16:00/19:00-22:00 to operate as a storage system and obtain the revenue for EVs.  Table 3 presents the advantages of the proposed FEM strategy for EVs and loads owners. Based on this table, the total charging cost of EVs is 202.6 $, while EVs revenue is 68.6 $ (41 + 27.6) due to flexibility service and their injection power into the network. Therefore, the net payment of EVs owners to ADN is 134 $ that reduced 33.86% considering their charging cost. For loads owners, total consumption energy cost is 1391.6 $, but net payment of loads owners is 1273.43 $ due to participation of loads in the proposed DRP that can be obtained 118.17 $ revenue for loads in the flexibility and auxiliary services.
In addition, Fig. 10 shows the changing of economic indices, i.e., operation cost and flexibility benefit, based on the variation of FIP. Accordingly, the operation cost and flexibility benefit are increased with increasing in FIP. This statement expresses that the high flexibility is obtained at a high cost.  Table 4; accordingly, the suitable tie line for fault location in bus 20 and hour 16:00 is the line between buses 8 and 9. Hence, the total number of switch operations for this condition is 8, and the load not supplied is equal to zero in two proposed strategies. But, three tie lines (9,15), (22,12) and (33,18) needed for fault condition in bus 11 at hour 20:00; hence, the switch operation number and load not supplied are 24 and 19.31 kVA based on this table in the SHM strategy that considered ADN without RESs and FSs. However, in the C-FE&SH-M strategy, the tie line (22,12) is selected; thus, the number of switch operations is 8, and also, load not supplied is zero due to injection power into the network by RESs and FSs at hour 20:00 based on Fig. 9. This statement explains one of the important benefits of the proposed C-FE&SH-M strategy, and this benefit refers to the first and second contributions of this paper in Section 1.

Capability of CSA solver:
This section presents the CSA solver capabilities in comparison with the conventional genetic algorithm (GA) [47] and particle swarm optimization (PSO) [48], where the statistical results are expressed in Table 5. For all three algorithms, the population and the number of iterations are 50 and 1000, respectively. Accordingly, the CSA solver includes low standard devotion; the mean, median, and mode values of fitness are almost the same, and the changing range of the objective function (maximum value -minimum value) is closed zero for the proposed problem. Also, CSA solver can be obtained optimal solution in the low Convergence Iteration and low calculation time compared to PSO and GA based on rows 8 and 9. Therefore, the proposed algorithm is suitable and reliable to solve the proposed C-FE&SH-M strategy.

Conclusions
The optimal formwork of the C-FE&SH-M in the ADN, including the RESs and FSs, i.e., EVs and DRP, was expressed in this paper. This strategy coordinated two smart concepts of FEM and SHM in the distribution network with DSO, where the FEM has obtained the optimal scheduling for renewable and flexible sources based on coordination outline, and SHM defined the optimal restoration pattern at fault condition based on MAS-based RP. Therefore, this Strategy has minimized the difference between energy cost and flexibility benefit related to the FEM part and difference between the number of switching operations and priority loads restored based on the SHM part as a normalized objective function subject to ADN equations and limitations, RESs, FSs, and MAS-based RP constraints. Furthermore, the SBSP modeled the uncertainty of load, RES power, EVs parameters, and energy price in the proposed strategy. Based on the numerical results, the CSA could be a secure and reliable solver with low standard devotion (1.05%) to solve the proposed problem, and the C-FE&SH-M strategy was able to provide benefit to EVs and loads owners as well as ADN from economic and technical viewpoints. So that the FEM mechanism is reduced the operation cost, energy loss, and maximum voltage deviation about 16.5%, 19.1%, and 41.3%, respectively, according to the load analysis case. Moreover, the FEM is able to reduce the EVs charging cost about 33.7% compared to the case where the FEM approach is not applied. Also, using DRP the load cost can be decreased by creating revenue due to flexibility regulation and load shifting. In the proposed SHM the load not supplied can be zero with low number of switching operations. Therefore, the high flexibility, security, reliability as well as optimal restoration pattern were obtained in the ADN according to the proposed strategy.
Noted that the availability of the different agent is uncertainty, hence, it is needed to investigate outage of the proposed agents based on N -1 contingency method to obtain reliable solution. Therefore, this case is proposed as future works. Also, the approach of this paper is coordinated the DSO and MAS, thus, it is expected that number of agents can be reduces. Hence, this research is investigated in future works. In addition, the restoration part models MAS operation based on expert system rules. But restoration part can be also modeled by defining different formulation, where this case is considered the future works.