Digital Control 4 - Lecture Notes 2023
Digital Control 4 - Lecture Notes 2023
4.1 Introduction
References:
1. Franklin, Powell, Workman, “Digital Control of Dynamic
Systems”,3rd Ed., Adison-Wesley, 1998
2. R. Isermann, “Digital Control System”, Springer, 1989.
4-1
Digital Control System §4 Discrete Equivalence of Analog Controller
§4.1 Introduction
Consider a digital control system as shown below:
indirect method
In this case, our job is to design a digital controller D(z) such that
ADC+D(z)+DAC is a digital equivalence of a given analog
controller.
As a digital controller is designed in this method, it is called
indirect method or emulation technique.
direct method
In this case, our job is to design D(z) directly for the given G(z). When
4-2
Digital Control System §4 Discrete Equivalence of Analog Controller
Goal: Given r(t) and D(s), solve D(z) such that, if r*(t)=r(t) for all t=kT,
Problem:
when D(z) receives r*(t), all information of r(t) in the open time
interval kT< t <kT+T has been lost due to sampling, and it is
impossible to recover these lost information.
However, without these information, there is no way to know what
4-3
Digital Control System §4 Discrete Equivalence of Analog Controller
U ( s) 1
D( s )
E ( s) s 1
kT T kT
u(kT ) [u e]d [u e]d
0 kT T
To solve the above equation, we need to know u(t) and e(t) in the
open time interval kT-T < t < kT. Since these information has been lost
due to ADC, the best we can do is to make approximations.
The following are two approximation examples:
time interval kT−T< t < kT. Under this assumption, the above equation
can be reduced to
u(k ) u(k 1) T [e(k ) u (k )],
U ( z) T 1
D( z )
E ( z ) (1 T ) z 1 ( z 1) 1
Tz
4-4
Digital Control System §4 Discrete Equivalence of Analog Controller
kT T
kT T
[e(t ) u(t )]dt
2
[e(k ) u(k ) e(k 1) u(k 1)]
T
u(k ) u(k 1) [e(k ) u(k ) e(k 1) u(k 1)]
2
1 (T / 2) T /2
u(k 1) [e(k ) e(k 1)]
1 (T / 2) 1 T / 2
That is,
U ( z)
D( z )
E( z)
T ( z 1) 1
(2 T ) z T 2 [2( z 1) / T ( z 1)] 1
4-5
Digital Control System §4 Discrete Equivalence of Analog Controller
U ( s) b
D( s ) (4.1)
E ( s) s a
Therefore,
4-6
Digital Control System §4 Discrete Equivalence of Analog Controller
4-7
Digital Control System §4 Discrete Equivalence of Analog Controller
z 1
Forward difference rule s , also called Euler operator or
T
δ-operator.
z 1
Backward difference rule: s
Tz
(3) Trapezoidal (Tustin’s) rule:Assume
kT T
kT T [be( ) au( )]d 2 [(bek auk ) (bek 1 auk 1)]
for kT-T < t < kT, then Eq. (4.3) reduces to
4-8
Digital Control System §4 Discrete Equivalence of Analog Controller
bT ( z 1) b
D3 ( z ) (4.6b)
(2 aT ) z aT 2 ( 2 z 1) a
T z 1
2 z 1
Tustin’s rule: s
T z 1
Remarks:
Ex. G( s) Y ( s) b0
U ( s) s 2 a1s a0
State-space form
x1 y x1 x2
x2 y ' x2 b0u a1 y ' a0 y b0u a1 x2 a0 x1
z 1
(1) Forward rule: Let s
T
z 1
x1 sx1 ( ) x1 x2
T
zx1 x1 Tx2
4-9
Digital Control System §4 Discrete Equivalence of Analog Controller
z 1
同理 sx2 b0u a1x2 a0 x1 , ( ) x2 b0u a1 x2 a0 x1
T
zx2 x2 (b0u a1 x2 a0 x1 )T
x (k 1) x (k ) Tx (k )
1 1 2
x2 (k 1) x2 (k ) [b0u(k ) a1 x2 (k ) a0 x1 (k )]T
z 1
(2) Backward rule: Let s
Tz
z 1
( Tz ) x1 x2
( z 1) x2 b0u a1 x2 a0 x1
Tz
x1 z 1x1 Tx2
x1 (k ) x1 (k 1) Tx2 (k )
x2 (k ) x2 (k 1) T [b0u(k ) a1 x2 (k ) a0 x1 (k )]
1 T
x1 z x1 ( x2 z 1 x2 )
2
x2 z 1 x2 T (b0u a1 x2 a0 x1 ) T z 1 (b0u a1 x2 a0 x1 )
2 2
T
1x ( k ) x1 ( k 1) [( x2 ( k ) x2 (k 1)]
2
T
x2 ( k ) x2 ( k 1) [b0u(k ) a1 x2 (k ) a0 x1 (k )]
2
T
[(b0u(k 1) a1 x2 (k 1) a0 x1 (k 1))]
2
4-10
Digital Control System §4 Discrete Equivalence of Analog Controller
(a) Forward difference method maps the stable region on s-plane into the
whole z-plane, hence a stable D(s) may become an unstable D(z).
Therefore, this approach is not reliable.
(b) Backward difference method maps the stable region on the s-plane
into a small circle inside of the unit circle with relatively small ωN .
Hence it is unable to find an adequate D(z) for either a lightly damped
4-11
Digital Control System §4 Discrete Equivalence of Analog Controller
a2
|D(jw)| 2
2
(4.12)
w a2
the half power point of D(s) is the frequency ŵ a where |D(jwˆ )|2 1/ 2 .
~ of D (jw) is
|D3 (jw)|2 1/ 2 at the half power point w 3
2 aT
If aT / 2 1, tan-1 (aT / 2) aT / 2 , then w a , and for all w w ,
T 2
D3 (jw) becomes
4-12
Digital Control System §4 Discrete Equivalence of Analog Controller
~.
That is, there is no distortion in the frequency range w w
wT wT , 2 w
tan
2 2 T tan wT
2
Thus, w z 1
S
wT z 1
tan
2
4-13
Digital Control System §4 Discrete Equivalence of Analog Controller
Example 4.1:
All equivalence transforms are compared in this example using
1
D(s ) . The prewarping frequency is chosen to be wp w f ,
s 2s 2s 1
3 2
used are:
Tustin’s method with and without prewarping match D(s) precisely, while
forward and backward difference methods do not yield satisfactory results
at such a high ωs .
4-14
Digital Control System §4 Discrete Equivalence of Analog Controller
ws / w f 20
ws / w f 20
ws / w f 2
4-15
Digital Control System §4 Discrete Equivalence of Analog Controller
ws wp
Remarks:
All the previous four transformation yields D(z) of the same order, while
Tustin’s method with prewarping gives the best results in all cases.
4-16
Digital Control System §4 Discrete Equivalence of Analog Controller
where pˆ i e piT .
(2) Mapping all finite zeros in D(s) to zeros in D(z) using z=esT. That is if
m m
s
n (s ) ( 1) , it will be transformed into q( z ) ( z 1) , where
i zi zˆ
i i
zˆi e ziT .
(3) If D(s) has NP poles and NZ finite zeros, then r (r =NP - NZ -1) infinite
zeros of D(s) are mapped into r zeros at z =-1=e-j∞T=e-jπ
(4) Balance DC gain such that D(s)|s=0= D(z)|z=1.
The resultant D(z) has the following general form
where
Real poles/zeros in D(s) are mapped into real poles/zeros in D(z).
4-17
Digital Control System §4 Discrete Equivalence of Analog Controller
a
Example 4.2:Let D( s ) , then pole-zero mapping gives
sa
c( z 1)0 c
(1-3):pole-zero mapping D( z )
z e aT z e aT
c a
(4):dc gain D( z ) z 1 D( s) s 0
1 e aT a
aT
Hence c 1 e
1 e aT
and D( z )
z e aT
This result of pole-zero mapping is compared with results from
(i) Case I: ws / wp 2
4-18
Digital Control System §4 Discrete Equivalence of Analog Controller
4-19
Digital Control System §4 Discrete Equivalence of Analog Controller
Notice that, they all results in positive gain slope for ω/ωp > 2 ,
which will cause noise saturation to the control system.
In conclusion, to obtain satisfactory digital controller by emulation
method, it is necessary that the sampling rate has to satisfy ωs/ωc
> 2π, where ωc is the crossover frequency.
4.5:Hold equivalence
Goal: Given an analog controller H(s) and e(kT)= e(t), ∀t = kT, assume
samplers are ideal and the Nyquist sampling theorem is satisfied, the
If the hold element is an ideal lowpass filter, it can be shown that the
4-20
Digital Control System §4 Discrete Equivalence of Analog Controller
Therefore the resultant Hho(z) serves our complete need, except that , if
the hold is an ideal lowpass filter, the resultant Hho(z) will be non-causal.
Therefore, in reality, we can use only causal filter in figure (B) to deduce
Hho(z).
can apply the procedure to convert G(s) into G(z)) to obtain Hho(z) as
H ( s)
H ho ( z ) (1 z 1 )Z{L-1[ ]}
s
The difference between ZOH and an ideal lowpass will lead to
and uˆ (kT ) .
use a high order Butterworth filter for the hold. This is a thought in
filtering problem, but not suitable for feedback control.
The most popular hold equivalence in digital controller design is
ZOH and FOH.
a
Let D( s ) and assume that ZOH is adopted for the hold element,
sa
then we have
4-21
Digital Control System §4 Discrete Equivalence of Analog Controller
a
D( z ) (1 z 1 )Z{L1[ ]}
s( s a)
1 1
(1 z 1 )Z{L1[ ]}
s sa
(1 z 1 )Z{us (kT ) e akT us (kT )]}
1 1
(1 z 1 ){ }
1 z 1 1 e aT z 1
1 e aT
z e aT
4-22
Digital Control System §4 Discrete Equivalence of Analog Controller
The above two figures compare all discrete equivalence methods for
D(s)=a/(s+a) with bandwidth 1 Hz. Two cases are shown: fs =3Hz and
fs =15Hz.
All methods fail for the case fs =3Hz when ω>2Hz, while prewarped
bilinear transform (line e) gives barely acceptable approximation.
In case fs=15Hz, all methods give satisfactory results except forward
and backward difference methods.
s
D( s )
s 2 s 25
all methods fail for the case fs =3Hz, while prewarped bilinear transform
(line e) gives barely acceptable approximation.
In case fs =15Hz, all methods give satisfactory results except forward and
backward difference methods.
4-23
Digital Control System §4 Discrete Equivalence of Analog Controller
4-24
Digital Control System §4 Discrete Equivalence of Analog Controller
continuous:
*continuous:
u(t ) k p e(t ) D( s ) k p
*discrete:
u(k ) k p e(k ) D( z ) k p
u(t ) k p TD e(t ) u ( s ) D ( s ) e( s )
D( s ) k p TD S
TD : derivative time
4-25
Digital Control System §4 Discrete Equivalence of Analog Controller
e(k ) e(k 1)
u ( k ) k p TD ( ) u ( z ) D ( z ) e( z )
T
1 z 1 z 1
D ( z ) k p TD k p TD
T Tz
t
kp
u(t )
TI e(t )dt u( s) D( s)e( s)
t0
kp
D( s )
TI S
k pT
u(k ) u(k 1) e( k ) u ( z ) D ( z ) e( z )
TI
k pT k p Tz
D( z )
TI (1 z 1 ) TI ( z 1)
stability.
4.6.4 PD-control
e(k ) e(k 1)
u(t ) k p e(k ) k pTD [ ]
T
4-26
Digital Control System §4 Discrete Equivalence of Analog Controller
4.6.5 PI-control
t
kp kp
u ( t ) k p e( t )
TI e(t )dt (k p TI S
) e( s )
t0
k pTz
u(k ) ( k p ) e( k )
TI ( z 1)
kp
D( s ) ( k p k pTD S )
TI S
TD ( z 1) Tz
u(k ) k p (1 ) e( k )
Tz TI ( z 1)
4-27
Digital Control System §4 Discrete Equivalence of Analog Controller
4-28
Digital Control System §4 Discrete Equivalence of Analog Controller
4-29