Curing Braess' Paradox by Secondary Control in Power Grids

Robust operation of power transmission grids is essential for most of today's technical infrastructure and our daily life. Adding renewable generation to power grids requires grid extensions and sophisticated control actions on different time scales to cope with short-term fluctuations and long-term power imbalance. Braess' paradox constitutes a counterintuitive collective phenomenon that occurs if adding new transmission line capacity to a network increases loads on other lines, effectively reducing the system's performance and potentially even entirely removing its operating state. Combining simple analytical considerations with numerical investigations on a small sample network, we here study dynamical consequences of secondary control in AC power grid models. We demonstrate that sufficiently strong control not only implies dynamical stability of the system but may also cure Braess' paradox. Our results highlight the importance of demand control in conjunction with grid topology for stable operation and reveal a new functional benefit of secondary control.

Robust operation of power transmission grids is essential for most of today's technical infrastructure and our daily life. Adding renewable generation to power grids requires grid extensions and sophisticated control actions on different time scales to cope with short-term fluctuations and long-term power imbalance. Braess' paradox constitutes a counterintuitive collective phenomenon that occurs if adding new transmission line capacity to a network increases loads on other lines, effectively reducing the system's performance and potentially even entirely removing its operating state. Combining simple analytical considerations with numerical investigations on a small sample network, we here study dynamical consequences of secondary control in AC power grid models. We demonstrate that sufficiently strong control not only implies dynamical stability of the system but may also cure Braess' paradox. Our results highlight the importance of demand control in conjunction with grid topology for stable operation and reveal a new functional benefit of secondary control.

I. INTRODUCTION
Modern electrical power grids are complex interconnected networks in which supply and demand have to match at all times since the grid itself cannot store any energy [1,2]. To guarantee this match, different economic mechanisms, like day-ahead and intra-day markets are used [3]. For unscheduled mismatches, e.g. random fluctuations [4], disturbances or extreme weather, faster control mechanisms are required [5]. Such control actions become increasingly important due to the rising share of renewable generation integrated into the grid [6][7][8]. Control mechanisms are ordered by their time scale on which they act: Suppose a power plant has to unexpectedly shut down and all of a sudden there is a shortage of energy in the system. The first second of the disturbance is mainly uncontrolled, i.e. energy is drawn from the spinning reserve of the generators. Within the next seconds, the primary control sets in to stabilize the frequency and prevents a large drop. To restore the frequency back to its nominal value of 50 Hz or 60 Hertz, secondary control is necessary [5]. However, in many recent studies on power system dynamics and stability, the effects of control are completely neglected or only primary control is considered [9][10][11][12][13][14][15]. Including secondary control might be crucial when determining stability conditions. Even in cases where secondary control is modeled explicitly [16], its stability properties and interaction with the network topology are not fully investigated. Nonetheless, grid topology and control mechanisms have to adapt within the next years to cope with the spatially distributed and fluctuating renewable generation, which may be far away from consumers [17]. Grid adaptation includes additional transmission lines and increasing capacity of existing lines [18,19]. Contrary to expectations, not all added lines are beneficial to the stability of a grid. Instead, adding some lines may cause the grid to lose its operating state via Braess' paradox, which was initially discovered for transportation networks [25] but may also occur in power grids [20][21][22][23][24]. Here, we present a dynamical analysis on the effectiveness and limitations of an implementation of secondary control that depends on the absolute voltage phase angle θ of a synchronous machine. We dynamically show how a simple implementation of secondary control restores a power grid with a power mismatch back to the nominal frequency. Furthermore, we investigate the stability of a grid with secondary control as a function of the network topology. In particular, we study a setting in which secondary control prevents Braess' paradox. We find that Braess' paradox is reliably avoided if all nodes are controlled. However, controlling only generators still allows Braess' paradox as before, thereby highlighting the importance of demand-side control in future grids. This article is structured as follows. First, we present a simple model of the dynamics of the electric power network in the presence of secondary control in Section II. The generators and consumers are modeled as synchronous machines and the control is modeled by using Load Frequency Control (LFC) and Automatic Generation Control (AGC) [26]. Next, we investigate the dynamics of the grid including secondary control and demonstrate its capability to stabilize a grid with a power mismatch in Section III. Section IV investigates Braess' paradox when applying secondary control. We close the paper with a discussion on the impact of our results on current and future power grids.

II. MATHEMATICAL MODELING OF THE ELECTRIC POWER SYSTEM
Most of today's electric power is generated by three phase synchronous generators, e.g. driven by steam or hydro turbines, which output an alternating current (AC) [27]. The electric power grid may then be modeled as an interconnected network consisting of nodes linked by power transmission lines (links). Each node can be interpreted as a local area including power generation and consumption with net mechanical power input P m i being negative for effective consumer regions, e.g. urban areas, and positive for effective generators. We model each node by the well-known swing equation [1,5,9,10,14], which gives the equation of motion in the rotating frame of each node i aṡ The state of node i is characterized in the co-moving reference frame by the voltage phase angle θ i and the angular velocity deviation ω i . P e i represents the total power consumed and transmitted at node i. Finally, ω R =2π × 50 Hz or 60 Hz is the reference angular velocity of the grid and H is the inertia constant of the generator with a power rate P Gmax i . Due to the choice of reference frame, ω i = 0 implies a frequency of 50 or 60 Hz.
The power grid is subject to fluctuations, e.g. due to changing demand, volatile generation of renewables or trading [4,28,29]. To cope with these fluctuations, the grid is controlled on multiple time scales with primary control being the fastest, followed by secondary control. The primary frequency control is typically done by a few dedicated power plants, which adjust their mechanical power output proportional to the angular velocity deviation ω i [5,27]. Secondary control is then applied through Automatic Generation Control (AGC) to restore the frequency, using spinning and non-spinning reserves. We model this frequency regulation as a Proportional Derivative (PD) control [26]. Alternatives include Proportional (P) control, Proportional Integral (PI) control or Proportional Integral Derivative (PID) control [30][31][32].
Given this implementation of primary and secondary control and assuming that the voltage amplitude is constant, we model each machine i by means of the swing equation [26,33], which includes a Kuramotolike coupling between the machines [13]: where α i is a damping constant due to losses and damper windings and K ij is proportional to the susceptance of line (i, j) and gives the capacity of a line. P i is the effective power fed into the grid or consumed at node i. P i is positive for generators, while it is negative for consumers. Finally, ∆P ci is the control power with time constant τ i , derivative and proportional control gain β i and γ i respectively. The term γ i gives essentially the magnitude of the secondary control while β i determines the magnitude of the primary control. Eq. (2) has the form of the well-known 2nd-order Kuramoto model, which has been used for example in [9,34] without control to describe the dynamics of the power grid.
In the remainder of this article, we set the parameter τ i =0, meaning that the control acts instantaneously. This approximation does not affect the final steady state of the system, which we are mainly interested in, simplifying the model considerably. The time constant τ i only changes the frequency of the oscillations during the transient dynamics. Thereby, we can solve the equation for ∆P c and insert it into the equation ofω i . In addition, since the damping α i and primary control β i play a similar dynamical role, we absorb any contribution from β i into α i , effectively setting β i = 0. With that, our equation of motion for each machine readṡ Throughout this article, we will initialize numerical simulations of eq. (3) using θ i (0) = 0 and ω i (0) = 0 for all nodes as initial conditions.

III. STEADY STATE ANALYSIS AND STABILITY CONDITION
The power grid is in a steady state when all rotatory machines are phase-locked, i.e, have the same frequency, which ideally is the reference frequency of f R = 50 Hz or 60 Hz [35]. To derive the stability conditions of the synchronous state with respect to small perturbations, we linearize Eq. (3) around a steady state (θ * i , ω * i ). We denote small perturbations around the fixed point as θ i =θ * i +δθ i and ω i =ω * i +δω i and define X 1 and X 2 , as the n-dimensional vectors of δθ i and δω i , respectively. Linearizing (3) yieldṡ where Γ and A are diagonal matrices with elements Γ ii = γ i and A ii = α i respectively, representing the control and the damping matrix. Matrix L=(L ij ) is a Laplacian matrix of the network topology, defined as We diagonalize the Laplacian matrix L by substituting where M is the matrix composed of the eigenvectors of L such that that J = MLM −1 is the diagonalized matrix composed by the eigenvalues µ j . Eq. (4) can be rewritten as Without secondary control, i.e., γ i = 0, this dynamical system exhibits a single zero eigenvalue that does not determine the overall system stability but arises because the stability is only defined up to an arbitrary phase shift, i.e., we could replace all phases by different ones by adding a constant everywhere [13] θ i →θ i = θ i + const.
However, for the general case of γ i > 0, the synchronous state of the system is stable if and only if the real parts of all lyapunov exponents λ j are negative. We assume symmetric coupling K ij = K ji ; thereby guaranteeing real eigenvalues µ j . The stability of the synchronous state of the uncontrolled system (γ j = 0 ∀j) is guaranteed if all eigenvalues µ j of the Laplacian matrix are real and positive, see Eq. (8) and [13,36]. If however a given eigenvalue µ j is negative, one of the corresponding eigenvalues λ j± is positive and the other one is negative; therefore, the synchronous state is unstable. With added secondary control, i.e., γ j > 0, the region of stability increases, see Fig. 1, which holds for any number of nodes. Mathematically, the system is stable within the region defined by µ j + γ j > 0, see also [36,37].
Next, let us investigate the elementary system consisting of two nodes, a generator (P 1 > 0) and a consumer (P 2 < 0) first without secondary control to then investigate the benefits of adding such control.

A. Uncontrolled two nodes system
We consider a two nodes system without control, i.e., we set γ 1 = γ 2 = 0, which is then governed by the following equations for the phase difference ∆θ = θ 1 −θ 2 and the frequency difference∆θ = ω 1 −ω 2 = ∆ω with ∆P = P 1 − P 2 where we have assumed homogeneous damping α 1 = α 2 = α. The system has a steady state if and only if 2K ≥ ∆P , see also [13]. The physical reason for the absence of a fixed point for 2K < ∆P is that the electric power flowing through a line cannot exceed the maximal capacity K. For 2K > ∆P the two steady states, T 1 and T 2 , obtained from (9), and their respective eigenvalues are  8). We assume that the control is homogeneous throughout the network, i.e., γj = γ. (a) Without control, γ = 0, the system becomes unstable as soon as the Laplacian eigenvalue µ becomes negative, as then Re(λ) > 0. Note that Eq. (8) starts having two solutions as soon as α 2 = 4(µ + γ). (b) With increasing control, γ > 0, the region of stability also increases. The plots use a homogeneous damping value of α = 1.
The steady state T 1 is a stable fixed point since we assume the damping α to be positive. In contrast, the steady state T 2 is a saddle since its eigenvalues λ + is a positive real number. For 2K = ∆P , T 1 and T 2 collide via a saddle node bifurcation on a cycle (SNIC), entering a limit cycle for K < ∆P 2 . Such limit cycles often cause large frequency deviations that would result in the shutdown of (parts of) the grid and are therefore undesirable [13]. But even for sufficient transmission capacity, i.e. 2K ≥ ∆P , the grid enters a limit cycle if we have unbalanced power, P 1 + P 2 = 0 so that, from Eq. (3) the synchronous angular velocity is given as Hence, the grid is no longer at its reference frequency of f R = 50 Hz or 60 Hz but below it for P 1 + P 2 < 0 and above it for P 1 + P 2 > 0. To restore the frequency to the reference, we apply our secondary controller in the next subsection.
B. Two nodes system with secondary control Next, we consider the two nodes system where one node applies a secondary control, i.e., we set the control parameters γ 1 = 0 and γ 2 = γ in the equation of motion (3). Then, the steady state of the controlled system is obtained as For P 1 > K, there is no steady state and the system approaches a limit cycle, as the power cannot be transferred via the line and node 1 is uncontrolled. For P 1 < K however, there will be a fixed point, even if the power is unbalanced P 1 +P 2 = 0, in contrast to the uncontrolled system (Fig 2). While the uncontrolled system (solid lines) approaches a limit cycle with ω sync , as obtained by Eq. (12), the controlled system is attracted to the fixed point, i.e. a stable operating state of the grid. With control, the system returns to ω = 0, i.e., the grid returns to its reference frequency fR. Red and green curves represent the consumer and generator of a two node system respectively with parameters Next, we perform a stability analysis of the fixed point. Let X=(δθ 1 , δθ 2 , δω 1 , δω 2 ) be a small perturbation of the fixed point. The equations of motion of these small perturbations are given bẏ where the matrix D is defined as The characteristic polynomial of matrix D is given as where the parameters a 1 , a 2 , a 3 and a 4 are given by To analyze the stability of the full four dimensional system, we need to obtain an expression for the eigenvalues. Unfortunately, a fourth or higher order polynomial does not have an easy to analyze solution so that we apply the Routh Hurwitz (RH) criterion to determine the stability [38]. The RH criterion is a method which contains the necessary and sufficient conditions for the stability of the system. Given the polynomial P (λ) = λ n + a 1 λ n−1 + ... + a n−1 λ + a n , where the coefficients a i are real constants, i = 1, .., n, we define the n Hurwitz matrices using the coefficients a i of the characteristic polynomial: According to the RH criterion, all roots of the polynomial P (λ) have negative real part if and only if the determinant of all Hurwitz matrices are positive: det(B i ) > 0, for all i = 1, 2, ..., n [38]. Applying the Routh Hurwitz criterion to the steady state of our two node system, we find that the steady state is stable if the following conditions are fulfilled: For the parameters used in this study, the three first conditions from (19) are always fulfilled since α, γ, a > 0. Hence, the steady state is stable if and only if d > 0. In terms of the control parameter γ, we obtain the following inequality which again is always true; hence, as long as there is non-zero control, γ > 0, the synchronous state is always stable, regardless of the further specific parameters of the system, highlighting the potential of secondary control. Next, we shall investigate how secondary control interacts with changes of the network topology that lead to Braess' paradox in uncontrolled systems.

IV. BRAESS' PARADOX PREVENTED BY SECONDARY CONTROL
Adding lines to a transmission network is intuitively expected to improve its synchronization ability. However, adding certain lines instead causes the grid to lose its synchronous state. More general, the effect of adding edges to a network and thereby causing problems and a decrease in performance was first predicted in 1968 for traffic networks [25] and it is since known as Braess' paradox. It was observed in traffic systems in New York, USA [39], and Stuttgart, Germany [40], when closing a street made the traffic go faster. In electric networks, Braess' paradox has been predicted in DC power flow [41], AC power flow [42] and recently in oscillator power grids [20,21]. Building additional transmission capacity under specific conditions causes Braess' paradox and thereby the grid loses its fixed point and we observe a blackout. Fortunately, not every network is susceptible to Braess' paradox. To study the effect of Braess' paradox in more detail, we investigate an elementary example network composed of 8 nodes, where adding one additional transmission line or increasing the capacity of an existing line leads to a desynchronization of the network. The network is shown in Fig. 3 with an added line or in Fig. 1a in [21]. Braess' paradox is best understood when considering fixed point solutions. A fixed point exists for a power grid described by the swing equation, ifθ i =ω i = 0, which is equivalent to if we set γ i = 0. These algebraic equations do not always have a solutions for the phases θ i . As a trivial example, without enough transmission capacity, i.e, N j=1 K ij < P i for finite power P i = 0 there cannot be any fixed point. In addition, adding a line in a network can result in the equations to be overdetermined and therefore to have no solution. Without solution, there is no fixed point and the grid desynchronizes in the absence of adequate counter measures (e.g. by external controllers), see Fig. 4a, b and c and [20]. We may also interpret these results in the light of the cirtical coupling K c of the grid [13]. The critical coupling is defined as the minimum value of K so that for a homogeneously coupled grid, i.e. K ij = Kk ij with unweighted adjacency matrix k, the algebraic equations (21) have at least one solution. Thereby, K c gives the minimum capacity necessary to synchronize the grid. Adding a line or increasing the capacity of one existing line effectively increases the critical coupling K c grid [20]. Increasing K c means the fixed point can only be restored by increasing the capacity K for all lines. Is Braess' paradox still present after adding secondary control? Let us consider again the 8 node network (see Fig. 3 for the network with added line). However, we add our PD controller in each node, such that the equations of motion are governed bẏ (22) Adding the control on all nodes reliably prevents Braess' paradox, see Fig. 4. There, we plot the phase of each node, with consumers in red and generators in green, using both the uncontrolled (first row) and the controlled (second row) network in three configurations: original network, increasing capacity and adding a new link. Specifically, we double the capacity of the edge (3,4) or add the line (2,4). The original network is stable regardless whether it is controlled or not. It enters a phase-locked state where all machines run in synchrony ( Fig. 4a and d). However, the steady state is lost when the capacity of a line is increased or a new link is added to the network (Fig. 4b and c). On the other hand, controlling the network guarantees a stable state even after increasing the capacity or adding a line, thereby preventing Braess' paradox ( Fig. 4e and f). To better understand how the controller stabilizes the network, we note that the effective power generated/consumed at each node is given by In case of the 8 node system, we plot the change of power ∆P i = −γθ i in Fig. 3. With control, generators have negative and consumers positive power change, i.e., the total consumption and the total generation are decreased. The condition to find a fixed point, Eq. Controlling all nodes changes the power dispatch in the system and allows stable operation without Braess' paradox. We display the 8 node system susceptible to Braess' paradox with an added line (2,4). Including secondary control causes all nodes to adapt their power following ∆Pi = −γiθi. This results in consumers (circles) to consume less (red: positive power change), while generators (squares) generate less (blue: negative power change). Thereby, the system preserves its steady state even after including a line that causes an overload in the uncontrolled system. In addition, we note a very heterogeneous load of the lines (line color; darker colors indicate higher load). Specifically, the lines (4,5) and (4,8) are highly loaded, i.e., the phase difference ∆θ4,5 becomes very large. Parameters used are α = 1 s −1 ; K = 1.03 s −2 , γ = 0.1 s −2 .  4. Secondary control stabilizes a network after increasing capacity or adding a link. Braess' paradox in power grids was observed when increasing the capacity of a line or adding an additional line caused the grid to lose its stable fixed point (panels a-c), see also [20]. In contrast, applying secondary control guarantees stability (panels d-f). We use the eight node system depicted in Fig. 3, only adding line (2, 4) for panels (c) and (f) and doubling the capacity of line (3,4) in panels (b) and (e). Parameter are γ = 0.1 s −2 , and α = 1 s −1 , K = 1.03 s −2 for all nodes and generator and consumer power set to Pgen = 1 s −2 , Pcon = −1 s −2 , respectively. As in Fig. 2, red and green lines correspond to consumers and generators respectively. For all configurations investigated, this equation has a solution if γ i > 0 ∀i. Even if the transmission capacity K ij is insufficient or would normally cause Braess' paradox, the term −γ i θ balances the equation and guarantees a solution. Thereby, we do not need to increase the capacity of all lines because the control reduces the total load in the system.

Power change
We illustrate this for a 2 node system with γ 1 = γ 2 = γ. The critical coupling is then given as i.e. the controller reduces the load on the lines, enabling the fixed point with lower capacity. Following the same argumentation, secondary control also cures Braess' paradox which would otherwise require an increase of the transmission capacity. So far, we assumed that we control all nodes in the network. Consumer nodes, however, may have limited generation capacity and therefore limited control capability. Therefore, let us now assume that control is only available at the nodes with positive power generation (generators), as usual in today's power grids [5]. In this case, the effectiveness of the control depends strongly on the topology, e.g. which line is getting upgraded. We consider two cases.
First, we increase the capacity of line (3,4) between two generator nodes by ∆K, which without control eventually leads to Braess' Paradox (Fig. 4b). As a measure of the stability of the system, we evaluate the phase differences ∆θ i,j = θ i − θ j , as a measure of the load of the line connecting nodes i and j. These phase differences are obtained from the fixed point given by Eq. (24), computed by Newton' method. Without control, the phase difference ∆θ 4,5 , which is the same as ∆θ 4,8 , increases continuously with ∆K while the average phase difference ∆θ stays almost constant (see Fig. 5a). Eventually, at ∆K ∼ 0.6s −2 , power lines can not deliver the necessary power to some nodes and there is no longer a fixed point. The system enters an oscillatory regime, as shown in Fig. 4. Adding control does not help to improve the situation. In fact the phase difference ∆θ 4,5 increases faster with ∆K and the fixed point disappears for even lower values of ∆K, at ∆K ∼ 0.49s −2 . So, controlling only the generators does not prevent Braess' paradox in this case. Nevertheless, the oscillatory regime reached after the instability is somehow different in the cases with and without control. As shown in Fig. 6a. With control most of the nodes remain synchronized at the reference frequency and only two nodes show phase slips at a slow time scale. On the contrary, without control all nodes rotate showing phase slips (see Fig. 4b for the same ∆K).
Next, we increase the capacity of line (1,6), connecting two consumer nodes, by ∆K. Without control, increasing ∆K the phase difference ∆θ 1,2 increases continuously (see Fig. 5b) until the system become unstable at ∆K ∼ 0.6s −2 leading to Braess' paradox. Applying control exclusively to generator nodes does indeed help in this case. The range of existence of the fixed point is extended to any value of ∆K preventing the paradox completely, see Fig. 6.

V. DISCUSSION
Concluding, we have studied a simple secondary control algorithm that successfully restores the grid frequency of an unbalanced power and may prevent Braess' paradox.
Secondary control, when applied to all nodes, improves the stability of the grid, regardless of topology, and even allows stable operation for mismatched power [1,5,43]. While primary control stabilizes the frequency, secondary control restores the frequency to the reference value and always guarantees the existence of a stable fixed point. We have systematically computed the fixed point stability of the power grid with secondary control as a function of both the network topology and the control action. Thereby, we have extended previous stability analysis of uncontrolled systems [36] or systems including secondary control restricted to balanced power [44].
Secondary control in all nodes may also prevent the loss of the operational state via Braess' paradox. As shown by Witthaut and Timme [20,21], the addition of certain transmission lines may lead to a loss of the operational state of the power grid. Using primary control only [13], does not suffice to prevent Braess' paradox. In contrast, we have now demonstrated that secondary control prevents the desynchronization in networks prone to Braess' paradox if all nodes, i.e., consumers and generators alike, are controlled ( Figs.  3 and 4). The control reduces the total amount of net power generated and consumed at each node of the grid guaranteeing that the transmitted power does not exceed the transmission capacity. Thereby, it offers a trade-off between grid extension and investments in control, assuming some amount of local generation is possible.
In today's grid, secondary control is implemented only in power plants. Thus nodes with generation much larger than consumption, i.e., generator   (3,4) in panel a and (1, 6) in panel b, for the grid shown in Fig. 3 but without the line (2,4). We plot the angle differences up to the critical added coupling ∆Kc for which there is no longer any fixed point. The uncontrolled system fails at ∆Kc ≈ 0.6. Adding control only on the generator nodes increases the load on line (4,5). Thereby, we observe an earlier failure (∆Kc ≈ 0.5) with control when modifying line (3,4) in panel a, compared to the uncontrolled case. Contrary, the control reduces the load on line (1, 2) and the grid does not display Braess' paradox any more, when modifying line (1, 6) as shown in panel b. Parameters are α = 1s −1 ; K = 1.03s −2 for all lines except the one with added capacity and γ Generator = 0.1s −2 . When adding capacity to line (3,4), the control on the generators cannot prevent a loss of the fixed point (panel a). However, the angles do not diverge as drastically as in an uncontrolled case (compare Fig. 4 c). Contrary, applying control only on the generators fully prevents Braess' paradox, when line (1, 6) is modified. Parameters are α = 1s −1 ; K = 1.03s −2 , γ Generator = 0.1s −2 and green lines show the dynamics of consumers with red lines giving the generator dynamics.
nodes, have a large control capability while nodes in which consumption is larger than generation, consumer nodes, have very little, if any, control capability. If control does only takes place at generator nodes, its efficiency strongly depends on the grid topology. We have observed that if the capacity of a line connecting two generator nodes is increased, the control does not prevent Braess' paradox. On the contrary, in the case of increasing the capacity of a line connecting two consumer nodes, secondary control is capable of redistributing the power flow so that lines are not overloaded and the paradox is avoided. Concluding, using secondary control on all nodes in a network improves its stability and robustness with respect to dynamical and topological perturbations. If control is mainly available in generator nodes only the effectiveness of the control depends strongly on the topology of the network. This stresses the importance of involving consumers, e.g. via demand control schemes or local generation (prosumers) in future grids [14,15,45]. Finally, further research is necessary to extend our results, e.g., to alternative control mechanisms. One example is to allow τ > 0 in Eq. (2), i.e., making the power provided by each node explicitly time-dependent.