A famous dynamical system is the Lorenz butterfly. It is a curve that moves in time through the (X,Y,Z)-space and that is attracted by a strange attractor.

```
# discrete simulation of the Lorenz system
# N is some large number
s = 10; r = 28; b = 8/3
x = 1; y=-1; z = 10
dt=0.0075
X=rep(x,N); Y=rep(y, N); Z=rep(z, N)
for (t in 2:N) {
x=X[t-1];y=Y[t-1]; z=Z[t-1]
dx= - s*x + s*y
dy= r*x - y - x*z
dz= - b*z + x*y
X[t]=x+dx*dt; Y[t]=y+dy*dt; Z[t]=z+dz*dt
}
```

This can be visualized quite easily:

lorenz002 from MrOoijer on Vimeo.

This seems rather chaotic, but there is order in the chaos. There is a theorem by Floris Takens from 1981 that says we can reconstruct the dynamical system from the X-values alone. Choose a parameter tau, and the system (X(t), X(t-tau), X(t-2*tau)) is some kind of projection of the original system. For instance for tau=25 it looks like this:

So let’s assume we have a time series with observations from a system that might be approximated by some dynamical system. Using Takens theorem we can try to understand some of the characteristics of the underlying dynamical system. Or, if we have observed more than one variable, this analysis might help us understand the relationship bewteen the variables.

There are technical difficulties. Takens theorem is about smooth differential equations, whereas in the real world we will observe discrete points in time, i.e. we have difference equations. Secondly, we have a lot of noise in the observations, so we need some sort of stochastic version of the theorem.

Fortunately most of these points have been addressed in the mathematical literature since 1981. See part II.