Engineering Math - Chaos Theory  

 

 

 

Chaos - Lorenz Attractor

The Lorenz attractor is a classic example in the field of chaos theory, originating from the study of a system of three non-linear differential equations. These equations describe how the variables x(t), y(t) and z(t) change over time in a dynamic system. Specifically, they represent simplified models of convection in the atmosphere or other systems involving fluid flow, heat transfer, or even some financial systems.

Lorenz attractor is obtained by solving a system of non-linear differential equation numerically as shown below. If you plot the solution of each single variable (fuction) on time domain (i.e, x(t), y(t), z(t)) you would see a pretty much radom like plots, but if you plot any of the two variables (or 3 variables) in parametric plot, you would see some pattern as shown below. The exact trajectory for each function(variable) changes very unpredictable way as you change the initial value by even very small degree, you would still see very similar overall plot. This is why the solution of the system equation is called as an attractor.

 

Here, P, r, and b are parameters that define the behavior of the system, such as the Prandtl number, Rayleigh number, and a geometric factor.

When solved numerically, the solutions to these equations—x(t), y(t), and z(t)—appear random when plotted individually over time. However, when plotted in a parametric space (e.g., plotting x versus y, y versus z, or x versus z), the solutions reveal a fascinating and intricate pattern. This pattern, known as the Lorenz attractor, has a characteristic butterfly shape and is deterministic yet highly sensitive to initial conditions.

This sensitivity means that even a minuscule change in the initial values of x, y, or z leads to vastly different trajectories over time, a hallmark of chaotic systems. Despite this unpredictability in the exact trajectories, the overall structure of the attractor remains consistent. This robustness is why the Lorenz attractor is called an "attractor": it "attracts" the system's state into a specific, complex pattern that persists over time, regardless of small perturbations in the starting conditions.

The Lorenz attractor is widely studied because it beautifully demonstrates the principles of chaos theory, such as deterministic chaos and the underlying order within seemingly random systems. It also has practical implications in meteorology, engineering, and physics, as it highlights the challenges of long-term prediction in systems with chaotic behavior.

The solution of the equation are plotted as below.

The Matlab code to get the solution to the equations and plot them is as follows :

    %Save the following contents in a .m file and run the .m file

    % this is tested only in Matlab, not in Octave

    P = 10;

    r = 28;

    b = 8/3;

     

    dy_dt = @(t,y) [-P*y(1)+P*y(2);...

                        r.*y(1)-y(2)-y(1)*y(3);...

                        y(1)*y(2)-b.*y(3)];

     

    odeopt = odeset ('RelTol', 0.00001, 'AbsTol', 0.00001,'InitialStep',0.5,'MaxStep',0.5);

    [t,y] = ode45(dy_dt,[0 250], [1.0 1.0 1.0],odeopt);

     

    subplot(1,3,1);plot(y(:,1),y(:,2),'r-'); xlabel('y(1)'); ylabel('y(2)');

    subplot(1,3,2);plot(y(:,2),y(:,3),'g-'); xlabel('y(2)'); ylabel('y(3)');

    subplot(1,3,3);plot(y(:,1),y(:,3),'b-'); xlabel('y(1)'); ylabel('y(3)');