Design of Disturbance Rejection Controllers for

advertisement
Design of Disturbance Rejection
Controllers for a Magnetic
Suspension System
By: Jon Dunlap
Advisor: Dr. Winfred K.N. Anakwa
Bradley University
April 27, 2006
Outline Of Presentation:








Goal
System Information
Previous Lab Work
Preliminary Lab Work
Internal Model Principle
Design Process
Results
Conclusion
Goal
 Multiple Controllers for Multiple Disturbances
 Digital Controllers
 Created In Simulink
 xPC Target Box Serving as “Controller
Container”
 Minimize Steady-State Error, Overshoot and
Setting Time
 Act As A Stepping Stone From Previous Work
 Practical Use in Antenna Stabilization
Method
 Method of Choice:
 Internal Model Principle
 B.A. Francis & W.M. Wonham

The Internal Model Principle of Control Theory, 1976
 Chi-Tsong Chen

Linear System Theory and Design, 3rd, 1999
 Analogous to an Umbrella
Functional Description
 Host PC using Simulink and xPC software
 xPC Target Box with Controllers
 Magnetic Suspension System

Feedback Incorporated 33-210
Block Diagram
Disturbance
Set Point
Controller and
Plant
Ball Position
Reference Signal
Disturbance Model
Disturbance
Set Point
Reference
+
Error
Controller
on xPC
Target Box
Position Signal
Control Signal ‘U’
-
Photo sensor
+
Magnetic
Suspension
System
Ball Position
Previous Lab Work
 Using Classical Controller
 Will It Reject Disturbances?
num(z)
R
E
Step1
z2 -z
U
U+D
Discrete
Transfer Fcn
R
E
z2 -z
Discrete
Transfer Fcn1
1/961s2+-1
Transfer Fcn
num(z)
Step3
7.67
Step
7.67
Sine Wave
U
U+D
1/961s2+-1
Transfer Fcn1
ste
To Workspace2
sin
To Workspace1
Previous Lab Work
 Results of Classical Controller With
Disturbance 0.35
input w/ .1 unit-step disturbance
0.3
0.25
0.2
0.15
.25 Input Reference
0.1
input w/.1sin(pi*t) disturbance
0.05
0
0
0.5
1
 Rejected Step Disturbance
1.5
2
2.5
3
Preliminary Lab Work
 Laplace Transfer
Functions Found
Disturbance
k*Cos(a*T)
 Later Converted To
Discrete Using
k*Sin(a*T)
Zero-order Hold
k-unit step
k-unit ramp
Laplace Equation
k *s
s2  a2
k *a
s2  a2
k
s
k
s2
Internal Model Principle
 Uses a Model to Cancel Unstable Poles of
Reference and Disturbance Inputs to
Provide Asymptotic Tracking and
Disturbance Rejection
 Model Is: Least Common Multiple of
Unstable or Zero Continuous Denominator
Poles
 Ramp Disturbance Input = s 2
 Step Reference Input =
s
 Model = P =
s2
0,0
0
0,0
Design Approach
E
ce
B(z)
N(z)
A(z)*P(z)
D(z)
Controller w/ Model
Plant
 Disturbance Removed – Model Inserted
 Must Stabilize Plant at all Times
 Disturbance Should Never Affect Plant
Output
 3 Known, 2 Unknown
 A(z)D(z)P(z) + B(z)N(z)
Diophantine Equation
 A(z)D(z)P(z) + B(z)N(z) = F(z)
 Want:
 Choose Poles to Form F Polynomial
 Discrete, Close to 1
 Need:
 Order of Controller
 Order of D(z)P(z) – 1 = Order of
Controller
 Order of F
 2*(Order of D(z)P(z))-1 = Order of F
Keep In Mind - Account for Model
when Implementing Controller
 Controller Order Assumes Denominator without
Model
 Adding Model Increases Order Beyond Designed
Value
 Ex. If D(z)P(z)=4, then Controller=3
 But Model=2 so Controller Denominator really should
be 1
b3 z 3  b2 z 2  b1 z  b0
1
*
a1 z  a0
p2 z 2  p1 z  p0
Pole Placement
 Ideal Situation





Tsettle = 60ms
%O.S. = 18
%O.S.  100e
= .479
4
Wn=


1
2
Ts ettle * 
 Wn= 139.1788

, T  .001
 Wn<
22 * T
Pole Placement Problems and Solution
 Complex Poles Give Oscillations

 Wn <
, T  .001 Poles>.92
22 * T
 All Poles Close To 1 Is Too Slow
 Speed Up With Poles Closer To Origin
 Iterative Design Approach Required
 Working Poles For Ramp Rejection At:
.9947, .9716, .9275, .9, .01
F(z) = z 5 - 3.8038z 4  5.4326z 3 - 3.4615z 2  0.8408z - 0.0081
Diophantine Solution
 A(z)D(z)P(z) + B(z)N(z) = F(z)
 Combine D(z)P(z) to Equal D*(z)
 For Each X(z)=
x0
x1 ... xn 
 System of Equations To Be Solved
Simultaneously
 A0D*0+B0N0=F0…AnD*n+BnNn=Fn
Diophantine Solution
b3 z 3  b2 z 2  b1 z  b0
 Using Previous Example:
a1 z  a0
a0
b0
a1 b1 b2
d *0
n
 0
 0
b3 * 
 0
 0

 0
d *1
d *2
d *3
d *4
n1
0
0
0
d *0
d *1
d *2
d *3
n0
n1
0
0
0
n0
n1
0
0
0
n0
n1
0 
0 
d *4 
   f0
0 
0 

0 
f1 ...
f5 
Actual Values For Ramp Controller




N(z) = 6.634e - 4z  6.634e - 4
D(z) = z 2 - 2.001z  1
P(z) = z 2 - 2z  1
5
4
3
2
F(z) = z - 3.8038z  5.4326z - 3.4615z  0.8408z - 0.0081
B(z) = 159.9474z 3 - 469.0901z 2  458.5402z - 149.3966
A(z) = z  0.091
A(z)P(z) = z 3 - 1.909z 2  0.8179z - 0.091
xPC Simulink Implementation
1
Ref_D_Num(z)
du/dt
Dis_D_Num(z)
1
Ref_D_Den(z)
Constant
Reference
Transfer
Function
du/dt
Dis_D_Den(z)
Derivative
Constant1
Disturbance
Transfer
Function
Derivative1
D
R
MM-32
Diamond
Analog Input
A/D Input From
Ball Position
+
1
Numd(z)
E
Dend(z)
Controller
Transfer
Function
Uc
U
1
MM-32
Diamond
Analog Output
D/A Output To
Plant
Results – Stability
1. 2V Step Disturbance at 2.00V Set Point
2. 5V/s Ramp Disturbance at 2.00V Set Point
1.
2.
2.042
2.042
Results – Tracking
1. 5V/s Ramp Disturbance
6Hz .5V Peak-Peak
Sine Wave Input
5.98Hz .7V Peak-Peak
Sine Wave Output
Conclusion
 Problems
 Simulation Does Not Match Plant
 Pole Locations are Hard to Find
 <300mV Error at Start Up
 Future
 Continue to Implement Sinusoidal and
Square Wave
 Fine Tune Ramp With Better Poles
Questions?
Magnetic Suspension System
 Control and Disturbance Signal Create
Current
 Current Induces Magnetic Field
 Field Suspends Ball
 Sensor Translates Location into Voltage
Control Signal+
Disturbance
Coil Driver
Electromagnetic
Coil
Current Sensor
(1kΩ)
Ball
Photo
Sensor
Position Signal
Current Level (unused)
xPC Target Box and Host PC
 Using ±10 V ADC and DAC
 Host Uploads Controller and Commands
 Process Position Data and Passes Control
Control Execution and
Data Retrieval
Host PC using
Simulink and
xPC software
Controller Model
Uploaded to xPC
xPC Target Box
With Controllers
on board
Control Signal output
through D/A
Position Signal combines with
Set and Reference to create Error
Signal which is input through A
/D
Magnetic
Suspension
System
Desired Distrubance
k*cos(a*t)
k*sin(a*t)
step
ramp
Laplace Transform
k * s
s 2  a
k *a
2
s  a
1
s
1
s2
2
2
State Space Equation
0  a2  1
x  
x   u
1 0  0
y  k 0x
0  a2  1
x  
x   u
1 0  0
y  0 k *ax
x  u
y  kx
0 0
1 
x  
x   u

1 0 
0
y  0 k  x
Desired Distrubance
square wave*
   e
Laplace Transform
Max 1 at t=0 with period = T
T0
s
2
pade 2nd order
 2  T0
s 
  2
  
 2  T0
s 
  2
pade 3rd order
2


T 
  12 s  0   12 

 2 

2


T 
  12 s  0   12 

 2 

2
 3  T0  3

T 
2  T0 
s

12
s
   60s 0   120
  
2
2
 2

   
3
2
 3  T0 

 T0 
2  T0 
 s    12 s    60s   120
2
2
  2 

triangle wave*
pade 2nd order
Max 1 at t=0 with period = T
State Space Equation
1
2

s s (1   )
24 T
s 2 T 2  48
s 2 T 3  240 T
24 s 2 T 2  960

0
x  
1

 48
T 2
0

y  0

24 
x
T 

0
x  
1

 40
T2
0

y  0

25 
x
3T 

0
x   1

0

 48
T2
0

1 
 x   u

0

1
2

s 2 s 2 (1   )
24T
3 2
s T  48s

y  0

pade 3rd order

1 
 x   u

0

24s 2T 2  960
s 5T 5  240s 3T 3

0
1
x   0

0

 0

y  0

1

0
1 

0 x  0 u
 

0
 0 

24 
x
T 
0
1
T2
0
0
0
0
0
1
0
0
0
1
0
0
0
1
24
T3
0
0

0
0

0 x
0

0 
960
T5
1 
0
 
 0u
 
0
 0 

 x
User Input:
Plant, Reference,
Disturbance
Find Roots of
Disturbance
Denominator
Find Roots of
Reference
Denominator
Do Both Have At
Least 1 Stable Root?
Find Least
Common
Multiple of
Stable Roots
Yes
No
Display Error
End Program
Convert From
Continuous To
Discrete Time with
User Input
Sampling Time
Convolve Plant
Denominator with
Model
Determine Number
of Poles Required
Create Plant
Matrix Based on
Numerator and
Denominator after
Convolution
Solve For
Compensator
Coefficients
Extract Discrete
Compensator
Numerator and
Denominator
Send To Simulink
Block
Modeling Hybrid Systems
“Simulink treats any model that has both continuous
and discrete sample times as a hybrid model,
presuming that the model has both continuous and
discrete states. Solving such a model entails choosing
a step size that satisfies both the precision constraint
on the continuous state integration and the sample
time hit constraint on the discrete states. Simulink
meets this requirement by passing the next sample
time hit, as determined by the discrete solver, as an
additional constraint on the continuous solver. The
continuous solver must choose a step size that
advances the simulation up to but not beyond the
time of the next sample time hit. The continuous
solver can take a time step short of the next sample
time hit to meet its accuracy constraint but it cannot
take a step beyond the next sample time hit even if
its accuracy constraint allows it to.”
http://www.mathworks.com/access/helpdesk/help/toolbox/simulink/ug/f7-23387.html
Download