Reappraising double pendulum dynamics across multiple computational platforms

Authors

DOI:

https://doi.org/10.19153/cleiej.28.1.10

Keywords:

Chaotic Dynamics, Computational Platforms, Nonlinear Dynamics, Numerical Simulations, Sensitivity Analysis

Abstract

This study presents the complexity and sensitivity of chaotic system dynamics in the case of the double pendulum. It applied detailed numerical analyses of the double pendulum in multiple computing platforms in order to demonstrate the complexity in behavior of the system of double pendulums. The equations of motion were derived from the Euler-Lagrange formalism, in order to capture the system's dynamics, which is coupled nonlinearly. These were solved numerically using the efficient Runge-Kutta-Fehlberg method, implemented in Python, R, GNU Octave, and Julia, while runtimes and memory usage were extensively benchmarked across these environments. Time series analyses, including the calculation of Shannon entropy and the Kolmogorov - Smirnov test, quantified the system's unpredictability and sensitivity to infinitesimal perturbations of the initial conditions. Phase space diagrams illustrated the intricate trajectories and strange attractors, as further confirmation of the chaotic nature of the double pendulum. All the findings have a clear indication of the importance of accurate measurements of the initial condition in a chaotic system, contributing to an increased understanding of nonlinear dynamics. Future research directions are faster simulations using Numba and GPU computing, stochastic effects, chaotic synchronization, and applications in climate modeling. This work will be useful for understanding chaos theory and efficient computational approaches in complex systems of dynamical nature.

References

- C. Letellier, R. Abraham, D. L. Shepelyansky, O. E. Rössler, P. Holmes, R. Lozi, L. Glass, A. Pikovsky, L. F. Olsen, I. Tsuda, C. Grebogi, U. Parlitz, R. Gilmore, L. M. Pecora, and T. L. Carroll, “Some elements for a history of the dynamical systems theory,” Chaos, vol. 31, no. 5, 2021. [Online]. Available: https:/doi.org/10.1063/5.0047851

- L. Atiyah, “Dame Mary Cartwright 1900–1997,” Math. Gaz., vol. 82, no. 495, pp. 494–496, 1998. [Online]. Available: https://doi.org/10.1017/S002555720016262X

- R. P. Crease, “Letting demons do the teaching,” Phys. World, vol. 35, no. 4, p. 31, 2022. [Online]. Available: https://doi.org/10.1088/2058-7058/35/04/20

- D. V. Alexandrov, I. A. Bashkirtseva, M. Crucifix, and L. B. Ryashko, “Nonlinear climate dynamics: From deterministic behaviour to stochastic excitability and chaos,” Phys. Rep., vol. 902, pp. 1–60, 2021. [Online]. Available: https://doi.org/10.1016/j.physrep.2020.11.002

- S. Khatiwala, B. E. Shaw, and M. A. Cane, “Enhanced sensitivity of persistent events to weak forcing in dynamical and stochastic systems: Implications for climate change,” Geophys. Res. Lett., vol. 28, no. 13, pp. 2633–2636, 2001. [Online]. Available: https://doi.org/10.1029/2000GL012773

- M. V. Budyansky, M. Y. Uleysky, and S. V. Prants, “Lagrangian coherent structures, transport and chaotic mixing in simple kinematic ocean models,” Commun. Nonlinear Sci. Numer. Simul., vol. 12, no. 1, pp. 31–44, 2007. [Online]. Available: https://doi.org/10.1016/j.cnsns.2006.01.008

- R. Cropp, I. M. Moroz, and J. Norbury, “Chaotic dynamics in a simple dynamical green ocean plankton model,” J. Mar. Syst., vol. 139, pp. 483–495, 2014. [Online]. Available: https://doi.org/10.1016/j.jmarsys.2014.08.002

- A. Tantet, V. Lucarini, F. Lunkeit, and H. A. Dijkstra, “Crisis of the chaotic attractor of a climate model: a transfer operator approach,” Nonlinearity, vol. 31, no. 5, p. 2221, 2018. [Online]. Available: https://doi.org/10.1088/1361-6544/aaaf42

- B.-W. Shen, R. A. Pielke Sr, X. Zeng, J.-J. Baik, S. Faghih-Naini, J. Cui, and R. Atlas, “Is Weather Chaotic?: Coexistence of Chaos and Order within a Generalized Lorenz Model,” Bull. Am. Meteorol. Soc., vol. 102, no. 1, pp. E148–E158, 2021. [Online]. Available: https://doi.org/10.1175/BAMS-D-19-0165.1

- M. Ghil and V. Lucarini, “The physics of climate variability and climate change,” Rev. Mod. Phys., vol. 92, no. 3, p. 035002, 2020. [Online]. Available: https://doi.org/10.1103/RevModPhys.92.035002

- J. P. Crutchfield, “Between order and chaos,” Nat. Phys., vol. 8, no. 1, pp. 17–24, 2012. [Online]. Available: https://doi.org/10.1038/nphys2190

- F. Rindler, Calculus of Variations. Berlin: Springer, 2018, vol. 5. [Online]. Available: https://doi.org/10.1007/978-3-319-77637-8

- N. J. Higham, M. R. Dennis, P. Glendinning, P. A. Martin, F. Santosa, and J. Tanner, Princeton Companion to Applied Mathematics. Princeton: Princeton University Press, 2015. [Online]. Available: https://doi.org/10.1515/9781400874477

- A. M. Calvão and T. P. Penna, “The double pendulum: a numerical study,” Eur. J. Phys., vol. 36, no. 4, p. 045018, 2015. [Online]. Available: https://doi.org/10.1088/0143-0807/36/4/045018

- P. Virtanen, R. Gommers, T. E. Oliphant, M. Haberland, T. Reddy, D. Cournapeau, E. Burovski, P. Peterson, W. Weckesser, J. Bright, S. J. van der Walt, M. Brett, J. Wilson, K. J. Millman, N. Mayorov, A. R. J. Nelson, E. Jones, R. Kern, E. Larson, C. J. Carey, ?. Polat, Y. Feng, E. W. Moore, J. VanderPlas, D. Laxalde, J. Perktold, R. Cimrman, I. Henriksen, E. A. Quintero, C. R. Harris, A. M. Archibald, A. H. Ribeiro, F. Pedregosa, P. van Mulbregt, and SciPy 1.0 Contributors, “SciPy 1.0: Fundamental Algorithms for Scientific Computing in Python,” Nat. Methods, vol. 17, pp. 261–272, 2020. [Online]. Available: https://doi.org/10.1038/s41592-019-0686-2

- K. Soetaert, T. Petzoldt, and R. W. Setzer, “Solving differential equations in R: package deSolve,” J. Stat. Softw., vol. 33, pp. 1–25, 2010. [Online]. Available: https://doi.org/10.18637/jss.v033.i09

- C. Rackauckas and Q. Nie, “Differentialequations.jl–A Performant and Feature-rich Ecosystem for Solving Differential Equations in Julia,” J. Open Res. Softw., vol. 5, no. 1, pp. 15–15, 2017. [Online]. Available: https://doi.org/10.5334/jors.151

- J. W. Eaton, “GNU Octave and reproducible research,” J. Process Control, vol. 22, no. 8, pp. 1433–1438, 2012. [Online]. Available: https://doi.org/10.1016/j.jprocont.2012.04.006

- S. H. S. Herho, Tutorial Pemrograman Python 2 Untuk Pemula. Bandung: WCPL ITB, 2017. [Online]. Available: https://doi.org/10.31227/osf.io/bau26

- S. H. S. Herho, M. R. Syahputra, and N. J. Trilaksono, Pengantar Metode Numerik Terapan: Menggunakan Python. Bandung: WCPL ITB, 2024. [Online]. Available: https:

//doi.org/10.22541/au.170689157.78106030/v1

- L. Kong, “Epidemic modeling using differential equations with implementation in R,” Int. J. Math. Educ. Sci. Technol., vol. 55, no. 2, pp. 480–491, 2024. [Online]. Available: https://doi.org/10.1080/0020739X.2023.2249902

- J. Bezanson, J. Chen, B. Chung, S. Karpinski, V. B. Shah, J. Vitek, and L. Zoubritzky, “Julia: Dynamism and performance reconciled by design,” Proc. ACM Program. Lang., vol. 2, no. OOPSLA, pp. 1–23, 2018. [Online]. Available: https://doi.org/10.1145/3276490

- K. Gao, G. Mei, F. Piccialli, S. Cuomo, J. Tu, and Z. Huo, “Julia language in machine learning: Algorithms, applications, and open issues,” Comput. Sci. Rev., vol. 37, p. 100254, 2020. [Online]. Available: https://doi.org/10.1016/j.cosrev.2020.100254

- D. Wang, Y. Ueda, R. G. Kula, T. Ishio, and K. Matsumoto, “Can we benchmark code review studies? a systematic mapping study of methodology, dataset, and metric,” J. Syst. Softw., vol. 180, p. 111009, 2021. [Online]. Available: https://doi.org/10.1016/j.jss.2021.111009

- W. H. Kruskal and W. A. Wallis, “Use of Ranks in One-Criterion Variance Analysis,” J. Am. Stat. Assoc., vol. 47, no. 260, pp. 583–621, 1952. [Online]. Available: https://doi.org/10.1080/01621459.1952.10483441

- O. J. Dunn, “Multiple comparisons using rank sums,” Technometrics, vol. 6, no. 3, pp. 241–252, 1964. [Online]. Available: https://doi.org/10.1080/00401706.1964.10490181

- B. Das, D. Murgaonkar, S. Navyashree, and P. Kumar, “Novel combination artificial neural network models could not outperform individual models for weather-based cashew yield prediction,” Int. J. Biometeorol., vol. 66, no. 8, pp. 1627–1638, 2022. [Online]. Available: https://doi.org/10.1007/s00484-022-02306-1

- Š. Borko, E. Premate, M. Zagmajster, and C. Fišer, “Determinants of range sizes pinpoint vulnerability of groundwater species to climate change: A case study on subterranean amphipods from the Dinarides,” Aquat. Conserv.: Mar. Freshw. Ecosyst., vol. 33, no. 6, pp. 629–636, 2023. [Online]. Available: https://doi.org/10.1002/aqc.3941

- S. H. S. Herho, I. P. Anwar, K. E. P. Herho, C. S. Dharma, and D. E. Irawan, “Numerical simulation of the 2D trajectory of a non-buoyant fluid parcel under the influence of inertial oscillation,” EarthArXiv, 2024. [Online]. Available: https://doi.org/10.31223/X5GT35

- M. A. Terpilowski, “scikit-posthocs: Pairwise multiple comparison tests in Python,” J. Open Source Softw., vol. 4, no. 36, p. 1169, 2019. [Online]. Available: https://doi.org/10.21105/joss.01169

- C. E. Shannon, “A mathematical theory of communication,” Bell Labs Tech. J., vol. 27, no. 3, pp. 379–423, 1948. [Online]. Available: https://doi.org/10.1002/j.1538-7305.1948.tb01338.x

- F. J. Massey Jr, “The Kolmogorov-Smirnov test for goodness of fit,” J. Am. Stat. Assoc., vol. 46, no. 253, pp. 68–78, 1951. [Online]. Available: https://doi.org/10.1080/01621459.1951.10500769

- G. Ghatak, H. Mohanty, and A. U. Rahman, “Kolmogorov–Smirnov test-based actively-adaptive Thompson sampling for non-stationary bandits,” IEEE Trans. Artif. Intell., vol. 3, no. 1, pp. 11–19, 2021. [Online]. Available: https://doi.org/10.1109/TAI.2021.3121653

- K. R. Kini, F. Harrou, M. Madakyaru, and Y. Sun, “Enhanced Data-Driven Monitoring of Wastewater Treatment Plants using the Kolmogorov-Smirnov Test,” Environ. Sci.: Water Res. Technol., 2024. [Online]. Available: https://doi.org/10.1039/D3EW00829K

- V. Sharma and R. Biswas, “Statistical analysis of seismic b-value using non-parametric Kolmogorov–Smirnov test and probabilistic seismic hazard parametrization for Nepal and its surrounding regions,” Nat. Hazards, pp. 1–28, 2024. [Online]. Available: https://doi.org/10.1007/s11069-024-06531-2

- T. Tél and M. Gruiz, Chaotic Dynamics: An Introduction Based on Classical Mechanics. Cambridge: Cambridge University Press, 2006. [Online]. Available: https://doi.org/10.1017/CBO9780511803277

- R. C. Hilborn, Chaos and Nonlinear Dynamics: an Introduction for Scientists and Engineers. Oxford: Oxford University Press, 2000. [Online]. Available: https://doi.org/10.1093/acprof:oso/9780198507239.001.0001

- E. N. Lorenz, “Designing Chaotic Models,” J. Atmos. Sci., vol. 62, no. 5, pp. 1574–1587, 2005. [Online]. Available: https://doi.org/10.1175/JAS3430.1

- J. E. Contreras-Reyes, “Mutual information matrix based on asymmetric Shannon entropy for nonlinear interactions of time series,” Nonlinear Dyn., vol. 104, no. 4, pp. 3913–3924, 2021. [Online]. Available: https://doi.org/10.1007/s11071-021-06498-w

- S. K. Lam, A. Pitrou, and S. Seibert, “Numba: A LLVM-based Python JIT compiler,” in Proceedings of the Second Workshop on the LLVM Compiler Infrastructure in HPC, 2015, pp. 1–6. [Online]. Available: https://doi.org/10.1145/2833157.2833162

- P. Bartman, J. Bana?kiewicz, S. Drenda, M. Manna, M. A. Olesik, P. Rozwoda, M. Sadowski, and S. Arabas, “PyMPDATA v1: Numba-accelerated implementation of MPDATA with examples in Python, Julia and Matlab,” J. Open Source Softw., vol. 7, no. 77, p. 3896, 2022. [Online]. Available: https://doi.org/10.21105/joss.03896

- D. Clemente-López, J. M. Munoz-Pacheco, and J. R.-M. de Jesus, “Experimental validation of IoT image encryption scheme based on a 5-D fractional hyperchaotic system and Numba JIT compiler,” Internet of Things, p. 101116, 2024. [Online]. Available: https://doi.org/10.1016/j.iot.2024.101116

- S. H. S. Herho, S. N. Kaban, D. E. Irawan, and R. Kapid, “Efficient 1D Heat Equation Solver: Leveraging Numba in Python,” EKSAKTA: Berkala Ilmiah Bidang MIPA, vol. 25, no. 02, pp. 126–137, 2024. [Online]. Available: https://doi.org/10.24036/eksakta/vol25-iss02/487

- R. Okuta, Y. Unno, D. Nishino, S. Hido, and C. Loomis, “CuPy: A NumPy-Compatible Library for NVIDIA GPU Calculations,” in Proceedings of Workshop on Machine Learning Systems (LearningSys) in The 31st Annual Conference on Neural Information Processing Systems (NIPS), 2017. [Online]. Available: http://learningsys.org/nips17/assets/papers/paper 16.pdf

- S. Mathias, A. Coulier, and A. Hellander, “CBMOS: a GPU-enabled Python framework for the numerical study of center-based models,” BMC Bioinform., vol. 23, no. 1, p. 55, 2022. [Online]. Available: https://doi.org/10.1186/s12859-022-04575-4

- D. S. Martin and C. Torres, “2D Simplified Wildfire Spreading Model in Python: From NumPy to CuPy,” CLEI Electr. J., vol. 26, no. 1, pp. 5–1, 2023. [Online]. Available:

https://doi.org/10.19153/cleiej.26.1.5

- T. Askar, A. Yergaliyev, B. Shukirgaliyev, and E. Abdikamalov, “Exploring Numba and CuPy for GPU-Accelerated Monte Carlo Radiation Transport,” Computation, vol. 12, no. 3, p. 61, 2024. [Online]. Available: https://doi.org/10.3390/computation12030061

Downloads

Published

2025-02-06