Lab2

Transcription

Lab2
Univ. Javeriana, Department of Electrical Engineering and Computer Science
Lab 2
Feedback Systems
Due date: Abril 22th, 2015. 7:00 am
Objective
To learn how to use Mathematica to run systems analysis.
Pre-lab: The car and the pendulum
The car with an inverted pendulum, shown below, is “bumped” with an impulse force, F . It is assumed
that the motion takes place in a vertical plane. Let assume that
Figure 1: Car and the pendulum
- M mass of the car 0.5 kg
- m mass of the pendulum 0.2 kg
- b friction of the car 0.1N/m/sec
- l length to pendulum central 0.3 m
- I inertia of the pendulum 0.006 kg ∗ m2
- F force applied to the car
- x car position coordinate
- θ pendulum angle from vertical
The car and the pendulum are all assumed to be point masses, with the mass of the pendulum concentrated at the top. It is instructive, however, to consider how the equations would change if the masses of
the pendulum are uniformly distributed along the bars.
For the output y we take the 2-vector consisting of the horizontal positions of the car and of the mass at the
top of the pendulum. The purpose of this exercise is to develop and test a control law that holds the cart
at a particular position with the pendulum in upright position. We assume that the two components of the
output y are measured and that the force F is the control input. Our first order of business is to find the
dynamical relation between F and y.
The dynamic equations of this system are given by
¨
(M + m)¨
x + bx˙ + mlθcosθ
− mlθ˙2 sinθ = F
(I + ml2 )θ¨ + mglsinθ = −ml¨
xcosθ
Linearization
˙ Derive the input/state/output equations;
- Introduce as state variables q1 = x, q2 = θ, q3 = x,
˙ q4 = θ.
i.e., write the equations in the form
dy
= f (q; F ), y = h(x)
dx
- Prove that F ∗ = 0, x∗ = 0, θ∗ = 0 is an equilibrium solution. Explain physically that this is as
expected. Do you see other equilibrium?
- Linearize about the pendulums angle, θ = π (in other words, assume that pendulum does not move
more than a few degrees away from the vertical, chosen to be at an angle of π). Write the state space
model. Print the response of the linear version.
- Calculate the eigenvalues of A. Is the linearized system stable, asymptotically stable or unstable?
- Print both, the response of the linear and non-linear version. Based on your results from, is the linear
approximation a good approximation? Justify your answer.
Lab: Magnetically suspended ball model
To introduce the state space design method, we will use the magnetically suspended ball. The current
through the coils induces a magnetic force which can balance the force of gravity and cause the ball (which
is made of a magnetic material) to be suspended in midair. A diagram of this system is show bellow. 1
Figure 2: Magnetically Suspended Ball
Where h is the vertical position of the ball, i is the current through the electromagnet, V is the applied
voltage and
1 Taken
from http://www.library.cmu.edu/ctms/ctms/examples/
2
- The mass of the ball (M ): 0.05 Kg.
- Gravity (g): 9.81 m/sec2 .
- The inductance (L):0.01 H.
- The resistance (R):1 Ohm.
- The coefficient that determines the magnetic force exerted on the ball (K): 0.0001.
- V is the applied voltage and h is the vertical position of the ball.
The equations for the system are given by:
M
d2 h
Ki2
=
M
g
−
dt2
h
V =L
di
+ iR
dt
(1)
(2)
[1 point] Introduce state variables. Derive the input/state/output equations; i.e., write the equations
in the form
dx
= f (x; u), y = h(x)
dt
[1 point] Use the point h = 0.01m where the nominal current is about 7A to linearize and get the state
space equations.
[1 point] Write the state space model. Print the response of the linear version. Make a detailed
description of the input used, associating it to a real situation. Describe the behavior of the model.
[1 point] Print both, the response of the linear and non-linear version. Based on your results from, is
the linear approximation a good approximation? Justify your answer.
[1 point] How many equilibrium point does your model have? Determine the stability properties of
each point calculating the eigenvalues.
Note: Remember that the report must include:
- Mathematical Model (state space).
- Procedure.
- Answer to all questions.
- Send an email with the Notebook that you used.
- Conclusions.
- References.
3