The Physical Pendulum and the Onset of Chaosggilfoyl/compphys/slides/chaos... · The Physical...

Post on 14-Jul-2018

237 views 0 download

Transcript of The Physical Pendulum and the Onset of Chaosggilfoyl/compphys/slides/chaos... · The Physical...

The Physical Pendulum and the Onset of Chaos

Consider the uniform rod rotating about an endpoint in the figure. Starting from the definition ofthe torque ~τ = ~r × ~F ,

(1) derive the differential equation the angular posi-tion θ must satisfy.

(2) Derive a new differential equation if the pendu-lum is damped by a friction force ~Ff = −b~v whereb is some constant describing the the pendulum.

(3) Derive a final differential equation if the pen-dulum is now also driven by a force ~Fdrive =

FD sin(Ωt)θ.

(4) Generate an algorithm for the differential equa-tion from Part 3.

(5) What does the phase space look like for eachset of conditions if the initial conditions are θ0 = 25

and ω0 = 0 rad/s or θ0 = 24 and ω0 = 0 rad/s?

m

mgsin

θ

g

θ

O

C

mgcosθ

L

Chaos – p. 1/34

Getting Started - The Harmonic Oscillator

Hooke’s Law states that

Fs = −kx

where Fs is the restoring force ex-

erted by a spring and x is the dis-

placement from equilibrium where

there is no net force acting on the

mass. See example here.

1. What differential equation does x satisfy?

2. What is the solution?

3. How would you test the solution?

4. What is the physical meaning of the constants in the solution?

Chaos – p. 2/34

The Harmonic Oscillator - The Solution

The solution for Hooke’s Law is

x(t) = A cos(ωt + φ)

where x(t) is the displacement from equilibrium.

t0 1 2 3 4 5 6 7 8 9 10

x(t)

-1

-0.5

0

0.5

1

A Cosine Curve

Period

Amplitude

Phase

Chaos – p. 3/34

The Simple Harmonic Oscillator - An Example

A harmonic oscillator consists ofa block of mass m = 0.33 kgattached to a spring with springconstant k = 400 N/m. See thefigure below. At time t = 0.0 s theblock’s displacement from equi-librium and its velocity are y =0.100 m and v = −13.6 m/s. (1)Find the particular solution forthis oscillator. (2) Use a centeredderivative formula to generate analgorithm for solving the equationof motion.

Chaos – p. 4/34

The Pendulum - Stating the Problem

The simple pendulum is an example ofan oscillatory system where the restoringforce is provided by gravity. Consider thependulum shown in the figure.

1. What differential equation does θ

satisfy?

2. What differential equation does θ

satisfy for small angles?

3. What is the solution?

4. How would you test the solution?

5. What is the physical meaning of theconstants?

6. Redo Part 1 using torques.m

mgsin

mgcos θ

θ

θ

C

g

L O

Chaos – p. 5/34

The Simple Pendulum - The Solution

The solution for simple pendulum is

θ(t) = A cos(ωt + φ)

where θ(t) is the angular displacement from equilibrium.

t0 1 2 3 4 5 6 7 8 9 10

(t)

θ

-1

-0.5

0

0.5

1

Period

Amplitude

Phase

A Cosine Curve

Chaos – p. 6/34

Torque - Rotational Equivalent of Force

~F = m~a → ~τ = r ~F⊥

F

Chaos – p. 7/34

Linear → Rotational Quantities

Linear RotationalQuantity Connection Quantity

s s = rθ θ = s

r

vT vT = rω ω = vT

r= dθ

dt

aT aT = rα α = aT

r= dω

dt

KE = 1

2mv2 KER = 1

2Iω2

~F = m~a τ = rF⊥ ~τ = I~α

~p = m~v ~L = ~r × ~p ~L = I~ω

Chaos – p. 8/34

The Physical Pendulum and the Onset of Chaos

Consider the uniform rod rotating about an endpoint in the figure. Starting from the definition ofthe torque ~τ = ~r × ~F ,

(1) derive the differential equation the angular posi-tion θ must satisfy.

(2) Derive a new differential equation if the pendu-lum is damped by a friction force ~Ff = −b~v whereb is some constant describing the the pendulum.

(3) Derive a final differential equation if the pen-dulum is now also driven by a force ~Fdrive =

FD sin(Ωt)θ.

(4) Generate an algorithm for the differential equa-tion from Part 3.

(5) What does the phase space look like for eachset of conditions if the initial conditions are θ0 = 25

and ω0 = 0 rad/s or θ0 = 24 and ω0 = 0 rad/s?

m

mgsin

θ

g

θ

O

C

mgcosθ

L

Chaos – p. 9/34

Moments of Inertia

Chaos – p. 10/34

Nonlinear, Physical Pendulum Phase Space and Time Series

-0.4 -0.2 0.0 0.2 0.4

-0.4

-0.2

0.0

0.2

0.4

ΘHradL

ΩHr

adsL

Phase Space for Θ0=25oHredL, Θ0=24o

HblackL

0 5 10 15 20 25 30

-0.4

-0.2

0.0

0.2

0.4

tHsL

ΘHr

adL

Time Series for Θ0=25oHblueL, Θ0=24o

HgrayL

Chaos – p. 11/34

Nonlinear, Physical Pendulum Phase Space and Time Series

-0.4 -0.2 0.0 0.2 0.4

-0.4

-0.2

0.0

0.2

0.4

ΘHradL

ΩHr

adsL

Phase Space for Θ0=25oHredL, Θ0=24o

HblackL

0 5 10 15 20 25 30

-0.4

-0.2

0.0

0.2

0.4

tHsL

ΘHr

adL

Time Series for Θ0=25oHblueL, Θ0=24o

HgrayL

Chaos – p. 12/34

Nonlinear, Damped, Driven, Physical Pendulum Phase Space a ndTime Series

-10 -5 0 5 10 15

-2

-1

0

1

2

ΘHradL

ΩHr

adsL

Phase Space for Θ0=25oHredL, Θ0=24o

HblackL

0 20 40 60 80-10

-5

0

5

10

15

tHsL

ΘHr

adL

Time Series for Θ0=25oHblueL, Θ0=24o

HgrayL

Chaos – p. 13/34

Code for Nonlinear, Damped, Driven, Physical Pendulum

( * Initial conditions and parameters * )

th0 = 25.0 * Pi/180; ( * initial position in meters * )

w0 = 0.0; ( * initial velocity in m/s * )

t0 = 0.0; ( * initial time in seconds * )

grav = 9.8; ( * acceleration of gravity * )

length = 14.7; ( * length of pendulum * )

mass = 0.245; ( * mass of pendulum * )

( * driving force amplitude and friction force. See below for mo re * )

qDrag = 0.6; ( * drag coefficient * )

DriveForce = 11.8; ( * DriveForce = 11.8; cool plot value * )

DriveFreq = 0.67; ( * driving force angular frequency * )

DrivePeriod = 2 * Pi/DriveFreq; ( * period of the driving force * )

( * step size * )

step = 0.10;

Chaos – p. 14/34

Code for Nonlinear, Damped, Driven, Physical Pendulum

( * limits of the iterations. since we already have theta(t=0) a nd we

have calculated theta(t=step) then the first value in the ta ble will

be for t=2 * step. * )

tmin = 2 * step;

tmax = 80.0;

( * condense the constants into coefficients for the appropria te terms. * )

f1 = 1 + (3 * qDrag * step/(2 * mass* length));

f2 = 3 * DriveForce * (stepˆ2)/(2 * length);

f3 = -3 * grav * (stepˆ2)/(2 * length);

f4 = -1 + (3 * qDrag * step/(2 * mass* length));

( * set up the first two points. * )

t1 = t0 + step;

th1 = th0 + w0 * step;

( * get rid of the previous results for the table and proceed * )

Clear[pdispl]

Clear[tdispl]

Chaos – p. 15/34

Code for Nonlinear, Damped, Driven, Physical Pendulum

( * A centered second derivative formula is used to generate an i terative

solution for the mass on a spring. first load the starting poi n. * )

thmid = th0; ( * starting value of theta * )

thplus = th1; ( * second value of theta * )

tmid = t0;

( * create a table of ordered (theta,w). for each component the n ext value

is calculated and then the variables incremented for the nex t interation.

pdispl = th0, w0;

tdispl = t0, th0;

Do[thminus = thmid;

thmid = thplus;

tmid = tmid + step;

thplus = (f2 * Sin[DriveFreq * t] + 2 * thmid + f3 * Sin[thmid] +

f4 * thminus)/f1; wmid = (thplus - thminus)/(2 * step);

pdispl = Append[pdispl, thmid, wmid] ;

tdispl = Append[tdispl, tmid, thmid] ,

t, tmin, tmax, step

];

Chaos – p. 16/34

Chaos Lab 1 Results

0 10 20 30 40 50 60

-100

-80

-60

-40

-20

0

tim eHsL

ΘHr

adL

Tim e Series of the Physical Pendulum

Red - Θ0=25o

Blue - Θ0=24o

0 10 20 30 40 50 60

-150

-100

-50

0

tim eHsL

ΘHr

adL

Tim e Series of the Physical Pendulum

-100 -80 -60 -40 -20 0

-10

-5

0

5

10

ΘHrad L

ΩHr

adsL

Phase Space of the Physical Pendulum

Chaos – p. 17/34

Visualizing Chaos - The Phase Space Trajectory

-3 -2 -1 0 1 2 3

-2

-1

0

1

2

ΘHradL

ΩHr

adsL

θ0 = 10

Chaos – p. 18/34

Visualizing Chaos - Stroboscopic Pictures

Chaos – p. 19/34

Visualizing Chaos - Stroboscopic Pictures

3D Scatter Plot

0

20

40

60

t HsL

-100

10ΘHrad L

-2

-1

0

1

2

ΩHrad sL

Chaos – p. 20/34

Visualizing Chaos - The Poincare Section

-3 -2 -1 0 1 2 3

-2

-1

0

1

2

ΘHradL

ΩHr

adsL

θ0 = 10

Chaos – p. 21/34

Visualizing Chaos - The Poincare Section

-3 -2 -1 0 1 2 3

-2

-1

0

1

2

ΘHradL

ΩHr

adsL

θ0 = 10

Chaos – p. 22/34

Visualizing Chaos - The Poincare Section

-3 -2 -1 0 1 2 3

-2

-1

0

1

2

ΘHradL

ΩHr

adsL

θ0 = 10

Chaos – p. 23/34

Visualizing Chaos - The Poincare Section

-3 -2 -1 0 1 2 3

-2

-1

0

1

2

ΘHradL

ΩHr

adsL

θ0 = 10

Chaos – p. 24/34

Visualizing Chaos - The Poincare Section

-3 -2 -1 0 1 2 3

-2

-1

0

1

2

ΘHradL

ΩHr

adsL

θ0 = 10

Chaos – p. 25/34

Visualizing Chaos - The Poincare Section

-3 -2 -1 0 1 2 3

-2

-1

0

1

2

ΘHradL

ΩHr

adsL

θ0 = 10

Chaos – p. 26/34

Visualizing Chaos - The Time Series

0 10 000 20 000 30 000 40 000-400

-300

-200

-100

0

timeHsL

ΘHr

adL

Time Series of the Physical Pendulum

Chaos – p. 27/34

Calculating Chaos - The Poincare Series - 1

( * initial conditions and parameters * )

t0 = 0.0; x0 = 1.0; v0 = 0.2; step = 0.01;

( * get the second and third points on the curve * )

t1 = t0 + step;

x1 = x0 + step * v0;

x2 = 2 * x1 - x0 - (step * step * x1);

v1 = (x2 - x0)/(2 * step);

( * put the first point in the table * )

MyTable = x0, v0, x1, v1;

( * rename stuff for the first point of the algorithm * )

xminus = x0;

xmid = x1;

xplus = x2;

tmin = t1 + step;

tmax = 50.0;

Chaos – p. 28/34

Calculating Chaos - The Poincare Series - 2

( * Use a Do loop and store the points when t = n\[Pi]. A centered

formula is used to approximate the second derivative. Set pa rameters

needed to test when to store the data. * )

TimeTest = Pi;

PeriodCounter = 1;

( * main loop. * )

Do[xminus = xmid;

xmid = xplus;

xplus = 2 * xmid - xminus - (step * step * xmid);

vmid = (xplus - xminus)/(2 * step);

If[t > TimeTest,

MyTable = Append[MyTable, xmid, vmid];

PeriodCounter = PeriodCounter + 1;

TimeTest = PeriodCounter * 2* Pi

],

t, tmin, tmax, step

]

Chaos – p. 29/34

Harmonic Oscillator With Coupled Equations - 1

( * Solving the mass on a spring problem.

Initial conditions and parameters * )

x0 = 0.0; ( * initial position in meters * )

v0 = 2.0; ( * initial velocity in m/s * )

t0 = 0.0; ( * initial time in seconds * )

( * set up the first two points.

step size * )

step = 0.1;

t1 = t0 + step;

x1 = x0 + v0 * step;

v1 = v0 - ( step * kspring * x0/mass);

xminus = x0; ( * initial value of x * )

vminus = v0; ( * initial value of v * )

xmid = x1;

vmid = v1;

mass = 0.33; ( * the mass in kg * )

kspring = 0.5; ( * spring constant in N/m * )

Chaos – p. 30/34

Harmonic Oscillator With Coupled Equations - 2

( * limits of the iterations. since we already have y(t=0) and we

have calculated y(t=step), then the first value in the table

will be for t=2 * step. * )

tmin = 2 * step;

tmax = 25.0;

( * create a table of ordered (t,x). for each component the next v alue is

calculated and then variables are incremented for the next i nteration.

tpos = Table[

t,

vplus = vminus - (2 * step * kspring/mass) * xmid;

xplus = xminus + (2 * step * vmid);

vminus = vmid;

vmid = vplus;

xminus = xmid;

xmid = xplus

,

t, tmin, tmax, step

];

Chaos – p. 31/34

Chaos Lab 2 Results

-3 -2 -1 0 1 2 3-20

-15

-10

-5

0

5

10

15

ΘHradL

ΩHr

adsL

Θ0 = 25 deg, Shift=0., tm ax=1000. s

3 2 1 0 1 2 30

5

0

5

0

5

0

5

H dL3 2 1 0 1 2 3

0

5

0

5

0

5

0

5

H dL

1 0 1 2 3 40

5

0

5

0

5

0

H dL1 0 1 2 3 4

0

5

0

5

0

5

0

H dL

Chaos – p. 32/34

Chaos Lab 2 Results

-3 -2 -1 0 1 2 3-20

-15

-10

-5

0

5

10

15

ΘHradL

ΩHr

adsL

Θ0 = 25 deg, Shift=0., tm ax=1000. s

-3 -2 -1 0 1 2 3-20

-15

-10

-5

0

5

10

15

ΘHradL

ΩHr

adsL

Θ0 = 25 deg, Shift=0., tm ax=10000. s

3 2 1 0 1 2 30

5

0

5

0

5

0

5

H dL

1 0 1 2 3 40

5

0

5

0

5

0

H dL1 0 1 2 3 4

0

5

0

5

0

5

0

H dL

Chaos – p. 32/34

Chaos Lab 2 Results

-3 -2 -1 0 1 2 3-20

-15

-10

-5

0

5

10

15

ΘHradL

ΩHr

adsL

Θ0 = 25 deg, Shift=0., tm ax=1000. s

-3 -2 -1 0 1 2 3-20

-15

-10

-5

0

5

10

15

ΘHradL

ΩHr

adsL

Θ0 = 25 deg, Shift=0., tm ax=10000. s

-3 -2 -1 0 1 2 3-20

-15

-10

-5

0

5

10

15

ΘHradL

ΩHr

adsL

Θ0 = 25 deg, Shift=0., tm ax=15000. s

1 0 1 2 3 40

5

0

5

0

5

0

H dL1 0 1 2 3 4

0

5

0

5

0

5

0

H dL

Chaos – p. 32/34

Chaos Lab 2 Results

-3 -2 -1 0 1 2 3-20

-15

-10

-5

0

5

10

15

ΘHradL

ΩHr

adsL

Θ0 = 25 deg, Shift=0., tm ax=1000. s

-3 -2 -1 0 1 2 3-20

-15

-10

-5

0

5

10

15

ΘHradL

ΩHr

adsL

Θ0 = 25 deg, Shift=0., tm ax=10000. s

-3 -2 -1 0 1 2 3-20

-15

-10

-5

0

5

10

15

ΘHradL

ΩHr

adsL

Θ0 = 25 deg, Shift=0., tm ax=15000. s

-0.01 0.00 0.01 0.02 0.03 0.041.280

1.285

1.290

1.295

1.300

1.305

1.310

ΘHradL

ΩHr

adsL

Θ0 = 25 deg, Shift=0., tm ax=10000. s

1 0 1 2 3 40

5

0

5

0

5

0

H dL

Chaos – p. 32/34

Chaos Lab 2 Results

-3 -2 -1 0 1 2 3-20

-15

-10

-5

0

5

10

15

ΘHradL

ΩHr

adsL

Θ0 = 25 deg, Shift=0., tm ax=1000. s

-3 -2 -1 0 1 2 3-20

-15

-10

-5

0

5

10

15

ΘHradL

ΩHr

adsL

Θ0 = 25 deg, Shift=0., tm ax=10000. s

-3 -2 -1 0 1 2 3-20

-15

-10

-5

0

5

10

15

ΘHradL

ΩHr

adsL

Θ0 = 25 deg, Shift=0., tm ax=15000. s

-0.01 0.00 0.01 0.02 0.03 0.041.280

1.285

1.290

1.295

1.300

1.305

1.310

ΘHradL

ΩHr

adsL

Θ0 = 25 deg, Shift=0., tm ax=10000. s

-0.01 0.00 0.01 0.02 0.03 0.041.280

1.285

1.290

1.295

1.300

1.305

1.310

ΘHradL

ΩHr

adsL

Θ0 = 55 deg, Shift=0., tm ax=10000. s

Chaos – p. 32/34

Chaos Lab 2 Results

-3 -2 -1 0 1 2 3-20

-15

-10

-5

0

5

10

15

ΘHradL

ΩHr

adsL

Θ0 = 25 deg, Shift=0.25, tm ax=10000. s

5 0 5 0 50

5

0

5

0

H dL

0 2 4 6 8 00

1

2

3

4

5

H dL0 0 0 0 0 0

0

0

0

0

HsL

Chaos – p. 33/34

Chaos Lab 2 Results

-3 -2 -1 0 1 2 3-20

-15

-10

-5

0

5

10

15

ΘHradL

ΩHr

adsL

Θ0 = 25 deg, Shift=0.25, tm ax=10000. s

0.95 1.00 1.05 1.10 1.15-0.10

-0.05

0.00

0.05

0.10

ΘHradL

ΩHr

adsL

Θ0 = 25 deg, Shift=0.25, tm ax=10000. s

0 2 4 6 8 00

1

2

3

4

5

H dL0 0 0 0 0 0

0

0

0

0

HsL

Chaos – p. 33/34

Chaos Lab 2 Results

-3 -2 -1 0 1 2 3-20

-15

-10

-5

0

5

10

15

ΘHradL

ΩHr

adsL

Θ0 = 25 deg, Shift=0.25, tm ax=10000. s

0.95 1.00 1.05 1.10 1.15-0.10

-0.05

0.00

0.05

0.10

ΘHradL

ΩHr

adsL

Θ0 = 25 deg, Shift=0.25, tm ax=10000. s

1.060 1.062 1.064 1.066 1.068 1.0700.000

0.001

0.002

0.003

0.004

0.005

ΘHradL

ΩHr

adsL

Θ0 = 25 deg, Shift=0.25, tm ax=10000. s

0 0 0 0 0 0

0

0

0

0

HsL

Chaos – p. 33/34

Chaos Lab 2 Results

-3 -2 -1 0 1 2 3-20

-15

-10

-5

0

5

10

15

ΘHradL

ΩHr

adsL

Θ0 = 25 deg, Shift=0.25, tm ax=10000. s

0.95 1.00 1.05 1.10 1.15-0.10

-0.05

0.00

0.05

0.10

ΘHradL

ΩHr

adsL

Θ0 = 25 deg, Shift=0.25, tm ax=10000. s

1.060 1.062 1.064 1.066 1.068 1.0700.000

0.001

0.002

0.003

0.004

0.005

ΘHradL

ΩHr

adsL

Θ0 = 25 deg, Shift=0.25, tm ax=10000. s

0 2000 4000 6000 8000 10 000

-1500

-1000

-500

0

tim eHsL

ΘHr

adL

Θ0 = 25 deg, Shift=0.25, tm ax=10000. s

Chaos – p. 33/34

Chaos Lab 2 Results

-3 -2 -1 0 1 2 3-20

-15

-10

-5

0

5

10

15

ΘHradL

ΩHr

adsL

Θ0 = 25 deg, Shift=0.05, tm ax=1000. s

3 2 1 0 1 2 30

5

0

5

0

5

0

5

H dL3 2 1 0 1 2 3

0

5

0

5

0

5

0

5

H dL

4 6 8 0 2 44

5

6

7

8

9

0

H dL4 6 8 0 2 4

4

5

6

7

8

9

0

H dL

Chaos – p. 34/34

Chaos Lab 2 Results

-3 -2 -1 0 1 2 3-20

-15

-10

-5

0

5

10

15

ΘHradL

ΩHr

adsL

Θ0 = 25 deg, Shift=0.05, tm ax=1000. s

-3 -2 -1 0 1 2 3-20

-15

-10

-5

0

5

10

15

ΘHradL

ΩHr

adsL

Θ0 = 25 deg, Shift=0.05, tm ax=10000. s

3 2 1 0 1 2 30

5

0

5

0

5

0

5

H dL

4 6 8 0 2 44

5

6

7

8

9

0

H dL4 6 8 0 2 4

4

5

6

7

8

9

0

H dL

Chaos – p. 34/34

Chaos Lab 2 Results

-3 -2 -1 0 1 2 3-20

-15

-10

-5

0

5

10

15

ΘHradL

ΩHr

adsL

Θ0 = 25 deg, Shift=0.05, tm ax=1000. s

-3 -2 -1 0 1 2 3-20

-15

-10

-5

0

5

10

15

ΘHradL

ΩHr

adsL

Θ0 = 25 deg, Shift=0.05, tm ax=10000. s

-3 -2 -1 0 1 2 3-20

-15

-10

-5

0

5

10

15

ΘHradL

ΩHr

adsL

Θ0 = 25 deg, Shift=0.05, tm ax=15000. s

4 6 8 0 2 44

5

6

7

8

9

0

H dL4 6 8 0 2 4

4

5

6

7

8

9

0

H dL

Chaos – p. 34/34

Chaos Lab 2 Results

-3 -2 -1 0 1 2 3-20

-15

-10

-5

0

5

10

15

ΘHradL

ΩHr

adsL

Θ0 = 25 deg, Shift=0.05, tm ax=1000. s

-3 -2 -1 0 1 2 3-20

-15

-10

-5

0

5

10

15

ΘHradL

ΩHr

adsL

Θ0 = 25 deg, Shift=0.05, tm ax=10000. s

-3 -2 -1 0 1 2 3-20

-15

-10

-5

0

5

10

15

ΘHradL

ΩHr

adsL

Θ0 = 25 deg, Shift=0.05, tm ax=15000. s

0.44 0.46 0.48 0.50 0.52 0.541.04

1.05

1.06

1.07

1.08

1.09

1.10

ΘHradL

ΩHr

adsL

Θ0 = 25 deg, Shift=0.05, tm ax=10000. s

4 6 8 0 2 44

5

6

7

8

9

0

H dL

Chaos – p. 34/34

Chaos Lab 2 Results

-3 -2 -1 0 1 2 3-20

-15

-10

-5

0

5

10

15

ΘHradL

ΩHr

adsL

Θ0 = 25 deg, Shift=0.05, tm ax=1000. s

-3 -2 -1 0 1 2 3-20

-15

-10

-5

0

5

10

15

ΘHradL

ΩHr

adsL

Θ0 = 25 deg, Shift=0.05, tm ax=10000. s

-3 -2 -1 0 1 2 3-20

-15

-10

-5

0

5

10

15

ΘHradL

ΩHr

adsL

Θ0 = 25 deg, Shift=0.05, tm ax=15000. s

0.44 0.46 0.48 0.50 0.52 0.541.04

1.05

1.06

1.07

1.08

1.09

1.10

ΘHradL

ΩHr

adsL

Θ0 = 25 deg, Shift=0.05, tm ax=10000. s

0.44 0.46 0.48 0.50 0.52 0.541.04

1.05

1.06

1.07

1.08

1.09

1.10

ΘHradL

ΩHr

adsL

Θ0 = 55 deg, Shift=0.05, tm ax=10000. s

Chaos – p. 34/34