{'fraction_non_alphanumeric': 0.026551369471639177, 'fraction_numerical': 0.00860919584015847, 'mean_word_length': 4.662640207075064, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Taming Instabilities in Power Grid Networks by Decentralized Control

Renewables will soon dominate energy production in our electric power system. And yet, how to integrate renewable energy into the grid and the market is still a subject of major debate. Decentral Smart Grid Control (DSGC) was recently proposed as a robust and decentralized approach to balance supply and demand and to guarantee a grid operation that is both economically and dynamically feasible. Here, we analyze the impact of network topology by assessing the stability of essential network motifs using both linear stability analysis and basin volume for delay systems. Our results indicate that if frequency measurements are averaged over sufficiently large time intervals, DSGC enhances the stability of extended power grid systems. We further investigate whether DSGC supports centralized and/or decentralized power production and find it to be applicable to both. However, our results on cycle-like systems suggest that DSGC favors systems with decentralized production. Here, lower line capacities and lower averaging times are required compared to those with centralized production.

(Dated: 2 November 2016) Renewables will soon dominate energy production in our electric power system. And yet, how to integrate renewable energy into the grid and the market is still a subject of major debate. Decentral Smart Grid Control (DSGC) was recently proposed as a robust and decentralized approach to balance supply and demand and to guarantee a grid operation that is both economically and dynamically feasible. Here, we analyze the impact of network topology by assessing the stability of essential network motifs using both linear stability analysis and basin volume for delay systems. Our results indicate that if frequency measurements are averaged over sufficiently large time intervals, DSGC enhances the stability of extended power grid systems. We further investigate whether DSGC supports centralized and/or decentralized power production and find it to be applicable to both. However, our results on cycle-like systems suggest that DSGC favors systems with decentralized production. Here, lower line capacities and lower averaging times are required compared to those with centralized production.

I. INTRODUCTION
The ongoing climate change is forcing us to shift our power generation from fossil power plants towards renewable generation 1 . In the last years, renewable energy technology development and policy support led to a tremendous increase in the share of Renewable Energy Sources (RES). In 2014, Germany covered 27.8% of its gross electricity consumption with RES 2 . Still, large conventional power plants dominate the power grids: transmission lines connect large plants with regional consumers in a locally star-like topology. With more renewable power sources entering, the grid topologies become more decentralized and more recurrent due to the distributed generation 3 . In such a scenario, consumers may act as producers and consumers at the same time, so-called prosumers 4 and electricity transport is no longer unidirectional.
A known challenge of many renewable sources is their volatile nature [5][6][7] . Fluctuations occur on different time scales, including seasonal, inter-day 8 and intra-second fluctuations 9 .
This requires radical changes in the control and design strategies of electric power grids as well as market innovations to ensure cost effectiveness. Therefore, a need for more flexibility options for power market supply and balancing energy 10 arises because the fluctuating RES cannot guarantee power supply with the certainty conventional plants could. In this regard, it is most important to identify options that are both cost efficient and system stabilizing.
So far, the framework of power market design and power grid stability with its long planning horizons does not satisfy the need for sufficient flexibility options 11 . Different smart grid approaches have been proposed to present ways to match supply and demand in such a fluctuating power grid. However, economic and political feasibility and market integration are often missed out. A key idea of various smart grid concepts is to regulate the consumers' demand 12 , a massive paradigm shift compared to the current power grid operation schemes 13,14 . Many proposals for smart grids are based on sufficient information and communication technology infrastructure, see, e.g., 15 or 16 . However, such a centralized system would raise questions of cyber security and privacy protection 17,18 and several studies highlight the cost burden these proposals implicate 19 .
In contrast, an alternative approach without massive communication between consumers and producers directly utilizes the grid frequency to adjust production and consumption. The frequency increases in times of power excess while it decreases in times of underproduction 20,21 . A novel smart grid concept, Decentral Smart Grid Control (DSGC), was introduced in 22 , based on earlier ideas by 20 , and its mathematical model proposed and analyzed in 23 . Using DSGC prosumers control their momentary demand on the basis of the grid frequency which can easily be measured everywhere with cheap equipment. Ref. 23 demonstrates that DSGC enhances the stability of the power grid dynamics if the frequency measurements are averaged over sufficiently long time intervals. Yet, so far, only very small networks were investigated. Hence, the impact of grid topologies on power grid dynamics with DSGC constitutes a widely open research question.
Here we analyze the impact of network topology by assessing the stability of essential network motifs using both linear stability analysis of delay systems and determining basin volume. Furthermore, we address the question, how grid stability changes when generation is decentralized. The article is structured as follows. First, we present a dynamical model for power grid dynamics and present the concept of Decentral Smart Grid Control (DSGC) 23 to control a power grid in section II. In section III, we briefly summarize linear stability and basin volume measures for such delayed systems. The stability results of DSGC are then presented for a star motif in section IV A where we discuss the destabilizing resonance and rebound effects and how stable grid operation remains possible. Using linear stability analysis, we investigate the effect of decentralized power generation in cyclic and square lattice grid motifs in section IV B. The results suggest that DSGC works successfully for centralized as well as decentralized production, where grids with decentralized production require lower line capacities than centralized ones.

II. COUPLED OSCILLATOR MODEL WITH DECENTRAL SMART GRID CONTROL
To model the frequency dynamics of a large-scale power grid, we consider an oscillator model based on the physics of coupled synchronous generators and synchronous motors, see [24][25][26][27][28][29][30] for details. This model is similar to the "classical model" 31 and the "structure preserving model" 32 from power engineering.
The state of each machine i ∈ {1, ..., N } is characterized by the rotor angle θ i (t) relative to the grid reference rotating at Ω = 2π × 50 Hz or Ω = 2π × 60 Hz, respectively, and its angular frequency deviation ω i = dθ i /dt from the reference. Each machine is driven by a mechanical power P i (t), which is positive for a generator and negative for a consumer. In addition, every machine transmits electric power via the adjacent transmission lines which have a coupling strength K ij . This coupling strength expresses the maximal possible power that may theoretically be transmitted through the power lines. The dynamics of the machine i is then given by the equation of motion as where α i is a damping constant. We neglect ohmic loads which should be small compared to shunt admittances 33 for the dynamics we consider. We take the moment of inertia to be identical for all machines and hence eliminate such moments of inertia in the equation of motion for simplicity of presentation. Equation (1) as well as the upcoming equations (5) and (6) are discussed in more detail in 23 .
Decentral Smart Grid Control (DSGC) is based on Demand Response that aims to stabilize the power system by encouraging consumers to lower their consumption in times of high load and low production and increase consumption in times of low load but high production.
Instead of paying a constant price for electric power, consumers are presented with a linear price-frequency relation p i ( dθ i dt ) to motivate grid-stabilizing behavior. Although consumer reaction might be very complex, we assume a linearized power-price relationP i (p i ) by the consumers close to the stable operational state. Plugging (2) into (3) and defining γ = c 1 · c 2 leads to a linear response of consumed and produced mechanical powerP i (t) as a function of frequency deviation dθ i /dt: where γ i is proportional to the price elasticity of each node i, i.e., measures how much a producer or consumer is willing to adapt their consumption or production, see also 23 . In general, such an adaptation will not be instantaneous but will be delayed by a certain time τ (a) by a measurement and the following reaction. We can now substitute the functionP i (t − τ ) from (4) for the fixed value P i in the uncontrolled system (1) and obtain the equation of with DSGC including a delayed power adaptation. In 23 it was already shown that such a delayed system poses risks to the stability of the power grid for certain delays τ . Hence, an extension using frequency measurements averaged over time intervals of lengths T were introduced to stabilize the power grid regardless of the specific delay. Such averaging yields For what follows, we choose homogeneous averaging time T for all machines, as well as similar delays τ for all nodes. In addition, we use homogeneous capacities K ij = K for all lines to simplify the calculations. In the section IV we apply equations (5) and (6) to different network topologies and evaluate their stability as a function of the delay τ with different averaging times T . We hereby treat the averaging time T as a control parameter that can be chosen when setting up the system, while the delay τ remains as an exogenous parameter introduced by the consumers and producers.

III. ASSESSING ROBUST OPERATION
Here, we discuss how linear stability analysis and measuring basin volume yield information about robust operation, in dependence of delay τ and for different averaging times T . First, we introduce the fixed point of the system, then discuss linear stability analysis of delayed systems and finally point out difficulties when assessing basin volume of a power grid system with delay.
a. Fixed points. To study the stability and the role of the system parameters, we analyze the dynamical stability around the steady-state operation of the grid given by the fixed point as obtained by solving Since ω i = dθ i /dt we directly obtain ω * i = 0 for all i. Hence, we only need to determine the angles θ * i . A fixed point can only exist, if the grid has a sufficient transmission capacity K ij to transmit the power from the producers to the consumers 34 . The minimal K ij for which a stable fixed point exists is called critical coupling 26 .
b. Linear stability. Linear stability of a dynamical system is determined by the eigenvalues of its characteristic equation. For systems without delay this is a polynomial obtained from the Jacobian of the system but for a delayed system it becomes a quasi-polynomial with infinitely many solutions 35,36 . We obtain the characteristic equation by calculating the where we abbreviated θ τ,i = θ i (t − τ ) and ω τ,i = dθ i dt (t − τ ) and i, j ∈ {1, ..., N }. We hereby consider exponentially decaying or growing solutions 35 . The stability eigenvalues λ are then determined by the solutions of the characteristic equation For the delayed system with averaging, i.e., equation (6), we simply calculate the delayed Jacobian for the two delays τ andT = T + τ . Hence, the characteristic equation is given by We obtain the symbolic expression for the characteristic equation using Mathematica 37 which is then also used to numerically determine roots of the characteristic equation, via Newton's method. Equations (12) and (13) have infinitely many solutions but only a finite number of those can have a positive real part and those determine the instability of the system 38 .
Our method of finding these eigenvalues works as follows: We start at an arbitrary delay τ = τ sampling > 0 and let Mathematica find approximately 10,000 roots by choosing random complex initial conditions for Newton's algorithm. Afterwards, we delete double entries. The obtained eigenvalues are taken as the initial conditions for Newton's algorithm for the next larger delay τ = τ sampling + 0.01s. These eigenvalues then serve as the initial conditions for the next delay step etc. Similarly, we obtain eigenvalues for smaller delays like τ = τ sampling − 0.01s by using again the eigenvalues from τ sampling as initial conditions.
Linear stability analysis quantifies whether a fixed point is stable to small perturbations and constitutes a fundamental aspect of stability in dynamical system. Assessing the stability of the system with respect to larger perturbations requires further analysis.
c. Basin volume. The global stability of a fixed point of a dynamical system can be quantified by the volume of its basin of attraction. An estimate for the basin volume V basin is determined numerically using a Monte Carlo method as the ratio of initial conditions converging to a stable operation state to the total number of initial conditions, as proposed in 39 . Note that delayed systems are infinite-dimensional 35 and do need an initial function instead of a single initial condition. We treat this problem by setting the initial function to be identical to the initial condition for all times smaller than zero, i.e, Thereby, we can effectively choose initial conditions as they completely define the initial function. In the following we take M = 1000 randomly chosen initial conditions into account in order to estimate the basin volume's dependence on the delay time τ .
We are mainly interested in how fluctuations or disturbances in the energy generation will influence the system's dynamics. Hence, we first perturb the producer's node phase angle and angular velocity around its component of the fixed point (see fig. 2a for the network topology). In the next series of simulations, we perturb one randomly selected customer node around its component of the fixed point. Perturbations are uniformly chosen at random from the intervals ∆θ i ∈ [−π, π] and ∆ω i ∈ [−30, 30] Hz for the initial angles and initial frequencies respectively, similar to 29,40 . We run the simulations for a simulation time of t sim = 1500s. These long and computationally costly simulation times are necessary because we observed that for specific values of delay time τ , e.g., τ = 1.4s, perturbations may decay relatively quickly toward the fixed point but later still escalate.
Note that we only consider so-called single node basin volumes, i.e., we only perturb the component the a fixed point of one node. In theory, all nodes could be perturbed simultaneously which results in a more complete sample of the phase space. Unfortunately, the total phase space volume grows exponentially with the number of nodes, making it infeasible to sample the full phase space.

IV. RESULTS
We now present results about networks with Decentral Smart Grid Control. First, we present and compare the results of linear stability and basin volume analysis of a four node star motif. This motif constitutes one of the main building blocks of power grids, since, in principle, its effective topology locally resembles a star, the central node being a large power plant that supplies the regional consumers in its vicinity 6 power plants the initial delays have to be smaller than 2 seconds according to European regulations 41 , in practice they will be significantly smaller. However, in future power grids additional communication delays 42 of the order of several hundred milliseconds might arise in addition to unknown delays caused by demand response and additional power electronics.
Hence, we consider a large range of potential delays τ ∈ (0, 5)s looking for the boundary of acceptable delays.
A. Stability of the star motif e. Rebound effect for large delays. For delays larger than a critical delay τ > τ c ≈ 8.7s the system always gets destabilized, i.e., there is an eigenvalue with Re(λ) > 0. This rebound effect acts on a longer time scale than the intrinsic oscillations of the power grid system and originates from an over-reaction of the attempted damping as we explain below.
The existence of such a rebound effect is independent of averaging T (fig. 2). We determine the critical delay without averaging τ c to be This result is obtained by the following considerations. We define the sum of all angles as Σθ := N i=1 θ i and obtain its equation of motion by using eq. (5) as The characteristic equation of this equation reads where we eliminated a zero eigenvalue λ = 0 which arises due to the possibility to shift all angles by a constant. For τ = 0 the eigenvalue λ = −α − γ is negative as α > 0 and γ > 0 and hence the system is stable with respect to the sum Σθ. For larger delays τ > 0 we set λ = i · ξ to obtain the delays for which the stability changes. We get Applying complex expansion and separating into real and imaginary parts we obtain − α − γ cos(ξτ ) = 0 (19) γ sin(ξτ ) − ξ = 0. (20) These equations can be solved for τ and ξ to yield the critical delay as in eq. (15). Note that a critical delay τ c only exists, if the price adaptation is larger than the intrinsic damping of the system γ > α. Following straight-forward calculations we can prove that eigenvalues obtained from eq. (17) always destabilize the system, i.e., their real parts are positive for all delays larger than the critical one, These results hold for all network topologies, since we needed no assumptions regarding the coupling matrix K ij or the power production P i . Predicting the precise scaling of the critical delay as a function of the averaging time T is not easily possible but an approximation for small ξT is obtained as which is a decreasing function in T for parameters α, γ, T > 0. Hence, increasing averaging time T causes the rebound effect to occur for smaller delays τ .
We conclude that the delay τ has to be smaller than a critical value τ c to ensure stability.
This critical value depends only on the intrinsic damping α and the price adaptation γ and decreases for increasing averaging T , while it is valid for all network topologies. Hence, to avoid problems with large delays, we have to enforce all actors of the power grid to react within less then this critical delay τ c or need to ensure that intrinsic damping is larger than the price adaptation: α > γ. For the next section, we restrict ourself to the interval τ ∈ [0, 5]s to avoid this destabilizing rebound effect.
f. Intermediate delays benefit stability. With the help of linear stability we observed that delays induce destabilizing resonances which can be suppressed by prosumers responding to averaged frequency data. At the same time large delays destabilize the system by introducing a rebound effect. These results are supplemented by information from basin volume analysis. For DSGC with averaging ( fig. 3b and c), we demonstrate how intermediate delays τ are beneficial for the stability of the system. The basin volume increases   with greater delay V basin (τ > 0) > V basin (τ = 0) until, for delays τ ≈ 4s, we obtain close to perfect stability with V basin ≈ 1 both for an averaging T b = 1s and T c = 2s. In the previous paragraph we demonstrated that high averaging times and large delays always destabilize the power grid. Hence, we observe a trade-off in curing resonances with averaging and avoiding the rebound effect for delays larger than a critical value τ c . Furthermore, basin volume reveals that disturbances in a consumer node are less likely to destabilize the system than perturbations of the producer (compare dark red and light orange curves in fig. 3). This is intuitively clear as there is only one producer and the topology increases its importance even more.
We conclude that Decentral Smart Grid Control can be applied to the star motif if an averaging time of at least T = 2s is used or the price elasticity is smaller than the intrinsic damping γ < α. Additionally, intermediate delays τ ≈ 4s incorporate the trade-off between curing either destabilizing resonances or rebound effects. They increase the basin volume of the system and thereby benefit the overall stability of the power grid.

B. Effect of decentralized production
In this section we demonstrate that switching from central to decentralized production improves the linear stability in the power grid topologies we investigate for small and intermediate delays. Specifically, we analyze linear stability for moderately sized lattice and cycle networks for different central and decentralized power production.
For a cycle network decentralization enhances stability significantly ( fig. 4). For a power line coupling of K = 8/s 2 centralized and decentralized production result in similar stability ( fig. 4b and e). However, when choosing the critical coupling of the cycle network, i.e., the minimal coupling needed so that there exists a fixed point 26 , K = 4/s 2 , the cycle with central production cannot be stabilized for all considered delays, while this is possible for decentralized production ( fig. 4c and f). and g), decentralized and centralized production result in very similar stability. Even when operating at the critical coupling of the lattice-like topology K = 2/s 2 , the central power production can be stabilized for sufficiently large averaging time T = 4s ( fig. 5d and h).   Note that we chose γ i = 0.25/s for all nodes in the networks. Hence, the large producer with P large = 8/s 2 adapts relatively less compared to the smaller producers with P small = 2/s 2 .
Nevertheless, the overall adaptation of the whole network is with |∆ω| being the maximal angular frequency deviation. Hence, the maximal adaptation ∆P is independent of the power distribution.
We conclude that a centralized power production requires larger transmission capacities compared to a decentralized power production to guarantee stable power grid operation. An averaging time of T ≈ 4s stabilizes the power grid with Decentral Smart Grid Control for all considered delays. Note that our decentralized production utilized short distances to the consumers. Decentralized power production tends to allow smaller averaging times, thereby   offering a greater safe operating space. In addition, a highly connected topology like a lattice outperforms the less connected cycle in terms of stability.

V. SUMMARY AND DISCUSSION
In this article we applied the concept of "Decentral Smart Grid Control" (DSGC), as proposed in 23 , to different motifs and small networks. We first determined both the linear stability and the basin volume of a 4-node-star motif in dependence on the delay time τ (see equation 5) and for fixed averaging times T (see equation 6). Linear stability analysis reveals two destabilizing effects for the power grid: First, resonance catastrophes destabilize the system periodically. This instability can be cured by applying sufficient averaging ( fig.   2). Secondly, a rebound effect emerges for large delays and destabilizes the system regardless of averaging. The rebound effect sets an upper limit for the delay τ = τ c and magnitude of adaptation response γ as it has to be smaller than the intrinsic damping of the system α. Basin volume analysis gives further probabilistic insight on how well DSGC tames grid instabilities. For large averaging times T and intermediate delays τ , basin volume approaches unity ( fig. 3). Hence, for DSGC exists a trade-off in curing resonances with averaging and larger delays and avoiding the rebound effect for delays larger than a critical value τ c .
Summarizing the results from linear and basin volume analysis, adaptation has to be smaller than the intrinsic damping of the system (γ < α) or the demand response time needs to be located in a delay window of safe operation (τ < τ c ). For values above the critical delay τ c the system becomes always destabilized, regardless of the averaging time.
At the same time, averaging and increasing delay is beneficial for system stability in terms of basin volume. These results have strong implications on how parameters has to be set for real world applications of DSGC.
In the last section of this article, we demonstrated the usefulness of DSGC with centralized as well as with decentralized power production: While it works in both cases, central production requires larger line capacities K. For the lattice-like topology, this effect can be compensated by using longer averaging times. But decentralized power production is clearly advantageous.
Next research steps include considering heterogeneous networks, i.e. the use of different τ , γ, T values for individual nodes, modifying the averaging method, e.g., to a discrete time window and extending the DSGC framework to larger network topologies. In this context, there remain a couple of open questions that will have to be investigated in more detail, namely: What is the reason that we observe delays τ for which V basin (τ ) > V basin (τ = 0), in particular for larger averaging times? Do we need even larger averaging times T when we go to larger networks? How large is the safe operating space to cure instabilities by resonances while avoiding the rebound effect for different networks? These are all widely open questions.
In this article, we have demonstrated that Decentral Smart Grid Control constitutes a promising control concept, in particular for future power grids that will be more decentralized than the present one.