Brianna Lynn's Project 4

Project 4

Partner: David Scherzinger

For this project, we used the Trapezoidal Method to solve ordinary differential equations to observe certain properties of a pendulum. We defined the pendulum in the code given from the book pend.m answered the computer problems 4-8 in chapter 6.3.

Step 4

We wanted to observe the properties of a damped, forced pendulum, so we edited pend.m by adding two more parameters,d for damping and A for the forcing parameter, to Step 4 and 5 code. For the first part of this step, we were to observe the trajectory of the pendulum with the damping set to d=1 and the forcing parameter set to A=10, with the step size: h=.005. Using various initial conditions, we found that the pendulums fell into one of two periodic trajectories. The first trajectory is a 2 3/4 turn oscillation that ends about 45 degrees to either side of the inverted vertical position. The second trajectory is approximately a 1/2 turn oscillation that ends at opposite horizontal positions after slowing down about 60 degrees from the downward vertical position.


The videos are shown with the h=.005 step size on the left and the h=.1 step size on the right.

With the initial position, y1=0, with the initial angular velocity, y2=0:

With the initial position, y1=π/4, with the initial angular velocity, y2=0:

With the initial position, y1=π/4, with the initial angular velocity, y2=-3:

With the initial position, y1=π/2, with the initial angular velocity, y2=0:

Starting the pendulum at the lower vertical position with zero velocity, at the rightward horizontal position with zero velocity, and at 45 degrees to the right of the downward horizontal position with a velocity of -3 radians/second produced the first trajectory. Starting the pendulum at 45 defrees to the right of the downward horizontal position with zero velocity produced the second trajectory.

We then increased the step size from h=.005 to h=.1. The results changed noticeably for the rightward starting position, which settled into the second trajectory fairly quickly instead of the first trajectory. The pendulum starting at 45 degrees with zero velocity also changed its trajectory by settling into the first. The other two starting conditions did not change their trajectories, but took longer to settle into them.

The changes can easily be explained by error accumulation. With a larger step size, each calculated step accrues more error, which is multiplied in each successive step.

Step 5

Using the same forced pendulum as in the previous step, Step 4 and 5 code, we know that with the forcing parameter A=12, there are two periodic attractors that are mirror images of each other. We had to find the initial conditions [a 0] and [b 0] where this happened when h=.005 such that |a-b|≤ 0.1. We found the initial conditions to be [.05 0] and [-.05 0].

The video of the pendulum where A=12 with the initial conditions [.05 0]:

The video of the pendulum where A=12 with the initial conditions [-.05 0]:

With the initial position of .05 radians, the pendulum eventually settles into a trajectory that begins at 45 degrees to the right of the downward horizontal, travels clockwise exactly 2 1/2 turns, then travels counter-clockwise exactly 3 1/2 turns. The initial position of -.05 settles into a trajectory that starts 45 degrees to the left of the downward horizontal and turns in the opposite directions.

Step 6

We edited pend.m again to build a damped pendulum with oscillating pivot to investigate the phenomenon of parametric resonance, by which the inverted pendulum becomes stable: Step 6 and 7 code The equation is: y''+dy'+(g/l+Acos2πt)siny=0. We set the damping to d=0.1 and the length of the pendulum to be l=2.5 meters. We needed to find the range of the forcing parameter A such that the inverted pendulum becomes stable. When A=0, the downward pendulum y=0 is at a stable equilibrium and the inverted pendulum y=π is an unstable equilibrium. Using the initial condition y=3.1, we found the range of A to be 18.4 ≤ A ≤ 25.7.

Smaller values of A will keep the pendulum mostly upright, while larger values will induce a wide, but stable resonance without having the pendulum ever travel under the horizontal.

Step 7

Using the parameters as in the previous step, Step 6 and 7 code, we found the smallest positive value for the forcing parameter A for which the stable equilibrium can become unstable with an oscillating pivot. We found the smallest A to be A = 14.3, with the initial condition y=.04 with the step size h=.01.

Some values above 14.3 result in non-resonant situations, or possibly take inordinate amounts of time to become unstable.

Step 8

We edited pend.m to build a double pendulum: Step 8 code. Running this function requires 4 initial conditions: position and velocity of each pendulum.

Brianna's Projects

Brianna's Homepage