Chaotic Pendulum - Department of Physicsdeserio/LabVIEW/Chaos/chaos.pdfpendulum system will be...

22
Chaotic Pendulum Experiment CP University of Florida — Department of Physics PHY4803L — Advanced Physics Laboratory Objective Both regular and chaotic motion for a spring- pendulum system will be measured and an- alyzed. You will learn in your investigations how to recognize systems for which chaotic be- havior can be expected, how to display data arising from these systems, how to quantify features of the dynamical variables involved, and how to perform computer simulations and comparisons with experimental data. References Henry D. I. Abarbanel, The analysis of ob- served chaotic data in physical systems, Reviews of Modern Physics, 65, 1331- 1392 (1993). Gregory L. Baker, Jerry P. Gollub, Chaotic Dynamics: An Introduction, 2nd ed., Cambridge University Press, New York, 1996. Francis C. Moon, Chaotic and Fractal Dy- namics, John Wiley and Sons, New York, 1992. Introduction The harmonic oscillator is a paradigm of pre- dictability. The resonance response of a har- monic oscillator can be exploited to make clocks accurate to 1 part in 10 14 . Har- monic oscillations are normally observed in systems operating near equilibrium and gov- erned by linear or “Hooke’s law” restoring forces. Nonetheless, for small enough excur- sions from equilibrium, systems governed by nonlinear restoring forces can also display har- monic oscillations. A good example is the pendulum. When its motion stays near equi- librium (at θ = 0), the nonlinear restoring torque (proportional to sin θ) behaves like a linear restoring torque (proportional to θ) and the pendulum executes simple harmonic mo- tion. However, when driven strongly, the ex- cursions from equilibrium can grow into re- gions where the nonlinearity becomes impor- tant. The predictable pattern of repeating oscillations might give way to chaos—non- repeating motion characterized by a particular kind of unpredictability. Chaotic systems are completely determin- istic. For example, our apparatus is governed by equations easily derived from F = ma. The unpredictability arises not from any inherent randomness but rather from an extreme sen- sitivity to initial conditions. Harmonic oscil- lators ultimately settle on some well defined state of motion. Momentarily perturbed from this “steady state” motion, they will return to it according to a predictable “transient” time constant. In contrast, perturb a nonlin- ear oscillator and the difference between the CP 1

Transcript of Chaotic Pendulum - Department of Physicsdeserio/LabVIEW/Chaos/chaos.pdfpendulum system will be...

Page 1: Chaotic Pendulum - Department of Physicsdeserio/LabVIEW/Chaos/chaos.pdfpendulum system will be measured and an-alyzed. You will learn in your investigations ... Nonetheless, for small

Chaotic Pendulum

Experiment CP

University of Florida — Department of PhysicsPHY4803L — Advanced Physics Laboratory

Objective

Both regular and chaotic motion for a spring-pendulum system will be measured and an-alyzed. You will learn in your investigationshow to recognize systems for which chaotic be-havior can be expected, how to display dataarising from these systems, how to quantifyfeatures of the dynamical variables involved,and how to perform computer simulations andcomparisons with experimental data.

References

Henry D. I. Abarbanel, The analysis of ob-served chaotic data in physical systems,Reviews of Modern Physics, 65, 1331-1392 (1993).

Gregory L. Baker, Jerry P. Gollub, ChaoticDynamics: An Introduction, 2nd ed.,Cambridge University Press, New York,1996.

Francis C. Moon, Chaotic and Fractal Dy-namics, John Wiley and Sons, New York,1992.

Introduction

The harmonic oscillator is a paradigm of pre-dictability. The resonance response of a har-monic oscillator can be exploited to make

clocks accurate to 1 part in 1014. Har-monic oscillations are normally observed insystems operating near equilibrium and gov-erned by linear or “Hooke’s law” restoringforces. Nonetheless, for small enough excur-sions from equilibrium, systems governed bynonlinear restoring forces can also display har-monic oscillations. A good example is thependulum. When its motion stays near equi-librium (at θ = 0), the nonlinear restoringtorque (proportional to sin θ) behaves like alinear restoring torque (proportional to θ) andthe pendulum executes simple harmonic mo-tion. However, when driven strongly, the ex-cursions from equilibrium can grow into re-gions where the nonlinearity becomes impor-tant. The predictable pattern of repeatingoscillations might give way to chaos—non-repeating motion characterized by a particularkind of unpredictability.

Chaotic systems are completely determin-istic. For example, our apparatus is governedby equations easily derived from F = ma. Theunpredictability arises not from any inherentrandomness but rather from an extreme sen-sitivity to initial conditions. Harmonic oscil-lators ultimately settle on some well definedstate of motion. Momentarily perturbed fromthis “steady state” motion, they will returnto it according to a predictable “transient”time constant. In contrast, perturb a nonlin-ear oscillator and the difference between the

CP 1

Page 2: Chaotic Pendulum - Department of Physicsdeserio/LabVIEW/Chaos/chaos.pdfpendulum system will be measured and an-alyzed. You will learn in your investigations ... Nonetheless, for small

CP 2 Advanced Physics Laboratory

perturbed and unperturbed states of motioncan grow exponentially.

You will investigate just such a nonlinearoscillator. Illustrated in Fig. 1, this spring-pendulum apparatus can be configured to dis-play both chaotic and non-chaotic behavior.The non-chaotic data sets will be graphed andanalyzed using traditional techniques. Thechaotic data sets will be graphed in Poincaresections and quantified by fractal dimensionsand Lyapunov exponents.

Exercise 1 The applicability of the superposi-tion principle is the distinguishing property be-tween linear and nonlinear systems. Show thatsolutions to the pendulum equation, d2θ/dt2 =−(g/l) sin θ, obey the superposition principleonly if one can assume sin θ = θ throughoutthe motion. That is, if θ1(t) and θ2(t) are so-lutions, show that θ1 + θ2 is a solution whensin θ = θ, but not otherwise.

Apparatus

The apparatus consists of a physical pendu-lum coupled to a drive motor using a pairof springs, a pulley, and string. The physi-cal pendulum consists of an aluminum disk, aremovable pendulum mass, a pulley, and anaxle. The axle and pulley are those of thePasco Rotary Motion Sensor which has a ro-tary encoder for measuring the pendulum an-gle. A computer equipped with a National In-struments PCI 6601 timer/counter board con-trols the drive motor and reads the rotary en-coder. The computer is also used to save, dis-play, and analyze the resulting data.

The drive system consists of a stepper mo-tor, shaft, and controller. A uniform pulsetrain is sent by the computer to the controllerwhich sequentially energizes the various motorwindings to effect a single angular step of themotor shaft for each pulse. The stepper motor

SXOOH\

GLVNSHQGXOXPPDVV

VSULQJV

VWHSSHUPRWRU

D[OH

VWULQJ

VWULQJ

Q

θ

VKDIWφ

$

WXQLQJSHJ

Figure 1: The chaotic pendulum apparatus. Notshown: electronics, supports, and the rotary en-coder housing the axle.

requires 200 pulses to complete one revolution.As the stepper motor rotates, the driven endof the spring oscillates, keeping the pendulumin motion.

For measuring the pendulum angle, the ro-tary encoder emits logic pulses (1440/rev) ontwo separate phonojacks for clockwise andcounterclockwise rotations. The computer iscapable of direct up-down counting with thesesignals. The count, directly proportional tothe rotation angle, is read with every steppermotor pulse and saved into an array. Because

February 1, 2007

Page 3: Chaotic Pendulum - Department of Physicsdeserio/LabVIEW/Chaos/chaos.pdfpendulum system will be measured and an-alyzed. You will learn in your investigations ... Nonetheless, for small

Chaotic Pendulum CP 3

the same pulses initiate a reading of the angu-lar count and step the motor, the pendulumangle and the drive angle are simultaneouslydetermined.

The raw counter readings, spaced 1/200thof the drive period apart in time, are scaledand numerically smoothed and differentiatedusing Savitsky-Golay filtering.1 The filters areequivalent to a separate least squares fit to apolynomial for each data point with the fittingregion symmetrically surrounding the point.They are used to determine the angle θ, theangular velocity ω = dθ/dt, and the angularacceleration α = d2θ/dt2.

Equation of Motion

As shown in Fig. 1, the pendulum angle θ isdefined from the vertical with θ = 0 for thestraight-up, or inverted, position. Clockwiseangles are taken positive.

Also illustrated on Fig. 1, the drive phase φis taken as the angle of the motor shaft fromvertical. The uniform pulse train sent to themotor has an adjustable rate and will causethe shaft to rotate at a constant angular ve-locity Ω so that

φ = Ωt (1)

where the shaft is assumed to be straight up att = 0. Then, the displacement d of the drivenend of the spring can be taken to be2

d = A cos Ωt (2)

1Abraham Savitsky and Marcel J. E. Golay,Smoothing and differentiation of data by simplifiedleast squares procedures, Analytical Chemistry, 36 pp1627-39, 1964.

2With the distance from the center of the drive mo-tor to the guide hole given by L, the driven end of thespring moves according to d = A cos φ−A2

4L (1−cos 2φ).The offset term, −A2/4L, is typically no larger than2 mm and the term proportional to cos 2φ causes asmall amplitude driving oscillation at an angular fre-quency of 2Ω which will be ignored in the analysis.

Figure 2: Near scale drawing of the potential V (θ)for our system.

The disk, pulley and axle have a momentof inertia I0. They are well balanced andcause virtually no torque in a gravitationalfield. The pendulum mass m placed a distancel from the rotation axis produces a gravita-tional torque mgl sin θ. It also increases themoment of inertia to I = I0 + Im +ml2, whereIm is its principal moment of inertia.

The string between the two springs ridesover the pulley without slipping, and the rela-tively weak springs stay elongated at all times.The springs/strings/pulley arrangement is ad-justed as described later so that the springshave equal stretch (provide equal tension)when θ = 0 and d = 0. In this inverted config-uration, the pendulum would have no torqueacting on it, but it would be in an unstableequilibrium, ready to fall to the left or right.

Exercise 2 (a) Show that the torque arisingfrom the two springs and from gravity actingon the pendulum mass is given by

τc = −2kr2θ + krd + mgl sin θ (3)

where k is the force constant for each springand r is the pulley radius. (b) Show that ford = 0, (i.e., A = 0, which means the pendulumis undriven) the potential energy is given by

V = kr2θ2 + mgl cos θ (4)

February 1, 2007

Page 4: Chaotic Pendulum - Department of Physicsdeserio/LabVIEW/Chaos/chaos.pdfpendulum system will be measured and an-alyzed. You will learn in your investigations ... Nonetheless, for small

CP 4 Advanced Physics Laboratory

(c) Show that for mgl ≤ 2kr2, V (θ) has oneminimum at θ = 0; and that for mgl > 2kr2,V (θ) has a maximum at θ = 0 and two equallydeep minima at ±θe where

sin θe

θe

=2kr2

mgl(5)

As shown in Fig. 2, our system potential hasa double well shape.

Dissipation

The torque τc (Eq. 3) arises from the conserva-tive forces of gravity and Hooke’s law. Thereare also nonconservative torques due to eddycurrent damping and axle friction throughwhich energy is continually drained or dissi-pated from the system. If this energy is notcontinually replenished, for example, by thestepper motor drive system, the motion slowsand ultimately stops. A damping torque pro-portional to and opposite the angular velocityis created by induced eddy-currents when aneodymium magnet is brought near the rotat-ing aluminum disk. This torque can be mod-eled as −b ω. Friction, arising largely in theaxle bearings, causes an additional dampingtorque of constant magnitude b′ that is alwaysopposite the angular velocity. This “axle fric-tion” torque can be modeled −b′ sgn ω, wheresgn ω = ω/|ω|. Thus, the net nonconservativetorque is given by

τf = −b ω − b′ sgn ω (6)

This form for the damping torque will be ver-ified by fits of data taken from the appara-tus. It will also be used in simulations. The(probably small) effect of static friction asthe pendulum momentarily stops each timeω goes through zero has not been explored.Occasionally, the entire axle friction term willbe dropped in this writeup for readability or

whenever analytic solutions are desired. (In-cluding axle friction makes the equation of mo-tion nonlinear and the solutions are not ex-pressible in closed form.)

Exercise 3 Show that the equation of motionfor the apparatus can be written as an au-tonomous3 set of three first order differentialequations.

θ = ω (7)

ω = −Γω − Γ′sgn ω − κθ (8)

+ µ sin θ + ε cos φ

φ = Ω (9)

where a dot over a variable represents its timederivative and

Γ = b/I (10)

Γ′ = b′/I (11)

κ = 2kr2/I (12)

µ = mgl/I (13)

ε = krA/I (14)

Linear Dynamics

Despite being nonlinear, the system can stillbehave like a harmonic oscillator as long asthe total energy remains small compared tothe height of the potential barrier at θ = 0.

Exercise 4 (a) Show that a Taylor expan-sion4 of V (Eq. 4) about either minimum θ0 =±θe gives

V = kr2θ2e + mgl cos θe (15)

+1

2(2kr2 −mgl cos θe)(θ − θ0)

2

+ higher order terms

3Autonomous means that time does not appear ex-plicitly on the right sides of the equations.

4The first three terms are given by f(x) = f(x0) +f ′(x0)(x− x0) + 1

2f ′′(x0)(x− x0)2, where primes indi-cate first and second derivatives with respect to x.

February 1, 2007

Page 5: Chaotic Pendulum - Department of Physicsdeserio/LabVIEW/Chaos/chaos.pdfpendulum system will be measured and an-alyzed. You will learn in your investigations ... Nonetheless, for small

Chaotic Pendulum CP 5

Why is the first order term in (θ−θ0) miss-ing? (b) Show that keeping only up to thequadratic term, (and taking Γ′ = 0), the equa-tions of motion can be written

θ′ + Γθ′ + Ω20θ′ = ε cos Ωt (16)

where a double dot over a variable representsa second derivative with respect to time, θ′ =θ − θ0 is the angular displacement from equi-librium, and

Ω0 =√

κ− µ cos θe (17)

is the natural resonance frequency. As dis-cussed below, Eq. 16 is the standard drivenharmonic oscillator equation.

Although it is required for chaotic motion,the pendulum mass m can be removed, turn-ing the apparatus into an excellent exampleof a harmonic oscillator even for large ampli-tude oscillations. The equation of motion withm = 0 (and Γ′ = 0) can be expressed

θ + Γθ + Ω20θ = ε cos Ωt (18)

where Ω20 = κ, and Γ, κ, and ε are given by

Eqs. 10, 12 and 14 (with I = I0).

Exercise 5 (a) Show that for ε = 0 (undrivensystem), Eq. 18 has an underdamped (Γ/2 <Ω0) solution of the form

θ = Ce−12Γt cos(Ω′t + δ) (19)

whereΩ′ =

√Ω2

0 − Γ2/4 (20)

is the oscillation frequency (pulled slightly be-low the natural resonance frequency Ω0 forweak damping). Although you are not asked todo so here, C and δ can be determined fromthe initial conditions on θ and θ at t = 0. (b)Show that for a nonzero ε (driven system), thesolution to Eq. 18 is the sum of Eq. 19 (called

the homogeneous or transient solution) and aparticular or steady state solution given by

θ = C ′ cos(Ωt + δ′) (21)

where

C ′ =ε√

(Ω20 − Ω2)2 + Ω2Γ2

(22)

and

tan δ′ =ΩΓ

Ω2 − Ω20

(23)

Non-linear Dynamics

For chaotic motion, there are no analytic so-lutions, no closed form expressions for θ vs. tlike Eqs. 19 and 21. So how can the measure-ments be analyzed? The following few sec-tions present some of the techniques for rep-resenting, analyzing, and comparing chaoticdata sets.

Phase space

The Poincare-Bendixson theorem states thatat least three time dependent (dynamical)variables are required for a system to displaychaotic behavior. Our system is at this mini-mum as demonstrated by the three equationsof motion, Eqs. 7-9, one for each variable.Consider carefully how θ, ω, and φ are theonly time-dependent variables in the system,how they are independent from one another,and how they completely describe the state ofthe system at any particular point in time.

θ — Angle of the pendulum.

ω — How fast and in what direction thependulum is moving.

φ — Angle of the drive shaft.

February 1, 2007

Page 6: Chaotic Pendulum - Department of Physicsdeserio/LabVIEW/Chaos/chaos.pdfpendulum system will be measured and an-alyzed. You will learn in your investigations ... Nonetheless, for small

CP 6 Advanced Physics Laboratory

The triplet of values (θ, ω, φ) can be consid-ered a point u in a three dimensional coordi-nate system called phase space.

u =

θωφ

(24)

As the three variables change continuously intime, the phase point describing the systemmoves continuously through phase space. Thepath through phase space is called a trajectoryand a plot of a trajectory is called a phase plot.

The trajectory is predicted by Eqs. 7-9which can be expressed compactly using thevector notation

u = G(u) (25)

where

u =

θω

φ

(26)

and G(u) is a 3-vector function of the threedynamic variables.

G(u) =

Gθ(θ, ω, φ)Gω(θ, ω, φ)Gφ(θ, ω, φ)

(27)

For our system

G(u) = (28)

ω−Γω − Γ′sgn ω − κθ + µ sin θ + ε cos φ

Ω

For any point u in phase space, the equa-tion u = G(u) predicts the value of u a shorttime later. For a small enough time step τ , thefuture phase can be predicted in terms of thepresent phase via the definition of the deriva-tive, u = (u(t + τ)− u(t))/τ , as

u(t + τ) = u(t) + τ G(u(t)) (29)

φ

ω

θ

Figure 3: The three-dimensional phase space forthe driven nonlinear oscillator. Each rectanglerepresents a θ-ω plane at a different drive phaseφ. A darkened plane is shown for one value of φ.

To determine u over a longer time interval,this equation would be iterated using a “smallenough” time step τ . With certain refine-ments to improve accuracy and speed, thisis how computer simulations and differentialequation solvers work.

The phase space coordinate system can berepresented as a continuous set of θ-ω planesencircling a common axis as shown in Fig. 3.Each plane is in one-to-one correspondencewith the drive phase φ. One turn of the drivesystem can be thought of as forcing one “or-bit” through the planes.

C.Q. 1 For undriven motion, φ is not a dy-namical variable for the system and phasespace becomes two-dimensional—a single θ-ωplane. Show that the trajectory for undamped,undriven harmonic oscillations lies on an el-lipse in the θ-ω phase plane. What relativeaxes scaling is needed to make the ellipse circu-lar? What determines the direction of motionaround the ellipse? What determines the timeit takes to go around the ellipse? How do thetrajectories depend on the initial conditions?

February 1, 2007

Page 7: Chaotic Pendulum - Department of Physicsdeserio/LabVIEW/Chaos/chaos.pdfpendulum system will be measured and an-alyzed. You will learn in your investigations ... Nonetheless, for small

Chaotic Pendulum CP 7

Hand sketch at least two different ellipses onthe same θ-ω plane.

C.Q. 2 How does the addition of dampingchange the trajectories above? How do thetrajectories depend on the initial conditions?Hand sketch at least two different trajectorieson the same θ-ω plane. Where on the phaseplane do all trajectories, no matter the initialconditions, ultimately end up?

C.Q. 1 demonstrates that oscillations atconstant amplitude have a circular trajectoryin an appropriately-scaled θ-ω phase plane,while C.Q. 2 demonstrates that the trajectoryspirals into the point (0, 0) when damping ispresent. What do trajectories look like in adriven system, for which phase space is threedimensional—like that of Fig. 3? Figure 4(a)shows a plot of θ vs. t for a driven harmonicoscillator. The fast oscillations at the begin-ning of the curve correspond to the transientbehavior of Eq. 19. These fast oscillations aresuperimposed on the slower steady state oscil-lations corresponding to Eq. 21. In plot (b),this motion is shown as a three dimensionalphase space trajectory. Starting at the end-point on the left, the fast transient oscillationsbecome the corkscrew motion about the circu-lar pattern, on which the trajectory repeatedlycycles and representing the steady state oscil-lations. The steady state orbit is not quitecircular, but rides on the surface of a torusas shown in plot (c). With proper scaling, across section of the torus would have the two-dimensional circular trajectory of C.Q. 1. Butnow, while the trajectory cycles around thecircle in the θ-ω planes, it simultaneously cy-cles through the drive phase φ—around thelong direction of the torus.

Of course, other trajectories are also possi-ble. For example, the natural frequency Ω0

might be closer to or lower than the drive fre-quency Ω rather than 20 times higher as in

Figs. 4(a) and (b). Or, the damping might beweaker or stronger. These variations requirea change in the system parameters. The onlyvariations possible in a given system dependon how the motion is started and determinewhether the transient motion starts off largeor small. In contrast, the steady state trajec-tory does not depend on initial conditions—itis an invariant of the system. It is an invari-ant because the amplitude and phase relations(Eqs. 22 and 23) specify a single closed curvethrough phase space. Because the phase pointrepeatedly cycles around a closed curve, themotion is called a limit cycle. The motion re-peats after a single drive period because thesteady state oscillation frequency within theθ-ω planes is the same as the drive frequencythrough them. Thus, the closed curve is a sin-gle loop and called a period-1 limit cycle. Notpossible with a linear oscillator, our apparatuscan display motion that repeats only after thedrive motor has gone around five (or more)times. This would be called a period-5 (orhigher) limit cycle.

Attractors

The single invariant curve representing thesteady state motion of a driven harmonic os-cillator is called an attractor for that (threedimensional) system. The final ending point(0, 0) for the damped undriven motion ofC.Q. 2 is an attractor for that (two dimen-sional) system. Attractors are the ultimatefate of the trajectories after transients havedecayed away.

Nonlinear oscillators also have attractors.For our system, the type and number of attrac-tors that occur depend on the drive frequencyΩ, its amplitude ε, and the other system pa-rameters κ, µ, Γ, and Γ′.

At low drive amplitudes, only two steadystate motions are possible—near harmonic os-

February 1, 2007

Page 8: Chaotic Pendulum - Department of Physicsdeserio/LabVIEW/Chaos/chaos.pdfpendulum system will be measured and an-alyzed. You will learn in your investigations ... Nonetheless, for small

CP 8 Advanced Physics Laboratory

D E F

Figure 4: (a) θ vs. t for a linear oscillator. (b) The same data represented as a phase space trajectory.(c) The dark curve represents the steady state trajectory (attractor) for a linear oscillator. It lies ona torus.

cillations centered about one or the other equi-librium point. Each of these motions corre-sponds to a period-1 limit cycle attractor. Aninteresting question not relevant to linear os-cillators is to determine which of the two at-tractors the motion will end on. The initialconditions do, in fact, unambiguously deter-mine which attractor the motion will end on.Thus, a basin of attraction can be associatedwith each attractor, and is defined as thosephase points that lead to motion on that at-tractor. For nonlinear systems, the shapes ofthese basins can be quite complex.

At larger drive amplitudes, chaotic motioncan occur for which the trajectory never re-peats. The phase point cycles through thefull set of θ-ω planes once per drive periodyet never hits the same point twice. More-over, an attractor still describes the ultimatemotion. As with the linear oscillator, arbi-trary initial conditions cause motion off theattractor, but after this transient motion de-cays away, the system phase point ultimatelymoves on a subset of points in phase space.The subset is the attractor, and determiningits shape and properties are important partsof the analysis.

One trivial property is that it must liewithin a bounded three dimensional volume of

phase space. Under most operating conditionsthe bounds for θ are |θ| < 2π (the pendulumnever goes over the top twice in the same di-rection). The range of φ is also bounded; itsextents can be taken from 0 to 2π. And ωmust be bounded as well. The kinetic energyIω2/2 will not grossly exceed the largest pos-sible potential energy k(rθ)2 with θ ≈ 2π.

Just as a point in phase space representsthe state of a system, a volume in phase spacerepresents a set of states. For every value of(θ, ω, φ) in that volume, the relation u = G(u)provides unique values for the derivatives ofeach variable. The derivatives specify a uniqueflow for each trajectory point so that as thetrajectories evolve, they can converge towardone another and they can diverge away fromone another but they can never cross. A cross-ing would require two different values for u atthe same value of u, forbidden under the as-sumption that the pendulum is governed byu = G(u).

As outlined in the appendix on the Lya-punov exponent algorithm, one can prove thatany finite volume of phase points simulta-neously evolving according to Eq. 25 (withEq. 28) will exponentially decay to zero witha rate constant given by −Γ. Thus, considera set of initial conditions filling a finite vol-

February 1, 2007

Page 9: Chaotic Pendulum - Department of Physicsdeserio/LabVIEW/Chaos/chaos.pdfpendulum system will be measured and an-alyzed. You will learn in your investigations ... Nonetheless, for small

Chaotic Pendulum CP 9

ume of phase space that completely covers theattractor. As the transients decay away, thephase points must all come to lie on the at-tractor while at the same time the volumeof the attractor must exponentially decay tozero. This is possible if the attractor con-sists of any number of limit cycles becausea limit cycle is a finite length curve throughphase space and thus has zero volume. How-ever, limit cycles are not the only possibility.In fact, chaotic motion never repeats. Con-sequently, the attractor on which it lies cannot be a limit cycle and must be a curve withan infinite length. Thus, the chaotic attrac-tor must be a set of points with an infinitelength but zero volume. How can this be? Atwo dimensional surface of arbitrary shape inphase space is a set of points with this prop-erty, but it will turn out that our attractoris not any kind of oddly shaped area in phasespace. You will determine that the dimension-ality of our attractors is between that of anarea (a two dimensional object) and a volume(a three dimensional object). Chaotic attrac-tors apparently have strange shapes with frac-tional dimensions (fractals). Fractal attrac-tors are called strange attractors.

Poincare sections

We will only be able to measure a subset ofthe complete attractor—a very long trajec-tory. Overnight runs of 50,000 drive cyclesare typical for our apparatus. Such a long tra-jectory is nearly enough to completely repre-sent the attractor and we will often not dis-tinguish between the trajectory and the at-tractor. However, you should always keep inmind that the full attractor has infinitely morepoints than any finite trajectory.

A long trajectory is difficult to display on atwo-dimensional medium such as a computerscreen or a piece of paper. One way to achieve

ω

θ

Figure 5: A Poincare section from the apparatusof Fig. 1.

Figure 6: A sequence of Poincare sections ar-ranged to illustrate the complete three dimen-sional attractor in the phase space coordinate sys-tem of Fig. 3

a compact representation of a very long tra-jectory is with a Poincare surface of section(Poincare section for short)—so named be-cause it is a cross section of the full three-dimensional trajectory. In a Poincare section,θ and ω are recorded as a single point eachtime the trajectory pierces through the θ-ωplane corresponding to one value of the drivephase φ. Thus, once per drive period, a new(θ, ω) point is added to the plot as the trajec-tory repeatedly pierces that particular plane.

A Poincare section from our apparatus isshown in Fig. 5. A collection of Poincare sec-

February 1, 2007

Page 10: Chaotic Pendulum - Department of Physicsdeserio/LabVIEW/Chaos/chaos.pdfpendulum system will be measured and an-alyzed. You will learn in your investigations ... Nonetheless, for small

CP 10 Advanced Physics Laboratory

tions at sequential drive phases φ is a rep-resentation of the complete attractor. Fig-ure 6 shows a three dimensional arrangementof 20 Poincare sections illustrating the attrac-tor. Several sequences of 40 Poincare sectionscan be seen as movie loops on the laboratoryweb page.

Fractal dimension

The attractor for chaotic motion is called“strange” because it has a strange shape calleda fractal. A fractal is a self-similar object,meaning it looks similar on ever decreasingscales. One invariant of a strange attractor isits fractal dimension. Since our attractor is di-mensionally the same as an extruded Poincaresection, its fractal dimension is one plus thefractal dimension of any of its Poincare sec-tions. Consequently, it is the fractal dimen-sion of a Poincare section that will be sought.While there are several different varieties offractal dimensions, the most common is thecapacity dimension. The box-counting algo-rithm used to determine the capacity dimen-sion also demonstrates the self similarity of afractal Poincare section.

The algorithm for a two dimensional frac-tal is as follows. Determine the bounds in theplane over which the fractal extends. Dividethat area into M×rM grid boxes (r = 1 is finebut not required). Count the number of gridboxes N covering any part of the fractal. Re-peat the procedure as M is increased, makingthe grid boxes smaller and smaller. The slopeof the log N vs. log M graph (in the limit asM →∞) is the capacity dimension.

The procedure above is for the idealized caseof an infinite trajectory—a Poincare sectionfrom the complete attractor. It will need tobe modified for an experimental Poincare sec-tion obtained from a finite trajectory. Thephrase “covering any part of the fractal” is

modified to “having at least one phase point.”The phrase “in the limit as M →∞” must bedropped because if the size of boxes becometoo small, N will saturate at the total numberof phase points in the Poincare section. Thus,one must simply check that the graph of log Nvs. log M appears to be a straight line beforeN saturates. For our 50,000-point Poincaresections, r = 1/2 (twice as many grid lines inθ as in ω) and M in a range from 10 to 300 orso works well.

C.Q. 3 The ordinary geometric dimensionsof a point, line, area, and volume are 0, 1, 2,and 3, respectively. (a) Explain how the box-counting algorithm would give a dimension of0, 1, and 2, respectively, for a very large num-ber of phase points distributed uniformly at apoint, along a line, and over an area in the θ-ω plane. (b) When there are two or more suchobjects, e.g., points and lines or lines and ar-eas, explain why the algorithm should give thedimension of the highest dimensional object inthe set.

Lyapunov exponents

Fractal attractors are one hallmark of chaoticbehavior. Extreme sensitivity to initial con-ditions is another. It is typified by an expo-nential growth in the phase-space separationof two trajectories which start out very nearone another. Actually, at each point u on theattractor there are three different directions(global Lyapunov vectors) ei that characterizethree different exponential time dependenciesthat occur. Any phase point u′ near u havinga small difference

δu = u′ − u (30)

that is parallel to one of these directions,evolves with a single exponential time depen-dence characterized by one of three Lyapunov

February 1, 2007

Page 11: Chaotic Pendulum - Department of Physicsdeserio/LabVIEW/Chaos/chaos.pdfpendulum system will be measured and an-alyzed. You will learn in your investigations ... Nonetheless, for small

Chaotic Pendulum CP 11

exponents. In other words, any initial sepa-ration δu(0) in the direction of a particularLyapunov vector ei evolves according to

|δu(t)| = |δu(0)|eλit (31)

where λi is the corresponding Lyapunov expo-nent for the particular direction ei.

The λi can be positive, negative, or zero.A negative value corresponds to a directionin which the separation decays over time. Azero value corresponds to a direction in whichthe separation remains constant. And forchaotic motion, at least one of the λi mustbe positive—corresponding to a direction inwhich the separation grows. No matter howsmall, any two initial conditions will alwayshave some component along the expanding di-rection, and the trajectories evolving there-from will always diverge.

Small random forces and torques acting onthe pendulum (e.g., from the pickup of vibra-tions in the pendulum supports and from smallvariations in friction), cause small perturba-tions to the phase space trajectory. Theseperturbations then also evolve according tothe system dynamics and are called dynami-cal noise. Extremely close phase points, whichmight take a long time to separate in a noise-less system, do so more quickly in the presenceof dynamical noise. A study of the effects ofdynamical noise would make an interesting ad-vanced project. However, the dynamical noisein our apparatus is small enough that manypredictions made assuming it is negligible willstill be valid.

One of the three Lyapunov directions andits corresponding exponent is essentially triv-ial and easily visualized. Imagine two identi-cal trajectories differing only in that one leadsthe other by some small time interval δt. Forsmall enough δt, Eq. 25 implies their phaseswill differ by δu = G δt, and although δuchanges as the two systems evolve (because G

depends on u), there is no average increase ordecrease with time. Thus, this “propagation”direction has a corresponding Lyapunov expo-nent of zero. All dynamical systems governedby an autonomous set of differential equationswill have such a direction and at least one Lya-punov exponent will be zero.

Because the motion in the propagation di-rection is basically trivial, the behavior ofnearby points on the same Poincare sectionprovide all the essential information. The gen-eral behavior is illustrated in the two Poincaresections shown in Fig. 7. Consider the sin-gle phase point un marked by the cursor inthe section on the left. The highlighted pointscentered around un are a set of nearest neigh-bors uj found by searching through all pointson this Poincare section and selecting thoseinside an elliptical region satisfying

(δθj

θr

)2

+

(δωj

ωr

)2

< 1 (32)

where δθj = θn − θj, δωj = ωn − ωj. Thequantities θr and ωr specify the major axesof the elliptical neighborhood (0.15 rad and0.30 rad/s, respectively, for the section on theleft in Fig. 7).

For the point un and the set of points uj,a corresponding point un+1 and set uj+1 arealso thereby determined as those points onetime step later. These points are shown in thesection on the right for a time step τ equal to1/5th of the drive period. From these two setsare constructed two sets of deviations δun =un − uj and δun+1 = un+1 − uj+1 one timestep forward.

For small values of δu, the transfor-mation between the δu in each neighbor-hood is predicted to be relatively simple—rotations and/or contractions and/or expan-sions. While the rotations can not be dis-cerned in Fig. 7, a contracting and expandingdirection are evident. (The scaling is the same

February 1, 2007

Page 12: Chaotic Pendulum - Department of Physicsdeserio/LabVIEW/Chaos/chaos.pdfpendulum system will be measured and an-alyzed. You will learn in your investigations ... Nonetheless, for small

CP 12 Advanced Physics Laboratory

Figure 7: A small area of a Poincare section showing how an initial set of δun around the cursor inthe left plot move and change shape when propagated 1/5 period. The scale ranges are the same inthe two figures and the evolved set δun+1 is the elongated and flattened patch around the cursor inthe right figure.

in the two sections.) The basic transformationcan be modeled as a 2 × 2 matrix multiplica-tion

(δθn+1

δωn+1

)=

(b11 b12

b21 b22

) (δθn

δωn

)(33)

with the matrix elements bij depending onwhere u is located on the attractor. A leastsquares fit of the data (the δun and δun+1) toEq. 33 provides best estimates of the trans-formation matrix elements.5 The matrix el-ements are then used to determine two localLyapunov exponents which must be averagedalong a long trajectory to determine the globalLyapunov exponents characteristic of the at-tractor as a whole. From an arbitrary start-ing point, this procedure—finding the near-est neighbors, determining the δun and δun+1,performing the fit, and determining the twolocal Lyapunov exponents—is repeated at se-quential points along a trajectory. The lo-cal Lyapunov exponents are monitored and

5As shown in the Appendix on Lyapunov exponentsa modified version of Eq. 33 is actually fit to the data.

the calculation continues until their averageis deemed to have stabilized.

A more complete description of the algo-rithm and its theoretical underpinnings is pro-vided in the Lyapunov Exponent addendumthat can be found on the laboratory web site.

Fit of the angular acceleration

The Savitsky-Golay filters can be used to cal-culate the angular acceleration at every pointalong a trajectory. Modeling the values of α(= ω) according to Eq. 8, a linear regressioncan be used to experimentally determine Γ, Γ′,κ, µ, and ε.

For the fit, it is important to take into ac-count the differences between the measuredangles and those of the theory. For example,θ = θm +δθ would be used to describe the factthat the computer value θm may be offset fromthat of the theory θ. Similarly, φ = φm + δφ.Lastly, the possibility that the spring equilib-rium may not be set exactly at θ = 0 shouldbe taken into account; it is taken to occur at

February 1, 2007

Page 13: Chaotic Pendulum - Department of Physicsdeserio/LabVIEW/Chaos/chaos.pdfpendulum system will be measured and an-alyzed. You will learn in your investigations ... Nonetheless, for small

Chaotic Pendulum CP 13

some unknown angle θ0.With these offsets in mind, Eq. 8 becomes

α = −Γω − Γ′sgn ω − κ(θm + δθ − θ0) (34)

+µ sin(θm + δθ) + ε cos(φm + δφ)

This equation can be put in a form suitablefor regression analysis using the trigonometricidentities: sin(a + b) = sin a cos b + sin b cos aand cos(a + b) = cos a cos b− sin a sin b.

C.Q. 4 (a) Show that the regression expres-sion can be written:

α = C[1] + G[ω] + G′[sgn ω] + K[θm]

+Ms[sin θm] + Mc[cos θm] (35)

+Ec[cos φm] + Es[sin φm]

where each regression term is in brackets andwhere the coefficients of each term are givenby

C = −κ(δθ − θ0) (36)

G = −Γ

G′ = −Γ′

K = −κ

Ms = µ cos δθ

Mc = µ sin δθ

Ec = ε cos δφ

Es = −ε sin δφ

(b) After obtaining these coefficients from thefit, they are used to determine the parameters.Show that this becomes:

Γ = −G (37)

Γ′ = −G′

κ = −K

µ =√

M2s + M2

c

δθ = tan−1 Mc

Ms

ε =√

E2c + E2

s

δφ = tan−1 −Es

Ec

θ0 = tan−1 Mc

Ms

− C

K

While the Savitsky-Golay filters can bequite accurate when fitting continuous func-tions, the discontinuous behavior of axle fric-tion (it changes sign at ω = 0) presents a slightproblem. Because the filters average over a fi-nite time, they smooth the discontinuity overa range that depends on the number of pointsused in the filter. For the recommended 33-point filters, the axle friction smoothing ap-pears to be over a range of ±3 rad/s. To pre-vent systematic errors, the fits should excludedata points in this range.

LabVIEW Programs

The following sections describe the use of thedata acquisition and analysis programs avail-able for this experiment. All analysis pro-grams are limited to three-dimensional attrac-tors like those for the system described here.The analyses typically begin by converting thedata sets to a discrete set of two-dimensionalPoincare sections equally spaced along thetrivial (drive phase) dynamical variable.

The analysis programs are designed to workwith several kinds of data sets that can be gen-erated in our lab. In the programs they arelabeled:

• Poincare: A text-type spreadsheet filewhose first two columns contain a singlePoincare section.

• I16: A binary file containing a single rowof 16-bit signed integers. This is the cor-rect file type for the chaotic pendulum.

• datalog: A binary file containing mul-tiple rows of double precision numbers.

February 1, 2007

Page 14: Chaotic Pendulum - Department of Physicsdeserio/LabVIEW/Chaos/chaos.pdfpendulum system will be measured and an-alyzed. You will learn in your investigations ... Nonetheless, for small

CP 14 Advanced Physics Laboratory

This is the type of file made by the simu-lation programs.

• N×I16: A binary file containing multi-ple rows of 16-bit signed integers. Thisis the type of file made when collectingdata for a driven electronic circuit. Thefirst two indices in the var. order controlthen determine which variables are usedin the Poincare sections.

All of the programs are started by clickingon the Run button on the toolbar. Differentanalysis programs may run with only particu-lar kinds of data sets. The File type tab controlon the front panel of the program will have atab for each allowed type and the type desiredmust be selected before hitting the Run but-ton. For all but the DisplayI16 program forreal time display of experimental data, vari-ous data set parameters (described next) mustalso be selected before running the program.

For the I16 file type there is a delta t controlgiving the time between each measured inte-ger. It is used with the Savitsky-Golay filter-ing to determine properly scaled derivatives.For the chaotic pendulum it should be set to1/200 of the drive period. For both the I16and N×I16 file types there is a delta y control(array for the latter) which gives the physicalstep size for each change of 1 in the 16-bit in-teger. For the chaotic pendulum, it should beset to 2π/1440, the default setting.

Savitsky-Golay filtering is used to determineθ, ω = θ, and α = θ values from the raw ro-tary encoder readings.6 This filtering is equiv-alent to performing an unweighted, linear leastsquares fit of the readings to a polynomial ateach point. The control for filter averaging(pts) is used to set the number of consecutivedata points used (33 is recommended) and thepolynomial order is set by the polynomial order

6See the laboratory chaos web page for addendumon the theory of Savitsky-Golay filters.

control (a 4th order or quartic polynomial isrecommended).

The programs may have from and to con-trols and/or a Slice control. The from and tocontrols determine which drive cycles in thedata set will be analyzed. For a data set with50,000 drive cycles, choosing the from and toto be 5001 and 15000 would cause the pro-gram to use the ten thousand cycles startingfrom cycle 5001.

Programs requiring multiple Poincare sec-tions from the attractor will have a sec-tions/cycle control. These programs use a setof n equally-spaced Poincare sections, where nis the setting for this control. Programs thatuse only a single Poincare section will have anadditional slice control to select which of the nPoincare sections the program will use. Bothkinds of programs must also know the totalnumber of data points per drive cycle and willhave a readings/cycle control, which should beset for 200 for experimental chaotic data (I16files) or 40 for simulations (default-sized dat-alog files).

Acquire chaotic pendulum data

Raw data from the rotary encoder (1440 pulsesper revolution) are collected and saved to afile by the Acquire chaotic pendulum data pro-gram. This program steps the (200 pulse-per-revolution) drive motor at a constant rate andtriggers a reading of the rotary encoder witheach motor pulse.

The drive frequency (in rotations per sec-ond) is set by the stepper motor frequency con-trol. After the Run button in the toolbar ispressed, the control is updated with the near-est frequency the system was able to reach.This program will ask for a file name in whichit will store the data. Navigate to the My Doc-uments area to store the data. Unless this isa run you are sure you will want to save, keep

February 1, 2007

Page 15: Chaotic Pendulum - Department of Physicsdeserio/LabVIEW/Chaos/chaos.pdfpendulum system will be measured and an-alyzed. You will learn in your investigations ... Nonetheless, for small

Chaotic Pendulum CP 15

the default name Data.bin and click OK whenit asks if it can be overwritten. You can alwaysrename it afterward if you decide it will beneeded later. The reset button can be pressedwhile taking data to restart saving data at thebeginning of the file. However, previous dataremains part of the file until overwritten.

You can change the drive frequency twoways. The automatic method repeatedlychanges the frequency by a specific amountwhile continuously taking data and it shouldonly be used for independent study. At thebottom of the front panel there is a buttonto turn the frequency sweep feature on and offand a control for the frequency change per step(negative values are OK). Each step is appliedafter a fixed number of pulses to the steppermotor (step delay). The default value gives asweep of -0.001 Hz/cycle. With the frequencysweep off, the frequency can be changed manu-ally and “on the fly” while data collection con-tinues. To do so, simply change the value inthe stepper motor frequency control and thenclick on change frequency button. Keep inmind that unless the drive frequency is con-stant for the entire run, any programs usingthe delta t control (described later) will nothave correct time or frequency scales. All in-formation about the run, such as drive fre-quency, the magnet damping distance and thedrive shaft length, should be written in yourlab notebook.

The angular position of the drive shaft andof the rotary encoder when the toolbar Runbutton is pressed are taken to be φ = 0 andθ = 0, respectively, in the data analysis pro-grams. Consequently, if you want φ = 0 andθ = 0 to be close to the straight up positions,you will have to set the drive shaft and holdthe pendulum in these positions as you pressthe Run button. To set the drive shaft, turnthe motor controller off, adjust the shaft byhand to the vertical position, and turn the mo-

tor controller back on before pressing the Runbutton. However, these zeroing procedures arehardly ever relevant. Just keep in mind thatin any analysis, the drive shaft and pendulumangle for any data set will generally have anunknown offset. The offsets are irrelevant formost analyses, and when they are relevant, forexample in the fits to the angular acceleration,they are included as parameters.

For collecting data on undriven motion, setthe drive frequency to 1.0 Hz. This will estab-lish the rotary encoder data collection rate at200 readings per second. Set the drive shaftfor A = 0 and shut off the motor controller toprevent the motor from turning.

DisplayI16

Use the DisplayI16 program to look at thedata while it is being collected, to look at shortdata sets, or to make ASCII files of the datasuitable for spreadsheets.

Before hitting the toolbar Run button, en-ter values for the readings/cycle (200), deltay (2π/1440) and delta t (T/200, where T isthe drive period). The history length (cycles)control (described shortly) must also be se-lected before running the program. After hit-ting the Run button, the program asks fora data file. Specify the file name given forthe Acquire chaotic pendulum data program—Data.bin or any previously collected binarydata files. However, depending on the file andbuffer size, only points from the end of thedata set may be available to look at.

The topmost raw readings graph displayedon the front panel is the raw count from therotary encoder vs. the cycle number. The his-tory length (cycles) control sets the number ofdrive cycles N that will be available for useby this program. As the data set grows, onlythe most recent N cycles will be available. Thebutton labeled real time updating should be set

February 1, 2007

Page 16: Chaotic Pendulum - Department of Physicsdeserio/LabVIEW/Chaos/chaos.pdfpendulum system will be measured and an-alyzed. You will learn in your investigations ... Nonetheless, for small

CP 16 Advanced Physics Laboratory

to on to update the buffer with new data asit is being collected. New data is then addedto the end of the buffer as old data is removedfrom the beginning. Click real time updating tooff to stop reading in new data and to makeit easier to select data for further processing.When you later click it back on, all unreaddata will then be read in.

Set the cursors on the raw readings graphto cover the desired data and click on the up-date graphs button to the left of this graph todisplay the selected data on the other threegraphs on the front panel or to save it to aspreadsheet file. The leading cursor deter-mines the first data point processed, while thesections/cycle determine the subsequent datapoints processed until such point would be af-ter the trailing cursor. (For example, at 40sections/cycle, every fifth point is processed.)Each of the other three graphs and the savex, v, a to spreadsheet have a button next tothem labeled update or don’t update. For thegraphs, the state of these buttons determineswhether the graphed data is updated accord-ing to the new settings or left unchanged. Forthe save θωα to spreadsheet the update/don’tupdate determines whether the processed datawill be saved to a text file readable by mostspreadsheet programs. The format %.7e canbe changed. Change the 7 to the number ofdigits to the right of the decimal point.

The graph directly below the raw readings isa plot of x (θ), v (ω), and/or a (α) vs. t, aschosen by the check boxes to the left of thegraph. The time interval between points iscalculated assuming the raw acquisition rateis constant—200 times the (starting, saved)motor frequency. Thus, if frequency scanningwere used, the time scales on these graphs willbe incorrect. To the right of the vs. t graphs isthe Fourier power spectrum (associated withx vs. t). Below the vs. t graphs is a graphof ω vs. θ. Set the Readings/rev to 1 and the

plot style to points/no line to get a Poincaresection. Set the Readings/rev anywhere from40-200 and change the plot style to line/nopoints for a phase plot. (To set the plot styleclick in the legend box at the upper left of thegraph. The Common Plots options let you setwhether points, lines, or both are displayed.)

Chaotic pendulum fit

The algorithm is described in the theory sec-tion. The program needs to be told the datafor the fit. You do not want to fit too big adata set. It will bog down the computer. Fit-ting about ten thousand drive cycles at 10 sec-tions per cycle works well and goes reasonablyfast. You can try fitting data from the begin-ning, middle, and end of the data set (withthe from and to controls) to see if the param-eter estimates are stable throughout the run.The parameters displayed on the right of thefront panel are those of Eq. 34. However, thedisplayed covariance matrix is that of the fit-ting parameters of Eq. 35. It is a matrix ofthe sample covariances s2

ij (diagonal elementsare the square of the estimated parameter un-certainties), with the rows and columns of thematrix in the following order: G, K, Ms, Mc,Es, Ec, C, G′.

The fit residuals are the differences betweenα as determined by the Savitsky-Golay filtersand the value obtained through Eq. 8 usingthe fitted parameter values. These can be plotversus θ, ω, or φ, and the excluded points canbe included in this plot or not.

Box counting dimension

The algorithm is described in the theory sec-tion. Recall that the fractal dimension it willfind is that of one Poincare section from the at-tractor as selected with the Slice control. Afterclicking Run on the toolbar, the program de-termines the chosen Poincare section and then

February 1, 2007

Page 17: Chaotic Pendulum - Department of Physicsdeserio/LabVIEW/Chaos/chaos.pdfpendulum system will be measured and an-alyzed. You will learn in your investigations ... Nonetheless, for small

Chaotic Pendulum CP 17

starts histogramming it. The histogrammingconsists of setting up a phase space grid anddetermining the number of measured phasepoints in each grid box. The overall phasespace area it will “grid up” is determined bythe minimum and maximum values of θ and ωfound in the data. Thus, you should autoscalethe graph of the Poincare section to make sureit does not contain any phase points far fromthe main attractor which would cause the pro-gram to cover an inappropriately large area.

The program repeatedly performs the his-togramming as it decreases the grid box size(increases the number of grid boxes). Thegrids are determined by the array labeled gridsize M. For each entry in this array, a phasespace grid is formed with M θ-intervals andrM ω-intervals, with the ω-factor (r) as givenin the control for this parameter (0.5 is the de-fault). Thus the first default grid (M = 10) isa 10× 5 grid and thus has 50 grid boxes. Thefinal M = 400 value produces a 400×200 gridof 80,000 boxes.

The Probability density shown below thePoincare section is an intensity graph with thez-value indicated by the color and is propor-tional to the number of phase points per unitarea in each grid box. Looking at this graph,you will see the grid size decrease as the pro-gram proceeds.

As each histogram is determined, the cellsoccupied N indicator displays the number ofgrid boxes in which at least one phase pointwas found. This data is plotted on a log N(ordinate) vs. log M (abscissa) plot. As de-scribed in the theory section, there are goodreasons why the value of N for the smallestand largest values of M may not behave asthe fractal scaling would predict. Use the cur-sors to select the starting and ending points ofan appropriate region to use in the fit to thestraight line. Then click on the compute slopebutton. The slope of this line is the capacity

dimension.

Besides the capacity dimension, two com-mon fractal dimensions are the informationdimension and correlation dimension. In allthree cases, the dimension is the slope of a fit-ted line with log M as the abscissa. For thecapacity dimension, each grid box contributes1 (if there is a phase point in it) or 0 (if itis empty), and the ordinate is the log of thesum of the contributions. For the informationdimension, each grid box contributes fi log fi,where fi is the fraction of the phase points inthe grid box i, and the graph ordinate is thesum of this quantity over all grid boxes. Forthe correlation dimension, each grid box con-tributes f 2

i , and the ordinate is the log of thesum of the contributions from all grid boxes.These other two dimensions can be selected bythe Dimension type control.

Lyapunov

The algorithm is described in the theory sec-tion and more fully in the Lyapunov Expo-nent Addendum on the laboratory web site.This program reads the data and makes a setof equally spaced Poincare sections as deter-mined by the Readings/rev control. (It al-ways uses slice 0 as the first Poincare section.)Ten sections (i.e., slices) have been found tobe enough. No check has been made for theminimum number of drive cycles needed, but40,000-50,000 is enough to get good results.Use more if you have them, but the computermay start to get bogged down if you try to usetoo many slices, or too many drive cycles.

The size of the ellipse for selecting δun

around each point un along the trajectory isdetermined by the θ-radius and ω-radius con-trols (θr and ωr in Eq. 32). They should beset to produce a near-circular area and be assmall as possible while big enough that thearea will nearly always have more than some

February 1, 2007

Page 18: Chaotic Pendulum - Department of Physicsdeserio/LabVIEW/Chaos/chaos.pdfpendulum system will be measured and an-alyzed. You will learn in your investigations ... Nonetheless, for small

CP 18 Advanced Physics Laboratory

minimum number of phase points in it. Theprogram ignores points on the trajectory withfewer available δu than the number set in theMin points control, ten by default. There mustbe at least six points for the six parameter(quadratically modified) fit of Eq. 33. Hav-ing more δu improves the precision of the fit-ting parameters, but the δu must not get toolarge. Points on the trajectory are also ig-nored if the fitted rms deviation exceeds theTolerance control value. Bad fits have notbeen a problem and you can leave the Tol-erance high to defeat this feature. With thedefault Order control setting (quadratic) thelocal fits are as described in the Lyapunov ex-ponent Appendix. Setting it to linear removesthe quadratic terms, and setting it to cubic orquartic adds additional terms to the local fitwhich should not generally be needed. If thehigher order fits (having more fitting param-eters) are used, the min points control wouldalso need to be increased.)

The operating mode can be set to station-ary, single step or iterate. Use stationary tocheck how the parameters effect the local fit.This mode does not move the calculation alongthe trajectory so you can try different settingsat the same trajectory point. The single stepand iterate modes do move the point along thetrajectory with the single step mode requir-ing that you push the step button for eachtrajectory point, while iterate mode continuesalong the trajectory without any user inter-vention until the step button is pressed a sec-ond time. Graphing at each point is slow butuseful when trying to learn what the programdoes. The iterations go faster if the graph up-dating is switched to off once you are ready todetermine the Lyapunov exponents.

The Lyapunov contributions λiτ, i = 1, 2—where τ is the time interval between slices—are displayed for each trajectory point un inthe bottom graph. Their sum (λ1+λ2)τ is also

displayed. Set the cursors over the region youwould like averaged. You should exclude thefirst 100 or so cycles of the calculation becausethe calculation is iterative and improves as theiterations go on. When you click on the aver-age exponents button, the mean and standarddeviation of values between the cursors are dis-played just below the button. The actual Lya-punov exponents are obtained from these aver-ages by dividing by τ , the time between slices.Thus, if you are using ten slices, multiply byten to get the Lyapunov exponents per drivecycle (a common way to express them). Fur-ther multiply by the drive frequency (in Hz)to get the exponent expressed per unit time asin this writeup.

Lyapunov Dot

This program simply shows a group of δu ina user selected region as they propagate overone or more cycles. Unlike the Lyapunov pro-gram, a new set of δu is not redetermined aftereach time step so you can see how a group ofphase points from one small region becomesdispersed throughout a Poincare section aftera certain number of cycles.

Simulate pendulum

This program uses a fourth order Runge-Kuttaalgorithm to solve Eq. 25. Because the pro-gramming environment makes it difficult touse Greek letters, x and v are substituted forθ and ω in this program. Also, the equationφ = Ω is not used. Instead, the term ε sin φin the equation for ω is simply replaced withε sin Ωt.

Clicking on the reset initial conditions buttoncauses the differential equation solver to beginthe next drive cycle (at t = 0, i.e., φ = 0) withx and v at the values specified in the X and Vcontrol just below it.

February 1, 2007

Page 19: Chaotic Pendulum - Department of Physicsdeserio/LabVIEW/Chaos/chaos.pdfpendulum system will be measured and an-alyzed. You will learn in your investigations ... Nonetheless, for small

Chaotic Pendulum CP 19

The points per drive cycle determines thetime step. The Runge-Kutta algorithm worksbest when the time step is neither too big nortoo small. Furthermore the points per drive cy-cle needs to have common divisors if equally-spaced Poincare sections will later need to besliced out. The default value of 40 works well.Graphing can be turned off, but for this pro-gram, does not significantly affect the runningtime.

Procedure

Adjusting the springs

The string should be wrapped two and a halftimes around the middle pulley. When thependulum mass is installed, the spring equilib-rium position should be set at the top center(12:00 position). To make it so, first removethe pendulum mass. I like to do this adjust-ment with the motor running so that frictionis less of a problem. Set the stepper motorshaft for about A = 1 cm and run the dataacquisition program (described below) at 0.5Hz. For coarse adjust, hold the aluminum diskand pull down on the string to the left or rightof the pulley. For fine adjust, loosen the lock-ing nut and turn the adjustment screw on thecross rod. Retighten the locking nut when fin-ished. When you are satisfied the tap hole isat 12:00, reinstall the pendulum mass.

Preliminary investigations

1. Remove the aluminum disk, determine itsmass and diameter and calculate its mo-ment of inertia. This is the major contri-bution to I0; the axle and pulley shouldcontribute an additional few percent.

2. Remove the brass pendulum mass andmeasure its mass m and its diameter. De-termine Im, the moment of inertia of the

pendulum mass about its axis. On thealuminum disk, measure the radius l tothe tap hole where the pendulum masswill be mounted. Determine the contribu-tion ml2 to the total moment of inertia.Make a rough estimate of the contribu-tion of the pulley and axle to the totalmoment of inertia.

3. Measure the diameter of the middle pul-ley and determine the radius r.

4. Use a spare spring and determine its forceconstant k.

With the pendulum mass removed, thereare a number of experiments that can be per-formed to learn about the physics of the drivenand undriven harmonic oscillator. The follow-ing step demonstrates the resonance responseof the linear oscillator so that it can be com-pared later with the response of a nonlinearoscillator.

5. Set up the apparatus for driven motionbut leave off the pendulum mass. Set thedamping magnet about 5 mm from thedisk and set the drive amplitude to about2.5 cm. Set the drive frequency to 0.2 Hzand start the Acquire Data program. Runthe Display I16 program and select thisdata set. Set the number of sections percycle to 100 and on the vs. t graphs checkonly the x data so only the angular posi-tion will be displayed when you click onthe update graphs button. Don’t worryabout the delta t control as you will bechanging the drive frequency repeatedly— so it won’t be accurate anyway. If youleave it at the default (1/200 = 0.005), alltimes will be in units of the drive periodand all frequencies will be in units of thedrive frequency.

February 1, 2007

Page 20: Chaotic Pendulum - Department of Physicsdeserio/LabVIEW/Chaos/chaos.pdfpendulum system will be measured and an-alyzed. You will learn in your investigations ... Nonetheless, for small

CP 20 Advanced Physics Laboratory

After the transients die out and the mo-tion settles on the steady state oscilla-tions with constant amplitude, turn realtime updating off (to hold the display),then set the cursors over the region ofconstant amplitude motion. Click on theupdate graphs button to get the x (reallyθ) vs. t graph. Use the horizontal cursorson this graph to determine the amplitudeof the motion in radians.

Turn the real time updating back on andgo back to the Acquire data program.Change the frequency to 0.25 Hz and clickon the change frequency button. As forthe previous data, wait for any transientsto die out and determine the amplitude ofthe motion. Continue measuring the am-plitude vs. frequency up to around 0.8 Hzor so in 0.05 Hz increments or smaller.As the frequency passes through the nat-ural resonance frequency of the oscillatorthe amplitude will rise to a maximum andthen decrease.

Make a table and graph of amplitudevs. frequency. Determine the frequencywhere the oscillation amplitude maxi-mizes and determine the FWHM (for thepeak amplitudes). Analyze your datawith respect to Eq. 22. Compare theresonance frequency with the predictedΩ0 based on values from the preliminarymeasurements and determine the damp-ing constant Γ. (This analysis improp-erly lumps the somewhat weaker effectsof axle friction together with the strongermagnetic damping into a single effectiveΓ.) How would the amplitude versus fre-quency graph change if the magnet wasmoved nearer or farther from the disk?

Nonlinear oscillations

6. Adjust the springs as described previ-ously (to get the tapped hole at the top)and install the pendulum mass in that toptapped hole. Don’t worry that it will fallto one side or the other when you let itgo. Retract the damping magnet, set thedrive shaft all the way in (for zero am-plitude motion), and turn off the steppermotor controller. Start taking data andthen set the disk into motion by handfor oscillations about one of the equilib-rium angles. Without stopping the dataacquisition, restart the pendulum for mo-tion about the opposite equilibrium an-gle. Look at the data with the Display I16program. Sketch the phase plots. Use thecursors to determine the low-amplituderesonance frequency and the angular sep-aration between the two stable equilib-rium points. Compare with predictions.

7. Move the damping magnet closer to thedisk—about 5 mm. Again look at oscil-lations with the drive off and sketch thephase plot. How does it change?

8. In this step you will measure the fre-quency response of the chaotic pendu-lum in a manner similar to that used forthe linear oscillator. These measurementsshould all be made with the pendulumoscillating around the equilibrium pointon one side only. Adjust the drive shaftfor A = 3 cm. Start with a frequency of1.1 Hz — again waiting for transients todie out and then analyzing for the ampli-tude of the motion using the Display I16program. Repeat for frequencies down to0.3 Hz again in 0.05 Hz increments. Makea table and graph of the amplitude vs. fre-quency.

February 1, 2007

Page 21: Chaotic Pendulum - Department of Physicsdeserio/LabVIEW/Chaos/chaos.pdfpendulum system will be measured and an-alyzed. You will learn in your investigations ... Nonetheless, for small

Chaotic Pendulum CP 21

9. Repeat the previous step starting at0.5 Hz and increasing the frequency up to1.1 Hz or so in steps of 0.05 Hz or smaller.Make a table of amplitude vs. frequencyand add it as a plot to the graph from theprevious step.

10. Discuss how the amplitude vs. frequencyfor the linear and nonlinear oscillators dif-fer. In particular, how does the nonlinearoscillator data show hysteresis? Can a lin-ear oscillator have hysteresis effects?

11. Set the frequency to 0.8 Hz, and startdata acquisition. At this frequency, youshould have obtained large amplitude mo-tion in Step 8 and small amplitude mo-tion in Step 9. Try different initial con-ditions checking which conditions lead tothe larger amplitude motion and whichlead to the smaller amplitude motion.Which of the two motions has higher en-ergy? Which has a bigger basin of attrac-tion? Finding complete basins of attrac-tion is not yet practical experimentally.Simply try as many initial conditions asneeded (checking which attractor the mo-tion ends on) to decide whether one basinof attraction is smaller, larger, or roughlythe same size as the other.

12. Set the drive amplitude to A = 3 cm andthe drive frequency to Ω = 0.5 Hz. Findall three steady state motions and sketchtheir θ-ω phase plots. Two are smallamplitude oscillations centered about theequilibrium angles θ = ±θe. The thirdis a large amplitude oscillation centeredabout θ = 0. (You will have to give thedisk a larger starting amplitude to get thismotion.) How many attractors does thissystem have? Discuss the energy of theoscillations and the basins of attraction.

Limit cycles, Fourier analysis

The periodic motions found above are calledperiod-1 limit cycles. They have Fourier powerspectra with peaks at the fundamental Ω andhigher harmonics (e.g., 2Ω, 3Ω, ...), but donot have any components below the funda-mental. Long-period limit cycles, which re-peat after two, three, or more (N) periods ofthe drive are also possible. You might try tofind these motions by playing with the drivefrequency, drive amplitude, and/or the damp-ing. A period-N limit cycle will have Fourierspectra with peaks at Ω/N , 2Ω/N , ... Peaks atsubharmonics of the drive frequency are char-acteristic of nonlinear oscillators. If you canfind a reliable way to get these motions, pleaselet me know. I have spent several hours try-ing to reproduce one without success. If youdo find one, save it and compare its Fourierspectrum with those of period-1 limit cycles.

Chaotic Vibrations

In this part of the experiment, you should tryto learn about some of the features of chaoticbehavior in nonlinear oscillators.

13. Retract the damping magnet. Set thedrive frequency to 0.825 Hz and the driveamplitude for A ≈ 6 cm. The motionshould be chaotic, but if it goes into alimit cycle, decrease the drive amplitudecloser to 5 or 5.5 cm. When you getchaotic motion, look at its Fourier spec-trum and compare with those for limit cy-cle behavior.

CHECKPOINT: Procedure should becompleted through the prior step.

14. Take an overnight run to obtain a strangeattractor for the chaotic pendulum. Re-peat with the damping magnet approx-imately 4 mm from the aluminum disk.

February 1, 2007

Page 22: Chaotic Pendulum - Department of Physicsdeserio/LabVIEW/Chaos/chaos.pdfpendulum system will be measured and an-alyzed. You will learn in your investigations ... Nonetheless, for small

CP 22 Advanced Physics Laboratory

Again, you may need to adjust the driveamplitude to get chaotic motion.

15. Analyze the two attractors for the systemparameters using Chaotic Pendulum Fit.The default settings should work fine—10Poincare sections each with 10,000 points.Discuss the parameters of the two fits.Did the damping parameters behave asexpected? How big was θ0, the springequilibrium angle? If it is larger than ex-pected, try to determine why.

16. Analyze a Poincare section or two fromeach of the two attractors to determinetheir capacity dimensions using the Boxcounting dimensions program.

17. Analyze the two attractors for their Lya-punov exponents using the Lyapunov pro-gram. The top two graphs show the groupuj (left) and uj+1 (right). The bottomgraph shows the local contributions foreach exponent (τλi, red and white dots)and their sum (white line). Setting thetwo cursors and clicking on the calcu-late Lyapunov exponents button will dis-play the average and standard deviationof these contributions for the points be-tween the cursors. To get the Lyapunovexponents, you must divide by τ . For ex-ample, if you use the default setting of10 readings/rev, you must divide by T/10(multiply by 10f) where T is the drive pe-riod (f is the drive frequency in Hertz).For Γ′ = 0, the local Lyapunov exponentsshould sum to −Γ everywhere. Comparethe sum of the Lyapunov exponents with−Γ, using Γ from the Chaotic PendulumFit. Compare the rms deviations of thelocal Lyapunov exponents with that oftheir sum. Explain why the latter is somuch smaller than former.

18. Simulate the system with the differential

equation solver Simulate pendulum pro-gram. Adjust the differential equationparameters and make simulations com-parable with real data sets. Analyzeand compare with your measured datafor Poincare sections, fractal dimensionand/or Lyapunov exponents.

February 1, 2007