arxiv: v4 [math.oc] 19 Sep 2017

Similar documents
Aalborg Universitet. Published in: Proceedings of the 2018 American Control Conference (ACC)

Aalborg Universitet. Published in: 54th IEEE Conference on Decision and Control. DOI (link to publication from Publisher): /CDC.2015.

Aalborg Universitet. Published in: I E E E Transactions on Control Systems Technology

arxiv: v4 [cs.sy] 20 Dec 2013

Bioelectrical Circuits: Lecture 9

Architectures and Algorithms for Distributed Generation Control of Inertia-Less AC Microgrids

NETWORK CALCULATIONS updated 11/5/13 1:02 PM

ON SEPARATION PRINCIPLE FOR THE DISTRIBUTED ESTIMATION AND CONTROL OF FORMATION FLYING SPACECRAFT

Distributed and Real-time Predictive Control

Decentralized Stabilization of Heterogeneous Linear Multi-Agent Systems

Networks. Can (John) Bruce Keck Founda7on Biotechnology Lab Bioinforma7cs Resource

Multi-Robotic Systems

Centralized Supplementary Controller to Stabilize an Islanded AC Microgrid

Rela%ons and Their Proper%es. Slides by A. Bloomfield

Lemma 8: Suppose the N by N matrix A has the following block upper triangular form:

1 Determinants. 1.1 Determinant

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 1 x 2. x n 8 (4) 3 4 2

Zeros and zero dynamics

Nonlinear systems. Lyapunov stability theory. G. Ferrari Trecate

Bellman s Curse of Dimensionality

A strongly polynomial algorithm for linear systems having a binary solution

Decentralized and distributed control

Power Grid Partitioning: Static and Dynamic Approaches

State Regulator. Advanced Control. design of controllers using pole placement and LQ design rules

MULTI-AGENT TRACKING OF A HIGH-DIMENSIONAL ACTIVE LEADER WITH SWITCHING TOPOLOGY

Distributed Cyber-Attack Detection in the Secondary Control of DC Microgrids

Dynamical Decentralized Voltage Control of Multi-Terminal HVDC Grids

Here each term has degree 2 (the sum of exponents is 2 for all summands). A quadratic form of three variables looks as

MICROGRID is a future trend of integrating renewable

2 (n 1). f (i 1, i 2,..., i k )

Least Squares Based Self-Tuning Control Systems: Supplementary Notes

Control of industrial robots. Centralized control

Graph and Controller Design for Disturbance Attenuation in Consensus Networks

Power system modelling under the phasor approximation

Lectures on Linear Algebra for IT

Introduc)on to linear algebra

Other types of errors due to using a finite no. of bits: Round- off error due to rounding of products

Pseudospectral Methods For Op2mal Control. Jus2n Ruths March 27, 2009

(Refer Slide Time: 00:01:30 min)

Seman&cs with Dense Vectors. Dorota Glowacka

Unit 5. Matrix diagonaliza1on

Unit 1 Part 1. Order of Opera*ons Factoring Frac*ons

ECE Unit 4. Realizable system used to approximate the ideal system is shown below: Figure 4.47 (b) Digital Processing of Analog Signals

Chap. 3. Controlled Systems, Controllability

arxiv: v4 [cs.sy] 3 Oct 2014

Joint Frequency Regulation and Economic Dispatch Using Limited Communication

Event-Triggered Decentralized Dynamic Output Feedback Control for LTI Systems

A Robust Event-Triggered Consensus Strategy for Linear Multi-Agent Systems with Uncertain Network Topology

Unit 2. Projec.ons and Subspaces

Math 3108: Linear Algebra

Stability and Disturbance Propagation in Autonomous Vehicle Formations : A Graph Laplacian Approach

Chapter 7 Network Flow Problems, I

Facets for Node-Capacitated Multicut Polytopes from Path-Block Cycles with Two Common Nodes

Least Squares Parameter Es.ma.on

On Eigenvalues of Laplacian Matrix for a Class of Directed Signed Graphs

Parallelizing Gaussian Process Calcula1ons in R

OUTPUT CONSENSUS OF HETEROGENEOUS LINEAR MULTI-AGENT SYSTEMS BY EVENT-TRIGGERED CONTROL

Predicate abstrac,on and interpola,on. Many pictures and examples are borrowed from The So'ware Model Checker BLAST presenta,on.

Chapter 2 Direct Current Circuits

Lecture 12 The Level Set Approach for Turbulent Premixed Combus=on

Copyrighted Material. 1.1 Large-Scale Interconnected Dynamical Systems

Linear Algebra M1 - FIB. Contents: 5. Matrices, systems of linear equations and determinants 6. Vector space 7. Linear maps 8.

Decentralized and distributed control

University of Groningen. Control of electrical networks: robustness and power sharing Weitenberg, Erik

Boolean Inner-Product Spaces and Boolean Matrices

Analysis and Control of Multi-Robot Systems. Elements of Port-Hamiltonian Modeling

Hybrid Large Scale System Model for a DC Microgrid

An Observation on the Positive Real Lemma

Polynomials and Gröbner Bases

Elementary maths for GMT

II. Determinant Functions

Design of Observer-Based 2-d Control Systems with Delays Satisfying Asymptotic Stablitiy Condition

SKA machine learning perspec1ves for imaging, processing and analysis

Transient Stability of Power Systems

AC&ST AUTOMATIC CONTROL AND SYSTEM THEORY SYSTEMS AND MODELS. Claudio Melchiorri

Multi-Level Power-Imbalance Allocation Control for Secondary Frequency Control of Power Systems

CHAPTER 2 MATHEMATICAL MODELLING OF AN ISOLATED HYBRID POWER SYSTEM FOR LFC AND BPC

Lecture Note 5: Semidefinite Programming for Stability Analysis

Spectral Theorem for Self-adjoint Linear Operators

Register Alloca.on. CMPT 379: Compilers Instructor: Anoop Sarkar. anoopsarkar.github.io/compilers-class

Chapter Two Elements of Linear Algebra

CSCI1950 Z Computa4onal Methods for Biology Lecture 4. Ben Raphael February 2, hhp://cs.brown.edu/courses/csci1950 z/ Algorithm Summary

Theory and Applications of Matrix-Weighted Consensus

Signatures of GL n Multiplicity Spaces

A Novel Approach for Generating Dynamic Compact Models of Thermal Networks Having Large Numbers of Power Sources

EL 625 Lecture 10. Pole Placement and Observer Design. ẋ = Ax (1)

Bearing Rigidity and Almost Global Bearing-Only Formation Stabilization

Plug-and-play distributed state estimation for linear systems

Chapter 3. Steady-State Equivalent Circuit Modeling, Losses, and Efficiency

PowerApps Optimal Power Flow Formulation

Algebraic Methods in Combinatorics

Consensus of Multi-Agent Systems with

Least Square Es?ma?on, Filtering, and Predic?on: ECE 5/639 Sta?s?cal Signal Processing II: Linear Es?ma?on

Copositive Plus Matrices

Sliding mode control for coordination in multi agent systems with directed communication graphs

Introduc)on to Ar)ficial Intelligence

Finding normalized and modularity cuts by spectral clustering. Ljubjana 2010, October

MATRICES. a m,1 a m,n A =

On Moore Graphs with Diameters 2 and 3

Numerical Methods in Physics

Transcription:

arxiv:777259v4 [matho] 9 Sep 27 Hierarchical Plug-and-Play oltage/urrent ontroller of D Microgrid lusters with Grid-Forming/Feeding onverters: Line-independent Primary Stabilizaon and Leader-based Distributed Secondary Regulaon Renke Han, Michele Tucci 2, Raffaele Soloperto 3, Andrea Marnelli 4, Josep M Guerrero, and Giancarlo Ferrari-Trecate 5 Department of Energy Technology, Aalborg University, Aalborg, Denmark 2 Diparmento di Ingegneria Industriale e dell Informazione, Università degli Studi di Pavia 3 Instute of System Theory and Automac ontrol, University of Stuttgart, Stuttgart, Germany 4 Diparmento di Elettronica, Informazione e Bioingegneria, Politecnico di Milano, 233 Milano, Italy 5 Automac ontrol Laboratory, École Polytechnique Fédérale de Lausanne (EPFL), 5 Lausanne, Switzerland Technical Report July, 27 Abstract onsidering the single MG composed of grid-forming/feeding converters and the MG clusters, the hierarchical Plug-and-Play (PnP) voltage/current controller of MG clusters is proposed Different from exisng methods, the main contribuons are provided as follows: In a single MG, a PnP controller for the current-controlled distributed generaon units (DGUs) is proposed to achieve grid-feeding current tracking while guaranteeing the stability of the whole system Moreover, the set of stabilizing controllers for DGUs is characterized explicitly in terms of simple inequalies on the control coefficients With the proposed controller, DGUs can plug-in/out of the MG seamlessly without knowing any informaon of the MG system and without changing control coefficients for other units Interconnected with singel consisng of DGU and voltage-controlled DGUs (DGU), MG clusters are formed To be specific, the DGU is used for renewable energy sources Electronic address: rha@etaaudk; orresponding author Electronic address: micheletucci2@universitadipaviait Electronic address: raffaelesoloperto@istuni-stuttgartde Electronic address: andrea5marnelli@mailpolimiit Electronic address: joz@etaaudk Electronic address: giancarloferraritrecate@epflch This work has received support from the Swiss Naonal Science Foundaon under the OFLEX project (grant number 22-6996)

(RES) to feed current and DGU is used for energy storage system (ESS) to provide voltage support A PnP voltage/current controller is proposed to achieve simultaneous grid-forming/feeding funcon irrespecve of the power line parameters Also in this case, the stabilizing controller is related only to local parameters of a MG and is characterized by explicit inequalies With the proposed controller, MGs can plug-in/out of the MG clusters seamlessly without knowing any informaon of the system and changing coefficients for other MGs For the system with interconnecon of MGs, a leader-based voltage/current distributed secondary controller is proposed to achieve both the voltage and current regulaon without specifying the individual setpoints for each MGs The proposed controller requires communicaon network and each controller exchanges informaon with its communicaon neighbors only By approximang the primary PnP controller with unitary gains, the model of leader-based secondary controller with the PI interface is established and the stability of the closed-loop MG is proven by Lyapunov theory Proofs of the closed-loop stability of proposed system for DGUs and MG clusters exploits structured Lyapunov funcons, the LaSalle invariance theorem and properes of graph Laplacians Finally, theorecal results are demonstrated by hardware-in-loop tests 2

Introducon With the increasing penetraon of renewable energies into modern electric systems, the concept of microgrid (MG) receives increasing attenon from both electric industry and academia One MG should be formed by interconnecng a number of renewable energy sources (RESes), energy storage systems (ESSes) and different types of loads, which can be realisc if the final user is able to generate, store, control, and manage part of the energy that it will consume [, 2] Power converters are the key components applied in both ac and dc MGs to interface different sorts of energy resources and loads into the system To be specific, in ac MG, power converters can be classified into grid-forming and grid-feeding converters [3], and the same classificaon can also be applied for dc MGs While remarkable progress has been made in improving the performance of ac MGs during the past decade, dc MGs (which are studied in this paper) have been recognized as more and more attracve due to higher efficiency, more natural interface to many types of RESes and ESSes [4] Grid-forming converters can be seen as the interface between ESSes and the system to provide voltage support in the dc MG In order to achieve simultaneous voltage support and communicaonless current sharing among ESSes, voltage-current (-I) droop control [] is widely adopted by imposing virtual impedance for the output voltages, but voltage deviaons and current sharing errors sll exist due to different line impedances Meanwhile, another key challenge is that the stability of connected ESSes is sensive to the chosen virtual impedances which should be designed taking the specific MG topology and the values of line impedances into consideraon [5, 6, 7] In addion, the droop controller combined with inner voltage-current control loop forms the decentralized primary control level in which at least five control coefficients must be designed [] Recently, an alternave class of decentralized primary controllers, called PnP controller according to the terminology used in [8, 9], has been proposed in [] PnP controllers form a decentralized control architecture where each regulator can be synthesized using informaon about the corresponding ESSes [] or at most, parameters of the power lines connected to the ESS [] In parcular, the latter pieces of informaon are not required in the design procedure of [] which is therefore termed line-independent method The main feature of the PnP controller is to preserve the global stability of the whole MG independently of the MG topology Moreover, when ESSes are plugged-in/out of the system, local controllers can be designed on the fly, without knowing the model of other ESSes and yet preserving global stability of the new MG However, in both [] and [], the synthesis of a PnP controller requires to solve a convex opmizaon problem, if unfeasible, the plug-in/out of corresponding ESSes should be denied The proposed controllers in [, ] are only applied for grid-forming converters However, grid-feeding converters for DGUs should be also considered when RESes such as P source are joined in dc MGs The current-based PnP controller should be designed for grid-feeding converters to track current reference given by eg maximum power point tracking (MPPT) algorithm Meanwhile, the current stabilizaon should also be guaranteed In [2], a current-based PI primary droop control is proposed considering the constant current load, however, if the current reference and the constant current load are different, the voltage deviaons can become large In addion, while several literature [3, 4, 5] considered the problem of energy management operaon between RESes and ESSes, the global stability problem about MG and MG clusters has always been ignored from the point view of system level In this paper, main contribuons are concluded as follows: (i) onsidering the grid-feeding converters in single MG, the current-based PnP controller is proposed for DGUs to achieve current tracking In order to guarantee the current stability of the MG joined by DGUs, the control coefficients of each controller only need to fulfill simple inequalies Hence, different from the method in [, ], no opmizaon problem need to be solved for designing local regulators which means the design of stabilizing regulators is always feasible independent of system parameters (ii) onsidering the MG clusters interconnected with MGs composed of grid-forming/feeding converters, a PnP voltage/current controller is proposed for the system to achieve both the 3

voltage and current tracking simultaneously The set of control coefficients is characterized explicitly through a set of inequalies Hence, the controller design is always feasible and does not require to solve an opmizaon problem It is proven that the global stability can be guaranteed by implemenng PnP controller for each MG, which is independent of line impedances (iii) As in [], the proofs of closed-loop asymptoc stability of using the proposed controller for MGs and MG clusters exploit structured Lyapunov funcons, the LaSalle invariance theorem and properes of graph Laplacians This shows that these tools offer a feasible theorecal framework for analyzing different kinds of MGs equipped with various types PnP decentralized control architectures (iv) For MG clusters, a leader-based voltage/current distributed secondary controller is proposed to achieve both the voltage and current tracking with the informaon from the higher control level Each MG only requires its own informaon and the informaon of its neighbours on the communicaon network graph Instead of implemenng only integral controller as the interface between primary and secondary control level, PI controller is applied as the interface to improve the dynamic control performance By approximang the primary PnP controller with unitary gains, the model of leader-based secondary controller with the PI interface is established whose stability is proven by Lyapunov theory The paper is structured as follows In Secon 2 and 3, the DGU model and proposed current-based PnP controllers are introduced In Secon 32, the closed-loop stability for DGU is proven In Secon 4 and 5, the proposed voltage/current PnP controller for MGs are introduced In Secon 52, the closed-loop stability for MG clusters is proven The leader-based voltage/current distributed secondary controller and its stability proof are introduced in Secon 6 Finally, the hardware-in-loop tests are described in Secon 7 Notaon We use P > (resp P ) for indicang the real symmetric matrix P is posive-definite (resp posive-semidefinite) Let A R n m be a matrix inducing the linear map A : R m R n I R n n represent unit matrix The average of a vector v R n is v = n vi We denote with H the subspace composed by all vectors with zero average ie H = {v R n : v = } The space orthogonal to H is H It holds H = {α n : α R} and dim(h ) = [6] Moreover, the decomposion Rn = H H is direct [7] 2 Grid-Feeding onverters of urrent-controlled DGUs in dc Microgrid 2 Electrical model of DGUs In this subsecon, the electrical model for DGUs is described The control objecve for DGU is to feed current for the MG according to a given current reference The electrical scheme of the i-th DGU is represented within upper part of Fig It is assumed that loads including both a resisve load and a current disturbance(i Li ) are unknown We consider a system composed of N DGUs and define the set D = {,, N} Two DGUs are neighbors if there is a power line connecng them Ni D denotes the subset implies } collect unordered pairs of indices associated to lines Each line is described by a RL model The topology of the mulple DGUs is then described by the undirected graph G el with nodes D and edges E From Fig, by applying Kirchoff s voltage and current laws, and exploing QSL approxima- of neighbors of DGU i The neighboring relaon is symmetric which means j Ni i Nj Furthermore, let E = {(i, j) : i D, j Ni 4

Grid-Feeding onverters for urrent-ontrolled DGU i Line ij I R L P Bus I ij R ij L ij j RES RES i R Li I Li k k k, i 2, i 3, i i I urrent-based PnP ontroller i s Pri, pu I ref, i I cap,i Figure : Electrical Scheme of DGU i and current-based PnP controller I on of power lines [, 8], the model of DGU i is obtained d i dt = I + ( j i R ij DGU i : di dt = L j N i i R L I + L R ij ) (I Li + i R Li ) where variables i, I, are the i-th P voltage and filter current, respecvely, represents the command to the converter, and R, L and represent the electrical parameters of converters Moreover, j is the voltage at the P of each neighboring DGU j Ni and R ij is the resistance of the power line connecng DGUs i and j Remark In praccal, the grid-feeding converters need the voltage support from the grid-forming converters at the P point In this secon, only the controller and stability for the interconnected DGU is designed and analyzed Thus, it is assumed that the voltage at the P point has already been supported by the grid-forming devices In secon 4 and 5, the PnP controllers to achieve both the voltage support and current feeding are proposed, designed and analyzed 22 State-space model of mulple DGUs Dynamics () provides the state-space equaons: { ẋ [i] (t) = A iix [i] (t) + B i u [i] (t) + M i d [i] (t) + ξ [i] (t) + A load,ix [i] (t) Σ DGU [i] : z [i] (t) = H i x [i] (t) where x [i] = [ i, I ]T is the state, u [i] = the control input, d [i] = ILi the exogenous input including different current loads and z[i] = I the controlled variable of the system The term ξ[i] = j N i A ij (x [j] x [i]) accounts for the coupling with each DGU j Ni and the term A load,i accounts for the resisve load for each DGU The matrices of ΣDGU [i] are obtained from () as: A ii =, A load,i = R Li, A ij = R ij, L R L () 5

B i = [ L ], M i = [ ], Hi = [ ] Remark 2 To be emphasized, there are two main differences between the proposed model for DGU in () and the one proposed in [] The first one is that the resisve load is considered as part of the load The second one is that the control variable is changed from voltage in [] for grid-forming converters to current in () for grid-feeding converters The overall model with mulple DGUs is given by ẋ (t) = A x (t) + B u (t) + M d (t) z (t) = H x (t) (2) where x = (x [],, x [N] ) R2N, u = (u [],, u [N] ) RN, d = (d [],, d [N] ) RN, z = (z [],, z [N] ) RN Matrices A, B, M and H are reported in Appendix A 3 Design of stabilizing current controllers 3 Structure of current-based PnP controllers In order to track with references z ref (t), when d (t) = d is constant, the DGU model is augmented with integrators [9] A necessary condion for making error e (t) = z ref (t) z (t) equal to zero as t, is that, there are equilibrium states and inputs x and ū verifying (2) The existence of these equilibrium points can be shown following the proof of Proposion in [] One obtain the integrator dynamics is (as shown in Fig, setng zref [i] I cap,i is the maximum capability of DGU i and I P ri,pu ref,i is the pu reference) v [i] (t) = e [i] (t) = z ref [i] (t) z [i] (t) = I P ri,pu ref,i I cap,i, = z ref [i] (t) H i x [i] (t), (3) and hence, the augmented DGU model is ˆx ˆΣ DGU [i](t) = [i] :  ii ˆx [i] (t) + ˆB i u [i] (t) + ˆM i ˆd [i] (t) + ˆξ [i] (t) +  load,iˆx [i] (t) (4) z[i] (t) = Ĥ i ˆx [i] (t) where ˆx [i] = [[x [i] ]T, v [i] ]T R 3 is the state, ˆd [i] = [d [i], z ref [i] ]T R 2 collects the exogenous signals and ˆξ [i] = j N i  ij (ˆx [j] ˆx [i]) By direct calculaon, the matrices appeared in (4) are as follows [ ] [ ] [ ]  A ii = ii A Hi,  ij = ij A,  load,i = load,i, [ ] [ ] ˆB i B = i M, ˆM i = i, Ĥ i = [ Hi ] Based on Proposion 2 of [], the pair ( ii, ˆB i ) can be proven to be controllable Hence, system (4) can be stabilized Given from (4), the overall augmented system is { ˆx (t) =  ˆx (t) + ˆB u (t) + ˆM ˆd (t) z (t) = Ĥ ˆx (5) (t) 6

where ˆx and ˆd include all variables ˆx [i] and ˆd [i] respecvely from all the DGUs, and matrices Â, ˆB, ˆM and Ĥ are derived from systems (4) Now each DGU ˆΣ DGU [i] is equip with the following state-feedback controller [i] : u [i] (t) = K i ˆx [i](t) (6) where Ki = [ k,i k 2,i 3,i] k R 3 It turns out that, together with the integral acon (3), controllers [i], define a mulvariable PI regulator, see lower part of Fig In parcular, the overall control architecture is decentralized since the computaon of u DGU [i] requires the state of ˆΣ [i] only In the following, it is shown that structured Lyapunov funcons can be used to ensure asymptoc stability of the system with mulple DGUs with controllers (6) 32 ondions for stability of the closed-loop mulple DGUs As in [], the design of gain Ki hinges on the use of separable local Lyapunov funcon for cerfying the closed-loop stability Indeed, the structure will also allow us to show that local stability implies stability of the whole system Here after, the candidate Lyapunov funcon are considered as i (ˆx [i] ) = [ˆx [i] ]T Pi ˆx [i] (7) where posive definite matrices P i R 3 3 has the structure P i = η i 2 2 P22,i, (8) where η i > is a parameter and the entries of P22,i are arbitrary and denoted as [ ] p P22,i = 22,i p 23,i p 23,i p (9) 33,i We also assume that given a constant parameter common to all DGUs σ > just for proof process, the parameters η i in (8) are set as η i = σ i D () In absence of coupling terms ˆξ [i] (t), and load terms  load,iˆx [i](t), one would like to stabilize the closed-loop DGU ˆx [i](t) = ( ii + ˆB i Ki ) ˆx [i] }{{} (t) + ˆM i Fi ˆd [i](t) () By direct calculaon, one has Fi = t (k,i ) L (k 2,i R ) L k 3,i L = F 2,i (2) F2,i F22,i From Lyapunov theory, asymptoc stability of () can be cerfied by the existence of a Lyapunov funcon as shown in (7) and Q i = [F i ] T P i + P i F i (3) 7

is negave definite Based on (8) and (2), eq (3) can be rewritten as Q [F i = 2,i ]T P22,i + η if2,i [F2,i ]T η i + P22,i F 2,i [F22,i ]T P22,i + P 22,i F 22,i (4) The next result shows that, Lyapunov theory cerfies, at most, marginal stability of () Firstly, we recall the following elementary properes of the posive definite matrix Pi and the negave semi-definite matrix Q i Proposion [] If Q = Q T and an element q ii on the diagonal verified q ii =, then (i) The matrix Q cannot be negave definite (ii) The i-th row and column have zero entries Proposion 2 Matrices P i > and Q i verifying (8) and (4) have the following structure: P i = η i p 22,i k 3,i p L 22,i, Q i = 2 (k 2,i R ) p L 22,i, (5) Moreover, for having Pi >, Q i and Q i, the control coefficients must verify k,i < k2,i < R k3,i > (6) Proof Based on (9) and (2), the upper right block of (4) can be written as [F 2,i] T P 22,i + η i F 2,i = [ (k,i ) L p 22,i + (k η,i ) i p L 23,i ], (7) Based on Proposion, (7) should be equal to zero vector which means (k,i ) p 22,i = η i L (k,i ) p 23,i = L (8a) (8b) Because η i is posive, one has { k,i < p 23,i = From (9), the lower right block of (4) can be rewritten as [F22,i] T P22,i + P22,iF 22,i = 2 (k 2,i R ) L p 22,i p 33,i + k 3,i p L 22,i p 33,i + k 3,i p L 22,i (9a) (9b), (2) Again from Proposion, the off diagonal enes of (2) must be equal to zero which means k 3,i L p 22,i = p 33,i (2) 8

Furthermore, based on (9b), (2) and P i > Finally, for verifying Q i, one has k 3,i > (22) k 2,i < R (23) Thus, the P i in (5) can be derived by substung (9b) and (2) into (8) and then Q i in (5) can be derived from (2) and (2), finally (9a), (23) and (22) consist of the set (6) for control coefficients An immediate consequence of Proposion 2 is the following results which will be exploited for proving the stability of the whole system through the LaSalle theorem Lemma Let g i (w i ) = w T i Q i w i Under the Proposion 2, i D, only vectors w i in the form w i = [ α i β i ] T with α i, β i R, fulfill g i ( w i ) = w T i Q i w i = (24) Now the overall closed-loop model with mulple DGUs is considered as { ˆx (t) = ( + ˆB K )ˆx (t) + ˆM ˆd (t) z (t) = Ĥ ˆx (t) obtained by combining (5) and (6), with K = diag(k,, KN ) Also the collecve Lyapunov funcon N (ˆx ) = i (ˆx [i] ) = [ˆx ] T P ˆx (26) i= is considered, where P = diag(p,, P N ) One has (ˆx ) = [ˆx ] T Q ˆx where Q = ( + ˆB K ) T P + P ( + ˆB K ) A consequence of Proposion 2 is that, the matrix Q cannot be negave definite At most, one has Q (27) Moreover, even if Q i holds for all i D, the inequality (27) might be violated because of the nonzero coupling terms  ij and load terms  load,i in matrix  The next result shows that this cannot happen if () holds Proposion 3 If gains Ki then (27) holds Proof onsider the following decomposion of matrix  (25) are chosen according to the (6) in Proposion 2 and () holds,  =  D + Â Ξ +  L + Â, (28) where  D = diag(â ii,,  NN ) collects the local dynamics only,  collects the coupling dynamic represenng the off-diagonal items of matrix Â, while Â Ξ = diag(â ξ,,  ξn ) and  L = diag(â load,,,  load,n ) with R ij  j N i R Li ξi =,  load,i =, 9

takes into account the dependence of each local state on the neighboring DGUs and the local resisve load According to the decomposion (28), the inequality (27) is equivalent to ( D + ˆB K ) T P + P ( D + ˆB K ) + 2(Â Ξ +  L )P + ( ) T P + P  (29) }{{}}{{}}{{} (a) (b) (c) By means of Q i, matrix (a) = diag(q,, Q N ) is negave semidefinite Then the contribuon of (b) + (c) in (29) is studied Matrix (b), by construcon, is block diagonal and collects on its diagonal blocks in the form 2 R Li 2 R ij j N i η i 2 2( ξi +  load,i)pi = = 2 P22,i (3) 2 η i 2 η ij j N i =, where η ij = onsidering matrix (c), each the block in posion (i, j) is equal to { P i  ij + ( ji )T P j if j N i otherwise where P i η i, η Li = η i (3) R ij R Li η ij + η ji  ij + ( ji) T Pj = (32) From (3) and (32), except for the elements in posion (, ) of each 3 3 block of (b)+(c), others are equals to zero Thus, to evaluate the posive/negave definiteness of the matrix (b) + (c), the N N matrix can be equivalently considered by deleng the second and third rows and columns as ( 2 η 2 η j ) η 2 η N j N η 2 L = ( 2 ηn 2 η N j ) η (33) N N j N N η N η NN ( 2 η N 2 η Nj ) j N N One has L = M + U + G, where 2 η j j N 2 η 2j M = j N 2 2 j N N η Nj 2 η L, U = 2 η L2, 2 η LN

and G = η 2 η N η 2 ηn N η N η NN Noce that each off-diagonal element η ij in (34) is equal to (34) η ij = { ( ηij + η ji ) if j N i otherwise (35) At this point, from (), one obtains that η ij = η ji (see (3)) and, consequently, η ij = η ji = 2 η ij (see (35)) Hence, L is symmetric and has non negave off-diagonal elements It follows that L is equal to a Laplacian matrix [2, 2] plus an posive definite diagonal matrix Thus, it verifies L < by construcon By adding the deleted second and third rows and columns in each block of (b) + (c), then (29) holds Our next goal is to show asymptoc stability of the system with mulple DGUs using the marginal stability result in Proposion 3 together with LaSalle invariance theorem To this purpose, the main result is then given in Theorem which relies on characterizing states ˆx deriving (ˆx ) = Theorem If () holds and Q i and the connecvity of the graph G el is guaranteed, control coefficients are chosen according to (6), the origin of (25) is asymptocally stable Proof From Proposion 3, (ˆx ) is negave semidefinite meaning that (27) holds We aim at showing that the origin of the system with mulple DGUs is also attracve using the LaSalle invariance Theorem [22] For this purpose, the set is computed R = {x R 3N : (x ) T Q x = } by means of the decomposion in (29), which coincides with R = {x : (x ) T ((a) + (b) + (c)) x = } = {x : (x ) T (a)x + (x ) T (b)x + (x ) T (c)x = } = {x : (x ) T (a)x = } {x : (x ) T [(b) + (c)] x = } }{{}}{{} X X2 (36) In parcular, the last equality follows from the fact that (a) and (b)+(c) are negave semidefinite matrices (see the proof of Proposion 3) First, based on Lemma, the set X is characterized as X = {x : x = [ α β α N β N ] T, α i, β i R}, (37) Then, we focus on the elements of set X2 based on Proposion 3 Since matrix (b) + (c) can be seen as an expansion of a matrix which is negave definite matrix with zero entries on the second and third rows and columns of 3 3 block, by construcon, vectors in the form X 2 = {x : x = [ x 2 x 3 x N2 x N3 ] T, x i2, x i3 R}, (38) Hence, by merging (37) and (38), and from (36), it derives that R = {x : x = [ β β N ] T, β i R} (39) Finally, in order to conclude the proof, it should be shown that the largest invariant set M R is the origin To this purpose, () is considered, by adding the coupling terms ˆξ [i] and the resistance load term  load,iˆx i (), setng load disturbance ˆd [i] =, choosing the inial state

ˆx () = [ˆx () ˆx N ()] T R In order to find condions on the elements of ˆx () that must hold for having ˆx R, one has ˆx i () = Fi ˆx i () + Â load,iˆx i () + Â ij (ˆx j () ˆx i () ) j N i }{{} = R Li k =,i k 2,i R k 3,i L L L β i k = 3,i β L i for all i D It follows that ˆx () R only if β i = Since M M = {} R, from (39) one has Remark 3 The design of stabilizing controller for each DGU can be conducted according to Proposion 2 In parcular, differently from the approach in [], no opmizaon problem has to be solved for compung a local controller Indeed, it is enough to choose control coefficient k,i, k2,i and k 3,i from inequality set (6) Note that these inequalies are always feasible, implying that a stabilizing controller always exists Moreover, the inequalies depend only on the parameter R of the DGU i Therefore, the control synthesis is independent of parameters of DGUs and power lines which means that controller design can be executed only once for each DGU in a plug-and play fashion From Theorem, local controllers also guarantee stability of the whole MG When new DGUs are plugged in the MG, their controller are designed as described above, the connecvity of the electrical graph G el is preserved and have Theorem applied to the whole MG Instead, when a DGU is plugged out, the electrical graph G el might be disconnected and split into two connected graphs Theorem can sll be applied to show the stability of each sub-mg 4 D MG with Grid-Forming/Feeding onverters and Its lusters 4 Electrical model of one MG As menoned before, the DGU should be cooperave operated with voltage support in the MGs The ESS is interfaced with the MG by means of the grid-forming converter of DGU to provide necessary voltage support for the P bus based on which, the RES is interfaced with the MG through the grid-feeding converters of DGU to provide current for the loads Thus, in this secon, the combinaon of oen DGU and one DGU is considered as one MG through connecng to the same common bus achieving both voltage support and current feeding simultaneously And the MG clusters are formed by interconnecng several MGs through line impedances Here, a MG cluster system composed of N MGs is considered belonging to set D = {,, N} Two MGs are neighbors if there is a power line connecng them N i D denotes the subset of neighbors of MG i The neighboring relaon is symmetric which means j N i implies i N j 2

Microgrid i Microgrid i with Grid-Forming/Feeding onverters I R L P Bus I ij Line ij R ij L ij j RES RES i R Li I Li ESS I R L i I I cap,i Pri, pu I ref, i ESS k, i k2, i k3, i k, i k2, i k3, i s I s Pri ref, i I i oltage/urrent-based PnP ontroller i Figure 2: Electrical Scheme of MG i and voltage/current-based PnP controller The electrical scheme of the i-th MG is represented with Fig 2 d i dt = I + I + ( j i R ij Module i : di dt di dt = L = L j N i i R L I + L i R L I + L R ij ) (I Li + i R Li ) (4) where variables i, I, I are the i-th P voltage and filter current from RES and filter current from ESS, respecvely, represents the command to the grid-feeding converter, represents the command to the grid-forming converter, and R, L the electrical parameters for grid-feeding converter, R, L the electrical parameters for grid-forming converter, is the capacitor at the common P bus Moreover, j is the voltage at the P of each neighboring MG j N i and R ij and L ij is the resistance and inductance of the power D line connecng MGs i and j 42 State-space model of MG clusters Dynamics (4) provides the state-space variables equaons: { Σ MG ẋ[i] (t) = A ii x [i] (t) + B i u [i] (t) + M i d [i] (t) + ξ [i] (t) + A load,i x [i] (t) [i] : z [i] (t) = H i x [i] (t) where x [i] = [ i, I, I ]T is the state of the system, u [i] = [, ] is the control input, d [i] = I Li is the exogenous input and z [i] = [I i, i] is the controlled variable of the system The term ξ [i] = j N i A ij (x [j] x [i] ) accounts for the coupling with each MG j N i The matrices of Σ MG [i] 3

are obtained from (4) as: A ii = L L R L R L B i = L L, A load,i =, M i = The overall model of MG clusters is given by R Li R ij, A ij =,, H i = [ ] ẋ(t) = Ax(t) + Bu(t) + Md(t) z(t) = Hx(t) (4) where x = (x [],, x [N] ) R 3N, u = (u [],, u [N] ) R 2N, d = (d [],, d [N] ) R N, z = (z [],, z [N] ) R 2N Matrices A, B, M and H are reported in Appendix A2 5 Design of stabilizing voltage/current controllers 5 Structure of PnP oltage/urrent controllers In order to track constant references z ref (t), when d(t) is constant as well, the MG model is augmented with integrators [9] A necessary condion for making error e(t) = z ref (t) z(t) equal to zero as t, is that, for arbitrary d and z ref, there are equilibrium states and inputs x and ū verifying (4) The existence of these equilibrium points can be proven by following the proof of Proposion in [] The dynamics of integrators are (as shown in Fig 2, where z P ri, ref [i] P ri ref,i ) and hence, the augmented model is v [i] (t) = e ri, [i](t) = zp ref [i] (t) I (t) v [i] (t) = e ri, [i](t) = zp ref [i] (t) i (t) = I P ri,pu ref,i I cap,i, z P ri, ref [i] = (42a) (42b) ˆΣ MG [i] : { ˆx[i] (t) = Âiiˆx [i] (t) + ˆB i u [i] (t) + ˆM i ˆd[i] (t) + ˆξ [i] (t) + Âload,iˆx [i] (t) z [i] (t) = Ĥiˆx [i] (t) (43) where ˆx [i] = [ i, I, v i, I, v i ]T R 5 is the state, ˆd P ri, P ri, [i] = [d [i], z ref [i], z ref [i] ] T R 3 collects the exogenous signals and ˆξ [i] = j N i  ij (ˆx [j] ˆx [i] ) Matrices in (43) are defined as follows R L L  ii =, ˆB L i =, R L ˆM i = L L [ ] [ ] Aij  ij = 2 Aload,i, 2 Âload,i = 2, 2 2 2 Ĥi = [ ] H i 2 2 2 2, Based on Proposion 2 in [], it can be proven that the pair (Âii, ˆB i ) is controllable Hence, system (43) can be stabilized 4

The overall augmented system is obtained from (43) as { ˆx(t) = ˆx(t) + ˆBu(t) + ˆMˆd(t) z(t) = Ĥˆx(t) (44) where ˆx and ˆd collect variables ˆx [i] and ˆd [i] respecvely, and matrices Â, ˆB, ˆM and Ĥ are obtained from systems (43) Each MG is with the following state-feedback controller ˆΣ MG [i] MG [i] : u [i] (t) = K iˆx [i] (t) (45) where [ ] k K i =,i k2,i k3,i k,i k2,i k3,i R 2 5 Nong that the control variables and are coupled through the coefficients k,i and k,i appearing in the first column of K i In other words, measurement of i are used for generang both and It turns out that, together with the integral acons (42), controllers MG [i], define a mulvariable PI regulator, see Fig 2 In parcular, the overall control architecture is MG ˆΣ [i] decentralized since the computaon of u [i] requires the state of only In the sequel, we show how structured Lyapunov funcons can be used to ensure asymptoc stability of the MG clusters, when MGs are equipped with controllers (45) 52 ondions for stability of the closed-loop with MG lusters Assumpon As same in Secon 32, we will use local structured Lyapunov funcon i (ˆx [i] ) = [ˆx [i] ] T P iˆx [i] (46) where the posive definite matrix P i R 5 5 has the structure η i 2 2 P i = 2 P22,i 2 2, (47) 2 2 2 P44,i where [ p P22,i = 22,i p 23,i p 23,i p 33,i And η i > is a local parameter and sasfy the eq () ] [ p, P44,i = 44,i p 45,i p 54,i p 55,i ] (48) In absence of coupling terms ˆξ [i] (t),and load terms Âload,iˆx [i] (t), we would like to guarantee asymptoc stability of the nominal closed-loop model ˆx [i] (t) = (Âii + ˆB i K i ) }{{} ˆx [i] (t) + ˆM i ˆd[i] (t) (49) F i 5

By direct calculaon, one can show that F i has the following structure f 2,i f 4,i f 2,i f 22,i f 23,i F i = f 32,i f 4,i f 44,i f 45,i f 5,i (k,i ) (k 2,i R ) k 3,i L L L F 2,i F4,i = = F 2,i F22,i (k,i ) (k 2,i R ) k 3,i F4,i F44,i L L L (5) From Lyapunov theory, asymptoc stability of (49) can be cerfied by the existence of a Lyapunov funcon i (ˆx [i] ) = [ˆx [i] ] T P iˆx [i] where P i R 5 5, P i = Pi T > and Q i = F T i P i + P i F i (5) is negave definite In presence of nonzero coupling terms, we will show that asymptoc stability can be achieved under Assumpon Based on (47) and (5), the (5) can be rewritten as [F 2,i ]T P22,i + η if2,i [F4,i ]T P44,i + η if4,i Q i = [F 2,i ]T η i + P22,i F 2,i [F22,i ]T P22,i + P 22,i F 22,i 2 2 [F4,i ]T η i + P44,i F 4,i 2 2 [F44,i ]T P44,i + P 44,i F 44,i (52) Q 2,i Q 4,i = [Q 2,i ]T Q 22,i 2 2 [Q 4,i ]T 2 2 Q 44,i Lemma 2 Under Assumpon, if Q i, Q i has the following structure 2 2 Q i = 2 Q 22,i 2 2 2 2 2 Q 44,i Furthermore, the diagonal block matrix must verify { Q 22,i Q 44,i (53) (54a) (54b) Proof If Q i is sasfied, from Proposion, the first block-row and block-column in (53) are null Then x T Q i x, x R 5 Paroning x as x = x x 2 x 4 6

where x R, x 2 R 2, x 4 R 2 We obtain x T Q i x = x T 2 Q 22,i x 2 + x T 4 Q 44,i x 4 For x 2 = and x 4, one has x T Q i x = x T 4 Q 44,i x 4, x 4 R 2 which means Setng x 4 = and x 2, one has Q 44,i x T Q i x = x T 2 Q 22,i x 2, x 2 R 2 which means Q 22,i Remark 4 Because the block of matrix Q i as Q 22,i and Q 44,i belong to R2 2, based on Lemma 2, Q 22,i and Q 44,i, the determinants of Q 22,i and Q 44,i are nonnegave Proposion 4 Under Assumpon, then P i and Q i have the following structure: η i p 22,i P i = k 3,i p L 22,i L (k 2,i R ) L k 3,i h i h i L k 3,i k 3,i (k,i ) h i h i 2 (k 2,i R ) p L 22,i Q i = 2 (k 2,i R )2 h i 2 (k 2,i R )k 3,i h i 2 (k 2,i R )k 3,i h i 2 (k 3,i )2 h i (55a) (55b) where h i = L k 3,i (k,i )(k 2,i R ) Moreover, if P i >, Q i and Q i, one has k,i < k2,i < R k3,i > k,i < k2,i < R < k3,i < L (k,i )(k2,i R) (56) Proof Based on (47) and (5), the upper middle block of (52) Q 2,i can be written as [ ] [F2,i] T P22,i + η i F2,i (k =,i ) p L 22,i + (k η,i ) i p, (57) L 23,i 7

From Proposion, Q 2,i should be equal to zero vector which means (k,i ) p 22,i = η i L (k,i ) p 23,i = L (58a) (58b) Because η i is posive, thus it derives that { k,i < p 23,i = (59a) (59b) With the results (59), the diagonal item of (52) Q 22,i can be direct recalculated as 2 (k 2,i R ) p L 22,i p 33,i + k 3,i p L 22,i [F 22,i] T P 22,i + P 22,iF 22,i = p 33,i + k 3,i p L 22,i (6) Again from Proposion, the off diagonal item of (6) should be equal to zero which means Thus,based on (6) and P i > From Proposion, Q i should be at least negave semidefinite, thus k 3,i L p 22,i = p 33,i (6) k 3,i > (62) k 2,i < R (63) Because the upper left corner 3 3 matrix of P i is diagonal matrix and the matrix P i is posive definite, one has p 44,i > (64) Based on (47) and (5), the off diagonal of (52) Q 4,i can be written as [ [F4,i] T P44,i + η i F4,i (k =,i ) p L 44,i p 45,i + (k η,i ) i p L 45,i p 55,i ], (65) From Proposion, Q 4,i is a zero vector which means p 45,i = (k,i ) p 44,i + η i L p 55,i = (k,i ) L p 45,i (66a) (66b) Then by explicitly computaon of Q 44,i, we can derive that [F 44,i] T P 44,i + P 44,iF 44,i = Based on the Lemma 2 and eq (64) (k 2,i R ) L 2 (k 2,i R ) p L 44,i p 45,i + k 3,i L (k 2,i R ) L p 45,i + k 3,i p L 44,i p 44,i 2 k 3,i p L 45,i, (67) 2 (k 2,i R ) L p 44,i = k2,i R (68) 8

ompung the determinant of Q 44,i, one obtains det(q 44,i) = [ (k 2,i R ) L 2 p 45,i k 3,i L p44,i] (69) Based on the Lemma 2, the second principal minor of Q 44,i which is also the determinant Q 44,i is nonnegave From (69), the maximum value is zero, thus the determinant of Q 44,i should be equal to zero It follows that (k 2,i R ) L p 45,i = k 3,i L p 44,i = p 44,i = (k 2,i R ) k3,i p 45,i (7) By solving the system of equaon given by (66) and (7), it derives that p 44,i = L (k 2,i R ) h i p 45,i = L k 3,i h i p 55,i = k3,i (k,i ) h i (7a) (7b) (7c) where h i = L k 3,i (k,i )(k 2,i R ) Because P44,i is posive definite, all its principal minor should be posive definite Then ( ) L det (k 2,i R ) h i >, combining this result with (68), the feasible parameters k2,i and h i set should be Z = {k2,i < R } {h i < } det L (k 2,i R ) h i L k 3,i h i L k 3,i h i k 3,i (k,i ) h i = L K 3,i >, considering this result, the feasible parameters k 3,i and h i set should be Z 2 = {{k 3,i < } {h i > }} {{k 3,i > } {h i < }} By combing the Z and Z 2 together, one has 2 hi Z = {Z } {Z 2 } = {k 2,i < R } {k 3,i > } {h i < } (72) Because k 3,i >, the set {h i < } can be further split Then, combining the set with (72), it can derive that Z = {k,i < } {k2,i < R} { < k3,i < L (k,i )(k2,i R)} (73) Thus, (55) can be derived by combining the result in (59b), (6) and(7) Then, combining the results in (59a), (62), (63) and (73), the set for control coefficients (56) is derived Lemma 3 Let Assumpons and Proposion 4 hold, let us define h i (v i ) = v T i Q 44,i v i, with v i R 2 If Q i and Q i is guaranteed, then h i ( v i ) = v i Ker(F 44,i) Proof The proof is same as the proof for Proposion 3 in [] 9

Proposion 5 Let g i (w i ) = w T i Q iw i Under the same Assumpons of Lemma 3, i D, and Proposion 4 and Lemma 3, only vectors w i in the form with α i, γ i, β i R, and δ i = k 2,i R, fulfill k3,i w i = [ α i γ i β i δ i β i ] T g i ( w i ) = w T i Q i w i = (74) Proof In the sequel, the subscript i is omitted for convenience From (55a), g(w) is equal to 2 (k 2 R t ) p L [ ] 22 t w w w2 T w3 T w 2, (75) q44 q45 w 3 q45 q55 where w 2, w 3 R 2 Since Q is negave semidefinite, the vectors w sasfying (74) also maximize g( ) Hence, it must hold dg dw ( w) = Q w =, ie 2 (k 2 R t ) p L 22 t w w 2 = (76) q44 q45 w 3 q45 q55 Based on the results in Proposion 4, it is easy to show that, by direct calculaon, a set of soluons to (74) and (76) is composed of vectors in the form w = [ α γ ] T, α, γ R (77) Moreover, from (75), we have that (74) is also verified if there exist vectors w = [ w w T 2 w T 3 ] T, w3 [ ] T, (78) such that w R, w 2 R 2 and w T 3 Q 44w 3 = (79) By exploing the result of Lemma 3, we know that vectors w 3 fulfilling (79) belong to Ker(F44), which, recalling (5), can be explicitly computed as follows { [ ] } Ker(F44) = x R 2 f : 44 f45 x = = { = x R 2 : x = [ β δβ ] T, β R, δ = k 2 Rt } (8) The proof ends by merging (77) and (78), with w 3 as in (8) k 3 2

onsider the overall closed-loop MG cluster model { ˆx(t) = ( + ˆBK)ˆx(t) + ˆMˆd(t) z(t) = Ĥˆx(t) (8) obtained by combining (44) and (45), with K = diag(k,, K N ) onsidering also the collecve Lyapunov funcon N (ˆx) = i (ˆx [i] ) = ˆx T Pˆx (82) where P = diag(p,, P N ) One has (ˆx) = ˆx T Qˆx where i= Q = ( + ˆBK) T P + P( + ˆBK) (83) A consequence of Proposion is that, under Assumpon, the matrix Q cannot be negave definite At most, one has Q (84) Moreover, even if Q i holds for all i D, the inequality (84) might be violated because of the nonzero coupling terms Âij and load terms Âload,i in matrix  The next result shows that this cannot happen Proposion 6 If gains K i are chosen according to (56) and then Q i for all i D, then (84) holds Proof onsider the following decomposion of matrix   =  D + Â Ξ +  L + Â, (85) where  D = diag(âii,, ÂNN ) collects the local dynamics only,  collects the coupling dynamic represenng the off-diagonal items of matrix  Meanwhile, Â Ξ = diag(âξ,, ÂξN) and  L = diag(âload,,, Âload,N) with R ij 4  ξi = j N i, Âload,i = R Li 4 4 4 4 4 4 4 takes into account the dependence of each local state on the neighboring MGs and the local resisve load According to the decomposion (85), the inequality (84) is equivalent to show that ( D + ˆBK) T P + P( D + ˆBK) + 2(Â Ξ +  L )P +  T P + P (86) }{{}}{{}}{{} (a) (b) (c) By means of Proposion, matrix (a) = diag(q,, Q N ) is negave semidefinite Then, the contribuon of (b) +(c) in (86) is studied as follows Matrix (b), by construcon, is block diagonal and collects on its diagonal blocks in the form 2 R 2(Âξi +  load,i)p i = Li 2 η i 2 2 R ij 4 j N i 2 P22,i 2 2 = 4 4 4 (87) 2 2 2 P44,i = [ 2 ηi 2 η ij j N i 4 4 4 4 ] 2

where η ij = onsidering matrix (c), each the block in posion (i, j) is equal to { (  ji ) T P j + P i  ij if j N i otherwise η i, η Li = η i (88) R ij R Li where η ij + η ji 4 P i  ij + ÂT jip j = (89) 4 4 4 From (87) and (89), we noce that only the elements in posion (, ) of each 5 5 block of (b) + (c) can be different from zero Hence, in order to evaluate the posive/negave definiteness of the 5N 5N matrix (b) + (c), we can equivalently consider the N N matrix as ( 2 η 2 η j ) η 2 η N j N η 2 L = ( 2 ηn 2 η N j ) η (9) N N j N N η N η NN ( 2 η N 2 η Nj ) j N N obtained by deleng the second to fifth rows and columns in each block of (b) + (c) One has L = M + U + G, where 2 η j j N 2 2 η L η 2j M = j N 2, U = 2 η L2 2 2 η LN j N N η Nj and G = η 2 η N η 2 ηn N η N η NN Noce that each off-diagonal element η ij in (9) is equal to (9) η ij = { ( ηij + η ji ) if j N i otherwise (92) At this point, from Assumpon, one obtains that η ij = η ji (see (88)) and, consequently, η ij = η ji = 2 η ij (see (92)) Hence, L is symmetric and has non negave off-diagonal elements It follows that L is equal to a Laplacian matrix [2, 2] plus an posive definite diagonal matrix As such, it verifies L < by construcon By adding the deleted second to fifth rows and columns in each block of (b) + (c), we have shown that (86) holds Theorem 2 If Assumpons is fulfilled, the graph G el is connected, control coefficients are chosen according to (56), the origin of (44) is asymptocally stable 22

Proof From Proposion 6, (ˆx) is negave semidefinite (ie (84) holds) It should be shown that the origin of the MG is also attracve by using the LaSalle invariance Theorem [22] For this purpose, the set R = {x R 5N : (x) T Qx = } is first computed by means of the decomposion in (86), which coincides with R = {x : (x) T ((a) + (b) + (c)) x = } = {x : (x) T (a)x + (x) T (b)x + (x) T (c)x = } = {x : (x) T (a)x = } {x : (x) T [(b) + (c)] x = } }{{}}{{} X X 2 In parcular, the last equality follows from the fact that matrix (a) and (b) + (c) are negave semidefinite matrices based on the proof of Proposion 4 and 6 First, we characterize the set X By exploing Proposion 5, it follows that X = {x : x = [ α γ β δ β α N γ N β N δ N β N ] T, α i, γ i, β i R}, (94) Then, the elements of set X 2 can be characterized with Proposion 6 Since matrix (b) + (c) can be seen as an expansion of a matrix which is negave definite matrix with zero entries on the second to fifth rows and columns of each 5 5 block, by construcon, the vectors in the form X 2 = {x : x = [ x 2 x 3 x 4 x 5 x N2 x N3 x N4 x N5 ] T, x i2, x i3, x i4, x i5 R}, (95) Hence, by merging (94) and (95), it derives that R = {x : x = [ γ β δ β γ N β N δ N β N ] T, γ i, δ i, β i R} (96) To conclude the proof, it should be shown that the largest invariant set M R is the origin To this purpose, we consider (49), include coupling terms ˆξ [i], resistance load term Âload,iˆx i (), set ˆd [i] = and choose as inial state ˆx() = [ˆx () ˆx N ()] T R We aim to find condions on the elements of ˆx() that must hold for having ˆx R One has ˆx i () = F iˆx i () + Âload,iˆx i () + Â ij (ˆx j () ˆx i ()) }{{} j N i = R Li = (k,i ) L (k 2,i R ) L k 3,i L (k,i ) L (k 2,i R ) L k 3,i L β i k 3,i γ L i = k 2,i = R L β i + k 3,i L δ i β i }{{} = β i k 3,i L γ i γ i β i δ i β i (93) for all i D It follows that ˆx() R only if β i = and γ i = Since M R, from (96) one has M = {} 23

Microgrid i Microgrid i with Grid-Forming/Feeding onverters I R L P Bus I ij Line ij R ij L ij j ommunicaon 3 RES RES i R Li I Li Leader N 2 I, j N, pu Sec tj j i ESS ESS I R L k, i k2, i k3, i k, i k2, i k3, i i I s I s I oltage/urrent-based PnP ontroller i i Icap,i Pri, pu I ref, i Pri ref, i K K p p K + s i K + s i I, i N Sec, pu Sec Sec ref ref L I cap,i Leader-Based urrent ontroller Eq (98b) Leader-Based oltage ontroller Eq(98a) Leader-Based oltage/urrent Secondary ontroller i Figure 3: Electrical Scheme of MG i with Leader-based oltage/urrent Distributed Secondary ontroller Remark 5 The design of stabilizing controller for each MG can be conducted according to Proposion 4 In parcular, differently from the approach in [], no opmizaon problem has to be solved for compung a local controller Indeed, it is enough to choose control coefficient k,i, k 2,i, k3,i and k,i, k 2,i, k 3,i from inequality set (56) Note that these inequalies are always feasible, implying that a stabilizing controller always exists Moreover, the inequalies depend only on the parameters R and R of the MG i Therefore, the control synthesis is independent of parameters of MGs and power lines which means that controller design can be executed only once for each converter in a plug-and play fashion From Theorem 2, local controllers also guarantee stability of the whole MG cluster When new MGs are plugged in the MG cluster, their controller are designed as described above, the connecvity of the electrical graph G el is preserved and have Theorem 2 applied to the whole MG cluster Instead, when a MG is plugged out, the electrical graph G el might be disconnected and split into two connected graphs Theorem 2 can sll be applied to show the stability of each sub-cluster 6 Leader-based Distributed Secondary ontroller The proposed primary PnP controller can achieve both the voltage and current tracking control in which the reference is given by the local controller However, to achieve the coordinaon among MGs, references should be provided by the upper control layer to achieve voltage tracking and current sharing reasonably Furthermore, to avoid using the centralized controller to send the reference value for each PnP controller, the leader-based distributed consensus algorithm is proposed in the secondary control level including leader-based voltage and current controllers by which not each controller need to know the leader reference In this secon, the proposed primary PnP controller is approximated as unitary gains from the perspecve of secondary control level Then the leader-based voltage and current controller is proposed in the secondary control level Finally, combining with the proposed leader-based voltage and current controller, the asymptoc stability of the proposed controller is proven by Lyapunov stability theory 24

6 Leader-based oltage/urrent Distributed Secondary ontroller The leader-based voltage and current distributed secondary controller is proposed in this subsecon to achieve transfer reference informaon in a distributed way Based on (49) and (5), the transfer funcon from voltage reference z P ri, ref [i] and current reference z P ri, ref [i] to output voltage i and output current I can be written as Ĥi(sI ˆF i ) M i where M i collects the second and third columns of ˆMi If setng s = Hz, the unit matrix is obtained which means the primary PnP controller can be approximated as unit-gain i = P ri ref,i (97a) I = I,pu I cap,i = I P ri,pu ref,i (97b) The secondary control layer exploit a communicaon network interconnecng MGs and fulfilling the following Assumpon Assumpon 2 The communicaon graph G Sec = (D, E Sec ) is connected and undirected implying that communicaon links within MG clusters are bidireconal Over each communicaon link (i, j) E Sec, the pairs of variables (I,pu, i ) and (I,pu tj, j ) are transmitted Furthermore, the graph G Sec is endowed with an addional node termed the leader node, carrying the reference values (I Sec,pu ref, ref Sec ) and connected to at least one node belongs to D The proposed leader-based voltage and current distributed secondary controller can be written as e i = ( a ij ( i j ) + g i i Sec ) ref (98a) j Ni Sec e i = ( a ij Ii,pu,pu I ) ( ) j + g i I,pu i I Sec,pu ref (98b) j N Sec i where Ni Sec is the set of communicaon neighbors of MG i, a ij = if MGs i and j can communicate with each other through a communicaon link, g i = if MG i can receive the reference values about voltage and per-unit current which means i NL Sec and NL Sec is the set for MG who can receive the reference values To be specific, the current reference value I Sec,pu ref is a per-unit value considering the total load requirement and the total system capacity If the per-unit values of all the output currents from MGs are equals to the reference value, it means that MGs within the cluster share the output current properly according to their own capacies In matrix form, (98) is given by the equaons: { e = (L + G)( Sec N ) e = (L + G)(I,pu t ref N I Sec,pu N ) ref N (99a) (99b) where e = [ e e 2 e N ] T, = [ 2 N ] T,I,pu t = [ I,pu t I,pu t2 I,pu tn ] T, and G is a diagonal matrix with diagonal entries equal to the gains g i Based on Assumpon 2, L is symmetric Laplacian matrix Then, the error e i and e i are filtered by PI controllers respecvely In order to provide the output i and I,pu of the secondary controller layer, it can be written as = K p e = K p e I,pu t K i e K i e (a) (b) 25

where = [ 2 N ] T, I,pu t = [ I,pu t I,pu t2 I,pu tn ] T, in addion, K p and K i are proporonal and integral coefficients of the leader-based voltage controller and K p and K i are proporonal and integral coefficients of the leader-based current controller All the coefficients are common to all MGs, thus these are scalar variables Remark 6 Here, for the consensus-based algorithm, in the literature[23], consider only the integral controllers interfacing with the consensus algorithm and the primary control level In this paper, PI controller is used in order to improve the convergence speed of the secondary controller The relaonship between the primary PnP controller and the leader-based secondary controller are shown in Fig 3 Exploing the unit gain approximaon of primary loops, one obtains that (97) is replaced by { = P ri ref + (a) I,pu t = I P ri,pu ref where ref P ri = [ ref, P ri ref,2 P ri ref,n P ri ]T, I P ri,pu ref Focusing the me derivave of (), we get 62 Stability Analysis + I,pu t = [ I P ri,pu ref, I P ri,pu ref,2 I P ri,pu ref,n ]T (b) { = K i [I + K p (L + G)] e (2a) I,pu t = K i [I + K p (L + G)] e (2b) The aim is to show that under the effect of secondary control layer, all P voltage converge to the leader value ref Sec and all the output current converge to the same per-unit value ISec,pu ref Lemma 4 Under Assumpon 2, L is symmetric Laplacian matrix, G = diag[g, g 2,, g n ] is diagonal matrix in which g i and at least one g i >, then matrix L + G is posive definite Proof As menoned in Notaon at the beginning of this technical report, each vector x R n can always be written in a unique way as Then, one has (4) is equivalent to the two following cases Thus, matrix L + G is posive definite matrix x = ˆx + x with ˆx H and x H (3) x T (L + G)x = ˆx T Lˆx + x T Gx (4) If ˆx, ˆx } T {{ Lˆx } + x } T {{ Gx } > > If ˆx =, x } T {{ L x } + } x T {{ G x } > = > (5a) (5b) orollary Under Lemma 4, matrix (L + G) is posive definite and matrix [I + α(l + G)] where scalar α > is also posive definite We recall that if α is a scalar, A is posive definite matrix and I is unit matrix which is also posive definite matrix, from Woodbury matrix identy theory [24], one has [I + αa] = α A α A (α A + I) α A (6) Lemma 5 [25] Let A, B R n n be posive definite matrices If AB = BA is sasfied, then AB is posive definite 26