DESIGN OF DISCRETE TIME CONTROLLER —
INPUT/OUTPUT APPROACHES
LECTURE 6
OUTLINE
• Emulations
• Euler approximation
• Trapezoidal (Tustin, Bilinear) with Pre-warping
• Matched response (response invariant method)
• Matched pole/zero
• Zero-Order Hold (ZOH)
• Direct Design
• Frequency domain
EMULATION Emulation
Controller r C(s) Plant
G(s)
+ –
y u e
G(s) + r
–
y Digitized
Control Algorithm u(t)
D/A A/D
Clock ≈ C(s)
u(kT) e(kT) e(t)
T
Emulate (indirect design)
C(s)
e(t) u(t)
u(t) e(t)
e(kT) u(kT)
ª C(s)
THREE APPROXIMATIONS Three Approximations
• What is equivalence of the differential operator (s) in terms of the shift operator (z)?
Time t
e(t)
T (k+1)T Time t
e(t)
T (k+1)T Time t
e(t)
T (k+1)T
Forward Difference Backward Difference Trapezoidal Approximation
Approximate integration (1/s)
Forward Difference:
Backward Difference:
Trapezoidal Approximation:
(Bilinear Transformation)
u k ( + ≈ 1 ) u k ( ) + e k T ( ) ⋅ u k ( + ≈ 1 ) u k ( ) + e k ( + ⋅ 1 ) T u k u k e k e k
T
( ) ( ) ( ) ( )
+ ≈ + + +
⋅
1 1
( ) ( )
u t = e t u t ( ) = ∫ e t ( )
THREE APPROXIMATIONS OF 1/S Three Approximations of 1/s
Forward Difference:
Backward Difference:
Trapezoidal
Approximation:
(Bilinear Transformation) (Tustin’s Approximation)
u k ( + ≈ 1 ) u k ( ) + e k T ( ) ⋅ u k ( + ≈ 1 ) u k ( ) + e k ( + ⋅ 1 ) T u k u k e k e k
T
( ) ( ) ( ) ( )
+ ≈ + + +
⋅
1 1
2
Forward Difference:
Backward Difference:
Trapezoidal
Approximation:
C z U z E z
T z
Tz ( ) ( ) z
= ( ) =
− =
−
−
1 1
−1 1
C z U z E z
Tz z
T ( ) ( ) z
= ( ) =
− =
−
−1 1
1C z U z E z
T z z
T z
( ) ( ) z
= ( ) = +
− = +
−
−
2
−1
1 2 1 1
1 1
( ) ( ) u t = e t
( ) 1 ( )
U s
E s = s
THREE APPROXIMATION OF 1/S Three Approximations of 1/s
Forward Difference:
Backward Difference:
Trapezoidal
Approximation:
(Bilinear Transformation) (Tustin’s Approximation)
s z
T C z C s
s zT
→ −
=
→ −1 i.e. ( ) ( )
1s z
Tz C z C s
s zTz
→ − 1 =
→ −i.e. ( ) ( )
1s T
z
z C z C s
sT z z
→ −
+ =
→ −+
2 1
1 i.e. ( ) ( )
2 11EX6.1 THREE DISCRETE-TIME APPROXIMATIONS Ex6.1 Three Discrete-Time Approximations
C s s
( ) = s + + 10 1
1
C z C s z T
z T
s z T
( ) ( ) ( )
( )
= = − −
− −
→ −1
10 10
1
C z C s T z
s z
T z
Tz
( ) ( ) ( )
( )
= = + −
+ −
→ −1
10 10
1 1
C z C s T z T
T z T
s T z z
( ) ( ) ( ) ( )
( ) ( )
= = + − −
+ − −
→ −
+ 2 1
1
20 20
2 2
Forward Difference:
Backward Difference:
Trapezoidal
Approximation:
(Bilinear Transformation) (Tustin’s Approximation)
Question: what if the original system is 0 1 ( ) s
C s = +
(1 ) T
z − − T
(1 ) 1
Tz + T z −
( 1)
(2 ) (2 )
T z
T z T
+
+ − −
EX6.1 FREQUENCY RESPONSE COMPARISON Ex6.1 Frequency Response Comparison
Frequency (rad/sec)
Phase (deg); Magnitude (dB)
Sampling Period T = 1 sec
10-2 10-1 100 101
-100 -50 0 50 100 -20 -10 0 10 20 30 40
C(s)Forward Backward Tustin
Frequency (rad/sec)
Phase (deg); Magnitude (dB)
Sampling Period T = 0.5 sec
10-2 10-1 100 101
-100 -50 0 50 100 -20 0 20 40
C(s)Forward Backward Tustin
T = 0.5 T = 1.0
STABILITY REGIIONS Stability Regions
Forward Backward Trapezoidal
(Bilinear) (Tustin’s)
1 s z
T
→ − z 1
s Tz
→ − 2 1
1 s z
T z
→ −
+
1 1 1
Forward Difference Backward Difference Trapezoidal Approximation
s z
= z − +
1
1
FREQUENCY WARPING FOR TUSTIN’S METHOD Frequency Warping for Tustin’s Method
• Even though the stability regions are mapped exactly, the frequency is warped.
ω
j s
T z
z T
e
e T
e e
e e j
T
T
C
j T j T
j T j T
j T j T
D D
D
D D
D D
ω
ωω
ω
ω ω
ω ω
= → −
+ = −
+ = −
+ = F
HG I
−
KJ
−
2 1
1
2 1
1
2 2
2
2 2
2 2
tan
approximate
2 tan
2
C D
T T
ω → ⎛ ⎜ ⎝ ω ⎞ ⎟ ⎠
Di sc re te Fr eq ue nc y
p /T
Ideal
Warped
ω
D“WARP”
1931
FREQUENCY PREWIRING Frequency Prewarping
Warping will create mismatch in the response of the system which may be unacceptable if the controller design is based on precise frequency requirements (e.g., notch filter).
* 1
* 1
tan 2
* 1
i.e. ( ) ( )
* 1
tan 2
s z
T z
s z C z C s
T z ω ω
ω
ω → ⎛ ⎞ − +
⎜ ⎟
⎝ ⎠
→ − =
⎛ ⎞ +
⎜ ⎟
⎝ ⎠
j s
T z
z T
e
e T
e e
e e j
T
T
C
j T j T
j T j T
j T j T
D D
D
D D
D D
ω
ωω
ω
ω ω
ω ω
= → −
+ = −
+ = −
+ = F
HG I
−
KJ
−
2 1
1
2 1
1
2 2
2
2 2
2 2
tan
Original formula:
Solution: we can modify the bilinear transformation to match the continuous-time design at that specific frequency by using
“frequency prewarping”
EX6.2 BILINEAR TRANSFORMATION W/ PREWARPING
Ex6.2 Bilinear Transformation with Prewarping
G s ( ) = s s + +
10
2
10 Critical freq: ω * = 10 = 3162 .
* 1
* 1
tan 2 s z
T z
ω ω
→ −
⎛ ⎞ +
⎜ ⎟
⎝ ⎠
* 3.162
T=0.05 T=0.5
2 *
tan 3.1686 4.0410 2
T T
ω
ω
=
⎛ ⎞ =
⎜ ⎟
⎝ ⎠
EX6.2 CONT. Ex6.2 (cont.)
100 101 102
-200 -180 -160 -140 -120 -100 -80 -60 -40 -20 0
Phase (deg)
Frequency (rad/sec)
100 101 102
-120 -100 -80 -60 -40 -20 0 20
Magnitude (dB)
Sampling Period T = 0.05 sec
G(s)Tustin Prewarp
10-1 100 101
-180 -160 -140 -120 -100 -80 -60 -40 -20 0
Phase (deg)
Frequency (rad/sec)
10-1 100 101
-80 -70 -60 -50 -40 -30 -20 -10 0 10
Magnitude (dB)
Sampling Period T = 0.5 sec
G(s)Tustin Prewarp
DISCRETE-TIME EQUIVALENT OF PID CONTROLLERS Discrete-Time Equivalent of PID Controllers
u t K e t K e d K d
dt e t K e t
T e d T d
dt e t
P I
t
D P
I
t
( ) = ⋅ ( ) + ⋅ ( ) + ⋅ ( ) = L ( ) + ⋅ ( ) +
D⋅ ( )
NM O
z
0τ τ 1 z0 τ τ QP
C s K s K s K s
K T T s T s
PID D P I P I D
T s
II
( ) =
2+ + = c
2+ + 1 h
C s K s K s K s s
K T T s T s T s s
PID D P I
L
P I D I
I L
( ) = ( + + ) ( )
+ = + +
+
2 2
1
1
τ τ 1
c h
It is common to use the bilinear transformation to approximate the integral action, and to use the backward difference to
approximate the differentiation action. Reason: to avoid ringing due to the pole at z=-1.
For causality, an extra lag may be introduced
DISCRETE-TIME EQUIVALENT OF PID (CONT.) Discrete-Time Equivalent of PID (cont.)
( )
P( )
I 0t( )
Dd ( )
u t K e t K e d K e t
τ τ dt
= ⋅ + ⋅ ∫ + ⋅
( ) [ ]
[ ]
0
(Digital) (Digital) (Digital)
0
1 1
( ) ( ) ( ) ( )
2 1
( ) ( ) ( ) ( 1)
2
( ) ( ) ( ) ( 1)
P I D
k
I D
P I
j k
P I D
j
T z z
u k K e k K e k K e k
z Tz
K T K
K e k K T e j e k e k
T
K e k K e j K e k e k
=
=
+ −
= ⋅ + ⋅ ⋅ + ⋅ ⋅
−
⎛ ⎞
= ⎜ ⎝ − ⎟ ⎠ ⋅ + + ⋅ − −
= ⋅ + ⋅ + ⋅ − −
∑
∑
Eq.(6.9)
1 2 1
( ) ( ) ( ) ( )
2 1 1
P I D
T z z
u k K e k K e k K e k
z T z
+ −
= ⋅ + ⋅ ⋅ + ⋅ ⋅
− +
Problem with Tustin for D action A
EX6.5 DISCRETE PID CONTROLLER Ex6.5 Discretize PID Controller
C s K s K s K s s
s s
s s
PID D P I
L
( ) ( )
. . .
( . )
= + +
+ = + +
+
2 2
1
0 3 12 12 0 03 1 τ
Tustin’s Approximation:
Ramp Invariant:
Eq. (6.9) Approximation:
C z z z
z z
Tustin
( ) . . .
. .
= − +
− +
8 744 1714 8 401 1714 0 7143
2 2
C z z z
z z
Ramp
( ) . . .
. .
= − +
− +
8 684 17 02 8 344 1717 0 7165
2 2
C z z z
6 9 z z
3121 2 6119 30
. ( ) . . 1
( )
= − +
−
2 1
1 s z
T z
→ −
+
A
EX 6.5 (CONT.) Ex6.5 (cont.)
10-2 10-1 100 101 102 103
0 10 20 30 40 50
Magnitude (dB)
Digital Approximation of PID Controllers ( T = 0.01 sec)
10-2 10-1 100 101 102 103
-100 -50 0 50 100
Phase (deg)
CPID(s) Tustin Ramp Eq.(6.9)
RESPONSE INVARIANT METHOD Response Invariant Method
• To match the output of the discrete-time approximation to its continuous-time
counterpart under similar input signals.
C(s)
C(z)
u C (t) e(t)
e(kT) u D (kT)
u C (kT)
Goal: choose C(z) such that U C (z) = U D (z)
STEP INVARIANT Step Invariant
U s
C( ) = C s E s ( ) ⋅ ( ) and U z
D( ) = C z E z ( ) ⋅ ( )
C(s)
C(z)
u
C(t) e(t)
e(kT) u
D(kT)
u
C(kT)
( ) 1
E s = s 1
1( ) 1
E z = z
−−
U s C s
s U z C z
C
( ) = ( ) ⋅
D( ) = ( ) ⋅ z
−
−1 1
1
1and
[ ] 1 1
1( ) ( ) ( ) ( ) ( )
C C D
1
U z Z U s U z Z C s C z
s z
−⎡ ⎤
= = ⇒ ⎢ ⎣ ⋅ ⎥ ⎦ = ⋅ −
(
1) ( )
( ) 1 C s
C z = − z
−Z ⎡ ⎢ ⎤ ⎥ ZOH equivalent!
RAMP INVARIANT Ramp Invariant
• Invariant method results depend on input signals
( )
22
1 ( )
( ) z C s
C z Z
Tz s
− ⎡ ⎤
= ⎢ ⎣ ⎥ ⎦
U s
C( ) = C s E s ( ) ⋅ ( ) and U z
D( ) = C z E z ( ) ⋅ ( )
2
( ) 1
E s = s ( )
2( 1) E z Tz
= z
−
It looks quite similar to FOH-augmented form, but not the same.
EX6.3 RESPONSE INVARIANT METHODS Ex6.3 Response Invariant Methods
G s ( ) = s s + +
10
2
10
» help c2d
C2D Conversion of continuous-time models to discrete time.
SYSD = C2D(SYSC,TS,METHOD) converts the continuous-time LTI model SYSC to a discrete-time model SYSD with sample time TS.
The string METHOD selects the discretization method among the following:
'zoh' Zero-order hold on the inputs.
'foh' Linear interpolation of inputs (triangle appx.) 'tustin' Bilinear (Tustin) approximation.
'prewarp' Tustin approximation with frequency prewarping.
The critical frequency Wc is specified as fourth input by C2D(SYSC,TS,'prewarp',Wc).
'matched' Matched pole-zero method (for SISO systems only).
The default is 'zoh' when METHOD is omitted.
Ex6.3 (cont.)
C s z
z z C s z z
z z
C s z
z z C s z z
z z
STEP T RAMP T
STEP T RAMP T
( ) . .
. . , ( ) . . .
. .
( ) . .
. . , ( ) . . .
. .
. .
. .
= =
= =
= +
− + = + +
− +
= +
− + = + +
− +
0 05 2 0 05
2 2
0 5 2 0 5
2 2
0 01227 0 01207 1927 0 9512
0 00411 0 01622 0 004008 1927 0 9512
0 8679 0 7238 0 01487 0 6065
0 3267 1012 0 2525 0 01487 0 6065
-150 -100 -50 0
Phase (deg)
100 101 102
-80 -70 -60 -50 -40 -30 -20 -10 0 10
Magnitude (dB)
Sampling Period T = 0.05 sec
G(s)Step Invariant Ramp Invariant
-150 -100 -50 0
Phase (deg)
10-1 100 101
-25 -20 -15 -10 -5 0 5 10
Magnitude (dB)
Sampling Period T = 0.5 sec
G(s)Step Invariant Ramp Invariant
T=0.05 T=0.5
POLE-ZERO MATCHING APPROXIMATION Pole-Zero Matching Approximation
• The idea of the pole-zero matching method is that the relationship could be
reasonably applied to the zeros as well.
z e =
sTC(s) -> C PZ (z )
All poles of C(s) are mapped to C PZ (z) by .
All finite zeros of C(s) are mapped to C PZ (z) by . The infinite zeros of C(s) are mapped to the point . (all or all-1)
The gain of C PZ (z) is matched to that of C(s) at some critical point (frequency),
z e =
sTz e =
sTz = −1
=
ZEROS AT INFINITY
ME561 WINTER 2012
Real pole at s = − a ⎯
mapped to⎯⎯⎯ → z e =
−aT.
Complex poles at s = − + a jb ⎯
mapped to⎯⎯⎯ → z re =
− jθwhere r e =
−aTand θ = bT .
2. All finite zeros of C(s) are mapped to C
PZ(z) by z e =
sT(the same as the rules for the poles).
3. The zeros of C(s) at s → ∞ are mapped in C
PZ(z) to the point z = −1. This is equivalent to adding R zeros at z = −1 in C
PZ(z), where R is the relative degree of the continuous-time transfer function C(s). The rationale behind this rule is that the map of real frequencies from j ω = 0 to increasing w is onto the unit circle at z e =
j0= 1 to z e =
jπ= − 1. Thus, the point z = −1 represents, in a way, the highest frequency possible in the discrete domain. Hence, it is appropriate that if C(s) is zero at the highest continuous frequency, C
PZ( ) should be zero at z
z = −1, the highest frequency possible in a discrete implementation.
If no delay in the discrete response is desired, all zeros at s = ∞ are mapped to z = −1.
If relative degree is desired to be more truthful for physics or to leave time for the microprocessor to complete the output calculation, then one of the zeros at s = ∞ is mapped to z = ∞ and the others mapped to z = −1. With this choice, C
PZ(z) has one fewer finite zeros than poles.
4. The gain of the discrete-time transfer function C
PZ(z) is matched to that of the continuous-time transfer function C(s) at some critical point (frequency), i.e.
C s
s jC
PZz
j T( )
= *= ( )
z e *ω = ω
Example 6.4 Pole-Zero Matching Approximation
For the continuous-time transfer function used in Example 6.2 the pole-zero matching approximation for sampling periods T = 0.5 and 0.05 sec are:
100 101 102
-120 -100 -80 -60 -40 -20 0
Magnitude (dB)
Sampling Period T = 0.05 sec
-250 -200 -150 -100 -50 0
Phase (deg)
G(s)Pole-Zero Pole-Zero+Delay
10-1 100 101
-80 -70 -60 -50 -40 -30 -20 -10 0 10
Magnitude (dB)
Sampling Period T = 0.5 sec
-250 -200 -150 -100 -50 0
Phase (deg)
G(s)Pole-Zero Pole-Zero+Delay
ME561 Lecture 9- 24
Ex6.4 Pole-Zero Matching Approximation
G s ( ) = s s + +
10
2
10
100 101 102
-120 -100 -80 -60 -40 -20 0
Magnitude (dB)
Sampling Period T = 0.05 sec
100 101 102
-250 -200 -150 -100 -50 0
Phase (deg)
Frequency (rad/sec) G(s)Pole-Zero
Pole-Zero+Delay
10-1 100 101
-80 -70 -60 -50 -40 -30 -20 -10 0 10
Magnitude (dB)
Sampling Period T = 0.5 sec
10-1 100 101
-250 -200 -150 -100 -50 0
Phase (deg)
Frequency (rad/sec) G(s)Pole-Zero
Pole-Zero+Delay
ME561 WINTER 2012
C s z
z z
PZ( )T . ( )
. .
= . = +
− +
0 05
2 2
0 006085 1
1927 0 9512 and C s z
z z
PZ( )T . ( )
. .
= . = +
− +
0 5
2 2
0 3979 1
0 01487 0 6065
In addition, if computation delay is to be included in the discrete-time transfer function, then
C s z
z z
PZ( )T . ( )
. .
= . = +
− +
0 05 2
0 01217 1
1927 0 9512 and C s z
z z
PZ( )T . ( )
. .
= . = +
− +
0 5 2
0 7958 1
0 01487 0 6065
From the Bode diagrams (above), we see that, in general, the pole-zero matching will give reasonably good approximation of the continuous-time frequency response.
The pole-zero matching option used in the MATLAB ‘c2d’ command will introduce a computation delay in the conversion.
CoCommpaparriissoonn ooff tthehe AApppprrooxiximmaattiioon n ((EmEmuullaattioionn)) MMeetthohodsds
From the above discussion, we can conclude that the Tustin’s (bilinear) transformation (with or without prewarping), the ramp invariant approximation and the pole-zero matching methods will generally lead to satisfactory approximations. Both the Tustin’s and pole-zero matching methods are simpler than the ramp invariant method. Both the ramp invariant and pole-zero matching methods give correct sampled poles (satisfies z e= sT mapping). This is not true for the Tustin’s method. This difference is especially important when implementing notch filters where the Tustin’s method will generate frequency distortion. However, by using frequency prewarping technique with the Tustin’s transformation may reduce the effect of the distortion. Another potential problem with the Tustin’s transformation is that very fast poles of the continuous-time system will appear as discrete-time poles very close to z = −1, which will cause ringing in the digital system. Question: can this problem be solved by selecting a smaller sampling time T?
SeSelleeccttiioon n ooff SSaammpplliinng g RRaatte e
The choice of sampling rate depends on many issues. One way to determine the sampling period is to use continuous-time arguments. The sampled system can be approximated by a hold circuit, followed by the continuous-time system. For small sampling periods, the transfer function of the hold circuit can be approximates as
1 1 1 2
1 2
− ≈ − + − 2 + −
= − + −
e−
sT
sT sT sT
sT
b g
sTThe first two terms correspond to the series expansion of e−sT 2. That is, for small T, the hold can be approximated by a time delay of a half of a sampling period. Assume that the system’s phase margin can be reduced by 5∞ to 15∞. This gives the following rule of thumb
T
ω
C ≈ 015 0 5. to .where
w
C is the gain cross-over frequency (in rad/sec) of the continuous-time system. This implies that the sampling rate should be about 10 to 40 times larger than the cross-over frequency.6 6 .2 . 2 Di D is s cr c re e te t e - - T T i i me m e E E q q ui u i v v a a l l e e n n t t of o f P P I I D D C Co o n n tr t ro ol l l l e e rs r s
Many practical control problems are still solved by PID controllers or their variants. Therefore, it is important to know how to translate continuous-time PID to the discrete form. The “textbook”
version of a PID controller can be represented by:
COMPARISON OF APPROXIMATION METHODS
•
Tustin’s (bilinear) transformation, the ramp invariant approximation, pole-zero matching methods will generally lead to satisfactory
approximations
•
Both Tustin’s and pole-zero matching methods are simpler than the ramp invariant method.
•
Both the ramp invariant and pole-zero matching methods give correct sampled poles. (not true for Tustin’s method.)
•
Using Tustin’s method w/ prewiring will reduce the effect of the frequency distortion.
•
Tustin’s transformation will map very fast poles of the continuous-
OUTLINE
• Emulations
• Euler approximation
• Trapezoidal (Tustin, Bilinear) with Pre-warping
• Matched response (response invariant method)
• Matched pole/zero
• Zero-Order Hold (ZOH)
• Direct Design
• Frequency domain
DIRECT DESIGN Direct Design
• Not emulating.
• The continuous-time plant transfer function is first discretized. The discrete-time controller is designed directly in the discrete domain.
ZOH u(kT)
y(t) u(t)
G(z)
C(z)
e(kT) e(t) r(t)
G(s) +
-
G z Y z G z C z L z
CL
( ) ( ) ( ) ( ) ( )
= = =
EX6.6 — ROOT LOCUS DESIGN Ex6.6 – Root Locus Design
G s ( ) = s + 1
1
1
( )
11 1 1
( ) (1 ) (1 )
( 1) 1
T
T T
G s z z z e
G z z Z z Z
s s s z z z e z e
− − −
− −
⎡ ⎤ − −
⎡ ⎤ ⎛ ⎞
= − ⎢ ⎣ ⎦ ⎥ = − ⎢ ⎣ + ⎥ ⎦ = ⎜ ⎝ − − − ⎟ ⎠ = −
C z K
z
K z ( ) = z
− =
−
−
1
11
Integral control
1 1 1
1 0 1 1
1 0
+ = + −
− ⋅
− = ⇒ + −
− − =
−
−
−
G z C z e
−z e
K z
z K e z
z z e
T T
T
( ) ( ) ( )
T( )( )
G(s) = 1
s + 1
EX6.6 (CONT.) Ex6.6 (cont.)
e-T 1 -1
KMAX
Re(z) Im(z)
K e
MAX
e
T
= +
T−
−
2 1
−1
0
MAXT → K → ∞
MAX
2
T → ∞ K →
If an additional delay is introduced in the plant model to
accommodate the computation delay during implementation
( ) 1
( )
T T
G z e
z z e
−
−
= −
−
e-T 1 KMAX
Re(z) Im(z)
1 1 1
1 0 1 1
1 0
+ = + −
− ⋅
− = ⇒ + −
− − =
−
−
−
G z C z e −
z z e
K z
z K e
z z e
T T
T
( ) ( ) T
( )
( )
( )( )
K
MAX= 1
(1 )
1 0
( 1)( )
T
T
e z
K z z e
−
−
+ − =
− −
DISCUSSION Discussion
• Results on the previous page is significant because one would speculate that since a gain less than 2
results in stable closed-loop even for infinite sampling time, it will be safe (stable) under many benign
perturbations, such as one extra step of delay (with sampling time as small as desired), which turns to be not the case.
e
-T1 -1
K
MAXRe(z) Im(z)
→ ∞ →
EX6.6 Ex6.6
z 1
Unit Delay Step
Scope 1.1
Gain1 1.1
Gain
0.0952z
z -1.9048z+0.90482 Discrete
Transfer Fcn1 0.0952z
z -1.9048z+0.90482 Discrete
Transfer Fcn
T=0.1
SELECTION OF CLOSED-LOOP POLES
Selection of Closed-loop Pole Locations
• The closed-loop poles can be assigned either in the z- domain or the s-domain. It is a common practice to
assign the closed-loop poles in the s-domain first, then transform to the z-domain ( ).
• The main reason is that the pole locations in the s- plane correspond to time-domain specifications (rise time, settling time, etc.) directly. The poles in the z- plane need to be viewed and understood with the sampling time together.
• For example, a pole located at z=0.9 may be considered very slow when the sampling time T is 10 second, but extremely fast when T=0.0001 second.
z e =
sTMapping Between s-plane and z-plane
Constant ω n Constant ζ
ζ = C
1ω
n= C
1-0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 -1
-0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
σ = −3 σ = −5
ω = 4
ω = −4
σ = C
1Constant σ
ω = C
1Constant ω
T=0.05
FREQUENCY DOMAIN DESIGN Frequency Domain Design
• For continuous-time systems, frequency analysis is
achieved by evaluating G(s) on the j w axis, i.e. replacing the Laplace variable s with the complex number j w . For
discrete-time systems, the frequency response is
obtained by evaluating the pulse transfer function G(z)
on the unit circle, i.e. replacing the z-transform variable z with the complex number e j ω T .
• Since G(e j ω T ) is not a rational function of w , the simplicity of plotting logarithmic frequency response diagrams that are used in conventional frequency domain techniques will NOT carry through.
• This difficulty can be overcome by transforming the pulse transfer function in the z domain into that in the w
domain. The transformation is a bilinear transformation
commonly called the w transform. (trick!!)
MAGNITUDE PLOT Magnitude Plot
1 2
1 2
(1 )(1 ) (1 )
( ) (1 )(1 ) (1 )
b b bm
l
a a an
s s s
G s K
s s s s
τ τ τ
τ τ τ
+ + +
= + + +
( )
dB20log
10( )
G j ω = G j ω
10 10 1 10 10
20[log K log 1 j ωτ
blog 1 j ωτ
bml log j ω
= + + + + + −
− log
101+ j ωτ
a1− − log
101+ j ωτ
an]
1
b11
bmdB dB dB
K j ωτ j ωτ
= + + + + +
1
a11
andB dB dB
l j ω j ωτ j ωτ
− − + − − +
PHASE PLOT Phase Plot
1 2
1 2
(1 )(1 ) (1 )
( ) (1 )(1 ) (1 )
b b bm
l
a a an
s s s
G s K
s s s s
τ τ τ
τ τ τ
+ + +
= + + +
( ) (1 b 1 ) (1 bm )
G j ω = K + + j ωτ + + + j ωτ
* ( ) (1 a 1 ) (1 an )
l j ω j ωτ j ωτ
− − + − − +
W TRANSFORM w Transform
The w transform is defined by
z T w
T w
= +
−
1 2
1 2
b g b g w = T 2 z z − + 1 1
2 1
1 s z
T z
→ −
Bilinear transformation: +
Exact! Trick!
W TRANSFORM — FICTITIOUS FREQUENCY V w Transform—Fictitious Frequency ν
The behavior on the s plane over the frequency range maps to the range where
ν is the fictitious frequency on the w plane
−
12ω
S≤ ≤ ω
12ω
S−∞ < < ∞ v
W-TRANSFORM DESIGN PROCESS
ME561 Lecture 10- 15
w-Transform Design Process
Transform G(z) into G(w) by means of the w transformation G(w) may be treated as a conventional transfer function in the w domain.
Since G(jv) is a rational function of the fictitious frequency v, conventional frequency domain controller design
techniques, e.g. lead-lag compensator, loop shaping, QFT, ...etc, can be used in the w domain to design a controller C(w).
Once a controller is designed, the inverse w transformation can be applied to transform C(w) into C(z).
1
2
3
DESIGN PROCESS (CONT.) Design Process (cont.)
• Obtain G(z) from G(s) using an appropriate hold device. For a ZOH equivalent:
• Transform G(z) into G(w) in the w domain through the w transformation, i.e.
• Calculate the fictitious frequency response by substituting w = jv into G(w).
• Use your favorite frequency domain design method to find C(w) that satisfies your need.
• Transform the controller C(w) into the corresponding
G z z G s
( ) ( = − ) L s ( )
NM O
−
QP
1
1Z
G w G z
z T wT w
( ) = ( )
= +−
1 2
1 2
b g b g
Ex6.7 Controller Design in the w Plane
G s ( ) s s
( )
= +
1 1
Find a discrete time controller C(z) such that if the plant is
under digital control with sampling period T = 0.01 [sec], the following specifications are satisfied:
-Phase Margin (PM) > 40° at gain cross-over frequency greater than 1 [Hz]
-Gain margin (GM) > 10 dB at phase cross-over frequency greater than 1 [Hz]
- Steady state error < 5% for unit ramp input.
Ex6.7 (cont.)
1. Find G(z)
2. Transform G P (z) into the w-plane
5
1 1 1 1
2
( ) 1 4.9834 10 ( 0.9967)
( ) (1 ) (1 )
( 1) ( 1)( 0.99005)
G s
Pz
G z z Z Z z Z Z
s s s z z
−
⎡
−⎡ ⎤ ⎤
−⎡
−⎡ ⎤ ⎤ ×
−+
= − ⎢ ⎣ ⎣ ⎢ ⎥ ⎦ ⎦ ⎥ = − ⎣ ⎢ ⎣ ⎢ + ⎥ ⎦ ⎥ ⎦ = − −
z T w
T w
w
w G w G z
G w
w w w
w
w w
w w
w w
z w
w
= +
− = +
− ⇒ =
⇒ =
× +
− +
F HG I
+ KJ
− −
F HG I
KJ F + − −
HG I
KJ
=
⋅ F +
HG I
KJ F −
HG I KJ F +
HG I
KJ
= +
−
−
1 2
1 2
1 0 005 1 0 005
4 9834 10 1 0 005
1 0 005 0 9967 1 0 005
1 0 005 1 1 0 005
1 0 005 0 99005
1000036
12101212 1 1
200 0 999975 1
1 0 005 1 0 005 5
b g b g . . ( ) ( )
( )
. .
. .
. .
.
. .
. .
.
. .
Ex6.7 (cont.)
3. Design for ss error requirement
G w
E( ) L w G w C w
( ) ( ) ( )
= + =
+ 1
1
1 1
⇒ = = = = ⋅
+ ⋅
= + ⋅ =
+ ⋅ <
⇒ >
→∞ → → →
→ =
e e t wE w wG w R w w
G w C w w
G w C w w G w w C G
SS t w w E w
w w
C
lim ( ) lim ( ) lim ( ) ( ) lim
( ) ( )
lim ( ) ( ) ( ) ( ) .
( )
0 0 0 2
0 0
1 1
1 1
1
1 1
1 0 0 05
0 19
b g
Let C(0) = 20. is a unity gain transfer function C w ( ) = C ( ) 0 ⋅ C w ( )
C w ( )
Ex6.7 (cont.)
4. Figure out the dynamic requirement by plotting the loop transfer function
Phase (deg); Magnitude (dB)
1 0- 1 1 00 1 01 1 02 1 03
-1 2 0 -8 0 -4 0 0 4 0
G m = 2 0 .0 d B (W c g = 1 4 .1 ); P m = 1 2 .0 d e g . (W c p = 4 .4 )
-2 2 5 -1 8 0 -1 3 5 -9 0 -4 5
G w ( ) = G w C ( ) ( ) 0
Phase margin not enough
Gain crossover Frequency too Low (>1Hz)
Problem:
Phase (deg); Magnitude (dB)
10-1 100 101 102 103
-120 -80 -40 0 40
Gm=20.0 dB (W cg=14.1); P m=12.0 deg. (W cp=4.4)
-1 0 1 2 3
-225 -180 -135 -90 -45
Benefit of Lead Compensator
( ) 1 ( 1) 1
G s aTs a
Ts
= + >
+
- B.C. Kuo, Automatic Control Systems, 7thed. Prentice Hall