Seed Generation
Generating initial conditions to search for hidden attractors.
To find a hidden attractor, we must integrate the system from multiple initial conditions (“seeds”) and check if any converge to an attractor that is disconnected from the unstable equilibria. The seed_generation module provides several strategies for creating these initial condition grids.
Classical Seeds
The most common approach is to sample a small sphere or cube around each unstable equilibrium. If an attractor exists and its basin touches this sphere, the trajectory will fall into it.
from hidden_attractors.seed_generation import classical_seeds
from hidden_attractors.models import equilibria_nonsmooth, chua_nonsmooth_parameters
params = chua_nonsmooth_parameters()
eq = equilibria_nonsmooth(params)
# Generate 50 points uniformly distributed in a sphere of radius 0.1
# around each equilibrium point.
seeds = classical_seeds(
equilibria=eq,
n_per_eq=50,
radius=0.1
)
print(seeds.shape) # (150, 3) -- 50 for each of the 3 equilibria
Biased Seeds
In some systems (like systems with Lur’e forms), we have a priori knowledge about which direction in phase space is most likely to intersect the basin of a hidden attractor. Biased seeds generate points along a specific vector.
from hidden_attractors.seed_generation import biased_seeds
import numpy as np
# A directional vector (e.g., the 'c' vector from a Lur'e decomposition)
bias_vector = np.array([1.0, 0.0, 0.0])
seeds = biased_seeds(
equilibria=eq,
n_per_eq=20,
radius=0.5,
bias_vector=bias_vector,
bias_strength=0.8 # 0.0 is uniform sphere, 1.0 is exactly on the vector
)
Machado Seeds (Describing Function)
When using the describing function (DF) or Nyquist method to predict the existence of hidden limit cycles, the method outputs a predicted amplitude and frequency. The machado_seeds function uses these theoretical predictions to place initial conditions exactly on the predicted limit cycle.
from hidden_attractors.seed_generation import machado_seeds
# Assume DF analysis predicts a limit cycle with amplitude A=1.5
# along a specific eigenvector basis.
seeds = machado_seeds(
amplitude=1.5,
eigenvectors=np.eye(3), # Replace with actual system eigenvectors
n_points=100
)
This is highly effective for targeting specific hidden attractors without blind spherical searching.