Computer Assignment #4

Part 1 -- Equations of motion       Due Monday, April 12, 1999

We will be investigating the motion of the system described in problem 10.32 in the textbook. The first part of this assignment is to complete problem 10.32. Following are some hints to help you complete part 1:
 

                cos(theta_tilde+theta_e) = cos(theta_tilde)cos(theta_e)-sin(theta_tilde)sin(theta_e) Part 2 -- Simulation of the equations of motion     Due Monday, April 19, 1999

You should have already derived the two equations of motion for the bar-disk-spring system in homework problem 10.32. We will be using MATLAB to compare the solution to part (a) (the exact solution), and the solution to part (b) (the approximate solution at angles close to the equilibrium angle).

To start, show that the equilibrium angle theta_e is 0.5358 rad or 30.70o for the following parameter values: m = 2 kg, m_d = 4 kg, l = 1 m, k = 70 N/m.

Exact solution

Using MATLAB, write a program which will plot theta and theta_dot as a function of time. You should write a function file and a main program as you did in CA#1 and use ODE45. Since this is only a one-degree-of-freedom problem, assign the state variables as:

u(1) = theta
u(2) = theta_dot

Thus, your resulting u matrix will have only 2 columns instead of 4 columns as it did in CA#1. Use the parameter values given above.

Approximate solution

The approximate solution, given in part (b) of problem 10.32, is valid for angles close to the equilibrium angle. This equation of motion is simply a single-degree-of-freedom oscillator with no damping and no forcing. It is given in terms of theta_tilde, the difference between theta and the equilibrium angle theta_e. Write the expression of theta as a function of time if the initial conditions are

theta(0) = theta_0
theta_dot(0) = 0

(Remember, you should use the general solution

theta_tilde = A*sin(wn*t) + B*cos(wn*t)

and solve for A and B using the initial conditions).

Remember,

theta_tilde = theta - theta_e

so

theta = theta_tilde + theta_e

Add a few lines to your MATLAB code which will plot the approximate solution and its derivative with respect to time (i.e., theta and theta_dot). Do not use ODE45 to do this. You already have an expression for theta and you can find one for theta_dot  -- just use MATLAB to plot them.

Plots

Use your MATLAB program to plot the exact and approximate solutions of theta and theta_dot from 0 to 10 seconds in 0.05 second intervals. Overlay the two solutions of theta on the same plot. Do the same for the theta_dot solutions. Print three sets of plots--one for each of the following initial conditions:

  1. theta(0) = 15o (don't forget to convert to radians), theta_dot(0) = 0
  2. theta(0) = 30o, theta_dot(0) = 0
  3. theta(0) = 45o, theta_dot(0) = 0
Analysis
 
  1. For which set(s) of initial conditions do the exact and approximate solutions match closely? Why?
  2. For which set(s) of initial conditions do the exact and approximate solutions differ significantly? Why?
  3. What are the advantages and disadvantages of the exact solution?
  4. What are the advantages and disadvantages of the approximate solution?
  5. As an engineer, you will be asked to make judgements about the range of validity of approximate solutions. Suppose your boss wants you to use the approximate solution to make calculations for a physical system. For what range of initial angles would you say the approximate solution is valid? Justify your reasoning (simply exercising your program by trying a few different initial angles is fine).
Turn in your MATLAB code, your plots, any calculations you have made, and your answers to the above questions.