MAM2046W - Second year nonlinear dynamics
MAM2046W - Second year nonlinear dynamics
Section 4.2: The Lorenz equations - detecting chaos
Section 4.2: The Lorenz equations - detecting chaos
So, where were we? We had found that for certain parameter ranges, the long term behaviour of our system seemed to be unpredictable, and somehow stuck on this strange surface of the Strange Attractor. We’re going to study this system for now in the region just beyond where it becomes truly chaotic, with σ=10, and , just after the Hopf bifurcation.
b=
8
3
r=25
In[]:=
σ=10;b=;r=25;{x[t],y[t],z[t]}/.(NDSolve[{x'[t]==σ(y[t]-x[t]),y'[t]==rx[t]-y[t]-x[t]z[t],z'[t]==x[t]y[t]-bz[t],x[0]==10,y[0]==-10,z[0]==0},{x,y,z},{t,0,200}][[1]]);Show[ParametricPlot3D[%,{t,100,200},PlotRange->All,ImageSize->500,AxesLabel->Evaluate[Style[#,20]&/@{"x(t)","y(t)","z(t)"}],PlotPoints->200]]
8
3
Out[]=
One simple question that we can ask is what happens if you start two trajectories off very close to one another...like really close, and let them play out their trajectories. It’s clear that they can only ever get a finite distance apart, because they will both be stuck on the strange attractor, but really we are interested in the behaviour soon after they set off (so long as they have gone past the transient non-chaotic behaviour).
So we’re going to do the following. We will start a trajectory off from the point and let it run until . We will then take that position, and continue running it until , along with another trajectory which will start from the same place that the first is at at , but shifted in its position by just .We can then calculate the distance, δ(t), between them as a function of time...however they will start off so close together that we should take
(10,-10,0)
t=100
t=200
t=100
x
-15
10
ln(δ(t))whereδ(t)=|((t),(t),(t))-((t),(t),(t))|
x
1
y
1
z
1
x
2
y
2
z
2
In[]:=
flow1={x[t],y[t],z[t]}/.(NDSolve[{x'[t]==σ(y[t]-x[t]),y'[t]==rx[t]-y[t]-x[t]z[t],z'[t]==x[t]y[t]-bz[t],x[0]==10,y[0]==-10,z[0]==0},{x,y,z},{t,0,200}][[1]]);{x100,y100,z100}=flow1/.t->100;flow2={x[t],y[t],z[t]}/.(NDSolve[{x'[t]==σ(y[t]-x[t]),y'[t]==rx[t]-y[t]-x[t]z[t],z'[t]==x[t]y[t]-bz[t],x[100]==x100+,y[100]==y100,z[100]==z100},{x,y,z},{t,100,200}][[1]]);data=DeleteCasesTransposet,Log
-15
10
Total[]
/.t->Range[100.1,140,0.1],{_,Indeterminate};ListLinePlot[data,AxesLabel->{Style["t",20],Style["ln(δ(t))",20]},ImageSize->500,PlotStyle->Blue]2
(flow1-flow2)
Out[]=
We see here that there are two regimes. One, where we have this rise, and then it seems to level out. It levels out because it’s trapped in a finite region, and they can only get so far apart. What we are interested in is the rise of the first part. If we can calculate the gradient of the first straight line part, then we should have that:
ln(δ(t))=a+λt⟹δ(t)=
δ
0
λt
e
Note that often δ is defined as the vector quantity, but here I’m just treating it as the magnitude. Note also that we are taking here to start at the moment that the second trajectory starts off close to the first.
t
So let’s do that for the line above:
In[]:=
flow1={x[t],y[t],z[t]}/.(NDSolve[{x'[t]==σ(y[t]-x[t]),y'[t]==rx[t]-y[t]-x[t]z[t],z'[t]==x[t]y[t]-bz[t],x[0]==10,y[0]==-10,z[0]==0},{x,y,z},{t,0,200}][[1]]);{x100,y100,z100}=flow1/.t->100;flow2={x[t],y[t],z[t]}/.(NDSolve[{x'[t]==σ(y[t]-x[t]),y'[t]==rx[t]-y[t]-x[t]z[t],z'[t]==x[t]y[t]-bz[t],x[100]==x100+,y[100]==y100,z[100]==z100},{x,y,z},{t,100,200}][[1]]);data=DeleteCasesTransposet-100.1,Log
-15
10
Total[]
/.t->Range[100.1,140,0.1],{_,Indeterminate};FindFit[data[[;;200]],a+λt,{a,λ},t];Show[ListLinePlot[data,AxesLabel->{Style["t",20],Style["ln(δ(t))",20]},ImageSize->500,PlotStyle->Blue],Plot[a+λt/.%,{t,0,20},PlotStyle->Red],PlotLabel->Style["λ = "<>ToString[λ/.%],20]]2
(flow1-flow2)
Out[]=
So here we have calculated λ and it gives around 0.84...but that’s just one particular trajectory. We can do better than this by starting the two trajectories at different times in the first’s trajectory. Here we take different starting points and create a histogram of the λ we find.
In[]:=
findλ[start_]:=Module{flow1,flow2,data,x100,y100,z100},flow1={x[t],y[t],z[t]}/.(NDSolve[{x'[t]==σ(y[t]-x[t]),y'[t]==rx[t]-y[t]-x[t]z[t],z'[t]==x[t]y[t]-bz[t],x[0]==10,y[0]==-10,z[0]==0},{x,y,z},{t,0,200}][[1]]);{x100,y100,z100}=flow1/.t->start;flow2={x[t],y[t],z[t]}/.(NDSolve[{x'[t]==σ(y[t]-x[t]),y'[t]==rx[t]-y[t]-x[t]z[t],z'[t]==x[t]y[t]-bz[t],x[start]==x100+,y[start]==y100,z[start]==z100},{x,y,z},{t,start,200}][[1]]);data=DeleteCasesTransposet,Log
-15
10
Total[]
/.t->Range[start,start+10,0.1],{_,Indeterminate};a1/.FindFit[data,a1x+b1,{a1,b1},x]findλ[#]&/@Range[100,170,0.25];Histogram[%,ImageSize->500,AxesLabel->{Style["λ",20],Style["n",20]}]Style["Mean λ = "<>ToString[Mean[%%]],20]2
(flow1-flow2)
Out[]=
This parameter, λ, which is found numerically is called the Lyapunov exponent - or more accurately a Lyapunov exponent. Rather than asking about two trajectories, starting a little way apart, we can ask about a small sphere of starting points, and ask about how changes its shape changes in different directions.
This exponential behaviour that we have found, with a well-defined Lyapunov exponent is one of the key signs of chaos. We can ask how long into the future out predictions will be good...but it depends on what we mean by good. Let’s say that we want our numerical answer to be within Δ of the true answer. We can ask when
So we can project to around 74 units of time into the future here.
The third factor is that our system needs to be deterministic. The seeming unpredictability in the system comes from the non-linear features and not because of any underlying noise in the system. There is a form of chaos called quantum chaos which is not within a deterministic system, but that is something that we will not go into in this course!
The other word that we introduced in the last lecture was this idea of an attractor (be it strange or not). An attractor is some set of points/lines/volume in phase space that has three main properties:
1) If you start in that set, you remain in that set forever
3) There is no proper subset of the attractor that has the above properties.
The Lorenz Map
So this looks kind of pretty, but is it useful? Well, strangely, it turns out that it is, and Lorenz used this map to argue for the absence of any stable limit cycles hidden within the Strange Attractor. The question is whether, while we seem to be seeing apparently chaotic behaviour, perhaps there is some very weakly attracting limit cycle that does exist, and trajectories can get attracted to, thus ruling out chaos.
Well, just as in any first order system, to have a fixed point, even in a discrete map, as this is, we can perform a linearisation around the fixed point. We have to be a bit careful though, as what we want to say is that
Remember that this is a difference equation, and not a differential equation, so there’s going to be no integrating going on here. We do however have:
Taking the absolute value of both sides we have:
The Lorenz map seems to always have a gradient whose absolute value is greater than 1, in particular at the fixed point:
The gradient here has magnitude greater than one, and indeed that is always so . This means that:
Which means that we are moving away from the fixed point. ie. the fixed point is unstable.
But let’s again perturb this:
which we can expand to give:
So we know that there are no stable fixed points, and we have just argued (if not proved) that there are no stable limit cycles...so it does indeed seem to be chaotic.
One thing which we should be rather careful of here is that we have clearly made a pretty important approximation...and that is that we can talk about the derivative of the Lorenz map...but we said before that it’s not really a curve, so does it make sense to talk about taking derivatives of it? Well, this is not a formal proof - it is simply an argument based on the observation of the Lorenz map.