Computational Science Stack Exchange is a question and answer site for scientists using computers to solve scientific problems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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: enter image description here

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'.

Any ideas, links?

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



share|improve this question
up vote 2 down vote accepted

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).

Duffing Oscillator: time series and Poincaré section for a certain time 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.

Phase space and periodic orbit

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.