EE420: electrical engineering

The purpose of this project is that you learn to tackle a fairly challenging/realistic control
design problem. The project is to be an individual effort.
Problem description
The figure on the right1
shows a
simplified version of a magnetic
levitation system that can be built in a
laboratory, where a ball of magnetic
material is suspended by means of an
electromagnet whose current is
controlled by feedback from the
optically measured ball position. To
quote the excellent reference [1], “this
system has the basic ingredients of
systems constructed to levitate mass,
used in gyroscopes, accelerometers, and
fast trains”.
Several such examples are given in
many technical references, some of
which I have listed and are posted on
In any case, the equation of motion of
the ball is


 ky

 mg  F( y,i) (1)
where m is the mass of the ball, y  0 is the vertical (downward) position of the ball measured
from a reference point (y = 0 when the ball is next to the coil), k is a viscous friction
coefficient, g is the gravitational acceleration constant, and F(y,i) is the force generated by
the electromagnet, i  0 being the coil current. The force
F( y,i)
is related to the energy
( , ) ( ) / 2
2 E y i  L y i
L( y)
is the position-dependent coil inductance) stored in the coil
2 (1 / )
( , )
( , )
a y a
L i
E y i
F y i

 

L , a 0
are positive constants. This completes the system model if one controls the
position by manipulating the coil current directly. The equations for controlling the ball
position by varying the coil voltage v include the additional equation
  
( )
d Li
v Ri (3)
(1 / ) (1 / )
y a
L i
a y a
L i
Ri 

  , but this makes the problem harder (you can try this
if you want!), and so we will stick to designing the current and not the voltage.

1 This image extracted from
Control objective
1. It is desired to balance the ball at a certain position r > 0. Based on a linearized model
of the nonlinear plant, design a compensator Gc(s), the input to which is the error
e = r – y, and whose output is the coil current i, such that the specifications shown
below are all satisfied:
(i) When the parameters of the system are exactly known, the steady-state error
for a constant r must be ≤ 5%. You must not include an integrator as part of
your controller. You are free to choose any configuration, lead, lag, lead-lag,
feedforward, non-unity gain, whatever you wish, except that the system must
not be type 1.
(ii) Redesign your controller in the above part to meet the same specifications
even when the parameters are perturbed from their nominal values. In this
case, design the controller as an integral controller.
Numerical values for the parameters are as specified (taken from [1]):
m 0.1kg, k 0.001N / m /s, g 9.81m /s ,a 0.05, L0 0.01H
    
Tasks to be completed
(1) Find the steady-state value Iss of the current required to balance the ball at an arbitrary
desired equilibrium point y = r > 0.
(2) Linearize the nonlinear equations specified in the “problem description” section about
the desired operating point to obtain the linearized model
( )
( )
( )
i s
y s
G s p

ss y (t)  y(t)  r,i (t)  i(t)  I
 
denote the deviations of the position and current
respectively about their desired equilibrium values. Since the point
( , 0, )
ss y  r y

 i  I
is an equilibrium point, if we start there, we will stay there for ever (that’s what it means
to be an equilibrium point). Show that this equilibrium point in unstable, i.e., there are
poles of
G (s)
in the right-half complex s-plane. What this physically means is that if
the ball were moved by an infinitesimally small value from its equilibrium position (or
equivalently, if the current changed slightly from its equilibrium value), the ball will
move away from its equilibrium position. This is what necessitates the use of a
compensator, we want to “stabilize” this equilibrium point, along with possibly meeting
some nice (transient and steady-state) performance specifications.
(3) For your linearized plant
G (s)
, design a linear compensator
G (s)
to regulate the value
of the output to y = r = 0.05m.
A very important observation is that your linear compensator deals with the deviations
from the equilibrium values !! In other words, you are not designing the current i, but
the current
( ) .
ss i t  i  I

Do not use integral control!
Perform simulations in simulink with your compensator design to verify that the
specifications have been satisfied. Only your compensator should be linear, the plant
should be the nonlinear, in other words, you must design for a linear system, but
evaluate your controller’s performance on the nonlinear system. Plots should
indicate that the responses of the various signals are satisfactory.
(4) How far up from the equilibrium point can you move the ball (i.e, you will have to
specify an initial condition for the ball’s position, and its velocity, when you simulate the
system in simulink) and still return to the equilibrium position ? How far down ? If the
system were truly linear, what would these values be ?
(5) Using simulation, study the effect of perturbations of the mass m on your controller.
Using simulation, determine by how much you can change the mass and still have the
steady-state specs of SSE ≤ 5% met. Note that only the plant changes, the controller is
still the same (i.e., the one you designed for m = 0.1 kg).
(6) The previous part shows that when the parameters are perturbed, there is a steady-state
error. Redesign your control using integral control (PID) to get rid of the steady-state
error. Now by simulation, study the effect of mass perturbations on your controller.
(7) In none of the previous simulations did we impose realistic constraints on the control
magnitude. Suppose now that the control magnitude is limited to
| | 15 . i  I max
 A
a limiter in your simulink model, and compare your results in steps (3) – (6) with what
you get when the control is saturated, i.e., whether or not the range of values by which
you can move the ball from the equilibrium position and/or the range of perturbations
has decreased. This will be the case if the transient performance specs you chose were
unrealistic, i.e., required a large control effort to meet the specs. Then, in the presence of
constraints on the control magnitude, your performance, as expected, should suffer.
(8) Discretize your compensator
G (s)
in (7) to get a discrete compensator
G (z)
. Choose
the sampling period T sufficiently small. The input to the discrete compensator must be
sampled, and the output of the compensator must be “held”, using a (zero-order hold)
ZOH. Only the compensator must be discretized, the control must still be applied to the
continuous-time nonlinear plant. Simulate the behavior of the closed-loop system, and
comment on the performance. How does the choice of sampling rate affect the
performance of the controller?
(9) (If time permits and for extra credit)
Look up papers/texts in the literature (for example [1,3]) on what nonlinear control
methods have been used (these are all based on the state-space approach, because there
is no transfer function if the system is nonlinear) in the control of magnetic levitation.
Can you at least simulate such a controller in simulink ?
You are expected to submit a typed report summarizing your work. You can use any
word processing system that you like. Typesetting systems such as LaTeX are especially
recommended. The lengths of the reports may vary, but I am expecting that you will
need at least 10 pages including simulink screenshots/plots and/or any matlab code.
Some components that your report should contain are:
(1) Abstract: This is an overview of the report, a miniature version of 50 words or so.
Someone reading the abstract should get a good idea of the problem tackled, what types of
techniques were used to solve it, and what sort of solution was found.
(2) Problem description: Present the problem you are attempting to solve. Give some
background. Explain why it is important or interesting.
(3) Solution of the problem: What techniques did you use to solve the problem? Did you use
a technique that we haven’t discussed in class? Explain in detail.
(4) Conclusions: Are the results reasonable? Can you improve the solution technique so as to
yield better results ? If so, explain.

Powered by WordPress