Abstract
Stability analysis of complex dynamical systems is a fundamental challenge across many disciplines, with implications for a wide range of systems, from ecosystems, to organs in biological systems, such as the heart and brain. We present a data-driven method for assessing the stability of high-dimensional systems by constructing effective weighted adjacency matrices near empirically identified fixed points. Extending beyond pairwise interactions, we quantify higher-order interactions that introduce nonlinear feedback loops, coupling effects, and emergent fixed points, significantly enriching the dynamical landscape of such systems. The approach is demonstrated and validated by analyzing both low- and high-dimensional nonlinear systems featuring tipping elements, demonstrating its robustness and accuracy, as well as its application to the stability of the Nordic Power Grid, hence underscoring its potential for addressing stability challenges in complex real-world dynamical systems.
Similar content being viewed by others
Introduction
The stability of high-dimensional complex dynamical systems is a critical problem of high importance, due to its relevance to a wide variety of problems that are encountered in many disciplines, ranging from biological organs, to those in ecosystems. Many approaches have been proposed for analyzing the stability of such systems. But, given that vast amount of data are becoming increasingly available through sensors, experimental studies, and high-resolution computer simulations, data-driven approaches offer a promising route for the stability analysis of such systems. A well-known strategy involves network analysis, where the relationships between subsystems of a complex system are represented as graphs. This approach enables the identification of structural patterns related to the stability of the system of interest1,2,3. While the topology of the network strongly influences its coupling structure, other factors, such as the strengths and types of interactions between the nodes also affect the stability significantly4.
Many properties of a complex dynamical system are contained in the \({{\mathcal{N}}}\)-dimensional time series measured for its subunits (subsystems) and, therefore, the primary objective of analyzing such series is to uncover the underlying dynamical equations. These are often modeled as a system of stochastic differential equations expressed by
The function F(x, t) serves as the deterministic component of the dynamics, while G(x, t) incorporates stochastic fluctuations, either additive (state-independent) or multiplicative (state-dependent). The noise η(t) consists of components ηj(t), \(j\in 1,\ldots ,{{\mathcal{N}}}\) that represent independent (or dependent) zero-mean Gaussian white noise with unit intensity, so that, 〈ηk(t1)ηj(t2)〉 = hkjδ(t2 − t1), where hkj are the elements of covariance matrix. In the case of independent noise, one sets hkj = δk,j. Note that interactions between the components xi and xj of the complex system can occur in the deterministic part F(x, t), as well as in the stochastic part G(x, t) of the dynamics5,6,7,8,9,10.
Several approaches have been developed for identifying the deterministic function F(x, t) that involve combining nonlinear terms (with suitable basis functions) and applying Bayesian inference or maximum likelihood methods5,6,11,12,13,14,15,16. System identification is a common technique to approximate F(x, t) using regression methods, such as least squares17. Another method is based on using Gaussian processes, which offers a flexible, non-parametric approach to model F(x, t)18. Neural networks, particularly deep learning models, effectively learn complex functional forms of F(x, t)19. The Sparse Identification of Nonlinear Dynamical Systems (SINDy) method employs sparse regression to discover a compact representation of F(x, t), expressed as a linear combination of known basis functions F(x, t) ≈ ∑iciϕi(x, t), where ϕi(x, t) are candidate basis functions, and ci are the sparsely learned coefficients20. Dynamic Mode Decomposition decomposes a system’s dynamics into key spatiotemporal modes, effectively approximating the evolution of F(x, t), and identifies spatial modes and their associated temporal dynamics21. For recent developments, see8.
In this paper, we introduce a data-driven framework to identify both linear (pairwise) and higher-order nonlinear interactions in F(x, t) and G(x, t), based on analyzing multivariate time series. Our approach systematically extracts fixed points of the system and constructs effective adjacency matrices \({{{\bf{A}}}}_{ij}^{{{\rm{eff}}}}\), hence providing a rigorous foundation for stability analysis near each fixed point. We show that focusing solely on pairwise interactions offers an incomplete picture of system dynamics and stability. By incorporating higher-order interactions, we uncover new fixed points and reveal forms of multistability that are obscured in pairwise models. These findings reveal a richer dynamical structure and elucidate the complex relationship between nonlinear interactions and system stability.
Method
The representation of Eq. (1) in terms of pairwise and higher-order nonlinear interactions is expressed by 7,22,23,24,25,26,27,28,29,30,31,32,33,34:
Here, x is a point in the \({{\mathcal{N}}}\)-dimensional state space. The matrix A and the tensors C and E represent the strengths of pairwise, three- and four-way interactions in the deterministic part of Eq. (1). The constant drift for each variable is denoted by αi, which is zero for zero-mean time series, as shown in 7; see the Supplementary Note 1. The elements of A, C, and E are real-valued. The entry Ai←j indicates the effect of xj on xi, representing pairwise interaction strength. Similarly, Ci←(jk) and Ei←(jkl) capture three- and four-way interactions, respectively. The deterministic version of Eq. (2) has been widely studied, particularly with random elements in A, C, and E22,23,24,25,26,27,28,29,30,31,32,33,34.
The representation by Eq. (2) enables one to estimate the strengths of pairwise and higher-order interactions based on measured \({{\mathcal{N}}}\)-dimensional time series; see the details in the Supplementary Note 1. The estimation relies on statistical moments and small-time lag correlation functions7,35. The computational complexity of the estimation scales as \(\frac{{{{\mathcal{N}}}}^{3(Z+1)}}{{\left(Z!\right)}^{3}}\), where \({{\mathcal{N}}}\) is the dimension of the time series and Z = 3 represents the order of interactions in Eq. (2). In the Supplementary Note 5, we demonstrate that the CPU time of the method scales with the number of data points N as ~ N0.8, for fixed values of Z and \({{\mathcal{N}}}\), in a typical high-dimensional stochastic dynamical system.
Two scenarios can be considered: (1) If the functional forms of F(x, t) and G(x, t) are known from first principles (i.e., physics-informed), we estimate their parameters, either in polynomial or non-polynomial form, using time series data. (2) If no prior knowledge of these functions is available, we reconstruct both pairwise and higher-order interactions directly from the time series by expanding them as in Eq. (2)7,22,23.
Data-driven method for characterizing pairwise and higher-order interactions
To determine interactions in the deterministic function F(x, t), the procedure consists of three steps7. The method utilizes the first Kramers-Moyal coefficient to estimate F(x, t) from multivariate time series with no optimization procedure applied.
• Step 1: Test of stationarity.
The method assumes that the multivariate time series is stationary. The assumption can be tested for a given number of data points using, for example, the augmented Dickey–Fuller (ADF) test. Alternatively, stationarity can be assessed by examining the stability of statistical moments \(\langle {x}_{i}^{k}\rangle\) as the number of data points N varies. These approaches help determine an appropriate window size for analyzing pairwise and higher-order interactions. For non-stationary time series, ensemble averaging is required to obtain reliable estimates. In the case of a single non-stationary sample path, a recent extension of the method to handle non-stationarity is presented in36,37.
• Step 2: Estimating the highest order Z of expansion (2) from data.
Detecting interactions up to order Z requires reliably estimating the statistical moments \(\langle {x}_{i}^{{m}_{1}}{x}_{j}^{{m}_{2}}\ldots {x}_{l}^{{m}_{k}}\rangle\) with m1 + m2 + ⋯ + mk = 2Z for multivariate time series \(({x}_{1},{x}_{2},\ldots ,{x}_{{{\mathcal{N}}}})\), as shown in the Supplementary Note 1. By analyzing the saturating behavior of \(\langle {x}_{i}^{2Z}\rangle\) for various Z values as the number of data points N increases, one can determine in a data-driven manner whether the coefficients in polynomials of order Z in F(x, t) can be reliably approximated. By “reliably,” we mean that the statistical moments demonstrate stability and convergence as the number of data points changes. This step is referred to as the stop-condition in35.
In practice, we stop at order Z = 3. This choice is motivated by the fact that third-order dynamical equations are often sufficient for modeling complex systems, as they effectively capture essential nonlinear interactions and coupled dynamics without introducing excessive computational complexity. By incorporating quadratic and cubic terms, the models account for feedback loops, thresholds, and higher-order dependencies features commonly observed in physical, biological, and engineered systems. This approach balances accuracy and efficiency, reducing the risk of overfitting. Moreover, third-order terms are mathematically versatile, providing good approximations for any smooth functions based on the Stone-Weierstrass theorem, making them particularly useful for studying complex phenomena38.
• Step 3: Pairwise and higher-order interactions.
The vector α, as well as the matrices and tensors A, C, and E are expressed as follows: \({\alpha }_{i}(\tau )={\tilde{\alpha }}_{i}(\tau )/\tau\), Ai,j(τ) = ϕi,j(τ)/τ, Ci,jk(τ) = ψi,jk(τ)/τ, and Ei,jkl(τ) = γi,jkl(τ)/τ, for τ = dt, 2dt, ⋯ , kdt (where 1/dt is the sampling rate of data acquisition) in the limit of small τ; see the Supplementary Note 1. This limit can be achieved by applying a linear regression to their estimated values for the first three time lags39 to approach the limit as τ → 0. An alternative method for approximating the coupling strengths is to estimate them at τ = dt6.
The unknown coefficients \({\tilde{\alpha }}_{i}(\tau ),{\phi }_{i,j}(\tau ),{\psi }_{i,jk}(\tau )\) and γi,jkl(τ) are determined as the solution of the following set of linear equations7 (for set Z = 3),
Here, yi(t, τ) = xi(t + τ) − xi(t), and we denote the averages by the brackets 〈…〉 represents time averaging for stationary time series or ensemble averages for non-stationary ones. We note that the relation in Eq. (3), together with the derived vector α and the matrices and tensors A, C, and E, is exact in the limit of small τ. The only approximation involved lies in the use of a finite τ in practical computations.
Similar relations exist for interactions in the stochastic part G(x, t), as shown in the Supplementary Note 1. Thus, in the proposed method one needs to know statistical moments to estimate pair-wise and higher order interactions from multivariate time series as is evident in the relation (3).
The above three steps are intended for reconstructing models in polynomial form or when there is no prior knowledge of the functions F(x, t) and G(x, t). In the Supplementary Note 2, we provide detailed methods for estimating parameters in non-polynomial F(x, t), specifically for the dynamics of a three-dimensional chaotic system40,41,42, where the parameters are extracted from the corresponding time series. Additional non-polynomial examples, such as the host-immune-tumor model and Kuramoto–Sakaguchi oscillators with higher-order interactions, are presented in ref. 7.
Data-driven investigation of the stability
The presented data-driven method provides a framework to assess complex system stability. Using the deterministic component of Eq. (2) up to the third order, we determine the fixed point x*, where \({\dot{x}}_{i}({{{\bf{x}}}}^{* })=0\), and the Jacobian matrix Jij at x* using interaction strengths Aij, Cijk, and Eijkl. The Jacobian is given by
Linearizing the dynamics around x*, we obtain
where \({{{\bf{A}}}}_{ij}^{{{\rm{eff}}}}\) forms the Jacobian at x*. The stability of the system depends on the eigenvalues of \({{{\bf{A}}}}_{ij}^{{{\rm{eff}}}}\): the fixed point is stable if all eigenvalues have negative real parts. Detecting instability due to positive eigenvalues of \({{{\bf{A}}}}_{ij}^{{{\rm{eff}}}}\) does not, however, rule out persistence, as unstable fixed points can lead to the emergence of limit cycles or chaotic attractors.
It is essential to verify that the fixed points obtained from the deterministic component of Eq. (2) coincide with the points of maximum stationary density, as determined from the stationary probability distribution of the time series. Any observed discrepancies may indicate transitions induced by noise7,35. The characteristic time scales near each fixed point are given by τi = 1/∣λi∣, where λi are the eigenvalues of Aeff. The rightmost eigenvalue represents long-time dynamics, whereas the leftmost eigenvalue captures the initial responsiveness to perturbations. The eigenvector of Aeff that corresponds to the rightmost eigenvalue provides clue to the directions of response, with the dominant eigenvector representing the long-term behavior of the system.
To illustrate the efficacy and versatility of our approach in practical scenarios, we investigate time series that we derive from simulations of two nonlinear dynamical system, that features tipping elements in two and ten dimensions. Tipping elements refer to critical components within complex systems that can undergo abrupt and irreversible shifts when certain thresholds are crossed. These shifts can lead to significant changes in the overall behavior or state of the system, often causing it to transition to a new and potentially less desirable state. Such elements are important in ecology, climate science, and economics, and play a crucial role in managing environmental and social risks43,44,45. Finally to illustrate the applicability of our methodology, we then explore stability of frequency dynamics of the Nordic Power Grid.
Results
Data-driven investigation of stability in nonlinear dynamical systems with tipping elements
To validate our approach, we simulate time series from two- and ten-dimensional nonlinear systems with known dynamics and show that the estimated interaction strengths closely match the ground truth.
Example 1
Let us start with a two-dimensional directed dynamical system that has tipping elements and can transition to qualitatively different regimes when a critical threshold - the system’s tipping point - is crossed. The equations of motion for the two tipping elements x1 and x2 are given by
Here, we have considered the tipping element x1 as the driver component, with the parameter r controlling its behavior. The linear coupling term, denoted by d(x1 + 1), serves as an effective control parameter that influences the dynamics of the response tipping element x2. We chose a specific value for the coupling strength, namely d = 0.3, and keep the constants a = 1 and b = 1 fixed. The fixed points of the dynamical Eq. (6) depend on a, b, and r. The model exhibits hysteresis under variation of the control parameter r, and can enter a region of multistability. We probe this region by using a sigmoid-like variation of the control parameter r backward from 0.8 to 0.0; see Fig. 1a–d.
a, b Excerpts of exemplary time series generated by the two-dimensional dynamical equations, Eq. (6). The dynamical equations consist of two tipping elements. c The control parameter r of the driver element undergoes a sigmoid-like change, transitioning from 0.8 to 0 with the center point at time 2500. As the control parameter r is varied, a transition from a mono-stable to a multi-stable regime – from one to seven fixed points – occurs at a critical value of r ≃ 0.39. d The vertical dashed lines mark the transition point, and r crosses this value at time tc = 2500. We present the estimated time-resolved time scales of the system’s dynamics as quantified by \({\tau }_{\max /\min }=1/| {\lambda }_{\max /\min }|\), where the rightmost and leftmost eigenvalues, \({\lambda }_{\max }\) and \({\lambda }_{\min }\), of the Jacobian matrix are computed at the fixed point approximately at (1, 1). This point is indicated by red circles in panels (e) and (f). e Phase portrait of \(({\dot{x}}_{1},{\dot{x}}_{2})\) for r = 0.8. The color bar indicates the values of \(\sqrt{{\dot{x}}_{1}^{2}+{\dot{x}}_{2}^{2}}\), while arrows indicate the direction of flow towards fixed points. Attractive and repulsive fixed points are marked with blue and red dots, respectively. For r = 0.8, the fixed point is situated at (1.27, 1.24). f Phase portrait of \(({\dot{x}}_{1},{\dot{x}}_{2})\) for r = 0. Multiple fixed points are at the following positions: (−1, −1), (−1, 0), (−1, 1), (0, −0.78), (0, −0.34), (0, 1.1), and (1.0, 1.2). All the fixed points, identified through the reconstructed dynamical equations, closely approximate their true locations, typically with an absolute difference on the order of 10−2. From the simulated dynamical system, including both linear and nonlinear terms, we estimate α and A assuming linear theory. The fixed point, shown as a green dot in panels (e) and (f), demonstrates how neglecting higher-order interactions leads to incorrect results.
For r = 0.8, there exists an attractive fixed point located at (1.27, 1.24); see Fig. 1e, f. In contrast, for r = 0 multiple fixed points are located at (−1, −1), (−1, 0), (−1, 1), (0, −0.78), (0, −0.34), (0, 1.1), and (1.0, 1.2). In the Supplementary Note 3, we outline the data-driven approach used to determine the coefficients a, b, d, and r using the simulated time series generated by the dynamical systems (6).
To express Eq. (6) in a form similar to Eq. (2), we compactly represent all non-zero entries of the matrix Aij and the tensors Cijk and Eijkl that correspond to the state variable i as follows: i: ([αi, Aij, Cijk, Eijkl])7. With this notation, Eq. (6) is summarized by, i = 1: ([α1 = r, A11 = b, E1111 = −a]) and i = 2: ([α1 = d, A21 = d, A22 = b, E2222 = −a]). Given the definitions of Cijk and Eijkl, the two-dimensional dynamical Eq. (6) include interactions up to third order. The order of interactions is determined by terms of the form \({x}_{i}^{{n}_{1}}{x}_{j}^{{n}_{2}}\cdots {x}_{m}^{{n}_{k}}\), with Z = n1 + n2 + ⋯ + nk. According to this definition, nonlinear terms correspond to higher-order interactions.
In our simulations, we introduce a noise term \(\sqrt{0.5}{\eta }_{i}\) (i = 1 and 2) to each dynamical equation, where ηi represents a Gaussian white noise with an intensity of 1. We note that the noise terms ηi are distinct for the dynamical equations that correspond to x1 and x2, and are mutually uncorrelated. In the presence of this type of noises, the system is able to explore a larger portion of its phase space, resulting in simulated time series that, compared with the purely deterministic case5,7, contains significantly more information about the underlying dynamics. We generate 50 realizations of the dynamics by numerically solving the dynamical Eq. (6) using the Kloeden–Platen–Schurz algorithm for Itô stochastic differential equations with a time step of dt = 0.00546. We also manipulated the control parameter r of the driver element in Eq. (6) from 0.8 to 0 with time, following a sigmoid function centered at time 2500, expressed as \(r(t)=0.8\left(1-\frac{1}{1+\exp \{-t/100+25\}}\right)\). Starting with the initial values (1.27, 1.24) for r ≃ 0.8 at t = 0, we numerically integrated the system of equations up to a time of 5000, yielding a dataset consisting of 106 data points. We used a window (middle-centered) containing n = 5 × 105 data points rolling with 95% overlap and, then, applied the data-based reconstruction method to the two-dimensional synthetic time series in order to estimate the parameters and coefficients in Eq. (6), see Supplementary Note 3.
We find that multistability emerges around r ≃ 0.39, as shown in Fig. 1e, f. An excerpt of exemplary time series generated by the dynamical system (6) and the time-dependency of the control parameter r are shown in Fig. 1a–c. We examined the rightmost (largest time scale \(1/| {\lambda }_{\max }|\)) and leftmost (smallest time scale \(1/| {\lambda }_{\min }|\)) eigenvalues of the linearized Jacobian matrices in each window in the vicinity of the upper fixed point (1.27, 1.24), indicated by red circles in panels e and f in Fig. 1. The largest time scale \(1/| {\lambda }_{\max }|\) experienced a change as the system entered the region of multistability; see Fig. 1d. Similarly, the smallest time scale \(1/| {\lambda }_{\min }|\) also experienced a change with smaller changes from 0.26 to 0.3.
For r = 0, after the transition, the eigenvectors are \({\left(0,1\right)}^{\top }\) and \({\left(4.9,1\right)}^{\top }\) corresponding to eigenvalues − 3.74 (the smallest or leftmost) and − 2 (the largest or rightmost), respectively, where superscript ⊤ refers to transpose operation. Subsequently, at short time scales (eigenvector corresponding to \({\lambda }_{\min }\)), x2 exhibits a high-amplitude response, while the long-term dynamics (eigenvector corresponding to \({\lambda }_{\max }\)) are primarily governed by the dynamics of x1. The convergence rates of the absolute differences ∣Δ∣ between the preset and estimated strengths of interaction constants a, b, r, and d for various integration times T = Ndt, where N is the number of data point in each simulation, in the two dynamical equations, Eq. (6), are depicted in Supplementary Fig. 2. For more details, see the Supplementary Note 4.
To illustrate the difference between the impact of pairwise and higher-order interactions during the reconstruction procedure, we first consider the full dynamical equations, including both linear and nonlinear terms, and simulate the system to generate the corresponding time series. Next, we assume the underlying theory is linear and estimate the vector α and matrix A from the simulated time series. Using the extracted α and A, we determine the fixed point, shown as green dot in Fig. 1e, f. This simple example illustrates how neglecting higher-order interactions can lead to incorrect conclusions.
Example 2
As a second example, we demonstrate our analysis for a dynamical system with tipping elements on a binary directed network, illustrated in Fig. 2a. Tipping elements are modeled similarly to Eq. (6) on a ten-node network, where the dynamics at each node is coupled to others by, \(d\mathop{\sum }_{j = 1}^{{{\mathcal{N}}}}{a}_{ij}({x}_{j}+1)\), with aij representing the adjacency matrix element of the network. The designed network features numerous indirect paths, exemplified by the link between nodes 5 and 8, as well as spurious connections, such as those between nodes 4 and 8, resulting from common drivers. Node 5 is considered a driver node, meaning that its control parameter r5 is altered to induce regime changes across the entire network. We adjusted the control parameter of the element in node 5, transitioning from 0.8 to 0 over time. The adjustment followed a sigmoid function centered at time 2500. The constants on all other nodes remain the same as in the two-dimensional example, namely, a = 1 and b = 1, and the coupling strength is set to d = 0.3.
a Representation of the binary directed network of tipping elements, \({{\mathcal{N}}}=10\) nodes, numbered from 1 to 10. In panel (b), the computed number of fixed points for various values of r5 reveals a transition from a single attractive fixed point to 745 fixed points, with 11 of them being attractive at the critical r5c ≃ 0.39. c The estimated and theoretical time-resolved largest time scale of the system’s dynamics is quantified by \({\tau }_{\max }=1/| {\lambda }_{\max }|\), where \({\lambda }_{\max }\) represents the rightmost eigenvalue of the Jacobian matrix at the fixed point approximately at x* = (1.24, 1.41, 1.54, 1.40, 1.26, 1.41, 1.24, 1.40, 1.43, 1.24) in the ten-dimensional state space. An evident increase in the largest time scale is observed due to the transition at t = 2500 - gray interval. The theoretical values of eigenvalues are computed at the fixed point at a given time (or r5), while estimated eigenvalues are computed based on the computed coefficients a, b and d in each window. The overlapping windows (each with a width of 5 × 105 data points) are used to estimate the eigenvalues.
By varying r5 from 0.8 to 0, we observe a transition from a single attractive fixed point to a total of real-valued 745 fixed points, with 11 of them being attractive fixed points at the critical value r5c ≃ 0.39, as depicted in Fig. 2b. The fixed points were determined using Mathematica 14. The total number of fixed points (real and complex-valued) is 310 = 59049. An excerpt of exemplary time series generated by the system and the time-dependency of the control parameter with sigmoid function r5 are shown in Supplementary Fig. 3.
We examined the rightmost (largest time scale \(1/| {\lambda }_{\max }|\)) eigenvalues of the linearized Jacobian matrices in each window in the vicinity of the attractive fixed point located at x* = (1.24, 1.41, 1.54, 1.40, 1.26, 1.41, 1.24, 1.40, 1.43, 1.24). The largest time scale experienced a change as the system entered the region of multistability; see Fig. 2c. Similarly, we observed that the smallest time scale also underwent a change, although with smaller variations (not depicted). We determined the leftmost and rightmost eigenvalues, \({\lambda }_{\min }\) and \({\lambda }_{\max }\), to be −6.13 and −3.51, respectively, for r5 = 0. At short time scales (eigenvector corresponding to \({\lambda }_{\min }\)), x3 and x9 respond quickly, and the long-time dynamics are mainly governed by the dynamics of x1, x5, x7, and x10 (eigenvector corresponding to \({\lambda }_{\min }\)). Finally, we disconnect nodes 2 and 5 to prevent a feedback loop, ensuring that the dynamics are not influenced by self-reinforcing interactions. We find that only x5 controls the long-term dynamics of the networked system, while x3 and x9 respond quickly. The convergence rates of absolute differences ∣Δ∣ between preset and estimated interaction constants for various integration times T = Ndt are shown in Supplementary Fig. 4.
Supplementary Tables S3 and S4, report the Lyapunov exponents for Examples 1 and 2. The consistently negative values confirm that both systems converge to stable equilibrium states, exhibiting steady-state behavior. These examples demonstrate the effectiveness of the proposed reconstruction method for stability analysis in systems with equilibrium dynamics.
To further illustrate the generality of our approach, we present in the Supplementary Note 5 two additional examples with dimensions \({{\mathcal{N}}}=3\) and \({{\mathcal{N}}}=10\): (i) a three-dimensional Van der Pol oscillator exhibiting limit cycle dynamics, and (ii) the ten-dimensional Lorenz-96 system, which displays chaotic behavior. We classify the dynamical regimes-steady-state, limit cycle, or chaotic-using the Kaplan-Yorke dimension derived from the full spectrum of Lyapunov exponents, demonstrating that our method can accurately reconstruct and characterize systems across a broad range of dynamical behaviors.
A real-world example: Investigating the stability of frequency dynamics in the Nordic Power Grid
We illustrate the approach for exploring the stability of complex dynamical systems by using grid frequency data associated with the Nordic Power Grid. Grid frequency is a critical indicator of a power grid’s stability, reflecting the balance between electricity supply and demand47. Maintaining frequency within a narrow range (~±10 mHz) around a setpoint (typically 50 or 60 Hz, depending on the region and country) is vital for the stable operation of the grid48. Deviations from the nominal frequency can lead to equipment malfunctions, blackouts, and cascading failures, affecting millions of people and potentially causing widespread economic and social disruption49,50. With the increasing integration of renewable energy sources, which can introduce additional variability into the grid, understanding the stability of grid dynamics is more important than ever51,52.
We analyze a set of seven time-synchronous frequency recordings from the Nordic Grid over a 36-h period, spanning from 21:00 on September 9th to 09:00 on September 11th, 2013, with a sampling rate of 50 Hz53. The data were collected at seven universities across the Nordic region: Norwegian University of Science and Technology, Trondheim (NOR-NTUN), Chalmers University of Technology, Gothenburg (SWE-CTH), Lund University, Lund (SEW-LTU), Royal Institute of Technology, Stockholm (SWE-KTH), Luleå University of Technology, Luleå (SWE-LTH), Tampere University of Technology, Tampere (FIN-TTY), and Aalto University, Aalto (FIN-AU). We use the measurements to assess the grid’s frequency stability by identifying the fixed points in the frequency data. The frequency data from the \({{\mathcal{N}}}=7\) locations are unimodally distributed around their respective mean values, which allows us to assume that the fixed point is very close to the mean.
Three steps of analysis were applied to the \({{\mathcal{N}}}=7\)-dimensional time series. The selected time window spans 10,800 s and contains N = 540,000 data points. To ensure reliable estimation of statistical moments up to order 2Z = 6, a local normalization was performed within smaller sub-windows of 104 data points54. This combination of window size and normalization ensures that the data is effectively stationary and that interactions up to order Z = 3 are reliably captured. Stationarity of the locally normalized time series within this window size was confirmed using the augmented Dickey–Fuller (ADF) test. Finally, within each main window of N = 540,000 data points, the data is transformed to have zero mean and unit variance. This effectively centers fluctuations around the origin, which by construction leads to αi = 07,35 (see Supplementary Note 1 and 7 for all details).
We fix the interaction order at Z = 3 and estimate the entries of the matrix A and the tensors C and E using locally normalized data within windows of N = 540,000 data points, with a 95% overlap between consecutive segments. In total, 220 overlapping windows are examined. The resulting time-resolved analysis allows us to track variations in the system’s stability as internal and external conditions evolve.
Our findings are summarized in Fig. 3a–f. First, we identify the fixed points using the matrix A and the tensors C and E and, then, we estimate \({{{\bf{A}}}}_{ij}^{{{\rm{eff}}}}\). The number of fixed points varies across each window, with at least one stable (attractive) fixed point being present close to the origin. As shown in Fig. 3a, estimates of the diagonal elements of the pair-wise interaction matrix, \({A}_{ii}^{{{\rm{eff}}}}\), characterizing self-dynamics, are predominantly negative, with their temporal average being \(\left\langle {A}_{ii}^{{{\rm{eff}}}}\right\rangle =-29.27\)), indicating self-regulatory frequency dynamics at the identified attractive fixed point.
a Time-averaged estimates \(\overline{{A}_{ij}^{{{\rm{eff}}}}}\) of pairwise strengths of interaction, averaged over complete measurements. b, c Probability distribution functions of the elements of Aeff, Cijk, and Eijkl (complete measurements). d Dynamic evolution of the real part of the rightmost eigenvalue \({\lambda }_{\max }\) (black line), as well as of the leftmost eigenvalue \({\lambda }_{\min }\) (red line), of Aeff, estimated for the stable fixed point close to the origin. e The number of real-valued fixed points, with the red points indicating the number of unstable fixed points, and the blue points representing the number of stable fixed points. The number of fixed points varies across each window (100–150 fixed points), with at least one stable fixed point present close to the origin. f Scatter plot of the real and imaginary parts of eigenvalues of Aeff. The real parts of all the eigenvalues are negative at the stable fixed point close to the origin, while the imaginary parts are either zero or appear in complex conjugate pairs, since Aeff is real-valued.
The estimated strengths of the off-diagonal elements of pairwise interactions, \({A}_{ij}^{{{\rm{eff}}}}| i\ne j\) as shown in the Fig. 3b, exhibit asymmetry; in general, we have \({A}_{ij}^{{{\rm{eff}}}}\ne {A}_{ji}^{{{\rm{eff}}}}\)) with a slight tendency to positive values, \(\langle {A}_{ij}^{{{\rm{eff}}}}{| }_{i\ne j}\rangle =4.87\). They are weakly correlated with correlation coefficient of 0.003. This asymmetry indicates various degrees of driver-responder relationships between different regions, namely, attractive (\({A}_{ij}^{{{\rm{eff}}}}{| }_{i\ne j} > 0\wedge {A}_{ji}^{{{\rm{eff}}}}{| }_{i\ne j} > 0\)) for 80% of pairs, repulsive (\({A}_{ij}^{{{\rm{eff}}}}{| }_{i\ne j} < 0\wedge {A}_{ji}^{{{\rm{eff}}}}{| }_{i\ne j} < 0\)) for 1% of pairs, or mixed (\({A}_{ij}^{{{\rm{eff}}}}{| }_{i\ne j} > 0\wedge {A}_{ji}^{{{\rm{eff}}}}{| }_{i\ne j} < 0\) and vice versa) for 19% of the pairs. The mean value of the three- and four-way interactions have the property that \(\langle {C}_{ijk}\rangle \approx 0\) and \(\langle {E}_{ijkl}\rangle \approx -1.14\); see Fig. 3c. They exhibit an exponential distribution.
In Fig. 3e, we plot in all the windows the number of real-valued fixed points, with the red and blue points indicating, respectively, the number of unstable and stable fixed points. All the fixed points are estimated, similar to those in a ten-dimensional system of interacting tipping elements, by accounting for higher-order interactions, quantified based on the tensors C and E.
Near the detected stable fixed point close to the origin, we linearize the 7-dimensional dynamics and compute the eigenvalues of the effective adjacency matrices \({{{\bf{A}}}}_{ij}^{{{\rm{eff}}}}\) in each window; see Fig. 3f.
Next, we explore how stability estimates of the power grid vary over time. Both the rightmost \({\lambda }_{\max }\) and leftmost eigenvalues \({\lambda }_{\min }\) of Aeff at x* fluctuate over the course of the observation period; see Fig. 3d. This indicates that the self-regulatory strength with which the grid reacts to perturbations changes in time, and that the power grid’s slowest and fastest reaction, characterized by \({\lambda }_{\max }\) and \({\lambda }_{\min }\), respectively, are related in a non-trivial manner. The rightmost eigenvalues in all the windows are approximately −0.01, corresponding to the largest time scale, 100 s. In contrast, the shortest time scale in the frequency dynamics is approximately 20 milliseconds. If higher-order interactions are again neglected, as in Example 1, the analysis yields a single stable fixed point at the origin of the 7-dimensional state space, corresponding to the mean of the time series.
We then analyzed the eigenvectors associated with the rightmost and leftmost eigenvalues in each of the 220 windows. We found that the location SWE-LTH exhibits the highest amplitude in the eigenvector corresponding to the rightmost eigenvalues, hence suggesting its significant role in controlling the long-time dynamics of power grid frequency. Similarly, the location with the highest amplitude in the eigenvector that correspond to the leftmost eigenvalues, which respond more promptly, is NOR-NTUN. The values of the eigenvectors for the stable fixed point x* close to the origin are depicted in Fig. 4, and the averaged values of the tensors C and E over 220 windows are plotted in Supplementary Figs. 9 and 10, respectively.
The stacked bar chart of the eigenvector norms for each \({e}_{i}^{2}\) across the 220 windows, corresponding to the a leftmost and b rightmost eigenvalues of Aeff, is presented, respectively. Each bar represents the normalized contribution of each variable i to the corresponding eigenvector within a given time window. For λmin, NOR-NTUN is most often the node with rapid responses to any perturbations. However, there are time intervals, such as 13–17 h, where SWE-LTU becomes the most responsive node on short time scales. For λmax, all six nodes contribute almost equally, with SWE-LTU showing slightly higher amplitudes in certain instances.
Finally, using the locally normalized 7-dimensional time series of frequency dynamics from the Nordic Power Grid, and the computed matrix and tensors A, C, and E, we reconstruct the underlying dynamics. The resulting Lyapunov spectrum confirms fixed-point behavior and is presented in Supplementary Table S8.
Conclusions
We propose a data-driven framework for evaluating the stability of complex systems based on empirical multivariate time series. The method has been rigorously validated on dynamical systems with known ground truths and successfully applied to real-world data, notably in assessing the stability of frequency dynamics in the Nordic Power Grid. A central contribution of our approach is the quantification of higher-order interactions, represented through the tensors C and E, which uncover the emergence of new fixed points and enhance the dynamical landscape. By simultaneously introducing nonlinear feedback loops and coupling effects involving more than two components, higher-order interactions can stabilize or destabilize specific states, leading to shifts in equilibrium points and the formation of new stable configurations driven by complex interdependencies.
Our approach distinguishes itself from existing state-of-the-art methods by reconstructing both deterministic and stochastic components directly from data, leveraging Kramers-Moyal coefficients. Its moment-based formulation offers inherent robustness to noise and is particularly well-suited for high-dimensional stochastic systems, efficiently capturing pair-wise and higher-order interactions through compact tensor representations; see Supplementary Note 8 for details.
We have further demonstrated that the proposed reconstruction method not only enables reliable stability analysis for systems exhibiting equilibrium (steady-state) behavior, but also effectively captures the dynamics of more complex regimes, including limit cycles and chaos. This underscores the robustness and broad applicability of our method across a wide spectrum of dynamical systems.
Understanding and characterizing fixed points is essential for modeling and predicting the dynamics of complex systems across diverse fields, including neuroscience, physics, epidemiology, ecology, social science, biology, informatics, data science, climate dynamics, and economics. By offering the proposed data-driven method for the stability analysis, our work paves the way for advancing both the understanding of complex systems and the development of a data-driven control theory tailored to their dynamics.
Data availability
The data underlying this study’s findings can be found in ref. 53 and https://github.com/AliShahrabi97/CSSA.
Code availability
The package “HiNTS” (Higher-Order Interactions in \({{\mathcal{N}}}-\)Dimensional Time Series) contains all the necessary details for calculating both pairwise and higher-order interactions from multivariate time series data (https://github.com/aminakhshi/hints). Additionally, the codes to calculate fixed points from the matrix Aij and the tensors Cijk and Eijkl are provided in https://github.com/AliShahrabi97/CSSA. Finally, the code for computing the Lyapunov exponent spectrum from the reconstructed dynamical equations is also provided in https://github.com/AliShahrabi97/CSSA.
References
Newman, M. E. J. The structure and function of complex networks. SIAM Rev. 45, 167–256 (2003).
Liu, Y.-Y., Slotine, J.-J. & Barabási, A.-L. Controllability of complex networks. Nature 473, 167–173 (2011).
Meena, C. et al. Emergent stability in complex network dynamics. Nat. Phys. 19, 1033–1042 (2023).
Bahadorian, M. et al. A topology-dynamics-based control strategy for multi-dimensional complex networked dynamical systems. Sci. Rep. 9, 19831 (2019).
Friedrich, R., Peinke, J., Sahimi, M. & Reza Rahimi Tabar, M. Approaching complexity by stochastic methods: from biological systems to turbulence. Phys. Rep. 506, 87–162 (2011).
Rahimi Tabar, M. R. Analysis and data-based reconstruction of complex nonlinear dynamical systems: using the methods of stochastic processes, https://doi.org/10.1007/978-3-030-18472-8 (Springer International Publishing, 2019).
Tabar, M. R. R. et al. Revealing higher-order interactions in high-dimensional complex systems: a data-driven approach. Phys. Rev. X 14, 011050 (2024).
Sahimi, M. Physics-informed and data-driven discovery of governing equations for complex phenomena in heterogeneous media. Phys. Rev. E 109, 041001 (2024).
Anvari, M., Tabar, M. R. R., Peinke, J. & Lehnertz, K. Disentangling the stochastic behavior of complex time series. Sci. Rep. 6, 35435 (2016).
Lehnertz, K., Zabawa, L. & Tabar, M. R. R. Characterizing abrupt transitions in stochastic dynamics. N. J. Phys. 20, 113043 (2018).
Peinke, J., Tabar, M. & Wächter, M. The fokker-planck approach to complex spatiotemporal disordered systems. Annu. Rev. Condens. Matter Phys. 10, 107–132 (2019).
Brunton, S. L., Proctor, J. L. & Kutz, J. N. Discovering governing equations from data by sparse identification of nonlinear dynamical systems. Proc. Natl Acad. Sci. 113, 3932 (2016).
Yang, S., Wong, S. W. K. & Kou, S. C. Inference of dynamic systems from noisy and sparse data via manifold-constrained gaussian processes. Proc. Natl Acad. Sci. 118, e2020397118 (2021).
Picchini, U. & Forman, J. L. Bayesian inference for stochastic differential equation mixed effects models of a tumour xenography study. J. R. Stat. Soc. Ser. C Appl. Stat. 68, 887–913 (2019).
Kaheman, K., Kutz, J. N. & Brunton, S. L. Sindy-pi: a robust algorithm for parallel implicit sparse identification of nonlinear dynamics. Proc. R. Soc. A Math. Phys. Eng. Sci. 476, 20200279 (2020).
Kirkby, J., Nguyen, D. H., Nguyen, D. & Nguyen, N. N. Maximum likelihood estimation of diffusions by continuous time markov chain. Computational Stat. Data Anal. 168, 107408 (2022).
Ljung, L. System identification, https://doi.org/10.1002/047134608X.W1046.pub2 (Wiley, 2017).
Rasmussen, C. E. & Williams, C. K. I. Gaussian processes for machine learning, https://doi.org/10.7551/mitpress/3206.001.0001 (The MIT Press, 2005).
Raissi, M., Perdikaris, P. & Karniadakis, G. Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations. J. Computational Phys. 378, 686–707 (2019).
Brunton, S. L., Proctor, J. L. & Kutz, J. N. Discovering governing equations from data by sparse identification of nonlinear dynamical systems. Proc. Natl Acad. Sci. 113, 3932–3937 (2016).
Kutz, J. N., Brunton, S. L., Brunton, B. W. & Proctor, J. L. Dynamic mode decomposition: data-driven modeling of complex systems, https://doi.org/10.1137/1.9781611974508 (Society for Industrial and Applied Mathematics, 2016).
May, R. M. Will a large complex system be stable? Nature 238, 413–414 (1972).
Allesina, S. & Tang, S. Stability criteria for complex ecosystems. Nature 483, 205–208 (2012).
de Oliveira, V. M. & Fontanari, J. F. Random replicators with high-order interactions. Phys. Rev. Lett. 85, 4984–4987 (2000).
Tokita, K. Species abundance patterns in complex evolutionary dynamics. Phys. Rev. Lett. 93, 178102 (2004).
Wang, W.-X., Yang, R., Lai, Y.-C., Kovanis, V. & Harrison, M. A. F. Time-series–based prediction of complex oscillator networks via compressive sensing. EPL Europhys. Lett. 94, 48006 (2011).
Wang, W.-X., Yang, R., Lai, Y.-C., Kovanis, V. & Grebogi, C. Predicting catastrophes in nonlinear dynamical systems by compressive sensing. Phys. Rev. Lett. 106, 154101 (2011).
Kelsic, E. D., Zhao, J., Vetsigian, K. & Kishony, R. Counteraction of antibiotic production and degradation stabilizes microbial communities. Nature 521, 516–519 (2015).
Coyte, K. Z., Schluter, J. & Foster, K. R. The ecology of the microbiome: Networks, competition, and stability. Science 350, 663–666 (2015).
Benson, A. R., Gleich, D. F. & Leskovec, J. Higher-order organization of complex networks. Science 353, 163–166 (2016).
Bairey, E., Kelsic, E. D. & Kishony, R. High-order species interactions shape ecosystem diversity. Nat. Commun. 7, 12285 (2016).
Grilli, J., Barabás, G., Michalska-Smith, M. J. & Allesina, S. Higher-order interactions stabilize dynamics in competitive network models. Nature 548, 210–213 (2017).
Jirsa, V. K. & Ding, M. Will a large complex system with time delays be stable? Phys. Rev. Lett. 93, 070602 (2004).
Battiston, F. et al. Networks beyond pairwise interactions: structure and dynamics. Phys. Rep. 874, 1–92 (2020).
Nikakhtar, F. et al. Data-driven reconstruction of stochastic dynamical equations based on statistical moments. N. J. Phys. 25, 083025 (2023).
Rahvar, S. et al. Characterizing time-resolved stochasticity in non-stationary time series. Chaos Solitons Fractals 185, 115069 (2024).
Wiedemann, C., Wächter, M., Freund, J. A. & Peinke, J. Local statistical moments to capture kramers-moyal coefficients. Eur. Phys. J. B 98, 34 (2025).
Rudin, W. Principles of mathematical analysis, 3rd edn (McGraw-Hill, 1976).
Lin, P. P., Wächter, M., Tabar, M. R. R. & Peinke, J. Discontinuous jump behavior of the energy conversion in wind energy systems. PRX Energy 2, https://doi.org/10.1103/PRXEnergy.2.033009 (2023).
Chang, A., Bienfang, J. C., Hall, G. M., Gardner, J. R. & Gauthier, D. J. Stabilizing unstable steady states using extended time-delay autosynchronization. Chaos Interdiscip. J. Nonlinear Sci. 8, 782–790 (1998).
Gauthier, D. J. & Bienfang, J. C. Intermittent loss of synchronization in coupled chaotic oscillators: Toward a new criterion for high-quality synchronization. Phys. Rev. Lett. 77, 1751–1754 (1996).
Gauthier, D. J., Bollt, E., Griffith, A. & Barbosa, W. A. S. Next generation reservoir computing. Nat. Commun. 12, 1–8 (2021).
Lenton, T. M. et al. Tipping elements in the earth’s climate system. Proc. Natl Acad. Sci. 105, 1786–1793 (2008).
Carpenter, S. R. et al. Science for managing ecosystem services: Beyond the millennium ecosystem assessment. Proc. Natl Acad. Sci. 106, 1305–1312 (2009).
Scheffer, M. et al. Early-warning signals for critical transitions. Nature 461, 53–59 (2009).
Kloeden, P. E., Platen, E. & Schurz, H. Numerical solution of SDE through computer experiments, https://doi.org/10.1007/978-3-642-57913-4 (Springer Berlin Heidelberg, 1994).
Liu, T., Song, Y., Zhu, L. & Hill, D. J. Stability and control of power grids. Annu. Rev. Control Robot. Autonomous Syst. 5, 689–716 (2022).
Sauer, P. W., Pai, M. A. & Chow, J. H. Power system dynamics and stability: with synchrophasor measurement and power system toolbox 2e: with synchrophasor measurement and power system toolbox, https://doi.org/10.1002/9781119355755 (Wiley, 2017).
Wen, X. et al. Identifying complex dynamics of power grid frequency. In: The 15th ACM International Conference on Future and Sustainable Energy Systems, e-Energy’24, 408–414 https://doi.org/10.1145/3632775.3661944 (ACM, 2024).
Sun, K. Cascading failures in power grids: risk assessment, modeling, and simulation, https://doi.org/10.1007/978-3-031-48000-3 (Springer International Publishing, 2024).
Anvari, M. et al. Short term fluctuations of wind and solar power systems. N. J. Phys. 18, 063027 (2016).
Rydin Gorjao, L., Vanfretti, L., Witthaut, D., Beck, C. & Schafer, B. Phase and amplitude synchronization in power-grid frequency fluctuations in the nordic grid. IEEE Access 10, 18065–18073 (2022).
Qin, J. & Saeedifard, M. DC-line current ripple reduction of a parallel hybrid modular multilevel HVDC converter. In: 2014 IEEE PES General Meeting | Conference & Exposition, National Harbor, MD, USA, 1–5. https://doi.org/10.1109/PESGM.2014.6939346 (IEEE, 2014).
Münnix, M. C., Schäfer, R. & Guhr, T. Compensating asynchrony effects in the calculation of financial correlations. Phys. A Stat. Mech. Appl. 389, 767–779 (2010).
Acknowledgements
We would like to express our gratitude to U. Feudel and M. Sahimi for their valuable and insightful discussions. M.R.R.T. would like to express his appreciation to the German Science Foundation (DFG) for supporting this work through the Mercator Guest Professorship award.
Funding
Open Access funding enabled and organized by Projekt DEAL.
Author information
Authors and Affiliations
Contributions
A.S., F.N., A.H. and H.M. developed the codes. H.M. wrote the code used to calculate the Lyapunov exponents. M.S. and Z.P. performed formal analysis and contributed to reviewing and editing the manuscript. M.A. contributed to writing and editing the Supplementary Information. M.R.R.T. conceived the idea, supervised the project. All authors contributed to the writing of the manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Peer review
Peer review information
Communications Physics thanks the anonymous reviewers for their contribution to the peer review of this work. A peer review file is available.
Additional information
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary information
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Shahrabi, A., Nikpanjeh, F., Hamounian, A. et al. Data-driven stability analysis of complex systems with higher-order interactions. Commun Phys 8, 239 (2025). https://doi.org/10.1038/s42005-025-02147-5
Received:
Accepted:
Published:
Version of record:
DOI: https://doi.org/10.1038/s42005-025-02147-5
This article is cited by
-
Exdiff: a modular and explainable framework combining network simulation and graph neural networks for diffusion modelling
Social Network Analysis and Mining (2025)






