Lab 11: Damped, driven pendulae
This lab will follow up from last weeks lab. Last week we simulated a pendulum and saw how it changes its motion as it is shortened, and then tried to make a schedule to shorten it without having it spin around. This time we are going to consider a pendulum with an explicit driving force. First, let us remind ourselves of the equations of motion that we used last time:

(undamped "just swinging" pendulum)   y'' = -(g / L) * sin(y),

("swinging" pendulum as length changes) y'' = -(g / L) * sin(y) - 2*(L'/L) * y';

So today we are going to ignore changes in the length of the pendulum (so we are going to build on the first of the above equations). Our first goal is to add a damping factor, or "friction" to our system. Friction is a force that acts opposite to the current velocity, so it is a term like:
y'' = -k * y'
where k is the coefficient of friction.

Task 1 Adjust your simulation from last week to include the "just swinging pendulum" with a friction term, using the differential equation:

y'' = -(g / L) * sin(y) - k * y',
  1. With this friction term, what should the final values of y, y', and y'' be?
  2. Run the simulation and see that you get the expected answer.
  3. What should the phase plots look like? Update your visualization code to show this phase plot as well. Use the "xlabel" and "ylabel" commands and make a plot of the phase space with the axes labelled.

Show the TA both your visualization of the pendulum swinging and your phase space plot for your first check-off.

Task 2 Now that we have a "damped" pendulum, we are going to work out a "damped, driven" pendulum. This requires that we add a "driving force", a force different than gravity that changes the position of the pendulum. This could be done in multiple ways; you could move the point that the pendulum is dangling from back and forth. But a simpler way is to imagine directly exerting a torque on the pendulum - imagine holding a (light?) pendulum between your fingertips and twisting it back and forth. If you twist it back and forth regularly, you are imposing an acceleration:

y'' = c * cos(2 * pi * f * t)
Where c is a constant describing how much force you are twisting with, and you are twisting back and forth "f" times per second. If we add this force in, we get:
y'' = -(g / L) * sin(y) - k * y' + c * cos(2 * pi * f * t)

This is the system we'd like to experiment with the rest of this lab.

  1. The following constants give interesting behaviors when the system is run as follows:
    ode45('dPenddT', [0:0.02:100], [0 1]);
    g = -9.8;
    k = 1;
    c = 10;
    f = 0.15;
    
  2. add some way to visualize the force being added to your pendulum.
  3. Slowly vary the initial conditions to find nearby condition that have very different phase space plots

Show several of these phase space plots and your way of visualizing the force to the TA to be checked off