# Nonlinear dynamics: algorithm suggest

I've just started a thesis on nonlinear dynamics which entails numerical analysis of the Duffing oscillator (DO). It's basically just a second order ODE, or equivalently a set of ODEs.

Say, after integration, I have data that looks like this:

I need to write an algorithm that 1) analyzes the data, 2) outputs the period of the DO for that particular set of parameters (after a certain but arbitrary(_ily adjusted) relaxation time). In the present case, the period is 4.

It would probably not be hard to write the algorithm if the DO behaved exactly the same way in each period, but it doesn't (necessarily, as I undersand it) - so the algorithm has to be somewhat 'fuzzy'.

I'm using Python/MATLAB, but feel free to give a language-agnostic answer :)

Cheers!,

\T

-

One possible approach could consist of using Poincaré maps while keeping in mind that fixed points in the corresponding Poincaré sections may signal the presence of periodic orbits. You could combine this idea with a clustering algorithm to isolate regions in the section that correspond to "almost" the same point (i.e., trajectory).

in

In the figure above you can see a time series of the Duffing Oscillator and a Poincaré map where the periodic orbit is the fixed point represented by a black dot. In the figure below, there's the complete phase space and also a plot of the periodic trajectory (after relaxation) that corresponds to the fixed point (black dot) in the Poincaré section.

-