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:
-
Because of the reaction forces and the fairly complex kinematics
of the problem, it is much easier to find the equation of motion given
in part (a) using conservation of energy rather than Newton's second law.
The main idea is to write an expression for the kinetic and potential energies
in terms of the angle theta, then write out the equation, T + V = constant,
and take the derivative of that equation with respect to time. The resulting
expression will be the equation of motion given in part (a). See example
10.2 for a similar problem.
-
For the expression of T, the kinetic energy, remember that
you will have rotational and translational energy for both the bar and
the disk.
-
For the expression of V, the potential energy, you should
have the height of the center of mass of the bar, and the energy stored
in the spring. Notice that the spring is unstretched when theta is zero.
Confirm to yourself that the stretch of the spring is given by L(1-cos(theta)).
-
Set up your T + V = constant equation. So far, this expression
should involve theta, theta_dot, velocity of the center of mass of the
bar, velocity of the center of mass of the disk, and theta_dot of the disk.
We want to relate these last three quantities to theta_dot itself, so that
the entire expression is in terms of theta and its derivatives. The easiest
way to do this is using instant centers.
-
Locate the instant center of the bar. Now locate the instant
center of the disk. What is the distance between the instant center of
the bar and the center of mass of the bar (hint: it is a very simple expression
which does not depend on theta)? Write an expression for the velocity of
the center of mass of the bar involving that distance and theta_dot (of
the bar). Now write an expression for the velocity of the end of the bar
which is attached to the disk in terms of the instant center of the bar,
and in terms of the instant center of the disk. Equate these two expressions.
This gives you the relation between theta_dot of the bar and theta_dot
of the disk.
-
Substitute your kinematic relations into your conservation
of energy equation. Now it should only involve theta, theta_dot, and some
constants. Now take the derivative of the equation with respect to time.
Don't forget to use the chain rule. This should result in the expression
given in part (a).
-
Now to tackle part (b): start by finding theta_e, the equilibrium
angle of the system. (Remember how to do this? Set all of the derivatives
of theta to zero, then solve for theta_e.)
-
Now define a new variable theta_tilde = theta - theta_e.
This is the deviation of the system from its equilibrium position. We want
to write the equation of motion in part (a) in terms of the new variable
theta_tilde. Do this by straight substitution; i.e., wherever you see theta,
replace it with theta_tilde + theta_e.
-
Now you will need to use trig identities to expand terms
like cos(theta_tilde + theta_e). For example,
cos(theta_tilde+theta_e) = cos(theta_tilde)cos(theta_e)-sin(theta_tilde)sin(theta_e)
-
After you have expanded all of the trig expresssions, use
the fact that we are looking at small deviations of the angle from equilibrium.
In other words, theta_tilde << 1, which means sin(theta_tilde) -->
theta_tilde, and cos(theta_tilde) --> 1. Also, because theta_tilde is small,
any nonlinear terms in theta_tilde can be neglected. Nonlinear terms are
any terms which multiply theta_tilde with itself or any of its derivatives.
So , for example, a term like theta_tilde^2 can be neglected. The process
described above is called linearization of the equation of motion.
We do it because it greatly simplifies the equation of motion and is valid
for a range of angles around the equilibrium angle.
-
After all of these simplifications have been made, you should
end up with the expression in part (b) of problem 10.32.
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:
-
theta(0) = 15o (don't forget to convert to radians),
theta_dot(0) = 0
-
theta(0) = 30o, theta_dot(0) = 0
-
theta(0) = 45o, theta_dot(0) = 0
Analysis
-
For which set(s) of initial conditions do the exact and approximate
solutions match closely? Why?
-
For which set(s) of initial conditions do the exact and approximate
solutions differ significantly? Why?
-
What are the advantages and disadvantages of the exact solution?
-
What are the advantages and disadvantages of the approximate
solution?
-
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.