The Lyapunov-diagram-generator is a tool to be used to further study the stability of a dynamical system through the concept of Lyapunov exponents. This README will provide a brief overview of what Lyapunov exponents are, and how the code works and can be used.
The Lyapunov exponents are a quantity of a dynamical system that characterizes the rate of separation of infinitesimally close trajectories. If a dynamical system consists of only negative Lyapunov exponents, the system is stable. If it contains negative and zero Lyapunov exponents, it’s considered periodic. Finally, if it contains all the previously mentioned as well as positive exponents, the system is considered chaotic.
If two trajectories in phase space are seperated with an initial vector
where
where
The Lyapunov Diagram Generator is a Python-based tool that allows you to visualize the behavior of a dynamic system by generating Lyapunov diagrams. These diagrams are two-dimensional plots where each point
- Clone this repository to your local machine.
- Navigate to the project directory.
git clone https://github.com/yourusername/lyapunov-diagram-generator.git
cd lyapunov-diagram-generator
-
N
- number of iterations of the recurrence relation -
resol
- resolution of the grid along one axis -
seq
- user defined sequence for how the recurrence relation should alternate between the$r_i$ 's -
x0
- the initial value for the recurrence relation
Modify these parameters in the script to explore different system behaviours.
To generate a Lyapunov diagram, change the parameters and the given reccurence relation f(x_n,r)
of your choice. Notice that it's important to also for hand calculate the derivative of the recurrence relation with respect to f_prime(x_n,r)
too. Don't also forget to adjust the region of interest for your parameters lyapunov_diagram
function. Thereafter, run the code and enjoy your result. In the next section, some examples will be presented to you.
Here are some examples using the logistic recurrence relation
Observe that the predefined reccurence relation in the code is the logistic reccurence relation. You are of course free to change it to whatever system you want to study.
[1] Libretexts (2022) 9.3: Lyapunov exponent, Mathematics LibreTexts. Available at: https://math.libretexts.org/Bookshelves/Scientific_Computing_Simulations_and_Modeling/Book%3A_Introduction_to_the_Modeling_and_Analysis_of_Complex_Systems_(Sayama)/09%3A_Chaos/9.03%3A_Lyapunov_Exponent (Accessed: 08 August 2023).