You are on page 1of 2

ME564/EE560/Aero550 - HW #4

Prof. Gillespie
Due October 10, 2015
1. Consider an inverted pendulum on a cart, as shown in the figure below. It can be shown that the
differential equations that govern the motion of this system are:
(m + M )
x + ml cos ml2 sin = F
(I + ml2 ) + ml
x cos mgl sin = 0,

(1)
(2)

where the parameters are defined in the figure below.


(a) Linearize these two differential equations around the operating point:
0 (t) = 0 (t) = 0,

x0 (t) = x 0 (t) = 0

What is the value of the input F0 (t) at this operating point?


(b) Put the linearized equations into state variable form, = A + BF using the state variable
T . Since the operating point was chosen to be 0, you may re-name x = x
definition = [x x ]
and so on.
(c) Write the output equations y = C for y = .

2. The robot shown in the figure above can be described by the following differential equations of motion.
Constant parameters m1 , m2 , I1 , I2 , l1 describe the mass distribution and geometric properties shown
in the figure and g is the gravitational constant. Coordinate values 1 and d2 are functions of time
(signals); the inputs are 1 and 2 .
(m1 l12 + I1 + I2 + m2 d22 )1 + 2m2 d2 1 d2 + (m1 l1 + m2 d2 )g cos 1 = 1
m2 d2 m2 d2 2 + m2 g sin 1 = 2
1

(3)
(4)

Linearize these two equations about the operating point:


1 = 1 = 0 d2 = 3 d2 = 0
What are the values of 1 and 2 at the operating point?
3. Use MATLAB and/or Simulink to compute the response of the linearized and nonlinear versions of the
robot equations from Problem 2 for t [0, 20]. Choose all physical parameters m1 = m2 = I1 = I2 =
l1 = 1 in appropriate units and use g = 0 (the robot moves in a horizontal plane, not a vertical plane).
Let the initial condition be the operating point: 1 (0) = 1 (0) = d2 (0) = 0 and d2 (0) = 3.
(a) Let the input be 1 (t) = 2 (t) = 0.01 sin t. Plot 1 (t) and d2 (t).
(b) Let the input be 1 (t) = 2 (t) = 0.1 sin t. Plot 1 (t) and d2 (t).
For both parts, use dash-dot lines for the linear solution and solid lines for the nonlinear solution. Also
use subplot to overlay both versions of 1 and both versions of d2 . Use appropriate titles and axis
labels. For example,
subplot(2,1,1);
plot(tn, theta1n1,-,t,theta1lin,-.);
subplot(2,1,2);
plot(tn,d2n1,-,t,d2lin,-.);

4. The Lotka-Volterra model is often used to describe the interactions between two species (predator and
prey) in an ecosystem. The number (or concentration) of predators (hunters, e.g. foxes) is h, and the
number (concentration) of prey (e.g. rabbits) is p. The predators die off at a rate M due to old age,
but increase at a rate proportional to the number of prey available to eat. The prey multiply at a rate
G (assuming sufficient food supply) but are eaten at a rate proportional to the number of predators.
The (nonlinear) model predicts that the populations will change over time according to the following
equation:
h = M h + Ahp
p = Gp Bhp
where M, A, G, B are positive constants.
(a) Find both equilibrium points ho , po .
(b) Linearize the differential equation about the nonzero
  equilibrium ho , po , and put the linearized
h
model into state-space form x = Ax where x =
.
p
(c) Let the output be the number of rabbits in the system, and consider an input as the number
of foxes (suppose you can add or subtract foxes). Write the input and output vectors in their
linearized forms.
(d) What are the poles of the system (eigenvalues of the A matrix)?
(e) Is the linearized system stable? Describe its behavior.
5. Use Matlab/Simulink to simulate both the linearized and the nonlinear Lotka-Volterra equations. Let
M = 10, A = 0.01, G = 10, B = 1. Turn in a plot with the predator population on the horizontal axis
and the prey population on the vertical axis (plot(h,p)) for an initial condition about 20% away from
the equilibrium you found in Problem 4a. Put your name in the title and label the axes appropriately.
How does the nonlinear behavior compare to the predicted behavior of the linearized system?

You might also like