# Visual Analysis of Nonlinear Dynamical Systems: Chaos, Fractals, Self-Similarity and the Limits of Prediction

## Abstract

**:**

## 1. Introduction

## 2. Background and Model

_{t}

_{+1}= r·x

_{t}·(1 − x

_{t}). This nonlinear equation defines the rules, or dynamics, of our system: x represents the population at some time t, and r represents the growth rate. Thus, the population level at any given time is a function of the growth rate parameter and the previous time step’s population level. If the growth rate is set too low, the population will die out and go extinct. Higher growth rates might settle toward a stable value or fluctuate across a series of population booms and busts.

## 3. System Bifurcations

## 4. Fractals and Strange Attractors

- Begin on the x-axis at the point (x, 0) where x is the initial population value (0.5 in our example), and draw a vertical line to the red function curve; this new point is at (x, f(x)).
- Draw a horizontal line from this point to the gray identity line; this new point is at (f(x), f(x)).
- Draw a vertical line from this point to the red function curve; this new point is at (f(x), f(f(x))).
- Repeat Steps 2 and 3 recursively. The cobwebs in Figure 8 were iterated 100 times.

## 5. Chaos and Randomness

## 6. Unpredictable Systems: The Butterfly Effect

## 7. Conclusions

## Conflicts of Interest

## Appendix A

- numpy is a numerical library that handles the underlying data vectors;
- numba provides just-in-time compilation for optimized performance;
- pandas handles the higher-level data structures and analysis;
- matplotlib is the engine used to produce the visualizations and graphics.

- Figure 2: bifurcation_plot(simulate(num_rates = 1000))
- Figure 4: bifurcation_plot(simulate(rate_min = 3.7, rate_max = 3.9, num_rates = 1000))
- Figure 6D: phase_diagram(simulate(num_gens = 100, rate_min = 3.57))
- Figure 8D: cobweb_plot(r = 3.9, x0 = 0.5)
- Figure 11: phase_diagram_3d(simulate(num_gens = 4000, rate_min = 3.6, num_rates = 50)).

## References

- Hastings, A.; Hom, C.L.; Ellner, S.; Turchin, P.; Godfray, H.C.J. Chaos in Ecology: Is Mother Nature a Strange Attractor? Annu. Rev. Ecol. Syst.
**1993**, 24, 1–33. [Google Scholar] [CrossRef] - Rickles, D.; Hawe, P.; Shiell, A. A Simple Guide to Chaos and Complexity. J. Epidemiol. Commun. Health
**2007**, 61, 933–937. [Google Scholar] [CrossRef] [PubMed] - Suetani, H.; Soejima, K.; Matsuoka, R.; Parlitz, U.; Hata, H. Manifold Learning Approach for Chaos in the Dripping Faucet. Phys. Rev. E
**2012**, 86, 036209. [Google Scholar] [CrossRef] [PubMed] - Singh, S.L.; Mishra, S.N.; Sinkala, W. A New Iterative Approach to Fractal Models. Commun. Nonlinear Sci. Numer. Simul.
**2012**, 17, 521–529. [Google Scholar] [CrossRef] - Hoshi, R.A.; Pastre, C.M.; Vanderlei, L.C.M.; Godoy, M.F. Poincaré Plot Indexes of Heart Rate Variability: Relationships with Other Nonlinear Variables. Auton. Neurosci.
**2013**, 177, 271–274. [Google Scholar] [CrossRef] [PubMed] - Babbs, C.F. Initiation of Ventricular Fibrillation by a Single Ectopic Beat in Three Dimensional Numerical Models of Ischemic Heart Disease: Abrupt Transition to Chaos. J. Clin. Exp. Cardiol.
**2014**, 5, 2–11. [Google Scholar] [CrossRef] - Glass, L. Introduction to Controversial Topics in Nonlinear Science: Is the Normal Heart Rate Chaotic? Chaos
**2009**, 19, 028501. [Google Scholar] [CrossRef] [PubMed] - Hong, Z.; Dong, J. Chaos Theory and Its Application in Modern Cryptography. In Proceedings of the 2010 International Conference on Computer Application and System Modeling (ICCASM 2010), Taiyuan, China, 22–24 October 2010; pp. 332–334.
- Makris, G.; Antoniou, I. Cryptography with Chaos. In Proceedings of the 5th Chaotic Modeling and Simulation International Conference, Athens, Greece, 12–15 June 2012; pp. 309–318.
- Guastello, S.J. Chaos, Catastrophe, and Human Affairs: Applications of Nonlinear Dynamics to Work, Organizations, and Social Evolution; Psychology Press: New York, NY, USA, 2013. [Google Scholar]
- Richards, D. From Individuals to Groups: The Aggregation of Votes and Chaotic Dynamics. In Chaos Theory in the Social Sciences; Kiel, L.D., Elliott, E., Eds.; University of Michigan Press: Ann Arbor, MI, USA, 1996; pp. 89–116. [Google Scholar]
- Batty, M.; Longley, P. Fractal Cities: A Geometry of Form and Function; Academic Press: London, UK, 1994. [Google Scholar]
- Batty, M.; Xie, Y. Self-Organized Criticality and Urban Development. Discret. Dyn. Nat. Soc.
**1999**, 3, 109–124. [Google Scholar] [CrossRef] - Benguigui, L.; Czamanski, D.; Marinov, M.; Portugali, Y. When and Where is a City Fractal? Environ. Plan. B
**2000**, 27, 507–519. [Google Scholar] [CrossRef] - Shen, G. Fractal Dimension and Fractal Growth of Urbanized Areas. Int. J. Geogr. Inf. Sci.
**2002**, 16, 419–437. [Google Scholar] [CrossRef] - Chen, Y.; Zhou, Y. Scaling Laws and Indications of Self-Organized Criticality in Urban Systems. Chaos Solitons Fractals
**2008**, 35, 85–98. [Google Scholar] [CrossRef] - Chen, W.C. Nonlinear Dynamics and Chaos in a Fractional-Order Financial System. Chaos Solitons Fractals
**2008**, 36, 1305–314. [Google Scholar] [CrossRef] - Guégan, D. Chaos in Economics and Finance. Annu. Rev. Control
**2009**, 33, 89–93. [Google Scholar] [CrossRef] [Green Version] - Puu, T. Attractors, Bifurcations, & Chaos: Nonlinear Phenomena in Economics, 2nd ed.; Springer Science & Business Media: New York, NY, USA, 2013. [Google Scholar]
- Rosser, J.B. Chaos Theory and Rationality in Economics. In Chaos Theory in the Social Sciences; Kiel, L.D., Elliott, E., Eds.; University of Michigan Press: Ann Arbor, MI, USA, 1996; pp. 199–213. [Google Scholar]
- Oxley, L.; George, D.A.R. Economics on the Edge of Chaos: Some Pitfalls of Linearizing Complex Systems. Environ. Model. Softw.
**2007**, 22, 580–589. [Google Scholar] [CrossRef] - Hamouche, M.B. Can Chaos Theory Explain Complexity In Urban Fabric? Applications in Traditional Muslim Settlements. Nexus Netw. J.
**2009**, 11, 217–242. [Google Scholar] [CrossRef] - Ostwald, M.J. The Fractal Analysis of Architecture: Calibrating the Box-Counting Method Using Scaling Coefficient and Grid Disposition Variables. Environ. Plan B
**2013**, 40, 644–663. [Google Scholar] [CrossRef] - Cartwright, T.J. Planning and Chaos Theory. J. Am. Plan. Assoc.
**1991**, 57, 44–56. [Google Scholar] [CrossRef] - Innes, J.E.; Booher, D.E. Planning with Complexity; Routledge: London, UK, 2010. [Google Scholar]
- Batty, M.; Marshall, S. The Origins of Complexity Theory in Cities and Planning. In Complexity Theories of Cities Have Come of Age; Portugali, J., Meyer, H., Stolk, E., Tan, E., Eds.; Springer: Berlin, Germany, 2012; pp. 21–45. [Google Scholar]
- Batty, M. The New Science of Cities; MIT Press: Cambridge, MA, USA, 2013. [Google Scholar]
- Alpigini, J.J. Dynamical System Visualization and Analysis via Performance Maps. Inf. Vis.
**2004**, 3, 271–287. [Google Scholar] [CrossRef] - Layek, G.C. An Introduction to Dynamical Systems and Chaos; Springer: New Delhi, India, 2015. [Google Scholar]
- Chen, C. Information Visualization: Beyond the Horizon, 2nd ed.; Springer: London, UK, 2006. [Google Scholar]
- Lorenz, E.N. Deterministic Nonperiodic Flow. J. Atmos. Sci.
**1963**, 20, 130–141. [Google Scholar] [CrossRef] - May, R.M. Simple Mathematical Models with Very Complicated Dynamics. Nature
**1976**, 261, 459–467. [Google Scholar] [CrossRef] [PubMed] - Packard, N.H.; Crutchfield, J.P.; Farmer, J.D.; Shaw, R.S. Geometry from a Time Series. Phys. Rev. Lett.
**1980**, 45, 712–716. [Google Scholar] [CrossRef] - Bradley, E. Time Series Analysis. In Intelligent Data Analysis: An Introduction, 2nd ed.; Hand, D., Berthold, M., Eds.; Springer: Berlin, Germany, 2003. [Google Scholar]
- Bradley, E.; Kantz, H. Nonlinear Time-Series Analysis Revisited. Chaos
**2015**, 25, 097610. [Google Scholar] [CrossRef] [PubMed] - Chettiparamb, A. Metaphors in Complexity Theory and Planning. Plan Theory
**2006**, 5, 71–91. [Google Scholar] [CrossRef] - Tomida, A.G. Matlab Toolbox and GUI for Analyzing One-Dimensional Chaotic Maps. In Proceedings of the 2008 International Conference on Computational Sciences and Its Applications, Perugia, Italy, 30 June–3 July 2008; pp. 321–330.
- Stewart, I. The Lorenz Attractor Exists. Nature
**2000**, 406, 948–949. [Google Scholar] [CrossRef] [PubMed] - Danforth, C.M. Chaos in an Atmosphere Hanging on a Wall. Available online: http://mpe2013.org/2013/03/17/chaos-in-an-atmosphere-hanging-on-a-wall/ (accessed on 1 September 2016).
- Gleick, J. Chaos: Making a New Science; Cardinal: Indianapolis, IN, USA, 1991. [Google Scholar]
- May, R.M. Biological Populations with Nonoverlapping Generations: Stable Points, Stable Cycles, and Chaos. Science
**1974**, 186, 645–647. [Google Scholar] [CrossRef] [PubMed] - Li, W.; Wang, K.; Su, H. Optimal Harvesting Policy for Stochastic Logistic Population Model. Appl. Math. Comput.
**2011**, 218, 157–162. [Google Scholar] [CrossRef] - Pastijn, H. Chaotic Growth with the Logistic Model of P.F. Verhulst. In The Logistic Map and the Route to Chaos; Ausloos, M., Dirickx, M., Eds.; Springer: Berlin, Germany, 2006; pp. 3–11. [Google Scholar]
- Strogatz, S.H. Nonlinear Dynamics and Chaos, 2nd ed.; Westview Press: Boulder, CO, USA, 2014. [Google Scholar]
- Ruelle, D.; Takens, F. On the Nature of Turbulence. Commun. Math. Phys.
**1971**, 20, 167–192. [Google Scholar] [CrossRef] - Shilnikov, L. Bifurcations and Strange Attractors. Proc. Int. Congr. Math.
**2002**, 3, 349–372. [Google Scholar] - Grebogi, C.; Ott, E.; Yorke, J.A. Chaos, Strange Attractors, and Fractal Basin Boundaries in Nonlinear Dynamics. Science
**1987**, 238, 632–638. [Google Scholar] [CrossRef] [PubMed] - Gershenson, C. Introduction to Chaos in Deterministic Systems. Available online: http://arxiv.org/abs/nlin/0308023 (accessed on 10 November 2016).
- Wu, G.C.; Baleanu, D. Discrete Fractional Logistic Map and Its Chaos. Nonlinear Dyn.
**2014**, 75, 283–287. [Google Scholar] [CrossRef] - Li, T.Y.; Yorke, J.A. Period Three Implies Chaos. Am. Math. Mon.
**1975**, 82, 985–992. [Google Scholar] [CrossRef] - Feigenbaum, M.J. Quantitative Universality for a Class of Nonlinear Transformations. J. Stat. Phys.
**1978**, 19, 25–52. [Google Scholar] [CrossRef] - Feigenbaum, M.J. Universal Behavior in Nonlinear Systems. Phys. Nonlinear Phenom.
**1983**, 7, 16–39. [Google Scholar] [CrossRef] - Hénon, M. A Two-Dimensional Mapping with a Strange Attractor. Commun. Math. Phys.
**1976**, 50, 69–77. [Google Scholar] [CrossRef] - Farmer, J.D.; Ott, E.; Yorke, J.A. The Dimension of Chaotic Attractors. Phys. Nonlinear Phenom.
**1983**, 7, 153–180. [Google Scholar] [CrossRef] - Grassberger, P.; Procaccia, I. Characterization of Strange Attractors. Phys. Rev. Lett.
**1983**, 50, 346–349. [Google Scholar] [CrossRef] - Mandelbrot, B.B. How Long Is the Coast of Britain? Science
**1967**, 156, 636–638. [Google Scholar] [CrossRef] [PubMed] - Mandelbrot, B.B. The Fractal Geometry of Nature; Macmillan: New York, NY, USA, 1983. [Google Scholar]
- Mandelbrot, B.B. Multifractals and 1/f Noise; Springer: New York, NY, USA, 1999. [Google Scholar]
- Huikuri, H.V.; Mäkikallio, T.H.; Peng, C.K.; Goldberger, A.L.; Hintze, U.; Møller, M. Diamond Study Group. Fractal Correlation Properties of RR Interval Dynamics and Mortality in Patients with Depressed Left Ventricular Function after an Acute Myocardial Infarction. Circulation
**2000**, 101, 47–53. [Google Scholar] [CrossRef] [PubMed] - Takens, F. Detecting Strange Attractors in Turbulence. In Dynamical Systems and Turbulence; Rand, D., Young, L.S., Eds.; Springer: Berlin, Germany, 1981; pp. 366–381. [Google Scholar]
- Theiler, J. Estimating Fractal Dimension. J. Opt. Soc. Am. A
**1990**, 7, 1055–1073. [Google Scholar] [CrossRef] - Kekre, H.B.; Sarode, T.; Halarnkar, P.N. A Study of Period Doubling in Logistic Map for Shift Parameter. Int. J. Eng. Trends Technol.
**2014**, 13, 281–286. [Google Scholar] [CrossRef] - Clarke, K.C. Computation of the Fractal Dimension of Topographic Surfaces Using the Triangular Prism Surface Area Method. Comput. Geosci.
**1986**, 12, 713–722. [Google Scholar] [CrossRef] - Sander, E.; Yorke, J.A. The Many Facets of Chaos. Int. J. Bifurc. Chaos
**2015**, 25, 1530011. [Google Scholar] [CrossRef] - Sprott, J.C.; Xiong, A. Classifying and Quantifying Basins of Attraction. Chaos
**2015**, 25, 083101. [Google Scholar] [CrossRef] [PubMed] - Brown, T.A. Measuring Chaos Using the Lyapunov Exponent. In Chaos Theory in the Social Sciences; Kiel, L.D., Elliott, E., Eds.; University of Michigan Press: Ann Arbor, MI, USA, 1996; pp. 53–66. [Google Scholar]
- Wolf, A.; Swift, J.B.; Swinney, H.L.; Vastano, J.A. Determining Lyapunov Exponents from a Time Series. Phys. Nonlinear Phenom.
**1985**, 16, 285–317. [Google Scholar] [CrossRef] - Dingwell, J.B. Lyapunov Exponents. In Wiley Encyclopedia of Biomedical Engineering; Akay, M., Ed.; John Wiley & Sons: Hoboken, NJ, USA, 2006. [Google Scholar]
- Chan, K.S.; Tong, H. Chaos: A Statistical Perspective; Springer Science & Business Media: New York, NY, USA, 2013. [Google Scholar]
- Hunt, B.R.; Ott, E. Defining Chaos. Chaos
**2015**, 25, 097618. [Google Scholar] [CrossRef] [PubMed] - Kantz, H.; Radons, G.; Yang, H. The Problem of Spurious Lyapunov Exponents in Time Series Analysis and Its Solution by Covariant Lyapunov Vectors. J. Phys. Math. Theor.
**2013**, 46, 254009. [Google Scholar] [CrossRef]

**Figure 1.**Time series graph of the logistic map with seven growth rate parameter values over 20 generations.

**Figure 2.**Bifurcation diagram of 100 generations of the logistic map for 1000 growth rate parameter values between zero and four. The vertical slice above each growth rate depicts the system’s attractor at that rate.

**Figure 3.**Bifurcation diagram of 100 generations of the logistic map for 1000 growth rate parameter values between 2.8 and 4. The vertical slice above each growth rate depicts the system’s attractor at that rate.

**Figure 4.**Bifurcation diagram of 100 generations of the logistic map for 1000 growth rate parameter values between 3.7 and 3.9. The system moves from order to chaos and back again as the growth rate is adjusted.

**Figure 5.**Bifurcation diagram of 100 generations of the logistic map for 1000 growth rate parameter values between 3.84 and 3.856. This is the same structure that we saw earlier at the macro-level in Figure 3, because chaotic systems’ strange attractors are fractal.

**Figure 6.**Phase diagrams of the logistic map over 200 generations for growth rate parameter values of: 2.9 (

**A**); 3.5 (

**B**); 3.56 (

**C**); and 3.57 (

**D**). When the parameter is set to 2.9, the model converges at a single fixed-point. When the parameter is set to 3.5 or higher, the model oscillates over four points, then eight, and on and on as it bifurcates.

**Figure 7.**Cropped phase diagrams of the logistic map over 200 generations for: (

**A**) a growth rate parameter value of 3.9; and (

**B**) 50 growth rate parameter values between 3.6 and 4 (the chaotic regime), each with its own colored line

**Figure 8.**Cobweb plots of the logistic map for growth rate parameter values of: (

**A**) 1; (

**B**) 2.7; (

**C**) 3.5; (

**D**) 3.9. The diagonal gray identity line represents y = x; the red curve represents the logistic map as y = f(x) for each of the four parameter values; and the blue cobweb line represents the system’s trajectory over 100 generations.

**Figure 9.**Plot of two time series, one deterministic/chaotic from the logistic map (

**blue**), and one random (

**red**).

**Figure 10.**Phase diagrams of the time series in Figure 9. (

**A**) is a two-dimensional state space version (the xy-plane) of the three-dimensional one (

**B**).

**Figure 11.**Two different viewing perspectives of a single three-dimensional phase diagram of the logistic map over 200 generations for 50 growth rate parameter values between 3.6 and 4, each with its own colored line.

**Figure 12.**Cobweb plots of the logistic map pulling initial population values of 0.1 (

**A**), 0.5 (

**B**) and 0.9 (

**C**) into the same fixed-point attractor over time. At this growth rate parameter value of 2.7, the Lyapunov exponent is negative.

**Figure 13.**Plot of two time series with identical dynamics, one starting at an initial population value of 0.5 (

**blue**) and the other starting at 0.50001 (

**red**). At this growth rate parameter value of 3.9, the Lyapunov exponent is positive; thus, the system is chaotic, and we can see the nearby points diverge over time.

**Table 1.**Population values produced by the logistic map with 7 growth rate parameter values over 20 generations.

Generation | r = 0.5 | r = 1.0 | r = 1.5 | r = 2.0 | r = 2.5 | r = 3.0 | r = 3.5 |
---|---|---|---|---|---|---|---|

1 | 0.500 | 0.500 | 0.500 | 0.500 | 0.500 | 0.500 | 0.500 |

2 | 0.125 | 0.250 | 0.375 | 0.500 | 0.625 | 0.750 | 0.875 |

3 | 0.055 | 0.188 | 0.352 | 0.500 | 0.586 | 0.562 | 0.383 |

4 | 0.026 | 0.152 | 0.342 | 0.500 | 0.607 | 0.738 | 0.827 |

5 | 0.013 | 0.129 | 0.338 | 0.500 | 0.597 | 0.580 | 0.501 |

6 | 0.006 | 0.112 | 0.335 | 0.500 | 0.602 | 0.731 | 0.875 |

7 | 0.003 | 0.100 | 0.334 | 0.500 | 0.599 | 0.590 | 0.383 |

8 | 0.002 | 0.090 | 0.334 | 0.500 | 0.600 | 0.726 | 0.827 |

9 | 0.001 | 0.082 | 0.334 | 0.500 | 0.600 | 0.597 | 0.501 |

10 | 0.000 | 0.075 | 0.333 | 0.500 | 0.600 | 0.722 | 0.875 |

11 | 0.000 | 0.069 | 0.333 | 0.500 | 0.600 | 0.603 | 0.383 |

12 | 0.000 | 0.065 | 0.333 | 0.500 | 0.600 | 0.718 | 0.827 |

13 | 0.000 | 0.060 | 0.333 | 0.500 | 0.600 | 0.607 | 0.501 |

14 | 0.000 | 0.057 | 0.333 | 0.500 | 0.600 | 0.716 | 0.875 |

15 | 0.000 | 0.054 | 0.333 | 0.500 | 0.600 | 0.610 | 0.383 |

16 | 0.000 | 0.051 | 0.333 | 0.500 | 0.600 | 0.713 | 0.827 |

17 | 0.000 | 0.048 | 0.333 | 0.500 | 0.600 | 0.613 | 0.501 |

18 | 0.000 | 0.046 | 0.333 | 0.500 | 0.600 | 0.711 | 0.875 |

19 | 0.000 | 0.044 | 0.333 | 0.500 | 0.600 | 0.616 | 0.383 |

20 | 0.000 | 0.042 | 0.333 | 0.500 | 0.600 | 0.710 | 0.827 |

© 2016 by the author; licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC-BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Boeing, G.
Visual Analysis of Nonlinear Dynamical Systems: Chaos, Fractals, Self-Similarity and the Limits of Prediction. *Systems* **2016**, *4*, 37.
https://doi.org/10.3390/systems4040037

**AMA Style**

Boeing G.
Visual Analysis of Nonlinear Dynamical Systems: Chaos, Fractals, Self-Similarity and the Limits of Prediction. *Systems*. 2016; 4(4):37.
https://doi.org/10.3390/systems4040037

**Chicago/Turabian Style**

Boeing, Geoff.
2016. "Visual Analysis of Nonlinear Dynamical Systems: Chaos, Fractals, Self-Similarity and the Limits of Prediction" *Systems* 4, no. 4: 37.
https://doi.org/10.3390/systems4040037