Sie sind auf Seite 1von 20

The Duffing Oscillator

by Sam Needham u5016100


1. A Physical Introduction
The duffing oscillator describes, in this case, a driven and damped oscillator in a double well poten-
tial. If one wants to visualise this system, some helpful examples are a driven metal beam sus-
pended between two magnets or a remote control car on top of a hill. By imagining these physical
scenarios the behaviour of this system can be predicted. For example, if the remote control car has
a weak motor the car will probably end up at the bottom of the hill, but if the motor is powerful it will
oscillate between the two. If the metal beam is free to move between the two magnets it will do so
until the driving force is removed, but if a strong damping is added the beam will probably settle
down near one of the magnets, or right in the middle of the two.
Here the behaviour of this oscillator is modelled using Mathematica and the physical characteristics
of the system are described. Particular attention is payed to the tendency of the system to transition
into chaos under certain conditions, and this chaos is quantified, particularly using Lyapunov expo-
nents and Poincare sections.
2. A More Mathematical Introduction
The motion of a one dimensional duffing oscillator is described by a second order differential
equation:
x
..
+ 2 x

+ x + x
3
= F cos(t)
where <0<.
Physically the constants can be understood as follows:
is the damping coefficient with units of time
1
is the stiffness and is less than 0 with units of time
2
is the non-linearity of the response to the driving force and here is greater than 0, with units of
distance
1
time
2
F is the amplitude of the driving force with units of distance time
2
To calculate the potential in terms of x, first consider what would happen if the forcing term F and x


(and therefore x
..
) were set to 0. This will tell us where the particle settles down to in the absense of a
driving force, which corresponds to a stationary point on the well.
For these conditions the above equation becomes
x| x
2
] = 0
From this it can be seen that stable equilibrium points exist at x=0 and x =

(since <0).
To obtain the general well equation for the potential set
dx
dt
=
dV
dx
. Solving for
dV
dt
, we find that
dV
dx
=
d
dx

x
2
2
+
x
4
4

This has zeroes at x=0 and x =

. The potential V is plotted in Figure 1. In order to allow


better visualisation the systems motion in this potential well, several animations are attached of the
particles motion described in this report.
This has zeroes at x=0 and x =

. The potential V is plotted in Figure 1. In order to allow


better visualisation the systems motion in this potential well, several animations are attached of the
particles motion described in this report.
x=

x=

x=0
x
V
Figure 1: Graph of double well potential with minima at

.
In order to properly characterise the behaviour of the points at x =

a Jacobian matrix can be


used for the above differential equation after linearisation. Taking any system described by the form
x

= F(x), if F(x
0
) = 0 then x
0
is a stationary point, as described above. The behaviour of the system
near this stationary point can be seen by taking the eigenvalues of the Jacobian of F at the point x
0
.
If the eigenvalues are real and less than 0, the system is stable near x
0
. If any eigenvalue has a real
part greater than 0, then x
0
is an unstable point.
In order to complete this analysis the equation must first be rewritten with a forcing term F=0 and
linearised:
x
..
+ 2 x

+ x + x
3
= 0
x
..
= 2 x

x x
3
Setting x

= y:
y

= 2 y x x
3
Setting y=0:
0 = x x
3
0 = x| x
2
]
Solving for x we find three solutions: x=0 and x=

as above! Before going any further, it


should be noted that these calculations can be made much simpler by performing a dimensional
analysis on the original differential equation.
2 Final Duffing Oscillator.nb
Solving for x we find three solutions: x=0 and x=

as above! Before going any further, it


should be noted that these calculations can be made much simpler by performing a dimensional
analysis on the original differential equation.
3. Dimensional Analysis
In order to properly analyse the duffing oscillator equation, first it should be made dimensionless.
This can be done by setting =
t
t
0
where t
0
has units of time, and setting =
x
x
0
, where x
0
has units
of distance. The equation then becomes:
x
0
t
0
2
o
2

o
2
+ 2
x
0
t
0

d
d
+ x
0
+ x
0
3

3
= F cos(t
0
)
Next notice that setting t
0
=
1

leaves only inside the cos term, and since has units of
1
time
this is
a convenient substitution:

2
x
0
o
2

o
2
+ 2 x
0

d
d
+ x
0
+ x
0
3

3
= F cos()
Since Cos term is dimensionless, the units of F can be determined by examining the left hand side
of the equation. Each term clearly has units of
distance
time
2
, so those are also the units of F. Dividing both
sides of the equation by
2
(unites of
1
time
2
) and x
0
(units of distance) will solve this issue.
o
2

o
2
+
2

d
d
+

2
+
x
0
2

2

3
=
F

2
x
0
cos()
Hence we have arrived at a dimensionless equation. A value for x
0
can be determined by setting
F

2
x
0
=1, however this would be invalid for F=0, so instead we will set
x
0
2

2
= 1, as we have the restric-
tion that >0. We then get
x
0
=

Labelling our new dimensionless coefficients


H = 2

2
=
F

3
A physical interpretation for these new dimensionless coefficients is offered here.
Since H is proportional to the size of the damping force, it can be understood to be the new damp-
ing term. It is inversely proportional to the frequency of the driving force. It makes physical sense
that these two terms should be related, as when the damping force it is equivalent, up to a point, to
a drop in the driving frequuency, and when the driving frequency is increased the system is more
easily able to overcome damping.
is proportional to the stiffness and inversely proportional to the frequency of the driving force like
H. Again, this makes sense, as an increase in stiffness is overcome by a more frequently driven
system to a point. So can be interpreted as the new stiffness coefficient.
Finally, combines both the amplitude of the driving force and the non-linearity of this force into one
term. It is also inversely proportional to the frequency to the third power! This means that as the
frequency is driven higher and higher the system is much less able to respond to the driving force.
So clearly can now be understood to be a term fully describing the effect of the applied force.
Thus the new dimensionless equation becomes:
Final Duffing Oscillator.nb 3
A physical interpretation for these new dimensionless coefficients is offered here.
Since H is proportional to the size of the damping force, it can be understood to be the new damp-
ing term. It is inversely proportional to the frequency of the driving force. It makes physical sense
that these two terms should be related, as when the damping force it is equivalent, up to a point, to
a drop in the driving frequuency, and when the driving frequency is increased the system is more
easily able to overcome damping.
is proportional to the stiffness and inversely proportional to the frequency of the driving force like
H. Again, this makes sense, as an increase in stiffness is overcome by a more frequently driven
system to a point. So can be interpreted as the new stiffness coefficient.
Finally, combines both the amplitude of the driving force and the non-linearity of this force into one
term. It is also inversely proportional to the frequency to the third power! This means that as the
frequency is driven higher and higher the system is much less able to respond to the driving force.
So clearly can now be understood to be a term fully describing the effect of the applied force.
Thus the new dimensionless equation becomes:

+ H

+ +
3
= cos()
3. Non-chaotic Motion and Stationary Points
Now that a dimensionless equation has been obtained, the low points in the well can be more easily
described. First it is necessary to linearise the dimensionless equation for a forcing term =0. Set-
ting

= y:
y

= H

+
3
Now setting y = y

= 0:
0 = | +
2
]
This gives solutions =0 and = . A dimensionless version of the potential is shown in Figure
2.
= =
=0

V
Figure 2: Dimensionless graph of the potential
To determine what the system does around each of the three stationary points, the Jacobian matrix
of y is calculated:
J =
0 1
3
2

Taking Eigenvalues of this matrix at points =0 and = we find:
At = the two eigenvaues are: =
1
2
_H 4 + H
2
12 ,
=
1
2
_H+ 4 + H
2
12
At = the two eigenvalues are: =
1
2
_H 4 + H
2
12 ,
=
1
2
_H+ 4 + H
2
12
At = 0 the two eigenvalues are: =
1
2
_H 4 + H
2
, =
1
2
_H+ 4 + H
2

4 Final Duffing Oscillator.nb
At = the two eigenvaues are: =
1
2
_H 4 + H
2
12 ,
=
1
2
_H+ 4 + H
2
12
At = the two eigenvalues are: =
1
2
_H 4 + H
2
12 ,
=
1
2
_H+ 4 + H
2
12
At = 0 the two eigenvalues are: =
1
2
_H 4 + H
2
, =
1
2
_H+ 4 + H
2

At = both the eigenvalues are negative, since H
2
4 12 < H. So this point will be
a stable equilibrium point.
At = both the eigenvalues are negative as above, so this point will also be a stable equilib-
rium point.
At =0, however, the eigenvalue =
1
2
_H 4 + H
2
will always be negative as above, but the
eigenvalue =
1
2
_H+ 4 + H
2
will always be positive, since <0, and H
2
4 > H. So this
point will be an unstable equilibrium point.
This makes physical sense. If the system is at rest in either of the wells, then it will happily stay
there even if perturbed by a small force. If the system is at rest at the saddle point =0, however,
any small push will send it down the potential into one of the wells.
The dimensionless second order differential equation was solved using the NDSolve function in
Mathematica and a function was interpolated for values of from 0-100,000. The function was
plotted against its derivative in a parametric plot to achieve a graph of the momentum position
phase space (assuming a mass of 1). Here these are shown as well as plots of position and momen-
tum over time.
First, consider the case where =0, i.e. there is no driving force. In this case, the stable stationary
points will be at the bottom of each well. The system will almost definitely not end up on the stati-
nary point at =0 due to its instability. Examining the phase space plot (Figure 3) confirms this. After
being pushed into one of the wells, the unforced system will oscillate back and forwards in that well
until it eventually settles on the stationary point.
1.0 0.5 0.5 1.0
Position
1.0
0.5
0.5
1.0
Momentum
200 400 600 800 1000

1.0
0.5
0.5
1.0
Position
Momentum
0.5 0.5

0.3
0.2
0.1
0.1
0.2

200 400 600 800 1000


0.5
0.5

Figure 3: TOP LEFT: H = 0.1, = -0.04. Phase space plot of unforced system.
TOP RIGHT: H = 0.1, = -0.04. Position and momentum over time of unforced system.
BOTTOM LEFT: H = 0.2, = -0.4 = 0.1 Phase space plot with small forcing.
BOTTOM RIGHT: H = 0.2, = -0.4 = 0.1. Position and momentum over time with small forcing.
For a large damping term H and large stiffness term a similar effect is seen in figure 3 when the
force is reintroduced.
Limit cycles can also be seen for the forced non-chaotic system. Examining the bottom figures in
Figure 3, it is seen that for when H=0.2, =-0.4 and =0.1 the system simply goes into a periodic
limit cycle around one of the wells.

As outlined above, there are 3 stable points in this unforced system. The points = are
known as attractors, and x=0 is an unstable equilibrium point. The basin of attraction of a stable
point, or attractor, is defined as the range of initial conditions over which the path will definitely end
up on that attractor. For the attractor at = if the initial position is 0, any positive initial momen-
tum will cause the unforced system to end up in the right while a negative initial momentum will
result in oscillations in the left well at = .

Final Duffing Oscillator.nb 5
The dimensionless second order differential equation was solved using the NDSolve function in
Mathematica and a function was interpolated for values of from 0-100,000. The function was
plotted against its derivative in a parametric plot to achieve a graph of the momentum position
phase space (assuming a mass of 1). Here these are shown as well as plots of position and momen-
tum over time.
First, consider the case where =0, i.e. there is no driving force. In this case, the stable stationary
points will be at the bottom of each well. The system will almost definitely not end up on the stati-
nary point at =0 due to its instability. Examining the phase space plot (Figure 3) confirms this. After
being pushed into one of the wells, the unforced system will oscillate back and forwards in that well
until it eventually settles on the stationary point.
1.0 0.5 0.5 1.0
Position
1.0
0.5
0.5
1.0
Momentum
200 400 600 800 1000

1.0
0.5
0.5
1.0
Position
Momentum
0.5 0.5

0.3
0.2
0.1
0.1
0.2

200 400 600 800 1000


0.5
0.5

Figure 3: TOP LEFT: H = 0.1, = -0.04. Phase space plot of unforced system.
TOP RIGHT: H = 0.1, = -0.04. Position and momentum over time of unforced system.
BOTTOM LEFT: H = 0.2, = -0.4 = 0.1 Phase space plot with small forcing.
BOTTOM RIGHT: H = 0.2, = -0.4 = 0.1. Position and momentum over time with small forcing.
For a large damping term H and large stiffness term a similar effect is seen in figure 3 when the
force is reintroduced.
Limit cycles can also be seen for the forced non-chaotic system. Examining the bottom figures in
Figure 3, it is seen that for when H=0.2, =-0.4 and =0.1 the system simply goes into a periodic
limit cycle around one of the wells.

As outlined above, there are 3 stable points in this unforced system. The points = are
known as attractors, and x=0 is an unstable equilibrium point. The basin of attraction of a stable
point, or attractor, is defined as the range of initial conditions over which the path will definitely end
up on that attractor. For the attractor at = if the initial position is 0, any positive initial momen-
tum will cause the unforced system to end up in the right while a negative initial momentum will
result in oscillations in the left well at = .

4. Chaos
Once the forcing term is reintroduced to the equation there are many combinations of parameters
that give rise to chaotic behaviour in the system. Before examining this, it should be clarified what is
meant by chaotic behaviour. While there may be no universally accepted definition for chaos, it is
generally accepted that in a chaotic system two trajectories starting from similar initial conditions will
diverge exponentially. This is clearly not enough, as two balls placed slightly either side of the top of
a hill exhibit this behaviour, but this system can hardly be described as chaotic. So the condition
must be added that the two paths must remain in a closed, finite region of phase space. These
conditions will be re-examined shortly once some ways of visualising and quantifying chaotic
sytems have been presented. For now, there is not much at our disposal to actually talk about
whether or not a system is behaving in a chaotic manner.
In order to actually quantify whether or not a system is chaotic, a tool called the Lyapunov exponent
can be used.
5. Quantifying Chaos - The Lyapunov Exponent
The Lyapunov exponent allows us to calculate the exponential spreading of two trajectories with
slightly different initial conditions, and thus allow us to discover whether the sytem exhibits chaotic
behaviour. When two trajectories start at some initial separation
0
, and after evolving through time
they diverge to a separation of
n
, their separation can be described by:

n
=
0
e

Here describes how rapidly the paths diverge or converge. If =0 then the separation will always
remain
0
. If <0 then the two paths will converge and if >0 the two paths will diverge exponen-
tially. Thus this exponent , known as the Lyapunov exponent, can be used to test for chaotic
behaviour.
6 Final Duffing Oscillator.nb
d
0 d
n
To calculate the Lyapunov exponent 2 paths were modelled through the duffing oscillator phase
space. The paths were described by identical differential equations, but with slightly changed initial
conditions such that they were separated by distance d
0
. The spread of these paths was then taken
after some time interval A as shown in Figure 4. Since a chaotic system is confined to a finite
region of phase space, simply taking the separation distance after another time interval A could
have allowed the paths to happen to come closer together, masking their chaotic behaviour. This
could also be a problem for the non-chaotic system of 2 balls placed atop a hill slightly either side
the top, as their exponential spreading would surely result in a positive . In order to avoid this, one
of the paths was then adjusted to be the initial distance d
0
away from the other, and the system was
then evolved by A again. The process was repeated 10,000 times. The Lyapunov exponents were
then calculated using the expression:

n
=
1
At
1
n
ln
d
n
d
0

Where At is the time interval, d
n
is the separation between paths after n iterations and d
0
is the inital
path separation. Various d
0
and At values were tried over 100 iterations and phase space plots
were examined for each choice in order to see which one achieved the best result - there had to be
enough separation and time for the paths to actually diverge or converge. An initial separation of 0.1
and time step of =50 was found to produce a good result. It should be noted that this does not
mean that the system was evolved by a time step of 50 seconds as is a dimensionless quantity.
It should be noted that while there are several types of Lyapunov exponents, here it is the average
Lyapunov exponent that is calculated. The maximal Lyapunov exponent is similar, but after each
separation the system is evolved in the direction that gives the fastest possible separation. As the
average Lyapunov exponent is sufficient to demonstrate chaos the maximal Lyapunov exponent
was not calculated.
The running average Lyapunov exponent
n
was calculated for various parameters and the results
and are shown below.
2000 4000 6000 8000 10000
n
0.0110
0.0115
0.0120
0.0125
0.0130

n
2000 4000 6000 8000 10000
n
0.0268
0.0270
0.0272
0.0274
0.0276
0.0278

n
Figure 5: The Lyapunov series for chaotic motion, Figure 6: The Lyapunov exponent, taken with
taken with H=0.2, = -0.4, = 0.2 ,H = 0.2, = -0.4, =0.142
The last Lyapunov average exponent was taken to see the behaviour as the system was evolved as
far forward in time as possible.
The final value of the series in Figure 5 was found to be 0.0109318 and in Figure 6 was 0.0272051.
In order to check this is indeed the correct way to calculate the Lyapunov exponent, the force was
set to 0 and small damping was added, as seen in Figure 7.
2000 4000 6000 8000 10000
n
0.09999
0.09998
0.09997
0.09996

n
Figure 7: The Lyapunov Spectrum of an unforced, non-chaotic system with H = 0.2 = -0.04.
The last Lyapunov exponent of the unforced system in Figure 7 was -0.99998, as expected.
In order to visualise this behaviour, a phase space plot is shown below in Figure 8, and this is
extended to a 3 dimensional image in Figure 9.
1.0 0.5 0.5 1.0

0.4
0.2
0.2
0.4

Figure 8: Chaotic phase space plot for H=0.2, = -0.4 and =0.2
Figure 9: 3D phase space plot for ,

and for H=0.2, = -0.4, =0.2 and goes from 0 to 100.


Now that chaotic behaviour has successfully been quantified, a good way of visualising the
behaviour of chaotic systems is by using the Poincare section.
Final Duffing Oscillator.nb 7
Where At is the time interval, d
n
is the separation between paths after n iterations and d
0
is the inital
path separation. Various d
0
and At values were tried over 100 iterations and phase space plots
were examined for each choice in order to see which one achieved the best result - there had to be
enough separation and time for the paths to actually diverge or converge. An initial separation of 0.1
and time step of =50 was found to produce a good result. It should be noted that this does not
mean that the system was evolved by a time step of 50 seconds as is a dimensionless quantity.
It should be noted that while there are several types of Lyapunov exponents, here it is the average
Lyapunov exponent that is calculated. The maximal Lyapunov exponent is similar, but after each
separation the system is evolved in the direction that gives the fastest possible separation. As the
average Lyapunov exponent is sufficient to demonstrate chaos the maximal Lyapunov exponent
was not calculated.
The running average Lyapunov exponent
n
was calculated for various parameters and the results
and are shown below.
2000 4000 6000 8000 10000
n
0.0110
0.0115
0.0120
0.0125
0.0130

n
2000 4000 6000 8000 10000
n
0.0268
0.0270
0.0272
0.0274
0.0276
0.0278

n
Figure 5: The Lyapunov series for chaotic motion, Figure 6: The Lyapunov exponent, taken with
taken with H=0.2, = -0.4, = 0.2 ,H = 0.2, = -0.4, =0.142
The last Lyapunov average exponent was taken to see the behaviour as the system was evolved as
far forward in time as possible.
The final value of the series in Figure 5 was found to be 0.0109318 and in Figure 6 was 0.0272051.
In order to check this is indeed the correct way to calculate the Lyapunov exponent, the force was
set to 0 and small damping was added, as seen in Figure 7.
2000 4000 6000 8000 10000
n
0.09999
0.09998
0.09997
0.09996

n
Figure 7: The Lyapunov Spectrum of an unforced, non-chaotic system with H = 0.2 = -0.04.
The last Lyapunov exponent of the unforced system in Figure 7 was -0.99998, as expected.
In order to visualise this behaviour, a phase space plot is shown below in Figure 8, and this is
extended to a 3 dimensional image in Figure 9.
1.0 0.5 0.5 1.0

0.4
0.2
0.2
0.4

Figure 8: Chaotic phase space plot for H=0.2, = -0.4 and =0.2
Figure 9: 3D phase space plot for ,

and for H=0.2, = -0.4, =0.2 and goes from 0 to 100.


Now that chaotic behaviour has successfully been quantified, a good way of visualising the
behaviour of chaotic systems is by using the Poincare section.
8 Final Duffing Oscillator.nb
Where At is the time interval, d
n
is the separation between paths after n iterations and d
0
is the inital
path separation. Various d
0
and At values were tried over 100 iterations and phase space plots
were examined for each choice in order to see which one achieved the best result - there had to be
enough separation and time for the paths to actually diverge or converge. An initial separation of 0.1
and time step of =50 was found to produce a good result. It should be noted that this does not
mean that the system was evolved by a time step of 50 seconds as is a dimensionless quantity.
It should be noted that while there are several types of Lyapunov exponents, here it is the average
Lyapunov exponent that is calculated. The maximal Lyapunov exponent is similar, but after each
separation the system is evolved in the direction that gives the fastest possible separation. As the
average Lyapunov exponent is sufficient to demonstrate chaos the maximal Lyapunov exponent
was not calculated.
The running average Lyapunov exponent
n
was calculated for various parameters and the results
and are shown below.
2000 4000 6000 8000 10000
n
0.0110
0.0115
0.0120
0.0125
0.0130

n
2000 4000 6000 8000 10000
n
0.0268
0.0270
0.0272
0.0274
0.0276
0.0278

n
Figure 5: The Lyapunov series for chaotic motion, Figure 6: The Lyapunov exponent, taken with
taken with H=0.2, = -0.4, = 0.2 ,H = 0.2, = -0.4, =0.142
The last Lyapunov average exponent was taken to see the behaviour as the system was evolved as
far forward in time as possible.
The final value of the series in Figure 5 was found to be 0.0109318 and in Figure 6 was 0.0272051.
In order to check this is indeed the correct way to calculate the Lyapunov exponent, the force was
set to 0 and small damping was added, as seen in Figure 7.
2000 4000 6000 8000 10000
n
0.09999
0.09998
0.09997
0.09996

n
Figure 7: The Lyapunov Spectrum of an unforced, non-chaotic system with H = 0.2 = -0.04.
The last Lyapunov exponent of the unforced system in Figure 7 was -0.99998, as expected.
In order to visualise this behaviour, a phase space plot is shown below in Figure 8, and this is
extended to a 3 dimensional image in Figure 9.
1.0 0.5 0.5 1.0

0.4
0.2
0.2
0.4

Figure 8: Chaotic phase space plot for H=0.2, = -0.4 and =0.2
Figure 9: 3D phase space plot for ,

and for H=0.2, = -0.4, =0.2 and goes from 0 to 100.


Now that chaotic behaviour has successfully been quantified, a good way of visualising the
behaviour of chaotic systems is by using the Poincare section.
6. Visualising Chaos - The Poincare Section
The Poincare section is a visual tool to see the chaotic nature of a system. In order to generate a
poincare section the system is evolved through time as shown in Figure 9 above. Values of and


are then taken whenever the time is equal to
2

. Setting =1 values of and

are captured every


time the modulus of and 2 is 0.
The poincare section allows us to see the systems evolution along a strange attractor. A strange
attractor is a chaotic path through phase space that is an attractor with a fractional dimension, which
will be discussed later. The poincare section is essentially a 2D cross section of 3D strange attrac-
tor. If the system is not exhibiting chaotic behaviour there will simply be a few points on the
poincare section, demonstrating a limit cycle. If, on the other hand, the system is in chaos, the
Poincare section will show a fractal pattern (discussed below) as seen in Figure 10.
5 5
x
2
2
4
6
y
Figure 10: Poincare section for chaotic motion on strange attractor. Here H=0.2, =-0.4 and =0.2.
The system described by the Poincare section in Figure 7 clearly demonstrates chaotic behaviour.
In order to view a 3 dimensional version of the strange attractor, the Poicare section was evaluated
at different values for t, where the modulus of and 2 is t as described above. This can be
visualised as a slice of a 3D strange attractor at various angles t, and by combining all these
slices at the apppropriate angles, essentially sweeping the Poincare sections around an axis, one
can see a strange attractor in 3 dimensions over one period (although I say the strange attractor is
in 3 dimensions it is important to note that this does not mean it is a 3 dimennsional structure. It is
actually a fractal as described below, where this distinction will be made apparent). These sections
were made into a movie, which is attached, and some are shown below in Fgures 11-13.
Final Duffing Oscillator.nb 9
The system described by the Poincare section in Figure 7 clearly demonstrates chaotic behaviour.
In order to view a 3 dimensional version of the strange attractor, the Poicare section was evaluated
at different values for t, where the modulus of and 2 is t as described above. This can be
visualised as a slice of a 3D strange attractor at various angles t, and by combining all these
slices at the apppropriate angles, essentially sweeping the Poincare sections around an axis, one
can see a strange attractor in 3 dimensions over one period (although I say the strange attractor is
in 3 dimensions it is important to note that this does not mean it is a 3 dimennsional structure. It is
actually a fractal as described below, where this distinction will be made apparent). These sections
were made into a movie, which is attached, and some are shown below in Fgures 11-13.
Figure 11: Poincare section taken at Figure 12: Poincare section taken at rotation
rotation of

2
rotation of
Figure 13: Poincare section taken at Figure 14: Poincare section
rotation of 3

2
taken at rotation of 2
The strange attractor was then modelled by compiling all these sections at appropriate values for t
and is shown in Figure 15.
5
0
5
5
0
5
10
5
0
5
5
0
5
5
0
5
10
5
0
5
Figure 15: The strange attractor in 3 dimensions.
This Poincare section evolution gives an important insight into the nature of chaos, and indeed why
chaotic systems behave the way described above. Before this is formalised, there is one more
important nature of the Poincare section to examine: fractals.
10 Final Duffing Oscillator.nb
The strange attractor was then modelled by compiling all these sections at appropriate values for t
and is shown in Figure 15.
5
0
5
5
0
5
10
5
0
5
5
0
5
5
0
5
10
5
0
5
Figure 15: The strange attractor in 3 dimensions.
This Poincare section evolution gives an important insight into the nature of chaos, and indeed why
chaotic systems behave the way described above. Before this is formalised, there is one more
important nature of the Poincare section to examine: fractals.
7. Fractals
The strange attractors seen above are known as fractals. A fractal is defined as a structure with a
fractional dimension. So while a cube exists in 3 dimensions and a square in 2, a fractal could exist
in 2.4, for example. The idea of a fractional dimension may seem counter-intuitive, but to get a
sense of it consider how a dimension is actually quantified. Imagine a series of boxes that are being
used to cover a particular structure. As the boxes change in size, the number required to cover the
structure will also change, and it turns out that this provides an excellent way to calculate the dimen-
sion of a structure.
For a straight line, the number of boxes needed to cover that line scales in direct proportion to the
width of the box. In fact, this can be quantised as follows:
N =
1

Where N is the number of boxes required and is the width of the boxes required to cover it.
Next consider a surface, for simplicitys sake a square. The number of boxes required to fill the
space inside this square surface will increase with the square of the width of the boxes - you now
have to fill 2 directions rather than 1! We now obviously need to introduce a new term into the
above expression to account for this. We need:
N =
1

2
Finally, consider a cube. If you try to fill this cube with N smaller cubes of diameter d, the number of
cubes you need will scale according to
N =
1

3
Generalising this notion to include counting boxes of potentially higher dimension than 3 (a hyper-
cube) the expresssion then becomes:
Final Duffing Oscillator.nb 11
Generalising this notion to include counting boxes of potentially higher dimension than 3 (a hyper-
cube) the expresssion then becomes:
N =
1

D
Where D is the number of dimensions the space is said to occupy. In the case of the strange attrac-
tor described above, D is a rational number, but not necessarily an integer.
Figure 16: The box counting method of evaluating fractal dimensions, from p. 409 of Nonlinear
Dynamics and Chaos by Steven Strogatz
A signature nature of fractals is self similarity upon closer inspection. For this property the Poincare
section generated above was first evaluated over 5,000,000 time intervals to ensure enough points
for close inspection. Then a small section was chosen and closely inspected, as shown below.
Figure 17: Poincare section
12 Final Duffing Oscillator.nb
Figure 18: Close-up of boxed section in Figure 17
Figure 19: Close-up of boxed section in Figure
18
Figure 20: Close-up of boxed section of Figure 19
Final Duffing Oscillator.nb 13
Figure 19: Close-up of boxed section in Figure
18
Figure 20: Close-up of boxed section of Figure 19
Since Log(x
n
)=nLog(x), by taking the log of the number of boxes and the log of the inverse of the
box size we can easily find the dimension by plotting the two and taking the gradient. The box
counting method described above was applied using Mathematica, and the the log of
1

was plotted
with the log of N

and shown in Figure 16.:


0.0 0.5 1.0 1.5 2.0 2.5
2.0
2.5
3.0
3.5
4.0
4.5
5.0
Figure 21: ln|
1

] against ln(N

)
The gradient of this line was calculated and the the fractional dimension of the Poincare section
seen in figures 17-20 was found to be 1.35328.
The same code was then used to calculate the fractal dimension of the 3 dimensional visualisation
of the strange attractor above, and a value of 0.8089 found.
7. Transition To Chaos - Revisited
Now armed with the Lyapunov exponent and Poincare section, we can calculate when the Duffing
Oscillator system will actually exhibit chaotic behaviour. The most influential term in the dimension-
less differential equation on whether or not the system exhibits chaotic behaviour is the forcing
term. While the other two are clearly important, the driving force is dominant. In order to investigate
which values of the driving force gave rise to chaotic behaviour bifurcation diagrams were created
and are shown below. These were generated by taking the values on the Poincare section for
each value of . These column slices of various points on various sections were then compiled
and are shown in Figures 17-19. In regions where there is only a single line , as in the Poincare
section, non-chaotic behaviour is seen. When there are 2 horizontal lines, as in the left of Figure 21,
the system exhibits period doubling, and when there are more than 2 horizontal lines there is chaos.
In densely packed regions, as in the right of Figure 21, the system also exhibits chaotic behaviour.
This was checked with the Lyapunov exponent and the two were found to agree. At =0.14 a Lya-
punov exponent of = -0.97894 was found and at =0.142 a Lyapunov exponent of = 0.0496607
was calculated.
14 Final Duffing Oscillator.nb
Now armed with the Lyapunov exponent and Poincare section, we can calculate when the Duffing
Oscillator system will actually exhibit chaotic behaviour. The most influential term in the dimension-
less differential equation on whether or not the system exhibits chaotic behaviour is the forcing
term. While the other two are clearly important, the driving force is dominant. In order to investigate
which values of the driving force gave rise to chaotic behaviour bifurcation diagrams were created
and are shown below. These were generated by taking the values on the Poincare section for
each value of . These column slices of various points on various sections were then compiled
and are shown in Figures 17-19. In regions where there is only a single line , as in the Poincare
section, non-chaotic behaviour is seen. When there are 2 horizontal lines, as in the left of Figure 21,
the system exhibits period doubling, and when there are more than 2 horizontal lines there is chaos.
In densely packed regions, as in the right of Figure 21, the system also exhibits chaotic behaviour.
This was checked with the Lyapunov exponent and the two were found to agree. At =0.14 a Lya-
punov exponent of = -0.97894 was found and at =0.142 a Lyapunov exponent of = 0.0496607
was calculated.
Figure 22: Bifurcation diagram for
It is interesting to note that since these bifurcation diagrams are made from Poincare sections, they
are also fractals, as is shown below.
Figure 23: Close up of bifurcation diagram for
Final Duffing Oscillator.nb 15
Figure 23: Close up of bifurcation diagram for
Figure 24: Close up of bifurcation diagram for
The phase space plots shown at the beginning of the report can again be evaluated, but this time
for the now known chaotic parameters H=0.2, = -0.4, =0.2.
1.0 0.5 0.5 1.0

0.4
0.2
0.2
0.4

200 400 600 800 1000


1.0
0.5
0.5
1.0

Figure 25: H = 0.2, = -0.4, = 0.2. LEFT: Chaotic phase space plot RIGHT: Chaotic motion and
momentum.
16 Final Duffing Oscillator.nb
Figure 24: Close up of bifurcation diagram for
The phase space plots shown at the beginning of the report can again be evaluated, but this time
for the now known chaotic parameters H=0.2, = -0.4, =0.2.
1.0 0.5 0.5 1.0

0.4
0.2
0.2
0.4

200 400 600 800 1000


1.0
0.5
0.5
1.0

Figure 25: H = 0.2, = -0.4, = 0.2. LEFT: Chaotic phase space plot RIGHT: Chaotic motion and
momentum.
Now we are in a good position to describe why it is that a chaotic system exhibits the behaviour that
it does.
8. Why is Chaos Chaotic?
The Poincare section above offers a very good insight into why chaotic systems actually behave the
way they do. Firstly, and most obviously, they are confined to a finite, closed region of phase space
as they are following the path of a strange attractor. Secondly, and more subtley, they also reveal
why it is that chaotic systems have such a sensitive dependence on initial conditions. In order to
examine exactly why that is, the Poincare section movies attached to this report should be exam-
ined.
As the Poincare section evolves, a certain folding and stretching effect can be seen. Certain parts of
the section fold in on themselves, only to later be stretched out again. This means that a certain
section of initial conditions in phase space can be contracted in some directions by their motion on
the strange attractor only to then be stretched in different directions. This stretching doesnt con-
tinue indefinitely - in fact it must fold again in order to remain in a confined region of space. This
demonstrates exactly why there is such sensitive dependence on initial conditions. Another way of
describing this is that any small set of points on the attractor will eventually spread out and cover
the whole attractor dispersely.
To visually demonstrate this, another movie is attached. In this one, the majority of the points on the
Poincare section are coloured blue, while two points with very little initial separation are coloured
red and purple. The system is then allowed to evolve and the motion of these red and purple points
is tracked. For a small time they stay quite close together, but eventually one of the folds tears them
apart, and they diverge rapidly. Several stills from this film are included in figures 26-29 below.
Final Duffing Oscillator.nb 17
Figure 26: Poincare section with two initial Figure 27: Poincare section evolved
conditions marked
Figure 28: Poincare section evolved 2 Figure 29: Poincare section evolved 4
Figure 30: Poincare section evolved 9

2
Figure 31: Poinare section evolved 5
Figure 32: Poincare section evolved 6 Figure 33: Poincare section evolved 12
18 Final Duffing Oscillator.nb
9. Conclusion
The duffing oscillator is an example of a forced, damped chaotic system. For some cases, the
system actually does not exhibit chaotic behaviour, but allows stationary points and limit cycles to
be described. For others, however, the system turns chaotic, as can be demonstrated by the Lya-
punov exponent and the Poincare section. Here these tools were used to not only quantify and
demonstrate the chaotic nature of the duffing oscillator, but also explain why it occurs. There is still
much to explore about this system, however. Could it be possible to determine a relationship
between the parameters for which chaos is guaranteed to occur? Does the fractal nature of the
bifurcation diagram mean that when you zoom in far enough you will find a very specific value for
the forcing term which will be non-chaotic in a mostly chaotic region? With more computing time
could an evolving image of the strange attractor in 3D phase space above be generated? In order
to answer these questions more time and computing power should be dedicated to the issue, but
rather like a fractal the closer you hone in on the topic the more you realise you still have to cover.
References
Bernt Wahl, 2013. Calculating Fractal Dimension. [Online]
Available at: http://www.wahl.org/fe/HTML_version/link/FE4W/c4.htm
[Accessed 17 April 2014].
Kanamaru, T., 2008. Duffing Oscillator. [Online]
Available at: http://www.scholarpedia.org/article/Duffing_oscillator
[Accessed 20 April 2014].
Ott, E., 2008. Attractor Dimensions. [Online]
Available at: http://www.scholarpedia.org/article/Attractor_dimensions
[Accessed 20 April 2014].
Politi, A., 2013. Lyapunov Exponent. [Online]
Available at: http://www.scholarpedia.org/article/Lyapunov_exponent
[Accessed 21 April 2014].
Strogatz, S., 2000. Nonlinear Dynamics and Chaos. New York: Perseus Books.
Theiler, J., 1989. Estimating fractal dimension. Optical Society of America, 7(6), pp. 1055-1073.
Weisstein, E. W., 2014. Duffing Differential Equation. [Online]
Available at: http://mathworld.wolfram.com/DuffingDifferentialEquation.html
[Accessed 15 April 2014].
Weisstein, E. W., 2014. Fractal. [Online]
Available at: http://mathworld.wolfram.com/Fractal.html
[Accessed 16 April 2014].
Weisstein, E. W., 2014. Lyapunov Characteristic Exponent. [Online]
Available at: http://mathworld.wolfram.com/LyapunovCharacteristicExponent.html
[Accessed 20 April 2014].
Young, P., n.d. The Duffing Equation. [Online]
Available at: http://physics.ucsc.edu/~peter/115/duffing.pdf
[Accessed 15 April 2014].
Code for this project was either written by myself with contributions from Joseph Hope (for the
Lyapunov exponent calculation) or was modified from the following sources:
http://physics.ucsc.edu/~peter/115/duffing.pdf (for bifurcation diagram code).
http://forums.wolfram.com/mathgroup/archive/1995/Dec/msg00401.html (for the box counting
dimension code).
Final Duffing Oscillator.nb 19
Bernt Wahl, 2013. Calculating Fractal Dimension. [Online]
Available at: http://www.wahl.org/fe/HTML_version/link/FE4W/c4.htm
[Accessed 17 April 2014].
Kanamaru, T., 2008. Duffing Oscillator. [Online]
Available at: http://www.scholarpedia.org/article/Duffing_oscillator
[Accessed 20 April 2014].
Ott, E., 2008. Attractor Dimensions. [Online]
Available at: http://www.scholarpedia.org/article/Attractor_dimensions
[Accessed 20 April 2014].
Politi, A., 2013. Lyapunov Exponent. [Online]
Available at: http://www.scholarpedia.org/article/Lyapunov_exponent
[Accessed 21 April 2014].
Strogatz, S., 2000. Nonlinear Dynamics and Chaos. New York: Perseus Books.
Theiler, J., 1989. Estimating fractal dimension. Optical Society of America, 7(6), pp. 1055-1073.
Weisstein, E. W., 2014. Duffing Differential Equation. [Online]
Available at: http://mathworld.wolfram.com/DuffingDifferentialEquation.html
[Accessed 15 April 2014].
Weisstein, E. W., 2014. Fractal. [Online]
Available at: http://mathworld.wolfram.com/Fractal.html
[Accessed 16 April 2014].
Weisstein, E. W., 2014. Lyapunov Characteristic Exponent. [Online]
Available at: http://mathworld.wolfram.com/LyapunovCharacteristicExponent.html
[Accessed 20 April 2014].
Young, P., n.d. The Duffing Equation. [Online]
Available at: http://physics.ucsc.edu/~peter/115/duffing.pdf
[Accessed 15 April 2014].
Code for this project was either written by myself with contributions from Joseph Hope (for the
Lyapunov exponent calculation) or was modified from the following sources:
http://physics.ucsc.edu/~peter/115/duffing.pdf (for bifurcation diagram code).
http://forums.wolfram.com/mathgroup/archive/1995/Dec/msg00401.html (for the box counting
dimension code).
20 Final Duffing Oscillator.nb

Das könnte Ihnen auch gefallen