Breaking Diversity Restriction: Distributed Optimal Control of Standalone DC Microgrids
Abstract
Standalone direct current (DC) microgrids may belong to different owners and adopt various control strategies. This brings great challenge to its optimal operation due to the difficulty of implementing a unified control. This paper addresses the distributed optimal control of DC microgrids, which intends to break the restriction of diversity to some extent. Firstly, we formulate the optimal power flow (OPF) problem of standalone DC microgrids as an exact second order cone program (SOCP) and prove the uniqueness of the optimal solution. Then a dynamic solving algorithm based on primaldual decomposition method is proposed, the convergence of which is proved theoretically as well as the optimality of its equilibrium point. It should be stressed that the algorithm can provide control commands for the three types of microgrids: (i) power control, (ii) voltage control and (iii) droop control. This implies that each microgrid does not need to change its original control strategy in practice, which is less influenced by the diversity of microgrids. Moreover, the control commands for power controlled and voltage controlled microgrids satisfy generation limits and voltage limits in both transient process and steady state. Finally, a sixmicrogrid DC system based on the microgrid benchmark is adopted to validate the effectiveness and plugnplay property of our designs.
I Introduction
Microgrids are clusters of distributed generators (DGs), energy storage systems (ESSs) and loads, which are generally categorized into two types: alternating current (AC) and direct current (DC) microgrids [1, 2]. In the past decade, research has been concentrated on enhancing the performance of AC microgrids. However, some generations and loads are inherently DC, such as photovoltaic (PV), battery, computer and electrical vehicle (EV) [3, 4, 5]. DC microgrids more naturally integrate them and can eliminate unnecessary conversion processes, which improves system efficiency and reliability. In addition, DC systems do not face problems such as reactive power compensation, frequency stability and synchronization [3], which makes it more and more popular in power system. In DC microgrids, hierarchical control is often utilized [6, 7], i.e., primary control, secondary control and tertiary control, which can be implemented in either a centralized manner or a distributed manner. In the centralized manner, a control center is needed to accumulate information from microgrids, compute command and send it back to them. With the increasing number of microgrids as well as uncertainties of renewable generations and load demands, centralized control faces a great challenge, i.e., it is less and less applicable due to problems, e.g., single point failures, heavy communication burden of control center and lack of ability to respond rapidly enough [8]. These problems highlight the need for a distributed control strategy that will require no control center and less communication. This paper addresses this need.
In the hierarchical control architecture, the primary control is almost decentralized. The most popular control manner is the droop control [6, 9], where load sharing is mainly determined by the droop coefficient. As pointed out in [10, 11], droop control cannot achieve proper load sharing sometimes, especially in systems with unequal resistances and different modes. Many improvements are investigated [10, 11, 12, 13, 14]. Taking into consideration the effect of different line impedances, [10] proposes a decentralized control strategy to achieve perfect power sharing. In [11], a modeadaptive decentralized control strategy is proposed for the power management in DC microgrid, which enlarges the control freedom compared with the conventional droop control. In [14], a decentralized method is proposed to adjust the droop coefficient by the stateofcharge of storage, which can achieve equal load sharing. However, similar to the AC power system, primary control in DC system suffers from voltage deviation in the steady state.
To eliminate the voltage deviation, distributed secondary control is developed. The most widely used method is consensus based control [15], where there is usually a global control variable, e.g., global voltage deviation, while each agent only has its local estimation. In the DC system, each agent may represent a DG or a microgrid. By exchanging information with neighbors, the value of the variable will be identical for all agents finally [16, 7, 17, 18]. In [7], each microgrid uses dynamic consensus protocol to estimate the global averaged voltage with the local and neighboring estimation. Then, the estimated voltage is compared with the reference value and fed to a PI controller to eliminate the voltage deviation. This method is further improved in [17] by adding a current consensus regulator, where the control goal is to achieve globally identical current ratio compared with the rated current of each microgrid. By doing so, the equal load sharing can be obtained. The discrete consensus method is used in [18] to restore average voltage with accurate load sharing. The consensus based secondary control can realize equality among agents, however, the results may not be optimal.
Tertiary control is to achieve the optimal operation by controlling the power flow among microgrids or among DGs within a microgrid [19, 20, 21]. Conventionally, tertiary control provides reference operation point for the system. Its time scale is much slower than real time control. However, values of renewable generations and loads may change rapidly due to uncertainties, which makes reference point obtained by tertiary control suboptimal in the new situation. This requires us to combine realtime coordination and steadystate optimization together, i.e., the optimization solution should be sent to the system in real time. Similar works are given in both AC system [22, 23, 24] and DC system [25, 26, 27]. The critical thought in [25, 26, 27] is that the incremental generation cost of each microgrid is identical in the steady state. In [25], economic dispatch problem is formulated and the incremental generation cost is regarded as consensus variable. Using the consensus method, the incremental generation cost will be identical in the steady state, and optimality is achieved. Similar method is also used in [27], where the subgradient is added to the consensus approach in order to accelerate the convergence. These works are very inspiring in combination of optimal operation and real time control, but they still have some restrictions. For example, the original control strategy of a microgrid has to be revised to the proposed method, which is hard to apply as microgrids may belong to different owners and adopt various control strategies. These problems highlight the need for a distributed control strategy that is less influenced by the diversity.
In this paper, we investigate the distributed optimal power flow control among standalone DC microgrids, which is less influenced by their original control strategies. We construct an optimal power flow (OPF) model for standalone microgrids with an exact SOCP relaxation and further prove the uniqueness of its optimal solution. By using the primaldual decomposition method, a distributed dynamic algorithm is proposed, which provides control commands for different control strategies such as power control, voltage control and droop control. This implies that we do not change the original control schemes of microgrids, which breaks the restriction of microgrid diversity. In addition, constraints of generation capacity limits and voltage limits are enforced even in the transient process of control commands, which implies power commands are always feasible and voltage commands are safe for converters. In this regards, it increases the security of DC system. Furthermore, we also prove the convergence of the algorithm and optimality of the equilibrium point. The contributions of this paper have following aspects:

The OPF model of standalone DC power system is formulated, and the uniqueness of its optimal solution is proved.

A fully distributed algorithm is proposed to achieve the optimal solution of the OPF problem, where only communications with neighbors are needed with minimal communication burden.

The proposed method does not change the original control strategy of each DG, which adapts to three most common control modes: power control, voltage control and droop control, breaking restriction of microgrid diversity.

The control commands for power controlled and voltage controlled microgrids satisfy generation limits and voltage limits in both transient process and steady state.
The rest of the paper is organized as follows. In Section II, network model of DC microgrids is introduced. In Section III, OPF model for standalone DC microgrids is formulated. In Section IV, the dynamic algorithm is proposed, the optimality and convergence of the algorithm are proved theoretically. The implementation approach is designed in Section V. Case studies are given in Section VI. Finally, Section VII concludes the paper.
Ii Network Model
A standalone DC system is composed of a cluster of microgrids connected by lines. Each microgrid is treated as a bus with generation and load. Then the whole system is modeled as a connected graph , where is the set of microgrids and is the set of lines. If two microgrids and are connected by a tie line directly, we denote , and abbreviated by . The resistance of line is . The power flow from microgrid to microgrid is , and the current from microgrids to is . Let be the number of lines.
For each microgrid , let denote the generation at time and denotes its constant load demand. Denote the voltage at bus as . DGs in the DC microgrids may have different control strategies, such as power control, voltage control and droop control. Power control and voltage control only require their reference values, which are not introduced here in detail. Droop control takes the form:
(1) 
where , is the droop coefficient, is the voltage square reference, and are constants. is the power when , which is a variable in the rest of the paper.
Denote the current in line from to as , which is defined
(2) 
Then the power from to is
(3) 
Consequently, the power balance in one node is
(4a)  
(4b)  
where is the set of microgrids connected with microgrid directly. 
Our goal is to provide control commands for microgrids adopting different control strategies, which must satisfy the operational constraints:
(5a)  
(5b)  
where is the upper limit of generation in DG , are lower and upper limits of voltage. For power controlled DG, (5a) is a hard limit, which must be satisfied even during the transient process. Otherwise it is nonexecutable. For voltage controlled DG, (5b) is not a hard limit, but it also should be satisfied during the transient. This is because overlimit voltage is not secure for the converter nor the operator. 
Iii Optimal Power Flow Problem
Iiia OPF Model
Existing OPF models are mainly for gridconnected DC system [28]. However, DC microgrids also operate in isolated mode in many situations such as in remote areas or islands. In terms of this, we formulate the ordinary OPF in the standalone DC power system.
(6a)  
s. t.  (6g)  
where . 
If always holds, can be divided into . The cost (6a) is a function of generation in each node, which should satisfy

is strictly increasing when for , second order continuously differentiable and strongly convex .
Constraint (6g) is derived from (5b), and (6g) is from (4a). Constraint (6g) implies matrix is positive semidefinite, and (6g) guarantees the rank of be 1. The difference between (6) and in [28] is that there is no substation node with fixed voltage in (6). (6) is not convex due to constraint (6g). Remove (6g), and we get the SOCP relaxation of (6).
s. t. 
It has been proved in [29] that the relaxation is exact provided that: 1) ; 2) ; 3) ; 4) is strictly increasing when for . In this paper, conditions 1), 2), 3) are satisfied. With assumption A1, 4) is also satisfied.
To improve the numerical stability of the SOCP, we have the following stable SOCP problem.
According to Theorem 5 in [28], SOCP and SSOCP are equivalent, i.e., there exists a onetoone map between the feasible set of SOCP and the feasible set of SSOCP, which is
(8) 
In some microgrids, droop control is utilized. However, the solution of (7) cannot guarantee and satisfy (1), which implies that the optimal solution may not be achieved in reality. In this regard, we add droop control to the constraints, then the problem becomes
s. t. 
In DSOCP, the droop coefficient is a constant, while is an optimization variable, making DSOCP a convex problem.
To help design the algorithm, an equivalent optimization problem is formulated.
s. t. 
where , .
Since for any feasible solution of ESOCP we all have , ESOCP is equivalent to DSOCP. and are only put here to accelerate the convergence of the algorithm [30].
IiiB Uniqueness of Optimal Solution
Before introducing the results, we give an assumption.

The OPF (6) is feasible.
Then, we have the following theorem.
Theorem 1.
Suppose A1 and A2 hold. The optimal solution of SSOCP is unique.
The proof of Theorem 1 is given in Appendix A.
Theorem 2.
Denote the optimal solution of SSOCP as and the optimal solution of DSOCP as . Then,

there exists an unique making the optimal solution of DSOCP;

the optimal solution of DSOCP is unique;

.
The proof of Theorem 2 is given in Appendix A.
Suppose the optimal solution of DSOCP is with the droop coefficient . From the proof of 1) in Theorem 2, if changes to , there exists an unique making be the optimal solution of DSOCP. This implies that droop coefficient does not influence the optimal solution of SSOCP.
Lemma 3.
Optimization problem ESOCP and DSOCP have identical feasible solutions.
It is easy to prove Lemma 3 as and for any feasible solution.
Remark 1.
From Theorem 2, it is shown that the unique optimal solution still exists even if droop control is considered, and we can obtain the optimal in droop control. Moreover, for these microgrids that do not adopt droop control, ESOCP can provide the optimal output power and voltage references. In addition, for different droop coefficient , in the optimal solution does not change. Thus, for microgrids that do not adopt droop control, we can just assign an imaginary droop control to them when formulating ESOCP, i.e., assuming all the microgrids adopt droop control when building ESOCP. This does not influence the optimal solution of these microgrids adopting power control and voltage control. In this regard, our method adapts to three different control strategies.
Iv Control Scheme Design
Iva Distributed Algorithm
Based on the primaldual algorithm, we propose the following distributed approach to solve the ESOCP, which is
(9a)  
(9b)  
(9c)  
(9d)  
(9e)  
(9f)  
(9g)  
(9h)  
(9i)  
(9j) 
where . For any with , . Operator is
The algorithm (9) is fully distributed where each MG updates its internal states , , , , , , , , relying only on local information and neighboring information. The neighboring information only appear in variables .
Next, we will investigate the boundedness of . Firstly we introduce the assumption
Define the set
(10) 
then we will prove the boundedness property of .
Lemma 4.
Proof of Lemma 4.
Note that (9a) is an inertia link with input
According to the feature of inertia link, for all holds as long as for all . Thus, we know for all always holds. Similarly, for all always holds. This completes the proof. ∎
Lemma 4 implies that inequality constraints are enforced even in the transient for and .
IvB Optimality of Equilibrium Point
In this subsection, we will prove that the equilibrium points of (9) are primaldual optimal for ESOCP and its dual, and vice versa. Firstly, the definition of equilibrium points of (9) and the optimal solution of ESOCP are given in Definition 1 and Definition 2 respectively.
Given , , two definitions are introduced.
Definition 2.
A point is primaldual optimal if is optimal for ESOCP and is optimal for its dual problem.
To prove the optimality of , we make the following assumption:

Slater’s condition for ESOCP holds.
We first illustrate that the saturation of controller does not influence the optimal solution of ESOCP, which is introduced in Lemma 5.
Lemma 5.
Suppose A1, A2 and A4 hold. If is primaldual optimal, we have
Theorem 6.
Suppose A1, A2, A3 and A4 hold. A point is primaldual optimal if and only if it is an equilibrium of the dynamic system (9).
The proof of Theorem 6 is given in Appendix B.
IvC Convergence Analysis
In this subsection, we will justify the convergence of the algorithm (9) by projection gradient theory combined with invariance principle for switched system.
Denote and define in a fixed .
(12) 
is continuously differentiable in a fixed .
We further define the set
where is given in (10). For any , the projection onto is
where is the Euclidean norm. Then, the algorithm (9) can be rewritten as
(13) 
A point is an equilibrium of (13) if and only if it is a fixed point of the projection:
Let be the set of equilibrium points.
Theorem 7.
Suppose A1, A2, A3 and A4 hold. Then every trajectory of (13) starting from a finite initial state asymptotically converges to some equilibrium as that is optimal for problem ESOCP.
The proof of Theorem 7 is provided in Appendix C.
V Implementation
Each microgrid may adopt different control strategies: voltage control, power control or droop control. Different strategies require different control commands, which are , respectively. Since we combine optimization with real time control, values of , in the transient process are also sent to the corresponding DGs as the control commands. To distinguish with state variables , , control commands sent to DGs are denoted as , and respectively. For voltage and power control, the algorithm (9) can provide and that are all feasible even in the transient process. For the droop control microgrids, we can supply , which ensures the system operate in the optimal status. The control diagrams for three types of microgrid are shown in Fig.1.
In Fig.1, the left part is the proposed algorithm, the inputs of which are local information , , , , , , , and neighbor information . The outputs are , and . The right part is the diagrams of three control strategies: power control, voltage control and droop control. For power controlled DG, it has two control loops, power loop and current loop, where is the current reference for the current control loop and is the measured current. For voltage controlled DG, it also has two control loops, power loop and current loop, where is the measured voltage. For droop controlled DG, it has three control loops, droop control loop, power loop and current loop, where both voltage and current need to be measured.
From Fig.1, we can see that our method adapts to three commonly used control strategies, which in some sense implies it breaks restriction of various control strategies in microgrids in achieving optimal operation point.
Remark 2.
In fact, for microgrid , neighbor information and can be estimated locally by the following equations
where line current from microgrid to can be measured locally. Then, only need to be exchanged between neighbors, which implies that the communication burden is minimized.
In the real system, some microgrid may switch off or switch on unexpectedly. The system should also operate optimally in this situation. This requires the controller has the capability of plugnplay, which will be shown in the simulation.
Vi Case Studies
Via Test System
To verify the effectiveness of the proposed approach, a multimicrogrid DC system is utilized, the topology of which is based on the low voltage microgrid benchmark in [31]. The system includes two feeders with six dispatchable DGs, which are divided into six microgrids based on corresponding DGs. The Breaker 1 is open, and the system operates in an isolated way. The simulation is performed in PSCAD joint with Matlab. More specifically, the DC microgrids are modeled in PSCAD, whereas algorithm (9) is computed in Matlab. They are combined by a userdefined interface. The control commands obtained in Matlab are sent to corresponding microgrids in PSCAD through the interface. Conversely, MATLAB can also collect data from PSCAD. In this regards, the PSCAD represents the physical system, while MATLAB represents the cyber system. Communication exists in cyber system to obtain the neighborhood information. The joint simulation flowchart is illustrated in Fig.3.
0.036  0.03  0.035  0.03  0.035  0.042  
1  1  1  1  1  1  
51  50  52  49  52  50  
50  60  55  60  55  45  
420  420  420  420  420  420  
380  380  380  380  380  380  
0.12  0.125  0.164  0.131  0.156  0.131 
The objective function is set as , which represents the generation cost of the whole system as the generation cost also takes the quadratic form [32, 27]. If , it satisfies A1. Some parameters for these microgrids are provided in Table.I . The simulation case is that load demands in each microgrid is at first, then they will increase to at time 1s. All the three regular control strategies are utilized, i,e, DG1 and DG6 adopt droop control, DG2 and DG5 use power control while DG3 and DG4 adopt voltage control.
ViB Accuracy Analysis
In this subsection, we also use CVX tool in Matlab to solve ESOCP, results of which after load increases are utilized as basic values to validate the accuracy of the proposed approach. Results of these two methods are compared in Table II.
Generation (kW)  Power reference (kW)  

(%)  (%)  
1  48.1701  48.1823  0.0253  46.7315  46.8543  0.2621 
2  57.4041  57.4227  0.0324  56.3536  56.7590  0.5381 
3  49.3516  49.3602  0.0174  48.2000  48.6611  0.3311 
4  56.9853  56.9861  0.0014  56.9264  56.9861  0.1048 
5  49.9761  50.0053  0.0584  48.8660  48.3499  0.4470 
6  42.1217  42.1495  0.0660  39.2465  39.2176  0.0737 
In Table II, and are and of all DGs obtained by the proposed approach, while and are values obtained using the CVX tool. is the errors of and with regards to and . From results in Table II, it can be seen that the absolute errors between and in each MGs are smaller than . In addition, the absolute errors between and are smaller than . Both validate the accuracy of the proposed approach.
ViC Dynamic Process
In this subsection, we analyze the impacts of generation limits on the dynamic property. To do this, we compare dynamic responses of the inverter outputs in microgrids 2 and 5 by two scenarios: with and without saturation. The trajectories in two cases are given in Fig.4. In both cases, the same steady state generations are achieved. However, with the saturated controller, the generations of DG2 and DG5 remain within the limits in both transient and steady state. On the contrary, generatons of DG2 and DG5 violate their upper limits in the transient, which is practically infeasible.
Similarly, we also compare the voltage dynamics of DG3 and DG4 in two scenarios: with and without saturation. The trajectories in two cases are given in Fig.5. In both cases, the same steady state voltages are achieved. However, with the saturated controller, the voltages of DG3 and DG4 remain within the limits in both transient and steady state. On the contrary, voltages of DG3 and DG4 violate their upper limits in the transient process if saturation is not considered. As we know, the high voltage is both harmful to the power electronic equipments and system operators. In this sense, our method can increase system security.
We reset kW at s, where the power limits of DG2 and DG5 are reduced to kW and kW respectively. This implies that they can be strictly reached in the steady state. This scenario often happens in microgrids since generation limits of renewable resources such as wind turbines and PVs can change rapidly due to uncertainties. The generations of all DGs with different capacity constraints are given in Fig.6.
We have checked that generations in Fig.6 are identical with results obtained by CVX. In Fig.6, it is shown that generations of DG2 and DG5 reduce rapidly to the capacity limits in the new situation. Other DGs will change their generations to balance the power mismatch in the whole system. This implies our methodology can adapt to disturbances of renewable generations.
ViD Plugnplay Analysis
In this case, microgrid 6 is switched off at 1s, then it is switched on at 9s. When microgrid 6 is switched off, it has to supply the load demand itself while microgirds 1 to 5 remain connected. Voltage and generation dynamics in the whole process are illustrated in Fig. 7.
It is shown that output of DG6 increases to 50kW to supply the load in microgrid 6 after being switched off. At the same time, the voltage of DG6 reduces to 400V. The result is identical with that obtained by CVX. In addition, after microgrid 6 is switched on once again, the generations and voltages of all DGs recover to the original values. Moreover, by comparing the voltages in the transient process, it is shown that only the two DGs connected directly with the breaking point are influenced greatly, while other DGs like DG1DG4 have very moderate transient process. This validates that our controller can realize plugnplay.
Vii Conclusion
This paper addresses the distributed optimal control of standalone DC microgrids, where each microgrid may adopt one of the three different control strategies, such as power control, voltage control and droop control. The controller can provide commands for all these strategies, which implies it breaks restriction of various control strategies to achieve optimal operation point. A sixmicrogrid system based on the microgrid benchmark is utilized to demonstrate the efficacy of our designs. The error of results between proposed method and CVX tool is smaller than , which validates the accuracy of the proposed approach. Moreover, the commands for power controlled and voltage controlled microgrids satisfy generation limits and voltage limits in both transient process and steady state. This increases the security of DC system. In addition, our controller can adapt to the uncertainties of renewable generations. Finally, the proposed approach can realize the plugnplay.
The tieline limit is not considered in this work since the convex relaxation may be not exact if it is included. In the normal operation, tie line limit in microgrids is often satisfied by planning stage. However, it is also very important when large disturbance happens. In the future research, we will investigate approaches to addressing this problem.
References
 [1] J. J. Justo, F. Mwasilu, J. Lee, and J.W. Jung, “Acmicrogrids versus dcmicrogrids with distributed energy resources: A review,” Renew. Sustain. Energy Rev., vol. 24, pp. 387 – 405, 2013.
 [2] E. Planas, J. Andreu, J. I. G rate, I. M. de Alegr a, and E. Ibarra, “Ac and dc technology in microgrids: A review,” Renew. Sustain. Energy Rev., vol. 43, pp. 726 – 749, 2015.
 [3] T. Dragicevic, X. Lu, J. C. Vasquez, and J. M. Guerrero, “Dc microgrids  part i: A review of control strategies and stabilization techniques,” IEEE Trans. Power Electron., vol. 31, no. 7, pp. 4876–4891, Jul. 2016.
 [4] T. Dragicevic, X. Lu, J. C. Vasquez, and J. M. Guerrero, “Dc microgrids  part ii: A review of power architectures, applications, and standardization issues,” IEEE Trans. Power Electron., vol. 31, no. 5, pp. 3528–3549, May. 2016.
 [5] A. T. Elsayed, A. A. Mohamed, and O. A. Mohammed, “Dc microgrids and distribution systems: An overview,” Electr. Power Syst. Res., vol. 119, pp. 407 – 417, 2015.
 [6] J. M. Guerrero, J. C. Vasquez, J. Matas, L. G. de Vicuna, and M. Castilla, “Hierarchical control of droopcontrolled ac and dc microgrids  a general approach toward standardization,” IEEE Trans. Ind. Electron., vol. 58, no. 1, pp. 158–172, Jan. 2011.
 [7] Q. Shafiee, T. Dragicevic, J. C. Vasquez, and J. M. Guerrero, “Hierarchical control for multiple dcmicrogrids clusters,” IEEE Trans. Energy Convers, vol. 29, no. 4, pp. 922–933, Dec. 2014.
 [8] M. Yazdanian and A. MehriziSani, “Distributed control techniques in microgrids,” IEEE Trans. Smart Grid, vol. 5, no. 6, pp. 2901–2909, Nov. 2014.
 [9] A. Maknouninejad, Z. Qu, F. L. Lewis, and A. Davoudi, “Optimal, nonlinear, and distributed designs of droop controls for dc microgrids,” IEEE Trans. Smart Grid, vol. 5, no. 5, pp. 2508–2516, Sep. 2014.
 [10] A. Khorsandi, M. Ashourloo, and H. Mokhtari, “A decentralized control method for a lowvoltage dc microgrid,” IEEE Trans. Energy Convers., vol. 29, no. 4, pp. 793–801, Dec. 2014.
 [11] Y. Gu, X. Xiang, W. Li, and X. He, “Modeadaptive decentralized control for renewable dc microgrid with enhanced reliability and flexibility,” IEEE Trans. Power Electron., vol. 29, no. 9, pp. 5072–5080, Sep. 2014.
 [12] D. Chen and L. Xu, “Autonomous dc voltage control of a dc microgrid with multiple slack terminals,” IEEE Trans. Power Syst., vol. 27, no. 4, pp. 1897–1905, Nov. 2012.
 [13] M. D. Cook, G. G. Parker, R. D. Robinett, and W. W. Weaver, “Decentralized modeadaptive guidance and control for dc microgrid,” IEEE Trans. Power Del., vol. PP, no. 99, pp. 1–1, 2016.
 [14] X. Lu, K. Sun, J. M. Guerrero, J. C. Vasquez, and L. Huang, “Stateofcharge balance using adaptive droop control for distributed energy storage systems in dc microgrid applications,” IEEE Trans. Ind. Electron., vol. 61, no. 6, pp. 2804–2815, Jun. 2014.
 [15] R. OlfatiSaber, J. A. Fax, and R. M. Murray, “Consensus and cooperation in networked multiagent systems,” Proc. IEEE, vol. 95, no. 1, pp. 215–233, Jan. 2007.
 [16] Q. Shafiee, T. Dragicevic, F. Andrade, J. C. Vasquez, and J. M. Guerrero, “Distributed consensusbased control of multiple dcmicrogrids clusters,” in IECON 2014  40th Annual Conference of the IEEE Industrial Electronics Society, pp. 2056–2062, Oct. 2014.
 [17] V. Nasirian, S. Moayedi, A. Davoudi, and F. L. Lewis, “Distributed cooperative control of dc microgrids,” IEEE Trans. Power Electron., vol. 30, no. 4, pp. 2288–2303, Apr. 2015.
 [18] Z. Lv, Z. Wu, X. Dou, and M. Hu, “Discrete consensusbased distributed secondary control scheme with considering timedelays for dc microgrid,” in IECON 2015  41st Annual Conference of the IEEE Industrial Electronics Society, pp. 002 898–002 903, Nov. 2015.
 [19] L. Che and M. Shahidehpour, “Dc microgrids: Economic operation and enhancement of resilience by hierarchical control,” IEEE Trans. Smart Grid, vol. 5, no. 5, pp. 2517–2526, Sep. 2014.
 [20] J. Xiao, P. Wang, and L. Setyawan, “Hierarchical control of hybrid energy storage system in dc microgrids,” IEEE Trans. Ind. Electron., vol. 62, no. 8, pp. 4915–4924, Aug. 2015.
 [21] S. Moayedi and A. Davoudi, “Distributed tertiary control of dc microgrid clusters,” IEEE Trans. Power Electron., vol. 31, no. 2, pp. 1717–1733, Feb. 2016.
 [22] C. Zhao, U. Topcu, N. Li, and S. H.Low., “Design and stability of loadside primary frequency control in power systems,” IEEE Trans. Autom. Control, vol. 59, no. 5, pp. 1177–1189, Jan. 2014.
 [23] N. Li, C. Zhao, and L. Chen, “Connecting automatic generation control and economic dispatch from an optimization view,” IEEE Trans. Control Netw. Syst., vol. 3, no. 3, pp. 254–264, Sep. 2016.
 [24] F. Dorfler, J. W. SimpsonPorco, and F. Bullo, “Breaking the hierarchy: Distributed control and economic optimality in microgrids,” IEEE Trans. Control of Netw. Syst., vol. 3, no. 3, pp. 241–253, Sep. 2016.
 [25] S. Moayedi and A. Davoudi, “Unifying distributed dynamic optimization and control of islanded dc microgrids,” IEEE Trans. Power Electron., vol. 32, no. 3, pp. 2329–2346, Mar. 2017.
 [26] A. A. Hamad, M. A. Azzouz, and E. F. ElSaadany, “Multiagent supervisory control for power management in dc microgrids,” IEEE Trans. Smart Grid, vol. 7, no. 2, pp. 1057–1068, Mar. 2016.
 [27] Z. Wang, W. Wu, and B. Zhang, “A distributed control method with minimum generation cost for dc microgrids,” IEEE Trans. Energy Conver, vol. 31, no. 4, pp. 1462–1470, Dec. 2016.
 [28] L. Gan and S. H. Low, “Optimal power flow in direct current networks,” IEEE Trans. Power Sys., vol. 29, no. 6, pp. 2892–2904, Nov. 2014.
 [29] J. Li, F. Liu, Z. Wang et al., “On the exactness of relaxation for optimal power flow in standalone dc microgrids,” http://www.its.caltech.edu/~wangzj/dc_opf_20170528.pdf.
 [30] D. Feijer and F. Paganini., “Stability of primaldual gradient dynamics and applications to network optimization,” Automatica, vol. 46, no. 12, pp. 1974–1981, Dec. 2010.
 [31] S. Papathanassiou, N. Hatziargyriou, K. Strunz et al., “A benchmark low voltage microgrid network,” in Proceedings of the CIGRE symposium: power systems with dispersed generation, pp. 1–8, 2005.
 [32] Y. Xu and Z. Li, “Distributed optimal resource management based on the consensus algorithm in a microgrid,” IEEE Trans. Ind. Electron., vol. 62, no. 4, pp. 2584–2592, Apr. 2015.
 [33] M. Fukushima, “Equivalent differentiable optimization problems and descent methods for asymmetric variational inequality problems,” Math. programming, vol. 53, no. 13, pp. 99–110, Jan. 1992.
 [34] A. Bacciotti and F. Ceragioli, “Nonpathological lyapunov functions and discontinuous carath odory systems,” Automatica, vol. 42, no. 3, pp. 453 – 458, 2006.
Appendix A Proofs of Theorem 1 and Theorem 2
Aa Proof of Theorem 1
Proof.
If A2 holds, problem (7) is also feasible due to the onetoone map (IIIA). It suffices to prove the uniqueness of the optimal solution of SOCP. Let and be two optimal solutions of SOCP, then we have
(A.1) 
From the proof of Theorem 3 in [28], we know
From (4a), we have
Since is strictly increasing, we must have , otherwise it contradicts (A.1). We have , implying the uniqueness of SOCP solution. According to the onetoone map (IIIA), solution of SSOCP is also unique. This completes the proof. ∎
AB Proof of Theorem 2
Proof.
1) Suppose is the optimal solution of (7), there exists an unique satisfying (1). Since two problems have same objective function and constraints except constraint (1), is the optimal solution of DSOCP.
3) Since is the optimal solution of DSOCP, it also satisfies all the constraints of SSOCP. Moreover, DSOCP and SSOCP have identical objective functions, hence is the optimal solution of SSOCP. Due to the uniqueness of optimal solution of SSOCP, we have . This completes the proof. ∎
Appendix B Proofs of Lemma 5 and Theorem 6
Ba Proof of Lemma 5
Proof.
With assumption A1, A2 and A4, the strong duality holds. is the primaldual optimal if and only if it satisfies the KKT conditions.
The Lagrangian of ESOCP is given in (B.1).