You are on page 1of 35

Marwan K.

Abbadi
Advisor: Dr. Winfred Anakwa







Outline
Introduction
Problem definition
Objectives
Functional Description
System Block Diagram
System Identification
Control Algorithm
Software Implementation
Hardware Interface
Results
Conclusions
Future work









Introduction

What are Magnetic levitation systems?

Maglev. are devices that suspend
ferromagnetic materials with the aid of
electromagnetism. It has wide number
of applications such as high-speed
trains, aerospace shuttles, magnetic
bearings and high-precision platforms.










Introduction

Problem definition

Maglev. systems based on electromagnetic attraction
are characterized by non-linear and unstable open-loop
dynamics which suggests the need of stabilizing
controllers.









Project Objectives

Obtain a good model for the magnetic levitation system,
maglev model 33-210 from Feedback Inc. Limited.

Design and implement a microcontroller-based digital
controller to stabilize a 21 gram steel ball at a desired
vertical position. The overall system should track applied
reference input signals.







Functional Description
Inputs:
Set point (Constant 1.50 [V] ), corresponds to a distance of 22.5mm
between the ball and the electromagnet.
Reference signal (0.4 Vpp)
Disturbances such as power supply fluctuation, coil temperature
variations and external forces applied to the ball.

Output
Actual ball position









System Block Diagram
Intel micrcontroller
+
+
-
Set point
Reference
input
E*(s)
Digital
Controller
Interface
Circuit
E(s)
Ts
z
o
h
Interface
Circuit
Magnetic
Levitation
System
U(s)
Actual Ball position Y(s)
Maglev Front Panel







System Identification
Importance of modeling the system.

There are two approaches to identify the plant:

a) Analytical model- Using differential
equations.

b) Experimental model- Bode frequency
response data fitting.

To obtain a good model for the system, both models were
obtained for comparison.







System Identification
Analytical model
There are two sets of equations that
describe magnetic levitation
systems.
1) Electrical:





t
x
x
i
x L
t
i
L i R e
2
0 0
+ =
Where
e = Coil input voltage R= Coil resistance
i = Coil current L= Coil inductance
t = Time L
0
= Nominal point inductance
x
0
= Nominal point pos.



This is the general electrical circuit for
magnetic levitation systems.
However, this maglev. system is
driven by an active circuit for the coil
that adds further non-linearity since I
is a non-linear function of e.







System Identification
2) Mechanical equation
Using Newton 2
nd
law of
motion:
2
|
.
|

\
|
= =
x
i
C g m EF GF F


Gravitation force
GF = m*g
Electromagnetic force
EF= C (
i
/
x
)
2
Where
F= Resultant force
m= Mass of the steel ball= 0.021 Kg
g= gravitational acceleration = 9.82 m/s
2
C= Magnetic plant constant







System Identification
The previous equation contained non-linear
elements, so linearization is needed.

Taylor series expansion is used to approximate
the equations near the operating point of
x
0
=22.5 mm from electromagnet.

Operating region= 18 27 mm from
electromagnet.

Magnetic plant constant, C= 1.477x10
-4
N.m
2
.A
-2










System Identification
Coil inductance L was
approximated as a
constant = 296.74mH.

Sensor gain Ks was
determined to be
450.3 volts/meter.
Coil Inductance vs Ball Distance y = 0.001x
2
- 0.0761x + 298.12
R
2
= 0.9958
295.5
296
296.5
297
297.5
298
298.5
13579
1
1
1
3
1
5
1
7
1
9
2
1
2
3
2
5
2
7
2
9
3
1
3
3
3
5
3
7
3
9
Ball distance from the coil (mm)
C
o
i l I n
d
u
c
t
a
n
c
e
(
m
H
)
Series2
Poly. (Series2)







System Identification
Combining the previous equations:

) 1
15 . 70
)( 1
14 . 29
)( 1
14 . 29
(
0013 . 0
) (
+ +
=
s s s
s Gp
analytical







System Identification
The analog controller of the manufacturer
was connected to the plant to obtain
frequency response data.

The data was obtained at the nominal
operating point x=x
0
=22.5 mm

The reference input frequency was swept
from 0 to 20 Hz.








System Identification
The experimental
model of the plant is:

) 1
5 . 30
)( 1
5 . 30
(
60 . 1
) (
exp _
+
=
s s
s G
p







System Identification
The experimental model was used instead
of the analytical model, since the analytical
model did not account for the non-linearity
of the active coil driver.

The high-frequency pole at -70.15 rad/s
was omitted in the practical model
approximation.









System Identification
Frequency response data for controller from the
manufacturer:








System Identification
Controller from manufacturer:




Approximating to a first order:




Pole at -2827 rad/s and zero at -47 rad/s

2
_
) 1
4000
)( 1
900
(
1
15
) (
+ +
+
=
t t
t
s s
s
s G
man c
) 1
900
(
1
15
) (
_
+
+
=
t
t
s
s
s G
man c







System Identification
SIMULINK vs. experimental system response to
0.6V step input








System Identification
Bode diagram of G
c_man
(s)*G
p_exp
(s)










PM=30.5 degrees







System Identification
The analog controller from manufacturer was
converted to discrete domain using bilinear
(Tustin) transformation with Ts= 5 ms.



1
1
7521 . 0 1
7904 . 0 1
3 . 8 ) (



=
z
z
z G
c
) 1
900
(
1
15
) (
_
+
+
=
t
t
s
s
s G
man c







Software Implementation
The digital controller was implemented
using assembly language program on an
Intel-80515 microcontroller.

The software code:
Samples the error signal via the A/D.
Computes the control signal.
Sends the control signal to the plant via the
D/A.







Software Implementation
The 8051 microcontroller does not handle floating
point arithmetic.
The controller transfer function was approximated
for fixed point implementation.
The approximated transfer function:

1
1
7521 . 0 1
7904 . 0 1
3 . 8 ) (



=
z
z
z G
c
3 . 8 *
14
10
1
14
11
1
) (
1
1
_

+

=
z
z
z G
emac c
Gain
implemented in
hardware
7857 . 0
14
11
=
Note:
7143 . 0
14
10
=







Software Implementation
Intializations
80515, Stack, Timer 0 interrrupt,
MAIN
Timer 0
- Sample A/D input
Call Controller
Produce via D/A
Update variables
e(n), e(n-1), u(n-1)
Prepare E(n)
- Set sign bit if -ve
- Multiply by coefficient
Prepare U(n-1)
- Set sign bit if -ve.
- Multiply by coefficient
Prepare E(n-1)
- Set sign bit if -ve
- Multiply by coefficient
Multiplex operation 1
Multiplex operation 2







Hardware Interface
Hardware interface circuitry is needed to
level shift and scale the error to the range
of the microcontroller A/D.

Furthermore, the control signal generated
via the D/A must be readjusted back to the
full scale and multiplied by the controller
gain.







Hardware Interface
1
Error signal E(t) = 5V
2
E1(t) = 0 ~ -5V
3
E2(t) = 0 ~ +5V
Ready to be
interfaced to the
EMAC
Error to A/D
Antialiasing
filter
EMAC







Hardware Interface
D/A to Maglev
1
D/A signal 0 ~ 5V
2
Shifted signal -2.5 ~ 2.5V
3
Control signal
U
Controller gain
maglev







Results
The ball was stabilized at the equilibrium point
however it was oscillating due to:

Quantization errors of the 8-bit A/D and D/A.

Truncation errors of coefficients stated in controller
transfer function.

Computational truncation errors.









Results
Stabilization of steel ball at the nominal equilibrium point

Ball position
Control signal







Results
Figure displaying the quantization effects







Results







Results
Tracking of sinusoidal reference input:
- The steel ball tracked reference sinusoidal and
square waveform inputs.







Conclusions
Mathematical modeling of an unstable system is a challenging
control engineering problem. Some examples are inverted
pendulums and aerospace vehicles.

Implementation of controller algorithm on 8-bit microcontroller using
fixed point arithmetic generates quantization and truncation errors.

These errors, that depend on sampling period and controller gain,
cause small oscillations in system response.

The ball tracked reference input signals. Better tracking performance
can be achieved using higher resolution A/D and D/A, longer word-
length microcontroller and a higher order controller.








Future work
A user-friendly interface can be developed using
the keypad and LCD.

Possible user inputs include sampling period,
poles and zeroes locations, settling time etc.

Once implemented, the system will serve as a
good apparatus for teaching undergraduate
controls students the effect of varying different
parameters on overall system response.







END
Questions and answers


For more information: visit http://cegt201.bradley.edu/projects/proj2003/maglev/
Thank you

You might also like