## 3 ATC-Based Distributed Modeling for Multi-RMGs Integrated in ADN
### 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 (\(\Gamma\)) and responses (\(\textit{I}\)) are shared variables that denote the linking relations between the parent and the children. A parent transfers the optimized target \(\Gamma\) to its child elements, and \(\Gamma\) becomes the matching objective of children's responses \(\textit{I}\). In general, the simplified optimization model of the subsystem can be written as follows:  
\[\min:f_{sub}+\pi(\Gamma-I) \tag{1}\]  
\[\text{s.t.}\quad g_{sub}\leq 0\] \[h_{sub}=0 \tag{2}\]  
where \(f_{sub}\) denotes the local optimization objective of the subsystem, \(g_{sub}\) and \(h_{sub}\) are the sets of inequality and equality constraints, \(\pi(\Gamma-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 (\(\Gamma\) and \(\textit{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 \(\Gamma-I=0\), i.e., the consistency constraint among the subsystems is reached, and the optimal solutions for the  
Figure 2: The hierarchical structure of active distribution network (ADN) connected with Multi-RMGs, where the solid line with arrows represents the power flow and the dashed line with arrows represents information flow. 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^{\text{DN}}\) from the ADN standpoint and virtual generator \(p^{\text{GD}}\) from the RMG standpoint. Thus, \(p^{\text{GD}}\) is the power demanded by RMG and supplied by ADN in the RMG's optimization problem; and \(p^{\text{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^{\text{DN}}-p^{\text{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.