Vous êtes sur la page 1sur 23

Mechatronics

Magnetic Levitation System


K. Craig
1
Mechatronics
Magnetic Levitation System
Dynamic System Investigation
Kevin Craig
Rensselaer Polytechnic Institute
Mechatronics
Magnetic Levitation System
K. Craig
2
Electromagnet
Infrared LED
Phototransistor
Levitated Ball
Magnetic Levitation System A Genuine Mechatronic System
Mechatronics
Magnetic Levitation System
K. Craig
3
Overall Objective
The objective of this exercise is to build and test
a one-degree-of-freedom magnetic levitation
device, i.e., a device to keep a ferromagnetic
object suspended, without contact, beneath an
electromagnet, and perform a complete dynamic
system investigation.
By measuring the location of the object using a
non-contact sensor, and adjusting the current in
the electromagnet based on this measurement,
the levitated object can be maintained at a
predetermined location.
Mechatronics
Magnetic Levitation System
K. Craig
4
Dynamic System Investigation
Physical
System
Experimental
Analysis
Comparison
Mathematical
Analysis
Mathematical
Model
Physical
Model
Design
Changes
Parameter
Identification
Mechatronics
Magnetic Levitation System
K. Craig
5
This system is both inherently nonlinear and
open-loop unstable.
Steps for a Dynamic System Investigation
Physical System Description
Physical Modeling (Truth Model vs. Design Model)
Model Parameter Identification
Mathematical Modeling
Dynamic System Behavior Prediction
Experiments to Validate Analytical Model
Feedback Control System Design and Implementation
Testing to Evaluate System Performance
Determine Design Improvements
Mechatronics
Magnetic Levitation System
K. Craig
6
Required Background
Electromechanics: Elementary Electromagnet
Linearization of Nonlinear Physical Effects
Electronic Components
Resistor, Capacitor, Inductor
Electrical Impedance & Analogies
Potentiometer and Voltage Divider
Op-Amp Basics + Buffer, Summer, Difference, Inverting
Active Lead / Lag Controller
Diode and Light-Emitting Diode (LED)
Transistor: npn BJT, pnp BJT, Phototransistor
Mechatronics
Magnetic Levitation System
K. Craig
7
Physical System Description
The Magnetic Levitation System consists of the
following subsystems:
Electromagnet Actuator mounted in a stand
Ball-position Sensor: Infrared LED and
Phototransistor, positioned in the stand
Analog Circuitry on a breadboard
Lead Controller (analog implementation)
Current Amplifier
Assorted op-amps, resistors, capacitors, potentiometers, and
diodes for controller implementation, sensor adjustment,
buffering, gain adjustment, summing, and inverting.
Mechatronics
Magnetic Levitation System
K. Craig
8
Required Power Supplies include:
15 volts for op-amps
+ 15 volts for electromagnet and phototransistor
+ 15 volts for command and bias voltage generation
+ 5 volts for infrared LED
Current requirements: 300 mA maximum
Microcontroller for Digital Control
Implementation
Blue Earth Micro 485
Microprocessor: Intel 8051 - 12 MHz
Digital I/O: 27 bi-directional TTL-compatible pins
Analog Inputs: 4 12-bit, 0-5 V, A/D converter channels
Serial Communication: RS 232
128K battery-backed RAM; 32K ROM
Mechatronics
Magnetic Levitation System
K. Craig
9
Electromagnet
Infrared LED
Phototransistor
V
sensor
= 5.44 V
At Equilibrium
Levitated Ball
m = 0.008 kg
r = 0.0062 m = 0.24 in
Magnetic Levitation System A Genuine Mechatronic System
Equilibrium Conditions
x
0
= 0.003 m
i
0
= 0.222 A
+x
i
Mechatronics
Magnetic Levitation System
K. Craig
10
Electromagnet Actuator
Current flowing through the coil windings of the
electromagnet generates a magnetic field.
The ferromagnetic core of the electromagnet provides
a low-reluctance path in the which the magnetic field
is concentrated.
The magnetic field induces an attractive force on the
ferromagnetic ball.
f x i C
i
x
( , ) =
F
H
I
K
2
Electromagnetic Force
Proportional to the square
of the current
and
Inversely proportional to the
square of the gap distance
Mechatronics
Magnetic Levitation System
K. Craig
11
Core
Windings
1.4"
1.5"
2.6"
0.25"
The electromagnet uses a - inch steel bolt as the core with
approximately 3000 turns of 26-gauge magnet wire wound
around it.
The resistance of the electromagnet at room temperature is
approximately 32 .
Mechatronics
Magnetic Levitation System
K. Craig
12
Infrared
LED
+15V
Phototransistor
+5V
+
-
Unity Gain
Buffer Op-Amp
V
sensor
62
1 K
200 K
Emitter
Detector
Ball-Position Sensor
LED Blocked: Vsensor = 0 V
LED Unblocked: Vsensor = 10 V
Equilibrium Position: Vsensor 5.40 V
Ksensor 4 V/mm Range 1mm
i
emitter
= 15 mA
Mechatronics
Magnetic Levitation System
K. Craig
13
Ball-Position Sensor
The sensor consists of an infrared diode (emitter) and
a phototransistor (detector) which are placed facing
each other across the gap where the ball is levitated.
Infrared light is emitted from the diode and sensed at
the base of the phototransistor which then allows a
proportional amount of current to flow from the
transistor collector to the transistor emitter.
When the path between the emitter and detector is
completely blocked, no current flows.
When no object is placed between the emitter and
detector, a maximum amount of current flows.
The current flowing through the transistor is
converted to a voltage potential across a resistor.
Mechatronics
Magnetic Levitation System
K. Craig
14
The voltage across the resistor, V
sensor
, is sent through
a unity-gain, follower op-amp to buffer the signal and
avoid any circuit loading effects.
V
sensor
is proportional to the vertical position of the ball
with respect to its operating point; this is compared to
the voltage corresponding to the desired ball position.
The emitter potentiometer allows for changes in the
current flowing through the infrared LED which affects
the light intensity, beam width, and sensor gain.
The transistor potentiometer adjusts the phototransistor
current-to-voltage conversion sensitivity and allows
adjustment of the sensors voltage range; a 0 - 10 volt
range allows for maximum sensor sensitivity without
saturation of the downstream buffer op-amp.
Mechatronics
Magnetic Levitation System
K. Craig
15
From Equilibrium:
As i , x, & V
sensor

As i , x , & V
sensor

+
-
V
desired

G
c
(s)
Controller

V
bias
+
+
Current
Amplifier
G(s)
Magnet + Ball
H(s)
Sensor
V
actual
X
i
Magnetic Levitation System
Block Diagram
Linear Feedback Control System
to Levitate Steel Ball
about an Equilibrium Position
Corresponding to Equilibrium Gap x
0
and Equilibrium Current i
0
Mechatronics
Magnetic Levitation System
K. Craig
16
Command and Error Signal
Generation
From Equilibrium:
As i , x, & V
sensor

As i , x , & V
sensor

+
-
V
sensor
V
command
-V
error
Difference
Op-Amp
+
-
Unity Gain
Buffer Op-Amp
V
command
+15V
10 K
100 K
100 K
100 K
100 K
Voltage
Divider
Mechatronics
Magnetic Levitation System
K. Craig
17
Active
Lead Controller
control 2 1 1 4 4
error 1 2 2 3 3
V R R C s 1 R R 0.01s 1
V R R C s 1 R R 0.001s 1
( ( ( ( + +
(
= =
( ( ( (
(
+ +


V
control
-V
error
Lead Controller
+
-
Inverting
Op-Amp
-
+
1
R 100 K =
1
C 0.1 F =
2
R 100 K =
2
C 0.01 F =
51 K
1.6 K
3
R 1.6 K =
4
R 50 K =
Mechatronics
Magnetic Levitation System
K. Craig
18
+
-
V
bias
V
control
V
bias
+
V
control
Summing
Op-Amp
+
-
V
bias
with
Unity Gain
Buffer Op-Amp
V
bias
+15V
Unity Gain
Inverting
Op-Amp
-
+
10 K
10 K
10 K
10 K
5.1 K
10 K
10 K
5.1 K
Voltage
Divider
V
bias
Generation &
Summation with V
control
V
bias
= 1.77 V
At Equilibrium
Mechatronics
Magnetic Levitation System
K. Craig
19
R
1
+
-
V
control
+
V
bias
+
-
npn BJT
Transistor
pnp BJT
Transistor
R
2
R
3
Electro-
Magnet
+V
supply
diode
( )
2
em control bias
1 3
R
i V V
R R
= +
i
em
1
2
3
R 1000
R 510
R 17.8 (20W)
=
=
=
0
0
i 0.222 A
x 3.0 mm
=
=
Current Amplifier
R
em
= 32
V
supply
= 15 V
supply
sat
em 3
V
i
R R
=
+
> 9.65 V
> 9.65 V
< 9.93 mA
< 9.93 V
Mechatronics
Magnetic Levitation System
K. Craig
20
+x
i
mg
f x i C
i
x
( , ) =
F
H
I
K
2
Electromagnet
Ball (mass m)
Magnetic Levitation System
Control System Design
Linearization:
2 2 2
2 2 3 2
i i 2i 2i

C C C x C i
x x x x
| | | | | | | |
+
| | | |
\ . \ . \ . \ .
Equation of Motion:
2
2
i
mx mg C
x
| |
=
|
\ .

2 2
2 3 2
i 2i 2i


mx mg C C x C i
x x x
| | | | | |
= +
| | |
\ . \ . \ .

At Equilibrium:
2
3 2
2i 2i


mx C x C i
x x
| | | |
=
| |
\ . \ .

2
2
i
mg C
x
| |
=
|
\ .
Mechatronics
Magnetic Levitation System
K. Craig
21
+
-
V
desired

G
c
(s)
Controller

V
bias
+
+
Current
Amplifier
G(s)
Magnet + Ball
H(s)
Sensor
V
actual
X
i
2
2
i
mg C
x
| |
=
|
\ .
m 0.008
g 9.81
x 0.003
i 0.222
=
=
=
=
C 1.4332E 5 =
2
3 2
2i 2i


mx C x C i
x x
| | | |
=
| |
\ . \ .

x 6540x 88i =

( )
2
x 88

s 6540 i

=

K
amp
= 0.0287 A/V
K
sensor
4 V/mm
Mechatronics
Magnetic Levitation System
K. Craig
22
( )
( )( )
2
88
0.0287 3000
s 6540
Open-Loop
Transfer Function
4
3
R 0.01s 1 0.01s 1
4
R 0.001s 1 0.001s 1
(
+ +
( (
=
(
( (
+ +


Controller
Mechatronics
Magnetic Levitation System
K. Craig
23
Digital Implementation of Controller
The analog controller has a high bandwidth needed to
compensate for inherent instability and nonlinearities.
Digital controllers have an advantage in that the control system
is implemented in software rather than in hardware, and is
therefore much easier to modify.
However, a controller implemented digitally has the
disadvantages of quantization and limited sampling rate, which
can adversely affect system performance.
-V
error
Scaling
Circuit
0 5 V
12-bit A/D
Digital
Controller
G
c
(z)
8-bit D/A
DAC 08
Microcontroller
With
A/D Converter
Scale &
Offset
Circuitry
T
s
To
Buffer Op-Amp