Transcript Document 7234385
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, 3 rd , 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 Reference Signal
Controller and Plant
Ball Position
Disturbance Model Reference + Error Controller on xPC Target Box Control Signal ‘U’ + Position Signal Photo sensor Magnetic Suspension System Ball Position
Previous Lab Work
Using Classical Controller
Will It Reject Disturbances?
Step1 R Step3 R E num(z) Discrete Transfer Fcn U Step E num(z) Discrete Transfer Fcn1 U Sine Wave U + D 7.67
Transfer Fcn U + D 7.67
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
0.1
.25 Input Reference 0.05
input w/.1sin(pi*t) disturbance 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 Zero-order Hold k*Sin(a*T) k-unit step Laplace Equation
s
2
k
*
s a
2
s k
2 *
a
a
2
k s
k-unit ramp
k s
2
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 = Step Reference Input = Model = P =
s
0,0 0 0,0
1 Reference
Design Approach
E B(z) A(z)*P(z) Control l er w/ Model N(z) D(z) Pl ant 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
b
3
z
3
b
2
z
2
a
1
z
a
0
b
1
z
b
0 *
p
2
z
2 1
p
1
z
p
0
Pole Placement
Ideal Situation T settle = 60ms %O.S. = 18 %O.S.
= .479
W n = 100
e
4 T s ettle * 1 2 W n = 139.1788
W n < 22 *
T
,
T
.
001
Pole Placement Problems and Solution
W n < 22 *
T
,
T
.
001 Poles>.92
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)=
x
0
x
1 ...
x n
System of Equations To Be Solved Simultaneously A 0 D* 0 +B 0 N 0 =F 0 …A n D* n +B n N n =F n
Diophantine Solution
Using Previous Example:
b
3
z
3
b
2
z
2
a
1
z
a
0
b
1
z
b
0
a
0
b
0
a
1
b
1
b
2
b
3 *
d
0 0 0 0 *
n
0 0
d
* 1
n
1
d
* 0
n
0 0 0
d
* 2 0
d
* 1
n
1
n
0 0
d
* 3 0
d
* 2 0
n
1
n
0
d
* 4 0
d
* 3 0 0
n
1
d
0 0 0 0 0 * 4
f
0
f
1 ...
f
5
Actual Values For Ramp Controller
N(z) = D(z) = P(z) = F(z) = 6.634e
z 5 4z z 2 2.001z
1 z 2 2z 1 3.8038z
4 6.634e
5.4326z
3 4 3.4615z
2 0.8408z
0.0081
B(z) = A(z) = 159.9474z
3 469.0901z
2 458.5402z
149.3966
z 0.091
A(z)P(z) = z 3 1.909z
2 0.8179z
0.091
xPC Simulink Implementation
1 Constant Ref_D_Num(z) Ref_D_Den(z) Reference Transfer Function du/dt Derivative R 1 Constant1 Dis_D_Num(z) Dis_D_Den(z) Disturbance Transfer Function du/dt Derivative1 D MM-32 Diamond Analog Input 1 A/D Input From Ball Position + E Numd(z) Dend(z) Controller Transfer Function Uc U 1 MM-32 Diamond Analog Output D/A Output To Plant
Results – Stability
1.
2.
2V Step Disturbance at 2.00V Set Point 5V/s Ramp Disturbance at 2.00V Set Point 1.
2.042
2.
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 Ball Photo Sensor Position Signal Current Sensor (1k Ω) 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
Magnetic Suspension System
Desired Distrubance k*cos(a*t) Laplace Transform
s
2
k
*
s a
2 k*sin(a*t) step ramp 1
s
1
s
2
s
2
k
*
a a
2 State Space Equation
x
y
0 1
a
0 2
x
x
1 0
u x
y
0 1
a
0 2 0
k
*
a
x
x
1 0
u y
u
kx x
y
0 0 1
k
0 0
x x
1 0
u
square wave*
e T
2 0
s
pade 2nd order
s
2
s
2
T
0 2
T
0 2 Max 1 at t=0 with period = T 2 12
s
2 12
s T
0 2
T
0 2 pade 3rd order
s
3
s
3
T
0 2
T
0 2 3 3 12
s
2 12
s
2
T
0 2
T
0 2 2 60
s T
0 2 2 60
s T
0 2 12 12 120 120 triangle wave* Max 1 at t=0 with period = T 1
s s
2
T s
( 1 2 24 2
T
48 1
s
2 2
s
2 ( 1 ) )
s
2
T
3 24
s
2
T
2 240
T
960 pade 2nd order
s
3
T
24
T
2 48
s x
y
0 1 0 48
T
0 2 24
T
x
x
1 0
u x
y
0 1 0 40
T
0 2 25 3
T
x
x
1 0
u
pade 3rd order
s
24
s
2
T
2 5
T
5 960 240
s
3
T
3
x y
0 1 0 0 0
T
0 2 1 48 0 0 0
x
24
T
x
1 0 0
u x
y
0 1 0 0 0 0 1
T
0 2 1 0 0 0 0 24
T
3 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0
x
960
T
5
x
1 0 0 0 0
u
Desired Distrubance Laplace Transform square wave*
e T
2 0 pade 2nd order
s s
2 2
s T
0 2
T
0 2 Max 1 at t=0 with period = T 2 12
s
2 12
s T
0 2
T
0 2 12 12 pade 3rd order
s
s
3 3
T
0 2
T
0 2 3 3 12
s
2 12
s
2 triangle wave*
T
0 2
T
0 2 2 60
s T
0 2 2 60
s T
0 2 120 120 Max 1 at t=0 with period = T 1
s s s
2
T
2
T
3
s
24
s
2
T
( 1 2 24 2
T
48 1
s
2
s
2 2 ( 1 ) ) 2 240
T
960 pade 2nd order
s
3
T
24
T
2 48
s
pade 3rd order
s
24
s
2
T
5
T
5 2 240 960
s
3
T
3 State Space Equation
x
y
0 1 0
T
0 24
T
48 2
x
x
1 0
u y
0 1 0 40
T
0 2
x
1 0
u
25 3
T
x x
y
0 1 0 0 48 0
T
0 1 2 0 0 0
x
1 0 0
u
24
T
x x
y
0 1 0 0 0 0 1
T
0 2 1 0 0 0 0 24
T
3 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0
x
960
T
5
x
1 0 0 0 0
u
User Input: Plant, Reference, Disturbance Find Roots of Disturbance Denominator Do Both Have At Least 1 Stable Root?
Find Roots of Reference Denominator Find Least Common Multiple of Stable Roots Convert From Continuous To Discrete Time with User Input Sampling Time Yes No Display Error End Program 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