This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Functional Control of Oscillator Networks

\nameTommaso Menara Department of Mechanical and Aerospace Engineering, University of California, San Diego, La Jolla, CA 92093, USA    \nameGiacomo Baggio Department of Information Engineering, University of Padova, Padova, 35131, Italy    \nameDanielle S. Bassett Department of Physics & Astronomy, Department of Bioengineering, Department of Electrical & Systems Engineering, Department of Neurology, Department of Psychiatry, University of Pennsylvania, Philadelphia, PA 19104, USA
The Santa Fe Institute, Santa Fe, NM 87506, USA
   \nameFabio Pasqualetti Department of Mechanical Engineering, University of California, Riverside, Riverside, CA 92521, USA fabiopas@engr.ucr.edu

Abstract

Oscillatory activity is ubiquitous in natural and engineered network systems. The interaction scheme underlying interdependent oscillatory components governs the emergence of network-wide patterns of synchrony that regulate and enable complex functions. Yet, understanding, and ultimately harnessing, the structure-function relationship in oscillator networks remains an outstanding challenge of modern science. Here, we address this challenge by presenting a principled method to prescribe exact and robust functional configurations from local network interactions through optimal tuning of the oscillators’ parameters. To quantify the behavioral synchrony between coupled oscillators, we introduce the notion of functional pattern, which encodes the pairwise relationships between the oscillators’ phases. Our procedure is computationally efficient and provably correct, accounts for constrained interaction types, and allows to concurrently assign multiple desired functional patterns. Further, we derive algebraic and graph-theoretic conditions to guarantee the feasibility and stability of target functional patterns. These conditions provide an interpretable mapping between the structural constraints and their functional implications in oscillator networks. As a proof of concept, we apply the proposed method to replicate empirically recorded functional relationships from cortical oscillations in a human brain, and to redistribute the active power flow in different models of electrical grids.

Introduction

Complex coordinated behavior of oscillatory components is linked to the function of many natural and technological network systems [17, 58, 15]. For instance, distinctive network-wide patterns of synchrony [72, 31, 71] determine the coordinated motion of orbiting particle systems [87], promote successful mating in populations of fireflies [12], regulate the active power flow in electrical grids [23], predict global climate change phenomena [79], dictate the structural development of mother-of-pearl in mollusks [9], and enable numerous cognitive functions in the brain [14, 26]. Since this rich repertoire of patterns emerges from the properties of the underlying interaction network [73], controlling the collective configuration of interdependent units holds a tremendous potential across science and engineering [75]. Despite its practical significance, a comprehensive method to enforce network-wide patterns of synchrony by intervening on the network’s structural parameters does not yet exist.

In this work, we develop a rigorous framework that allows us to optimally control the spatial organization of the network components and their oscillation frequencies to achieve desired patterns of synchrony. We abstract the rhythmic activity of a system as the output of a network of diffusively coupled oscillators [4, 22] with Kuramoto dynamics. This modeling choice is motivated by the rich dynamical repertoire and wide adoption of Kuramoto oscillators [2]. Specifically, we consider an undirected network 𝒢={𝒪,}\mathcal{G}=\{\mathcal{O},\mathcal{E}\} of nn oscillators with dynamics

θ˙i=ωi+j=1nAijsin(θjθi),\displaystyle\dot{\theta}_{i}=\omega_{i}+\sum_{j=1}^{n}A_{ij}\sin(\theta_{j}-\theta_{i}), (1)

where ωi\omega_{i}\in\mathbb{R} and θi𝕊1\theta_{i}\in\mathbb{S}^{1} are the frequency and phase of the ii-th oscillator, respectively, A=[Aij]A=[A_{ij}] is the weighted adjacency matrix of 𝒢\mathcal{G}, and 𝒪={1,,n}\mathcal{O}=\{1,\dots,n\} and 𝒪×𝒪\mathcal{E}\subseteq\mathcal{O}\times\mathcal{O} denote the oscillator and interconnection sets, respectively. In this work we consider the case where the network 𝒢\mathcal{G} admits both cooperative (i.e., Aij>0A_{ij}>0) and competitive (i.e., Aij<0A_{ij}<0) [34] interactions among the oscillators, as well as the more constrained case of purely cooperative interactions that arises in several real-word systems. For instance, negative interactions are not physically meaningful in networks of excitatory neurons, in power distribution networks (where the interconnection weight denotes conductance and susceptance of a transmission line), and in urban transportation networks (where interconnections denote the number of vehicles on a road with respect to its maximum capacity).

To quantify the pairwise functional relations between oscillatory units, and inspired by the work in Ref. [5], we define a local correlation metric that, compared to the classical Pearson correlation coefficient, does not depend on sampling time and is more convenient when dealing with periodic phase signals (see Supplementary Information). Given a pair of phase oscillators ii and jj with phase trajectories θi(t)\theta_{i}(t) and θj(t)\theta_{j}(t), we define the correlation coefficient

ρij=<cos(θj(t)θi(t))>t,\rho_{ij}=<\cos(\theta_{j}(t)-\theta_{i}(t))>_{t}, (2)

where <>t<\cdot>_{t} denotes the average over time. A functional pattern is formally defined as the symmetric matrix RR whose i,ji,j-th entry equals ρij\rho_{ij}. Importantly, a functional pattern explicitly encodes the pairwise, local, correlations across all of the oscillators, which are more informative than a global observable (e.g., the order parameter [4, 6]). It is easy to see that, if two oscillators ii and jj synchronize after a certain initial transient, ρij1\rho_{ij}\to 1 as time increases. If two oscillators ii and jj become phase-locked (i.e., their phase difference remains constant over time), then their correlation coefficient converges to some constant value with magnitude smaller than 1. If the phases of two oscillators ii and jj evolve independently, then their correlation value remains small over time. A few questions arise naturally, which will be answered in this paper. Are all functional patterns achievable? Which network configurations allow for the emergence of multiple target functional patterns? And, if a certain functional pattern can be achieved, is it robust to perturbations? Surprisingly, we reveal that controlling functional patterns can be cast as a convex optimization problem, whose solution can be characterized explicitly. Fig. 1 shows our framework and an example of control of functional pattern for a network with 77 oscillators. In the paper, we will validate our methods by replicating functional patterns from brain recordings in an empirically reconstructed neuronal network, and by controlling the active power distribution in multiple models of power grid.

Refer to caption
Fig 1: Network control to enforce a desired functional pattern from an abnormal or undesired one. The left panel contains a network of n=7n=7 oscillators (top left panel, line thickness is proportional to the coupling strength), whose vector of natural frequencies 𝝎{\boldsymbol{\omega}} has zero mean. The phase differences with respect to θ1\theta_{1} (i.e., θiθ1\theta_{i}-\theta_{1}) converge to [π8π8π6π6π32π3]\left[\frac{\pi}{8}~{}\frac{\pi}{8}~{}\frac{\pi}{6}~{}\frac{\pi}{6}~{}\frac{\pi}{3}~{}\frac{2\pi}{3}\right], as also illustrated in the phases’ evolution from random initial conditions (center left panel, color coded). The bottom left panel depicts the functional pattern RR corresponding to such phase differences over time. The right panel illustrates the same oscillator network after a selection of coupling strengths and natural frequencies have been tuned (in red, the structural parameters AA and 𝝎\boldsymbol{\omega} are adjusted to AcA_{\mathrm{c}} and 𝝎c{\boldsymbol{\omega}}_{\mathrm{c}}) to obtain the phase differences [2π3π3π6π6π8π8]\left[\frac{2\pi}{3}~{}\frac{\pi}{3}~{}\frac{\pi}{6}~{}\frac{\pi}{6}~{}\frac{\pi}{8}~{}\frac{\pi}{8}\right], which encode the desired functional pattern in the bottom right. In this example, we have computed the closest set (in the 1\ell_{1}-norm sense) of coupling strengths and natural frequencies to the original ones that enforce the emergence of the target pattern. Importantly, only a subset of the original parameters has been modified.

While synchronization phenomena in oscillator networks have been studied extensively (e.g., see [57, 74, 70, 52, 10]), the development of control methods to impose desired synchronous behaviors has only recently attracted the attention of the research community [55, 25, 28, 45]. Perhaps the work that is closest to our approach is Ref. [25], where the authors tailor interconnection weights and natural frequencies to achieve a specified level of phase cohesiveness in a network of Kuramoto oscillators. Our work improves considerably upon this latter study, whose goal is limited to prescribing an upper bound to the phase differences, by enabling the prescription of pairwise phase differences and by investigating the stability properties of different functional patterns. Taken together, existing results highlight the importance of controlling distinct configurations of synchrony, but remain mainly focused on the control of “macroscopic” observables of synchrony (e.g., the average synchronization level of all the oscillators). In contrast, our control method prescribes desired pairwise levels of correlation across all of the oscillators, thus enabling a precise “microscopic” description of functional interactions.

Analytical results

Feasible functional patterns in positive networks

A functional pattern is an n×nn\times n matrix whose entries are the time-averaged cosine of the differences of the oscillator phases (see equation (2)). When the oscillators reach an equilibrium, the differences of the oscillator phases become constant, and the network evolves in a phase-locked configuration. In this case, the functional pattern of the network also becomes constant, and is uniquely characterized by the phase differences at the equilibrium configuration. In this work we study functional patterns for the special case of phase-locked oscillators and, given the equivalence between a desired functional pattern and a desired set of phase differences at equilibrium, convert the problem of generating a functional pattern into the problem of ensuring a desired phase-locked configuration. We recall that, while convenient for the analysis, phase-locked configurations play a crucial role in the functioning of many natural and man-made networks [38, 81, 39].

For the undirected network 𝒢=(𝒪,)\mathcal{G}=(\mathcal{O},\mathcal{E}), let xij=θjθix_{ij}=\theta_{j}-\theta_{i} be the difference of the phases of the oscillators ii and jj, and let 𝒙||\boldsymbol{x}\in\mathbb{R}^{|\mathcal{E}|} be the vector of all phase differences with (i,j)(i,j)\in\mathcal{E} and i<ji<j. The network dynamics (1) can be conveniently rewritten in vector form as (see Methods)

BD(𝒙)𝜹=[ω1ωn]𝖳𝜽˙,\displaystyle BD({\boldsymbol{x}})\boldsymbol{\delta}=[\omega_{1}\;~{}\cdots\;~{}\omega_{n}]^{\mathsf{T}}-\dot{\boldsymbol{\theta}}, (3)

where Bn×||B\in\mathbb{R}^{n\times|\mathcal{E}|} is the (oriented) incidence matrix of the network 𝒢\mathcal{G}, D(𝒙)||×||D({\boldsymbol{x}})\in\mathbb{R}^{|\mathcal{E}|\times|\mathcal{E}|} is a diagonal matrix of the sine functions in equation (1), and 𝜹||\boldsymbol{\delta}\in\mathbb{R}^{|\mathcal{E}|} is a vector collecting all the weights AijA_{ij} with i<ji<j. Because we focus on phase-locked trajectories, all oscillators evolve with the same frequency and the vector 𝜽˙\dot{\boldsymbol{\theta}} satisfies 𝜽˙=ωmean1\dot{\boldsymbol{\theta}}=\omega_{\text{mean}}\textbf{1}, where ωmean=(1ni=1nωi)\omega_{\text{mean}}=\left(\frac{1}{n}\sum_{i=1}^{n}\omega_{i}\right) is the average of the natural frequencies of the oscillators. Further, since 𝒢\mathcal{G} contains only nn oscillators, any phase difference xijx_{ij} can always be written as a function of n1n-1 independent differences; for instance, {x12,x23,,xn1,n}\{x_{12},x_{23},\dots,x_{n-1,n}\}. In fact, for any pair of oscillators ii and jj with i<ji<j, it holds xij=k=ij1xk,k+1x_{ij}=\sum_{k=i}^{j-1}x_{k,k+1}. This implies that the vector of all phase differences in equation (3), and in fact any n×nn\times n functional pattern, has only n1n-1 degrees of freedom and can be uniquely specified with a set of n1n-1 independent differences 𝒙desired\boldsymbol{x}_{\text{desired}} (see Methods). Following this reasoning and to avoid cluttered notation, let 𝝎=[ω1ωmeanωnωmean]𝖳\boldsymbol{\omega}=[\omega_{1}-\omega_{\text{mean}}\;~{}\cdots\;~{}\omega_{n}-\omega_{\text{mean}}]^{\mathsf{T}}, and notice that the problem of enforcing a desired functional pattern simplifies to (i) converting the desired functional pattern to the corresponding phase differences 𝒙desired\boldsymbol{x}_{\text{desired}}, and (ii) computing the network weights 𝜹\boldsymbol{\delta} to satisfy the following equation:

BD(𝒙)𝜹=𝝎,BD({\boldsymbol{x}})\boldsymbol{\delta}=\boldsymbol{\omega}, (4)

where we note that the vector 𝝎\boldsymbol{\omega} has zero mean and that, with a slight abuse of notation, D(𝒙)D({\boldsymbol{x}}) denotes the |||\mathcal{E}|-dimensional diagonal matrix of the sine of the phase differences uniquely defined by the (n1n-1)-dimensional vector 𝒙desired\boldsymbol{x}_{\text{desired}}.

We begin by studying the problem of attaining a desired functional pattern using only nonnegative weights. With the above notation, for a desired functional pattern corresponding to the phase differences 𝒙\boldsymbol{x}, this problem reads as

find\displaystyle\mathrm{find} 𝜹\displaystyle\boldsymbol{\delta} (5)
subjectto\displaystyle\mathrm{subject~{}to} BD(𝒙)𝜹=𝝎,\displaystyle BD(\boldsymbol{x})\boldsymbol{\delta}=\boldsymbol{\omega}, (5a)
and 𝜹0.\displaystyle\boldsymbol{\delta}\geq 0. (5b)

It should be noticed that the feasibility of the optimization problem (5) depends on the sign of the entries of the diagonal matrix D(𝒙)D(\boldsymbol{x}), but is independent of their magnitude. To see this, notice that

D(𝒙)=sign(D(𝒙))|D(𝒙)|,\displaystyle D(\boldsymbol{x})=\text{sign}(D(\boldsymbol{x}))|D(\boldsymbol{x})|,

where the sign()\mathrm{sign}(\cdot) and absolute value |||\cdot| operators are applied element-wise. Then, Problem (5) is feasible if and only if there exists a nonnegative solution to

Bsign(D(𝒙))B¯|D(𝒙)|𝜹𝜹¯=𝝎.\displaystyle\underbrace{B\text{sign}(D(\boldsymbol{x}))}_{\bar{B}}\underbrace{|D(\boldsymbol{x})|\boldsymbol{\delta}}_{\bar{\boldsymbol{\delta}}}=\boldsymbol{\omega}.

The feasibility of the latter equation, in turn, depends on the projections of the natural frequencies 𝝎\boldsymbol{\omega} on the columns of B¯\bar{B}: a nonnegative solution exists if 𝝎\boldsymbol{\omega} belongs to the cone generated by the columns of B¯\bar{B}. This also implies that, if a network admits a desired functional pattern 𝒙\boldsymbol{x} then, by tuning its weights, the same network can generate any other functional pattern 𝒙new{\boldsymbol{x}}_{\text{new}} such that sign(D(𝒙new))=sign(D(𝒙))\text{sign}(D({\boldsymbol{x}}_{\text{new}}))=\text{sign}(D({\boldsymbol{x}})). Thus, by properly tuning its weights, a network can generally generate a continuum of functional patterns determined uniquely by signs of its incidence matrix and the oscillators natural frequencies. This property is illustrated in Fig. 2 for the case of a line network.

Refer to caption
Fig 2: Mapping between desired phase differences and interconnection weights. a A line network of n=4n=4 nodes and its parameters. The desired phase differences are shown in red. b Left panel: space of the phase differences; right panel: space of the interconnection weights. The pattern 𝒙{\boldsymbol{x}} is illustrated in red in the left panel, and the network weights that achieve such a pattern are represented in red in the right panel. For fixed natural frequencies 𝝎\boldsymbol{\omega}, the green parallelepiped on the left represents the continuum of functional patterns within 0.20.2 radians from 𝒙{\boldsymbol{x}} which can be generated by the positive interconnection weights in the green parallelepiped on the right.

A sufficient condition for the feasibility of Problem (5) is as follows:

There exists 𝛅0\boldsymbol{\delta}\geq 0 such that BD(𝐱)𝛅=𝛚BD(\boldsymbol{x})\boldsymbol{\delta}={\boldsymbol{\omega}} if there exists a set 𝒮\mathcal{S} satisfying:

  1. (i.a)

    Dii(𝐱)Djj(𝐱)B:,i𝖳B:,j0D_{ii}(\boldsymbol{x})D_{jj}(\boldsymbol{x})B_{:,i}^{\mathsf{T}}B_{:,j}\leq 0 for all i,j𝒮i,j\in\mathcal{S} with iji\neq j and Dii,Djj0D_{ii},D_{jj}\neq 0;

  2. (i.b)

    𝛚𝖳B:,iDii(𝐱)>0{\boldsymbol{\omega}}^{\mathsf{T}}B_{:,i}D_{ii}(\boldsymbol{x})>0 for all i𝒮i\in\mathcal{S};

  3. (i.c)

    𝛚Im(B:,𝒮){\boldsymbol{\omega}}\in\mathrm{Im}(B_{:,\mathcal{S}}).

Equivalently, the above conditions ensure that 𝝎{\boldsymbol{\omega}} is contained within the cone generated by the columns of B¯:,𝒮\bar{B}_{:,\mathcal{S}} (see Fig. 3a for a self-contained example). To see this, rewrite the pattern assignment problem BD(𝒙)𝜹=𝝎BD({\boldsymbol{x}})\boldsymbol{\delta}={\boldsymbol{\omega}} as

BD(𝒙)𝜹=B:,𝒮D𝒮,𝒮(𝒙)𝜹𝒮+B:,𝒮~D𝒮~,𝒮~(𝒙)𝜹𝒮~=𝝎,\displaystyle BD({\boldsymbol{x}})\boldsymbol{\delta}=B_{:,\mathcal{S}}D_{\mathcal{S},\mathcal{S}}({\boldsymbol{x}})\boldsymbol{\delta}_{\mathcal{S}}+B_{:,\tilde{\mathcal{S}}}D_{\tilde{\mathcal{S}},\tilde{\mathcal{S}}}({\boldsymbol{x}})\boldsymbol{\delta}_{\tilde{\mathcal{S}}}=\boldsymbol{\omega}, (6)

where the subscripts 𝒮\mathcal{S} and 𝒮~\tilde{\mathcal{S}} denote the entries corresponding to the set 𝒮\mathcal{S} and the remaining ones, respectively. If the vectors B:,iB_{:,i}, i𝒮i\in{\mathcal{S}}, are linearly independent, condition (i.a) implies that D𝒮,𝒮B:,𝒮𝖳B:,𝒮D𝒮,𝒮D_{\mathcal{S},\mathcal{S}}B_{:,\mathcal{S}}^{\mathsf{T}}B_{:,{\mathcal{S}}}D_{\mathcal{S},\mathcal{S}} is an M-matrix; that is, a matrix which has nonpositive off-diagonal elements and positive principal minors [36]. Otherwise, the argument holds verbatim by replacing 𝒮\mathcal{S} with any subset 𝒮ind𝒮\mathcal{S}_{\text{ind}}\subset\mathcal{S} such that the vectors B:,iB_{:,i}, i𝒮indi\in{\mathcal{S}_{\text{ind}}}, are linearly independent. Condition (i.c) guarantees the existence of a solution to B:,𝒮D𝒮,𝒮𝜹𝒮=𝝎B_{:,\mathcal{S}}D_{\mathcal{S},\mathcal{S}}\boldsymbol{\delta}_{\mathcal{S}}=\boldsymbol{\omega}. A particular solution to the latter equation is

𝜹𝒮=(B:,𝒮D𝒮,𝒮(𝒙))𝝎=(D𝒮,𝒮(𝒙)B:,𝒮𝖳B:,𝒮D𝒮,𝒮(𝒙))1D𝒮,𝒮(𝒙)B𝒮,𝒮𝖳𝝎>0\boldsymbol{\delta}_{\mathcal{S}}=\left(B_{:,\mathcal{S}}D_{\mathcal{S},\mathcal{S}}({\boldsymbol{x}})\right)^{\dagger}\boldsymbol{\omega}=(D_{\mathcal{S},\mathcal{S}}({\boldsymbol{x}})B_{:,\mathcal{S}}^{\mathsf{T}}B_{:,\mathcal{S}}D_{\mathcal{S},\mathcal{S}}({\boldsymbol{x}}))^{-1}D_{\mathcal{S},\mathcal{S}}({\boldsymbol{x}})B_{\mathcal{S},\mathcal{S}}^{\mathsf{T}}\boldsymbol{\omega}>0

where ()(\cdot)^{\dagger} denotes the Moore-Penrose pseudo-inverse of a matrix. The positivity of 𝜹𝒮\boldsymbol{\delta}_{\mathcal{S}} follows from condition (i.b) and the fact that the inverse of an M-matrix is element-wise nonnegative [36]. We conclude that a solution to equation (6) is given by 𝜹𝒮=(B:,𝒮D𝒮,𝒮(𝒙))𝝎>0\boldsymbol{\delta}_{\mathcal{S}}=\left(B_{:,\mathcal{S}}D_{\mathcal{S},\mathcal{S}}({\boldsymbol{x}})\right)^{\dagger}\boldsymbol{\omega}>0 and 𝜹𝒮~=𝟎\boldsymbol{\delta}_{\tilde{\mathcal{S}}}=\boldsymbol{0}.

Refer to caption
Fig 3: Algebraic and graph-theoretic conditions for the existence of positive weights that attain a desired functional pattern. a The left side illustrates a simple network of 33 oscillators with adjacency matrix B¯\bar{B} and vector of natural frequencies 𝝎{\boldsymbol{\omega}}. The right side illustrates the cone generated by the columns of B¯\bar{B}. In this example, 𝒮={1,2}\mathcal{S}=\{1,2\} satisfies the conditions for the existence of 𝜹0\boldsymbol{\delta}\geq 0 in equation (5), as 𝝎{\boldsymbol{\omega}} is contained within the cone generated by the columns B¯:,𝒮\bar{B}_{:,\mathcal{S}}. b The (directed) Hamiltonian path described by the columns of B¯:,\bar{B}_{:,\mathcal{H}}, with ={1,2}\mathcal{H}=\{1,2\}, in the network of panel a. c The existence of such an Hamiltonian path, together with a positive projection of 𝝎{\boldsymbol{\omega}} onto B¯:,\bar{B}_{:,\mathcal{H}}, also ensure that there exists a strictly positive 𝜹>0\boldsymbol{\delta}>0 solution to BD(𝒙)𝜹=𝝎BD({\boldsymbol{x}})\boldsymbol{\delta}={\boldsymbol{\omega}}. In particular, for any choice of x12,x23(0,π)x_{12},x_{23}\in{(0,~{}\pi)}, equation (4) reveals that if 0<A13<0.5/sin(x12+x23)0<A_{13}<0.5/\sin(x_{12}+x_{23}), then there exist strictly positive weights A12>0A_{12}>0 and A23>0A_{23}>0 such that 𝜹>0\boldsymbol{\delta}>0.

To avoid disconnecting edges or to maintain a fixed network topology, a functional pattern should be realized in Problem (5) using a strictly positive weight vector (that is, 𝜹>0\boldsymbol{\delta}>0 rather than 𝜹0\boldsymbol{\delta}\geq 0). While, in general, this is a considerably harder problem, a sufficient condition for the existence of a strictly positive solution 𝜹>0\boldsymbol{\delta}>0 is that the network with incidence matrix B¯\bar{B} contains an Hamiltonian path, that is, a directed path that visits all the oscillators exactly once (Fig. 3b shows a network containing an Hamiltonian path). Namely,

There exists a strictly positive solution 𝛅>0\boldsymbol{\delta}>0 to BD(𝐱)𝛅=𝛚BD({\boldsymbol{x}}){\boldsymbol{\delta}}=\boldsymbol{\omega} if

  • (ii.a)

    the network with incidence matrix B¯\bar{B} contains a directed Hamiltonian path \mathcal{H};

  • (ii.b)

    𝛚𝖳B:,iDii(𝐱)>0{\boldsymbol{\omega}}^{\mathsf{T}}B_{:,i}D_{ii}(\boldsymbol{x})>0 for all ii\in\mathcal{H};

The incidence matrix B¯:,\bar{B}_{:,\mathcal{H}} of a directed Hamiltonian path \mathcal{H} has two key properties. First, it comprises n1n-1 linearly independent columns, since the path covers all the vertices and contains no cycles. This guarantees that 𝝎Im(B:,)\boldsymbol{\omega}\in\mathrm{Im}(B_{:,\mathcal{H}}). Second, the columns of the incidence matrix B¯:,\bar{B}_{:,\mathcal{H}} satisfy B¯:,i𝖳B¯:,i=2\bar{B}_{:,i}^{\mathsf{T}}\bar{B}_{:,i}=2 and B¯:,i𝖳B¯:,j{0,1}\bar{B}_{:,i}^{\mathsf{T}}\bar{B}_{:,j}\in\{0,-1\} for all i,ji,j\in\mathcal{H}, iji\neq j. Then, letting the set 𝒮\mathcal{S} in the result above identify the columns of the Hamiltonian path, conditions (ii.a) and (ii.b) imply (i.a)-(i.c), thus ensuring the existence of a nonnegative set of weights 𝜹\boldsymbol{\delta} that solves the pattern assignment problem BD(𝒙)𝜹=𝝎BD({\boldsymbol{x}})\boldsymbol{\delta}={\boldsymbol{\omega}}. Furthermore, by rewriting the pattern assignment problem as in equation (6), the following vector of interconnection weights solves such equation (see Methods):

𝜹\displaystyle\boldsymbol{\delta}_{\mathcal{H}} =(B:,D,(𝒙))(𝝎B:,~D~,~(𝒙)𝜹~).\displaystyle=\left(B_{:,\mathcal{H}}D_{\mathcal{H},\mathcal{H}}({\boldsymbol{x}})\right)^{\dagger}\left(\boldsymbol{\omega}-B_{:,\tilde{\mathcal{H}}}D_{\tilde{\mathcal{H}},\tilde{\mathcal{H}}}({\boldsymbol{x}})\boldsymbol{\delta}_{\tilde{\mathcal{H}}}\right).

Because B¯:,=B:,D,\bar{B}_{:,\mathcal{H}}=B_{:,\mathcal{H}}D_{\mathcal{H},\mathcal{H}} defines an Hamiltonian path and because of (ii.b), the vector (B:,D,(𝒙))𝝎\left(B_{:,\mathcal{H}}D_{\mathcal{H},\mathcal{H}}({\boldsymbol{x}})\right)^{\dagger}\boldsymbol{\omega} contains only strictly positive entries. Thus, for any sufficiently small and positive vector 𝜹~\boldsymbol{\delta}_{\tilde{\mathcal{H}}}, the weights 𝜹\boldsymbol{\delta}_{{\mathcal{H}}} are also strictly positive, ultimately proving the existence of a strictly positive solution to the pattern assignment problem (see Methods). Fig. 3c illustrates a self-contained example.

Taken together, the results presented in this section reveal that the interplay between the network structure and the oscillators’ natural frequencies dictates whether a desired functional pattern is achievable under the constraint of nonnegative (or even strictly positive) interconnections. First, dense positive networks with a large number of edges are more likely to generate a desired functional pattern, since their incidence matrix features a larger number of candidate vectors to satisfy conditions (i.a)-(i.c). Second, densely connected networks are also more likely to contain an Hamiltonian path, thus promoting also strictly positive network designs. Third, after an appropriate relabeling of the oscillators such that any interconnection from ii to jj in the Hamiltonian path satisfies i<ji<j, condition (ii.b) is equivalent to requiring that ωi<ωj\omega_{i}<\omega_{j}. That is, the feasibility of a functional pattern is guaranteed when the natural frequencies increase monotonically with the ordering identified by the Hamiltonian path. This also implies, for instance, that sparsely connected positive networks, and not only dense ones, can attain a large variety of functional patterns. An example is a connected line network with increasing natural frequencies, which can generate, among others, any functional pattern defined by phase differences that are smaller than π2\frac{\pi}{2} (trivially, when the phase differences are smaller than π2\frac{\pi}{2} and the natural frequencies are increasing, a line network contains an Hamiltonian path and the vector of natural frequencies has positive projections onto the columns of the incidence matrix). Fig. 2a contains an example of such a network.

Compatibility of multiple functional patterns

A single choice of the interconnections weights can allow for multiple desired functional patterns, as long as they are compatible with the network dynamics in equation (1). In this section, we provide a characterization of compatible functional patterns in a given network, and derive conditions for the existence of a set of interconnection weights that achieve multiple desired functional patterns. Being able to concurrently assign multiple functional patterns is crucial, for instance, to the investigation and design of memory systems [68], where different patterns of activity correspond to distinct memories. Furthermore, our results complement previous work on the search of equilibria in oscillator networks [44].

To find a set of functional patterns that exists concurrently in a given network with fixed interconnection weights 𝜹\boldsymbol{\delta}, we exploit the algebraic core of equation (4) and show that the kernel of the incidence matrix BB uniquely determines the equilibria of the network. In fact, for a given network (i.e., 𝜹\boldsymbol{\delta} with nonzero components) all compatible equilibria 𝒙(i){\boldsymbol{x}}^{(i)}, i{1,,}i\in\{1,\dots,\ell\}, must satisfy

D(𝒙(i))𝜹=B𝝎+ker(B).D(\boldsymbol{x}^{(i)})\boldsymbol{\delta}=B^{\dagger}\boldsymbol{\omega}+\mathrm{ker}(B). (7)

From equation (7), we can see that the sine vector of all compatible equilibria must belong to a specific affine subspace of ||\mathbb{R}^{|\mathcal{E}|}:

sin(𝒙(i))diag(𝜹)1(B𝝎+ker(B)).\sin(\boldsymbol{x}^{(i)})\in\mathrm{diag}(\boldsymbol{\delta})^{-1}\left(B^{\dagger}\boldsymbol{\omega}+\mathrm{ker}(B)\right). (8)

Rewriting equation (4) in the above form connects the existence of distinct functional patterns with ker(B)\mathrm{ker}(B), the latter featuring a number of well known properties. For instance, it holds that dim(ker(B))=||n+c\mathrm{dim}(\mathrm{ker}(B))=|\mathcal{E}|-n+c, where cc is the number of connected components in a network, and that ker(B)\mathrm{ker}(B) coincides with the subspace spanned by the signed path vectors of all undirected cycles in the network [30]. Notice also that, after a suitable reordering of the phase differences in 𝒙\boldsymbol{x}, we can write sin(𝒙)=[sin(𝒙desired𝖳)sin(𝒙dep𝖳)]𝖳\sin({\boldsymbol{x}})=[\sin(\boldsymbol{x}_{\mathrm{desired}}^{\mathsf{T}})~{}\sin(\boldsymbol{x}_{\mathrm{dep}}^{\mathsf{T}})]^{\mathsf{T}}, where 𝒙dep\boldsymbol{x}_{\mathrm{dep}} denotes the phase differences dependent on n1n-1 desired phase differences 𝒙desired\boldsymbol{x}_{\mathrm{desired}}. Thus, all the 𝒙desired\boldsymbol{x}_{\mathrm{desired}} for which sin(𝒙dep)\sin(\boldsymbol{x}_{\mathrm{dep}}) intersects the affine space described by diag(𝜹)1(B𝝎+ker(B))\mathrm{diag}(\boldsymbol{\delta})^{-1}\left(B^{\dagger}\boldsymbol{\omega}+\mathrm{ker}(B)\right) identify compatible functional patterns.

To showcase how the intimate relationship between the network structure and the kernel of its incidence matrix enables the characterization of which (and how many) compatible patterns coexist, we consider three essential network topologies: trees, cycles, and complete graphs. For the sake of simplicity, we let 𝜹=𝟏\boldsymbol{\delta}=\boldsymbol{1} and 𝝎=𝟎\boldsymbol{\omega}=\boldsymbol{0}, so that equation (8) holds whenever sin(𝒙(i))ker(B)\sin(\boldsymbol{x}^{(i)})\in\mathrm{ker}(B). In networks with tree topologies it holds ker(B)=𝟎\mathrm{ker}(B)=\boldsymbol{0}, and sin(𝒙(i))=𝟎\sin(\boldsymbol{x}^{(i)})=\boldsymbol{0} is satisfied by 2n12^{n-1} patterns of the form xjk(i)=0,πx^{(i)}_{jk}=0,\pi, for all (j,k)(j,k)\in\mathcal{E}. Consider now cycle networks, where ker(B)=span𝟏\mathrm{ker}(B)=\mathrm{span}~{}\boldsymbol{1}. For any cycle of n3n\geq 3 oscillators, two families of patterns are straightforward to derive. First, there are 2n12^{n-1} patterns of the form 𝒙k,k+1(i)=0,π\boldsymbol{x}^{(i)}_{k,k+1}=0,\pi, with k=1,,n1k=1,\dots,n-1, and xn1(i)=k=1n1xk,k+1(i)x^{(i)}_{n1}=-\sum_{k=1}^{n-1}x^{(i)}_{k,k+1}. Second, there are n1n-1 splay states [22], where the oscillators’ phases evenly span the unitary circle, with xjk(i)=2πmnx^{(i)}_{jk}=\frac{2\pi m}{n}, m=1,,n1m=1,\dots,n-1, (j,k)(j,k)\in\mathcal{E}. Fig. 4 illustrates the compatible functional patterns satisfying equation (8) in a positive network of three fully synchronizing oscillators.

Refer to caption
Fig 4: The intersection of an affine space with sin(xdep)\sin(\boldsymbol{x}_{\mathrm{dep}}) determines the compatible functional patterns of 3 identical oscillators. Consider a fully connected network of n=3n=3 identical oscillators with zero natural frequency and 𝜹=𝟏\boldsymbol{\delta}=\boldsymbol{1}. It is well known that 𝒙(1)=[00]𝖳{\boldsymbol{x}}^{(1)}=[0~{}0]^{\mathsf{T}}, 𝒙(2)=[π0]𝖳{\boldsymbol{x}}^{(2)}=[\pi~{}0]^{\mathsf{T}}, 𝒙(3)=[0π]𝖳{\boldsymbol{x}}^{(3)}=[0~{}\pi]^{\mathsf{T}}, 𝒙(4)=[ππ]𝖳{\boldsymbol{x}}^{(4)}=[\pi~{}\pi]^{\mathsf{T}} are phase difference equilibria. Furthermore, because sin(θ)=sin(πθ)\sin(\theta)=\sin(\pi-\theta), this figure illustrates sin(x13)\sin(x_{13}) as a function of x12x_{12} and x23x_{23} in four different panels: sin(x12+x23)\sin(x_{12}+x_{23}) (top left), sin(πx12+x23)\sin(\pi-x_{12}+x_{23}) (top right), sin(x12+πx23)\sin(x_{12}+\pi-x_{23}) (bottom left), and sin(x12x23)\sin(-x_{12}-x_{23}) (bottom right). The fourth panel reveals that the two functional patterns compatible with 𝒙(j){\boldsymbol{x}}^{(j)}, j{1,,4}j\in\{1,\dots,4\}, correspond to 𝒙(5)=[2π/32π/3]𝖳{\boldsymbol{x}}^{(5)}=[2\pi/3~{}2\pi/3]^{\mathsf{T}} and 𝒙(6)=[2π/32π/3]𝖳{\boldsymbol{x}}^{(6)}=[-2\pi/3~{}-2\pi/3]^{\mathsf{T}} (in red).

In general, however, cycle networks of identical oscillators admit infinite coexisting patterns. For instance, Fig. 5 shows how we can parameterize infinite equilibria with a scalar γ𝕊1\gamma\in\mathbb{S}^{1} in a cycle of n=4n=4 oscillators. Finally, as complete graphs are equivalent to a composition of cycles, they also admit infinite compatible patterns that can be parameterized akin to what occurs in a simple cycle (see Supplementary Figure 11).

We now turn our attention to finding the interconnection weights that simultaneously enable a collection of 1\ell\geq 1 desired functional patterns {𝒙(i)}i=1\{{\boldsymbol{x}}^{(i)}\}_{i=1}^{\ell}. We first notice that equation (7) reveals that to achieve a desired functional pattern 𝒙(i){\boldsymbol{x}}^{(i)} with components not equal to kπk\pi, kk\in\mathbb{Z}, the network weights 𝜹\boldsymbol{\delta} must belong to an |||\mathcal{E}|-dimensional affine subspace of ||\mathbb{R}^{|\mathcal{E}|}:

𝜹D(𝒙(i))1(B𝝎+ker(B)),i=1,,.\boldsymbol{\delta}\in D(\boldsymbol{x}^{(i)})^{-1}\left(B^{\dagger}\boldsymbol{\omega}+\mathrm{ker}(B)\right),\quad\forall i=1,\dots,\ell. (9)

Let Γi=D(𝒙(i))1(B𝝎+ker(B))\Gamma_{i}=D(\boldsymbol{x}^{(i)})^{-1}\left(B^{\dagger}\boldsymbol{\omega}+\mathrm{ker}(B)\right). Then, to concurrently realize a collection of patterns {𝒙(i)}i=1\{{\boldsymbol{x}}^{(i)}\}_{i=1}^{\ell}, a solution to equations (9) exists if and only if i=1Γi\bigcap_{i=1}^{\ell}\Gamma_{i}\neq\emptyset. It is worth noting that, whenever the latter intersection coincides with a singleton, then there exists a single choice of network weights that realizes {𝒙(i)}i=1\{{\boldsymbol{x}}^{(i)}\}_{i=1}^{\ell}. However, if i=1Γi\bigcap_{i=1}^{\ell}\Gamma_{i} corresponds to a subspace, then infinite networks can realize the desired collection of functional patterns. We conclude by emphasizing that a positive 𝜹\boldsymbol{\delta} that achieves the desired patterns exists if and only if (i=1Γi)0||\left(\bigcap_{i=1}^{\ell}\Gamma_{i}\right)\cap\mathbb{R}_{\geq 0}^{|\mathcal{E}|}\neq\emptyset. That is, if the network weights belong to the nonempty intersection of the \ell affine subspaces with the positive orthant.

Refer to caption
Fig 5: A homogeneous cycle network admits infinite compatible functional patterns. Since ker(B)=span𝟏\mathrm{ker}(B)=\mathrm{span}~{}\boldsymbol{1}, the cycle network admits infinite compatible equilibria, which can be parameterized by γ𝕊1\gamma\in\mathbb{S}^{1} as 𝒙(i)(γ)=[π2γ,π2+γ,π2γ,π2+γ]𝖳\boldsymbol{x}^{(i)}(\gamma)=[\frac{\pi}{2}-\gamma,~{}\frac{\pi}{2}+\gamma,~{}\frac{\pi}{2}-\gamma,~{}\frac{\pi}{2}+\gamma]^{\mathsf{T}}. Any arbitrarily small variation of γ\gamma yields sin(𝒙(i)(γ))ker(B)\sin(\boldsymbol{x}^{(i)}(\gamma))\in\mathrm{ker}(B). The right panel illustrates the patterns associated with 𝒙(i)(γ)\boldsymbol{x}^{(i)}(\gamma), i=1,,5i=1,\dots,5 for increments of γ\gamma of 0.2 radians.

Stability of functional patterns

A functional pattern is stable when small deviations of the oscillators phases from the desired configuration lead to vanishing functional perturbations. Stability is a desired property since it guarantees that the desired functional pattern is robust against perturbations to the oscillators dynamics. To study the stability of a functional pattern, we analyze the Jacobian of the Kuramoto dynamics at the desired functional configuration, which reads as [22]

J=𝜽𝜽˙=Bdiag({Aijcos(xij)}(i,j))B𝖳(𝒙),J=\frac{\partial}{\partial\boldsymbol{\theta}}\dot{\boldsymbol{\theta}}=-\underbrace{B\operatorname{diag}\left(\{A_{ij}\cos({x_{ij}})\}_{(i,j)\in\mathcal{E}}\right)B^{\mathsf{T}}}_{\mathcal{L}({\boldsymbol{x}})}, (10)

where (𝒙)\mathcal{L}({\boldsymbol{x}}) denotes the Laplacian matrix of the network with weights scaled by the cosines of the phase differences (the weight between nodes ii and jj is Aijcos(θjθi)A_{ij}\cos(\theta_{j}-\theta_{i})). The functional pattern 𝒙{\boldsymbol{x}} is stable when the eigenvalues of the above Jacobian matrix have negative real parts. For instance, if all phase differences are strictly smaller than π2\frac{\pi}{2} (that is, the infinity-norm of 𝒙\boldsymbol{x} satisfies 𝒙<π2\|{\boldsymbol{x}}\|_{\infty}<\frac{\pi}{2}), then the Jacobian in equation (10) is known to be stable [22]. In the case that both cooperative and competitive interactions are allowed, we can ensure stability of a desired pattern by specifying the network weights in 𝜹\boldsymbol{\delta} such that Aij>0A_{ij}>0 if |xij|<π2|x_{ij}|<\frac{\pi}{2} and Aij<0A_{ij}<0 otherwise, so that the matrix \mathcal{L} becomes the Laplacian of a positive network (see Methods). Furthermore, we observe that in the particular case where some differences |xij|=π2|x_{ij}|=\frac{\pi}{2}, the network may become disconnected since cos(xij)=0\cos(x_{ij})=0. Because the Laplacian of a disconnected network has multiple eigenvalues at zero, marginal stability may occur, and phase trajectories may not converge to the desired pattern.

When some phase differences are larger than π2\frac{\pi}{2} and the network allows only for nonnegative weights, then stability of a functional pattern is more difficult to assess because the Jacobian matrix becomes a signed Laplacian [86]. The off-diagonal entries of a signed Laplacian satisfy ij>0\mathcal{L}_{ij}>0 whenever |xij|>π2|x_{ij}|>\frac{\pi}{2}, thus possibly changing the sign of its diagonal entries ii=jAijcos(xij)\mathcal{L}_{ii}=\sum_{j}A_{ij}\cos(x_{ij}) and violating the conditions for the use of classic results from algebraic graph theory for the stability of Laplacian matrices. To derive a condition for the instability of the Jacobian in equation (10), we exploit the notion of structural balance. We say that the cosine-scaled network with Laplacian matrix \mathcal{L} is structurally balanced if and only if its oscillators can be partitioned into two sets, 𝒪1\mathcal{O}_{1} and 𝒪2\mathcal{O}_{2}, such that all (i,j)(i,j)\in\mathcal{E} with Aijcos(xij)<0A_{ij}\cos(x_{ij})<0 connect oscillators in 𝒪1\mathcal{O}_{1} to oscillators in 𝒪2\mathcal{O}_{2}, and all (i,j)(i,j)\in\mathcal{E} with Aijcos(xij)>0A_{ij}\cos(x_{ij})>0 connect oscillators within 𝒪i\mathcal{O}_{i}, i{1,2}i\in\{1,2\}. If a network is structurally balanced, then its Laplacian has mixed eigenvalues [86]. Therefore, we conclude the following:

If the functional pattern 𝐱{\boldsymbol{x}} yields a structurally balanced cosine-scaled network, then 𝐱{\boldsymbol{x}} is unstable.

The above condition allows us to immediately assess the instability of functional patterns for the special cases of line and cycle networks. In fact, for a line network with positive weights, 𝒙\boldsymbol{x} is unstable whenever |xij|>π2|x_{ij}|>\frac{\pi}{2} for any i,ji,j. Instead, for a cycle network with positive weights, the pattern 𝒙\boldsymbol{x} can be stable only if it contains at most one phase difference π2<|xij|<γ\frac{\pi}{2}<|x_{ij}|<\gamma, where γ1.789776\gamma\approx 1.789776 solves γtan(γ)=2π\gamma-\tan(\gamma)=2\pi (see Supplementary Information). In the next section, we propose a heuristic procedure to correct the interconnection weights in positive networks to promote stability of a functional pattern.

Optimal interventions for desired functional patterns

Armed with conditions to guarantee the existence of positive interconnections that enable a desired functional pattern, we now show that the problem of adjusting the network weights to generate a desired functional pattern can be cast as a convex optimization problem. Formally, for a desired functional pattern 𝒙{\boldsymbol{x}} and network weights 𝜹\boldsymbol{\delta}, we seek to solve

min𝜶\displaystyle\min_{\boldsymbol{\alpha}} 𝜶2\displaystyle\left\|\boldsymbol{\alpha}\right\|_{2} (11)
subjectto\displaystyle\mathrm{subject~{}to} BD(𝒙)(𝜹+𝜶)=𝝎,\displaystyle BD({\boldsymbol{x}})(\boldsymbol{\delta}+\boldsymbol{\alpha})={\boldsymbol{\omega}}, (11a)
and (𝜹+𝜶)0,\displaystyle(\boldsymbol{\delta}+\boldsymbol{\alpha})\geq 0, (11b)

where 𝜶||\boldsymbol{\alpha}\in\mathbb{R}^{|\mathcal{E}|} are the controllable modifications of the network weights, and 2\|\cdot\|_{2} denotes the 2\ell^{2}-norm. Fig. 6a illustrates the control of a functional pattern in a line network of n=4n=4 oscillators.

Refer to caption
Fig 6: Optimal interventions for desired functional patterns. a For the line network in Fig. 2a, we solve Problem (11) to assign the desired pattern 𝒙desired=[4π5π3π10]𝖳\boldsymbol{x}_{\text{desired}}=[\frac{4\pi}{5}~{}\frac{\pi}{3}~{}\frac{\pi}{10}]^{\mathsf{T}}. The starting pattern 𝒙original=[π10π34π5]𝖳\boldsymbol{x}_{\text{original}}=[\frac{\pi}{10}~{}\frac{\pi}{3}~{}\frac{4\pi}{5}]^{\mathsf{T}} is associated to interconnection weights 𝜹=[3.40263.46416.4721]𝖳\boldsymbol{\delta}=[3.4026~{}3.4641~{}6.4721]^{\mathsf{T}}. Applying the optimal correction 𝜶\boldsymbol{\alpha}^{*} yields positive interconnection weights 𝜹+𝜶=[6.47213.40263.4641]𝖳\boldsymbol{\delta}+\boldsymbol{\alpha}^{*}=[6.4721~{}3.4026~{}3.4641]^{\mathsf{T}} that achieve the desired functional patterns 𝒙desired\boldsymbol{x}_{\text{desired}}. b Joint allocation of two compatible equilibria for the phase difference dynamics. By taking θ1\theta_{1} as a reference, we choose two points for the phase differences x1i=θiθ1x_{1i}=\theta_{i}-\theta_{1}, i{2,,7}i\in\{2,\dots,7\}, to be imposed as equilibria in a network of n=7n=7 oscillators: 𝒙desired(1)=[π6π6π4π4π6π4]𝖳{\boldsymbol{x}}^{(1)}_{\text{desired}}=\left[\frac{\pi}{6}~{}\frac{\pi}{6}~{}\frac{\pi}{4}~{}\frac{\pi}{4}~{}\frac{\pi}{6}~{}\frac{\pi}{4}\right]^{\mathsf{T}} and 𝒙desired(2)=[π8π3π4π4π6π4]𝖳{\boldsymbol{x}}^{(2)}_{\text{desired}}=\left[\frac{\pi}{8}~{}\frac{\pi}{3}~{}\frac{\pi}{4}~{}\frac{\pi}{4}~{}\frac{\pi}{6}~{}\frac{\pi}{4}\right]^{\mathsf{T}}. In this example, we find a set of interconnection weights (𝜹+𝜶)(\boldsymbol{\delta}+\boldsymbol{\alpha}^{*}) that solves the minimization problem (11) with constraint (12). The trajectories start at the (unstable) equilibrium point 𝒙desired(1){\boldsymbol{x}}^{(1)}_{\text{desired}} at time t=0t=0, and converge to the point 𝒙desired(2){\boldsymbol{x}}^{(2)}_{\text{desired}} after a small perturbation 𝒑𝕋7\boldsymbol{p}\in\mathbb{T}^{7}, with pi[00.05]p_{i}\in[0~{}0.05], is applied to the phase difference trajectories at time t=50t=50.

The minimization problem (11) is convex, thus efficiently solvable even for large networks, and may admit multiple minimizers, thus showing that different networks may exhibit the same functional pattern. Moreover, in light of our results above, Problem (11) can be easily adapted to assign a collection of desired patterns {𝒙(i)}i=1\{\boldsymbol{x}^{(i)}\}_{i=1}^{\ell}. To do so, we simply replace the constraint (11a) with

BD(𝒙(i))(𝜹+𝜶)=𝝎,i=1,,.BD(\boldsymbol{x}^{(i)})(\boldsymbol{\delta}+\boldsymbol{\alpha})=\boldsymbol{\omega},\quad\forall i=1,\dots,\ell. (12)

Fig. 6b illustrates an example where we jointly allocate two functional patterns for a complete graph with n=7n=7 oscillators (see Supplementary Information for more details on this example).

Note that the minimization problem (11) does not guarantee that the functional pattern 𝒙\boldsymbol{x} is stable for the network with weights 𝜹+𝜶\boldsymbol{\delta}+\boldsymbol{\alpha}^{*}. To promote stability of the pattern 𝒙\boldsymbol{x}, we use a heuristic procedure based on the classic Gerschgorin’s theorem [29]. Recall that stability of 𝒙\boldsymbol{x} is guaranteed when the associated Jacobian matrix has a Laplacian structure, with negative diagonal entries and nonnegative off-diagonal entries. Further, instability of 𝒙\boldsymbol{x} depends primarily on the negative off-diagonal entries Aijcos(xij)A_{ij}\cos(x_{ij}) of the Jacobian (these entries are negative because the sign of the network weight AijA_{ij} is different from the sign of the cosine of the desired phase difference xijx_{ij}). Thus, reducing the magnitude of such entries AijA_{ij} heuristically moves the eigenvalues of the Jacobian towards the stable half of the complex plane (this phenomenon can be captured using the Gerschgorin circles, as we show in Fig. 7 for a network with 77 nodes). To formalize this procedure, let 𝜹𝒩\boldsymbol{\delta}_{\mathcal{N}} and 𝜶𝒩\boldsymbol{\alpha}_{\mathcal{N}} denote the entries of the weights 𝜹\boldsymbol{\delta} and tuning vector 𝜶\boldsymbol{\alpha}, respectively, that are associated to negative interconnections Aijcos(xij)<0A_{ij}\cos(x_{ij})<0 in the cosine-scaled network. Then, the optimization problem that enacts the proposed strategy becomes:

min𝜶\displaystyle\min_{\boldsymbol{\alpha}} 𝜹𝒩+𝜶𝒩2\displaystyle\ \ \left\|\boldsymbol{\delta}_{\mathcal{N}}+\boldsymbol{\alpha}_{\mathcal{N}}\right\|_{2} (13)
subjectto\displaystyle\mathrm{subject~{}to} BD(𝒙)(𝜹+𝜶)=𝝎,\displaystyle\ \ BD({\boldsymbol{x}})(\boldsymbol{\delta}+\boldsymbol{\alpha})={\boldsymbol{\omega}},
and\displaystyle\mathrm{and} (𝜹+𝜶)0,\displaystyle\ \ (\boldsymbol{\delta}+\boldsymbol{\alpha})\geq 0,

Carefully reducing the weights 𝜹𝒩+𝜶𝒩\boldsymbol{\delta}_{\mathcal{N}}+\boldsymbol{\alpha}_{\mathcal{N}} promotes stability of the target pattern. Fig. 7 illustrates the shift of the Jacobian’s eigenvalues while the optimal tuning vector 𝜶\boldsymbol{\alpha}^{*} is gradually applied to a 77-oscillator network to achieve stability of a functional pattern containing negative correlations (the network parameters can be found in the Supplementary Information). Finally, we remark that the procedure in (21) can be further refined by introducing scaling constants to penalize 𝜹𝒩+𝜶𝒩2\left\|\boldsymbol{\delta}_{\mathcal{N}}+\boldsymbol{\alpha}_{\mathcal{N}}\right\|_{2} differently from the modification of other interconnection weights (see Supplementary Information for further details and an example).

Refer to caption
Fig 7: Mechanism underlying the heuristic procedure to promote stability of functional patterns containing negative correlations. For the 77-oscillator network in Supplementary Text 1.5, we apply the procedure in equation (21) to achieve stability of the pattern 𝒙desired=[21π32π6π6π8π8π3]𝖳{\boldsymbol{x}}_{\text{desired}}=\left[\frac{21\pi}{32}~{}\frac{\pi}{6}~{}\frac{\pi}{6}~{}\frac{\pi}{8}~{}\frac{\pi}{8}~{}\frac{\pi}{3}\right]^{\mathsf{T}}, where x12=θ2θ1>π2x_{12}=\theta_{2}-\theta_{1}>\frac{\pi}{2}. The left plot illustrates the Gerschgorin disks (in blue) and the Jacobian’s eigenvalues locations for the original network (as dark dots). The complex axis is highlighted in purple. It can be observed in the zoomed-in panel that one eigenvalue is unstable (λ2=0.0565\lambda_{2}=0.0565, in red). The optimal correction 𝜶\boldsymbol{\alpha}^{*} is gradually applied to the existing interconnections from the left-most panel to the right-most one at 13\frac{1}{3} increments. The right zoomed-in panel shows that, as a result of our procedure, n1n-1 eigenvalues ultimately lie in the left-hand side of the complex plane (λ1=0\lambda_{1}=0 due to rotational symmetry and λ2=0.0178\lambda_{2}=-0.0178, in green).

The minimization problems (11) and (21) do not allow us to tune the oscillators’ natural frequencies, and are constrained to networks with positive weights. When any parameter of the network is unconstrained and can be adjusted to enforce a desired functional pattern, the network optimization problem can be generalized as

min𝜶,𝜷\displaystyle\min_{\boldsymbol{\alpha},\boldsymbol{\beta}} [𝜶𝖳𝜷𝖳]2\displaystyle\left\|\begin{bmatrix}\boldsymbol{\alpha}^{\mathsf{T}}&\boldsymbol{\beta}^{\mathsf{T}}\end{bmatrix}\right\|_{2} (14)
subjectto\displaystyle\mathrm{subject~{}to} BD(𝒙)(𝜹+𝜶)=[ω1ωn]𝖳+𝜷,\displaystyle BD({\boldsymbol{x}})(\boldsymbol{\delta}+\boldsymbol{\alpha})={[\omega_{1}~{}\cdots~{}\omega_{n}]^{\mathsf{T}}}+\boldsymbol{\beta}, (14a)

where 𝜷\boldsymbol{\beta} denotes the correction to the natural frequencies. Problem (14) always admits a solution because 𝜷\boldsymbol{\beta} can be chosen to satisfy the constraint (25a) for any choice of the network parameters 𝜹+𝜶\boldsymbol{\delta}+\boldsymbol{\alpha}. Further, the (unique) solution to the minimization problem (14) can also be computed in closed form:

[𝜶𝜷]=[BD(𝒙)In]([ω1ωn]𝖳BD(𝒙)𝜹)\displaystyle\begin{bmatrix}\boldsymbol{\alpha}^{*}\\ \boldsymbol{\beta}^{*}\end{bmatrix}=\begin{bmatrix}BD({\boldsymbol{x}})&{-}I_{n}\end{bmatrix}^{\dagger}\left({[\omega_{1}~{}\cdots~{}\omega_{n}]^{\mathsf{T}}}-BD({\boldsymbol{x}})\boldsymbol{\delta}\right)

where InI_{n} denotes the n×nn\times n identity matrix.

We conclude this section by noting that the minimization problems (11)-(14) can be readily extended to include other vector norms besides the 2\ell_{2}-norm in the cost function (e.g., the 1\ell_{1}-norm to promote sparsity of the corrections), and to be applicable to directed networks. The latter extension can be attained by replacing the constraints (11a) and (25a) with a suitable rewriting of the matrix form (4). We refer the interested reader to the Supplementary Information for a comprehensive treatment of this extension and an example.

Applications to complex networks

In the remainder of this paper we apply our methods to an empirically reconstructed brain network and to the IEEE 39 New England power distribution network. In the former case, we use the Kuramoto model to map structure to function, and find that local metabolic changes underlie the emergence of functional patterns of recorded neural activity. In the latter case, we use our methods to restore the nominal network power flow after a fault.

Local metabolic changes govern the emergence of distinct functional patterns in the brain

The brain can be studied as a network system in which Kuramoto oscillators approximate the rhythmic activity of different brain regions [60, 59, 14, 45]. Over short time frames, the brain is capable of exhibiting a rich repertoire of functional patterns while the network structure and the interconnection weights remain unaltered. Functional patterns of brain activity not only underlie multiple cognitive processes, but can also be used as biomarkers for different psychiatric and neurological disorders [65].

To shed light on the structure-function relationship of the human brain, we utilize Kuramoto oscillators evolving on an empirically reconstructed brain network. We hypothesize that the intermittent emergence of diverse patterns stems from changes in the oscillators’ natural frequencies – which can be thought of as endogenous changes in metabolic regional activity regulated by glial cells [27] or exogenous interventions to modify undesired synchronization patterns [45]. First, we show that phase-locked trajectories of the Kuramoto model in equation (1) can be accurately extracted from noisy measurements of neural activity and are a relatively accurate approximation of neural activity.

We employ structural (i.e., interconnections between brain regions) and functional (i.e., time series of recorded neural activity) data from Ref. [60]. Structural connectivity consists of a sparse weighted matrix AA whose entries represent the strength of the physical interconnection between two brain regions. Functional data comprise time series of neural activity recorded through functional magnetic resonance imaging (fMRI) of healthy subjects as they rest. Because the phases of the measured activity have been shown to carry most of the information contained in the slow oscillations recorded through fMRI time series, we follow the steps in Ref. [60] to obtain such phases from the data by filtering the time series in the [0.04,0.07][0.04,0.07] Hz frequency range (Supplementary Information). Next, since frequency synchronization is thought to be a crucial enabler of information exchange between different brain regions and homeostasis of brain dynamics [82, 53], we focus on functional patterns that arise from phase-locked trajectories, as compatible with our analysis. For simplicity, we restrict our study to the cingulo-opercular cognitive system, which, at the spatial scale of our data, comprises n=12n=12 interacting brain regions [61].

Refer to caption
Fig 8: Replication of empirically recorded functional connectivity in the brain through tuning of the natural frequencies of Kuramoto oscillators. The anatomical brain organization provides the network backbone over which the oscillators evolve. The filtered fMRI time series provide the relative phase differences between co-fluctuating brain regions, and thus define the desired phase differences 𝒙{\boldsymbol{x}}, which is used to calculate the metabolic change encoded in the oscillators’ natural frequencies. In this figure, we select the 4040-second time window from t0=498t_{0}=498 seconds to tf=538t_{f}=538 seconds for subject 1818 in the second scanning session. We obtain RF2=0.2879\|R-F\|_{2}=0.2879. Additionally, we verify that the analysis of the Jacobian spectrum (see equation (10)) accurately predicts the stability of the phase-locked trajectories. Supplementary Figure 7a illustrates the basin of attraction of RR, which we numerically estimate to be half of the torus.

We identify time windows in the filtered fMRI time series where the signals are phase-locked, and compute two matrices for each time window: a matrix F12×12F\in\mathbb{R}^{12\times 12} of Pearson correlation coefficients (also known as functional connectivity), and a functional pattern R12×12R\in\mathbb{R}^{12\times 12} (as in equation (2)) from the phases extracted by solving the nonconvex phase synchronization problem [11]. Strikingly, we find that FR21\|F-R\|_{2}\ll 1 consistently (see Supplementary Information and Supplementary Figure 16b), thus demonstrating that our definition of functional pattern is a good replacement of the classical Pearson correlation arrangements in networks with oscillating states.

Building upon the above finding, we test whether the oscillators’ natural frequencies embody the parameter that links the brain network structure to its function (i.e., structural and functional matrices). We set 𝝎=BD(𝒙)𝜹\boldsymbol{\omega}=BD({\boldsymbol{x}})\boldsymbol{\delta}, where 𝒙{\boldsymbol{x}} are phase differences obtained from the previous step, and integrate the Kuramoto model in equation (1) with random initial conditions close to 𝒙{\boldsymbol{x}}. We show in Fig. 8 that the assignment of natural frequencies according to the extracted phase differences promotes spontaneous synchronization to accurately replicate the empirical functional connectivity FF.

These results corroborate the postulate that structural connections in the brain support the intermittent activation of specific functional patterns during rest through regional metabolic changes. Furthermore, we show that the Kuramoto model represents an accurate and interpretable mapping between the brain anatomical organization and the functional patterns of frequency-synchronized neural co-fluctuations. Once a good mapping is inferred, it can be used to define a generative brain model to replicate in silico how the brain efficiently enacts large-scale integration of information, and to develop personalized intervention schemes for neurological disorders related to abnormal synchronization phenomena [83, 47].

Power flow control in power networks for fault recovery and prevention

Efficient and robust power delivery in electrical grids is crucial for the correct functioning of this critical infrastructure. Modern, reconfigurable power networks are expected to be resilient to distributed faults and malicious cyber-physical attacks [84] while being able to rapidly adapt to varying load demands. In addition, climate change is straining service reliability, as underscored by recent events such as the Texas grid collapse after Winter Storm Uri in February 2021 [13], and the New Orleans blackout after Hurricane Ida in August 2021 [1]. Therefore, there exists a dire need to design control methods to efficiently operate these networks and react to unforeseen disruptive events.

The Kuramoto model in equation (1) has been shown to be particularly relevant in the modeling of large distribution networks and microgrids [23]. Preliminary work on the control of frequency synchronization in electrical grids modeled through Kuramoto oscillators has been developed in Ref. [67]. Here, we present a method that leverages our findings to guarantee not only frequency synchronization, but also a target pattern of active power flow. Our method can be used for power (re)distribution with respect to specific pricing strategies, fault prevention (e.g., when a line overheats) and recovery (e.g., after the disconnection of a branch). Furthermore, thanks to the formal guarantees that our method prescribes, we are able to prevent Braess’ Paradox in power networks [85], which is a phenomenon where the addition of interconnections to a network may impede its synchronization.

It has been shown in Ref. [23, Lemma 1] that the load dynamics (nodes 11-2929 in Fig. 9a) in a structure-preserving power grid model have the same stable synchronization manifold of equation (1). In this model, ωi=pi/Di\omega_{i}=p_{\ell_{i}}/D_{i} is the active power load at node ii, where DiD_{i} is the damping coefficient, and Aij=|vi||vj|(Yij)/DiA_{ij}=|v_{i}||v_{j}|\mathcal{I}({Y}_{ij})/D_{i}, with viv_{i} denoting the nodal voltage magnitude and (Yij)\mathcal{I}({Y}_{ij}) being the imaginary part of the admittance YijY_{ij} (see Supplementary Information for details about this model). In this example, we choose a highly damped scenario where Di=1D_{i}=1, which is possibly due to local excitation controllers. Notice that, when the phase angles 𝜽\boldsymbol{\theta} are phase-locked and AijA_{ij} is fixed, the active power flow is given by Aijsin(θjθi)A_{ij}\sin(\theta_{j}-\theta_{i}).

We posit that solving the problem in equation (11) to design a local reconfiguration of the network parameters can recover the power distribution before a line fault or provide the smallest parameter changes to steer the load powers to desired values. In practice, control devices such as Flexible Alternating Current Transmission Systems (FACTs) allow operators and engineers to change the network parameters [42, 50]. We demonstrate the effectiveness of our approach by recovering a desired power distribution in the IEEE 39 New England power distribution network after a fault. During a regime of normal operation, we simulate a fault by disconnecting the line between two loads and solve the problem in equation (11) to find the minimum modification of the couplings aija_{ij} that recovers the nominal power distribution.

Refer to caption
Fig 9: Fault recovery in the IEEE 39 New England power distribution network through minimal and local intervention. a New England power distribution network. The generator terminal buses illustrate the type of generator (coal, nuclear, hydroelectric). We simulate a fault by disconnecting the transmission line 2525 (between loads 1313 and 1414). b The fault causes the voltage phases 𝜽\boldsymbol{\theta} to depart from normal operating conditions, which could cause overheating of some transmission lines (due to violation of the nominal thermal constraint limits) or abnormal power delivery. To recover the pre-fault active power flow and promote a local (sparse) intervention, we solve the optimization in equation (11) by minimizing the 11-norm of the structural parameter modification 𝜹\boldsymbol{\delta} with no scaling parameters in the cost functional. The network returns to the initial operative conditions with a localized modification of the neighboring transmission lines’ impedances.

We first utilize MATPOWER [89] to solve the power flow problem. Then we use the active powers 𝒑\boldsymbol{p}_{\ell} and voltages vv at the buses to obtain the natural frequencies 𝝎{\boldsymbol{\omega}} and the adjacency matrix AA of the oscillators, respectively, while the voltage phase angles are used as initial conditions 𝜽(0)\boldsymbol{\theta}(0) for the Kuramoto model in equation (1). We integrate the Kuramoto dynamics and let the voltage phases 𝜽(t)\boldsymbol{\theta}(t) reach a frequency-synchronized steady state, which corresponds to a normal operating condition. The phase differences also represent a functional pattern across the loads. Next, to simulate a line fault, we disconnect one line. By solving the problem in equation (11) with 𝒙desired{\boldsymbol{x}}_{\mathrm{desired}} corresponding to the pre-fault steady-state voltage phase differences, we compute the smallest variation of the remaining parameters (i.e., admittances) so that the original functional pattern can be recovered. Fig. 9b illustrates the effectiveness of our procedure at recovering the nominal pattern of active power flow by means of minimal and localized interventions (see also Supplementary Figure 17).

The above application is based on a classical lossless structure-preserving power network model [23]. However, in the power systems literature, more complex dynamics that relax some of the modeling assumptions have been proposed. For instance, Ref. [66] uses a third-order model (or one-axis model) that takes into account transient voltage dynamics. Instead, Ref. [33] studies the case of interconnections with power losses, which lead to a network of phase-lagged Kuramoto-Sakaguchi oscillators [63]. We show in the Supplementary Information that our procedure to recover a target functional pattern can still be applied successfully to a wide range of situations involving these more realistic models.

Contribution and future directions

Distinct configurations of synchrony govern the functioning of oscillatory network systems. This work presents a simple and mathematically grounded mapping between the structural parameters of arbitrary oscillator networks and their components’ functional interactions. The tantalizing idea of prescribing patterns in networks of oscillators has been investigated before, yet only partial results had been reported in the literature. Here, we demonstrate that the control of patterns of synchrony can be cast as optimal (convex) design and tuning problems. We also investigate the feasibility of such optimizations in the cases of networks that admit negative coupling weights and networks that are constrained to positive couplings. Our control framework also allows us to prescribe multiple desired equilibria in Kuramoto networks, a problem that is relevant in practice and had not been investigated before.

As stability of a functional pattern may be a compelling property in many applications, we explore conditions to test and enforce the stability of functional patterns. We show that such conditions are rather straightforward in the case of networks that admit both cooperative and competitive interactions. However, stability of target functional patterns in networks that are constrained to only cooperative interactions is a more challenging task, for which we demonstrate that any pattern associated to a structurally-balanced cosine-weighted network cannot be stable. To overcome this issue, we propose an heuristic procedure that adjusts the oscillators’ coupling strengths to violate the structurally-balanced property and promote the stability of functional patterns with negative correlations. While heuristic, our procedure for stability has proven successful in all our numerical studies. Notice that, differently from methods that study an “average” description of the system at near-synchronous state (see, e.g., Ref. [76]), here we assess the stability of exact target phase-locked trajectories where phase values can instead be arbitrarily spread over the torus. This method can also be extended to assess the stability of equilibria of higher-dimensional oscillators, provided that the considered equilibrium state is a fixed point.

We emphasize that our results are also intimately related to the long standing economic problem of enhancing network operations while optimizing wiring costs. In any complex system where synchrony between components ensures appropriate functions, it is beneficial to maximize synchronization while minimizing the physical variations of the interconnection weights [51]. Compatible with this principle, neural systems are thought to have evolved to maximize information processing by promoting synchronization through optimal spatial organization [3]. Inspired by the efficiency observed in neurobiological circuitry, equation (11) could be utilized for the design optimal interaction schemes in large-scale computer networks whose performance relies on synchronization-based tasks [41].

An important consideration that highlights the general contributions of the present study is that being able to specify pairwise functional relationships between the oscillators also solves problems such as phase-locking, full, and cluster synchronization. Yet, the converse is not true. In fact, even in the general setting of cluster synchronization [56] – where distinct groups of oscillators behave cohesively – one can only achieve a desired synchronization level within the same cluster, but not across clusters, which instead is possible with our approach. Specifically, in cluster-synchronization oscillators belonging to the same cluster are forced to synchronize, thus implying that the associated diagonal blocks of the functional pattern RR display values close to 11. Seminal work in Ref. [40] developed a nonlinear feedback control to change the coupling functions in equation (2) to engineer clusters of synchronized oscillators, whereas the authors of Ref. [24] propose the formation of clusters through selective addition of interconnections to the network. More recently, the control of partially synchronized states with applications to brain networks is studied in Ref. [45] by means of structural interventions, and in Ref. [8] via exogenous stimulation. Ultimately, the results presented in this work not only complement but go well beyond the control of macroscopic synchronization observables and partial synchronization by allowing to specify the synchrony level of pairwise interactions.

While our contributions include the analysis of the stability properties of functional patterns, here we do not assess their basins of attraction. We emphasize that, in general, the estimation of the basin of attraction of the attractors of nonlinear systems remains an outstanding problem, and even the most recent results rely on numerical approaches or heavy modeling assumptions [16]. Further, in the case of coupled Kuramoto oscillators, existing literature shows that the number of equilibria for the phase differences increases significantly with the cardinality of the network [44], making the study of basins of attraction extremely challenging. In the Supplementary Information, we extend previous work on identical oscillators to networks with heterogeneous oscillators, and show that that functional patterns can be at most almost-globally stable in cluster-synchronized positive networks. Yet, a precise estimation of the basin of attraction for any arbitrary target pattern goes beyond the scope of this work and may require the derivation of ad-hoc principles based on Lyapunov’s stability theory [88].

The framework presented in this work has other limitations, which can be addressed in follow up studies. First, despite its capabilities in modeling numerous oscillatory network systems, the Kuramoto model cannot capture the amplitude of the oscillations, making it most suitable for oscillator systems where most of the information is conveyed by phase interaction as demonstrated in Ref. [60] for resting brain activity. To model brain activity during cognitively demanding tasks such as learning, higher-dimensional oscillators may be more suitable [62]. Second, the use of phase-locked trajectories is instrumental to the control and design of functional patterns. Yet, it is not necessary. In fact, restricting the control to phase-locked dynamics does not capture exotic dynamical regimes in which only a subset of the oscillators is frequency-synchronized. Third and finally, in some situations the network parameters are not fully known. While being still an active area of research, network identification of oscillator systems may be employed in such scenarios [54].

Directions of future research can be both of a theoretical and practical nature. For instance, follow up studies can focus on the derivation of a general condition for the stability of a feasible functional pattern in positive networks. Further, a thorough investigation of which network structures allow for multiple prescribed equilibria may be particularly relevant in the context of memory systems, where different patterns are associated to different memory states. Specific practical applications may also require the inclusion of sparsity constraints on the accessible structural parameters for the implementation of the proposed control and design framework.

Methods

Matrix form of equation (1) and phase-locked solutions

For a given network of oscillators, we let the entries of the (oriented) incidence matrix BB be defined component-wise after choosing the orientation of each interconnection (i,j)(i,j). In particular, ii points to jj if i<ji<j, and Bk=1B_{k\ell}=-1 if oscillator kk is the source node of the interconnection \ell, Bk=1B_{k\ell}=1 if oscillator kk is the sink node of the interconnection \ell, and Bk=0B_{k\ell}=0 otherwise. The matrix form of equation (1) can be written as

𝜽˙=\displaystyle\dot{\boldsymbol{\theta}}= [ω1ωn]𝖳B[sin(xij)]𝜹\displaystyle~{}[\omega_{1}~{}\cdots~{}\omega_{n}]^{\mathsf{T}}-B\begin{bmatrix}\ddots&&\\ &\sin(x_{ij})&\\ &&\ddots\end{bmatrix}\boldsymbol{\delta}
=\displaystyle= [ω1ωn]𝖳Bdiag({sin(xij)}(i,j))𝜹=[ω1ωn]𝖳BD(𝒙)𝜹,\displaystyle~{}[\omega_{1}~{}\cdots~{}\omega_{n}]^{\mathsf{T}}-B\operatorname{diag}(\{\sin(x_{ij})\}_{(i,j)\in\mathcal{E}})\boldsymbol{\delta}=[\omega_{1}~{}\cdots~{}\omega_{n}]^{\mathsf{T}}-BD({\boldsymbol{x}})\boldsymbol{\delta},

where D(𝒙)D({\boldsymbol{x}}) is the diagonal matrix of the sine functions in equation (1).

When the oscillators evolve in a phase-locked configuration, the oscillator frequencies become equal to each other and constant. In particular, since 𝟏𝖳B=0\boldsymbol{1}^{\mathsf{T}}B=0, we have 𝟏𝖳𝜽˙=𝟏𝖳k𝟏=𝟏𝖳[ω1ωn]𝖳\boldsymbol{1}^{\mathsf{T}}\dot{\boldsymbol{\theta}}=\boldsymbol{1}^{\mathsf{T}}k\boldsymbol{1}=\boldsymbol{1}^{\mathsf{T}}[\omega_{1}~{}\cdots~{}\omega_{n}]^{\mathsf{T}}, thus showing that, in any phase locked trajectory, the oscillators frequency kk needs to equal the mean natural frequency 1ni=1nωi\frac{1}{n}\sum_{i=1}^{n}\omega_{i}.

Any feasible functional pattern has n1n-1 degrees of freedom

The values of a functional pattern can be uniquely specified using a set of n1n-1 correlation values. To see this, let us define the incremental variables 𝒙=Mθ\boldsymbol{x}=M\theta, where M||×nM\in\mathbb{R}^{|\mathcal{E}|\times n} is the matrix whose kk-th row, associated to xijx_{ij}, is all zeros except for bki=1b_{ki}=-1 and bkj=1b_{kj}=1. Consider the first n1n-1 rows of MM, associated to x12,x13,x1nx_{12},x_{13},\dots x_{1n}, and notice that they are linearly independent. Moreover, the row associated to xijx_{ij}, i>1i>1, can be obtained by subtracting the row associated to x1ix_{1i} to the row associated to x1jx_{1j}, implying that the rank of MM is n1n-1. Any collection of n1n-1 linearly independent rows of MM defines a full row-rank matrix MminM_{\text{min}} (e.g., any n1n-1 rows corresponding to the transpose incidence matrix of a spanning tree [30]). We let 𝒙min=Mmin𝜽\boldsymbol{x}_{\text{min}}=M_{\text{min}}\boldsymbol{\theta}, where 𝒙min\boldsymbol{x}_{\text{min}} is a smallest set of phase differences that can be used to quantify the synchronization angles among all oscillators. Because ker(Mmin)=𝟏\ker(M_{\text{min}})=\boldsymbol{1}, we can obtain the phases 𝜽\boldsymbol{\theta} from 𝒙min\boldsymbol{x}_{\text{min}} modulo rotation: 𝜽=Mmin𝒙minc𝟏\boldsymbol{\theta}=M_{\text{min}}^{\dagger}\boldsymbol{x}_{\text{min}}-c\boldsymbol{1}, where MminM_{\text{min}}^{\dagger} denotes the Moore-Penrose pseudo-inverse of MminM_{\text{min}} and cc is some real number. Further, since ker(Mmin)=ker(M)\ker(M_{\text{min}})=\ker(M), we can reconstruct all phase differences 𝒙\boldsymbol{x} from 𝒙min\boldsymbol{x}_{\text{min}}:

MMmin𝒙min=M(𝜽+c𝟏)=M𝜽+0=𝒙.MM_{\text{min}}^{\dagger}\boldsymbol{x}_{\text{min}}=M(\boldsymbol{\theta}+c\boldsymbol{1})=M\boldsymbol{\theta}+0=\boldsymbol{x}.

The above equation reveals that all the differences 𝒙\boldsymbol{x} are encoded in 𝒙min\boldsymbol{x}_{\text{min}}. That is, any xijx_{ij} can be written as a linear combination of the elements in 𝒙min\boldsymbol{x}_{\mathrm{min}}. For example, if n=3n=3 and 𝒙min=[x12x23]𝖳\boldsymbol{x}_{\text{min}}=[x_{12}~{}x_{23}]^{\mathsf{T}}, then x13x_{13} is a linear combination of the differences in 𝒙min\boldsymbol{x}_{\text{min}}, i.e., 𝒙=[110011101][110011]𝒙min\boldsymbol{x}=\left[\begin{smallmatrix}-1&1&0\\ 0&-1&1\\ -1&0&1\end{smallmatrix}\right]\left[\begin{smallmatrix}-1&1&0\\ 0&-1&1\end{smallmatrix}\right]^{\dagger}\boldsymbol{x}_{\text{min}}, in which x13=x12+x23x_{13}=x_{12}+x_{23}. Thus, because n1n-1 incremental variables define all the remaining ones, the entries of any functional pattern must have only n1n-1 degrees of freedom.

Existence of a strictly positive solution to Problem (5)

Rewrite the pattern assignment problem BD(𝒙)𝜹=𝝎BD({\boldsymbol{x}})\boldsymbol{\delta}={\boldsymbol{\omega}} as

BD(𝒙)𝜹=B:,D,(𝒙)𝜹+B:,~D~,~(𝒙)𝜹~=𝝎,\displaystyle BD({\boldsymbol{x}})\boldsymbol{\delta}=B_{:,\mathcal{H}}D_{\mathcal{H},\mathcal{H}}({\boldsymbol{x}})\boldsymbol{\delta}_{\mathcal{H}}+B_{:,\tilde{\mathcal{H}}}D_{\tilde{\mathcal{H}},\tilde{\mathcal{H}}}({\boldsymbol{x}})\boldsymbol{\delta}_{\tilde{\mathcal{H}}}=\boldsymbol{\omega},

where the subscripts \mathcal{H} and ~\tilde{\mathcal{H}} denote the entries corresponding to the Hamiltonian path in conditions (ii.a)-(ii.b) and the remaining ones, respectively. Since Im(B¯:,)=Im(B:,D:,(𝒙))=span(1)\mathrm{Im}(\bar{B}_{:,\mathcal{H}})=\mathrm{Im}(B_{:,\mathcal{H}}D_{:,\mathcal{H}}({\boldsymbol{x}}))=\mathrm{span}(\textbf{1})^{\perp}, Im(B:,~D:,~(𝒙))span(1)\mathrm{Im}(B_{:,\tilde{\mathcal{H}}}D_{:,\tilde{\mathcal{H}}}({\boldsymbol{x}}))\subseteq\mathrm{span}(\textbf{1})^{\perp}, and 𝝎span(1)\boldsymbol{\omega}\in\mathrm{span}(\textbf{1})^{\perp}, for any vector 𝜹~\boldsymbol{\delta}_{\tilde{\mathcal{H}}}, the following set of weights solves the above equation:

𝜹\displaystyle\boldsymbol{\delta}_{\mathcal{H}} =(B:,D,(𝒙))(𝝎B:,~D~,~(𝒙)𝜹~)=(D,(𝒙)B:,𝖳B:,D,(𝒙))1D,(𝒙)B:,𝖳(𝝎B:,~D~,~(𝒙)𝜹~)\displaystyle=\left(B_{:,\mathcal{H}}D_{\mathcal{H},\mathcal{H}}({\boldsymbol{x}})\right)^{\dagger}\left(\boldsymbol{\omega}-B_{:,\tilde{\mathcal{H}}}D_{\tilde{\mathcal{H}},\tilde{\mathcal{H}}}({\boldsymbol{x}})\boldsymbol{\delta}_{\tilde{\mathcal{H}}}\right)=(D_{\mathcal{H},\mathcal{H}}({\boldsymbol{x}})B_{:,\mathcal{H}}^{\mathsf{T}}B_{:,\mathcal{H}}D_{\mathcal{H},\mathcal{H}}({\boldsymbol{x}}))^{-1}D_{\mathcal{H},\mathcal{H}}({\boldsymbol{x}})B_{:,\mathcal{H}}^{\mathsf{T}}\left(\boldsymbol{\omega}-B_{:,\tilde{\mathcal{H}}}D_{\tilde{\mathcal{H}},\tilde{\mathcal{H}}}({\boldsymbol{x}})\boldsymbol{\delta}_{\tilde{\mathcal{H}}}\right)

Because the matrix D,(𝒙)B:,𝖳B:,D,(𝒙)D_{\mathcal{H},\mathcal{H}}({\boldsymbol{x}})B_{:,\mathcal{H}}^{\mathsf{T}}B_{:,\mathcal{H}}D_{\mathcal{H},\mathcal{H}}({\boldsymbol{x}}) is an M-matrix, its inverse has nonnegative entries. Further, by condition (ii.b), D,(𝒙)B:,𝖳𝝎D_{\mathcal{H},\mathcal{H}}({\boldsymbol{x}})B_{:,\mathcal{H}}^{\mathsf{T}}\boldsymbol{\omega} is strictly positive. Then, the vector (D,(𝒙)B:,𝖳B:,D,(𝒙))1D,(𝒙)B:,𝖳𝝎(D_{\mathcal{H},\mathcal{H}}({\boldsymbol{x}})B_{:,\mathcal{H}}^{\mathsf{T}}B_{:,\mathcal{H}}D_{\mathcal{H},\mathcal{H}}({\boldsymbol{x}}))^{-1}D_{\mathcal{H},\mathcal{H}}({\boldsymbol{x}})B_{:,\mathcal{H}}^{\mathsf{T}}\boldsymbol{\omega} is also strictly positive, and so is the solution vector 𝜹\boldsymbol{\delta}_{\mathcal{H}} for any sufficiently small and positive vector δ~\delta_{\tilde{\mathcal{H}}}.

Enforcing stability of functional patterns in networks with cooperative and competitive interactions

To ensure that the Jacobian matrix in equation (10) is the Laplacian of a positive network and, thus, stable, we solve the problem in equation (5) with a slight modification of the constraints. Specifically, we post-multiply the matrix BB in equation (5) as BΔB\Delta, where Δ=diag({sign(cos(xij))}(i,j))\Delta=\operatorname{diag}(\{\mathrm{sign}(\cos(x_{ij}))\}_{(i,j)\in\mathcal{E}}) is a matrix that changes the sign of the columns of BB associated to negative weights in the cosine-scaled network:

BΔD(𝒙)𝜹=𝝎B\Delta D({\boldsymbol{x}})\boldsymbol{\delta}={\boldsymbol{\omega}}

Solving for positive interconnection weights the problem in equation (5) under the above modified constraint yields a stable Jacobian in a network where the final couplings are Δ𝜹\Delta\boldsymbol{\delta}.

Heuristic procedure to promote stability of functional patterns in positive networks

We provide a heuristic procedure to promote the stability of functional patterns that include negative correlations in a network with nonnegative weights. Our procedure relies on the definition of Gerschgorin disks and the Gerschgorin Theorem.

Definition of Gerschgorin disk. Let Mn×nM\in\mathbb{C}^{n\times n} be a complex matrix. The ii-th Gerschgorin disk is 𝒟i=(Mii,ri)\mathcal{D}_{i}=(M_{ii},r_{i}), i=1,,ni=1,\dots,n, where the radius is ri=ji|Mij|r_{i}=\sum_{j\neq i}|M_{ij}| and the center is MiiM_{ii}.

Theorem 2

(Gerschgorin [29]). The eigenvalues of the matrix MM lie within the union i=1nDi\bigcup_{i=1}^{n}D_{i} of its Gerschgorin disks.

Whenever all target phase differences in 𝒙{\boldsymbol{x}} satisfy |xij|π2|x_{ij}|\leq\frac{\pi}{2}, the Gerschgorin disks of the Jacobian in equation (10) all lie in the closed left half-plane. However, for patterns 𝒙{\boldsymbol{x}} containing phase differences |xij|π2|x_{ij}|\geq\frac{\pi}{2}, the union of the Gerschgorin disks intersects the right half-plane. Reducing the magnitude of the entries satisfying Aijcos(xij)<0A_{ij}\cos(x_{ij})<0 effectively shrinks the radius of the Gerschgorin disks that overlap with the right half-plane and shifts their centers towards the left-half plane due to the structure of the Jacobian matrix. We remark that the procedure in equation (21) is a heuristic, and it is provably effective only when all interconnections with Aijcos(xij)<0A_{ij}\cos(x_{ij})<0 can be removed, so that all the Gerschgorin disks lie completely in the left-half plane.

Data availability

The brain data that support the findings of this study are available from the Supplementary Information of [60], https://doi.org/10.1371/journal.pcbi.1004100.s006. The IEEE 39 New England data parameters and interconnection scheme analyzed in this study for the structure-preserving power network model can be found in the reference textbook [64] (see also Supplementary Information for modeling assumptions). The parameters for the simulations on the network-reduced IEEE 39 New England test case in the Supplementary Information have been obtained from Ref. [77] and Ref. [48].

Code availability

Source code and documentation for the numerical simulations presented here are freely available in GitHub at: https://github.com/tommasomenara/functional_control with the identifier 10.5281/zenodo.4546413.

References

  • [1] Hurricane Ida traps Louisianans, shatters the power grid. Associated Press, Aug 2021.
  • [2] Juan A Acebrón, Luis L Bonilla, Conrad J Pérez Vicente, Félix Ritort, and Renato Spigler. The Kuramoto model: A simple paradigm for synchronization phenomena. Reviews of modern physics, 77(1):137, 2005.
  • [3] S. Achard and E. Bullmore. Efficiency and cost of economical brain functional networks. PLOS Computational Biology, 3(2):e17, 2007.
  • [4] A. Arenas, A. Díaz-Guilera, J. Kurths, Y. Moreno, and C. Zhou. Synchronization in complex networks. Physics Reports, 469(3):93–153, 2008.
  • [5] A. Arenas, A. Díaz-Guilera, and C. J. Pérez-Vicente. Synchronization reveals topological scales in complex networks. Physical Review Letters, 96:114102, Mar 2006.
  • [6] L. Arola-Fernández, A. Díaz-Guilera, and A. Arenas. Synchronization invariance under network structural transformations. Physical Review E, 97:060301, Jun 2018.
  • [7] T. Athay, R. Podmore, and S. Virmani. A practical method for the direct analysis of transient stability. IEEE Transactions on Power Apparatus and Systems, 98(2):573–584, 1979.
  • [8] K. Bansal, J. O. Garcia, S. H. Tompson, T. Verstynen, J. M. Vettel, and S. F. Muldoon. Cognitive chimera states in human brain networks. Science Advances, 5(4), 2019.
  • [9] M. Beliaev, D. Zöllner, A. Pacureanu, P. Zaslansky, and I. Zlotnikov. Dynamics of topological defects and structural synchronization in a forming periodic tissue. Nature Physics, 2021.
  • [10] I. Belykh, R. Jeter, and V. Belykh. Foot force models of crowd dynamics on a wobbly bridge. Science Advances, 3(11):e1701512, 2017.
  • [11] N. Boumal. Nonconvex phase synchronization. SIAM Journal on Optimization, 26(4):2355–2377, 2016.
  • [12] J. Buck and E. Buck. Biology of synchronous flashing of fireflies. Nature, 211(5049):562–564, 1966.
  • [13] J. W. Busby, K. Baker, M. D. Bazilian, A. Q. Gilbert, E. Grubert, V. Rai, J. D. Rhodes, S. Shidore, C. A. Smith, and M. E. Webber. Cascading risks: Understanding the 2021 winter blackout in Texas. Energy Research & Social Science, 77:102106, 2021.
  • [14] J. Cabral, E. Hugues, O. Sporns, and G. Deco. Role of local network oscillations in resting-state functional connectivity. NeuroImage, 57(1):130–139, 2011.
  • [15] A. Cavagna, A. Cimarelli, I. Giardina, G. Parisi, R. Santagati, F. Stefanini, and M. Viale. Scale-free correlations in starling flocks. Proceedings of the National Academy of Sciences, 107(26):11865–11870, 2010.
  • [16] S. Chen, M. Fazlyab, M. Morari, G. J. Pappas, and V. M. Preciado. Learning region of attraction for nonlinear systems. arXiv preprint arXiv:2110.00731, 2021.
  • [17] M. C. Cross and P. C. Hohenberg. Pattern formation outside of equilibrium. Reviews of Modern Physics, 65(3):851, 1993.
  • [18] A. Daffertshofer and B. van Wijk. On the influence of amplitude on the connectivity between phases. Frontiers in Neuroinformatics, 5:6, 2011.
  • [19] G. Deco, J. Cruzat, J. Cabral, E. Tagliazucchi, H. Laufs, N. K. Logothetis, and M. L. Kringelbach. Awakening: Predicting external stimulation to force transitions between different brain states. Proceedings of the National Academy of Sciences, 116(36):18088–18097, 2019.
  • [20] G. Deco, V. Jirsa, A. R. McIntosh, O. Sporns, and R. Kötter. Key role of coupling, delay, and noise in resting brain fluctuations. Proceedings of the National Academy of Sciences, 106(25):10302–10307, 2009.
  • [21] F. Dörfler and F. Bullo. Synchronization and transient stability in power networks and nonuniform Kuramoto oscillators. SIAM Journal on Control and Optimization, 50(3):1616–1642, 2012.
  • [22] F. Dörfler and F. Bullo. Synchronization in complex networks of phase oscillators: A survey. Automatica, 50(6):1539–1564, 2014.
  • [23] F. Dörfler, M. Chertkov, and F. Bullo. Synchronization in complex oscillator networks and smart grids. Proceedings of the National Academy of Sciences, 110(6):2005–2010, 2013.
  • [24] R. M. D’Souza and M. Mitzenmacher. Local cluster aggregation models of explosive percolation. Physical Review Letters, 104:195702, May 2010.
  • [25] M. Fazlyab, F. Dörfler, and V. M. Preciado. Optimal network design for synchronization of coupled oscillators. Automatica, 84:181–189, 2017.
  • [26] Juergen Fell and Nikolai Axmacher. The role of phase synchronization in memory processes. Nature Reviews Neuroscience, 12(2):105–118, 2011.
  • [27] D. R. Fields, A. Araque, H. Johansen-Berg, S.-S. Lim, G. Lynch, K.-A. Nave, M. Nedergaard, R. Perez, T. Sejnowski, and H. Wake. Glial biology in learning and cognition. The Neuroscientist, 20(5):426–431, 2014.
  • [28] A. Forrow, F. G. Woodhouse, and J. Dunkel. Functional control of network dynamics using designed Laplacian spectra. Physical Review X, 8(4):041043, 2018.
  • [29] S. Geršgorin. Über die abgrenzung der eigenwerte einer matrix. Bulletin de l’Académie des Sciences de l’URSS. Classe des sciences mathématiques et na, pages 749–754, 1931.
  • [30] C. Godsil and G. F. Royle. Algebraic Graph Theory. Graduate Texts in Mathematics. Springer New York, 2001.
  • [31] Martin Golubitsky, Ian Stewart, and Andrei Török. Patterns of synchrony in coupled cell networks with multiple arrows. SIAM Journal on Applied Dynamical Systems, 4(1):78–100, 2005.
  • [32] M. Grant, S. Boyd, and Y. Ye. CVX: Matlab software for disciplined convex programming, 2009.
  • [33] F. Hellmann, P. Schultz, P. Jaros, R. Levchenko, T. Kapitaniak, J. Kurths, and Y. Maistrenko. Network-induced multistability through lossy coupling and exotic solitary states. Nature Communications, 11(1):592, 2020.
  • [34] H. Hong and S. H. Strogatz. Kuramoto model of coupled oscillators with positive and negative coupling parameters: An example of conformist and contrarian oscillators. Physical Review Letters, 106(5):054102, 2011.
  • [35] F. C. Hoppensteadt and E. M. Izhikevich. Weakly Connected Neural Networks. Springer, 1997.
  • [36] R. A. Horn and C. R. Johnson. Matrix Analysis. Cambridge University Press, 1985.
  • [37] P. Hövel, A. Viol, P. Loske, L. Merfort, and V. Vuksanović. Synchronization in functional networks of the human brain. Journal of Nonlinear Science, pages 1–24, 2018.
  • [38] S. Kaka, M. R. Pufall, W. H. Rippard, T. J. Silva, S. E. Russek, and J. A. Katine. Mutual phase-locking of microwave spin torque nano-oscillators. Nature, 437(7057):389–392, 2005.
  • [39] C. Kirst, M. Timme, and D. Battaglia. Dynamic information routing in complex networks. Nature Communications, 7(1):11061, 2016.
  • [40] István Z. Kiss, Craig G. Rusin, Hiroshi Kori, and John L. Hudson. Engineering complex dynamical structures: Sequential patterns and desynchronization. Science, 316(5833):1886–1889, 2007.
  • [41] G. Korniss, M. A. Novotny, H. Guclu, Z. Toroczkai, and P. A. Rikvold. Suppressing roughness of virtual times in parallel discrete-event simulations. Science, 299(5607):677–679, 2003.
  • [42] A. L’Abbate, G. Migliavacca, U. Häger, C. Rehtanz, S. Rüberg, H. Ferreira, G. Fulli, and A. Purvins. The role of FACTS and HVDC in the future paneuropean transmission system development. In 9th IET International Conference on AC and DC Power Transmission (ACDC 2010), pages 1–8, 2010.
  • [43] G. S. Medvedev and X. Tang. Stability of twisted states in the Kuramoto model on Cayley and random graphs. Journal of Nonlinear Science, 25(6):1169–1208, 2015.
  • [44] D. Mehta, N. S. Daleo, F. Dörfler, and J. D. Hauenstein. Algebraic geometrization of the Kuramoto model: Equilibria and stability analysis. Chaos: An Interdisciplinary Journal of Nonlinear Science, 25(5):053103, 2015.
  • [45] T. Menara, G. Baggio, D. S. Bassett, and F. Pasqualetti. A framework to control functional connectivity in the human brain. In IEEE Conf. on Decision and Control, pages 4697–4704, Nice, France, December 2019.
  • [46] T. Menara, G. Baggio, D. S. Bassett, and F. Pasqualetti. Stability conditions for cluster synchronization in networks of heterogeneous Kuramoto oscillators. IEEE Transactions on Control of Network Systems, 7(1):302 – 314, 2020.
  • [47] T. Menara, G. Lisi, F. Pasqualetti, and A. Cortese. Brain network dynamics fingerprints are resilient to data heterogeneity. Journal of Neural Engineering, 18(2):026004, 2021.
  • [48] A. Moeini, I. Kamwa, P. Brunelle, and G. Sybille. Open data IEEE test systems implemented in SimPowerSystems for education and research in power grid dynamics and control. In 2015 50th International Universities Power Engineering Conference (UPEC), pages 1–6, 2015.
  • [49] Joon-Young Moon, UnCheol Lee, Stefanie Blain-Moraes, and George A Mashour. General relationship of global topology, local dynamics, and directionality in large-scale brain networks. PLOS Computational Biology, 11(4):e1004225, 2015.
  • [50] Adilson E Motter, Seth A Myers, Marian Anghel, and Takashi Nishikawa. Spontaneous synchrony in power-grid networks. Nature Physics, 9(3):191–197, 2013.
  • [51] T. Nishikawa and A. E. Motter. Maximum performance at minimum cost in network synchronization. Physica D: Nonlinear Phenomena, 224(1-2):77–89, 2006.
  • [52] T. Nishikawa and A. E. Motter. Network synchronization landscape reveals compensatory structures, quantization, and the positive effect of negative interactions. Proceedings of the National Academy of Sciences, 107(23):10342–10347, 2010.
  • [53] R. Noori, D. Park, J. D. Griffiths, S. Bells, P. W. Frankland, D. Mabbott, and J. Lefebvre. Activity-dependent myelination: A glial mechanism of oscillatory self-organization in large-scale brain networks. Proceedings of the National Academy of Sciences, 117(24):13227–13237, 2020.
  • [54] M. J. Panaggio, M. Ciocanel, L. Lazarus, C. M. Topaz, and B. Xu. Model reconstruction from temporal data for coupled oscillator networks. Chaos: An Interdisciplinary Journal of Nonlinear Science, 29(10):103116, 2019.
  • [55] L. Papadopoulos, J. Z. Kim, J. Kurths, and D. S. Bassett. Development of structural correlations and synchronization from adaptive rewiring in networks of Kuramoto oscillators. Chaos: An Interdisciplinary Journal of Nonlinear Science, 27(7):073115, 2017.
  • [56] L. M. Pecora, F. Sorrentino, A. M. Hagerstrom, T. E. Murphy, and R. Roy. Cluster synchronization and isolated desynchronization in complex networks with symmetries. Nature Communications, 5(1):1–8, 2014.
  • [57] Louis M. Pecora and Thomas L. Carroll. Master stability functions for synchronized coupled systems. Physical Review Letters, 80:2109–2112, Mar 1998.
  • [58] A. Pikovsky, M. Rosenblum, and J. Kurths. Synchronization: A Universal Concept in Nonlinear Sciences. Cambridge University Press, 2003.
  • [59] A. Politi and M. Rosenblum. Equivalence of phase-oscillator and integrate-and-fire models. Physical Review E, 91(4):042916, 2015.
  • [60] A. Ponce-Alvarez, G. Deco, P. Hagmann, G. L. Romani, D. Mantini, and M. Corbetta. Resting-state temporal synchronization networks emerge from connectivity topology and heterogeneity. PLoS Computational Biology, 11(2):1–23, 02 2015.
  • [61] J. D. Power, A. L. Cohen, S. M. Nelson, G. S. Wig, K. A. Barnes, J. A. Church, A. C. Vogel, T. O. Laumann, F. M. Miezin, B. L. Schlaggar, and S. E. Petersen. Functional network organization of the human brain. Neuron, 72(4):665–678, 2011.
  • [62] Y. Qin, T. Menara, D. S. Bassett, and F. Pasqualetti. Phase-amplitude coupling in neuronal oscillator networks. Physical Review Research, 3(2), June 2021.
  • [63] H. Sakaguchi and Y. Kuramoto. A soluble active rotater model showing phase transitions via mutual entertainment. Progress of Theoretical Physics, 76(3):576–581, 1986.
  • [64] P. W. Sauer and M. A. Pai. Power System Dynamics and Stability. Prentice Hall, 1998.
  • [65] A. Schnitzler and J. Gross. Normal and pathological oscillatory communication in the brain. Nature Reviews Neuroscience, 6(4):285, 2005.
  • [66] K. Sharafutdinov, L. Rydin Gorjão, M. Matthiae, T. Faulwasser, and D. Witthaut. Rotor-angle versus voltage instability in the third-order model for synchronous generators. Chaos: An Interdisciplinary Journal of Nonlinear Science, 28(3):033117, 2018.
  • [67] P. S. Skardal and A. Arenas. Control of coupled oscillator networks with application to microgrid technologies. Science Advances, 1(7):e1500339, 2015.
  • [68] P. S. Skardal and A. Arenas. Memory selection and information switching in oscillator networks with higher-order interactions. Journal of Physics: Complexity, 2(1):015003, dec 2020.
  • [69] P. S. Skardal, D. Taylor, J. Sun, and A. Arenas. Collective frequency variation in network synchronization and reverse PageRank. Physical Review E, 93:042314, Apr 2016.
  • [70] F. Sorrentino, M. Di Bernardo, and F. Garofalo. Synchronizability and synchronization dynamics of weighed and unweighed scale free networks with degree mixing. International Journal of Bifurcation and Chaos, 17(07):2419–2434, 2007.
  • [71] F. Sorrentino and E. Ott. Network synchronization of groups. Physical Review E, 76(5):056114, 2007.
  • [72] I. Stewart, M. Golubitsky, and M. Pivato. Symmetry groupoids and patterns of synchrony in coupled cell networks. SIAM Journal on Applied Dynamical Systems, 2(4):609–646, 2003.
  • [73] S. H. Strogatz. Exploring complex networks. Nature, 410(6825):268–276, 2001.
  • [74] S. H. Strogatz. SYNC: The Emerging Science of Spontaneous Order. Hyperion, 2003.
  • [75] S. H. Strogatz and I. Stewart. Coupled oscillators and biological synchronization. Scientific American, 269(6):102–109, 1993.
  • [76] J. Sun, E. M. Bollt, and T. Nishikawa. Master stability functions for coupled nearly identical dynamical systems. EPL (Europhysics Letters), 85(6):60011, 2009.
  • [77] Y. Susuki, I. Mezić, and T. Hikihara. Coherent swing instability of power grids. Journal of nonlinear science, 21(3):403–439, 2011.
  • [78] A. Townsend, M. Stillman, and S. H. Strogatz. Dense networks that do not synchronize and sparse ones that do. Chaos: An Interdisciplinary Journal of Nonlinear Science, 30(8):083142, 2020.
  • [79] K. E. Trenberth. Spatial and temporal variations of the Southern Oscillation. Quarterly Journal of the Royal Meteorological Society, 102(433):639–653, 1976.
  • [80] M. P. Van Den Heuvel and H. E. Hulshoff Pol. Exploring the brain network: a review on resting-state fmri functional connectivity. European Neuropsychopharmacology, 20(8):519–534, 2010.
  • [81] M. van Wingerden, M. Vinck, J. Lankelma, and C. M. A. Pennartz. Theta-band phase locking of orbitofrontal neurons during reward expectancy. Journal of Neuroscience, 30(20):7078–7087, 2010.
  • [82] F. Varela, J. P. Lachaux, E. Rodriguez, and J. Martinerie. The brainweb: Phase synchronization and large-scale integration. Nature Reviews Neuroscience, 2(4):229–239, 2001.
  • [83] F. Váša, M. Shanahan, P. J. Hellyer, G. Scott, J. Cabral, and R. Leech. Effects of lesions on synchrony and metastability in cortical networks. Neuroimage, 118:456–467, 2015.
  • [84] J.-W. Wang and L.-L. Rong. Cascade-based attack vulnerability on the US power grid. Safety Science, 47(10):1332 – 1336, 2009.
  • [85] D. Witthaut and M. Timme. Braess’s paradox in oscillator networks, desynchronization and power outage. New Journal of Physics, 14(8):083036, aug 2012.
  • [86] D. Zelazo and M. Bürger. On the robustness of uncertain consensus networks. IEEE Transactions on Control of Network Systems, 4(2):170–178, 2017.
  • [87] F. Zhang and N. E. Leonard. Coordinated patterns of unit speed particles on a closed curve. Systems & Control Letters, 56(6):397–407, 2007.
  • [88] L. Zhu and D. J. Hill. Synchronization of Kuramoto oscillators: A regional stability framework. IEEE Transactions on Automatic Control, 65(12):5070–5082, 2020.
  • [89] R. D. Zimmerman, C. E. Murillo-Sánchez, and R. J. Thomas. MATPOWER: Steady-state operations, planning, and analysis tools for power systems research and education. IEEE Transactions on power systems, 26(1):12–19, 2010.

Supplementary Information

1 Supplementary Text

1.1 Comparison between our correlation metric and the Pearson correlation coefficient

In this work, we provide methods and principles to guarantee the emergence of phase-locked trajectories that describe functional patterns. The latter are defined utilizing ρij=<cos(θjθi)>t\rho_{ij}=<\cos(\theta_{j}-\theta_{i})>_{t}, instead of the classical Pearson correlation coefficient. The same metric is also utilized in [19] to quantify the similarity between BOLD signals in functional MRI recordings, and in [5], to quantify the synchrony in hierarchical networks.

To compare the two metrics, recall the definition of the classical (sample) Pearson correlation, which is a measure of linear correlation between two series of data, for vectors of samples yTy\in\mathbb{R}^{T} and zTz\in\mathbb{R}^{T}:

rij=i=1N(yiymean)(zizmean)i=1N(yiymean)2i=1N(zizmean)2,r_{ij}=\frac{\sum_{i=1}^{N}(y_{i}-y_{\mathrm{mean}})(z_{i}-z_{\mathrm{mean}})}{\sqrt{\sum_{i=1}^{N}(y_{i}-y_{\mathrm{mean}})^{2}}\sqrt{\sum_{i=1}^{N}(z_{i}-z_{\mathrm{mean}})^{2}}},

where ymeany_{\mathrm{mean}} and zmeanz_{\mathrm{mean}} denote the sample means of vectors yy and zz, respectively. Notice that the length TT of the vectors yy and zz depends on the sampling time and on the window length. We argue that our metric (equation (2) in the main text) is simply more convenient when dealing with periodic phase signals. While we could use the Pearson correlation coefficient to define functional pattern instead of our cosine-based metric, the former does not perform well on periodic signals that evolve on the unit circle, and is heavily dependent on the time window employed to collect the samples. Thus, specific adjustments are needed to define correlation patterns through Pearson correlation coefficient for the class of time series (phase trajectories) studied in this work.

As an example, consider two identical sinusoidal signals (i.e., phase-locked) with natural frequency ω=2π\omega=2\pi but shifted initial conditions: θ1(0)=0\theta_{1}(0)=0, θ2(0)=φ\theta_{2}(0)=\varphi, with φ(0,π]\varphi\in(0,~{}\pi]. Fig. 10 illustrates the differences between the Pearson correlation coefficient r12r_{12} and our correlation metric ρ12\rho_{12} computed over a time window of varying length and for different values of the initial phase shift φ\varphi. In all panels, the values of r12r_{12} vary at each point, emphasizing the dependence of the Pearson correlation coefficient from the length of the time window. Conversely, in all panels, the value of ρ12\rho_{12} remains unaltered by the choice of time window length.

In conclusion, we choose to define functional patterns through ρij=<cos(θjθi)>t\rho_{ij}=<\cos(\theta_{j}-\theta_{i})>_{t} because it is a convenient and suitable metric for this class of phase trajectories that naturally emerge in oscillator systems.

1.2 Stability results for functional patterns with angle differences larger than π2\frac{\pi}{2} in the case of line and cycle with positive weights

Consider a line network of nn (ordered) oscillators with positive-only weights that possesses an equilibrium for the phase difference dynamics satisfying |xi,i+1|>π2|x_{i,i+1}|>\frac{\pi}{2} for some i{1,,n1}i\in\{1,\dots,n-1\}. It is straightforward to deduce from the results on structural balance [86] that the considered equilibrium is unstable. This implies that the functional pattern associated with that equilibrium is unstable.

Intuitively, the simplest topology that lends itself to a characterization of stable phase configurations including |xi,j|>π2|x_{i,j}|>\frac{\pi}{2} and allowing only positive weights is the cycle (i.e., a line network where the first and last oscillators are connected). Consider a cycle network of n>4n>4 oscillators with positive weights, and denote with 𝒙cycle{\boldsymbol{x}}_{\mathrm{cycle}} a vector of the nn phase differences between connected oscillators. We find that, after a suitable relabeling of the oscillators for which x12x_{12} satisfies |x12|>π2|x_{12}|>\frac{\pi}{2}:

Theorem 2

(Stability of phase differences equilibria with |xij|>π2|x_{ij}|>\frac{\pi}{2} in cycle networks) The equilibrium 𝐱cycle=[x12x23xn1,n]𝖳=[γφ1φn1]𝖳{\boldsymbol{x}}_{\mathrm{cycle}}=[x_{12}~{}x_{23}~{}\dots~{}x_{n-1,n}]^{\mathsf{T}}=[\gamma~{}\varphi_{1}~{}\dots~{}\varphi_{n-1}]^{\mathsf{T}} with |γ|>π2|\gamma|>\frac{\pi}{2}, |φi|<π2|\varphi_{i}|<\frac{\pi}{2}, and φi=φni\varphi_{i}=\varphi_{n-i} for all i=1,,n1i=1,\dots,n-1, is stable if and only if

  • (i)

    Ai,i+1=A12sin(γ)sin(φi1)A_{i,i+1}=A_{12}\frac{\sin(\gamma)}{\sin(\varphi_{i-1})}
    for i=2,,ni=2,\dots,n, with ni+31n-i+3\triangleq 1 if i=2i=2, and n+11{n+1}\triangleq 1;

  • (ii)

    |cotγ|(tan(φ1)++tan(φn1))1|\cot{\gamma}|\leq\left(\tan(\varphi_{1})+\dots+\tan(\varphi_{n-1})\right)^{-1}.

Moreover, if φ1==φn1\varphi_{1}=\dots=\varphi_{n-1} and nn\to\infty, the largest possible value for γ\gamma such that 𝐱cycle\boldsymbol{x}_{\mathrm{cycle}} is stable tends to the value γ1.789776\gamma\approx 1.789776, which is the solution to γtan(γ)=2π\gamma-\tan(\gamma)=2\pi.

Proof of Theorem 2:   To assess the stability of the equilibrium 𝒙¯cycle=[x12x23xn1,n]𝖳=[γφ1φn1]𝖳\bar{\boldsymbol{x}}_{\mathrm{cycle}}=[x_{12}~{}x_{23}~{}\dots~{}x_{n-1,n}]^{\mathsf{T}}=[\gamma~{}\varphi_{1}~{}\dots~{}\varphi_{n-1}]^{\mathsf{T}} with |γ|>π2|\gamma|>\frac{\pi}{2}, |φi|<π2|\varphi_{i}|<\frac{\pi}{2}, and φi=φni\varphi_{i}=\varphi_{n-i} for all i=1,,n1i=1,\dots,n-1, we analyze the spectrum of the Jacobian J(𝒙cycle)=(𝒙cycle)J({\boldsymbol{x}}_{\mathrm{cycle}})=-\mathcal{L}({\boldsymbol{x}}_{\mathrm{cycle}}). From Ref. [86, Corollary IV.7], we have that a necessary and sufficient condition for the Laplacian matrix (𝒙cycle)\mathcal{L}({\boldsymbol{x}}_{\mathrm{cycle}}) of the cosine-scaled network to be positive semidefinite is

|A12cos(γ)|121,|{A_{12}}\cos(\gamma)|\leq\mathcal{R}_{12}^{-1}, (15)

with 12\mathcal{R}_{12} being the effective resistance of the graph in which the edge (1,2)(1,2) has been removed. That is,

12=1A23cos(φ1)++1An1,ncos(φn1).\mathcal{R}_{12}=\frac{1}{{A_{23}}\cos(\varphi_{1})}+\dots+\frac{1}{{A_{n-1,n}}\cos(\varphi_{n-1})}. (16)

Since the adjacency matrix satisfies A=A𝖳A=A^{\mathsf{T}} and 𝒙cycle{\boldsymbol{x}}_{\mathrm{cycle}} is an equilibrium for the difference dynamics of the cycle network, the network weights must be identical pairwise:

Ai,i+1=Ani+2,ni+3=A12sin(γ)sin(φi1),A_{i,i+1}=A_{n-i+2,n-i+3}=A_{12}\frac{\sin(\gamma)}{\sin(\varphi_{i-1})}, (17)

for i=2,,ni=2,\dots,n with the convention ni+31n-i+3\triangleq 1 if i=2i=2. Thus, the angles being identical pairwise implies that the network weights must also be identical pairwise, which yields condition (i) of Theorem 2. Moreover, plugging the network weights from equation (17) into equation (16) yields

12=tan(φ1)A12sin(γ)++tan(φn1)A12sin(γ),\mathcal{R}_{12}=\frac{\tan(\varphi_{1})}{{A_{12}}\sin(\gamma)}+\dots+\frac{\tan(\varphi_{n-1})}{{A_{12}}\sin(\gamma)}, (18)

which makes the condition in Eq. (15) become, after algebraic calculations, condition (ii) of Theorem 2:

|cotγ|(tan(φ1)++tan(φn1))1.|\cot{\gamma}|\leq\left(\tan(\varphi_{1})+\dots+\tan(\varphi_{n-1})\right)^{-1}. (19)

Thus, given that the Laplacian (𝒙cycle)\mathcal{L}({\boldsymbol{x}}_{\mathrm{cycle}}) is positive definite, the Jacobian J(𝒙cycle)J({\boldsymbol{x}}_{\mathrm{cycle}}) is stable, and its only zero eigenvalue is due to rotational symmetry of the right-hand side of the Kuramoto dynamics (equation (2) of the main manuscript).

For φ1==φn1\varphi_{1}=\dots=\varphi_{n-1}, we have that

φi=2πγn1.\varphi_{i}=\frac{2\pi-\gamma}{n-1}.

Hence, the right-hand side of equation (19) becomes cot(φ)n1\frac{\cot(\varphi)}{n-1}, and limncot(φ)n1=12πγ\lim_{n\to\infty}\frac{\cot(\varphi)}{n-1}=\frac{1}{2\pi-\gamma}. Since |γ|>π2|\gamma|>\frac{\pi}{2}, plugging the limit value for 12πγ\frac{1}{2\pi-\gamma} into equation (19) and solving for the equality yields γtan(γ)=2π\gamma-\tan(\gamma)=2\pi, whose unique solution is γ1.789776\gamma\approx 1.789776. This concludes the proof. acksquareacksquare

1.3 Functional patterns possess at most almost-global stability in positive cluster-synchronized networks

In general, the analysis and estimation of the basin of attraction of nonlinear systems remains an outstanding problem, and even the most recent results rely on numerical approaches or heavy modeling assumptions [16]. To the best of our knowledge, Ref. [88] provides the most up-to-date study of the basins of attraction of synchronized Kuramoto oscillators. However, the authors in Ref. [88] only derive estimates of the basin of attraction for the fully synchronized case in networks of identical oscillators. Below, we show that functional patterns associated with phase-locked trajectories in cluster-synchronized positive networks are at most almost-globally stable. Our results extend previous work on identical oscillators to the case of oscillators with heterogeneous natural frequencies.

Existing literature shows that the number of equilibria for the phase differences of heterogeneous oscillators evolving on random graphs increases significantly with the cardinality of the network [44]. Therefore, we begin by restricting our analysis to the case of identical oscillators. In general, for any connected network of identical oscillators with cooperative connections Aij0A_{ij}\geq 0, there is no unique pattern. In fact, the largest basin of attraction is achieved by 𝕊1\mathbb{S}^{1}-synchronizing graphs (e.g., complete graphs, acyclic graphs, and sufficiently dense graphs [22, 78]), which feature almost-global stability of the fully synchronized functional pattern. In this class of networks, the only stable equilibrium 𝒙{\boldsymbol{x}} satisfies xij=0x_{ij}=0 for all i,ji,j, and there exists a finite number of unstable equilibria. For instance, consider two connected identical oscillators: ω1=ω2\omega_{1}=\omega_{2}. The only stable equilibrium for the phase differences dynamics is x12=θ2θ1=0x_{12}=\theta_{2}-\theta_{1}=0. Yet, there also exists an unstable equilibrium x12=πx_{12}=\pi. Note that, in general, almost-global stability cannot be guaranteed for arbitrary classes of sparse networks of identical oscillators, as other synchronization manifolds besides the fully synchronized one can be stable – for example, splay states emerge in Cayley graphs [43]. This latter class of graphs admits two stable equilibria (full synchronization and splay states), which implies the coexistence of two stable patterns.

We can generalize the above observations to networks of heterogeneous oscillators. To do so, we leverage cluster synchronization – a phenomenon where distinct groups of synchronized oscillators coexist in a network [46] – of 𝕊1\mathbb{S}^{1}-synchronizing clusters with possibly different natural frequencies. We consider cluster synchronization in networks with a partition of the oscillators 𝒞={𝒞1,,𝒞m}\mathcal{C}=\{\mathcal{C}_{1},\dots,\mathcal{C}_{m}\}, with 𝒞k𝒪\mathcal{C}_{k}\subseteq\mathcal{O} being a subset of the network oscillators constituting an 𝕊1\mathbb{S}^{1}-synchronizing graph, k{1,,m}k\in\{1,\dots,m\}, where k=1m𝒞k=𝒪\bigcup_{k=1}^{m}\mathcal{C}_{k}=\mathcal{O} and 𝒞k𝒞=\mathcal{C}_{k}\cap\mathcal{C}_{\ell}=\emptyset if kk\neq\ell. Further, ωi=ωj\omega_{i}=\omega_{j} for every i,j𝒞ki,j\in\mathcal{C}_{k}, k{1,,m}k\in\{1,\dots,m\}.111This is a necessary and sufficient condition for cluster synchronization [46]. Whenever cluster synchronization emerges, the diagonal blocks (of sizes |𝒞k|×|𝒞k||\mathcal{C}_{k}|\times|\mathcal{C}_{k}|, k=1,,mk=1,\dots,m) of the functional pattern associated with partition 𝒞\mathcal{C} satisfy ρij=1\rho_{ij}=1 (see Supplementary Fig. 15).222Without loss of generality, we assume that the network oscillators are labeled such that consecutive labels belong to the same cluster. Thus, for a given number of clusters m1m\geq 1, each of the (nm){n\choose m} possible ways to partition the network yields a functional pattern with diagonal blocks corresponding to synchronized clusters.

By extending the above observations on the stability of 𝕊1\mathbb{S}^{1}-synchronizing graphs, we find that, in networks where at least one cluster satisfies |𝒞k|2|\mathcal{C}_{k}|\geq 2, at most almost-global stability of cluster-synchronized functional patterns can be achieved. In fact, for any choice of intra-cluster phase differences from the finite set of unstable equilibria in 𝕊1\mathbb{S}^{1}-synchronizing graphs (i.e., xij=πx_{ij}=\pi for at least one intra-cluster phase difference), there exists a value for the inter-cluster phase differences for which the network admits phase-locked trajectories where intra-cluster phase differences satisfy xij=0x_{ij}=0 or xij=πx_{ij}=\pi.

As an example, consider a 44-oscillator network partitioned as 𝒞={𝒞1,𝒞2}\mathcal{C}=\{\mathcal{C}_{1},\mathcal{C}_{2}\}, where 𝒞1={1,2}\mathcal{C}_{1}=\{1,2\} and 𝒞2={3,4}\mathcal{C}_{2}=\{3,4\}. The network parameters read

A=[0520500220060260] and 𝝎=[1122].A=\begin{bmatrix}0&5&2&0\\ 5&0&0&2\\ 2&0&0&6\\ 0&2&6&0\end{bmatrix}\ \text{ and }\ \boldsymbol{\omega}=\begin{bmatrix}1\\ 1\\ 2\\ 2\\ \end{bmatrix}.

Note that the two clusters are 𝕊1\mathbb{S}^{1}-synchronizing graphs. It can be shown that there exists an unstable equilibrium at 𝒙desired=[x12x23x34]𝖳=[π0.25268π]𝖳{\boldsymbol{x}}_{\mathrm{desired}}=[x_{12}~{}x_{23}~{}x_{34}]^{\mathsf{T}}=[\pi~{}0.25268~{}\pi]^{\mathsf{T}}. Thus, whenever the pattern RR associated to the partition 𝒞\mathcal{C} is stable, it is at most almost-globally stable.

1.4 Allocation of multiple phase-locked equilibria by tailoring of the network structural parameters

The convex optimization problem proposed in the main text allows to tailor the network weights and the natural frequencies of the oscillators to specify multiple equilibria for the dynamics of the phase differences 𝒙{\boldsymbol{x}}. These equilibria correspond to phase trajectories θ\theta that evolve with constant, desired phase differences.

We now provide an example where we jointly impose, for a complete graph of n=7n=7 oscillators, two equilibria for the phase difference dynamics. Specifically, by taking θ1\theta_{1} as a reference, we choose two points for the phase differences x1i=θiθ1x_{1i}=\theta_{i}-\theta_{1} to be set as equilibria: 𝒙desired(1)=[π6π6π4π4π6π4]𝖳{\boldsymbol{x}}^{(1)}_{\mathrm{desired}}=\left[\frac{\pi}{6}~{}\frac{\pi}{6}~{}\frac{\pi}{4}~{}\frac{\pi}{4}~{}\frac{\pi}{6}~{}\frac{\pi}{4}\right]^{\mathsf{T}} and 𝒙desired(2)=[π8π3π4π4π6π4]𝖳{\boldsymbol{x}}^{(2)}_{\mathrm{desired}}=\left[\frac{\pi}{8}~{}\frac{\pi}{3}~{}\frac{\pi}{4}~{}\frac{\pi}{4}~{}\frac{\pi}{6}~{}\frac{\pi}{4}\right]^{\mathsf{T}}. The initial network parameters (adjacency matrix and zero-mean natural frequencies) read as:

A=[0222222202222222022222220222222202222222022222220]and𝝎=[0.31600.12660.14370.27710.35930.33630.0854],A=\begin{bmatrix}0&2&2&2&2&2&2\\ 2&0&2&2&2&2&2\\ 2&2&0&2&2&2&2\\ 2&2&2&0&2&2&2\\ 2&2&2&2&0&2&2\\ 2&2&2&2&2&0&2\\ 2&2&2&2&2&2&0\end{bmatrix}\ \text{and}\ {\boldsymbol{\omega}}=\begin{bmatrix}0.3160\\ -0.1266\\ 0.1437\\ 0.2771\\ -0.3593\\ -0.3363\\ 0.0854\end{bmatrix},

respectively. To impose the desired equilibria, we numerically solve the following convex problem through standard cvx routines [32]:

min𝜶\displaystyle\min_{\boldsymbol{\alpha}} 𝜹+𝜶1\displaystyle\ \ \ \|\boldsymbol{\delta}+\boldsymbol{\alpha}\|_{1}
subject to [BD(𝒙(1))BD(𝒙(2))](𝜹+𝜶)=[𝝎𝝎].\displaystyle\ \ \begin{bmatrix}BD\left({\boldsymbol{x}}^{(1)}\right)\\[5.0pt] BD\left({\boldsymbol{x}}^{(2)}\right)\end{bmatrix}(\boldsymbol{\delta}+\boldsymbol{\alpha})=\begin{bmatrix}{\boldsymbol{\omega}}\\ {\boldsymbol{\omega}}\end{bmatrix}.

The solution 𝜶\boldsymbol{\alpha}^{*} yields the following corrected adjacency matrix:

Ac=[04.28411.37311.67202.55762.43331.93824.284103.03792.93612.904122.92521.37313.037900.70260.69490.52210.71.67202.93610.702602222.55762.90410.694920222.433320.522122021.93822.92520.72220].A_{\mathrm{c}}=\begin{bmatrix}0&4.2841&1.3731&-1.6720&-2.5576&2.4333&-1.9382\\ 4.2841&0&-3.0379&2.9361&2.9041&2&2.9252\\ 1.3731&-3.0379&0&0.7026&0.6949&0.5221&0.7\\ -1.6720&2.9361&0.7026&0&2&2&2\\ -2.5576&2.9041&0.6949&2&0&2&2\\ 2.4333&2&0.5221&2&2&0&2\\ -1.9382&2.9252&0.7&2&2&2&0\end{bmatrix}.

An investigation of the Jacobian spectrum (see main text for results on stability) of the phase differences computed at the two equilibria 𝒙desired(1){\boldsymbol{x}}^{(1)}_{\mathrm{desired}} and 𝒙desired(2){\boldsymbol{x}}^{(2)}_{\mathrm{desired}} reveals that the first equilibrium point is unstable and that the second one is locally stable. We illustrate the outcome of the above procedure to specify multiple equilibria in Fig. 6b in the main text, where the phase differences start at 𝒙desired(1){\boldsymbol{x}}^{(1)}_{\mathrm{desired}} at time t=0t=0, and converge to 𝒙desired(2){\boldsymbol{x}}^{(2)}_{\mathrm{desired}} after a perturbation is applied at t=50t=50 to force them out from the equilibrium 𝒙desired(1){\boldsymbol{x}}^{(1)}_{\mathrm{desired}}.

1.5 A heuristic method to promote stability of functional patterns in positive networks

To promote stability of functional patterns with phase differences |xij|>π2|x_{ij}|>\frac{\pi}{2}, it is advantageous to design the network weights by minimizing the ones associated to a cos(xij)<0\cos(x_{ij})<0 (i.e., reducing AijA_{ij} as much as possible) in the cosine-scaled network. Reducing the magnitude of these coupling strengths, or even pruning such interconnections, causes the Gerschgorin disks of the Laplacian (𝒙desired)\mathcal{L}({\boldsymbol{x}}_{\mathrm{desired}}) to lie almost entirely in the right half-plane. In fact, by considering the limit case where all negative connections in the cosine-scaled network are pruned, if the remaining connections describe a connected network, then the Laplacian becomes a classical positive semi-definite Laplacian. This guarantees stability of the desired functional pattern and motivates the following heuristic procedure.

To showcase the effectiveness of the proposed heuristic method to promote stability, we construct an example with n=7n=7 oscillators, ||=9|\mathcal{E}|=9 interconnections, and desired minimum vector of phase differences

𝒙desired(1)=[21π32π6π6π8π8π3]𝖳,{\boldsymbol{x}}_{\text{desired}}^{(1)}=\left[\frac{21\pi}{32}~{}\frac{\pi}{6}~{}\frac{\pi}{6}~{}\frac{\pi}{8}~{}\frac{\pi}{8}~{}\frac{\pi}{3}\right]^{\mathsf{T}},

where xij=θjθ1x_{ij}=\theta_{j}-\theta_{1}, j=2,,7j=2,\dots,7. Notice that the first difference x12>π/2x_{12}>\pi/2, hence cos(x12)<0\cos(x_{12})<0. Consider the oscillator network with structural parameters that read as:

A=[00.1706000.5796000.170601.3434000001.34340222.21400002001.23920.34320.5796020020002.21401.23922000000.3432000]and𝝎¯=[0.34240.46830.20230.00990.03930.45070.1716].A=\begin{bmatrix}0&0.1706&0&0&0.5796&0&0\\ 0.1706&0&1.3434&0&0&0&0\\ 0&1.3434&0&2&2&2.2140&0\\ 0&0&2&0&0&1.2392&0.3432\\ 0.5796&0&2&0&0&2&0\\ 0&0&2.2140&1.2392&2&0&0\\ 0&0&0&0.3432&0&0&0\\ \end{bmatrix}\ \text{and}\ \bar{\boldsymbol{\omega}}=\begin{bmatrix}-0.3424\\ 0.4683\\ 0.2023\\ -0.0099\\ -0.0393\\ -0.4507\\ 0.1716\end{bmatrix}. (20)

Such a network admits the following phase-locked equilibrium

𝒙desired(0)=[π4π6π6π8π8π3]𝖳,{\boldsymbol{x}}_{\text{desired}}^{(0)}=\left[\frac{\pi}{4}~{}\frac{\pi}{6}~{}\frac{\pi}{6}~{}\frac{\pi}{8}~{}\frac{\pi}{8}~{}\frac{\pi}{3}\right]^{\mathsf{T}},

which differs from 𝒙desired(1){\boldsymbol{x}}_{\text{desired}}^{(1)} only in x12x_{12}, and has all xijx_{ij} satisfying |xij|<π/2|x_{ij}|<\pi/2 (thus generating a stable functional pattern). Supplementary Fig. 13a-b illustrate the stability of 𝒙desired(0){\boldsymbol{x}}_{\text{desired}}^{(0)} and the functional pattern R0R_{0} associated with this equilibrium.

The network considered in this example has 99 interconnections that can be modified, and the desired equilibrium 𝒙desired(1){\boldsymbol{x}}_{\text{desired}}^{(1)} implies that 𝒩={1}\mathcal{N}=\{1\}, so that 𝜶𝒩\boldsymbol{\alpha}_{\mathcal{N}} is the modification of the first interconnection. To compute the optimal tuning of the network weights we solve the optimization (through standard cvx routines [32])

min𝜶\displaystyle\min_{\boldsymbol{\alpha}} 𝜹𝒩+𝜶𝒩1\displaystyle\ \ \left\|\boldsymbol{\delta}_{\mathcal{N}}+\boldsymbol{\alpha}_{\mathcal{N}}\right\|_{1} (21)
subjectto\displaystyle\mathrm{subject~{}to} BD(𝒙)(𝜹+𝜶)=𝝎,\displaystyle\ \ BD({\boldsymbol{x}})(\boldsymbol{\delta}+\boldsymbol{\alpha})={\boldsymbol{\omega}},
and\displaystyle\mathrm{and} (𝜹+𝜶)0.\displaystyle\ \ (\boldsymbol{\delta}+\boldsymbol{\alpha})\geq 0.

The optimal 𝜶\boldsymbol{\alpha}^{*} reads

𝜶=[0.17060.31520.8748590.924200059]𝖳,\boldsymbol{\alpha}^{*}=[-0.1706~{}0.3152~{}-0.8748~{}59~{}0.9242~{}0~{}0~{}0~{}59]^{\mathsf{T}},

and the adjusted network adjacency matrix becomes:

A~=[0𝟎000.894800𝟎00.4686000000.46860612.92422.214000061001.23920.34320.894802.924200610002.21401.239261000000.3432000],\tilde{A}=\begin{bmatrix}0&{\color[rgb]{1,0,0}\boldsymbol{0}}&0&0&0.8948&0&0\\ {\color[rgb]{1,0,0}\boldsymbol{0}}&0&{0.4686}&0&0&0&0\\ 0&{0.4686}&0&61&2.9242&2.2140&0\\ 0&0&61&0&0&1.2392&0.3432\\ 0.8948&0&2.9242&0&0&61&0\\ 0&0&2.2140&1.2392&61&0&0\\ 0&0&0&0.3432&0&0&0\\ \end{bmatrix}, (22)

where the optimal network correction 𝜶\boldsymbol{\alpha}^{*} has disconnected the entry A12A_{12} (highlighted in red). The matrix A~\tilde{A} guarantees stability of the functional pattern associated with 𝒙desired(1){\boldsymbol{x}}_{\text{desired}}^{(1)}, as we illustrate in Supplementary Fig. 13c-d.

In practice, one may jointly optimize the network weights to satisfy the equilibrium constraints and the heuristic stability strategy while trying to keep the overall modification as small as possible. To do so, we let 𝒫\mathcal{P} (resp., 𝒩\mathcal{N}) denote the set of indices associated with Aijcos(xij)>0A_{ij}\cos(x_{ij})>0 (resp., Aijcos(xij)<0A_{ij}\cos(x_{ij})<0). Then, the optimization problem that enacts the proposed strategy reads as:

min𝜶\displaystyle\min_{\boldsymbol{\alpha}} c1𝜶𝒫+c2𝜹𝒩+𝜶𝒩\displaystyle\ \ c_{1}\left\|\boldsymbol{\alpha}_{\mathcal{P}}\right\|_{\star}+c_{2}\left\|\boldsymbol{\delta}_{\mathcal{N}}+\boldsymbol{\alpha}_{\mathcal{N}}\right\|_{\star} (23)
subjectto\displaystyle\mathrm{subject~{}to} BD(𝒙)(𝜹+𝜶)=𝝎,\displaystyle\ \ BD({\boldsymbol{x}})(\boldsymbol{\delta}+\boldsymbol{\alpha})={\boldsymbol{\omega}},
(𝜹+𝜶)0,\displaystyle\ \ (\boldsymbol{\delta}+\boldsymbol{\alpha})\geq 0,

where \|\cdot\|_{\star} is a desired vector norm, c1,c2>0c_{1},c_{2}>0 are arbitrary penalty coefficients, 𝜶𝒫\boldsymbol{\alpha}_{\mathcal{P}} denotes the entries of the tuning vector 𝜶\boldsymbol{\alpha} that are associated to positive weights in the cosine-scaled network, and 𝜶𝒩\boldsymbol{\alpha}_{\mathcal{N}} denotes the entries of the tuning vector 𝜶\boldsymbol{\alpha} that are associated to negative weights 𝜹𝒩\boldsymbol{\delta}_{\mathcal{N}} in the cosine-scaled network.

To compute the optimal tuning of the network weights in the same 77-oscillator network above, we solve the optimization in Eq. (23) with c1=0.1c_{1}=0.1 and c2=10c_{2}=10 by minimizing the 1\ell_{1}-norm. The optimal 𝜶\boldsymbol{\alpha}^{*} reads

𝜶=[0.17060.31520.874800.92420000]𝖳,\boldsymbol{\alpha}^{*}=[-0.1706~{}0.3152~{}-0.8748~{}0~{}0.9242~{}0~{}0~{}0~{}0]^{\mathsf{T}},

and the adjusted network adjacency matrix becomes:

A~=[0𝟎000.894800𝟎00.4686000000.4686022.92422.21400002001.23920.34320.894802.92420020002.21401.23922000000.3432000],\tilde{A}=\begin{bmatrix}0&{\color[rgb]{1,0,0}\boldsymbol{0}}&0&0&0.8948&0&0\\ {\color[rgb]{1,0,0}\boldsymbol{0}}&0&0.4686&0&0&0&0\\ 0&0.4686&0&2&2.9242&2.2140&0\\ 0&0&2&0&0&1.2392&0.3432\\ 0.8948&0&2.9242&0&0&2&0\\ 0&0&2.2140&1.2392&2&0&0\\ 0&0&0&0.3432&0&0&0\\ \end{bmatrix},

where, as in the procedure above, the optimal network correction α\alpha has disconnected the entry A12A_{12} (highlighted in red). Supplementary Fig. 14 illustrates the shift of the Jacobian’s eigenvalues while the optimal tuning vector 𝜶\boldsymbol{\alpha}^{*} is gradually applied. The main differences with respect to the minimization in (21) is that the norm of 𝜶\boldsymbol{\alpha}^{*} is smaller, and the eigenvalues of A~\tilde{A} are closer to the original ones in AA.

1.6 Extension of the proposed optimization methods to directed networks

By relaxing the assumption on symmetric adjacency matrices, the matrix form of an oscillator network with Kuramoto dynamics in equation (3) of the main text does not hold anymore and requires a rewriting. In what follows, we use the subscript “d\mathrm{d}” to indicate notation associated to directed graphs. Specifically, d\mathcal{E}_{\mathrm{d}} denote the oriented edge set, so that Dd|d|×|d|D_{\mathrm{d}}\in\mathbb{R}^{|\mathcal{E}_{\mathrm{d}}|\times\mathcal{|}\mathcal{E}_{\mathrm{d}}|} and 𝜹d|d|\boldsymbol{\delta}_{\mathrm{d}}\in\mathbb{R}^{|\mathcal{E}_{\mathrm{d}}|} denote the diagonal matrix of all sin(xij)\sin(x_{ij}) with (j,i)d(j,i)\in\mathcal{E}_{\mathrm{d}}, and the vector of all the network weights A(i,j)0A(i,j)\neq 0, respectively. Further, let us define Bsourcen×|d|B_{\mathrm{source}}\in\mathbb{R}^{n\times|\mathcal{E}_{\mathrm{d}}|} the modified incidence matrix whose columns have nonzero entries only at the edges’ sources. That is, Bsource,k=1B_{\mathrm{source},{k\ell}}=-1 if kk is the source of the interconnection \ell, and Bsource,k=0B_{\mathrm{source},{k\ell}}=0 otherwise. These definitions allow us to define the matrix form for a directed network of Kuramoto oscillators:

𝜽˙=[ω1ωn]𝖳BsourceDd(𝒙)𝜹d.\dot{\boldsymbol{\theta}}=[\omega_{1}~{}\cdots~{}\omega_{n}]^{\mathsf{T}}-B_{\mathrm{source}}D_{\mathrm{d}}(\boldsymbol{x})\boldsymbol{\delta}_{\mathrm{d}}. (24)

The main change in the behavior of directed networks with respect to undirected ones is that the frequencies 𝜽˙\dot{\boldsymbol{\theta}} of phase-locked trajectories do not typically converge to the average natural frequency (i.e., 𝜽˙ωmean𝟏\dot{\boldsymbol{\theta}}\neq\omega_{\mathrm{mean}}\boldsymbol{1}). For phase-locked trajectories we have that 𝜽˙=ωsync𝟏\dot{\boldsymbol{\theta}}=\omega_{\mathrm{sync}}\boldsymbol{1}, where the constant ωsync\omega_{\mathrm{sync}}\in\mathbb{R} is not known a priori, and can only be estimated in the almost-fully synchronized regime |θi(t)θj(t)|1|\theta_{i}(t)-\theta_{j}(t)|\ll 1 for all i,j𝒪i,j\in\mathcal{O} [69]. Yet, not knowing ωsync\omega_{\mathrm{sync}} as we do in the undirected case does not prevent the definition of a framework that can enforce a target functional pattern. In fact, by using equation (24) we can concurrently achieve the functional pattern associated with 𝒙¯desired\bar{\boldsymbol{x}}_{\mathrm{desired}} and assign a desired phase-locked frequency ωsync\omega_{\mathrm{sync}}. To do so, we utilize equation (24) above with 𝜽˙=ωsync𝟏\dot{\boldsymbol{\theta}}=\omega_{\mathrm{sync}}\boldsymbol{1} as a constraint in the optimization problems proposed in the main text. This modification allows us to extend any of the control methods to achieve desired functional relationships to directed networks.

As an example of optimization of the coupling strengths, we solve

min𝜶\displaystyle\min_{\boldsymbol{\alpha}} 𝜶1\displaystyle\left\|\boldsymbol{\alpha}\right\|_{1} (25)
subjectto\displaystyle\mathrm{subject~{}to} 𝝎BsourceDd(𝒙)(𝜹d+𝜶)=ωsync𝟏,\displaystyle\boldsymbol{\omega}-B_{\mathrm{source}}D_{\mathrm{d}}(\boldsymbol{x})(\boldsymbol{\delta}_{\mathrm{d}}+\boldsymbol{\alpha})=\omega_{\mathrm{sync}}\boldsymbol{1}, (25a)

for a network of n=7n=7 oscillators with adjacency matrix and natural frequencies as follows:

Ad=[0𝟎11111101111111011111110111111101111111011111110]and𝝎=0.1[1234567],A_{\mathrm{d}}=\begin{bmatrix}0&{\color[rgb]{1,0,0}\boldsymbol{0}}&1&1&1&1&1\\ 1&0&1&1&1&1&1\\ 1&1&0&1&1&1&1\\ 1&1&1&0&1&1&1\\ 1&1&1&1&0&1&1\\ 1&1&1&1&1&0&1\\ 1&1&1&1&1&1&0\end{bmatrix}\ \text{and}\ {\boldsymbol{\omega}}=0.1\cdot\begin{bmatrix}1\\ 2\\ 3\\ 4\\ 5\\ 6\\ 7\end{bmatrix},

where the entry highlighted in red is the one causing the asymmetry in the network coupling. The target phase differences x1ix_{1i} are 𝒙desired=[π3π4π6π8π8π6]𝖳{\boldsymbol{x}}_{\mathrm{desired}}=\left[\frac{\pi}{3}~{}\frac{\pi}{4}~{}\frac{\pi}{6}~{}\frac{\pi}{8}~{}\frac{\pi}{8}~{}\frac{\pi}{6}\right]^{\mathsf{T}}, and the desired phase locking frequency is ωsync=1\omega_{\mathrm{sync}}=1 rad/sec. The solution 𝜶\boldsymbol{\alpha}^{*} to problem (25) above yields

Ad=[001.223811113.78320111112.43841011110.39781.60221011110.39251101110.2282111010.69781.302211110].A_{\mathrm{d}}=\begin{bmatrix}0&0&-1.2238&1&1&1&1\\ -3.7832&0&1&1&1&1&1\\ -2.4384&1&0&1&1&1&1\\ 0.3978&1.6022&1&0&1&1&1\\ 1&0.3925&1&1&0&1&1\\ 1&0.2282&1&1&1&0&1\\ 0.6978&1.3022&1&1&1&1&0\end{bmatrix}.

Supplementary Fig. 12 illustrates that the phase trajectories associated with such a solution achieve the target functional pattern.

We conclude this discussion by remarking that, besides our optimization problems, the sufficient conditions (i.a), (i.b), and (i.c) in the main text for the existence of positive coupling strengths that realize a target pattern can also be adapted to the case of directed networks. To show this, we let 𝝎d=[ω1ωsyncωnωsync]𝖳{\boldsymbol{\omega}}_{\mathrm{d}}=[\omega_{1}-\omega_{\text{sync}}~{}\cdots~{}\omega_{n}-\omega_{\text{sync}}]^{\mathsf{T}} and B¯source=Bsourcesign(Dd(𝒙))\bar{B}_{\mathrm{source}}=B_{\mathrm{source}}~{}\mathrm{sign}(D_{\mathrm{d}}(\boldsymbol{x})). Then, a sufficient condition for the existence of positive network weights that achieve a desired functional pattern is the following one.

There exists 𝛅0{\boldsymbol{\delta}}\geq 0 such that BsourceDd(𝐱)𝛅d=𝛚dB_{\mathrm{source}}D_{\mathrm{d}}({\boldsymbol{x}}){\boldsymbol{\delta}_{\mathrm{d}}}={\boldsymbol{\omega}}_{\mathrm{d}} if there exists a set 𝒮\mathcal{S} satisfying:

  1. (iii.a)

    Ddii(𝐱)Ddjj(𝐱)Bsource:,i𝖳Bsource:,j0D_{\mathrm{d}_{ii}}(\boldsymbol{x})D_{\mathrm{d}_{jj}}(\boldsymbol{x})B_{\mathrm{source}_{:,i}}^{\mathsf{T}}B_{\mathrm{source}_{:,j}}\leq 0 for all i,j𝒮i,j\in\mathcal{S} with iji\neq j;

  2. (iii.b)

    𝛚d𝖳Bsource:,iDdii(𝐱)>0{\boldsymbol{\omega}}_{\mathrm{d}}^{\mathsf{T}}B_{\mathrm{source}_{:,i}}D_{\mathrm{d}_{ii}}(\boldsymbol{x})>0 for all i𝒮i\in\mathcal{S};

  3. (iii.c)

    𝛚dIm(Bsource:,𝒮){\boldsymbol{\omega}}_{\mathrm{d}}\in\mathrm{Im}(B_{\mathrm{source}_{:,\mathcal{S}}}).

Note that, since ωsync\omega_{\mathrm{sync}} is not known a priori in most cases, these conditions are hard to check.

1.7 Coupled Kuramoto oscillators to approximate fMRI data

The interaction between static large-scale structural architecture of the human brain and local oscillations of neural communities is a key factor in the functional connectivity patterns that are empirically observed through functional magnetic resonance imaging (fMRI) when the brain is in a resting-state condition [80]. In the last two decades, extensive literature has resorted to Kuramoto phase oscillators to model fMRI data [20, 60, 59, 14, 83, 37, 45]. Many works, such as Ref. [60] and Ref. [14], focus on the analysis of the oscillatory behaviors of neural populations that lead the emergence of functionally connected networks by modeling fMRI data as the output of networks of Kuramoto oscillators. The main working assumption is that at each node of the structural brain network there exists a community of excitatory and inhibitory neurons whose dynamical state is in a regime of self-sustained oscillations. From a modeling standpoint, this assumption is equivalent to employing a network of weakly coupled Wilson-Cowan oscillators [35, 18], or to a supercritical Andronov-Hopf bifurcation, such as the Stuart-Landau model in oscillatory regime [49]. In this setting, the neurons’ firing rates describe a closed periodic trajectory in phase space; that is, the firing rates delineate a limit cycle. Thus, the dynamics can be approximated by a single variable, which is the angle (or phase) on this cycle. This regime is then modeled by a network of coupled heterogeneous Kuramoto oscillators that are connected to each other according to the architecture of the human brain.

1.8 Procedure to extract phase-locked trajectories from fMRI data

Following the procedure in Ref. [60], we apply a narrow-band filter in the low frequency range [0.040.07][0.04~{}0.07] Hz to the time series for each brain region. Next, to obtain a measure of the functional synchrony between the brain regions, we generate the n×nn\times n functional connectivity matrix F{F}, whose entry Fij{F}_{ij} indicates the pairwise Pearson correlation coefficient between filtered time series of recorded neural activity. To map these functional correlations to the phase domain, we extracted the phase time series 𝜽~(t)\tilde{\boldsymbol{\theta}}(t) by applying a Hilbert Transform to the filtered signals. From 𝜽~(t)\tilde{\boldsymbol{\theta}}(t), one can identify time windows over which frequency synchronization emerges with the aid of the phase-locking value matrix P=[Pij]P=[P_{ij}], where

Pij(t0,tf)=1tft0t=t0tf|e𝗂[θj(t)θi(t)]|.P_{ij}(t_{0},t_{f})=\frac{1}{t_{f}-t_{0}}\sum_{t=t_{0}}^{t_{f}}\left|e^{\mathsf{i}[\theta_{j}(t)-\theta_{i}(t)]}\right|.

Clearly, if Pij(t0,tf)1P_{ij}(t_{0},t_{f})\approx 1 for all i,ji,j, then the time window [t0tf][t_{0}~{}t_{f}] comprises phase-locked trajectories.

Since the phase time series 𝜽~(t)\tilde{\boldsymbol{\theta}}(t) are derived from inherently noisy measurements, we compute the best estimate of the phases 𝜽{\boldsymbol{\theta}}^{*} (modulo rotation) that are compatible with the noisy measurement in 𝜽~(t)\tilde{\boldsymbol{\theta}}(t) by solving the nonconvex phase synchronization problem [11] – that is, the estimation of phases from noisy pairwise relative phase measurements. Given a time window of frequency-synchronized phase time series 𝜽~\tilde{\boldsymbol{\theta}}, we find that RFR\approx F (see main text and Fig. 16). Moreover, it holds that RF20\|R-F\|_{2}\to 0 as Pij1P_{ij}\to 1 element-wise. This implies that functional relationships between the phases 𝜽(t)\boldsymbol{\theta}^{*}(t) (encoded in the matrix RR) represent the same functional relationships that are measured in fMRI data (encoded in the matrix FF), supporting the usage of Kuramoto oscillators to analyze neural synchronization.

1.9 Power network modeling and assumptions

The main manuscript contains an application of our network tuning methods to the IEEE 39 New England power distribution network [7, 64]. To model the dynamics of this network, we consider a connected power network with generators 𝒱1\mathcal{V}_{1} and load buses 𝒱2\mathcal{V}_{2}. A structure-preserving power network model contains |𝒱1||\mathcal{V}_{1}| second-order Newtonian and |𝒱2||\mathcal{V}_{2}| first-order kinematic phase oscillators obeying [64]:

{Miθ¨i+Diθ˙i=ωi+j=1|𝒱1|aijsin(θjθi),i𝒱1,Diθ˙i=ωi+j=1|𝒱2|aijsin(θjθi),i𝒱2,\displaystyle\begin{cases}M_{i}\ddot{\theta}_{i}+D_{i}\dot{\theta}_{i}&=\omega_{i}+\sum_{j=1}^{|\mathcal{V}_{1}|}a_{ij}\sin(\theta_{j}-\theta_{i}),\ i\in\mathcal{V}_{1},\\[3.00003pt] D_{i}\dot{\theta}_{i}&=\omega_{i}+\sum_{j=1}^{|\mathcal{V}_{2}|}a_{ij}\sin(\theta_{j}-\theta_{i}),\ i\in\mathcal{V}_{2},\end{cases} (26)

where MiM_{i}, DiD_{i} are the generator inertia constant, and the damping coefficient, respectively. In the equation for the generators 𝒱1\mathcal{V}_{1}, ωi=Pm,i\omega_{i}=P_{m,i}, which is the mechanical power input from the prime mover, and in the equation for the load buses 𝒱2\mathcal{V}_{2}, ωi=P,i\omega_{i}=P_{\ell,i}, which denotes the real power drawn by load ii. Finally, the weight aija_{ij} equals aij=|vi||vj|Im(Yij)a_{ij}=|v_{i}||v_{j}|\mathrm{Im}({Y}_{ij}), with viv_{i} denoting the nodal voltage magnitude and Yij{Y}_{ij} being the admittance matrix. The above structure-preserving power network model represents an AC grid with a synchronous generator.

Owing to Ref. [23, Lemma 1], the existence and local exponential stability of synchronized solutions of the oscillator model Eq. (26) can be entirely described by means of the first-order Kuramoto model. That is, the load dynamics of a structure-preserving power grid model has the same stable synchronization manifold of Eq. (1) in the main text.

We assume that thermal limit constraints are equivalent to phase cohesiveness requirements. To be precise, we obtain a bounded power flow aijsin(θjθi)a_{ij}\sin(\theta_{j}-\theta_{i}) for the line (i,j)(i,j) whenever the angular distance |θjθi||\theta_{j}-\theta_{i}| is bounded, which is satisfied by frequency-synchronized phase trajectories. Moreover, we assume constant voltage magnitudes |vi||v_{i}| at the loads, so that the weights aija_{ij} can be considered fixed. This is a standard assumption in power systems ( also known as decoupling assumption). We refer the interested reader to Ref. [23, Remark 1] for further details.

The generators and bus parameters for the IEEE New England Power network are available in the original article and in classic textbooks [7, 64]. For simplicity, we set Di=1D_{i}=1 for all loads, which corresponds to a highly damped scenario, possibly due to local excitation controllers. In our simulations, we utilized the standard optimal power flow solver provided by MATPOWER to compute the parameters 𝒗\boldsymbol{v}, 𝒑\boldsymbol{p}_{\ell} and 𝜽(0){\boldsymbol{\theta}}(0) needed to integrate the Kuramoto model in Matlab through a standard ode45 solver.

1.10 Application to additional power network models

Depending on which assumptions are made and on which application is studied, there exist many different power network models in the literature. To demonstrate that the fundamental principles of our procedure remain unchanged even when dealing with more complex dynamics that relax some of the modeling assumptions, we apply our method to two models that differ from the one in equations (26). Henceforth, our goal is to intervene on a power network after a fault occurs between two loads in order to recover a desired (pre-fault) functional pattern.

First, we study the case of a third-order (also known as one-axis) model, such as the one in Ref. [66]. The main differences with the structure-preserving power network in equations (26) is that the model in Ref. [66] includes the transient dynamics of voltage magnitudes, and that electrical loads are simply modeled as passive impedances. For N=10N=10 generators, Supplementary Fig. 18a illustrates the reduced power network model obeying the dynamics [66]

{θ˙i=ωi,Miω˙i=pm,iDiωi+j=1N|vi||vj|Im(Yij)sin(θjθi),Tiv˙i=vifvi+(χiχi)j=1N|vj|Im(Yij)cos(θjθi),\displaystyle\begin{cases}\dot{\theta}_{i}=\omega_{i},\\ M_{i}\dot{\omega}_{i}=p_{m,i}-D_{i}\omega_{i}+\sum_{j=1}^{N}|v_{i}||v_{j}|\mathrm{Im}({Y}_{ij})\sin(\theta_{j}-\theta_{i}),\\ T_{i}\dot{v}_{i}=v_{i}^{\mathrm{f}}-v_{i}+(\chi_{i}^{\prime}-\chi_{i})\sum_{j=1}^{N}|v_{j}|\mathrm{Im}({Y}_{ij})\cos(\theta_{j}-\theta_{i}),\end{cases} (27)

where θi\theta_{i} is the rotor angle, ωi\omega_{i} its frequency, pm,ip_{m,i} is the effective mechanical input power of the machine ii, MiM_{i} and DiD_{i} are the inertia and damping of the mechanical motion, respectively, viv_{i} indicates the transient voltage, Im(Yij)\mathrm{Im}({Y}_{ij}) is the susceptance of the transmission line (i,j)(i,j), TiT_{i} denotes the relaxation time of the transient voltage dynamics along the qq axis, vifv_{i}^{\mathrm{f}} is the internal voltage, and, finally, χi\chi_{i} and χi\chi_{i}^{\prime} are the static and transient reactances along the dd-axis.

Akin to the structure-preserving power network model, stationary operation of the grid corresponds to constant voltages and frequencies, along with constant rotor phase differences. Since our procedure relies on phase-locked trajectories to achieve a desired functional pattern (i.e., power flow), it can be adjusted to intervene on the stationary operation of a challenging model such as the one in equations (27). In fact, in regimes with small voltage and frequency swings, the system is still well approximated by first-order Kuramoto dynamics. Clearly, for a desired functional pattern, the error between the one estimated from the application of our procedure and the one obtained from the dynamics in equations (27) will be proportional to the changes in voltages and frequencies.

To test our approach on the model from equations (27), we use the same IEEE 39 New England benchmark case as in the main manuscript. The initial network parameters for our simulations, which represent standard grid operating conditions, are taken from Ref. [77] and Ref. [48]. The voltage vi(0)v_{i}(0) and the initial condition for θi(0)\theta_{i}(0) and ωi(0)=0\omega_{i}(0)=0 for generator ii are fixed using power flow computation. The goal of this application is to recover the initial power flow after the same fault as in Ref. [77] (a line trip between loads 16 and 17) occurs. Such a fault affects the network admittance matrix, and yields an undesired power flow. To recover the pre-fault power flow we follow the same steps as described in the main text (see also Fig. 5b), but because the reduced-network structure is typically a complete graph [21], we do not modify its coupling strengths. Instead, we assume that we can adjust the values of 𝒑mN\boldsymbol{p}_{m}\in\mathbb{R}^{N}, so that 𝒑mdiag(D1,,DN)𝝎\boldsymbol{p}_{m}-\mathrm{diag}(D_{1},\dots,D_{N})\boldsymbol{\omega} are the oscillators’ natural frequencies that are tuned in order to achieve the pre-fault functional patterns in the post-fault network. The values for PmP_{m} are computed by rewriting the second one of equations (27) as equation (4) in the main text, and solving for the natural frequencies. For the coupling values in 𝜹\boldsymbol{\delta}, we use aij=|viss||vjss|Im(Yij)a_{ij}=|v_{i}^{\mathrm{ss}}||v_{j}^{\mathrm{ss}}|\mathrm{Im}({Y}_{ij}), where vissv_{i}^{\mathrm{ss}} denotes the steady state value of the voltage viv_{i} before applying our intervention. Finally, we sum a positive constant to the obtained natural frequencies so that they are all positive – this constant can be used to adjust the generators to a desired average mechanical input.

Supplementary Fig. 18b-c illustrate that our procedure is able to adequately recover the desired functional pattern after the line trips occurs. The error between the pre-fault pattern R0R_{0} and the recovered one RrecoveredR_{\mathrm{recovered}} is due to small changes in the frequency and voltage values after PmP_{m} is modified. We remark that our procedure relies on the dynamics of 𝝎\boldsymbol{\omega} and 𝒗\boldsymbol{v} leading to small changes. In situations where these changes significantly affect the phases dynamics, the first-order Kuramoto approximation leveraged by our method may not successfully recover a desired functional pattern.

We now turn our attention to models that do not neglect energy losses, such as the one in Ref. [33]. By compensating for the losses in the injected power but considering lossy interconnections, the structure-preserving model in equations (26) becomes,

{Miθ¨i+Diθ˙i=ωi+j=1|𝒱1|aijsin(θjθi+φ),i𝒱1,Diθ˙i=ωi+j=1|𝒱2|aijsin(θjθi+φ),i𝒱2,\displaystyle\begin{cases}M_{i}\ddot{\theta}_{i}+D_{i}\dot{\theta}_{i}&=\omega_{i}+\sum_{j=1}^{|\mathcal{V}_{1}|}a_{ij}\sin(\theta_{j}-\theta_{i}+\varphi),\ i\in\mathcal{V}_{1},\\[3.00003pt] D_{i}\dot{\theta}_{i}&=\omega_{i}+\sum_{j=1}^{|\mathcal{V}_{2}|}a_{ij}\sin(\theta_{j}-\theta_{i}+\varphi),\ i\in\mathcal{V}_{2},\end{cases} (28)

where φ\varphi represents the phase shift induced by energy losses. We show in Fig. 19 that our procedure to restore a desired functional pattern in a lossy power network after a fault still works well for small values of the phase shift φ\varphi. We can recover functional patterns associated to target active power flow conditions by modifying the constraints of our optimization procedures to explicitly take into account the dynamics in equations (28).

At synchronous operating conditions, the dynamics in equations (28) reduce to the ones of Kuramoto-Sakaguchi oscillators [63]:

θ˙i=ωi+j=1nAijsin(θjθi+φ).\dot{\theta}_{i}=\omega_{i}+\sum_{j=1}^{n}A_{ij}\sin(\theta_{j}-\theta_{i}+\varphi).

The phase shift φ\varphi makes the matrix formulation of the above dynamics to be incompatible with the ones we have introduced in equation (3) of the main text. We can instead write the above dynamics in matrix form by considering the graph 𝒢\mathcal{G} as a directed graph (see also Supplementary Text 1.6 above), with d\mathcal{E}_{\mathrm{d}} being the set of directed edges. That is, we consider each undirected edge as two directed edges where each direction (j,i)(i,j)(j,i)\neq(i,j) has the same weight Aij=AjiA_{ij}=A_{ji}. Then, we can write the following equation:

[ω1ωn]𝖳+BsinkDd(𝒙,φ)[𝜹𝖳𝜹𝖳]𝖳=ωsync𝟏,[\omega_{1}~{}\cdots~{}\omega_{n}]^{\mathsf{T}}+B_{\mathrm{sink}}D_{\mathrm{d}}({\boldsymbol{x}},\varphi)[\boldsymbol{\delta}^{\mathsf{T}}~{}\boldsymbol{\delta}^{\mathsf{T}}]^{\mathsf{T}}=\omega_{\mathrm{sync}}\boldsymbol{1}, (29)

where Bsinkn×|d|B_{\mathrm{sink}}\in\mathbb{R}^{n\times|\mathcal{E}_{\mathrm{d}}|} satisfies Bsink,k=1B_{\mathrm{sink},{k\ell}}=-1 if kk is the sink of the interconnection \ell and Bsink,k=0B_{\mathrm{sink},{k\ell}}=0 otherwise, Dd|d|×|d|D_{\mathrm{d}}\in\mathbb{R}^{|\mathcal{E}_{\mathrm{d}}|\times\mathcal{|}\mathcal{E}_{\mathrm{d}}|} is the diagonal matrix of all sin(xij+φ)\sin(x_{ij}+\varphi), and ωsync\omega_{\mathrm{sync}}\in\mathbb{R} is the synchronization frequency of phase-locked trajectories.

We are now ready to apply the equation (29) as a constraint in our numerical optimization routine. Without loss of generality, we set ωsync=0\omega_{\mathrm{sync}}=0, and apply the same method developed for the lossless case to the IEEE 39 New England test case to compute the optimal correction after a fault occurs between loads 13 and 14 (the same as in the main text). For a loss φ=0.01\varphi=0.01, the updated optimization is able to recover the pre-fault functional pattern with a mean error <vec(R)vec(Rrecovered)>=0.072<\mathrm{vec}(R)-\mathrm{vec}(R_{\mathrm{recovered}})>=0.072, where vec()\mathrm{vec}(\cdot) vectorizes the matrix (see also Supplementary Fig. 20). This result improves upon the original method proposed for lossless networks by guaranteeing a satisfactory active power flow recovery for losses φ\varphi that are one order of magnitude larger. Finally, we observe that for φ>0.01\varphi>0.01 the fixed parameters of this specific system cause the phases to lose frequency synchronization even at operating conditions.

2 Supplementary Figures

Refer to caption
Fig 10: Comparison between Pearson correlation coefficient and the metric ρ12=<cos(θ2θ1)>t\rho_{12}=<\cos(\theta_{2}-\theta_{1})>_{t} on two phase-locked signals and varying time window lengths. Each point in the plot represents a value of ρ12\rho_{12} (in blue) and r12r_{12} (in red) computed in a time window [0T][0~{}T], where T=0.1,0.2,,5T=0.1,0.2,\dots,5. It can be seen in all panels that ρ12\rho_{12} is only affected by the phase shift ψ\psi. Instead, the Pearson correlation coefficient returns oscillating values for different window sizes with damping oscillations as the length of the time window increases. a The phase shift in the initial conditions ψ=π8\psi=\frac{\pi}{8}. b The phase shift in the initial conditions ψ=π4\psi=\frac{\pi}{4}. c The phase shift in the initial conditions ψ=π3\psi=\frac{\pi}{3}. d The phase shift in the initial conditions is ψ=π2\psi=\frac{\pi}{2}.
Refer to caption
Fig 11: Infinite compatible patterns in a complete graph of identical oscillators. a A network described by a complete graph of n=6n=6 oscillators with interconnection weights 𝜹=𝟏\boldsymbol{\delta}=\boldsymbol{1} and homogeneous natural frequencies 𝝎=𝟎\boldsymbol{\omega}=\boldsymbol{0}. b Each cycle of the network is highlighted in a different color, which is reflected on the entries of the phase differences equilibria 𝒙(i)\boldsymbol{x}^{(i)}. It holds sin(𝒙(i))=[aaaaaaaabbbb000]𝖳ker(B)\sin(\boldsymbol{x}^{(i)})=[a~{}a~{}a~{}a~{}a~{}a~{}a~{}a~{}b~{}b~{}b~{}b~{}0~{}0~{}0]^{\mathsf{T}}\in\mathrm{ker}(B), where a=sin(π2γ)=sin(π2+γ)a=\sin(\frac{\pi}{2}-\gamma)=\sin(\frac{\pi}{2}+\gamma) and b=sin(2γ)=sin(π2γ)b=\sin(2\gamma)=\sin(\pi-2\gamma) for all γ(0,π2)\gamma\in(0,\frac{\pi}{2}). Clearly, any value for γ\gamma in the latter interval determines a distinct compatible functional pattern.
Refer to caption
Fig 12: Desired functional pattern and phase-locked frequency in a directed network. a Phase trajectory of the modified network after the solution 𝜶\boldsymbol{\alpha}^{*} to the problem in (25) is applied to a network of n=7n=7 oscillators with target phase differences x1ix_{1i} equal to 𝒙desired=[π3π4π6π8π8π6]𝖳{\boldsymbol{x}}_{\mathrm{desired}}=\left[\frac{\pi}{3}~{}\frac{\pi}{4}~{}\frac{\pi}{6}~{}\frac{\pi}{8}~{}\frac{\pi}{8}~{}\frac{\pi}{6}\right]^{\mathsf{T}} and desired phase locking frequency is k¯freq=1\bar{k}_{\mathrm{freq}}=1. The initial conditions 𝒙0\boldsymbol{x}_{0} are chosen randomly and satisfy 𝒙0𝒙desired<0.5\|\boldsymbol{x}_{0}-{\boldsymbol{x}}_{\mathrm{desired}}\|<0.5. b The phase difference trajectories achieve the target values in 𝒙desired{\boldsymbol{x}}_{\mathrm{desired}}. c The phase trajectories achieve the functional pattern associated with the target phase differences.
Refer to caption
Fig 13: Results of the heuristic method to promote stability of functional patterns containing negative correlations. a Phase differences of the network with adjacency matrix AA in Eq. (20). The phase differences converge to 𝒙desired(0){\boldsymbol{x}}_{\text{desired}}^{(0)}. b The functional pattern associated with the phase differences in panel a. c Phase differences of the network with adjacency matrix A~\tilde{A} in Eq. (22), after the optimal adjustment is computed from Eq. (21). The phase differences converge to 𝒙desired(1){\boldsymbol{x}}_{\text{desired}}^{(1)}. d The functional pattern associated with the phase differences in panel a. Notice that the only rows and columns that change from the functional pattern R0R_{0} are the second row and second column. This is due to the fact that only x12=θ2θ1x_{12}=\theta_{2}-\theta_{1} differs between the two equilibria 𝒙desired(0){\boldsymbol{x}}_{\text{desired}}^{(0)} and 𝒙desired(1){\boldsymbol{x}}_{\text{desired}}^{(1)}.
Refer to caption
Fig 14: Refined mechanism underlying the heuristic procedure to promote stability of functional patterns containing negative correlations. For the 77-oscillator network in Supplementary Text 1.5, we apply the procedure in equation (23) with c1=0.1c_{1}=0.1 and c2=10c_{2}=10 to achieve the stability of the pattern 𝒙desired=[21π32π6π6π8π8π3]𝖳{\boldsymbol{x}}_{\text{desired}}=\left[\frac{21\pi}{32}~{}\frac{\pi}{6}~{}\frac{\pi}{6}~{}\frac{\pi}{8}~{}\frac{\pi}{8}~{}\frac{\pi}{3}\right]^{\mathsf{T}}, where x12=θ2θ1>π2x_{12}=\theta_{2}-\theta_{1}>\frac{\pi}{2}. Notice that, differently from Fig. 7 in the main text, the minimization in equation (23) enables a refined optimization of the network weights through the scaling parameters c1=0.1c_{1}=0.1 and c2=10c_{2}=10. The left plot illustrates the Gerschgorin disks and the Jacobian’s eigenvalues locations for the original network. It can be observed in the zoomed-in panel that one eigenvalue is unstable (λ2=0.0565\lambda_{2}=0.0565, in red). The optimal correction 𝜶\boldsymbol{\alpha}^{*} of the oscillators’ coupling strengths is gradually applied from the left-most panel to the right-most one at 13\frac{1}{3} increments. The right zoomed-in panel shows that, as a result of our procedure, n1n-1 eigenvalues ultimately lie in the left-hand side of the complex plane (λ1=0\lambda_{1}=0 due to rotational symmetry and λ2=0.0178\lambda_{2}=-0.0178, in green).
Refer to caption
Fig 15: A network of n=12n=12 oscillators with partition 𝒞={𝒞1,,𝒞4}\mathcal{C}=\{\mathcal{C}_{1},\dots,\mathcal{C}_{4}\} and the functional pattern RR associated with cluster-synchronized trajectories. Each cluster consists of synchronized oscillators, which produce a correlated diagonal block in the pattern RR that satisfy ρij=1\rho_{ij}=1 for all i,j𝒞ki,j\in\mathcal{C}_{k}, k{1,2,3,4}k\in\{1,2,3,4\}.
Refer to caption
Fig 16: Additional analysis on the functional pattern RR in the brain network application. a Stability of the prescribed functional pattern RR from random initial conditions 𝒙0\boldsymbol{x}_{0} satisfying 𝒙0𝒙π2\|\boldsymbol{x}_{0}-{\boldsymbol{x}}\|_{\infty}\leq\frac{\pi}{2}. The thick black line represents the average 2\ell_{2}-norm distance over 10410^{4} random initializations, and the shaded area represents the smallest and largest value of the 2\ell_{2}-norm distance. The sudden drop in the largest norm is due to the phases 𝜽𝕋n\boldsymbol{\theta}\in\mathbb{T}^{n} evolving in the torus, thus taking values in the interval [02π)[0~{}2\pi). Our numerical simulations reveal that phase trajectories starting from the other half of the torus (i.e., 𝒙0𝒙>π2\|\boldsymbol{x}_{0}-{\boldsymbol{x}}\|_{\infty}>\frac{\pi}{2}) may converge to different stable patterns, which are not compatible with the phases extracted from the functional MRI recordings. b The difference between the functional connectivity FF and the functional pattern RR. The entries with the largest magnitude are 0.08\approx 0.08, highlighting the stark similarity between the two correlation patterns RR and FF.
Refer to caption
Fig 17: Matrices that describe the network interconnections, the fault, and the local intervention of the power network parameters to recover the pre-fault power distribution. a The adjacency matrix used in the Kuramoto model to simulate the IEEE 39 power network. b The fault that disconnects loads 1313 and 1414. c The intervention is localized, in the sense that only branches of the loads connected to the ones affected by the fault and their immediate neighbors require adjustments. The sparsity of the local intervention is promoted by the usage of the 1\ell_{1}-norm in the optimization problem.
Refer to caption
Fig 18: Application of our procedure to the third-order model of the IEEE 39 New England. a The IEEE-39 New England power network reduced to a 10-generator network. Electrical loads are simply modeled as passive impedances. In order to explicitly account for the outside of the system, Generator 1 is assumed to be connected to an infinite bus and has constant phase and frequency [77]. b The absolute difference between the pre-fault functional pattern R0R_{0} and the post-fault pattern RfaultR_{\mathrm{fault}}. The Frobenius norm of this difference is R0RfaultF=0.0907\|R_{0}-R_{\mathrm{fault}}\|_{\mathrm{F}}=0.0907. c The absolute difference between the pre-fault functional pattern R0R_{0} and the recovered pattern RrecoveredR_{\mathrm{recovered}} after tuning the power 𝒑m\boldsymbol{p}_{m} at the generators. The Frobenius norm of this difference is R0RrecoveredF=0.0653\|R_{0}-R_{\mathrm{recovered}}\|_{\mathrm{F}}=0.0653.
Refer to caption
Fig 19: Error between the pre-fault functional pattern RR and the functional pattern RrecoveredR_{\mathrm{recovered}} obtained through our procedure as a function of the phase shift φ𝕊1\varphi\in\mathbb{S}^{1}. The functional pattern RrecoveredR_{\mathrm{recovered}} is computed after a network correction due to a fault that occurs in the IEEE 39 test case between loads 1313 and 1414 (the same as in the main text). In the presence of a phase shift φ\varphi, the error between the desired functional pattern and the one associated with the network correction computed by our method remains small for small values of energy loss φ\varphi. Here, the parameter optimization does not explicitly account for the phase shift φ\varphi. The mean error is computed as <vec(R)vec(Rrecovered)><\mathrm{vec}(R)-\mathrm{vec}(R_{\mathrm{recovered}})>, and the maximum error as vec(R)vec(Rrecovered)\|\mathrm{vec}(R)-\mathrm{vec}(R_{\mathrm{recovered}})\|_{\infty}, where vec()\mathrm{vec}(\cdot) denotes the vectorization.
Refer to caption
Fig 20: Nominal, post-fault, and recovered functional pattern in a network with lossy communications. In all panels, the loss is fixed to φ=0.01\varphi=0.01. a Functional pattern associated to nominal power flow in the IEEE 39 New England test case. b Functional pattern associated to a power flow disruption due to a fault that disconnects loads 13 and 14. c The recovered functional pattern after our procedure with updated constraint (equation (29)) is applied. The mean error between the pre-fault and the recovered functional patterns is <vec(R)vec(Rrecovered)>=0.072<\mathrm{vec}(R)-\mathrm{vec}(R_{\mathrm{recovered}})>=0.072, where vec()\mathrm{vec}(\cdot) denotes the vectorization of the patterns.