StuartLandauStep#
- class brainmass.StuartLandauStep(in_size, a=0.25, w=0.2, noise_x=None, noise_y=None, init_x=Uniform(low=0, high=0.05), init_y=Uniform(low=0, high=0.05), method='exp_euler')#
Stuart–Landau oscillator (Hopf normal form).
Implements the real two-dimensional Stuart–Landau equations that describe dynamics near a supercritical Hopf bifurcation:
\[\dot x = (a - r^2)\,x - \omega\,y + I_x(t),\quad r^2 = x^2 + y^2,\]\[\dot y = (a - r^2)\,y + \omega\,x + I_y(t),\]where \(a\) controls the bifurcation (for \(a>0\) the system exhibits a stable limit cycle) and \(\omega\) is the angular frequency.
- Parameters:
in_size (
int|Sequence[int] |integer|Sequence[integer]) – Spatial shape of the node/population. Can be anintor a tuple ofint. All parameters are broadcastable to this shape.a (
Callable|Array|ndarray|bool|number|bool|int|float|complex|Quantity|Param) – Bifurcation parameter (dimensionless). Default is0.25.w (
Callable|Array|ndarray|bool|number|bool|int|float|complex|Quantity|Param) – Angular frequency \(\omega\) (dimensionless). Default is0.2.noise_x (
Noise) – Additive noise process for thexcomponent. If provided, called at each update and added tox_inp. Default isNone.noise_y (
Noise) – Additive noise process for theycomponent. If provided, called at each update and added toy_inp. Default isNone.init_x (
Callable) – Parameter for the statex. Default isbraintools.init.Uniform(0, 0.05).init_y (
Callable) – Parameter for the statey. Default isbraintools.init.Uniform(0, 0.05).method (
str) – Time stepping method. One of'exp_euler'(default; usesbrainstate.nn.exp_euler_step) or any supported bybraintools.quad(e.g.,'rk4','midpoint','heun','euler').
- Return type:
Any
- x#
State container for the real component
x(dimensionless). Shape equals(batch?,) + in_sizeafterinit_state.- Type:
brainstate.HiddenState
- y#
State container for the imaginary component
y(dimensionless). Shape equals(batch?,) + in_sizeafterinit_state.- Type:
brainstate.HiddenState
Notes
Time derivatives returned by
dx()anddy()carry unit1/msto be consistent with explicit (exponential) Euler integration for a step size with unitms.Integration, state initialization, and noise handling are implemented in the base class
XY_Oscillator.Implementation detail: verify the cross-coupling term in
dy()matches the intended normal form (the standard form uses+ w * x).
- dx(x, y, x_ext)[source]#
Right-hand side for the
xcomponent.- Parameters:
x (array-like) – Current value of
x(dimensionless).y (array-like) – Current value of
y(dimensionless), broadcastable tox.x_ext (array-like or scalar) – External input to
x(includes noise if enabled).
- Returns:
Time derivative
dx/dtwith unit1/ms.- Return type:
array-like
- dy(y, x, y_ext)[source]#
Right-hand side for the
ycomponent.- Parameters:
y (array-like) – Current value of
y(dimensionless).x (array-like) – Current value of
x(dimensionless), broadcastable toy.y_ext (array-like or scalar) – External input to
y(includes noise if enabled).
- Returns:
Time derivative
dy/dtwith unit1/ms.- Return type:
array-like