20
MODELING AN INVERTED PENDULUM Eric Andersen Computational Physics

MODELING AN INVERTED PENDULUMjohnson/Education/Juniorlab/...Background Information The center of mass of an inverted pendulum is above its point of suspension. If this point is stationary,

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: MODELING AN INVERTED PENDULUMjohnson/Education/Juniorlab/...Background Information The center of mass of an inverted pendulum is above its point of suspension. If this point is stationary,

MODELING AN INVERTED PENDULUM

Eric AndersenComputational Physics

Page 2: MODELING AN INVERTED PENDULUMjohnson/Education/Juniorlab/...Background Information The center of mass of an inverted pendulum is above its point of suspension. If this point is stationary,

Background Information

The center of mass of an inverted pendulum is above its point of suspension.

If this point is stationary, the pendulum is unstable.

If this point is vibrated vertically with a high frequency, the pendulum may be stable.

High Frequency ~ 50 Hz

The pendulum can remain stable despite small disturbances.

Page 3: MODELING AN INVERTED PENDULUMjohnson/Education/Juniorlab/...Background Information The center of mass of an inverted pendulum is above its point of suspension. If this point is stationary,

Background Information

This stability is easily demonstrated using:A function generatorA PASCO “wave driver” or a speakerA small piece of drinking strawMasking tapeA support pin

Page 4: MODELING AN INVERTED PENDULUMjohnson/Education/Juniorlab/...Background Information The center of mass of an inverted pendulum is above its point of suspension. If this point is stationary,

Background Information

θ l

m

y t

An angular displacement +θ results in a positive torque, which provides a positive angular acceleration:

 

 

then,

But if the support point of the pendulum is oscillating vertically with a displacement,

 

Page 5: MODELING AN INVERTED PENDULUMjohnson/Education/Juniorlab/...Background Information The center of mass of an inverted pendulum is above its point of suspension. If this point is stationary,

Background Information

The torque,

averaged over one or more periods of rapid oscillation must become negative in order for the pendulum to be stable.

 

Page 6: MODELING AN INVERTED PENDULUMjohnson/Education/Juniorlab/...Background Information The center of mass of an inverted pendulum is above its point of suspension. If this point is stationary,

My Program

Uses an RK2 integration scheme to solve the differential equation on the previous slide.Initial values of θ and d θ/dt are chosen, then updated using:

 

 

 

Page 7: MODELING AN INVERTED PENDULUMjohnson/Education/Juniorlab/...Background Information The center of mass of an inverted pendulum is above its point of suspension. If this point is stationary,

My Program

and,

A time step of 0.001 is used.

 

 

 

Page 8: MODELING AN INVERTED PENDULUMjohnson/Education/Juniorlab/...Background Information The center of mass of an inverted pendulum is above its point of suspension. If this point is stationary,

My Program

A simulation was made using the following assumptions:

0.225m2

1.0g

Amplitude = 0.8mmFrequency = 50 Hz or 30 Hz

My simulations shows that the inverted pendulum remains stable at 50 Hz, but not at 30 Hz.

Page 9: MODELING AN INVERTED PENDULUMjohnson/Education/Juniorlab/...Background Information The center of mass of an inverted pendulum is above its point of suspension. If this point is stationary,

Results – 50Hz

Page 10: MODELING AN INVERTED PENDULUMjohnson/Education/Juniorlab/...Background Information The center of mass of an inverted pendulum is above its point of suspension. If this point is stationary,

Results – 50Hz

Page 11: MODELING AN INVERTED PENDULUMjohnson/Education/Juniorlab/...Background Information The center of mass of an inverted pendulum is above its point of suspension. If this point is stationary,

Results – 50Hz

Page 12: MODELING AN INVERTED PENDULUMjohnson/Education/Juniorlab/...Background Information The center of mass of an inverted pendulum is above its point of suspension. If this point is stationary,

Results – 50Hz

Page 13: MODELING AN INVERTED PENDULUMjohnson/Education/Juniorlab/...Background Information The center of mass of an inverted pendulum is above its point of suspension. If this point is stationary,

Results – 50Hz

Page 14: MODELING AN INVERTED PENDULUMjohnson/Education/Juniorlab/...Background Information The center of mass of an inverted pendulum is above its point of suspension. If this point is stationary,

Results – 30Hz

Page 15: MODELING AN INVERTED PENDULUMjohnson/Education/Juniorlab/...Background Information The center of mass of an inverted pendulum is above its point of suspension. If this point is stationary,

Results – 30Hz

Page 16: MODELING AN INVERTED PENDULUMjohnson/Education/Juniorlab/...Background Information The center of mass of an inverted pendulum is above its point of suspension. If this point is stationary,

Results – 30Hz

Page 17: MODELING AN INVERTED PENDULUMjohnson/Education/Juniorlab/...Background Information The center of mass of an inverted pendulum is above its point of suspension. If this point is stationary,

Results – 30Hz

Page 18: MODELING AN INVERTED PENDULUMjohnson/Education/Juniorlab/...Background Information The center of mass of an inverted pendulum is above its point of suspension. If this point is stationary,

Results – 30Hz

Page 19: MODELING AN INVERTED PENDULUMjohnson/Education/Juniorlab/...Background Information The center of mass of an inverted pendulum is above its point of suspension. If this point is stationary,

Future Considerations

Add the option to use square waves or triangular waves as the driving function, rather than only sinusoidal waves.

Develop a better way to record simulated footage.

Add complexity to the simulation.Compound Pendulums

Page 20: MODELING AN INVERTED PENDULUMjohnson/Education/Juniorlab/...Background Information The center of mass of an inverted pendulum is above its point of suspension. If this point is stationary,

Conclusions

Stability and frequency are very closely related.If the frequency is too low or too high the pendulum will oscillate wildly.

RK2 offers a blend of efficiency and simplicity.

VPython is incredibly useful for simple animations.