## 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
Blackboard.
In any case, the equation of motion of
the ball is
m

y

 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
(where
L( y)
is the position-dependent coil inductance) stored in the coil
by
(2)
2 (1 / )
( , )
( , )
2
2
0
a y a
L i
y
E y i
F y i

 

where
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
  
( )
dt
d Li
v Ri (3)
(1 / ) (1 / )
0
2
0
dt
di
y a
L i
y
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 http://www.fbk.com/pdfs/control/matlab.pdf
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
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
2
    
(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

where
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)
p
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.
G (s)
p
, design a linear compensator
G (s)
c
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
Place
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.
G (s)
c
in (7) to get a discrete compensator
G (z)
c
. 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.