Distributed Optimal Coordinated Operation for Distribution System with the Integration of Residential Microgrids

: With the increasing integration of rooftop photovoltaic (PV) generation and plug-in electric vehicles (EVs) into the households at user level, household consumers become prosumers. The coordination between the household prosumers and distribution network (DN) becomes essential to the energy management and optimal operation for both entities. In this paper, the residential prosumer cluster is considered as a residential microgrid (RMG) and a hierarchical DN integration method for the multi-RMGs is presented. A two-level hierarchical distributed optimization model is established based on the analytical target cascading to coordinate the RMGs and DNs. At the RMGs level, each RMG is required to individually optimize the energy consumption scheduling in every household by taking into account the e ﬀ ect of time-of-use electricity price on the demand response of EVs and ﬂexible loads. At the DN level, the optimally coordinated operation problem is formulated as a relaxed optimal power ﬂow model based on the second order cone programming by considering the power ﬂow balance constraints. Case studies on the modiﬁed IEEE 33-bus system demonstrate the feasibility and e ﬀ ectiveness of the proposed method by achieving coordinated economic optimality as well as coordinated operating points for all entities.


Introduction
Present energy demands and greenhouse gas emissions have been promoting the rapid development of renewable-energy-based distributed generation and electric vehicles (EVs) [1]. With recent technological advancements, there has been a significant increment in integrating renewables and EVs into the end-user level. For instance, the presence of renewable distributed generation (e.g., PV generation at rooftops) and EVs in a residence or villa makes it function to supply its domestic loads by using the distributed energy resources (DERs). In this regard, residential end-users are facing the transition from consumers to prosumers, and the residential prosumers can be able to generate and consume energy internally looking for an autonomous operation [2]. The residential prosumers or prosumer clusters can be seen as residential microgrids (RMGs) with the capability to manage their distributed energy resources, e.g., renewable distributed generation units, EVs, flexible loads and their participation in demand response. As residential energy consumption occupies a considerable proportion of energy in the demand side [3,4], RMGs have attracted increasing concerns. In the near future, large numbers of RMGs may emerge prominently in active distribution networks (ADNs).
Considerable work has been undertaken concerning home/residential microgrid energy management for the integration of renewables and EVs into residential loads and optimization To the best of the authors' knowledge, there is no report about ATC-based distributed method applied to optimally coordinated operation problems between the RMGs and ADN that take into account residential DR and the underlying power flow and operational constraints on the ADN simultaneously.
In this paper, the cluster of household prosumers in the close spatial distance (e.g., residential district) is treated as an RMG and a hierarchical structure of ADN integration of multi-RMGs is presented. The RMGOs and DSO are regarded as two different entities with their autonomous objectives, ATC method is used to represent the collaboration and cooperation relationship between the RMGs and ADN. The energy management problem in RMG and optimal operation problem in ADN are modeled individually according to their own load demand and available energy sources The associated residential demand response and power flow balance is solved independently in a distributed coordination manner, and then the optimal coordinated operating point and economic benefit of each entity are achieved. A case study is conducted based on the modified IEEE-33 bus distribution system to verify the feasibility and effectiveness of the proposed method.
The remaining paper is organized as follows. The hierarchical structure of ADN integration of multi-RMGs is illustrated in Section 2. ATC-based distributed optimization modeling for RMGs and ADN is presented in Section 3. Section 3 illustrates the solving procedure. Section 4 shows the case studies and numerical results. Conclusions are drawn in Section 5.

Description of Active Distribution Network Integration of Multi-RMGs
With the fast development of rooftop PV system and EVs, the households have local generation sources, such as the rooftop PV generation and plug-in electric vehicle battery energy storage, and thus are able to provide local energy production to supply their domestic power demand. That is, household prosumers can internally generate and consume energy, therefore, they are looking for autonomous operation. The households are usually located geographically close to each other [25], such as in the residential district, so the group of household prosumers are often collectively regarded as an RMG. The conceptual schematic outline of RMG is shown in Figure 1. The RMG is capable of operating both in an interactive and independent way. If there is electricity deficiency in RMG, RMG owners purchase electricity from DSO. If there is surplus power, the RMG is able to feed electricity back to the power distribution grid [26].
Appl. Sci. 2019, 9, x FOR PEER REVIEW 3 of 17 Therefore, residential DR provided by EVs and V2H capability is incorporated in the modeling in this paper. To the best of the authors' knowledge, there is no report about ATC-based distributed method applied to optimally coordinated operation problems between the RMGs and ADN that take into account residential DR and the underlying power flow and operational constraints on the ADN simultaneously.
In this paper, the cluster of household prosumers in the close spatial distance (e.g., residential district) is treated as an RMG and a hierarchical structure of ADN integration of multi-RMGs is presented. The RMGOs and DSO are regarded as two different entities with their autonomous objectives, ATC method is used to represent the collaboration and cooperation relationship between the RMGs and ADN. The energy management problem in RMG and optimal operation problem in ADN are modeled individually according to their own load demand and available energy sources The associated residential demand response and power flow balance is solved independently in a distributed coordination manner, and then the optimal coordinated operating point and economic benefit of each entity are achieved. A case study is conducted based on the modified IEEE-33 bus distribution system to verify the feasibility and effectiveness of the proposed method.
The remaining paper is organized as follows. The hierarchical structure of ADN integration of multi-RMGs is illustrated in Section 2. ATC-based distributed optimization modeling for RMGs and ADN is presented in Section III. Section 3 illustrates the solving procedure. Section 4 shows the case studies and numerical results. Conclusions are drawn in Section 5.

Description of Active Distribution Network Integration of Multi-RMGs
With the fast development of rooftop PV system and EVs, the households have local generation sources, such as the rooftop PV generation and plug-in electric vehicle battery energy storage, and thus are able to provide local energy production to supply their domestic power demand. That is, household prosumers can internally generate and consume energy, therefore, they are looking for autonomous operation. The households are usually located geographically close to each other [25], such as in the residential district, so the group of household prosumers are often collectively regarded as an RMG. The conceptual schematic outline of RMG is shown in Figure 1. The RMG is capable of operating both in an interactive and independent way. If there is electricity deficiency in RMG, RMG owners purchase electricity from DSO. If there is surplus power, the RMG is able to feed electricity back to the power distribution grid [26]. The hierarchical structure of ADN connected with multi-RMGs is illustrated in Figure 2. ADN is in the upper level and RMGs are in the lower level, two entities are linked together through tielines. In addition to a connection with the upstream grid, the ADN commonly consists of feeders, distributed generation (DG) (e.g., controllable DG, renewable DG, etc), and loads in a local region. As a new entity, the RMG has the ability to exchange power with the ADN and to communicate with the distribution system operator. It should be noted that the RMGs at the same level has no direct affiliation with each other. The hierarchical structure of ADN connected with multi-RMGs is illustrated in Figure 2. ADN is in the upper level and RMGs are in the lower level, two entities are linked together through tie-lines. In addition to a connection with the upstream grid, the ADN commonly consists of feeders, distributed generation (DG) (e.g., controllable DG, renewable DG, etc), and loads in a local region. As a new entity, the RMG has the ability to exchange power with the ADN and to communicate with the distribution system operator. It should be noted that the RMGs at the same level has no direct affiliation with each other.

ATC-Based Distributed Modeling for Multi-RMGs Integrated in ADN
As different entities, the DSO and RMGO have different energy management objectives. The power flow in the tie-lines connecting the ADN and RMGs establishes the coupling operation between the two entities, and their energy management problems cannot be solved independently. A distributed method is required to coordinate the exchanged power in the tie-lines. The collaborative relationship between the ADN and RMGs can be represented by the analytical target cascading method.

ATC-based Multilevel Hierarchical Optimization Mechanism
ATC is an effective and multi-level hierarchical optimization method for system design [27]. In the ATC method, the whole system is hierarchically partitioned into a series of individual subsystems. The subsystems from different levels are hierarchically linked, while the subsystems at the same level are not connected. Each subsystem has its own optimization sub-problem which can be independently solved. Moreover, the subsystems within the same level are solved in a parallel distributed fashion. So the whole complex optimization problem is transformed into an independent set of sub-problems, which significantly reduces the overall computation cost.
A three-level hierarchical ATC model is shown in Figure 3. A parent-child relationship is defined for the subsystems that have direct interdependencies. Subsystem in the upper-level is the parent of subsystems in the lower-level. By the same token, subsystems in the lower-level are the children of the subsystem in the upper-level. Targets (Γ) and responses (Ί) are shared variables that denote the linking relations between the parent and the children. A parent transfers the optimized target Γ to its child elements, and Γ becomes the matching objective of children's responses Ί. In general, the simplified optimization model of the subsystem can be written as follows: where sub f denotes the local optimization objective of the subsystem, sub g and sub h are the sets of inequality and equality constraints, ( ) represents the penalty function added to a subproblem aiming to minimize the deviation between parent target and child response. Note that except for the shared variables (Γ and Ί), the decision variables in the sub-problem are independent local variables in the sub-system. The introduction of penalty function enables (1) to be solved independently, and the shared variables are updated iteratively by solving the sub-problems. When Γ Ί − = 0, i.e., the consistency constraint among the subsystems is reached, and the optimal solutions

ATC-Based Distributed Modeling for Multi-RMGs Integrated in ADN
As different entities, the DSO and RMGO have different energy management objectives. The power flow in the tie-lines connecting the ADN and RMGs establishes the coupling operation between the two entities, and their energy management problems cannot be solved independently. A distributed method is required to coordinate the exchanged power in the tie-lines. The collaborative relationship between the ADN and RMGs can be represented by the analytical target cascading method.

ATC-based Multilevel Hierarchical Optimization Mechanism
ATC is an effective and multi-level hierarchical optimization method for system design [27]. In the ATC method, the whole system is hierarchically partitioned into a series of individual subsystems. The subsystems from different levels are hierarchically linked, while the subsystems at the same level are not connected. Each subsystem has its own optimization sub-problem which can be independently solved. Moreover, the subsystems within the same level are solved in a parallel distributed fashion. So the whole complex optimization problem is transformed into an independent set of sub-problems, which significantly reduces the overall computation cost.
A three-level hierarchical ATC model is shown in Figure 3. A parent-child relationship is defined for the subsystems that have direct interdependencies. Subsystem in the upper-level is the parent of subsystems in the lower-level. By the same token, subsystems in the lower-level are the children of the subsystem in the upper-level. Targets (Γ) and responses ('I) are shared variables that denote the linking relations between the parent and the children. A parent transfers the optimized target Γ to its child elements, and Γ becomes the matching objective of children's responses 'I. In general, the simplified optimization model of the subsystem can be written as follows: where f sub denotes the local optimization objective of the subsystem, g sub and h sub are the sets of inequality and equality constraints, π(Γ − I) represents the penalty function added to a sub-problem aiming to minimize the deviation between parent target and child response. Note that except for the shared variables (Γ and 'I), the decision variables in the sub-problem are independent local variables in the sub-system. The introduction of penalty function enables (1) to be solved independently, and the shared variables are updated iteratively by solving the sub-problems. When Γ − I = 0, i.e., the consistency constraint among the subsystems is reached, and the optimal solutions for the sub-problems can be achieved. And then, the final solution of the original complex optimization problem can be obtained. The advantage of the distributed algorithm is that it only requires limited information exchange among the parent and child elements during the optimization process.
Appl. Sci. 2019, 9, x FOR PEER REVIEW 5 of 17 for the sub-problems can be achieved. And then, the final solution of the original complex optimization problem can be obtained. The advantage of the distributed algorithm is that it only requires limited information exchange among the parent and child elements during the optimization process. The ATC characteristics described above are well-suited for the distributed nature of the RMGs and the hierarchical structure of ADN connected with Multi-RMGs. Therefore, the system as shown in Figure 2 can be partitioned into a two-level ATC hierarchy. The different entities (ADN and RMGs) are placed in different levels, and power flow in the tie-lines is a shared variable (i.e., coupling variable) among ADN and RMGs. In order to handle the couplings between the ADN and RMGs, the concept of virtual load and virtual generator is introduced to model the coupling variable as shown in Figure 4.
where  GD p is the prescheduled value for the virtual generator received from the RMGs,  DN p is the prescheduled value for the virtual load received from the ADN. That is, while  GD p is constant in the The ATC characteristics described above are well-suited for the distributed nature of the RMGs and the hierarchical structure of ADN connected with Multi-RMGs. Therefore, the system as shown in Figure 2 can be partitioned into a two-level ATC hierarchy. The different entities (ADN and RMGs) are placed in different levels, and power flow in the tie-lines is a shared variable (i.e., coupling variable) among ADN and RMGs. In order to handle the couplings between the ADN and RMGs, the concept of virtual load and virtual generator is introduced to model the coupling variable as shown in Figure 4. for the sub-problems can be achieved. And then, the final solution of the original complex optimization problem can be obtained. The advantage of the distributed algorithm is that it only requires limited information exchange among the parent and child elements during the optimization process. The ATC characteristics described above are well-suited for the distributed nature of the RMGs and the hierarchical structure of ADN connected with Multi-RMGs. Therefore, the system as shown in Figure 2 can be partitioned into a two-level ATC hierarchy. The different entities (ADN and RMGs) are placed in different levels, and power flow in the tie-lines is a shared variable (i.e., coupling variable) among ADN and RMGs. In order to handle the couplings between the ADN and RMGs, the concept of virtual load and virtual generator is introduced to model the coupling variable as shown in Figure 4.  The tie-line power is equivalent to virtual load p DN from the ADN standpoint and virtual generator p GD from the RMG standpoint. Thus, p GD is the power demanded by RMG and supplied by ADN in the RMG's optimization problem; and p DN is the power generated by ADN and supplied to RMG in AND's optimization problem. According to the hierarchical optimization mechanism of ATC method, the consistency constraint (i.e., p DN − p GD = 0) corresponding to every coupling variable needs to be enforced in RMG's optimization sub-problem and ADN's optimization sub-problem by using a penalty term. The penalty term added to sub-problem can be written as follows: wherep GD is the prescheduled value for the virtual generator received from the RMGs,p DN is the prescheduled value for the virtual load received from the ADN. That is, whilep GD is constant in the ADN's optimization sub-problem,p DN is constant in the RMGs' optimization sub-problems. There are several options to construct the penalty term π(·), such as exponential penalty function, quadratic penalty function and augmented Lagrange penalty function. Compared to the first two penalty functions, the last one has better convergence property [28]. Thus, the augmented Lagrange penalty function is adopted in this paper.
Based on the above measures, the optimal operation problems of ADN and RMGs are completely separated from each other, which can be modeled and solved independently.

Optimization Model for RMG
The RMG considered in this work corresponds to a cluster of household prosumers, therefore the main purpose of this paper is to promote the local consumption of energy generated by the DERs rather than exporting the surplus power to the distribution system. It is assumed that every household contains PV generator, EV, flexible loads (i.e., shiftable load and adjustable load), and inflexible loads. The optimization objective aims to minimize the total energy consumption cost within mth RMG during the dispatching time period (e.g., 24 h) by taking into account the demand response of EVs and shiftable loads. The optimization model of the mth RMG within the ATC framework can be formulated as follows In the above formulation, the objective function (4) consists of local optimization objective (5) of the mth RMG as well as its penalty function π(·). In function (5), P infl h,t represents the power demand for inflexible load within hth household at hour t. P fl h,k,t represents the power demand of flexible load k within hth household at hour t. P EV_ch h,t and P EV_dis h,t respectively represent the charging and discharging power of the EV within hth household at hour t. P PV h,t represents the power output of the PV generator within hth household at hour t. λ t represents the electricity price at hour t. µ h,k,t represents the demand response coefficient of flexible load k within hth household, µ h,k,t is a binary variable, where 1 denotes flexible load k put into operation at hour t. τ ch h,t is binary variable, where 1 indicates charging state of the EV within hth household at hour t. τ dis h,t is binary variable, where 1 denotes discharging state of the EV within hth household at hour t.
The above optimization problem is subject to the following constraints.
(1) EV load constraints τ dis h,t P min_dis Constraint (6) describes that a single EV cannot be in charging and discharging state simultaneously. Constraints (7) and (8) denote the minimum and maximum charging/discharging power limits. Constraint (9) limits the minimum and maximum allowable state-of-energy values of the EV. Constraint (10) shows energy stored in the EV in the current time period, which is associated with the energy remaining in the EV in the previous time period. The energy consumed during outdoor driving or the change in the amount of power generated through charging and discharging in the current time period.
Constraint (11) denotes the shiftable load power limit. Constraint (12) guarantees that each shiftable load, i.e., shiftable household appliance can be scheduled just once over a 24-h time span. Constraint (13) ensures a continuous power supply during the working cycle of the appliance load, t op,k denotes the working cycle of appliance load (h).

Optimization Model for ADN
The general optimization problem of a DN within the ATC framework can be formulated as follows: In the above formulation, the objective function (17) consists of local optimization objective (18) of the ADN as well as its penalty functions. In the local optimization objective (18), the first item represents the cost of buying electricity from the upstream grid in tth hour, where C G represents the price for purchasing electricity from the upstream grid ($/kW), P G t represents the power transferred from the upstream grid to the ADN (kW). The second item represents the power loss cost of ADN, where P loss l,t represents the power loss of lth branch of the ADN in tth hour. The third item is the generation costs of all controllable DGs in the ADN, where C DG represents generation cost of controllable DG, P DG g,t represents the power output of the gth DG at the hour t. The above optimization problem is subject to the following constraints: (1) Power balance constraint (2) Constraint of power transferred from the upstream grid (3) DG output power constraint P DG_min (4) Virtual load power constraint p DN_min Note that the optimization model of ADN is a nonlinear nonconvex programming problem which is difficult to solve, and the convergence and optimality of solutions cannot be ensured in the ATC framework [28]. The optimization problem of ADN can be regarded as an OPF problem when the power flow balance constraints are taken into account [29]. The optimization model of ADN can be transformed into a second order convex programming (SOCP) problem based on a relaxed DistFlow model [30]. The power flow balance in the ADN can be described as a quadratic model based on DistFlow: According to [30], the second order cone equation can be obtained after relaxing the original quadratic model.
And subject to the following security constraints: Appl. Sci. 2019, 9, 2136 9 of 16 Thus, the optimization problem of ADN can be reformulated as: The optimization models formulated above are SOCP problems which can be effectively solved by off-the-shelf solvers such as IBM ILOG CPLEX optimizer [31].

The Realization of ATC-Based Distributed Coordinated Optimization
As mentioned in Section 3.1, a proper penalty function π(·) is required to relax the consistency constraints in the local objective functions of RMGs and ADN, and then an iterative procedure can be executed to enforce the difference between virtual generator and virtual load to be small enough and find the optimal coordinated operation point of the entities. Augmented Lagrangian relaxation with an alternating direction method of multipliers is adopted to model the penalty function π(·) [32], and it has a good convergence property for the convex optimization problem [28]. Thus, the optimization objectives of RMGs and ADN can be rewritten respectively as follows: The flowchart of ATC-based distributed optimal coordinated operation of ADN with multi-RMGs is shown in Figure 5. The corresponding steps are illustrated as follows: Appl. Sci. 2019, 9, x FOR PEER REVIEW 10 of 17   Step 1. Initialize the input data. Set the initial values of the coupling variables (p DN m , p GD m ) and the Augmented Lagrangian penalty multipliers α m , β m and γ, set the ATC convergence tolerances, set iteration index to n = 1.

Test System and Data
Step 2. Each RMG solves its own optimization problem independently and transfers its optimal virtual generationp GD m to the ADN level. In this step, the optimization problems in RMG level are optimized in parallel.
Step 3. After receivingp GD m from the RMGs, the ADN solves its optimization problem of (29). Then its optimal virtual loadp DN m is obtained and transmitted to the connected RMGs.
In the above formulation, the subscript n or (n-1) represents the nth or (n-1)th iteration. G ap denotes the mismatch between the virtual generation and virtual load, which reflects the maximum gap in consistency constraints. R el denotes the relative difference in objective function between two consecutive loop iterations. δ 1 and δ 2 represent pre-determined convergence tolerances. If the inequalities (32) and (33) both are satisfied, the iterative process stops, and the converged optimal result is obtained, otherwise, go to Step 5.
Step 5. Set n=n+1 and update the Augmented Lagrangian penalty multipliers according to (34), and then return to Step 2.

Test System and Data
The case study is conducted on the modified IEEE-33 bus distribution system to coordinate the energy management and optimal operation between RMGs and ADN during 24 h of operation as shown in Figure 6.  The RMGs are connected to bus 1-18 in the IEEE 33-bus system. Every RMG includes 50 households andare considered to have the same load-demand profile. The 24-h load-demand profile for a typical household is shown in Figure 7. The daily load curve for the remaining buses of the IEEE 33-bus system and time-of-use (TOU) electricity price are illustrated in Figure 8. Their controllable DGs are connected to buses 22, 23 and 27 respectively, and their corresponding rated active power is 3MW, 3.5MW and 4.5MW. The corresponding parameter settings for the ATC algorithm are: α m = β m = 1, γ = 2, δ 1 = 0.01, δ 2 = 0.001. The proposed optimization problems are implemented in MATLAB2015 utilizing the CPLEX12.5 solver [31].

Simulation Results and Discussion
In the RMGs level, the optimization problems of energy management are solved in parallel. The optimized result of energy resources scheduling for an arbitrarily specified RMG is shown in Figure  9.

Simulation Results and Discussion
In the RMGs level, the optimization problems of energy management are solved in parallel. The optimized result of energy resources scheduling for an arbitrarily specified RMG is shown in Figure  9.

Simulation Results and Discussion
In the RMGs level, the optimization problems of energy management are solved in parallel. The optimized result of energy resources scheduling for an arbitrarily specified RMG is shown in Figure 9. It is obvious that flexible and EVs charging loads can effectively aid the peak clipping and valley filling by increasing the use of power energy during off-peak periods while reducing the amount of electric power used during on-peak periods. According to the optimized results, the flexible loads are put into operation between 01:00 hrs and 06:00 hrs, while the EVs are charged between 02:00 hrs and 06:00 hrs and at 12:00 hrs with lower prices. During peak hours (18:00 hrs to 22:00 hrs), EVs It is obvious that flexible and EVs charging loads can effectively aid the peak clipping and valley filling by increasing the use of power energy during off-peak periods while reducing the amount of electric power used during on-peak periods. According to the optimized results, the flexible loads are put into operation between 01:00 hrs and 06:00 hrs, while the EVs are charged between 02:00 hrs and 06:00 hrs and at 12:00 hrs with lower prices. During peak hours (18:00 hrs to 22:00 hrs), EVs provide power supply to the household loads in the RMG by V2H discharging. During daylight hours, the electric power consumed by household loads is covered from the purchased electricity from the DN and PV generation.
The RMG is the aggregate of household prosumers, the optimized scheduling result of EV and flexible loads for a household prosumer within the RMG is shown in Figure 10. It is obvious that flexible and EVs charging loads can effectively aid the peak clipping and valley filling by increasing the use of power energy during off-peak periods while reducing the amount of electric power used during on-peak periods. According to the optimized results, the flexible loads are put into operation between 01:00 hrs and 06:00 hrs, while the EVs are charged between 02:00 hrs and 06:00 hrs and at 12:00 hrs with lower prices. During peak hours (18:00 hrs to 22:00 hrs), EVs provide power supply to the household loads in the RMG by V2H discharging. During daylight hours, the electric power consumed by household loads is covered from the purchased electricity from the DN and PV generation.
The RMG is the aggregate of household prosumers, the optimized scheduling result of EV and flexible loads for a household prosumer within the RMG is shown in Figure 10. By comparing Figure 10 and Figure 7, it is obvious that the shiftable loads are allocated during the off-peak hours inline with the lower energy prices, and the EV's battery is also charged when electricity prices are relatively lower (i.e., early morning). Moreover, it can be seen that the EV battery is used as electricity storage for household loads and provides a V2H service during peak load period, i.e., the energy stored in the EV's battery supplies the domestic loads from 18:00 hrs to 22:00 hrs during the peak load period. Moreover, it can be seen that the household prosumer has two hours of autonomous operation, i.e., during 10:00 hrs and 18:00 hrs when RMG is independent of the main grid. The advantage is assisted by rooftop PV generation, demand responses of EV and flexible loads. By comparing Figures 7 and 10, it is obvious that the shiftable loads are allocated during the off-peak hours inline with the lower energy prices, and the EV's battery is also charged when electricity prices are relatively lower (i.e., early morning). Moreover, it can be seen that the EV battery is used as electricity storage for household loads and provides a V2H service during peak load period, i.e., the energy stored in the EV's battery supplies the domestic loads from 18:00 hrs to 22:00 hrs during the peak load period. Moreover, it can be seen that the household prosumer has two hours of autonomous operation, i.e., during 10:00 hrs and 18:00 hrs when RMG is independent of the main grid. The advantage is assisted by rooftop PV generation, demand responses of EV and flexible loads.
Energy consumption cost minimization is a major objective for every household prosumer. Table 1 shows the daily energy costs based on TOU electricity price for a typical household in RMG level under the un-optimized case and the proposed energy coordinated mode. The positive values mean the amount of energy cost that a household prosumer is required to pay, and the negative values mean the amount of the cost saved. From Table 1 it can be seen that shifting EV charging and flexible loads from high-demand hours to off-peak hours a significant amount of cost can be saved. The cost went down from $9.93 to $3.06, a reduction in the cost about 69%. The V2H system usage also brings a respectable energy cost saving ($5.22) to individual household prosumer. Figure 11 shows the power scheduling results of controllable DGs in the distribution network from the proposed method in the minimum cost operational solution of ADN. From Table 1 it can be seen that shifting EV charging and flexible loads from high-demand hours to off-peak hours a significant amount of cost can be saved. The cost went down from $9.93 to $3.06, a reduction in the cost about 69%. The V2H system usage also brings a respectable energy cost saving ($5.22) to individual household prosumer. Figure 11 shows the power scheduling results of controllable DGs in the distribution network from the proposed method in the minimum cost operational solution of ADN. Blue is the cumulate profile under the un-optimized case while red is the cumulate profile under the proposed distributed optimal coordinated operation mode. It is obvious that the output power of all sources in the distribution system level becomes smooth after optimizing since the proposed method allows for optimized scheduling of demand responses to household prosumers in the RMG level so that shifting electric demand from on-peak periods to off-peak periods. It illustrates that the proposed method includes coordinating RMGs and distribution system operation strategy to have peak shaving and smoothing for distribution load curve at the same time, which can benefit distribution system operators through existing grid capacity upgrade/expansion deferrals. Table 2 illustrates the daily operating costs and the active power losses for the distribution network under the un-optimized case and the proposed optimal coordinated operation mode. Blue is the cumulate profile under the un-optimized case while red is the cumulate profile under the proposed distributed optimal coordinated operation mode. It is obvious that the output power of all sources in the distribution system level becomes smooth after optimizing since the proposed method allows for optimized scheduling of demand responses to household prosumers in the RMG level so that shifting electric demand from on-peak periods to off-peak periods. It illustrates that the proposed method includes coordinating RMGs and distribution system operation strategy to have peak shaving and smoothing for distribution load curve at the same time, which can benefit distribution system operators through existing grid capacity upgrade/expansion deferrals. Table 2 illustrates the daily operating costs and the active power losses for the distribution network under the un-optimized case and the proposed optimal coordinated operation mode. It can be derived from the above results that the operating cost and power loss has been reduced by 41.72% and 17.98% respectively during a day based on the proposed ATC-based distributed optimal coordinated operation method. It shows that the proposed method provides an effective solution for distribution system operators to improve economic operation and energy efficiency of DN. Figure 12 depicts the evolution of the proposed ATC-based method. According to the pre-determined convergence thresholds the method converges within 19 iterations. When it converged, the total computation time consumed by the proposed method is 91.8s. As shown in Figure 12a, the maximal difference between virtual generation and virtual load G ap is smaller than 0.01, while the relative difference in optimal feasible solutions R el is smaller than 0.001, as shown in Figure 12b.
It can be derived from the above results that the operating cost and power loss has been reduced by 41.72% and 17.98% respectively during a day based on the proposed ATC-based distributed optimal coordinated operation method. It shows that the proposed method provides an effective solution for distribution system operators to improve economic operation and energy efficiency of DN. Figure 12 depicts the evolution of the proposed ATC-based method. According to the predetermined convergence thresholds the method converges within 19 iterations. When it converged, the total computation time consumed by the proposed method is 91.8s. As shown in Figure 12a, the maximal difference between virtual generation and virtual load ap G is smaller than 0.01, while the relative difference in optimal feasible solutions el R is smaller than 0.001, as shown in Figure 12b. It should be noted that the proposed hierarchical optimization uses a deterministic load modeling approach, but the iterative process in analytical target cascading algorithm based distributed optimization will convergence regardless of stochasticity [28] in load, although the global optimum, and thus number of iterations and the point of convergence, will be affected.
The solutions to the proposed distributed method and the centralized method are compared in Table 3, the distributed result is close to the centralized result and relative error is 0.0146. It shows that the proposed ATC-based distributed coordinated method provides a feasible and effective solution to coordinate energy management and optimal operation between the RMGs and ADN. It should be mentioned that our design in this paper focuses on providing an interrelation between ADN and RMGs and aims at coordinating optimal hourly energy consumption scheduling and operation management between the two entities. Although simplified EV and shiftable load models and constant household profiles are adopted for simplicity in this work, the flexibility and generality of the proposed hierarchical optimization framework makes it suitable for further considering load modeling with better accuracy and rationality. It should be noted that the proposed hierarchical optimization uses a deterministic load modeling approach, but the iterative process in analytical target cascading algorithm based distributed optimization will convergence regardless of stochasticity [28] in load, although the global optimum, and thus number of iterations and the point of convergence, will be affected.
The solutions to the proposed distributed method and the centralized method are compared in Table 3, the distributed result is close to the centralized result and relative error is 0.0146. It shows that the proposed ATC-based distributed coordinated method provides a feasible and effective solution to coordinate energy management and optimal operation between the RMGs and ADN. It should be mentioned that our design in this paper focuses on providing an interrelation between ADN and RMGs and aims at coordinating optimal hourly energy consumption scheduling and operation management between the two entities. Although simplified EV and shiftable load models and constant household profiles are adopted for simplicity in this work, the flexibility and generality of the proposed hierarchical optimization framework makes it suitable for further considering load modeling with better accuracy and rationality.

Conclusions and Future Works
In this paper, a hierarchical structure of DN integration of multi-RMGs is presented while considering the household prosumers cluster as an RMG. The RMG integrating into future distribution system has significant potentials to improve energy efficiency and economic benefits for the RMGs and ADN by coordinating optimal energy consumption scheduling and operation management between the two entities. A distributed coordination and hierarchical optimization method based on ATC is proposed for residential microgrids integrated into the distribution system while considering the demand responses of EVs and flexible loads in households and the underlying power flow balance constraints in distribution network level. Based on that, the optimization problems of RMGs and ADN are completely separated from each other and solved independently. A case study is provided to prove the feasibility and effectiveness of the proposed method. The test results show that the method performs an effective function on peak-load shifting and jointly maximizing the welfare of both household prosumers and distribution system operator.
There are several directions that the proposed hierarchical optimization framework can be further extended.

•
Energy consumption behaviors of households are considered to be the same in small-scale residential areas and constant household profiles are adopted, which is simplified. The proposed hierarchical optimization framework will be extended to a stochastic bi-level programming problem considering individual household profiles in our future work, which can be tackled by using the scenario-based optimization approach.

•
Energy interactions among the individual household prosumers within RMG while taking into account their differences in energy consumption behaviour will be incorporated into the coordinating energy management between the RMGs and ADN.

•
There are stochasticity and uncertainty in loads. Popular optimization techniques such as stochastic optimization and robust optimization [33] to deal with load uncertainty in coordinating energy management is an interesting research topic for further works.