Control Systems EE 4314

advertisement
Control Systems
EE 4314
Lecture 26
April 30, 2015
Spring 2015
Indika Wijayasinghe
Z-Transform
• Given a sequence of numbers
𝑓0 , 𝑓1 , 𝑓2 , β‹― , π‘“π‘˜ , β‹―
Z-transform is defined by
𝑍 𝑓 π‘˜
∞
π‘“π‘˜ 𝑧 −π‘˜
=𝐹 𝑧 =
π‘˜=−∞
This leads to a property that
𝑍 𝑓 π‘˜ − 1 = 𝑧 −1 𝐹(𝑧)
Relationship b/w z-plane and s-plane
𝑧 = 𝑒 𝑠𝑇
Im
Im
𝑗
1
1
πœ‹
𝑇
Re
Re
πœ‹
−𝑗
𝑇
Z-plane
S-plane
Digital Controller Design
• There are two techniques for finding the difference equations
for the digital controller
1.
Discrete equivalent: Design D(s) first, and then obtain equivalent
D(z) using Tustin’s method, Matched Pole-Zero (MPZ) method.
Discrete design: directly obtain the difference equation without
designing D(s) first. Obtain G(z) and design D(z).
2.
Digital controller
r(t)
r(kT)
T
+
e(kT)
Difference
equations
u(kT)
D/A and
hold
u(t)
plant
G(s)
clock
y(kT)
A/D
T
sensor
1
y(t)
Design Using Discrete Equivalent
• Design by discrete equivalent
1.
2.
3.
Design a continuous compensation D(s) using continuous controller
design methods such as PID, lead/lag compensator.
Digitize the continuous compensation: D(s) οƒ  D(z)
Use discrete analysis, simulation or experimentation to verify the
design
Digitization Technique:
Tustin’s Method
• Consider
π‘ˆ(𝑠)
𝐸(𝑠)
=𝐷 𝑠 =
1
𝑠
π‘˜π‘‡−𝑇
𝑒 π‘˜π‘‡ =
𝐸(𝑠)
π‘ˆ(𝑠)
π‘˜π‘‡
𝑒 𝑑 𝑑𝑑 +
0
1
𝑠
𝑒 𝑑 𝑑𝑑
π‘˜π‘‡−𝑇
= 𝑒 π‘˜π‘‡ − 𝑇 + area under e t over the last T
𝑇
2
𝑒 π‘˜ = 𝑒 π‘˜ − 1 + [𝑒 π‘˜ − 1 + 𝑒 π‘˜ ] οƒŸ trapezoidal integration
Taking z-transform
π‘ˆ 𝑧
𝐸 𝑧
= 𝐷(𝑧) =
𝑠=
2 1−𝑧 −1
𝑇 1+𝑧 −1
𝑇 1+𝑧 −1
2 1−𝑧 −1
Trapezoidal integration
Digitization Technique:
Tustin’s Method
• MATLAB command
1
𝐷 𝑠 =
𝑠
>> numD=[1];
denD=[1 0];
Ds=tf(numD,denD)
𝑇 1 + 𝑧 −1
𝐷(𝑧) =
2 1 − 𝑧 −1
Dz=c2d(Ds,1,'tustin')
Dz =
Ds =
1
s
Continuous-time transfer function.
0.5 z + 0.5
----------z-1
Sample time: 1 seconds
Discrete-time transfer function.
Relationship between s and z
• Consider
𝑓 𝑑 = 𝑒 −π‘Žπ‘‘ , 𝑑 > 0
Laplace transform
𝐹 𝑠 =
1
,
𝑠+π‘Ž
and it has a pole at 𝑠 = −π‘Ž
Z-transform
𝐹 𝑧 =
𝑧
,
𝑧−𝑒 −π‘Žπ‘‡
and it has a pole at 𝑧 = 𝑒 −π‘Žπ‘‡
A pole at 𝑠 = −π‘Ž in the s-plane corresponds to a pole at 𝑧 =
𝑒 −π‘Žπ‘‡
Digitization Technique:
Matched Pole-Zero (MPZ) Method
• MPZ technique applies the relation 𝑧 = 𝑒 𝑠𝑇 . This digitization
method is an approximation
1.
2.
3.
Map poles and zeros according to the relation 𝑧 = 𝑒 𝑠𝑇 .
If the numerator is of lower order than the denominator, add powers
of (z+1) to the numerator until numerator and denominator are of
equal.
Set the DC or low-frequency gain of D(z) equal to that of D(s).
The MPZ approximation of
𝐷 𝑠 =
𝑠+π‘Ž
𝐾𝑐
𝑠+𝑏
is 𝐷 𝑧 =
𝑧−𝑒 −π‘Žπ‘‡
𝐾𝑑
𝑧−𝑒 −𝑏𝑇
Digitization Technique:
Pole-Zero (MPZ) Method
• Adjusting DC gain of D(z)
𝐷 𝑠 =
𝑠+π‘Ž
𝐾𝑐
𝑠+𝑏
𝐷 𝑧 =
𝑧−𝑒 −π‘Žπ‘‡
𝐾𝑑
𝑧−𝑒 −𝑏𝑇
Using the Final Value Theorem
π‘Ž
1 − 𝑒 −π‘Žπ‘‡
𝐾𝑐 = 𝐾𝑑
𝑏
1 − 𝑒 −𝑏𝑇
π‘Ž 1 − 𝑒 −𝑏𝑇
𝐾𝑑 = 𝐾𝑐
𝑏 1 − 𝑒 −π‘Žπ‘‡
The difference equation is
𝑒 π‘˜ = 𝑒 π‘˜ − 1 + 𝐾𝑑 [𝑒 π‘˜ − 𝑒 π‘˜ − 1 ]
Final Value Theorem
• Final value theorem for continuous system
lim π‘₯ 𝑑 = π‘₯𝑠𝑠 = lim 𝑠𝑋(𝑠)
𝑑→∞
𝑠→0
• Final value theorem for discrete system
lim π‘₯ π‘˜ = π‘₯𝑠𝑠 = lim (1 − 𝑧 −1) 𝑋(𝑧)
π‘˜→∞
𝑧→1
Digitization Technique:
Matched Pole-Zero (MPZ) Method
• For D(s) with a higher-order denominator, adds (z+1) to the
numerator
𝐷 𝑠 = 𝐾𝑐
𝑠+π‘Ž
𝑠(𝑠+𝑏)
(𝑧 + 1)(𝑧 − 𝑒 −π‘Žπ‘‡ )
𝐷 𝑧 = 𝐾𝑑
(𝑧 − 1)(𝑧 − 𝑒 −𝑏𝑇 )
Digitization Technique:
Matched Pole-Zero (MPZ) Method
• Example: Design a digital controller to have a closed-loop natural
frequency 𝑛 ≅ 0.3π‘Ÿπ‘Žπ‘‘/𝑠 and a damping ratio =0.7.
𝐸
𝑅+
π‘ˆ
1
𝑠2
𝐷 𝑠 = 0.81
𝑠+0.2
𝑠+2
𝐷(𝑠)
−
First step is to find the proper D(s)
π‘Œ
Digitization Technique:
Matched Pole-Zero (MPZ) Method
•
Example: Design a digital controller to have a closed-loop natural frequency 𝑛 ≅
0.3rad/s and a damping ratio =0.7.
Second step is to obtain D(z)
Select sampling time T so that sample rate should be about 20 times 𝑛 . Thus 𝑠 =
2πœ‹
20𝑛 = 6rad/sec. Since sampling time 𝑇 =
= 1sec.
𝑠
𝑠+0.2
𝑠+2
0.389−0.319𝑧 −1
1−0.135𝑧 −1
MPZ digitization of 𝐷 𝑠 = 0.81
𝑧−0.82
is 𝐷 𝑧 = 0.389 𝑧−0.135 =
The difference equation is
𝑒 π‘˜ = 0.135𝑒 π‘˜ − 1 + 0.389𝑒 π‘˜ − 0.319𝑒(π‘˜ − 1)
>> T=1;
numD=[1 0.2];
denD=[1 2];
Ds=0.81*tf(numD,denD);
Dz=c2d(Ds,T,'matched')
Dz =
0.3864 z - 0.3163
----------------z - 0.1353
Digitization Technique:
Matched Pole-Zero (MPZ) Method
• Example: Design a digital controller to have a closed-loop
natural frequency 𝑛 ≅ 0.3rad/s and a damping ratio =0.7.
Digitization Technique:
Modified Matched Pole-Zero (MMPZ) Method
• Derive a D(z) that has one less power of z in the numerator
than in the denominator.
𝐷 𝑠 = 𝐾𝑐
𝑠+π‘Ž
𝑠(𝑠+𝑏)
(𝑧 − 𝑒 −π‘Žπ‘‡ )
𝐷 𝑧 = 𝐾𝑑
(𝑧 − 1)(𝑧 − 𝑒 −𝑏𝑇 )
Comparison of Digital Approximation Methods
• All the methods are quite good at lower frequencies. A minimum sampling
rate of 20 times the bandwidth is recommended.
Discrete Design
• Discrete design is an exact design method and avoids the
approximations inherent with discrete equivalent. The design
procedures are
– Finding the discrete model of the plant G(s)οƒ  G(z)
– Design the compensator directly in its discrete form D(z)
π‘Œ(𝑧)
A practical approach is to start the design using discrete
equivalents, then tune up the result using discrete
design.
Discrete Design
• For a plant described by G(s) and precede by a ZOH, the
discrete transfer function is
𝐺(𝑠)
−1
𝐺 𝑧 = 1−𝑧 𝑍
𝑠
The closed-loop transfer function
π‘Œ(𝑧)
𝐷 𝑧 𝐺(𝑧)
=
𝑅(𝑧) 1 + 𝐷 𝑧 𝐺(𝑧)
1 − 𝑒 −𝑠𝑇
𝑍𝑂𝐻 𝑠 =
𝑠
Mixed control system
Pure discrete system
Discrete Root Locus
π‘Ž
• Consider 𝐺 𝑠 =
and 𝐷 𝑧 = 𝐾, discuss the implications
𝑠+π‘Ž
of the loci.
Z-transform table
Continuous system remains stable for all values of K, but
the discrete system becomes oscillatory with decreasing
damping ratio as z goes from 0 to -1 and eventually
becomes unstable.
Relationship b/w z-plane and s-plane
𝑧 = 𝑒 𝑠𝑇
n increase
 increase
Relationship b/w z-plane and s-plane
Discrete Controllers
• Proportional
• Derivative
• Integral
• Lead Compensation
Discrete Design
• Example: Design a digital controller to have a closed-loop natural
frequency 𝑛 ≅ 0.3rad/s and a damping ratio =0.7. Use a discrete
design method.
𝐸
𝑅+
𝐷(𝑠)
−
• From 𝐺 𝑧 = 1 − 𝑧 −1 𝑍
π‘ˆ
1
𝑠2
𝐺(𝑠)
𝑠
𝑇2 𝑧 + 1
𝐺 𝑧 =
2 (𝑧 − 1)2
When T=1, 𝐺 𝑧 =
1 𝑧+1
2 (𝑧−1)2
π‘Œ
οƒŸ Z-transform table
1
𝑇 2 𝑧(𝑧 + 1)
→
𝑠3
2 (𝑧 − 1)3
Discrete Design
• Example: Design a digital controller to have a closed-loop natural
frequency 𝑛 ≅ 0.3π‘Ÿπ‘Žπ‘‘/𝑠 and a damping ratio =0.7. Use a discrete
design method.
Becomes unstable as K increases
Z-plane locus with proportional
controller D z = K
Z-plane locus with PD controller
D z =𝐾
(𝑧−0.85)
𝑧
Download