The stochastic nature of power-grid frequency in South Africa

In this work, we explore two mechanisms that explain non-Gaussian behaviour of power-grid frequency recordings in the South African grid. We make use of a Fokker–Planck approach to power-grid frequency that yields a direct relation between common model parameters such as inertia, damping, and noise amplitude and non-parametric estimations of the same directly from power-grid frequency recordings. We propose two explanations for the non-Gaussian leptokurtic distributions in South Africa: The ﬁrst based on multiplicative noise in power-grid frequency recordings, which we observe in South Africa; The second based on the well-known scheduled and unscheduled load shedding and rolling blackouts that beset South Africa. For the ﬁrst we derive an analytic expression of the eﬀects of multiplicative noise that permits the estimation of all statistical moments – and discuss drawbacks in comparison with the data; For the second we employ a simple numerical analysis with a modular power grid of South Africa. Both options help understand the statistics of power-grid frequency in South Africa – particularly the presence of heavy tails.


I. INTRODUCTION
Power-grid systems power the world.The developed countries rely on the availability of electrical power to the extent that no less than a 24-hour service is conceivable.Yet this is a reality only in parts of the world, so much that this is one of the key elements of the Sustainable Development Goals (SDG) -SDG 7: "Ensure access to affordable, reliable, sustainable and modern energy for all" [1].One curious example of a thus far poorly managed power system is the case of South Africa, a country still dominantly supplied via coal-fired power plants [2].At least 12% of the population does not have access to power and roughly 10% cannot adequately afford electricity [3][4][5], particularly in rural areas [6].Nevertheless, the power system has continuously evolved and has successfully attracted renewable-energy centred investments [2,7].Yet these developments stand on a frail and deteriorating infrastructure.Since 2007 the maintenance and development of the South African grid has been hindered by mismanagement [8,9].Mismanagement has manifested itself in recent years with its inability to deliver power according to the country's demand.This lead to the implementation of 'rolling blackouts' load shedding events across the country [10].Load shedding has marked deleterious societal effects [11][12][13].In 2021, the citizens and industries of South Africa were afflicted by a lack of power and periodic load shedding for over 48 days of the year.Additional to load shedding, the utility experiences the overloading of transformers and substations due to illegal connections, overloading, and vandalism.The latter adds to unplanned outages (also known as non-technical losses) for parts of the network and accounts for 10% of the nontechnical losses [14].Energy losses experienced by the utility are due to meter tampering, incorrect billing, and cable theft [15].The overloading of electrical infrastructure leads to mandatory disconnection of municipalities from the distribution network.
Lack of power supply or the need for abrupt load-shedding leads to visible changes in power-grid frequency, the key signature of a power-grid system [16,17].Alternating current power grids operate at a nominal frequency -50 Hz in South Africa -which means all conventional power-generating units contain a mechanical rotating generator tuned to this frequency.If the power generation falls short of the power demand, frequency sags.If the power generator surpasses demand, frequency rises.Power grids are complex systems with inherently complex stochastic dynamics [18,19].Power generation, both conventional but particularly renewable, is manifestly volatile [20][21][22][23] and non-Gaussian behaviour permeates the statistics of most power system [19,24,25].
Similarly, the demand side can be equated to a complex stochastic process [26].Thus, we take a complex-system approach to modelling and analysing power-grid systems from a complex system perspective [27,28].
In this work, we will examine three power-grid frequency recordings from 2021, from Continental Europe, the Nordic Grid, and the South African grid, with a focus on the latter.We investigate these recordings and contrast their statistical and stochastic characteristics by employing a phenomenological Fokker-Planck equation of an aggregated swing-equation model with stochastic noise [29][30][31][32].We seek an explanation for the non-Gaussian distribution of power-grid frequency observed in South Africa, wherein we offer two explanations for the heavy tails of the distributions [18,19,24].Firstly we identify the potential presence of multiplicative noise in the recordings and find an analytic approximation for its effect on the statistical moments of Langevin processes with multiplicative noise.We contrast this with two other recordings of power-grid frequency in South Africa and discuss the limitations of such an approach.Lastly, we simulate power-grid frequency trajectories in a model grid of South Africa and mimic the effect of load shedding.Both approaches help us explain the non-Gaussian statistics of the power-grid frequency recordings of South Africa.
This work is organised as follows.In Sec.II we shortly introduced the historical context situating the South African power grid, the ongoing load-shedding events, and we showcase the direct effects at the University of the Free State in Bloemfontein.In Sec.III we introduce both a low-level dynamical model of power-grids affected by noise as well as Fokker-Planck approximation of the power-grid frequency statistics.From this basis, we present our theoretical and numerical results.In Sec.III we discuss the outcomes and limitations of our data examination as extend some thoughts on future work and the necessity to examine previously overlooked power grids.

II. BACKGROUND A. Load-shedding in South Africa
In this work, we focus on power-grid frequency recordings from the Continental European power grid, the Nordic Grid, and the South African power grid.It is the latter that interests us the most for this examination.The South African power grid is undergoing an unprecedented transformation.
The power sector in South Africa is dominated by the state-owned entity ESKOM, which both imports and exports energy from surrounding states with some input from nuclear and renewable energy (photovoltaic (PV), wind and concentrated solar power (CSP) [33].Unfortunately, the South African power system has been experiencing an energy crisis since 2007 with electrical generation lagging the electrical demand, ultimately leading to implemented rolling blackouts in an effort to stabilise the national grid.
Due to extended periods of lack of maintenance and mismanagement resulted in an unpredictable and unreliable power system in South Africa, that during 2021 experienced load-shedding for 1169 hours with 1775 GWh (with the upper limit of 2521 GWh) energy shed.The latter amounts to 13.3% of all hours of 2021 being in the state of, mostly, Stage 2 load-shedding (for details see Tab.I in Sec.III E) [10].The power system remained coal powered during 2021, but with 18.6% contributed by renewable energy (of which 6.7% were variable sources) [2].Concernedly, 3.2 TWh of energy was generated by using diesel.
With critical low reserve margins and increasing loadshedding, some consumers are considering the implementation of self-sufficient microgrids with some renewable input.The latter is preceded by the digitisation of the existing electrical network topology (i.e., smart grids) that requires initial capital input [34].South African university campuses are naturally forced to evolve according to the constraints of the national utility, the ability to swiftly react to demand reduction signals being the most critical, see Fig. 1.In cases of severe loss of supply, selfsufficient microgrids are utilised that synchronise with available renewable supply to ensure supply continuity on campus.The latter typically being hybrid PV-Diesel based microgrids.
During load-shedding events (i.e. demand overpowering generation), the utility reduces load in stages of 1000 MW.A total of 6 stages of load-shedding are in place in South Africa at this moment, with varying duration, usually designed to stay in place for i × 6 hours, with i the stage.An overview of the last three years of total load shed energy can be found below in Tab.I (and in Ref. [10].).One should note that 1) load-shedding upper limits are never actually achieved; 2) load-shedding hours are uncertain due to additional switching time; 3) additional outages exist after switching.Unfortunately, access to data relating to all these events is hard, and thus we focus primarily on modelling uncertain load-shedding events with an equivalent proportion of hours affected vs total hours in 2021.Therein we consider the occasional events of total blackout, which in our case is represented by the load of a region vanishing for a period of time.

B. The visible consequences at the University of the Free State
The University of the Free State (UFS) Bloemfontein campus has a remarkable resource in the form of a campus smart grid.The latter enables granular control and monitoring of intensive loads based on optimised scenarios or in-situ demand response requests from the utility.Dual metering on both sides of the utility feed enables monitoring of the UFS load, during instances of loadshedding, to determine the reduction needed to comply with the requirements set out by the utility.Maintaining high levels of control granularity ensures that the institution can act as a packetised energy manager [35], hence responding to the exact requirements of the power grid operator and generating the opportunity of ancillary frequency support to the power system using the available generating resources on campus.Fig. 1 illustrates the concept of acting as a packetised energy manager, ultimately responding to the requirements of the utility to reduce demand for a specified duration.Demand response to utility curtailment notices is driven by the ability to reduce demand for a negotiated time window while remaining connected to the power grid, hence frequency support is inherent, especially in the case of UFS campus power systems that are largely supported by photovoltaic renewable generators.De-loaded photovoltaic plants can provide frequency support via the control of plant active power [36].Load-shedding becomes the critical element when designing rural microgrids, with the emphasis moving from economic sense to power continuity, ultimately, converging in microgrids that couple with existing PV generation and require islanded inertia and sensitive frequency control.An operating AC power-grid system is a set of highly synchronised oscillators operating at a rotational frequency multiple of 50 Hz (or 60 Hz).In a reduced format, we can consider a general model for power grids as coupled inertial oscillators in a network.A synchronous machine j, a generator or a load, is described by its rotorangle θ j (t) and its angular frequency ω j (t) = θi (t).It obeys the equations of motion [17,[37][38][39] where M j is the inertial mass of the j-th rotating machine, D j its damping factor, P m j comprises the selfgenerated mechanical power (or if negative it acts as a load), and P j is the exchanged power with the other oscillators in the network.The innocently looking exchange power P j embodies the very complex structure of powergrid systems, i.e., P j is given by where E j is the transient voltage at j-th machine, which is our reduced swing equation model ( 1) is static.The parameters G j, and B j, denote the real and imaginary parts of the nodal admittance matrix Y j, and encode the network structure.The conductance G j, comprises all the resistive terms of the network which we will not deal with, i.e., we will consider the case of a purely lossless system G j, = 0, ∀j, .Conductance effects can be disregarded as they are necessarily balanced in a functional power system where the generated power is higher than the consumed one to compensate for these losses.These models are also known as second-order/inertial Kuramoto models [30,31,37,40].
The network topology is fully embedded in the susceptance matrix B j, which, apart from shunt susceptances, is equivalent to the graph Laplacian of the network [41].It should be noted that the swing equation (1) or other more complex models only have a descriptive character of what happens in functioning power-grid systems.For example, in our case, we will simulate power-grid frequency trajectories in South Africa using a very reduced model of the real-world South African power-grid system, wherein we consider a reduced number of nodes in a coupled graph of interacting generators/loads.These coarsegrained models are illustrative at best -yet they capture with surprising accuracy the dynamics of the rotor angle θ j and angular frequency ω j of the generators/loads in real systems.
Lastly, we have included a noise term ξ j at each node.In principle, we could ask why there is no noise term in the rotor-angle equation.One can similarly include a noise element in the angles, which will manifest itself in some format on the frequency.Yet here we arrive at the core of what stochastic noise ξ j is.On the one hand, we know we can broadly model complex power grids with simplified models as the swing equation (1).On the other hand, thousands of power-generating units and millions of consumers are 'condensed' into a single machine/load, a node in our network.One manifest effect is that realworld recording of voltage angles, power-grid frequency, power flows, or any other physically relevant measures, are noisy.These are not solely dynamic processes, these are stochastic processes, noisy processes, whence we can learn plenty from the system by examining the statistical properties of various real-world recordings [42].

B. Fokker-Planck description of power-grid frequency recordings
Returning to our noise-disturbed swing equation (1) we can now focus on writing a Fokker-Planck equation for the probability density ρ(θ, ω, t) for a single node [29,30,32].Let us consider the noise is delta correlated ξ i (t)ξ j (t ) = 2Bδ i,j δ(t − t ), with B the diffusion constant.Now considering precisely the previous argument that our models are descriptive of N 1 (N → ∞), we can take the 'mean-field' approximation yield- ing [29,30] We assume that M j = m and D j = m.We can separate the probability density ρ(θ, ω, t) = φ(θ, t)η(ω, t) and focus solely on the statistics of the angular frequency η(ω, t), following Acebrón & Spigler [29].This results in The static solution at t → ∞ (and having appropriate decay conditions of η(ω) = 0 at ω → ±∞) is the well known Gaussian distribution There are various important details to notice here.First of all, we have started with uncorrelated Gaussian white noise, which is the most natural assumption as it is the simplest noise model.One can easily argue that power-grid frequencies are not Markovian processes and that these are likely driven by correlated noises [27,[47][48][49].Non-Markovianity is ubiquitous across energy systems [24,50,51], yet we do not necessarily need to address it directly while modelling.In this work, we are interested in understanding the statistics of power-grid frequency recordings in South Africa, for which we have access to recordings with a time sampling of 15 minutes.This time resolution is much beyond the intrinsic Einstein-Markov length of the process, i.e., the time scale at which a non-Markovian process can safely be modelled in a Markovian setting [28].For an inhomogeneous spatially extended parabolic partial differential equation of coupled swing equations, see Ref. [52].
Secondly, we can already suspect that our Gaussian description of the distribution of the frequencies (5) might not be sufficient.Schäfer et al. [19] report on more complex statistics of power-grid frequency in Continental Europe and the Nordic Grid, among others, and provide a descriptive analysis based on a convolution of statistics which results in power-grid frequency distribution far beyond Gaussianity.Various subsequent works offer explanations for the aforementioned phenomena [24,54,55].The most straightforward explanation of the non-Gaussianity of power-grid frequency statistics in Continental Europe and the Nordic Grid is due to changes in dispatch.At fixed intervals, usually every hour, with some minor in-between blocks of 15 minutes, different power plants, big or small, sell their power generation capacities on an electricity exchange market.This is a fairly complex problem of bidding and offering, which, for our purpose, boils down to one known and very clear effect: at every trading block (1 hour or 15 minutes), power-grid frequency sees a large overshoot or a large sag.This effect comes about because the generation needs to adapt to an ever-changing consumption, that is, the generation adapts to the predicted consumption for the following 1-hour block.If there is more generation than consumption, power-grid frequency goes up from its nominal value of 50 Hz and vice versa, lower generation implies a sag of the frequency.
In Fig. 2 (left) we display a snippet of the three frequency recordings Continental Europe, the Nordic Grid, and the South African grid, between the 2 nd and 3 rd of January 2021.We can see that these recordings look different from one another.In the centre panel, we display the probability density ρ(f ) of the three recordings, covering all of 2021.Similarly, we exhibit the same thing in the right panel on a vertical logarithmic scale.Here we  4).The case of Continental Europe is less trivial, the shaded green area shows the area wherein there is no control active -the 'deadband'.(Right panel) the diffusion D2 in Continental Europe and Nordic Grid can be said to be constant.In South Africa, we observe a functional dependence on angular frequency.Data covers the year 2021 [53].
can notice the evident heavy tails of all three recordings.A purely Gaussian distribution is shown in black dashed lines and is an inverter parabola in a vertical logarithmic scale.
To best understand the distribution of power-grid frequency in the various grid, we can directly examine the skewness s and kurtosis κ, given respectively by A Gaussian distribution has skewness s = 0 and a kur- We have introduced a Fokker-Planck equation describing the probability density ρ(ω), wherein we can directly evaluate the effects of the inertia m in the system and the presence of noise, mediated by its amplitude B. We can now test, using our frequency recordings, how much our simplistic Fokker-Planck model (4) can describe the data.In a more general setting, we write a Fokker-Planck equation as [28,56,57] where D 1 (ω) is known as the drift and D 2 (ω) the diffusion.In general, D n (ω) are the Kramers-Moyal coefficients.If we compare this with our Fokker-Planck equation, we see that First, we notice the linear response of the drift D 1 (ω), which is a linear function of ω.Second, we note that given out choice of noise ξ mediated by B, the diffusion D 2 (ω) = D 2 is not a function of the angular frequency.
We are now interested in obtaining the drift D 1 and diffusion D 2 directly from the frequency data.We can make use of (Nadaraya-Watson) non-parametric estimators [58,59] to extract the functional form of D 1 and D 2 from the data [53,[60][61][62][63][64].For a time series x(t), like power-grid frequency recordings, the Kramers-Moyal coefficients can be estimated using a kernel density estimation [61] where K(x) is a normalised kernel with a given bandwidth h (similar to what the number of bins is in a histogram), such that K(x) = 1/hK(x/h).We use the commonly employed Epanechnikov kernel K(x) = 3/4(1 − x 2 ), with support |x| < 1 [65].Furthermore, we apply some finite-time corrections to improve the quality of the estimations by accounting for the fact that the recordings have a finite-time sampling (cf.Refs.[60,64]).In Fig. 3 we display the drift D 1 (f /σ(f )) over the normalised power-grid frequency f (left) and the dif-fusion D 2 (f /σ(f )), also normalised (right).In the insets, the non-normalised versions of each aforementioned Kramers-Moyal coefficient can be found.
Let us start by pointing out what immediately agrees with our understanding of power-grid frequency.Both the Nordic Grid and the South African grid show a clear linear response of the drift.This response almost overlaps, which points to an identical ratio of the damping and inertia d/m, which is also expected, as these go handin-hand.When we examine the Continental European grid, we find a much stranger picture.Continental Europe has a band of frequency where no control is active, i.e., there is no active control to maintain the frequency at its nominal value, marked in the shaded area on the left panel, known as the 'deadband' [66].In the drift we even seem to see and effect of 'repulsion', i.e., the drift has a positive slope, pushing the frequency off from the nominal value.Moreover, at frequency deviations larger than |σ(f )| > 1.5, it also seems like there is no control or linear response.This agrees to some extent with the control mechanism in Continental Europe denoted as 'secondary control', which is a slow mechanism to restore large frequency deviations to a nominal value.Being a slow mechanism, it cannot be captured in our stochastic approach and functions as a slow dynamical effect.We should note that the Nordic Grid and South African systems similarly have their own 'deadband', as well as primary and secondary control mechanisms, yet these are not detectable using our analysis.
When we examine the diffusion D 2 (ω) of the three recordings, seen on the right panel of Fig. 3, we observe an almost constant value for both Continental Europe and the Nordic Grid.The case of the South African grid is a bit different.The diffusion is state-dependent, i.e., the value of D 2 (ω) is roughly proportional to ω 2 and not a constant.Thus, at first glance, it seems that when the South African power-grid frequency is not at its nominal value of 50 Hz but either slightly above or slightly below, the amplitude of the noise is larger.We see this contrasts with our initial simplistic assumption when writing (4), wherein we started with simple state-independent or additive Gaussian white noise.This does not seem to be the case in South Africa.Thus, we return to (7) and write a more general static solution to the Fokker-Planck equation as wherein we have that the variance of η(ω) depends on the angular frequency.This is the static solution to our swing equation with noise (1) with multiplicative noise (or state-dependent noise).We note that this is only approximate since this density is not always normalisable.In fact, with D 1 (ω) a linear function of ω, the underlying equation of motion is identical to an Ornstein-Uhlenbeck process, from which we know its closed-form solutions [28,56,57].Unfortunately for the simple case of multiplicative/state-dependent noise D 2 (ω) = b + cω 2 , with b, c > 0 two constants, that resemble our case in South Africa, one cannot evaluate the expected values E[X n ] explicitely.We can nevertheless approximate the density function for small c > 0. Let us consider the infinite Taylor expansion of η(ω) for small c, denoted η c (ω), given by with He 2n (z) the Hermite polynomials.From the generating function of the Hermite polynomials we get from which we draw our approximate expression by sub- With this closed-form approximation of the probability density η(ω) for small c we can now find the expected values E[X n ], from which we obtain a kurtosis κ c X κ c X = 3.2140, with d/m = 0.6723, b = 0.0023, and c = 0.0467 estimated from the drift and diffusion.This is close to our empirical value of κ = 3.33.We should note that this is a crude approximation, but it helps understand the effect of multiplicative noise on generating leptokurtic distributions (i.e., distributions with kurtosis κ > 3).
We will now contrast our analysis with the aid of two other power-grid frequency recordings from South Africa.

D. Counter-intuitive frequency deviations
We now address an interesting -and quite a counterintuitive effect -in power-grid frequency recordings in South Africa.Alongside recordings of the frequency in South Africa with a sampling of 15 minutes, we have access to the smallest and largest recorded frequency measurements within each 15-minute block.Therein we have three time series we can examine: The frequency f (t) we ρ(f, f MAX − f MIN ) When the frequency is far from the nominal value of 50 Hz, the minimal and maximal frequencies come together, pointing to a strong control at play when the system is far from equilibrium.
have thus far examined, the recorded maximal frequency f MAX (t), and the recorded minimal frequency f MIN (t).
In Fig. 4 we display the two-dimensional probability density functions of ρ(f, f MAX ) and ρ(f, f MIN ) (left) and the difference f MAX − f MIN (right).If we focus on the left panel, we can see that an increase of the frequency f similarly increases both the f MIN and the f MAX .This is somewhat counter-intuitive.If the frequency f is above its nominal value of 50 Hz within a period of 15 minutes we expect that the maximal frequency f MAX follows this effect, but not necessarily the minimal frequency f MIN .In the end, one would hope that the frequency is brought down back to 50 Hz in the span of 15 minutes.This follows in reverse if the frequency drops below 50 Hz.
One potential explanation for this would assume that we do not have a stationary process, but instead that the average (on the centre of the distribution) is moving with the frequency.This supports the idea that what large overshoots and nadirs of the frequency we observe in the South African grid follow a similar phenomenon to those in Continental Europe and the Nordic grid: These are dynamical effects of the market.This being the case, we would expect that the minimal and maximal frequency would shift in tandem.If there is too much generation in the system the minimal frequency is likely to also have increased.Similarly, too much consumption brings down the maximal frequency.
What remains to be explained is shown in the right panel of Fig. 4.Here we see the difference between f MAX and f MIN .We see that when the system is out of equilibrium these two measured frequencies come together.This points to a strong control mechanism starting up as the frequency deviates from its nominal value.Yet this is in clear contradiction with our previous result wherein we showed there is multiplicative noise in the system.If indeed there is multiplicative noise at frequencies far from nominal the distribution must widen and, statistically speaking, f MAX and f MIN should grow further apart, not come together.
At the present state, we cannot offer an explanation for this.The obvious remark points to the low time sampling of the frequency data, which inevitably leads to finitetime effects when estimating the drift and diffusion [60,62,64].Possibly at higher sampling rates of the powergrid frequency this effect subsides.
Altogether, we have offered a first explanation for the non-Gaussian distribution of the power-grid frequency recordings in South Africa -with its various caveats.Yet, as we have seen for Continental Europe and the Nordic Grid, noise in power-grid frequency does not seem to be multiplicative/state-dependent, but constant across the frequencies.Moreover, we have also discussed that these recordings similarly have high kurtosis and that this arises primarily due to changes in dispatch and market effects.In South Africa, similar large deviations of power-grid frequency -which lead to high kurtosis of the distribution -can occur due to scheduled and unscheduled load-shedding and rolling blackout events.We now explore this avenue of effects on a coarse-grain modular power-grid model of South Africa with numerical solvers of the swing equation with noise (1).

E. The effects of rolling blackouts and load shedding
In order to simulate power-grid voltage frequency dynamics, we make use of a coarse-grain model of the South African grid introduced by Hörsch & Calitz [67].The model comprises 26 geographically distributed nodes, located roughly at the cultural centres of the 9 provinces of South Africa, coupled via 41 aggregated high-voltage transmission lines.A representation of the model is given in Fig. 5.Each node in this power-grid model is consid- ered as modelled via the swing equation (1) diffusively coupled following (2).The total capacity at each node is assessed via the freely available data from the lists of power plants in South Africa found in Wikipedia [68].The capacity of each power plant is added to the nearest geographic node of the power-grid model.To account for the consumption, the estimation of the population in 2021 in each region nearest to a node is also summed [69].The total electricity demand for 2021 was 219 423 GWh, following ESKOM's 2021 Integrated Report [33], from which we estimate the total average power consumption and split it according to each node's population.Inertia M i and damping D i for each node i is estimated following Pagnier & Jacquod [71].The transmission line parameters, i.e., the susceptance, are given in Ref. [67].
To simulate the frequency (and rotor-angle) dynamics we first solve the alternating current (AC) powerflow problem using pandapower [70].It, firstly, ensures the physical power-flow problem is solvable, but also adequately balances generation and consumption at each node, resulting in the generated power P m j at each node.Nodes with negative generation, i.e., consumption, act as loads in the system.The sketch of which nodes act as generator and which act and load is given in Fig. 5.For the numerical simulations we assume a lossless system, i.e., G j, = 0, a fairly common assumption in high-voltage transmission grids.We consider as well a small Gaussian white noise added to each node to account for some stochasticity in the problem.
The target is now to model load-shedding events to showcase how these can influence power-grid frequency dynamics.As we have little access to the actual operation, implementation, phasing, and duration of the load- shedding events, we focus instead on matching the few statistics we do have access: the number of hours under different load-shedding stages in South Africa.For reference, we showcase in Tab.I the years 2019, 2020, and 2021.
To model the load-shedding events, we consider an abrupt change in demand by randomly selecting a node and a random subset of its neighbours.The total loadshedding is split uniformly across these nodes and the power-flow balance is recalculated.To mimic the system close to reality, we simulate a similar ratio of loadshedding events covering ∼13% of time in a simulation lasting 336 hours.The change in power leads to large frequency excursions -one of the causes for the elevated kurtosis of the frequency statistics.In Fig. 6 we display the statistics of the modelled system as measured at the node located in Bloemfontein (see Fig. 5).We can observe a direct impact on the kurtosis as the model system adjusts to the change in the power flows due to the sudden events of load shedding.This leads to large frequency excursions and thus elevated kurtosis.We note that in our simulations the system never loses power balance, simply readjusted generation directly as demand drops.The dynamical simulations simply readjust the angle and frequency dynamic variables to these changes.
One can easily argue that most likely load shedding leads to a temporarily unbalanced system -which would imply the dynamical system would attain a new fixed point not at f = 50 Hz (or ω = 0).This, arguably, would explain the data better -yet numerically simulating unbalanced systems results in the loss of stable fixed points and the uncoupling of some of the nodes in the system.Thus, we pursue a simpler approach and consider an abrupt change of flows, which inherently maintain power balance (i.e., the system converges back to ω i (t) = 0 after some time) but affects the angles θ i , leading to excursions of the angular frequency.Overall, as expected, the statistics of the frequency show an increased kurtosis κ sim ZA = 3.76, which, in our limited simulations, presents itself above the empirical kurtosis κ ZA = 3.33.One of the main reasons for such an elevated kurtosis in the numerical simulation is that this leads to large angular frequency excursions in both positive and negative directions.  .We can observe a direct effect on the kurtosis κ as large excursions of the frequency take place as the power flow readjust to a rapid change of the load.The data is truncated at ± 6 standard deviations as various control mechanisms would enter into frequency control that cannot be easily simulated with (1).

IV. CONCLUSION
In this work we have examined power-grid frequency recordings from the South African grid for the year of 2021, having a 15-minute temporal resolution.We contrasted these recordings with similar recordings from Continental Europe and the Nordic Grid, both having a much higher temporal resolution of 1 second.At this much coarser time resolution, we observe very similar statistics of power-grid frequency in South Africa as in Europe.All distributions have heavy tails (kurtosis κ > 3) and are slightly skewed, with South Africa having a kurtosis of κ ZA = 3.33.
Using a simplistic Fokker-Planck equation to describe the statistics of power-grid frequency, we examine the drift and diffusion of all three recordings via a nonparametric estimation of the Kramers-Moyal coefficients.Overall, we find an identical response mechanism in the recordings, which is given by the ratio of overall damping and inertia in the system.That is to say, for all recordings we estimate an identical linear-restoring-force mechanics of the frequency pushing the system to the nominal value of 50 Hz.Examining the diffusion in the recordings we come across what resembles multiplicative/statedependent noise in the South African recordings.We derive an approximate analytical expression to treat multiplicative noise and show that with such an expression one can estimate the statistical moments E[X n ].From this expression, we obtain our first explanation for the large kurtosis, resulting in κ c ZA = 3.21.This, however, disagrees with a subsequent analysis of two additional South Africa power-grid time series we include in this work.Having access to both the minimal and maximal measure power-grid frequency in each 15-minute block of 2021, we find a counter-intuitive relation of their statistics when the frequency is far from its nominal value.Away from equilibrium, the minimal and maximal power-grid frequency recordings become closer to each other -this disagree with our Fokker-Plank approach and contrasts with the presence of multiplicative noise, which should drive the maximal and minimal frequency apart, not together.
The narrowing of the minimal and maximal frequency, along with other details, points to a simpler explanation for the non-Gaussian statistics of power-grid frequency in South Africa: The detrimental effect of unscheduled load shedding.Interestingly, large frequency deviations in Europe are explained by various dispatch changes and electricity market activities (cf.Ref. [19,54]), which, from a point-of-view solely of power-grid frequency, means large deviations are induced by strong changes in generation and consumption -much alike load shedding events.To this effect, we simulate a model power-grid system of South Africa composed of 26 nodes and 41 transmission lines.We consider a losses system of inertial masses coupled in the network obeying a swing equation, wherein generation and consumption are drawn from freely available data of the power grid and the population is South Africa.In order to mimic the effects of load-shedding we simulate the system as affected by drops in the load for roughly 13% of the time.We consider the effects at a central location in South Africa and show that the simulation lead as well to an increased kurtosis of κ sim ZA = 3.76.Overall we provide a explanation for the statistics of power-grid frequency in South Africa -which shows similar characteristics to more studied power grids in Europe -yet this grid has contended (and still contends) with various load-shedding events, which invariantly affects frequency stability.We provide two explanations for the presence of elevated kurtosis of the frequency statistics in South Africa.We hope this work can bring into focus hitherto overlooked power grids around the world, particularly those that have been or are afflicted by serious infrastructural, economical, or societal problems.
nators Project -Funded by The Bill and Melinda Gates Foundation (OPP1134076).

FIG. 3 .
FIG.3.Drift and diffusion estimated for three power-grid frequency recordings from Continental Europe, the Nordic Grid, and the South African grid.(Left panel) The drift D1 in the Nordic Grid and South Africa is linear with a negative slope, indicating a linear response, as expected in(4).The case of Continental Europe is less trivial, the shaded green area shows the area wherein there is no control active -the 'deadband'.(Right panel) the diffusion D2 in Continental Europe and Nordic Grid can be said to be constant.In South Africa, we observe a functional dependence on angular frequency.Data covers the year 2021[53].

FIG. 4 .
FIG.4.Probability of occurrence of sags or overshoots in relation to the recorded power-grid frequency in South Africa in 2021.(Left panel) Two-dimensional probability density of the recorded frequency f (t) and the minimal fMIN and maximal fMAX recorded frequency.(Right panel) Two-dimensional probability density of the recorded frequency f (t) and the difference fMIN − fMAX.When the frequency is far from the nominal value of 50 Hz, the minimal and maximal frequencies come together, pointing to a strong control at play when the system is far from equilibrium.
[43][44][45][46]power-grid frequency trajectories (left) from Continental Europe (green), Nordic Grid (orange), and South African grid (purple), between the 2 nd and 3 rd of January 2021.The recordings are vertically displaced for clarity.The probability density functions for the whole of 2021 are shown in the centre and right panels, the latter in a vertical logarithmic scale.All three power grids exhibit non-Gaussian phenomena, particularly showing larger than normal kurtosis (κ > 3) and some skewness of the distributions.The power-grid frequency data from Continental Europe and the Nordic Grid have a temporal resolution (sampling rate) of 1 s.The data from the South African grid has 15 minutes resolution (900 s).All figures produced with Matplotlib, NumPy, SciPy, and pandas[43][44][45][46].
Model power-grid network of the South Africa Grid based on PyPSA-ZA [67], with 26 nodes and 41 lines.The classification into generator and load nodes is based on various available data [67-69] and a power-flow balancing obtain with pandapower [70].