Enhancing Integrated Energy Distribution System Resilience through a Hierarchical Management Strategy in District Multi-Energy Systems

: The requirement for energy sustainability drives the development of integrated energy distribution systems (IEDSs). In this paper, considering the coordination of district multi-energy systems (DMESs), a hierarchical management strategy is proposed to enhance IEDS resilience. The proposed strategy is divided into three modes: the normal operation mode, the preventive operation mode and the resilient operation mode. In the normal operation mode, the objective of DEMSs is to minimize the operation costs. In the preventive operation mode, the objective of DEMSs is to maximize the stored energy for mitigating outage. The resilient operation mode consists of two stages. DMESs schedule their available resources and broadcast excess generation capacities or unserved loads to neighboring DMESs through the cyber communication network in the ﬁrst stage. In the second stage, DMESs interchange electricity and natural gas with each other through the physical common bus for global optimization. A consensus algorithm was applied to determine the allocated proportions of exported or imported electricity and natural gas for each DMES in a distributed way. An IEDS including ﬁve DMESs was used as a test system. The results of the case studies demonstrate the e ﬀ ectiveness of the proposed hierarchical management strategy and algorithm.


Introduction
With the development of integrated energy distribution system (IEDSs) [1,2], the interaction among electricity distribution systems, natural gas distribution systems and district heating systems is increasingly intensified by the continuing penetration of gas-fired combined heat and power (CHP) units [3]. Moreover, based on the energy hub (EH) concept [4], district multi-energy systems (DMESs) consisting of micro-grids (MGs) and district gas-heating networks can coordinately schedule the interrelated electricity, natural gas and heat. However, frequent natural disasters have been causing severe threats to the security of IEDSs. For example, in 2012, after Hurricane Sandy hit the eastern shore of the United States, approximately 7.5 million customers were reportedly without power [5] and the cost of outages estimated ranged from $27 billion to $52 billion [6]. In this regard, it is necessary to develop methods to enhance IEDS resilience. Furthermore, IEDS resilience and sustainability are closely related [7].
However, compared with IEDS resilience, many studies have been made in the literature on power system resilience [8][9][10][11][12][13][14][15]. Power system resilience can be defined as the ability to anticipate, withstand, absorb and recover rapidly from disruptions caused by extreme natural catastrophes such as earthquakes, hurricanes and flooding [16].
(1) This paper co-optimizes the electricity, natural gas and thermal energy for three operation modes in DMES, which promotes the comprehensive and efficient utilization of different energy in normal and destroyed situations. (2) The hierarchical management strategy in DMES is proposed, which has enhancement for IEDS resilience to withstand the extreme events, such as natural disaster. (3) The consensus algorithm is applied to obtain the most suitable energy exchange with the least visible information on DMESs, which can not only calculate the allocated proportions accurately in a distributed way but also protect the privacy of DMESs effectively.
The rest of this paper is organized as follows. The concept of the networked DMESs is introduced and the general framework of the hierarchical management strategy is discussed in Section 2. Section 3 proposes mathematical formulations of the optimal normal, preventive and resilient operation and develops a consensus algorithm to solve this problem in a distributed way. In Section 4, numerical results are provided to validate the proposed strategy. Finally, Section 5 concludes the paper.

Networked District Multi-Energy Systems
The DMESs, consisting of MGs and district gas-heating networks, are small-scale integrated energy systems covering small geographical areas with DGs, energy storages (ESs), energy coupling devices and various energy loads, which are shown in Figure 1. DMESs to enhance IEDS resilience. A consensus algorithm [24] is applied to determine the allocated proportions of exported or imported electricity and natural gas for each DMES in a distributed way and the MILP can be solved by commercial solvers. The prominent features of the proposed strategy are demonstrated by case studies. The major contributions of this paper are summarized as follows: (1) This paper co-optimizes the electricity, natural gas and thermal energy for three operation modes in DMES, which promotes the comprehensive and efficient utilization of different energy in normal and destroyed situations. (2) The hierarchical management strategy in DMES is proposed, which has enhancement for IEDS resilience to withstand the extreme events, such as natural disaster. (3) The consensus algorithm is applied to obtain the most suitable energy exchange with the least visible information on DMESs, which can not only calculate the allocated proportions accurately in a distributed way but also protect the privacy of DMESs effectively.
The rest of this paper is organized as follows. The concept of the networked DMESs is introduced and the general framework of the hierarchical management strategy is discussed in Section 2. Section 3 proposes mathematical formulations of the optimal normal, preventive and resilient operation and develops a consensus algorithm to solve this problem in a distributed way. In Section 4, numerical results are provided to validate the proposed strategy. Finally, Section 5 concludes the paper.

Networked District Multi-Energy Systems
The DMESs, consisting of MGs and district gas-heating networks, are small-scale integrated energy systems covering small geographical areas with DGs, energy storages (ESs), energy coupling devices and various energy loads, which are shown in Figure 1. As shown in Figure 1, ESs include battery, gasholder and thermal storage and energy coupling devices include CHP units, power to gas, electrical heat pumps (EHPs) [25] and boilers. In addition to the mentioned advantages, when the power and gas in the main grid are not available or the IEDS is faulty, customers in a DMES could benefit from the power and gas supplied from stored resources. Hence, DMESs could be employed to enhance IEDS resilience by reducing the possibility of load shedding.
However, each DMES can only support unserved loads by scheduling their own resources. Since each DMES is controlled independently, it is not an optimal strategy for multiple DMESs. Therefore, the networked DMESs, which is further development and application of the concept of DMES, need As shown in Figure 1, ESs include battery, gasholder and thermal storage and energy coupling devices include CHP units, power to gas, electrical heat pumps (EHPs) [25] and boilers. In addition to the mentioned advantages, when the power and gas in the main grid are not available or the IEDS is faulty, customers in a DMES could benefit from the power and gas supplied from stored resources. Hence, DMESs could be employed to enhance IEDS resilience by reducing the possibility of load shedding.
However, each DMES can only support unserved loads by scheduling their own resources. Since each DMES is controlled independently, it is not an optimal strategy for multiple DMESs. Therefore, Sustainability 2019, 11, 4048 4 of 20 the networked DMESs, which is further development and application of the concept of DMES, need to be studied, which can coordinate energy management among connective multiple DMESs. Figure 2 illustrates such the networked DMESs model. to be studied, which can coordinate energy management among connective multiple DMESs. Figure  2 illustrates such the networked DMESs model. As shown in Figure 2, the networked DMESs consist of multiple DMESs connected through the physical common electricity bus and gas bus. Moreover, for information exchange, the DMESs are also connected through the cyber communication network. The networked DMESs can support each other with the remainder power and gas through the common buses to supply more loads after a natural disaster.
In IEDS scheduling management, each DMES is managed by an integrated energy serving company, which is the lower-layer controller (LLC). However, since there is no central controller in the upper-layer networked DMES, each DMES can only exchange information between neighboring DMESs. In the model, two conditions need to be met. First, each LLC has ownership of a DMES. This means that each DMES is autonomously managed by its own LLC, so the hierarchical management strategy should fulfil the autonomy of DMESs as much as possible. Second, the privacy in each DMES needs to be protected, so the energy and transaction information on DMESs are visible minimally.

General Framework of the Hierarchical Management Strategy
As noted earlier, the operation of DMESs can be divided into three modes, as depicted in Figure  3. In the normal operation mode, the LLC manages DGs, ESs and energy coupling devices, purchases energy from IEDSs and sells energy to consumers without energy exchange with other DMESs. Hence, the network lines and common bus are idle. After a disaster alert is announced, the proactive scheduling objective of DMESs is to maximize the stored energy, so the LLCs purchase energy to fill ESs as soon as possible in the preventive operation mode. When an IEDS is damaged by disaster, the DMESs cannot purchase adequate electricity and natural gas from IEDSs, so they have to enter the resilient operation mode.  As shown in Figure 2, the networked DMESs consist of multiple DMESs connected through the physical common electricity bus and gas bus. Moreover, for information exchange, the DMESs are also connected through the cyber communication network. The networked DMESs can support each other with the remainder power and gas through the common buses to supply more loads after a natural disaster.
In IEDS scheduling management, each DMES is managed by an integrated energy serving company, which is the lower-layer controller (LLC). However, since there is no central controller in the upper-layer networked DMES, each DMES can only exchange information between neighboring DMESs. In the model, two conditions need to be met. First, each LLC has ownership of a DMES. This means that each DMES is autonomously managed by its own LLC, so the hierarchical management strategy should fulfil the autonomy of DMESs as much as possible. Second, the privacy in each DMES needs to be protected, so the energy and transaction information on DMESs are visible minimally.

General Framework of the Hierarchical Management Strategy
As noted earlier, the operation of DMESs can be divided into three modes, as depicted in Figure 3. In the normal operation mode, the LLC manages DGs, ESs and energy coupling devices, purchases energy from IEDSs and sells energy to consumers without energy exchange with other DMESs. Hence, the network lines and common bus are idle. After a disaster alert is announced, the proactive scheduling objective of DMESs is to maximize the stored energy, so the LLCs purchase energy to fill ESs as soon as possible in the preventive operation mode. When an IEDS is damaged by disaster, the DMESs cannot purchase adequate electricity and natural gas from IEDSs, so they have to enter the resilient operation mode. to be studied, which can coordinate energy management among connective multiple DMESs. Figure  2 illustrates such the networked DMESs model.  As shown in Figure 2, the networked DMESs consist of multiple DMESs connected through the physical common electricity bus and gas bus. Moreover, for information exchange, the DMESs are also connected through the cyber communication network. The networked DMESs can support each other with the remainder power and gas through the common buses to supply more loads after a natural disaster.
In IEDS scheduling management, each DMES is managed by an integrated energy serving company, which is the lower-layer controller (LLC). However, since there is no central controller in the upper-layer networked DMES, each DMES can only exchange information between neighboring DMESs. In the model, two conditions need to be met. First, each LLC has ownership of a DMES. This means that each DMES is autonomously managed by its own LLC, so the hierarchical management strategy should fulfil the autonomy of DMESs as much as possible. Second, the privacy in each DMES needs to be protected, so the energy and transaction information on DMESs are visible minimally.

General Framework of the Hierarchical Management Strategy
As noted earlier, the operation of DMESs can be divided into three modes, as depicted in Figure  3. In the normal operation mode, the LLC manages DGs, ESs and energy coupling devices, purchases energy from IEDSs and sells energy to consumers without energy exchange with other DMESs. Hence, the network lines and common bus are idle. After a disaster alert is announced, the proactive scheduling objective of DMESs is to maximize the stored energy, so the LLCs purchase energy to fill ESs as soon as possible in the preventive operation mode. When an IEDS is damaged by disaster, the DMESs cannot purchase adequate electricity and natural gas from IEDSs, so they have to enter the resilient operation mode.   In the resilient operation mode, the hierarchical management strategy proposed in this paper is comprised of two stages. In the first stage, the LLC develops a scheduling plan for the next timeslot, which includes DGs and ESs output and load consumptions in its own DMES. Then, the LLC broadcasts surplus generation capacities or unserved loads to neighboring DMESs through the cyber communication network. In the second stage, the scheduling plans are updated by exchange energy. According to the announced amount of excess and deficit electricity and natural gas, the allocated proportions of exported or imported electricity and natural gas, which can be used to determine the amount of exchange energy between DMESs, are calculated for each DMES by the proposed consensus algorithm. With the updated scheduling plan implemented, the excess DMESs provide the surplus energy to the deficit DMESs through the common bus so as to reduce load shedding when purchased energy is limited. To put it more clearly, the networked DMESs share the available generation resources and storage capacities to supply more loads as a resilient response, which is a self-healing process to enhance IEDS resilience.
It is worth highlighting that the scheduling plan is updated in two steps. In detail, after disaster disruption, the purchased electricity and natural gas from IEDSs are limited. Actually, besides the stored energy in battery and thermal storage, the supply source of electrical loads, gas loads and heat loads is the stored natural gas in gasholders. Therefore, in this paper, according to load shedding cost in a short time, the electrical loads should be supplied as much as possible, followed by the gas loads, and if necessary, the heat loads can be curtailed first. In the first step, the gas consumption and output of CHP units and the output of the battery and gasholder are updated, so that the electrical load curtailment is mitigated preferentially. In the second step, the output of the gasholder is updated again for the mitigation of gas load curtailment. All steps of the proposed hierarchical management strategy are briefly depicted in Figure 4. In the resilient operation mode, the hierarchical management strategy proposed in this paper is comprised of two stages. In the first stage, the LLC develops a scheduling plan for the next timeslot, which includes DGs and ESs output and load consumptions in its own DMES. Then, the LLC broadcasts surplus generation capacities or unserved loads to neighboring DMESs through the cyber communication network. In the second stage, the scheduling plans are updated by exchange energy. According to the announced amount of excess and deficit electricity and natural gas, the allocated proportions of exported or imported electricity and natural gas, which can be used to determine the amount of exchange energy between DMESs, are calculated for each DMES by the proposed consensus algorithm. With the updated scheduling plan implemented, the excess DMESs provide the surplus energy to the deficit DMESs through the common bus so as to reduce load shedding when purchased energy is limited. To put it more clearly, the networked DMESs share the available generation resources and storage capacities to supply more loads as a resilient response, which is a self-healing process to enhance IEDS resilience.
It is worth highlighting that the scheduling plan is updated in two steps. In detail, after disaster disruption, the purchased electricity and natural gas from IEDSs are limited. Actually, besides the stored energy in battery and thermal storage, the supply source of electrical loads, gas loads and heat loads is the stored natural gas in gasholders. Therefore, in this paper, according to load shedding cost in a short time, the electrical loads should be supplied as much as possible, followed by the gas loads, and if necessary, the heat loads can be curtailed first. In the first step, the gas consumption and output of CHP units and the output of the battery and gasholder are updated, so that the electrical load curtailment is mitigated preferentially. In the second step, the output of the gasholder is updated again for the mitigation of gas load curtailment. All steps of the proposed hierarchical management strategy are briefly depicted in Figure 4. Moreover, this paper has two assumptions. First, it is assumed that the common buses and the cyber network are strongly connected and no island exists in the networked DMESs after extreme disaster. Second, in order to cope with potential natural disasters, all the LLCs in the networked DMESs have signed the control protocols beforehand, which is based on the strategy proposed in this paper. What is more, the scheduling horizon is one hour. The purchased energy will be available after Moreover, this paper has two assumptions. First, it is assumed that the common buses and the cyber network are strongly connected and no island exists in the networked DMESs after extreme disaster. Second, in order to cope with potential natural disasters, all the LLCs in the networked DMESs have signed the control protocols beforehand, which is based on the strategy proposed in this paper. What is more, the scheduling horizon is one hour. The purchased energy will be available after IEDS eliminates the faults caused by the disaster. In the case of an uncertain IEDS repair time, the networked DMESs should provide the existing loads to customers reliably. After a scheduling horizon, the proposed strategy will be implemented in the next hour, and the procedure will continue until IEDS restoration. The model formulation of this procedure is discussed in detail in the following section.

Operation Model Formulation
The operation of DMESs has three modes, including the normal, preventive and resilient operation mode, and different operation modes have different objectives.
Objective function: In the normal operation mode, the main objectives are to minimize the operation costs under the supply-demand balance of each energy in DMESs. The goal of the LLCs is to minimize the total cost of DMESs, as shown in (1). The total cost consists of the following terms: (i) electricity purchasing cost, (ii) natural gas purchasing cost, (iii) electrical load shedding cost, (iv) gas load shedding cost, (v) heat load shedding cost, (vi) charging and discharging cost of batteries, (vii) charging and discharging cost of gasholders, (viii) charging and discharging cost of thermal storages, (ix) penalty cost of wind power curtailment, and (x) penalty cost of solar power curtailment.
In the preventive operation mode, the objectives are not only to minimize the operation costs, but also to maximize the energy stored, so that DMESs can supply the load as much as possible after the energy purchased from IEDSs is limited. To facilitate modeling, the idle capacity of energy storages is calculated as the penalty cost: (xi) penalty cost of idle batteries, (xii) penalty cost of idle gasholders, and (xii) penalty cost of idle thermal storages.
In the resilient operation mode, after disaster disruption, the IEDS is destroyed and the energy purchased is limited. Hence, the main objectives are to minimize the load shedding. Each DMES supplies its own loads preferentially and broadcasts excess and deficit energy to adjacent DMESs. And then, the amount of energy exchanged is determined by the consensus algorithm, which will be introduced in the Section 3.2.
Furthermore, the constraints of the operation include energy balance, the operation status of equipment, the energy purchased, renewable energy output and load shedding.
Energy balance constraints: Constraints (4)-(6) are power, natural gas and heat balance constraints, respectively. For each DMES and at each hour, (4) the sum of the total generated power by electrical power purchased, wind generators, photovoltaic plants, CHP units, charging/discharging power of batteries and curtailed electrical load must be equal to the sum of the total electrical load by conventional electrical load and power consumption of EHPs; (5) the sum of the total generated gas by gas purchased, charging/discharging gas of gasholders and curtailed gas load must be equal to the sum of the total gas load by conventional gas load and the gas consumption of CHP units and boilers; (6) the sum of the total generated heat by CHP units, boilers, EHPs, charging/discharging heat of thermal storages and curtailed heat load must be equal to the sum of the total heat load by conventional gas load.
The constraints of the operation status of the equipment include not only coupling equipment between different energy systems, such as CHP unit constraints, EHP constraints and boiler constraints, but also energy storage equipment, such as battery constraints, gasholder constraints and thermal storage constraints.
CHP unit constraints: Constraints (7) and (8) show the energy conversion among the electricity generation, heat generation and natural gas consumption of CHP units. Constraints (9) limit the power output of CHP units. Constraints (10) limit the ramp-up and ramp-down of CHP units.
EHP constraints: Constraints (11) show the energy conversion between the heat generation and electrical power consumption of EHP. Constraints (12) limit the heat output of EHP. Constraints (13) limit the ramp-up and ramp-down of EHP.
Boiler constraints: q boi i boi ,n,t = η boi i boi ,n f boi i boi ,n,t ∀i boi , ∀n, ∀t 0 ≤ q boi i boi ,n,t ≤ q boi i boi ,n ∀i boi , ∀n, ∀t ∆q boi i boi ,n ≤ q boi i boi ,n,t+1 − q boi i boi ,n,t ≤ ∆q boi i boi ,n ∀i boi , ∀n, ∀t Constraints (14) show the energy conversion between the heat generation and natural gas consumption of the boiler. Constraints (12) limit the heat output of the boiler. Constraints (13) limit the ramp-up and ramp-down of the boiler.
Battery constraints: 0 ≤ E bat i bat ,n,t ≤ E bat i bat ,n ∀i bat , ∀n, ∀t 0 ≤ p ch i bat ,n,t ≤ χ bat i bat ,n,t p ch i bat ,n ∀i bat , ∀n, ∀t 0 ≤ p dch i bat ,n,t ≤ (1 − χ bat i bat ,n,t )p dch i bat ,n ∀i bat , ∀n, ∀t Constraints (17) show the relationship of electricity stored and charging/discharging power. Constraints (18) show the allowable limit of battery capacity. Allowable charging/discharging power limits are imposed through constraints (19) and (20).
Gasholder constraints: E gas i gas ,n,t+1 = E gas i gsa ,n,t + f ch i gas ,n,t η gas,ch i gas ,n ∆t − f dch i gas ,n,t ∆t η gas,dch i gas ,n ∀i gas , ∀n, ∀t 0 ≤ E gas i gas ,n,t ≤ E gas i gas ,n ∀i gas , ∀n, ∀t 0 ≤ f ch i gas ,n,t ≤ χ gas i gas ,n,t f ch i gas ,n ∀i gas , ∀n, ∀t 0 ≤ f dch i gas ,n,t ≤ (1 − χ gas i gas ,n,t ) f dch i gas ,n ∀i gas , ∀n, ∀t Constraints (21) show the relationship of natural gas stored and charging/discharging gas. Constraints (22) show the allowable limit of gasholder capacity. Constraints (23) and (24) 0 ≤ E heat i heat ,n,t ≤ E heat i heat ,n ∀i heat , ∀n, ∀t 0 ≤ q ch i heat ,n,t ≤ χ heat i heat ,n,t q ch i heat ,n ∀i heat , ∀n, ∀t 0 ≤ q dch i heat ,n,t ≤ (1 − χ heat i heat ,n,t )q dch i heat ,n ∀i heat , ∀n, ∀t Constraints (25) show the relationship of heat stored and charging/discharging heat. Constraints (26) show the allowable limit of thermal storage capacity. Constraints (27) and (28) limit charging/discharging heat. What is more, it is worth emphasizing that the binary variables χ bat i bat ,n,t , χ gas i gas ,n,t and χ heat i heat ,n,t are guaranteed to avoid the simultaneous charging and discharging of energy storage equipment.
Since heat is not suitable for long-distance transmission, the energy purchased off DMESs is mainly electrical power and natural gas. Hence, heat is supplied by CHP units, EHPs and boilers in DMESs.
Energy purchased constraints: Constraints (29) and (30) limit electrical power and natural gas purchased from IEDS. On the other hand, renewable energy should be consumed as much as possible for low carbon and environmental protection.
Renewable energy output constraints: 0 ≤ p wind i wind ,n,t ≤ p wind i wind ,n,t ∀i wind , ∀n, ∀t p wind,cut i wind ,n,t = p wind i wind ,n,t − p wind i wind ,n,t ∀i wind , ∀n, ∀t Constraints (35)-(37) limit the electricity, gas and heat load shedding amount, respectively. The proposed scheduling model of DMES is a mixed-integer linear programming (MILP), which can be solved with the solvers, such as cplex, gurobi.
The proposed scheduling model is solved in each DMES simultaneously. Next, each DMES calculates the excess and deficit electrical power and natural gas. The excess electrical power includes unused CHP unit and battery capacities. Besides, the deficit electrical power refers to unsupplied electrical demands. The calculation formulation is presented as follows: where symbolˆdenotes that the corresponding variables are optimal values from the proposed scheduling model. The further generating capacity C max n,t is the sum of the unused capacities of each CHP unit in DMES n, which is constrained by capacity, the ramp-up of CHP units and discharging gas, and gas stored in gasholders. The further discharging capacity B max n,t is the sum of the unused capacities of each battery in DMES n, which is constrained by discharging power, and electricity stored in batteries. L e n,t is the total electrical load shedding in DMES n. The excess natural gas includes unused gasholder capacities, and the deficit natural gas refers to unsupplied gas demands. They are calculated as follows: The further discharging capacity G max n,t is the sum of the unused capacities of each gasholder in DMES n, which is constrained by discharging gas, and gas stored in gasholders. L g n,t is the total natural gas load shedding in DMES n.
After the excess and deficit electrical power and natural gas is calculated, each DMES broadcasts this information to neighboring DMESs at the end of stage I.

The Consensus Algorithm in Networked DMESs
In stage II, the amount of energy exchange supported by each other will be determined between the DMESs. This paper defines an excess DMES as a DMES that has excess energy after supplying its own load, and a deficit DMES as a DMES that has load shedding and needs energy support from other DMESs. If a centralized approach is used for calculating energy exchange, it will suffer high communication infrastructure costs and low reliability. Alternatively, a consensus algorithm can be applied in which the allocated proportions of energy exchange are computed locally at each DMES by information exchange only with neighboring DMESs. The essence of the consensus algorithm is to update the variable of local DMESs according to the variable of adjacent DMESs, iteratively. The iteration variable of DMESs can be linearly updated as follows: where k is the iteration times. ξ is the step size, which satisfies ξ ∈ (0, 1/Θ). Θ is the maximum node out-degree of the communication network [26,27]. Ω n is set of neighbors of DMES n. Φ n,t (k) is the kth iteration variable, which represents C max n,t , B max n,t , G max n,t , L e n,t and L g n,t . Based on research in [27], the convergence of the consensus algorithm is related to the eigenvalues of the Laplacian matrix representing the communication network. After enough runs of iteration, variables Φ n,t (k) will converge to the average value Φ t : where Φ n,t (0) denotes the initial value of variable. Actually, the consensus algorithm is to calculate the average value under the condition that only the local and adjacent variables are known. It protects the privacy of DMESs, since only excess and deficit energy are visible. Furthermore, a distributed calculation method is applied for developing scheduling plan of each DMESs in parallel and only local communication between neighboring DMESs is involved, so it has low communication complexity and cost. Next, the allocated proportions can be calculated as follows: where µ e t and µ g t are allocated proportions of electricity and natural gas, respectively. C t , B t , L e t , G t and L g t are convergent values calculated by (43). According to the allocated proportions, the exported or imported electricity and natural gas for each DMES can be calculated.
If excess energy is more than deficit energy in networked DMESs at hour t ( L e t < C t + B t , L g t < G t ), allocated proportions are applied to calculated the exported energy of excess DMESs as follows: p out n,t = µ e t (C max n,t + B max n,t ) ∀n, ∀t f out n,t = µ g t G max n,t ∀n, ∀t where p out n,t and f out n,t are the exported electricity and natural gas of excess DMESs, respectively. The electricity and natural gas are enough to alleviate load shedding in networked DMESs after disaster and improve the resilience of IEDS.
On the other hand, if the excess energy is less than the deficit energy in networked DMESs at hour t ( L e t ≥ C t + B t , L g t ≥ G t ), allocated proportions are applied to the calculated imported energy of deficit DMESs as follows: p in n,t = µ e t L e n,t ∀n, ∀t f in n,t = µ g t L g n,t ∀n, ∀t where p in n,t and f in n,t are the imported electricity and natural gas of deficit DMESs, respectively. When excess energy is not enough, the energy support for deficit DMESs is based on their amount of load shedding.
In general, it is fair to all DMESs, since the allocated exported or imported energy for each DMES is set according to its excess capacity or amount of load shedding. After DMESs determine the amount of energy exchange by the consensus algorithm, the scheduling plan developed in stage I will be updated in two steps as shown in Figure 4. And then, the updated scheduling plan will be implemented at the end of stage II.

Test System
The proposed hierarchical management strategy is examined on a test system with five DMESs as shown in Figure 2. The information on CHP units, EHPs, boilers, batteries, gasholders, heat storages and price is summarized in Tables 1-7.      The forecasted output of DGs in each DMES, which is the sum of wind output and photovoltaic output, is shown in Figure 5.     The forecasted output of DGs in each DMES, which is the sum of wind output and photovoltaic output, is shown in Figure 5.  And then, the electrical load, gas load and heat load of DMESs are shown in Figure 6a-c, respectively.
It is assumed that DMESs receive a disaster alert at the 7th hour, and disaster attacks the IEDS at the 17th hour. This means that the normal operation lasts 6 h, the preventive operation lasts 10 h and the resilient operation lasts 8 h. In other words, T 1 , T 2 and T 3 are set to 6, 10 and 8 h. The remaining penalty cost parameters are summarized in Table 8.  And then, the electrical load, gas load and heat load of DMESs are shown in Figure 6a-c, respectively. It is assumed that DMESs receive a disaster alert at the 7th hour, and disaster attacks the IEDS at the 17th hour. This means that the normal operation lasts 6 h, the preventive operation lasts 10 h and the resilient operation lasts 8 h. In other words, T1, T2 and T3 are set to 6, 10 and 8 h. The remaining penalty cost parameters are summarized in Table 8.

Results and Analysis
First, all DMESs have sufficient energy purchased from IEDSs in the normal and preventive operation mode, the electrical power and natural gas purchased curves are shown in Figure 7.

Results and Analysis
First, all DMESs have sufficient energy purchased from IEDSs in the normal and preventive operation mode, the electrical power and natural gas purchased curves are shown in Figure 7. As shown in Figure 7, the energy purchased increases and maintains a high level in the preventive operation mode, because it not only supplies the current load, but also charges the energy storages. In addition, in order to discuss the proposed hierarchical management strategy more clearly, the energy storages should be filled during the preventive operation mode, so that there is sufficient energy stored to schedule between networked DMESs. The decline of energy purchased curves at the end of the preventive operation mode indicates that energy storages were full.
The resilient operation mode covers 8 h, from the 17th hour to the 24th hour. The excess electricity and natural gas of DMESs are summarized in Table 9. The deficit electricity and natural gas (load shedding) of DMESs are summarized in Table 10.   As shown in Figure 7, the energy purchased increases and maintains a high level in the preventive operation mode, because it not only supplies the current load, but also charges the energy storages. In addition, in order to discuss the proposed hierarchical management strategy more clearly, the energy storages should be filled during the preventive operation mode, so that there is sufficient energy stored to schedule between networked DMESs. The decline of energy purchased curves at the end of the preventive operation mode indicates that energy storages were full.
The resilient operation mode covers 8 h, from the 17th hour to the 24th hour. The excess electricity and natural gas of DMESs are summarized in Table 9. The deficit electricity and natural gas (load shedding) of DMESs are summarized in Table 10.  Comparing Tables 9 and 10, we can see that excess energy and deficit energy are almost complementary. Approximately, each DMES can supply its own loads at time slot 1~2, and DMES 1, DMES 4 and DMES 5 have more excess energy to support DMES 2 and DMES 3 at time slot 3~6. However, with the consumption of energy, the DMESs have to interrupt their loads.
As shown in Figure 2, the DMESs can exchange information through the cyber communication network according to the route 1 ↔ 2 ↔ 3 ↔ 4 ↔ 5 ↔ 1. Since there is no energy exchange at time slot 1~2 and 8, it mainly shows the iterative process of the consensus algorithm at time slot 3~7 in Figure 8, especially the excess energy at time slot 3~6 and deficit energy at time slot 7, which are representative. Comparing Tables 9 and 10, we can see that excess energy and deficit energy are almost complementary. Approximately, each DMES can supply its own loads at time slot 1~2, and DMES 1, DMES 4 and DMES 5 have more excess energy to support DMES 2 and DMES 3 at time slot 3~6. However, with the consumption of energy, the DMESs have to interrupt their loads.
As shown in Figure 2, the DMESs can exchange information through the cyber communication network according to the route 1 ↔ 2 ↔ 3 ↔ 4 ↔ 5 ↔ 1. Since there is no energy exchange at time slot 1~2 and 8, it mainly shows the iterative process of the consensus algorithm at time slot 3~7 in Figure  8, especially the excess energy at time slot 3~6 and deficit energy at time slot 7, which are representative. As shown in Figure 8, after five runs of iteration, the variables nearly converge to the convergent value, which demonstrates that the consensus algorithm has efficient convergence. In summary, the convergent values and allocated proportions calculated by (45) and (46) are summarized in Table 11. As shown in Figure 8, after five runs of iteration, the variables nearly converge to the convergent value, which demonstrates that the consensus algorithm has efficient convergence. In summary, the convergent values and allocated proportions calculated by (45) and (46) are summarized in Table 11. According to the allocated proportions, exported or imported electricity and natural gas for each DMES at time slot 3~6 are shown in Figure 9. According to the allocated proportions, exported or imported electricity and natural gas for each DMES at time slot 3~6 are shown in Figure 9. DMES Figure 9 shows that the amount of exchange energy between DMESs is calculated for each DMES by the consensus algorithm. And then, the scheduling plan is updated. As noted earlier, the updated process is divided into two steps: the electrical load curtailment is mitigated in the first step and the gas load curtailment is mitigated in the second step. To clarify, the first step is called electricity update  Figure 9 shows that the amount of exchange energy between DMESs is calculated for each DMES by the consensus algorithm. And then, the scheduling plan is updated. As noted earlier, the updated process is divided into two steps: the electrical load curtailment is mitigated in the first step and the gas load curtailment is mitigated in the second step. To clarify, the first step is called electricity update and the second step is called gas update in this paper. The load shedding of networked DMESs in the initial scheduling plan and the two updated scheduling plans are shown in Figure 10.
As shown in Figure 10, compared with the initial scheduling plan, the updated scheduling plan has less load shedding. In other words, after implementing the hierarchical management strategy, the networked DMESs can serve more consumers, avoiding severe loading shedding. If the IEDS has been repaired in time slot 1~5, the networked DMESs will not interrupt the load supply at all, which shows that IEDSs have the ability to absorb and withstand extreme events, so the hierarchical management strategy can enhance the resilience of IEDS. As shown in Figure 10, compared with the initial scheduling plan, the updated scheduling plan has less load shedding. In other words, after implementing the hierarchical management strategy, the networked DMESs can serve more consumers, avoiding severe loading shedding. If the IEDS has been repaired in time slot 1~5, the networked DMESs will not interrupt the load supply at all, which shows that IEDSs have the ability to absorb and withstand extreme events, so the hierarchical management strategy can enhance the resilience of IEDS.

Conclusions
IEDSs are efficient, clean and sustainable energy systems. However, increasingly frequent natural disasters pose a severe threat to the security of IEDSs. Hence, this paper studied the resilience of IEDSs against extreme events. A hierarchical management strategy was proposed, which includes the normal, preventive and resilient operation mode of DMESs. In the normal operation mode, the objective is to minimize costs. In the preventive operation mode, the objective is to maximize the stored energy. It is noted that the resilient operation mode is divided into two stages. In the first stage, each DMES develops its own scheduling plan with the objective of minimizing load shedding. And then, the excess and deficit energy is broadcasted to neighboring DMESs by the LLCs. In the second stage, a consensus algorithm is applied to calculate energy exchange between the networked DMESs. Next, the scheduling plan is updated in two steps and implemented. Finally, the numerical results demonstrate the effectiveness of the proposed hierarchical management strategy and algorithm. The main conclusions are summarized as follows: (1) This paper co-optimizes the electricity, natural gas and thermal energy for three operation modes at the distribution and utilization level, which promotes efficient and sustainable energy consumption. (2) The hierarchical management strategy can dispatch energy exchange fairly and reduce load shedding efficiently after extreme events, which demonstrates its enhancement for IEDS resilience. (3) The privacy of each DMES is respected since only information on excess and deficit energy is visible to neighboring DMESs through the consensus algorithm, which has efficient convergence.
Future research directions include the topology formation of IEDS, flexible resources for sectionalized restoration and the self-healing mode of IEDS.

Conclusions
IEDSs are efficient, clean and sustainable energy systems. However, increasingly frequent natural disasters pose a severe threat to the security of IEDSs. Hence, this paper studied the resilience of IEDSs against extreme events. A hierarchical management strategy was proposed, which includes the normal, preventive and resilient operation mode of DMESs. In the normal operation mode, the objective is to minimize costs. In the preventive operation mode, the objective is to maximize the stored energy. It is noted that the resilient operation mode is divided into two stages. In the first stage, each DMES develops its own scheduling plan with the objective of minimizing load shedding. And then, the excess and deficit energy is broadcasted to neighboring DMESs by the LLCs. In the second stage, a consensus algorithm is applied to calculate energy exchange between the networked DMESs. Next, the scheduling plan is updated in two steps and implemented. Finally, the numerical results demonstrate the effectiveness of the proposed hierarchical management strategy and algorithm. The main conclusions are summarized as follows: (1) This paper co-optimizes the electricity, natural gas and thermal energy for three operation modes at the distribution and utilization level, which promotes efficient and sustainable energy consumption. (2) The hierarchical management strategy can dispatch energy exchange fairly and reduce load shedding efficiently after extreme events, which demonstrates its enhancement for IEDS resilience.