Gradient Formulation for the Stability of DC-Microgrids

Gradient Formulation for the Stability of DC-Microgrids

Alejandro Garces
August 2018

This paper presents a non-linear stability analysis for dc-microgrids in both, interconnected mode and island operation with primary control. The proposed analysis is based on the fact that the dynamical model of the grid is a gradient system generated by a strongly convex function. The stability analysis is thus reduced to a series of convex optimization problems. The proposed method allows to: i) demonstrate the existence and uniqueness of the equilibrium ii) calculate this equilibrium numerically iii) give conditions for global stability using a Lyapunov function iv) estimate the attraction region. Previous works only address one of these aspects. Numeric calculations performed in cvx and simulations results in Matlab complement the analysis and demonstrate how to use this theoretical results in practical problems.

non-linear circuits, dc-microgrids, stability analysis, convex optimization, gradient systems.

I Introduction

DCmicrogrids and dc distribution are promising technologies for integrating solar panels, batteries and fuel-cells among other components that operate in dc. Most of these components are integrated through a power electronic converter that controls a constant power resulting in a non-linear circuit [1]. In particular, constant power loads can introduce a negative resistance effect which in turns generates transient stability problems. Rigorous methodologies for stability analysis are required in this new context.

Several stability methodologies have been proposed for systems with ad-hoc controls [2]. However, the conventional droop control with a constant power model is the most common approach for control and stabilization of microgrids [3]. Most of the stability studies on this type of controls are based on linearization (i.e small signal stability). Transient stability in these generalized models is still a challenge due to their non-linear behavior; even finding the equilibrium point can be a challenge.

This paper proposes a methodology for transient stability of dc-microgrids based on the study of gradient systems. Although these type of systems have a rich and general theory, we are interested in a particular type, namely, gradient systems with a strongly convex function (we will call these as strongly-convex-gradient systems). We demonstrate the existence and uniqueness of the equilibrium as well as the conditions for global stability. In addition, we show a simple method for calculating this equilibrium and also estimating the region of attraction. Being a convex problem, we can guarantee convergence of the algorithms. Our model is simple enough to be tractable computationally but showing the main interaction between components of the nonlinear circuit. Just as in the case of the second order model for power systems applications. The proposed analysis shows a surprising connection between dynamical systems and convex analysis. This connection is explored from a practical point of view, since the stability analysis is transformed into a series of convex optimization problems that can be solved numerically. To the best of the author’s knowledge, there is not applications of the approach proposed in this paper.

The existence of the equilibrium was analyzed in [4] for one constant power load and generalized in [5] for several loads. A different approach was presented in [6] and [7] based on the convergence of the power flow. In the later methods, it was demonstrated that conventional algorithms such as Gauss and Newton’s methods converge to a unique equilibrium point under well defined conditions.

From the stability point of view, several studies have been presented for the small signal case [8][9][10]. However, transient stability studies are required in order to increase the accuracy of the study and consider the non-linear behavior of the grid. A recent review of transient stability analysis in microgrids can be found in [11].That review showed the necessity of systematic methods for large-scale stability analysis and reduced order models of the grid. Our method fulfills these conditions. In [12] a stabilization method was proposed for a dc-microgrid in which all the terminals were connected to the same bus-bar with only one equivalent constant power load. Droop controls were considered only on the sources. Our method consider the topology of the grid with different constant power loads and droop control in both the constant voltage and constant power terminals. In fact, constant power loads have been the main concern of recent stability analysis such as [13] and [14]. However, most of these studies are developed for ad-hoc controls requiring a detailed model of the converter. None of these approaches reveals the gradient characteristics of the model.

The use of convex analysis is also a contribution of this paper. Although this type of analysis is usually consider in linear matrix inequalities, that type of analysis is linear whereas the method presented here is nonlinear. In [14] a semidefinite programming methodology was proposed by formulating a Lure problem with quadratic bounds. That formulation allowed to estimate the region of attraction in grids with constant power loads. However the topology of the grid was limited to a unique bus-bar and the analysis is basically linear.

The rest of the paper is organized as follows: Section II presents the dynamical model of the dc-microgrid considering constant power terminals. Section III describes the stability analysis based on the use of gradient systems with strongly convex functions. Section IV explain how the stability problem is transformed into convex optimization models which allow to determine the attraction region, equilibrium point and under-voltage limit. Simulation results are presented in Section V followed by conclusions, appendix and references.

Ii Problem definition

Let us consider a dc-microgrid with droop control that is expected to operate whether grid-connected or in island-mode. The master node is represented by and maintains a constant voltage ; the rest of the nodes are represented by and maintain a constant power which can be positive or negative. The grid is purely restive and is represented by the admittance matrix which includes linear loads eliminated by a kron’s reduction [15]. The model of each constant power terminal is depicted in Fig 1. It includes the capacitive effect of the converter and the droop control. This model is widely used in different applications including dc-microgrids [16] and multiterminal HVDC transmision [17].


Slave node with primary control


Master node

Fig. 1: Shcematic representation of the dc-microgrid

The dynamics of the grid can be represented as follows:


where are nodal voltages, are entries of the admittance matrix and is the capacitance of the converter. Notice this is a non-linear dynamical system due to the presence of constant power devices. The model is the same for grid connected or island operation. The only difference is that under island operation, the switch is opened and hence .

On the other hand, each converter is equipped with a droop control with constant . We assume that and meaning that we can have terminals that do not participate in the primary control ( can be zero). In addition, the graph that represents the grid is connected and hence (i.e it is positive definite). We allow transients generated by disconnection of the master node or abrupt changes in generation or demand. However, we assume the grid is not under short circuit and hence (our model would produce an infinite current for a shorcircuit in the capacitor).

It is important to notice that this model is general enough and allows to represent different components according to their functionality. For example, a solar panel is just a constant power device with while a constant power load is the same model but with . As we will demonstrate below, constant power generation does not create big stability problems being the constant power loads the main source of instabilities. A simple justification of this fact, is that constant power loads generates a negative resistance effect that induce instability.

Iii Stability Analysis

Iii-a Convex analysis and gradient systems

We are interested in using convex optimization for analyzing stability in a particular type of dynamical systems, namely, gradient systems with strongly convex functions. Therefore, we will use some results from convex optimization restricting our analysis to continuously differentiable functions, in order to be used as Lyapunov candidates. Following this idea, let us start by this classical result

Theorem 1.

Consider a non-empty convex set and a twice differentiable function such that


where is a real number such that , is the Hessian matrix of and is the identity matrix of size . We say that is a strongly convex; for this type of function there exists a global minimum and this minimum is unique.


See [18]

Remark 1.

There is a more general theorem which includes strictly convex functions (see [18] for more details). However, Theorem 1 is general enough for our dynamical problem and avoids the proliferation of unnecessary definitions and technicalities.

Remark 2.

It is well known that convex functions have a global optimum. However, for the case strongly convex functions, this optimum is not only global but also unique.

Let us connect this result with the dynamical system theory by proposing the following definition

Definition 1.

A strongly-convex-gradient system is a dynamical system that can be represented as


where (i.e positive definite) and represents the gradient of a strongly convex function .

With this simple definitions we can present our first result:

Theorem 2.

Consider a strongly-convex-gradient system described by (3). Then, there is a unique equilibrium point and this equilibrium is asymptotically stable. In addition is an estimation of the atraction region.


Consider the gradient system (3) with a strongly convex function . The equilibrium point is given by the points in which which correspond to the global minimum of . This minimum is also unique due to Theorem 1, guaranteeing the existence and uniqueness of the equilibrium point. For the stability analysis, consider a Lypunov function which evidently fulfills the conditions for stability, namely , and


Asymptotic stability is directly demonstrated by invoking LaSalle’s invariant principle principle.

This simple result allows to transform the problem of stability into a convex optimization problem. This is an advantage since we can calculate numerically the equilibrium point and estimate the region of attraction as will be demonstrated in the next sections.

Iii-B Dc-microgrids as gradient systems

Dc-microgrids can be represented as strongly-convex gradient systems. Let us formalize this by the following lemma that can be demonstrated by simple substitution and corresponding derivation:

Lemma 1.

The system given by (1) can be represented as a gradient system with gradient given by


and . In addition, the Hessian matrix of is given by


where , and

In order to demonstrate stability, it is enough to establish that exists a convex set in which is strongly convex. This criteria is presented in the following theorem which constitute the main theoretical result of this paper:

Theorem 3.

A dc-microgrid with the conditions of Lemma 1 has an asymptotically stable equilibrium point if there exists a non-empty set containing the equilibrium which is given by


with . This set is an estimation of the region of attraction.


It is easy to see from Lemma 1 that the function is strongly convex if the Hessian given by (6) is such that . This is evidently true if the set (7) exists. This is an estimation of the region of attraction since it is an invariant set. ∎

Remark 3.

Recall that one of our main assumptions is that no capacitor is in short-circuit meaning that . Therefore, the change of variables is a bijection, i.e we can obtain directly the value of from the value of and vice versa. We define two spaces and in order to simplify our nomenclature.

This theorem, allows a simple methodology for analyzing stability in dc-microgrids using convex optimization. For example, a direct result is obtained for the generation case:

Corollary 1.

For the generation case there is a unique equilibrium point and the region of attraction is the entire first quadrant (i.e )


Notice that for the generation case and hence we can increase as large as desired in order to fulfill the generalized inequality. The set of constraints is fulfilled even for which correspond to the entire fisrt quadrant in both, the space and the space in . ∎

This corollary only formalize a result that is well known for practical applications: generation case is not an stability issue being the constant power loads the real problem. In the next subsections, we analyze the general case with both constant power generation and constant power loads.

Iv Stability analysis using convex optimization

Theorem 3 allows to define different convex optimization models for the stability analysis. In the following subsections we present different optimization models according to the desired analysis.

Iv-a Equilibrium point

The existence and uniqueness of the equilibrium point on dc microgrids has been analyzed previously for different authors (see for example [6] and [7]). Here, we use Theorem 3 and define a simple optimization model

Model 1 (equilibrium point).

Hence, the equilibrium point of (1) can be obtained as , given that exists and contains the point . The optimization problem can be solved by gradient or Newton’s methods guaranteeing uniqueness and convergence if is strongly-convex. The gradient method has a linear convergence while the newton method has a quadratic convergence (see [18] for more details).

Iv-B Region of attraction

For the general case, the region of attraction can be estimated by maximizing the hypervolume of . However, the shape of is a spectrahedron which can be quite complicated for being used in practical applications. For the sake of simplicity, we inscribe a hypercube inside defined by . Then, our objective is to maximize the hypervolume of by maximizing . Therefore, an inner approximation of the region of attraction can be obtained by solving the following optimization model

Model 2 (region of attraction).

Notice this is a convex optimization problem. If the result is a positive then the equilibrium is asymptotically stable and the values of define the limits of the hyper cube that represents an estimation of the region of attraction (in Section VI we show that this estimation is very accurate in practice).

It is possible to return to the original values by using the transformation from to . In practice, this set can be considered as a limit for a voltage stability analysis and as an under-voltage protection, i.e the component must be disconnected for voltages lower than these voltages. Notice that Model 2 does not depend on the voltage and hence it can be used during voltage sags in the main grid (we will talk more about this issue in the results section).

V Results

The proposed methodology was evaluated in the 10-node dc-microgrid depicted in Fig 2. Nominal values of the grid are 380V/1kW and each line segment has a resistance of . The rest of the parameters are given in Table I.

Before considering the entire grid, led use study the case in which only load and generation are connected. The motivation of such a basic case, is that the dynamical model is in allowing graphical representations (see [19] for a nullcline analysis on the plane for this simplified case).

Node Model 1 Model 2
1 1 -80 690 0.9893 0.0958
2 1 -70 560 0.9851 0.0958
3 1 80 630 0.9917 0.0001
4 1 -50 500 0.9881 0.0710
5 1 -70 690 0.9954 0.0958
6 1 80 640 1.0047 0.0001
7 1 100 600 1.0129 0.0001
8 1 50 630 1.0026 0.0001
9 1 -90 690 0.9973 0.0818
TABLE I: Parameters of the constant power terminals and results of each model











Connection to the AC grid

constant voltage 1pu










Fig. 2: A 10-node microgrid constant power generation and constant power loads. The figure shows solar panels and residential users but the model is general enough for any type of distributed resource.

The equilibrium point was obtained by Model 1 using the Newton’s method giving and . Theorem 1 guarantee these values are unique in the convex set which defines the region of attraction. This region can be estimated by Model 2 obtaining the minimum voltages which define an open subset in as depicted in Figure 3; this figure depicts also the equilibrium point and three trajectories from different initial conditions calculated by the function ode45 of Matlab. As expected, initial points inside the estimation of the region of attraction go directly to the equilibrium. A fourth trajectory starting in the point (outside of the region of attraction) was calculated but not depicted in the figure since this trajectory was unstable and the function ode45 diverged.





Fig. 3: Estimation of the region of attraction for the case of two constant power loads. Three different trajectories starting from points (A), (B) and (C) converge to the equilibrium point (0)

Let us consider now the general case with 7 constant power terminals: 3 constant power generations (nodes 3,7,8) and 4 constant power loads (nodes 2,3,5,9). The main results of each model are given in Table I. Let us analyze each one of them.

The equilibrium point and the estimation of the region of attraction were obtained by Models 1 and 2 respectively. The estimation of the region of attraction is a hypercuve with the same interpretation as in the previous case. Now, this region can be used as criteria for voltage protection. In order to evaluate the under-voltage protection criteria, let us consider the case of a voltage sag in the main converter; the grid starts from an initial condition of but the voltage is reduced until for . As result, nodal voltages reach values bellow and the system becomes unstable (instability is diagnosed numerically since the function ode45 of Matlab diverge). This problem was avoided by disconnecting terminals with values below . Figure 4 shows this type of protection for Load (similar behaviour is obtained for the rest of the terminals). Notice that the region of attraction was calculated considering the entire grid, but the criteria for the under-voltage protection is completely local, meaning that only its own measure of voltage is required.

Fig. 4: Using the region of attraction as indicator for under-voltage protection. Due to the voltage sag in the voltage in node 2 is reduced until reach a value below that . The system disconnects the load until the voltages are again feasible. Stability is guaranteed in the entire process

These numerical simulations are available in [20] in order to reproduce the results and evaluate other possible configurations.

Vi Conclusions

A convex based methodology for transient stability analysis of dc-micrids was presented. This methodology was based on a gradient representation of the grid and the general observation that the energy function is strongly-convex. The dynamical problem was then transformed into optimization problems in which Model 1 allowed to find the equilibrium point and Model 2 estimated the region of attraction. The later is also used in practice as a criteria for under-voltage protection. The main result was demonstrated mathematically using the Lyapunov method under well defined consideration regarded the convexity of the Lyapunov function. A complete set of simulations was performed in order demonstrate the practical applicability of the methodology.


  • [1] L. Meng, Q. Shafiee, G. F. Trecate, H. Karimi, D. Fulwani, X. Lu, and J. M. Guerrero, “Review on control of dc microgrids and multiple microgrid clusters,” IEEE Journal of Emerging and Selected Topics in Power Electronics, vol. 5, no. 3, pp. 928–948, Sept 2017.
  • [2] W. Inam, J. A. Belk, K. Turitsyn, and D. J. Perreault, “Stability, control, and power flow in ad hoc dc microgrids,” in 2016 IEEE 17th Workshop on Control and Modeling for Power Electronics (COMPEL), June 2016, pp. 1–8.
  • [3] T. Dragicevic, X. Lu, J. C. Vasquez, and J. M. Guerrero, “Dc microgrids part i: A review of control strategies and stabilization technique,” IEEE Transactions on Power Electronics, no. 7, pp. 4876–4891, July.
  • [4] S. Sanchez, R. Ortega, R. Grino, G. Bergna, and M. Molinas, “Conditions for existence of equilibria of systems with constant power loads,” IEEE Transactions on Circuits and Systems I: Regular Papers, vol. 61, no. 7, pp. 2204–2211, July 2014.
  • [5] N. Barabanov, R. Ortega, R. Grino, and B. Polyak, “On existence and stability of equilibria of linear time-invariant systems with constant power loads,” IEEE Transactions on Circuits and Systems I: Regular Papers, vol. 63, no. 1, pp. 114–121, Jan 2016.
  • [6] A. Garces, “Uniqueness of the power flow solutions in low voltage direct current grids,” Electric Power Systems Research, vol. 151, pp. 149 – 153, 2017. [Online]. Available:
  • [7] ——, “On the convergence of newton’s method in power flow studies for dc microgrids,” IEEE Transactions on Power Systems, vol. 33, no. 5, pp. 5770–5777, Sept 2018.
  • [8] R. Majumder, “Some aspects of stability in microgrids,” IEEE Transactions on Power Systems, vol. 28, no. 3, pp. 3243–3252, Aug 2013.
  • [9] A. A. A. Radwan and Y. A. I. Mohamed, “Linear active stabilization of converter-dominated dc microgrids,” IEEE Transactions on Smart Grid, vol. 3, no. 1, pp. 203–216, March 2012.
  • [10] Z. Li and M. Shahidehpour, “Small-signal modeling and stability analysis of hybrid ac/dc microgrids,” IEEE Transactions on Smart Grid, pp. 1–1, 2018.
  • [11] M. Kabalan, P. Singh, and D. Niebur, “Large signal lyapunov-based stability studies in microgrids: A review,” IEEE Transactions on Smart Grid, vol. 8, no. 5, pp. 2287–2295, Sept 2017.
  • [12] M. Su, Z. Liu, Y. Sun, H. Han, and X. Hou, “Stability analysis and stabilization methods of dc microgrid with multiple parallel-connected dc-dc converters loaded by cpls,” IEEE Transactions on Smart Grid, vol. 9, no. 1, pp. 132–142, Jan 2018.
  • [13] J. Liu, W. Zhang, and G. Rizzoni, “Robust stability analysis of dc microgrids with constant power loads,” IEEE Transactions on Power Systems, vol. 33, no. 1, pp. 851–860, Jan 2018.
  • [14] L. Herrera, W. Zhang, and J. Wang, “Stability analysis and controller design of dc microgrids with constant power loads,” IEEE Transactions on Smart Grid, vol. 8, no. 2, pp. 881–888, March 2017.
  • [15] G. Kron, Tensors for circuits.   Dover Publications, 1942.
  • [16] O. D. Montoya, “Numerical approximation of the maximum power consumption in dc-mgs with cpls via an sdp model,” IEEE Transactions on Circuits and Systems II: Express Briefs, pp. 1–1, 2018.
  • [17] A. Doria-Cerezo, J. M. Olm, M. di Bernardo, and E. Nuno, “Modelling and control for bounded synchronization in multi-terminal vsc-hvdc transmission networks,” IEEE Transactions on Circuits and Systems I: Regular Papers, vol. 63, no. 6, pp. 916–925, June 2016.
  • [18] Y. Nesterov and A. Nemirovskii, Interior point polynomial algorithms in convex programming, 1st ed., ser. 10.   Philadelphia: SIAM studies in applied mathematics, 1994, vol. 1.
  • [19] A. Garces and A. Gutierrez, “On the stability of dc microgrids with two constant power devices,” in 2018 IEEE Green Technologies Conference (GreenTech), April 2018, pp. 33–37.
  • [20] A. Garces. (2016, May 20) Matlab central file exchange. [Online]. Available:
Comments 0
Request Comment
You are adding the first comment!
How to quickly get a good reply:
  • Give credit where it’s due by listing out the positive aspects of a paper before getting into which changes should be made.
  • Be specific in your critique, and provide supporting evidence with appropriate references to substantiate general statements.
  • Your comment should inspire ideas to flow and help the author improves the paper.

The better we are at sharing our knowledge with each other, the faster we move forward.
The feedback must be of minimum 40 characters and the title a minimum of 5 characters
Add comment
Loading ...
This is a comment super asjknd jkasnjk adsnkj
The feedback must be of minumum 40 characters
The feedback must be of minumum 40 characters

You are asking your first question!
How to quickly get a good answer:
  • Keep your question short and to the point
  • Check for grammar or spelling errors.
  • Phrase it like a question
Test description