Leading-following tipping cascade
A cascade of two tipping elements.
- Class:
LeadingFollowingCascadeSystem - Import:
from skcomplex.systems.physics.climate import LeadingFollowingCascadeSystem - Field:
physics/climate - Topics:
tipping points,cascades,fold,hopf bifurcation,ramp,sde - References:
- Dekker, von der Heydt, and Dijkstra 2018
- Fang, Wang, Kurths, and Fan 2025
Use this system
The block imports the class and simulates the system with its default parameters and its tuned run settings.
from skcomplex.systems.physics.climate import LeadingFollowingCascadeSystem
trajectory = LeadingFollowingCascadeSystem().prepare().simulate()
Parameters
The model parameters take these defaults, and set_params changes them.
| Parameter | Default |
|---|---|
follower |
'fold' |
coupling |
0.4 |
rate |
0.004 |
sigma |
0.02 |
phi0 |
-1.0 |
phi1 |
1.0 |
c |
0.0 |
mu |
0.0 |
omega |
1.0 |
solver |
'auto' |
backend |
'auto' |
Tags
The system with its default parameters has these capability tags, which solvers and analyses check.
| Tag | Values |
|---|---|
| Time | continuous |
| Space | none |
| Laws | noise, rate |
| Randomness | stochastic |
| Domains | real |
| Structure | fixed |
Class
The source of the class shows how it builds its components from its model parameters.
class LeadingFollowingCascadeSystem(BaseSystem):
"""A cascade of two tipping elements.
A leading fold is driven by a ramp and a follower is forced by the leader.
The leading element follows `dx = (-x³ + x + phi(t)) dt + sigma dW`, whose control rises as `phi = phi0 + rate t`
until `phi1`, and it tips from its lower to its upper branch when `phi` passes `2 / (3 √3)`. The following element
is forced linearly by the state of the leader, Eq. 10 of Fang et al. after Dekker et al. A fold follower obeys `dy =
(-y³ + y + c + coupling x) dt + sigma dW`, and it tips too, a domino cascade, when the tipped leader moves its
control `c + coupling x` past `2 / (3 √3)`. A Hopf follower obeys `dw = ((mu + coupling x + i omega) w - |w|² w) dt
+ sigma dW`, and the tipped leader can carry it through its Hopf bifurcation onto an oscillation of radius `sqrt(mu
+ coupling x)`. The follower can show rising variance and autocorrelation before the leader tips even when it stays
far from its own tipping point. The system has the leader `leader.x` and the follower `follower.y`, and also
`follower.z` for the Hopf follower.
Args:
follower:
The normal form of the following element, `'fold'` or `'hopf'`.
coupling:
The strength of the linear forcing of the follower by the leader.
rate:
The rate at which the control of the leader rises.
sigma:
The amplitude of the noise of both elements.
phi0:
The initial control of the leader.
phi1:
The final control of the leader.
c:
The control of a fold follower, without the coupling.
mu:
The distance of a Hopf follower from its bifurcation, without the coupling.
omega:
The frequency of a Hopf follower.
label:
The label of the system, which names it when it is nested in another one.
solver:
The solver of the problem, or `'auto'` for the one the system chooses.
backend:
The backend that evaluates the compiled functions, or `'auto'` for the one the system chooses.
Raises:
ValidationError:
The follower is neither `'fold'` nor `'hopf'`.
Examples:
>>> from skcomplex.systems.physics.climate import LeadingFollowingCascadeSystem
>>> LeadingFollowingCascadeSystem('hopf').prepare().system_.interactions[1].omega
1.0
"""
field = 'physics/climate'
topics = ('tipping points', 'cascades', 'fold', 'hopf bifurcation', 'ramp', 'sde')
references = ('Dekker, von der Heydt, and Dijkstra 2018', 'Fang, Wang, Kurths, and Fan 2025')
until = 500.0
dt = 0.5
def __init__(
self,
follower: str = 'fold',
*,
coupling: float = 0.4,
rate: float = 0.004,
sigma: float = 0.02,
phi0: float = -1.0,
phi1: float = 1.0,
c: float = 0.0,
mu: float = 0.0,
omega: float = 1.0,
label: str = 'system',
solver: BaseSolver | str = 'auto',
backend: BaseBackend | str = 'auto',
) -> None:
super().__init__(label, solver=solver, backend=backend)
self.follower = follower
self.coupling = coupling
self.rate = rate
self.sigma = sigma
self.phi0 = phi0
self.phi1 = phi1
self.c = c
self.mu = mu
self.omega = omega
def _prepare(self, context: Sequence[Observable] | None = None) -> None:
"""Set the system of the ramped leader and its forced follower.
Args:
context:
The observables to compile with the problem, or `None` for none.
Raises:
ValidationError:
The follower is neither `'fold'` nor `'hopf'`.
"""
super()._prepare(context)
if self.follower not in FOLLOWERS:
error_msg = f'Unknown follower {self.follower!r}. Use one of {", ".join(FOLLOWERS)}.'
raise ValidationError(error_msg)
start = RampedStochasticFoldSystem._lower_branch(-1.0, 1.0, self.phi0)
leader = RampedFoldElement('leader', x=start)
ramped = RampedFoldInteraction(
'leader_fold',
target='leader',
sigma=self.sigma,
phi0=self.phi0,
phi1=self.phi1,
rate=self.rate,
)
follows: Element
forcing: Interaction
if self.follower == 'fold':
follows = FoldFollowerElement(
'follower',
y=RampedStochasticFoldSystem._lower_branch(-1.0, 1.0, self.c + self.coupling * start),
)
forcing = FoldFollowerInteraction(
'forcing',
target='follower',
leader='leader',
c=self.c,
coupling=self.coupling,
sigma=self.sigma,
)
else:
follows = HopfFollowerElement('follower')
forcing = HopfFollowerInteraction(
'forcing',
target='follower',
leader='leader',
mu=self.mu,
omega=self.omega,
coupling=self.coupling,
sigma=self.sigma,
)
self.system_ = System(
self.label,
elements=[leader, follows],
interactions=[ramped, forcing],
solver=EulerMaruyamaSolver(dt=0.01),
)
Components
The system uses these element and interaction classes, each with its nearest class of the core.
Elements:
Interactions:
RampedFoldInteraction, fromInteractionFoldFollowerInteraction, fromInteraction
class RampedFoldElement(Element):
"""Element in the normal form of a fold whose control is ramped, its state `x`.
Args:
label:
The label of the element.
x:
The initial state.
Examples:
>>> from skcomplex.systems.physics.climate import RampedFoldElement
>>> RampedFoldElement('system').x
-1.3247
"""
def __init__(self, label: str, *, x: float = -1.3247) -> None:
super().__init__(label)
self.x = x
class FoldFollowerElement(Element):
"""Follower of a cascade in the normal form of a fold, its state `y`.
Args:
label:
The label of the follower.
y:
The initial state.
Examples:
>>> from skcomplex.systems.physics.climate import FoldFollowerElement
>>> FoldFollowerElement('follower').y
-1.0
"""
def __init__(self, label: str, *, y: float = -1.0) -> None:
super().__init__(label)
self.y = y
class RampedFoldInteraction(Interaction):
"""Stochastic fold `dx = (a x^3 + b x + phi(t)) dt + sigma dW` whose control rises from `phi0` to `phi1`.
For `a < 0 < b` the fold has two stable branches for `|phi| < phi_c = sqrt(-4 b^3 / (27 a))`, and the lower
branch vanishes at `phi = phi_c`. The control rises at the rate `rate` and stays at `phi1` once it reaches it.
Args:
label:
The label of the interaction.
target:
The path of the element.
a:
The cubic coefficient, negative.
b:
The linear coefficient, positive.
sigma:
The amplitude of the noise.
phi0:
The initial control.
phi1:
The final control.
rate:
The rate at which the control rises.
Examples:
>>> from skcomplex.systems.physics.climate import RampedFoldInteraction
>>> RampedFoldInteraction('fold', target='system').rate
0.004
"""
law_classes = (NoiseLaw, RateLaw)
def __init__(
self,
label: str,
*,
target: Role,
a: float = -1.0,
b: float = 1.0,
sigma: Annotated[float, NONNEGATIVE] = 0.02,
phi0: float = -1.0,
phi1: float = 1.0,
rate: float = 0.004,
) -> None:
super().__init__(label)
self.target = target
self.a = a
self.b = b
self.sigma = sigma
self.phi0 = phi0
self.phi1 = phi1
self.rate = rate
def _prepare(self, context: SimpleNamespace) -> None:
"""Set the fold with its ramped control and its noise.
Args:
context:
The namespace of the element, the time `t`, and the parameters.
"""
super()._prepare(context)
x, t = context.target.x, context.t
control = self.phi0 + ramp(t, 0.0, (self.phi1 - self.phi0) / self.rate, self.phi1 - self.phi0)
self.laws_ = [RateLaw(x.diff(t), context.a * x**3 + context.b * x + control), NoiseLaw(x, context.sigma)]
class FoldFollowerInteraction(Interaction):
"""Stochastic fold `dy = (-y³ + y + c + coupling x) dt + sigma dW` of a follower forced by a leader.
The fold has a lower and an upper stable branch while `|c + coupling x| < 2 / (3 √3)`, and the state `x` of the
leader shifts its control.
Args:
label:
The label of the interaction.
target:
The path of the follower.
leader:
The path of the leader.
c:
The control of the fold, without the coupling.
coupling:
The strength of the linear forcing by the leader.
sigma:
The amplitude of the noise.
Examples:
>>> from skcomplex.systems.physics.climate import FoldFollowerInteraction
>>> FoldFollowerInteraction('fold', target='follower', leader='leader').c
0.0
"""
law_classes = (NoiseLaw, RateLaw)
def __init__(
self,
label: str,
*,
target: Role,
leader: Role,
c: float = 0.0,
coupling: float = 0.4,
sigma: Annotated[float, NONNEGATIVE] = 0.02,
) -> None:
super().__init__(label)
self.target = target
self.leader = leader
self.c = c
self.coupling = coupling
self.sigma = sigma
def _prepare(self, context: SimpleNamespace) -> None:
"""Set the forced fold of the follower and its noise.
Args:
context:
The namespace of the follower and the leader, the time `t`, and the parameters.
"""
super()._prepare(context)
y = context.target.y
rate = -(y**3) + y + context.c + context.coupling * context.leader.x
self.laws_ = [RateLaw(y.diff(context.t), rate), NoiseLaw(y, context.sigma)]
Equations
The equations are those that symbolic returns for the system with its default parameters.
leader.x: diff(x_leader(t), t) == a_leader_fold*x_leader(t)^3 + b_leader_fold*x_leader(t) + where(t < 0.0, 0, where(t < 500.0, 0.004*t, 2.0)) - 1.0
follower.y: diff(y_follower(t), t) == -y_follower(t)^3 + coupling_forcing*x_leader(t) + c_forcing + y_follower(t)