Magnetic Levitation System

Transcription

Magnetic Levitation System
Magnetic Levitation System
Electromagnet
Phototransistor
Infrared LED
Levitated Ball
Magnetic Levitation System
K. Craig
1
Magnetic Levitation System
Electromagnet
Detector
Phototransistor
Vsensor ≈ 2.5 V
At Equilibrium
i
Emitter
Infrared LED
gap
Levitated Ball
m = 0.008 kg
r = 0.0062 m
Magnetic Levitation System
Equilibrium Conditions
gap0 = 0.0053 m
i0 = 0.31 A
K. Craig
2
Emitter Circuit
Power MOSFET
with Diode
To Electromagnet
Buffer Op-Amp
Power Supply
Capacitors
to Ground
Buffer Op-Amp
Magnetic Levitation System
Analog Sensor
Detector
Circuit
PWM
Gnd
K. Craig
3
Microcontroller Board
Gnd
PWM
Analog Sensor
Magnetic Levitation System
K. Craig
4
• 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.
Electromagnetic Force
Proportional to the square
of the current
and
inversely proportional to
the square of the gap
distance
Magnetic Levitation System
K. Craig
5
– The electromagnet uses a ¼ - inch steel bolt as the
core with approximately 3000 turns of 26-gauge
magnet wire wound around it.
– The electromagnet at room temperature has a
resistance R = 34 Ω and an inductance L = 154 mH.
Magnetic Levitation System
K. Craig
6
• 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.
Magnetic Levitation System
K. Craig
7
– The voltage across the resistor, Vsensor, is sent through
a unity-gain, follower op-amp to buffer the signal and
avoid any circuit loading effects.
– Vsensor 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 sensor’s voltage range; a 0 - 5 volt
range is required as an analog input to the
microcontroller.
Magnetic Levitation System
K. Craig
8
Emitter Current = 10 mA
Detector Voltage = 0-5 V
Ball-Position Sensor
LED Blocked: esensor = 0 V
LED Unblocked: esensor = 5 V
Equilibrium Position: esensor ≈ 2.5 V
Ksensor ≈ 1.6 V/mm
Range ± 1mm
Magnetic Levitation System
K. Craig
9
Magnetic Levitation System
Block Diagram
From Equilibrium:
As i ↑, gap ↓, & Vsensor ↓
As i ↓, gap ↑, & Vsensor ↑
Feedback Control System
to Levitate Steel Ball
about an Equilibrium Position
Corresponding to Equilibrium Gap
gap0 and Equilibrium Current i0
Magnetic Levitation System
K. Craig
10
Magnetic Levitation System Derivation
    m Neglect 
Ni
m 
m
N 2i
  N  Nm 
 L mi
m
 i2 
f  gap,i   C 
2 
gap


m  core  gap  object  return path
Define:   core  object  return path  constant
 gap 
Wfield
x gap
 0 A gap
2
N

Lm 
m
2

N
x gap

 0 A gap
 0 A gap N 2
 0 A gap  x gap
 0 A gap N 2
1
1
2
 Lxi 
i2
2
2  0 A gap  x gap

1 2 dL(x)
1
1
2
   0 A gap N 
fe  i
 A x
2
dx
2
gap
 0 gap
Magnetic Levitation System
2


i


K

1
K x
gap

 2
K. Craig



11
2
Magnetic Levitation System
Control System Design
Measure the gap from the
electromagnet with
x positive ↓
Linearization:
Equation of Motion:
 i2 
mx  mg  C  2 
x 
At Static Equilibrium:
 i2 
mg  C  2 
x 
Magnetic Levitation System
 i2 
 i2 
 2i 2 
 2i
C  2   C  2   C  3  xˆ  C  2
x 
x 
 x 
x
ˆ
i

2
2




 2i
i
2
i

mxˆ  mg  C  2   C  3  xˆ  C  2
x 
 x 
x
ˆ
i

2


 2i
2
i

mxˆ  C  3  xˆ  C  2
 x 
x
K. Craig
ˆ
i

12
Use of Experimental Testing in Multivariable Linearization
f m  f (i, y)
f
f
f m  f  i0 , y0  
 y  y0  
y i0 ,y0
i
Magnetic Levitation System
 i  i0 
i0 ,y0
K. Craig
13
SI Units
m  0.008
g  9.81
x  0.0053
 i2 
mg  C  2 
x 
C  2.29E  5
i  0.31
2


 2i
2
i

mxˆ  C  3  xˆ  C  2
 x 
x
xˆ  3695xˆ  63iˆ
Magnetic Levitation System
ˆ
i

xˆ
63

ˆi  s 2  3695 
K. Craig
14
Electromagnet Model
out
L
in
R
out
di L
 eout  0
KVL ein  L
dt
KCL i L  i R  i out  i R  0
d  eout 
ein  L 
  eout  0
dt  R 
Magnetic Levitation System
L = 154 mH
R = 34 Ω
di L
Basic Component
ein  eout  L
dt
Equations
(Constitutive Equations)
eout  i R R
L deout
 eout  ein
R dt
L
 Deout   eout  ein
R
 L D  1 e  e

 out
in
R

eout
1

ein L D  1
R
1
R
i

ein L D  1
R
K. Craig
15
Magnetic Levitation System Control Design
Design a Feedback Controller
to Stabilize the Magnetic Levitation Plant
with Adequate Stability Margins
voltage
63 
 0.029 

 2

 0.0045s  1  s  3695 
position
Note: Controller gain will need to be negative
Magnetic Levitation System
K. Craig
16
Uncompensated Electromagnet + Ball System
Open-Loop Bode Editor for Open Loop 1 (OL1)
Root Locus Editor for Open Loop 1 (OL1)
600
-60
-80
-100
Magnitude (dB)
400
200
-120
-140
Imag Axis
-160
G.M.: 66.1 dB
-180 Freq: 0 rad/s
Unstable loop
-200
-180
0
Phase (deg)
-200
-400
-600
-800
-600
-400
-200
Real Axis
Note: Negative Controller
Gain Is Required
Magnetic Levitation System
0
200
400
-225
-270
P.M.: Inf
Freq: NaN
1
10
2
10
3
10
4
10
Frequency (rad/s)
xˆ  0.029 
63 



êin  0.0045s  1  s 2  3695 
K. Craig
17
Sample Control Design
z = -50
p = -800
K = 52664
G c (s)  52664
s  50
s  800
Magnetic Levitation System
K. Craig
18
• Nyquist Stability Criterion
– Key Fact: The Bode magnitude response corresponding to neutral
stability passes through 1 (0 dB) at the same frequency at which the
phase passes through180°.
– The Nyquist Stability Criterion uses the open-loop transfer function,
i.e., (B/E)(s), to determine the number, not the numerical values, of
the unstable roots of the closed-loop system characteristic equation.
– If some components are modeled experimentally using frequency
response measurements, these measurements can be used directly
in the Nyquist criterion.
– The Nyquist Stability Criterion handles dead times without
approximation.
– In addition to answering the question of absolute stability, Nyquist
also gives useful results on relative stability, i.e., gain margin and
phase margin.
– The Nyquist Stability Criterion handles stability analysis of complex
systems with one or more resonances, with multiple magnitudecurve crossings of 1.0, and with multiple phase-curve crossings of
180°.
Magnetic Levitation System
K. Craig
19
• Procedure for Plotting the Nyquist Plot
1. Make a polar plot of (B/E)(i) for -    < . The magnitude
will be small at high frequencies for any physical system.
The Nyquist plot will always be symmetrical with respect to
the real axis.
2. If (B/E)(i) has no terms (i)k, i.e., integrators, as multiplying
factors in its denominator, the plot of (B/E)(i) for - <  < 
results in a closed curve. If (B/E)(i) has (i)k as a
multiplying factor in its denominator, the plots for + and -
will go off the paper as   0 and we will not get a single
closed curve. The rule for closing such plots says to connect
the "tail" of the curve at   0- to the tail at   0+ by
drawing k clockwise semicircles of "infinite" radius.
Application of this rule will always result in a single closed
curve so that one can start at the  = - point and trace
completely around the curve toward  = 0- and  = 0+ and
finally to  = +, which will always be the same point (the
origin) at which we started with  = -.
Magnetic Levitation System
K. Craig
20
3. We must next find the number Np of poles of B/E(s) that are
in the right half of the complex plane. This will almost
always be zero since these poles are the roots of the
characteristic equation of the open-loop system and openloop systems are rarely unstable.
4. We now return to our plot (B/E)(i), which has already been
reflected and closed in earlier steps. Draw a vector whose
tail is bound to the -1 point and whose head lies at the origin,
where  = -. Now let the head of this vector trace
completely around the closed curve in the direction from  =
- to 0- to 0+ to +, returning to the starting point. Keep
careful track of the total number of net rotations of this test
vector about the -1 point, calling this Np-z and making it
positive for counter-clockwise rotations and negative for
clockwise rotations.
5. In this final step we subtract Np-z from Np. This number will
always be zero or a positive integer and will be equal to the
number of unstable roots for the closed-loop.
Magnetic Levitation System
K. Craig
21
•
•
•
A system must have adequate
stability margins.
Both a good gain margin and a
good phase margin are needed.
Useful lower bounds: GM > 2.5,
PM > 30
Vector Margin is the distance to the -1
point from the closest approach of the
Nyquist plot. This is a single-margin
parameter and it removes all
ambiguities in assessing stability that
come from using GM and PM in
combination.
Magnetic Levitation System
K. Craig
22
ω = ±∞
Np =1
Np-z = 1
Np – Np-z = 0
Magnetic Levitation System
K. Craig
23
ω = 356 rad/s
GM = 15.9 dB
= 6.237
ω = 0 rad/s
GM = -4.23 dB
= 0.615
ω = 86 rad/s
PM = 32.5°
Magnetic Levitation System
K. Craig
24
closed-loop
Bode plot
Magnetic Levitation System
K. Craig
25
z = -50
p = -800
K = 3.2792E5
Magnetic Levitation System
K. Craig
26
Neutral Stability
Magnetic Levitation System
K. Craig
27
z = -50
p = -800
K = 1.0443E6
Magnetic Levitation System
K. Craig
28
ω = ±∞
Np =1
Np-z = -1
Np – Np-z = 2
Magnetic Levitation System
K. Craig
29
z = -50
p = -800
K = 32323
Magnetic Levitation System
K. Craig
30
Neutral Stability
Magnetic Levitation System
K. Craig
31
z = -50
p = -800
K = 20095
Magnetic Levitation System
K. Craig
32
ω = ±∞
Np =1
Np-z = 0
Np – Np-z = 1
Magnetic Levitation System
K. Craig
33
Uncompensated Electromagnet + Ball System
Open-Loop Bode Editor for Open Loop 1 (OL1)
Root Locus Editor for Open Loop 1 (OL1)
600
-60
-80
-100
Magnitude (dB)
400
200
-120
-140
Imag Axis
-160
G.M.: 66.1 dB
-180 Freq: 0 rad/s
Unstable loop
-200
-180
0
Phase (deg)
-200
-400
-600
-800
-600
-400
-200
Real Axis
Note: Negative Controller
Gain Is Required
Magnetic Levitation System
0
200
400
-225
-270
P.M.: Inf
Freq: NaN
1
10
2
10
3
10
4
10
Frequency (rad/s)
xˆ  0.029 
63 



êin  0.0045s  1  s 2  3695 
K. Craig
34
s  30  
N 

G c (s)  132020 
  K P  K Ds
s  N 
 s  800  
KP = 4951 KD = 159 N = 800
Open-Loop Bode Editor for Open Loop 1 (OL1)
Root Locus Editor for Open Loop 1 (OL1)
20
500
0
400
Magnitude (dB)
-20
300
200
-60
-80
-100
100
Imag Axis
G.M.: -7.78 dB
-120 Freq: 0 rad/s
Stable loop
-140
-135
0
-100
-200
Phase (deg)
Control
Design
PD
-40
-300
-180
-225
-400
-500
-300
-250
-200
-150
-100
-50
Real Axis
0
50
100
-270
P.M.: 25.3 deg
Freq: 201 rad/s
0
10
1
10
2
3
10
10
Frequency (rad/s)
4
10
5
10
Closed-Loop Poles: -888, -20.4, -56.9 ± 222i
Magnetic Levitation System
K. Craig
35
s

G (s)  113200 
c
2
 38.28s  370.42 
s  s  896 
K
N 

  K P  I  K Ds
s
s  N 

KP = 4784 KI = 46798 KD = 121 N = 896
Open-Loop Bode Editor for Open Loop 1 (OL1)
Root Locus Editor for Open Loop 1 (OL1)
50
200
0
Magnitude (dB)
150
100
-100
50
G.M.: -6.55 dB
Freq: 21.7 rad/s
Stable loop
0
-150
-135
P.M.: 30.1 deg
Freq: 163 rad/s
-50
Phase (deg)
Imag Axis
Control
Design
PID
-50
-100
-150
-200
-250
-200
-150
-100
-50
Real Axis
0
50
-180
-225
-270
0
10
1
10
2
3
10
10
Frequency (rad/s)
4
10
5
10
Closed-Loop Poles: -959, -67 ± 185i, -12.8 ± 17.2i
Magnetic Levitation System
K. Craig
36
M_hat
Perturbation
Control Effort
Linear System
s2+38.28s+370.42
s2+896s
-113200
Step
Control
Controller
Gain
Saturation
-10.57 to 4.43 volts
i_hat
Perturbation
Current
0.029
-63
0.0045s+1
s2+-3695
LR Circuit
Magnet + Ball
x_hat
Perturbation
Position
Comparison: Linear Plant vs. Nonlinear Plant
-113200
Step
Nonlinear System
s2+38.28s+370.42
s2+896s
M
Control
Controller
Gain
Control Effort
Saturation
0 to 15 volts
e0
V Bias
C = 2.29E-5
m = 0.008
g = 9.81
R = 34.1
L = 154.2E-3
x0 = 0.0053
i0 = 0.31
e0 = 10.57
i
Current
R/L
Gain1
1/s
Integrator2
1/R
Gain2
u2
Math
Function
g
Constant
1/s
1/s
x
Integrator
Integrator1
Ball Position
C/m
Product
Gain
1
u
Math
Function1
Magnetic Levitation System
u2
Math
Function2
K. Craig
37
-3
7.2
x 10
Nonlinear & Linear Plant Response Comparison: 1 mm Step Command
7
6.8
Nonlinear Pant
Linear Plant
Position x (m)
6.6
6.4
6.2
PD Control
6
5.8
5.6
5.4
0
0.05
Magnetic Levitation System
0.1
0.15
0.2
time (sec)
0.25
0.3
0.35
0.4
K. Craig
38
Nonlinear & Linear Plant Response Comparison: 1 mm Step Command
0.5
0.45
0.4
Current i (A)
0.35
Nonlinear Plant
Linear Plant
0.3
0.25
PD Control
0.2
0.15
0.1
0
0.05
Magnetic Levitation System
0.1
0.15
0.2
time (sec)
0.25
0.3
0.35
0.4
K. Craig
39
Nonlinear & Linear Plant Response Comparison: 1 mm Step Command
15
Control Effort M (volts)
Nonlinear Plant
Linear Plant
10
PD Control
5
0
0
0.05
Magnetic Levitation System
0.1
0.15
0.2
time (sec)
0.25
0.3
0.35
0.4
K. Craig
40
7.2
-3
x 10 Nonlinear & Linear Plant Response Comparison: 1 mm Step Command
Nonlinear Plant
Linear Plant
7
6.8
Position x (m)
6.6
6.4
6.2
PID Control
6
5.8
5.6
5.4
0
0.05
0.1
Magnetic Levitation System
0.15
0.2
time (sec)
0.25
0.3
0.35
0.4
K. Craig
41
Nonlinear & Linear Plant Response Comparison: 1 mm Step Command
0.5
Nonlinear Plant
Linear Plant
0.45
0.4
Current i (A)
0.35
0.3
PID Control
0.25
0.2
0.15
0.1
0
0.05
Magnetic Levitation System
0.1
0.15
0.2
time (sec)
0.25
0.3
0.35
0.4
K. Craig
42
Nonlinear & Linear Plant Response Comparison: 1 mm Step Command
15
Control Effort M (volts)
Nonlinear Plant
Linear Plant
10
PID Control
5
0
0
0.05
Magnetic Levitation System
0.1
0.15
0.2
time (sec)
0.25
0.3
0.35
0.4
K. Craig
43
Complete System: Electromagnet + Ball + PWM Voltage Control
s2 +38.3s+370.4
s2 +896s
-113200
Step
1 mm
step
command
M
Controller
Controller
Gain2
C = 2.29E-5
m = 0.008
g = 9.81
R = 34.1
L = 154.2E-3
x0 = 0.0053
i0 = 0.31
e0 = 10.57
Control
Effort
Saturation
0 to 15 volts
e0
V Bias
PWM
1/3
Supply Voltage
Switch ON
Identical Controller - PID Format
15
>
PID(s)
-1
Controller
Gain
PID Controller
Relational
Operator
Reference
Signal
4000Hz
i
R/L
Gain1
1/s
Integrator2
Current
1/R
Gain2
Saturation
0 to 1 amp
u2
Math
Function
g
Constant
1
Convert
Boolean
into Double
Set
amplitude
to 5V
0
Supply Voltage
Switch Off
Switch
Transistor
MOSFET
1/s
1/s
x
Integrator
Integrator1
Ball Position
C/m
Product
Gain
1
u
Math
Function1
Magnetic Levitation System
>=
5
u2
Math
Function2
K. Craig
44
-3
7.2
x 10
Nonlinear Plant & PWM Voltage Control: 1 mm Step Command
7
6.8
Position x (m)
6.6
6.4
6.2
PD Control
6
5.8
5.6
5.4
0
0.05
Magnetic Levitation System
0.1
0.15
0.2
time (sec)
0.25
0.3
0.35
0.4
K. Craig
45
Nonlinear Plant & PWM Voltage Control: 1 mm Step Command
0.5
0.45
0.4
Current i (A)
0.35
0.3
PD Control
0.25
0.2
0.15
0.1
0
0.05
Magnetic Levitation System
0.1
0.15
0.2
time (sec)
0.25
0.3
0.35
0.4
K. Craig
46
Nonlinear Plant & PWM Voltage Control: 1 mm Step Command
Control Effort M (volts)
15
10
PD Control
5
0
0
0.05
Magnetic Levitation System
0.1
0.15
0.2
time (sec)
0.25
0.3
0.35
0.4
K. Craig
47
-3
7.2
x 10
Nonlinear Plant & PWM Voltage Control
1 mm Step Command
7
6.8
Position x (m)
6.6
6.4
6.2
6
PID Control
5.8
5.6
5.4
0
0.05
Magnetic Levitation System
0.1
0.15
0.2
time (sec)
0.25
0.3
0.35
0.4
K. Craig
48
Nonlinear Plant & PWM Voltage Control
1 mm Step Command
0.5
0.45
0.4
Current i (A)
0.35
0.3
PID Control
0.25
0.2
0.15
0.1
0
0.05
Magnetic Levitation System
0.1
0.15
0.2
time (sec)
0.25
0.3
0.35
0.4
K. Craig
49
Nonlinear Plant & PWM Voltage Control
1 mm Step Command
Control Effort M (volts)
15
10
PID Control
5
0
0
0.05
Magnetic Levitation System
0.1
0.15
0.2
time (sec)
0.25
0.3
0.35
0.4
K. Craig
50
Emitter Circuit
Power MOSFET
with Diode
To Electromagnet
Buffer Op-Amp
Power Supply
Capacitors
to Ground
Buffer Op-Amp
Magnetic Levitation System
Analog Sensor
Detector
Circuit
PWM
Gnd
K. Craig
51
Microcontroller Board
Gnd
PWM
Analog Sensor
Magnetic Levitation System
K. Craig
52
Arduino Microcontroller Implementation
With Simulink Autocode Generator
0.0053 m gap
2.5
1/1600
Commanded
Position
Volts
-1
Gain
Controller
Gain2
Bias Voltage
Constant
Analog Input
PID Controller
1/3
Saturation
0 to 15 volts
255/5
8-Bit D/A
Pin 10
Digital Output
10.57
5.98
Pin 0
PID(s)
5/1023
10-Bit A/D
1/1600
Gain1
Magnetic Levitation System
Arduino Discrete PiD Control
Magnetic Levitation System
PWM
Ts = sample period = 0.001
Operating point is 0.0053 m gap and corresponds to sensor reading of 2.5 V
Sensor gain is 1.6V/mm around operating point + or - 1 mm
volts = 1600*m - 5.98
m = (volts + 5.98)/1600
K. Craig
53
Closed-Loop System
Block Diagram
LM 258
Low-Power
Dual Op-Amp
Magnetic Levitation System
Unity-Gain Buffer Op-Amp
ein = eout and in phase
K. Craig
54
Power MOSFET TO-220
N-Channel, 60 V, 0.07 Ω, 16 A
Magnetic Levitation System
K. Craig
55
Alternative: Analog Power Stage
Voltage-to-Current Converter
OPA544
High-Voltage, High Current
Op Amp
1
out
in
2
M
M
S
Assume Ideal Op-Amp
Behavior
e  e
Magnetic Levitation System
 R2  1 
iM  
 ein

 R1  R 2  R S 
R1 = 49KΩ, R2 = 1KΩ, RS = 0.1Ω
K. Craig
56
Non-Ideal
Op-Amp Behavior
A
eo 
e  e 

s  1
eout  e1   L M s  R M  i
e1  R Si
e1
e1
eout  e1   L M s  R M 
RS
eout
 R2 
ein 

 R1  R 2 
Saturation
A
s  1
out
 LMs  R M  R S 

 e1
RS


RS
LMs  R M  R S
1
1
RS
1
Magnetic Levitation System
K. Craig
57

Similar documents

(435) 792-4700 fax: (435) 787

(435) 792-4700 fax: (435) 787 APOGEE INSTRUMENTS, INC. 721 WEST 1800 NORTH, LOGAN, UTAH 84321, USA TEL: (435) 792-4700 FAX: (435) 787-8268 WEB: APOGEEINSTRUMENTS.COM

More information