+ All Categories
Home > Documents > Duffing Oscillator report by Sam Needham at ANU

Duffing Oscillator report by Sam Needham at ANU

Date post: 02-Jun-2018
Category:
Upload: needbeef
View: 223 times
Download: 0 times
Share this document with a friend

of 20

Transcript
  • 8/11/2019 Duffing Oscillator report by Sam Needham at ANU

    1/20

  • 8/11/2019 Duffing Oscillator report by Sam Needham at ANU

    2/20

    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 theparticles 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 systemnear 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 realpart 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 andlinearised:

    x ..

    2 x x x3 0

    x ..

    2 x x x3

    Setting x y :

    y 2 y x x3

    Setting y=0:

    0 x x3

    0 x x2

    2 Final Duffing Oscillator.nb

  • 8/11/2019 Duffing Oscillator report by Sam Needham at ANU

    3/20

    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 dimensionalanalysis 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 0t 0

    2

    2

    2 2 x 0

    t 0

    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 1time

    this is

    a convenient substitution:

    2 x 02

    2 2 x 0

    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 distancetime 2

    , so those are also the units of F. Dividing both

    sides of the equation by 2 (unites of 1time 2

    ) and x 0 (units of distance) will solve this issue.

    2

    2

    2

    2

    x 0 2

    2 3 F

    2 x 0cos

    Hence we have arrived at a dimensionless equation. A value for x 0can be determined by setting

    F

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

    2

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

    x 0

    Labelling our new dimensionless coefficients

    = 2

    = 2

    =F

    3

    A physical interpretation for these new dimensionless coefficients is offered here.

    Since 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 sensethat these two terms should be related, as when the damping force it is equivalent, up to a point, toa drop in the driving frequuency, and when the driving frequency is increased the system is moreeasily able to overcome damping.

    is proportional to the stiffness and inversely proportional to the frequency of the driving force like. 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

    Final Duffing Oscillator.nb 3

  • 8/11/2019 Duffing Oscillator report by Sam Needham at ANU

    4/20

    term. It is also inversely proportional to the frequency to the third power! This means that as thefrequency 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:

    3 = cos( )

    3. Non-chaotic Motion and Stationary PointsNow that a dimensionless equation has been obtained, the low points in the well can be more easilydescribed. First it is necessary to linearise the dimensionless equation for a forcing term =0. Set-ting y :

    y 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 potentialTo determine what the system does around each of the three stationary points, the Jacobian matrixof y is calculated:

    J = 0 1

    3 2

    Taking Eigenvalues of this matrix at points =0 and we find:

    At the two eigenvaues are: 12

    4 2 12 , 1

    2 4 2 12

    At the two eigenvalues are: = 12

    4 2 12 ,

    4 Final Duffing Oscillator.nb

  • 8/11/2019 Duffing Oscillator report by Sam Needham at ANU

    5/20

    12

    4 2 12 At 0 the two eigenvalues are: 1

    2 4 2 , = 1

    2 4 2

    At both the eigenvalues are negative, since 2 4 12 . 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 12

    4 2 will always be negative as above, but the

    eigenvalue 12

    4 2 will always be positive, since

  • 8/11/2019 Duffing Oscillator report by Sam Needham at ANU

    6/20

    BOTTOM LEFT: = 0.2, = -0.4 = 0.1 Phase space plot with small forcing.BOTTOM RIGHT: = 0.2, = -0.4 = 0.1. Position and momentum over time with small forcing.

    For a large damping term and large stiffness term a similar effect is seen in figure 3 when theforce is reintroduced.

    Limit cycles can also be seen for the forced non-chaotic system. Examining the bottom figures inFigure 3, it is seen that for when =0.2, =-0.4 and =0.1 the system simply goes into a periodiclimit 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 stablepoint, 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 parametersthat give rise to chaotic behaviour in the system. Before examining this, it should be clarified what ismeant by chaotic behaviour. While there may be no universally accepted definition for chaos, it isgenerally accepted that in a chaotic system two trajectories starting from similar initial conditions willdiverge 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 conditionmust be added that the two paths must remain in a closed, finite region of phase space. Theseconditions will be re-examined shortly once some ways of visualising and quantifying chaoticsytems have been presented. For now, there is not much at our disposal to actually talk aboutwhether 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 exponentcan be used.

    5. Quantifying Chaos - The Lyapunov Exponent

    The Lyapunov exponent allows us to calculate the exponential spreading of two trajectories withslightly different initial conditions, and thus allow us to discover whether the sytem exhibits chaoticbehaviour. When two trajectories start at some initial separation 0 , and after evolving through timethey 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 alwaysremain 0 . If 0 the two paths will diverge exponen-tially. Thus this exponent , known as the Lyapunov exponent, can be used to test for chaoticbehaviour.

    6 Final Duffing Oscillator.nb

  • 8/11/2019 Duffing Oscillator report by Sam Needham at ANU

    7/20

    d 0 d n

    To calculate the Lyapunov exponent 2 paths were modelled through the duffing oscillator phasespace. The paths were described by identical differential equations, but with slightly changed initialconditions such that they were separated by distance d 0 . The spread of these paths was then takenafter some time interval as shown in Figure 4. Since a chaotic system is confined to a finiteregion of phase space, simply taking the separation distance after another time interval couldhave 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 sidethe top, as their exponential spreading would surely result in a positive . In order to avoid this, oneof the paths was then adjusted to be the initial distance d 0 away from the other, and the system wasthen evolved by again. The process was repeated 10,000 times. The Lyapunov exponents werethen calculated using the expression:

    n 1t

    1n

    ln d nd 0

    Where t is the time interval, d n is the separation between paths after n iterations and d 0 is the initalpath separation. Various d 0 and t values were tried over 100 iterations and phase space plotswere examined for each choice in order to see which one achieved the best result - there had to beenough separation and time for the paths to actually diverge or converge. An initial separation of 0.1and time step of =50 was found to produce a good result. It should be noted that this does notmean 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 averageLyapunov exponent that is calculated. The maximal Lyapunov exponent is similar, but after eachseparation the system is evolved in the direction that gives the fastest possible separation. As theaverage Lyapunov exponent is sufficient to demonstrate chaos the maximal Lyapunov exponentwas not calculated.

    The running average Lyapunov exponent n was calculated for various parameters and the resultsand are shown below.

    2000 4000 6000 8000 10 000n

    0.0110

    0.0115

    0.0120

    0.0125

    0.0130

    n

    2000 4000 6000 8000 10 000n

    0.0268

    0.0270

    0.0272

    0.0274

    0.0276

    0.0278

    n

    Final Duffing Oscillator.nb 7

  • 8/11/2019 Duffing Oscillator report by Sam Needham at ANU

    8/20

    Figure 5: The Lyapunov series for chaotic motion, Figure 6: The Lyapunov exponent, taken withtaken with =0.2, = -0.4, = 0.2 , = 0.2, = -0.4, =0.142

    The last Lyapunov average exponent was taken to see the behaviour as the system was evolved asfar 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 wasset to 0 and small damping was added, as seen in Figure 7.

    2000 4000 6000 8000 10 000n

    0.09999

    0.09998

    0.09997

    0.09996

    n

    Figure 7: The Lyapunov Spectrum of an unforced, non-chaotic system with = 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 isextended 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 =0.2, = -0.4 and =0.2

    8 Final Duffing Oscillator.nb

  • 8/11/2019 Duffing Oscillator report by Sam Needham at ANU

    9/20

    Figure 9: 3D phase space plot for , and for =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 thebehaviour of chaotic systems is by using the Poincare section.

    6. Visualising Chaos - The Poincare SectionThe 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 strangeattractor is a chaotic path through phase space that is an attractor with a fractional dimension, whichwill 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 thepoincare section, demonstrating a limit cycle. If, on the other hand, the system is in chaos, thePoincare section will show a fractal pattern (discussed below) as seen in Figure 10.

    5 5x

    2

    2

    4

    6

    y

    Figure 10: Poincare section for chaotic motion on strange attractor. Here =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 evaluatedat different values for t, where the modulus of and 2 is t as described above. This can be

    Final Duffing Oscillator.nb 9

  • 8/11/2019 Duffing Oscillator report by Sam Needham at ANU

    10/20

    visualised as a slice of a 3D strange attractor at various angles t, and by combining all theseslices at the apppropriate angles, essentially sweeping the Poincare sections around an axis, onecan see a strange attractor in 3 dimensions over one period (although I say the strange attractor isin 3 dimensions it is important to note that this does not mean it is a 3 dimennsional structure. It isactually 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 rotationrotation of

    2 rotation of

    Figure 13: Poincare section taken at Figure 14: Poincare sectionrotation of 3

    2taken at rotation of 2

    The strange attractor was then modelled by compiling all these sections at appropriate values for tand is shown in Figure 15.

    10 Final Duffing Oscillator.nb

  • 8/11/2019 Duffing Oscillator report by Sam Needham at ANU

    11/20

    5

    0

    55

    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 whychaotic systems behave the way described above. Before this is formalised, there is one moreimportant 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 existin 2.4, for example. The idea of a fractional dimension may seem counter-intuitive, but to get asense of it consider how a dimension is actually quantified. Imagine a series of boxes that are beingused to cover a particular structure. As the boxes change in size, the number required to cover thestructure 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 thewidth 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 thespace inside this square surface will increase with the square of the width of the boxes - you nowhave to fill 2 directions rather than 1! We now obviously need to introduce a new term into theabove expression to account for this. We need:

    N 12

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

    N 13

    Generalising this notion to include counting boxes of potentially higher dimension than 3 (a hyper-

    Final Duffing Oscillator.nb 11

  • 8/11/2019 Duffing Oscillator report by Sam Needham at ANU

    12/20

    cube) the expresssion then becomes:

    N 1D

    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 NonlinearDynamics and Chaos by Steven Strogatz

    A signature nature of fractals is self similarity upon closer inspection. For this property the Poincaresection generated above was first evaluated over 5,000,000 time intervals to ensure enough pointsfor close inspection. Then a small section was chosen and closely inspected, as shown below.

    Figure 17: Poincare section

    12 Final Duffing Oscillator.nb

  • 8/11/2019 Duffing Oscillator report by Sam Needham at ANU

    13/20

  • 8/11/2019 Duffing Oscillator report by Sam Needham at ANU

    14/20

    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 thebox 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 sectionseen 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 visualisationof 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

    14 Final Duffing Oscillator.nb

  • 8/11/2019 Duffing Oscillator report by Sam Needham at ANU

    15/20

    term. While the other two are clearly important, the driving force is dominant. In order to investigatewhich values of the driving force gave rise to chaotic behaviour bifurcation diagrams were createdand are shown below. These were generated by taking the values on the Poincare section foreach value of . These column slices of various points on various sections were then compiledand 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.0496607was calculated.

    Figure 22: Bifurcation diagram for

    It is interesting to note that since these bifurcation diagrams are made from Poincare sections, theyare also fractals, as is shown below.

    Final Duffing Oscillator.nb 15

  • 8/11/2019 Duffing Oscillator report by Sam Needham at ANU

    16/20

    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 timefor the now known chaotic parameters =0.2, = -0.4, =0.2.

    16 Final Duffing Oscillator.nb

  • 8/11/2019 Duffing Oscillator report by Sam Needham at ANU

    17/20

    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: = 0.2, = -0.4, = 0.2. LEFT: Chaotic phase space plot RIGHT: Chaotic motion andmomentum.

    Now we are in a good position to describe why it is that a chaotic system exhibits the behaviour thatit does.

    8. Why is Chaos Chaotic?

    The Poincare section above offers a very good insight into why chaotic systems actually behave theway they do. Firstly, and most obviously, they are confined to a finite, closed region of phase spaceas they are following the path of a strange attractor. Secondly, and more subtley, they also revealwhy it is that chaotic systems have such a sensitive dependence on initial conditions. In order toexamine 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 ofthe section fold in on themselves, only to later be stretched out again. This means that a certainsection of initial conditions in phase space can be contracted in some directions by their motion onthe 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. Thisdemonstrates exactly why there is such sensitive dependence on initial conditions. Another way ofdescribing this is that any small set of points on the attractor will eventually spread out and coverthe whole attractor dispersely.

    To visually demonstrate this, another movie is attached. In this one, the majority of the points on thePoincare section are coloured blue, while two points with very little initial separation are colouredred and purple. The system is then allowed to evolve and the motion of these red and purple pointsis tracked. For a small time they stay quite close together, but eventually one of the folds tears themapart, and they diverge rapidly. Several stills from this film are included in figures 26-29 below.

    Final Duffing Oscillator.nb 17

  • 8/11/2019 Duffing Oscillator report by Sam Needham at ANU

    18/20

    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

  • 8/11/2019 Duffing Oscillator report by Sam Needham at ANU

    19/20

    9. Conclusion

    The duffing oscillator is an example of a forced, damped chaotic system. For some cases, thesystem 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 anddemonstrate the chaotic nature of the duffing oscillator, but also explain why it occurs. There is stillmuch to explore about this system, however. Could it be possible to determine a relationshipbetween the parameters for which chaos is guaranteed to occur? Does the fractal nature of thebifurcation diagram mean that when you zoom in far enough you will find a very specific value forthe forcing term which will be non-chaotic in a mostly chaotic region? With more computing timecould an evolving image of the strange attractor in 3D phase space above be generated? In orderto answer these questions more time and computing power should be dedicated to the issue, butrather like a fractal the closer you hone in on the topic the more you realise you still have to cover.

    ReferencesBernt 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].

    Final Duffing Oscillator.nb 19

  • 8/11/2019 Duffing Oscillator report by Sam Needham at ANU

    20/20

    Code for this project was either written by myself with contributions from Joseph Hope (for theLyapunov 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 countingdimension code).

    20 Final Duffing Oscillator.nb


Recommended