final present 0502
TRANSCRIPT
Marwan K. Abbadi
Advisor: Dr. Winfred Anakwa
OutlineOutline
• Introduction– Problem definition– Objectives
• Functional Description• System Block Diagram• System Identification• Control Algorithm • Software Implementation• Hardware Interface• Results• Conclusions• Future work
IntroductionIntroduction
• What are Magnetic levitation systems?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.
IntroductionIntroduction
• Problem definitionProblem 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 ObjectivesProject 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 DescriptionFunctional 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.
• OutputActual ball position
System Block DiagramSystem Block Diagram
In te l m icrcontro ller+
+
-
Set po int
R eferenceinput
E*(s)
D ig ita lC ontro ller
In terfaceC ircu itE (s)
Tszoh
InterfaceC ircu it
MagneticLevitation
SystemU (s)
Actual Ball position Y (s)
M aglev Front Panel
System IdentificationSystem 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 IdentificationSystem Identification
• Analytical model
There are two sets of equations that describe magnetic levitation systems.
1) Electrical:
Coil ResistanceR
Coil inductance= L
+e-
Input Voltage
Current= i
Photo-detectorCells
Photo-emitterCells
δtδx
xi
xLδtδi
LiRe200
Wheree = Coil input voltage R= Coil resistancei = Coil current L= Coil inductancet = Time L0= Nominal point inductance
x0= 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 IdentificationSystem Identification
2) Mechanical equation Using Newton 2nd law of motion:
2
xi
CgmEFGFF
Gravitation forceGF = m*g
Electromagnetic force
EF= C (i/x)2
WhereF= Resultant forcem= Mass of the steel ball= 0.021 Kgg= gravitational acceleration = 9.82 m/s2
C= Magnetic plant constant
System IdentificationSystem 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 x0=22.5 mm from electromagnet.
• Operating region= 18 27 mm from electromagnet.
• Magnetic plant constant, C= 1.477x10-4 N.m2.A-2
System IdentificationSystem 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.001x2 - 0.0761x + 298.12
R2 = 0.9958
295.5
296
296.5
297
297.5
298
298.5
1 3 5 7 9
11
13
15
17
19
21
23
25
27
29
31
33
35
37
39
Ball distance from the coil (mm)
Co
il In
du
cta
nce (
mH
)
Series2
Poly. (Series2)
System IdentificationSystem Identification
• Combining the previous equations:
)115.70)(114.29)(114.29(
0013.0)(
ssssGp analytical
System IdentificationSystem 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=x0=22.5 mm
• The reference input frequency was swept from 0 to 20 Hz.
System IdentificationSystem Identification
• The experimental model of the plant is: )15.30)(15.30(
60.1)(exp_
sssGp
System IdentificationSystem 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 IdentificationSystem Identification
• Frequency response data for controller from the manufacturer:
System IdentificationSystem Identification
• Controller from manufacturer:
• Approximating to a first order:
• Pole at -2827 rad/s and zero at -47 rad/s
2_
)14000
)(1900
(
115)(
ss
s
sG manc
)1900
(
115)(_
s
s
sG manc
System IdentificationSystem Identification
• SIMULINK vs. experimental system response to 0.6V step input
System IdentificationSystem Identification• Bode diagram of Gc_man(s)*Gp_exp(s)
PM=30.5 degrees
System IdentificationSystem Identification
• The analog controller from manufacturer was converted to discrete domain using bilinear (Tustin) transformation with Ts= 5 ms.
1
1
7521.01
7904.013.8)(
zz
zGc)1
900(
115)(_
s
s
sG manc
Software ImplementationSoftware 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 ImplementationSoftware 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.01
7904.013.8)(
zz
zGc3.8*
1410
1
1411
1)(
1
1
_
z
zzG emacc
Gain implemented in
hardware7857.014
11Note: 7143.0
14
10
Software ImplementationSoftware ImplementationIntializations
80515, Stack, Timer 0 interrrupt,
MAINTimer 0
- Sam ple A /D input C all C ontro ller P roduce via D /A
Update variablese(n), e(n-1), u(n-1)
Prepare E(n)- Set s ign b it if -ve- M ultip ly by coeffic ient
Prepare U(n-1)- Set s ign b it if -ve.- M ultip ly by coeffic ient
Prepare E(n-1)- Set s ign b it if -ve- M ultip ly by coeffic ient
M ultip lex operation 1
M ultip lex operation 2
Hardware InterfaceHardware 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 InterfaceHardware Interface
1Error signal E(t) = ±5V
2E1(t) = 0 ~ -5V
3E2(t) = 0 ~ +5V
Ready to be interfaced to the
EMAC
Error to A/D
Antialiasing filter
Antialiasing filter
EMACEMAC
Hardware InterfaceHardware Interface
D/A to Maglev
1D/A signal 0 ~ 5V
2Shifted signal -2.5 ~ 2.5V
3Control signal
U
Controller gain
maglevmaglev
ResultsResults
• 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.
ResultsResults
Stabilization of steel ball at the nominal equilibrium point
Ball position
Control signal
ResultsResults
Figure displaying the quantization effects
ResultsResults
ResultsResults
Tracking of sinusoidal reference input:
- The steel ball tracked reference sinusoidal and square waveform inputs.
ConclusionsConclusions
• 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 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.
ENDENDQuestions and answers
For more information: visit http://cegt201.bradley.edu/projects/proj2003/maglev/
Thank you