Algorithm for Generating Bifurcation Diagrams Using Poincaré Intersection Plane
Abstract
:1. Introduction
- Poincaré Plane Adaptation: The user-selected slope of the Poincaré plane is adapted to the system’s geometry, improving the accuracy of event detection;
- Transient Filtering: A mechanism to efficiently discard transient states and manage output storage, improving the robustness of system response to initial conditions;
- Modular Algorithm Design: Separation of the simulation, detection, and analysis phases, allowing flexible adaptation to different types of systems;
- Parallel Implementation: Use of the MATLAB construct parfor to significantly reduce processing time while maintaining numerical accuracy;
- Validation Through Case Studies: Application to well-known systems, including the Rössler and bidirectional Lorenz models, to demonstrate the effectiveness of the algorithm in solving complex bifurcation structures.
2. Mathematical Preliminaries
2.1. Poincaré Planes
2.2. Bifurcation Diagrams
3. Numerical Calculation of Poincaré Plane Crossing Events
3.1. Detecting a Poincaré Crossing
Crossing in the Poincaré Plane
3.2. Map of the Local Maxima
4. Benchmark Systems
4.1. Rössler System
4.2. Bidirectional Coupled Lorenz Systems
5. Algorithms for Computing Bifurcation Diagrams
5.1. Architecture Specifications
5.2. Computation of a Sequential Bifurcation Diagram Using Iterative For-Loops
Sequential Algorithm Overview
Listing 1. Pseudo-code for iterative for-loop algorithm computing bifurcation diagram. |
- run_main.m: This is the main file for the algorithm. Users must select a bifurcation parameter within a specified range of values, ensuring that these values produce bounded trajectories in the integration method. The algorithm is limited to a fixed number of iterations, and a percentage of these iterations is later discarded as transient states, with the specific number determined by the user. The algorithm applies a designated function or subroutine for each integration method and bifurcation test. It is important to note that the algorithm does not exclude solutions even if the trajectories continue to grow over time. This can lead to inaccurate bifurcation diagrams with larger dimensions. Additionally, users can choose from various bifurcation detection algorithms (described in the subsequent sections) to analyze the system’s trajectories. If the process requires a substantial number of iterations to find a solution, the resulting data can be saved as a *.mat file to help manage the processing time of the algorithms.
- DynamicalSystem.m: The equations for continuous dynamical systems must be included in this file. All bifurcation parameters considered in the study should be defined as global MATLAB variables to facilitate setting their values in the main file. The system should be configured to have one of its parameters vary within a specified range, as seen in the pseudo-code presented in Listing Section 5.2. The number of degrees of freedom for the system’s algorithm is . However, users may modify this with the size of the initial condition vector and select the proper systems with larger dimensionality. In this particular case, the Rössler system [29] is used as a benchmark example due to its chaotic behavior at certain parameter values.
- RungeKuttaBif.m: This routine implements the solution for dynamical systems using a numerical integration method with a fixed step size. We utilize the Runge–Kutta fourth-order method, which allows users to adjust the step size as needed. However, a step size of is generally sufficient for most benchmark systems. While MATLAB’s ode functions might be suitable depending on the complexity of the equations, we will not consider them in this work.
- Bif_ZeroCrossing.m: This routine determines and plots the bifurcation diagram of the system by analyzing the crossing events in the plane , as described in Equation (5). In this case, the slope parameters are set to and , as mentioned in Section 2.2. This method is applicable to systems where oscillates around the origin. Specifying a bifurcation parameter as part of the input global variables in the main file and a valid range of values is essential. The resolution and quality of the bifurcation diagrams depend on the initial conditions provided to the system.
- Bif_PoincarePlane.m: This routine calculates the bifurcation and plots the bifurcation diagram of the system considering the crossing events in the plane from Equation (5), with set by the user. This method is applicable to systems that oscillate throughout space, provided that the trajectory intersects the Poincaré plane via the coefficients .
- Bif_LocalMaxima.m: This routine calculates the local maxima of the system’s trajectory and generates the map given in Equation (10) with their location coordinates in space. If the dynamics of the system to be analyzed by the parameter variation is not completely known, this method will present a feasible alternative to plot their chaotic or periodic orbits. The program can be easily modified if the user needs the local minimum.
Listing 2. Pseudo-code for DynamicalSystem.m function (Rössler system definition). |
5.3. Parallelized Bifurcation Diagram Computation Using the Parallel Computing Toolbox
Parallel Algorithm Overview
- run_main_parfor.m: This is the main file of the algorithm and where the numerical integrations are processed. The user can select the number of parallel workers in this file using the Parallel Toolbox. This is adjusted with the command parpool(W), where W represents a valid number of cores available on the user’s machine. In our example, this line will be commented out so that the algorithm uses the maximum number of available cores. A key difference between a for-loop and a parfor-loop is that the latter cannot use global variables. Therefore, the system and its dimensions must be adjusted by selecting the initial conditions.
- Bif_ZeroCrossingPAR.m: This routine is similar to the sequential algorithm, which calculates the crossing events through for the selected systems and plots them. However, it distributes the calculations over the bifurcation parameter vector in the parallel pool.
- Bif_PoincarePlanePAR.m: Using a parfor-loop, this one calculates the bifurcation diagram of the system considering the crossing events in the plane from Equation (5), with set by the user.
- Bif_LocalMaximaPAR.m: Similarly, this routine calculates the local maxima of the system’s trajectory with a parfor-loop.
Listing 3. Pseudo-code for the parallel bifurcation diagram algorithm using parfor. |
6. Algorithm Functionality and Results
6.1. Bifurcation Diagrams of the Rössler System
6.2. Bifurcation Diagrams of the Bidirectional Lorenz System
7. CPU Performance Comparison Between Sequential and Parallel Algorithms
8. Concluding Remarks and Future Work
Supplementary Materials
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Arnold, V.I.; Wassermann, G.; Thomas, R. Catastrophe Theory; Springer: Berlin, Germany, 1986; Volume 3. [Google Scholar]
- Strogatz, S.H. Nonlinear Dynamics and Chaos: With Applications to Physics, Biology, Chemistry, and Engineering (Studies in Nonlinearity); Westview Press: Boulder, CO, USA, 2001; Volume 1. [Google Scholar]
- Baker, G.L.; Gollub, J.P. Chaotic Dynamics: An Introduction; Cambridge University Press: Cambridge, UK, 1996. [Google Scholar]
- Peitgen, H.O.; Jürgens, H.; Saupe, D.; Feigenbaum, M.J. Chaos and Fractals: New Frontiers of Science; Springer: New York, NY, USA, 2004; Volume 106. [Google Scholar]
- Luque, B.; Lacasa, L.; Ballesteros, F.J.; Robledo, A. Feigenbaum graphs: A complex network perspective of chaos. PLoS ONE 2011, 6, e22411. [Google Scholar] [CrossRef] [PubMed]
- Sprott, J.C. A proposed standard for the publication of new chaotic systems. Int. J. Bifurc. Chaos 2011, 21, 2391–2394. [Google Scholar] [CrossRef]
- Jafari, A.; Hussain, I.; Nazarimehr, F.; Golpayegani, S.M.R.H.; Jafari, S. A simple guide for plotting a proper bifurcation diagram. Int. J. Bifurc. Chaos 2021, 31, 2150011. [Google Scholar] [CrossRef]
- Hou, L.; Chen, Y.; Cao, Q.; Zhang, Z. Turning maneuver caused response in an aircraft rotor-ball bearing system. Nonlinear Dyn. 2015, 79, 229–240. [Google Scholar] [CrossRef]
- McAllister, A.; McCartney, M.; Glass, D.H. Food, fertilizer and Feigenbaum diagrams. Int. J. Math. Educ. Sci. Technol. 2024, 55, 171–183. [Google Scholar] [CrossRef]
- Sourailidis, D.; Volos, C.; Moysis, L.; Meletlidou, E.; Stouboulos, I. The study of square periodic perturbations as an immunotherapy process on a tumor growth chaotic model. Dynamics 2022, 2, 161–174. [Google Scholar] [CrossRef]
- Ontañón-García, L.J.; Cantón, I.C.; Ramirez, J.P. Dynamic behavior in a pair of Lorenz systems interacting via positive-negative coupling. Chaos Solitons Fractals 2021, 145, 110808. [Google Scholar] [CrossRef]
- Moysis, L.; Bifurcation Diagram for the Lorenz Chaotic System. MATLAB Central File Exchange. 2025. Available online: https://www.mathworks.com/matlabcentral/fileexchange/156752-bifurcation-diagram-for-the-lorenz-chaotic-system (accessed on 6 April 2025).
- Moysis, L.; Density-Colored Bifurcation Diagrams. MATLAB Central File Exchange. 2025. Available online: https://www.mathworks.com/matlabcentral/fileexchange/156757-density-colored-bifurcation-diagrams (accessed on 6 April 2025).
- Sylvestre-Baron, P.; Plotting Bifurcation Diagram. MATLAB Central File Exchange. 2025. Available online: https://www.mathworks.com/matlabcentral/fileexchange/72057-plotting-bifurcation-diagram (accessed on 6 April 2025).
- Doedel, E.; Oldeman, B. AUTO-07P: Continuation and Bifurcation Software for Ordinary Differential Equations. Concordia University. 2007. Available online: http://indy.cs.concordia.ca/auto/ (accessed on 6 April 2025).
- Dhooge, A.; Govaerts, W.; Kuznetsov, Y.A. MATCONT: A MATLAB package for numerical bifurcation analysis of ODEs. ACM Trans. Math. Softw. (TOMS) 2003, 29, 141–164. [Google Scholar] [CrossRef]
- Ermentrout, B. Simulating, Analyzing, and Animating Dynamical Systems: A Guide to XPPAUT for Researchers and Students; SIAM: Philadelphia, PA, USA, 2002. [Google Scholar]
- Poincaré, H. Sur le problème des trois corps et les équations de la dynamique. Acta Math. 1890, 13, A3–A270. [Google Scholar]
- Echenausía-Monroy, J.L.; Quezada-Tellez, L.A.; Gilardi-Velázquez, H.E.; Ruíz-Martínez, O.F.; Heras-Sánchez, M.d.C.; Lozano-Rizk, J.E.; Cuesta-García, J.R.; Márquez-Martínez, L.A.; Rivera-Rodríguez, R.; Pena Ramirez, J.; et al. Beyond Chaos in Fractional-Order Systems: Keen Insight in the Dynamic Effects. Fractal Fract. 2024, 9, 22. [Google Scholar] [CrossRef]
- Poincaré, H. Les Méthodes Nouvelles de la Mécanique Céleste; Gauthier-Villars et fils, Imprimeurs-Libraires: Paris, France, 1893; Volume 2. [Google Scholar]
- Garland, M.; Le Grand, S.; Nickolls, J.; Anderson, J.; Hardwick, J.; Morton, S.; Phillips, E.; Zhang, Y.; Volkov, V. Parallel computing experiences with CUDA. IEEE Micro 2008, 28, 13–27. [Google Scholar] [CrossRef]
- Ontanón-Garcia, L.J.; Campos-Cantón, E.; Femat, R.; Campos-Cantón, I.; Bonilla-Marín, M. Multivalued synchronization by Poincaré coupling. Commun. Nonlinear Sci. Numer. Simul. 2013, 18, 2761–2768. [Google Scholar] [CrossRef]
- Ontanón-Garcia, L.J.; Campos-Cantón, E. Discrete coupling and synchronization in the insulin release in the mathematical model of the β cells. Discret. Dyn. Nat. Soc. 2013, 1, 427050. [Google Scholar]
- Guckenheimer, J.; Holmes, P. Nonlinear Oscillations, Dynamical Systems, and Bifurcations of Vector Fields; Springer: New York, NY, USA, 1983. [Google Scholar]
- Strogatz, S.H. Nonlinear Dynamics and Chaos: With Applications to Physics, Biology, Chemistry, and Engineering; CRC Press: New York, NY, USA, 2018. [Google Scholar]
- Ott, E. Chaos in Dynamical Systems; Cambridge University Press: Cambridge, UK, 2002. [Google Scholar]
- Perko, L. Differential Equations and Dynamical Systems; Springer Science & Business Media: New York, NY, USA, 2013; Volume 7. [Google Scholar]
- Hancock, H. Theory of Maxima and Minima; Ginn: New York, NY, USA, 1917. [Google Scholar]
- Rössler, O.E. An equation for continuous chaos. Phys. Lett. A 1976, 57, 397–398. [Google Scholar] [CrossRef]
- MathWorks. Measure Performance of Your Program. 2024. Available online: https://www.mathworks.com/help/matlab/matlab_prog/measure-performance-of-your-program.html (accessed on 6 April 2025).
- Barba-Franco, J.; Gallegos, A.; Jaimes-Reátegui, R.; Muñoz-Maciel, J.; Pisarchik, A. Dynamics of coexisting rotating waves in unidirectional rings of bistable Duffing oscillators. Chaos Interdiscip. J. Nonlinear Sci. 2023, 33, 073126. [Google Scholar] [CrossRef] [PubMed]
- Salas, A.; Martínez H, L.J.; Ocampo R, D.L. Analytical and numerical study to a forced van der Pol oscillator. Math. Probl. Eng. 2022, 2022, 9736427. [Google Scholar] [CrossRef]
- Echenausía-Monroy, J.L.; Jafari, S.; Huerta-Cuéllar, G.; Gilardi-Velázquez, H. Predicting the emergence of multistability in a Monoparametric PWL system. Int. J. Bifurc. Chaos 2022, 32, 2250206. [Google Scholar] [CrossRef]
System | Dim | Type | Bifur. Param | CPU Time (Seq.) (s) | CPU Time (Par.) (s) | Speedup |
---|---|---|---|---|---|---|
Forced Duffing | 2 | Periodic- Chaotic | 515.03 | 25.60 | 20.11× | |
Forced Van der Pol | 2 | Periodic- Chaotic | 521.55 | 25.72 | 20.27× | |
Rössler | 3 | Chaotic | b | 498.99 | 27.00 | 15.26× |
Lorenz Bidirectional | 6 | Chaotic | 15,739.44 | 84.62 | 186.00× |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. 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 (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Ontañón-García, L.J.; Barajas-Ramírez, J.G.; Campos-Cantón, E.; Magallón-García, D.A.; Guerra-García, C.A.; Cuesta-García , J.R.; Pena-Ramirez , J.; Echenausía-Monroy, J.L. Algorithm for Generating Bifurcation Diagrams Using Poincaré Intersection Plane. Mathematics 2025, 13, 1818. https://doi.org/10.3390/math13111818
Ontañón-García LJ, Barajas-Ramírez JG, Campos-Cantón E, Magallón-García DA, Guerra-García CA, Cuesta-García JR, Pena-Ramirez J, Echenausía-Monroy JL. Algorithm for Generating Bifurcation Diagrams Using Poincaré Intersection Plane. Mathematics. 2025; 13(11):1818. https://doi.org/10.3390/math13111818
Chicago/Turabian StyleOntañón-García, Luis Javier, Juan Gonzalo Barajas-Ramírez, Eric Campos-Cantón, Daniel Alejandro Magallón-García, César Arturo Guerra-García, José Ricardo Cuesta-García , Jonatan Pena-Ramirez , and José Luis Echenausía-Monroy. 2025. "Algorithm for Generating Bifurcation Diagrams Using Poincaré Intersection Plane" Mathematics 13, no. 11: 1818. https://doi.org/10.3390/math13111818
APA StyleOntañón-García, L. J., Barajas-Ramírez, J. G., Campos-Cantón, E., Magallón-García, D. A., Guerra-García, C. A., Cuesta-García , J. R., Pena-Ramirez , J., & Echenausía-Monroy, J. L. (2025). Algorithm for Generating Bifurcation Diagrams Using Poincaré Intersection Plane. Mathematics, 13(11), 1818. https://doi.org/10.3390/math13111818