F.1 Phase Space Reconstruction of the Lorenz Attractor

| Jump to assignment |

Instead of rgl::plot3d we use plot3D::scatter3D to display the Lorenz attractor, because the 3D interactive plot doesn’t run inside this webbook.

N <- 3000
scatter3D(lorenz[1:N, 1], lorenz[1:N,2], lorenz[1:N,3], pch=".", col = "black", colkey = FALSE, type = "l")

The three coupled equations of the Lorenz system constitute the three dimensions (X,Y and Z) of the state space of the system.

lxyz <- data.frame(t=1:N, lorenz[1:N, ])

dygraph(lxyz, main = "Lorenz System - Chaotic Regime") %>%
  dyHighlight(highlightCircleSize = 5, hideOnMouseOut = FALSE) %>%
  dyOptions(colors = RColorBrewer::brewer.pal(3, "Set2"),  drawGrid = FALSE) %>%
  dyLegend(showZeroValues = TRUE)

Embedding Lag

Determine the embedding lag for optimal reconstruction. Use average mutual information as the criterion for selecting a delay.

lagX <- timeLag(lxyz$X, method = "mutual", plot.data = TRUE)

False Nearest Neighbours

Determine how many points in the state space turn out to be neigbours if embedding dimension \(n\) is added to the state space \(X(t), X(t + \tau), \ldots, X(t + n*\tau)\).

(fnnX <- FNN(lxyz$X, tlag = lagX))
False Nearest Neighbors for lxyz$X
----------------------------------
Series points              : 3000 
Embedding dimension(s)     : 1 2 3 4 5 
Time lag                   : 17 
Oribital lag               : 1 
Neighbor tolerance (rtol)  : 10 
Attractor tolerance (atol) : 2 
Test results (%):
           E=1  E=2 E=3 E=4 E=5
rtol     97.84 5.97   0   0   0
atol      1.42 0.00   0   0   0
combined 97.84 5.97   0   0   0
plotRP.fnn(fnnX)

If you use plotRP.fnn(), the figure shows the combined result (grey circles), the maximum of two methods for determining whether points are false neighbours (atol and rtol). If you want to know the details, see the manual entry for FNN(). The combined method will give you the best value for embedding dimension in most contexts. Except… when you try to model a low dimensional system like the Predator-Prey system.

Plot the reconstructed phase space

Objects of the class embedSeries generated by embedSeries() have a special plot function:

(lxxx <- embedSeries(lxyz$X,dimension = 3, tlag = lagX))
Embedding matrix for lxyz$X
---------------------------
Number of points       : 2966 
Embedding dimension(s) : 1 2 3 
Time lag               : 17 
plot(lxxx, pch=".", col = "black", type = "l")

Or use plot3D

plot3D::scatter3D(lxxx[, 1], lxxx[,2], lxxx[,3], pch=".", col = "black", colkey = FALSE, type = "l")