File Exchange

image thumbnail

Forced Duffing Oscillator

version 1.0.0.0 (24.9 KB) by Housam Binous
Computes Poincaré section of the forced Duffing oscillator

23 Downloads

Updated 16 Oct 2007

No License

The forced Duffing oscillator exhibits behavior ranging from limit cycles to chaos due to its nonlinear dynamics. When the periodic force that drives the system is large, chaotic behavior emerges and the phase space diagram is a strange attractor. In that case the behavior of the system is sensitive to the initial condition. In order to plot a Poincaré section, take one data point from phase space per period of the driving force. The Poincaré section is a complicated fractal curve when the phase diagram is a strange attractor. The Poincaré section is a single point when the phase space diagram is a limit cycle.

Here is a link to a Mathematica 6.0 Demonstration concerning the forced Duffing oscillator:

http://demonstrations.wolfram.com/ForcedDuffingOscillator/

Cite As

Housam Binous (2020). Forced Duffing Oscillator (https://www.mathworks.com/matlabcentral/fileexchange/16731-forced-duffing-oscillator), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (15)

Global variables should be avoided. ALWAYS!
Just change the header of duffing.m to
xdot=duffing(t,x,gamma,omega,epsilon,GAM,OMEG)

and call ODE45 with an anonymous function

duf = @(t,x) duffing(t,x,gamma,omega,epsilon,GAM,OMEG);
[t x]=ode45(duf,0:2*pi/OMEG/100:400,[0 1]);

Merci pour les codes..
Toujours utiles...

How can I plot Amplitude vs Frequency with this code?

Thank you

Thank you, Binous. helped me a lot.

Akash kumar

Why this code is not running ?
there is some problem which says ''Error using feval
Undefined function 'duffing' for input arguments of type 'double''.What should I do,any help will be appeciated.

thank you for your efforts
I have a question
in your m-file xdot=duffing(t,x), why omega^2*x(2) term is plus sign not negative sign?

i'm very happy to using this programme it's very nice

mr.housam binous done a wonderfull making of duffing forced oscillator.. i'm using this in this programme is very usfull my studies...

thank you for the source codes;
they are really helpful;

Przemyslaw Jasinski

very good, helped me a lot.

Nicholas Fantuzzi

The m-file doesn't work with epsilon < 0

R RAMLAN

very helpful and easy to understand

Updates

1.0.0.0

added link to Mathematica 6.0 Demonstration.

MATLAB Release Compatibility
Created with R14SP1
Compatible with any release
Platform Compatibility
Windows macOS Linux