Académique Documents
Professionnel Documents
Culture Documents
2. z-transform
3. Properties of z-transforms
y y*
9 12
1 3 5 7 9 11 t (sec) 1 3 6 t (sec)
T = 1 sec
y*
(a) (b)
9 12
3 6 t (sec)
T = 3 sec
(c)
Continuous signal and its discrete-time representation with different sampling rates
y* y*
t t
t = nT t t = nT t
y* (b)
(a)
Impulse area nT
t = nT t
(c)
From the response of a real sampler to the response of an ideal impulse sample
The Sampling Process
Impulse
y (t) Sampler y*
Laplacing
y (s) y(nT)L [ (t - nT)]
*
n 0
or y (s) y(nT) e -nTs
*
n 0
The Hold Process :
From Discrete to Continuous Time
discrete Continuous
impulses m* (t) m (t) output
Hold Device
Transfer Function :
Response of an impulse input : (t)
1
m* (t) m (t)
t T
-Ts
1 e 1
H(s) - 1 - e -Ts
s s s
First Order Hold
m(nT) - m[(n - 1)T]
m(t) m(nT) (t - nT)
T
nT t (n 1)T n 2,3,4....etc
T 2T
-1
Transfer function: 2
1 sT 1 - e -sT
H(S)
T s
First Order versus Zero Order Hold
m* (nT)
m (t)
m (t)
0 t
1T 3T 5T 7T 0 t
1T 3T 5T 7T
(a) (b)
0 t
1T 3T 5T 7T
(c)
Comparison of reconstruction with zero-order and first-order holds, for slowly varying signals.
m* (nT)
m (t)
m (t)
0 2T 4T 6T 8T 10T t
0 2T 4T 6T 8T 10T t
(a) (b)
0 2T 4T 6T 8T 10T t
(c)
Comparison of reconstruction with zero-order and first-order holds, for rapidly changing signals.
Z-Transforms
Sample
y(t) yz(t)
y ( s ) y ( n )e nTs
z
n 0
Let z eTs
y ( s ) y ( n ) z n
z
n 0
y( z )
y (t ) y(z)
z
y(n )z
n 0
-n
Remarks
1. z-transform depends only on the discrete values y(0), y(),y()..etc. If two
continuous functions have the same sampled values , then z-transform w
ill be the same.
Z[u(t)] 1 1 z 1 1 z 2 1 z 3 ......
1 z
1 z 1 z-1
2. Exponential Function
e
Ze -at anT
z n
n , e -aT z 1
n 0 n 0
1
1
1
-aT 1
1-e z
z
z-e -aT
e -aT z 1 1 for convergence
Z-Transforms of Basic Functions -
Continued
3. Ramp Function
4. Trigonometric Functions
zsinwT
Z sinwt 2
z 2zcoswT 1
z 2 zcoswT
Z coswt 2
z 2zcoswT 1
Z-Transforms of Basic Functions -
Continued
5. Translation
Z f(t - kT) Z
e
kTs
f (s)
f (z)z k
Z f(t - kT) f(nT kT)z n
n 0
l
f()z
-l
z
k
l 0
f (z) z k
Z-transform for Numerical
Derivative
z f(t - T) f (z)z 1
dy ynt yn 1
dt T
y n y n 1 1 z
Z
1
y(z)
T T
Properties of z-Transforms
1. Linearity
Z a f a f
1 1 2
2
a f (z) a f (z)
1 1 2 2
t z 1
Proof: (1-z )f y(z)(1 z ) y(nT ) z n y(nT ) z n y(nT ) z n 1
-1 -1
n0 n0 n0
y z T 1 z f z
1
2 1 z 1
Inversion of z-transforms
unit impluse 1 1
1
unit step 1/s 1 z 1
aTz 1
ramp: f(t) = at a/s2 (1 z 1 ) 2
n 1
lim (1) n
f(t) = tn n!/sn+1 a n 1 e aT z 1
a 0
1
f(t) = e-at 1/s+a 1 e aT z 1
e aT z 1
(1 e aT z 1 ) 2
f(t) =te-at 1/(s+a)2
z-transforms of various functions
In computer control:
measurements are taken periodically and
control actions implemented periodically,
This results in a discrete input/discrete
output dynamic system.
en cn
Discrete System
Example of Discrete Systems
Let dc
ken c
dt
a discrete time approximation is
cn cn 1
ken cn
T
cn cn 1 kcn cn
T T
(1 )cn cn 1 ken
T T
Taking z-transform
(1 ) c( z ) z 1 c( z ) ke( z )
T T
c( z ) k
or
e( z ) (1 ) z 1
T T
Z-transform for a given continuous
system with transfer function G(s)
and a ZOH
1 e Ts
Z H ( s )G ( s ) Z G (s)
s
G s Ts G s
Z Z e
s s
G s 1 G s
Z z Z
s s
G s
1 z Z
1
s
Example: Pure Integrator with Hold
1 e ST Kp
c*(s) s s y*(s
)
1 e Ts K p
HG p ( s)
s s
1 e Ts K p Kp K p e Ts
Z HG ( s ) Z [ . ] Z[ 2 ] Z[ 2 ]
s s s s
1
Kp 1
K pTz K pT z 1
[1 - z ] Z [ 2 ] [1 z ]
-1
s (1 z 1 ) 2 (1 z 1 )
Step response
Hence of 1
c( s )
s
1
c( z )
1 z 1
K p z 1 1 K p z 1
y ( z )
(1 z 1 ) (1 z 1 ) (1 z 1 ) 2
1 e ST K p
H ( s )G p ( s )
s ps 1
1 e ST Kp
Z [ HG ( s )] Z [ ]
s s ( p s 1)
1
Kp
[1 z ]Z [ ]
s( p s 1)
1 1
K p [1 z 1 ]Z [ ]
s s 1 p
1 1
K p [1 z 1 ][ 1
T p 1
]
1 z 1 e z
T
(1 e p ) z 1
Kp T
1 e p z 1
Step Response for 1st order
lag system
From tables, for
1 1
c( s ) c( z )
s 1 z 1
p
K p (1 e ) z 1
y(z)
(1 z 1 )(1 e p z 1 )
Kp Kp y(t)
(1 z ) (1 e p z 1 )
1
nT p
y (nT ) K p [1 e ]
y (t ) K p to t
time
Note: Compare with discrete approximation to
First-order system
Generalization
cn a 0en a1en 1 ... aken k b1cn 1
b 2cn 2 ... bmcn m
c( z ) a 0e( z ) a1 z 1e( z ) ... ak e( z ) z k
b1c( z ) z 1 b2 c( z ) z 2 ... bm c( z ) z m
or c( z ) a0 a1 z 1 a2 z 2 ... ak z k
1 2 m
D( z )
e( z ) 1 b1 z b2 z ... bm z
Remark
Note that D(z) is the z-transform of the response of the system t
o an impulse input e( z ) 1
Z-transform of a continuous
process with Sample and Hold
Hold Process
H (s) Gp (s)
discrete c*(s) y (s) y*(s)
input
discrete
continuous output
variables
1. Z G1 ( s)G2 ( s ) Z G1 ( s ) Z G2 ( s )
c1 c2
c3
G1(z) G2(z)
T
c3 ( z ) c2 ( z ) c3 ( z )
G3 ( z ) G1 ( z ) G2 ( z )
c1 ( z ) c1 ( z ) c 2( z )
Closed-Loop System
disturbance
Hold Process y2 ( s)
T e( z ) T
+ D (z) H (s) Gp (s)
y(2)
set m (s)
ysp (z) - ( z )
c y1(s)
point
y ( z )
sampled output
y ( z ) Z y ( s ) Z y1 ( s ) y 2 ( s )
Z y1 ( s ) Z y 2 ( s )
HG p ( z )e( z ) y 2 ( z )
HG p ( z ) D ( z )e( z ) y 2 ( z )
HG p ( z ) D ( z ) y sp ( z ) y ( z ) y 2 ( z )
or HG p ( z ) D ( z ) y sp ( z ) y 2 ( z )
y ( z )
1 HG p ( z ) D( z ) 1 HG p ( z ) D ( z )
and k p k c (1 b) z 1 1
y ( z ) 1
1 [ k p kc b(1 k p kc )]z (1 z 1 )
y ( nT )
k p kc
1 k p kc
1 e nT / p
p
p
1 k p kc
The response is very similar to continuous control.
1 b1 z -1 b2 z -2 ..... bn z -n 0
For an impulse imput e(z) 1 and C(z) D(z)
consider the k th term
Ck
f K (z) 1
1 - PK z
f k (nT) C K e nlnPK
Let PK j | PK | e jw
ln Pk ln(PK ) jw
e lnPK
e ln(PK )
e jw
Unstable
roots
real
STABLE
REGION
Unit
circle
Location of poles
Consider the impule response of a system with
1
D(z)
1 - P1 z 1
1 2 -2
y(z) 1
1 P1 z -1
P1 z ....
1 - P1 z
y(1) P1
na
y(nT) P1
if | P1 | 1, y(t) as t
0 Pi 1 then y(t) 0 : exponential decay
- 1 P1 0 then y(t) 0 : oscillatory
Example: Stability of closed-loop
1 [K P K C - b(1 K P K C )]z -1 0
P1 (1 K P K C )b - K P K C
-T
(1 K P K C )e P
- K PKC
-T -T
e P
K P K C [e P
1]
Example: Stability of closed-
loop - Continued
1 e - K P K C [1 - e ]
P P
-T -T
or(1 - e ) - K P K C [1 - e ]
P P
-T
or since e P
1 K P K C -1
-T
1 e P
or K P K C -T
P
1- e
note that instabity may be caused by high values of K C or high values of T
Digital Feedback - Control
1.Digital Apperoximation of classical controllers
Displacement form
t
1 de
C(t) K C [e(t) 0C
e(t)dt] s
dt
t 0
n
T
C n K C [e n (e k ) D (e n -e n-1 )] Cs
k 0 T
I
Alternative form :
Velocity form
n 1
T
C n-1 K C [e n-1 e k D (e n-1 -e n-2 )] Cs
k 0 T
I
T 2
C n K C [1 D ]e n -K C [1 D
]e n-1 K C D
e n-2
T
I T T
(z) T 2
D(z)
K C [(1 D )-(1 D
)z -1 D
z -2 ]
e (z) T
I T T
Advantages of velocity Form
Disadvantages:
1. Since different modes are indistinguishable, on-line tuning
methods will not work.
2. Difficult to put constraints on integral and / or derivative term.
time
Derivation of Deadbeat
Controller- Continued
HG(z)D(z)
y (z) ysp (z)
1 HG(z)D(z)
) 1 z 1
ysp z 1
; y z
1 z 1 z 1
y ( z ) z 1 HG(z)D(z)
)
ysp z 1 1 HG(z)D(z)
z -1 HG(z)D(z)
-1
1-z 1
z -1 1
D z -1
1-z HG(z)
Deadbeat
Deadbeat
0~10 sec
Deadbeat control for (1/(s+1)3)
Sampling time: 2
Ringing and Pole-placement
Ringing
refers to excessive value movement caused by a widely oscillati
ng controller output.
Change controller design such that poles are on the side or near zer
o on negative side
SYS = TF(1,[1 3 3 1])
Transfer function:
1
---------------------
s^3 + 3 s^2 + 3 s + 1
>> sysd=c2d(SYS,2)
Transfer function:
0.3233 z^2 + 0.3073 z + 0.01584
--------------------------------------
z^3 - 0.406 z^2 + 0.05495 z - 0.002479
Sampling time: 2
0.3233 0.6306 0.3231 0.0158
p2 =
>> c=conv(p1,p2)
c=
1.0000
-0.8958
-0.0547
c=
1.0000 -0.9900 0
>> c=conv(c,p3)
c=
Warning: Using a default value of 1 for maximum step size. The simulation step size will be limited to be
less than this value.
>>
Smoothing the Control Action
p=[0.3233 -0.016 -0.2915 -0.01584];
r=roots(p)
r=
1.0001
-0.8959
-0.0547
Delete the unstable pole z=-0.8959
c=
Scope1
Step
num(z) 1
den(z) den(s)
Subtract Zero-Order Scope
Discrete Transfer Fcn
Transfer Fcn Hold
1.4
1.2
0.8
0.6
0.4
0.2
0
0 5 10 15 20 25 30 35 40 45 50
The treatment of unstable
poles
sysd=c2d(SYS,1)
Transfer function:
0.0803 z^2 + 0.1544 z + 0.01788
-----------------------------------
z^3 - 1.104 z^2 + 0.406 z - 0.04979
p2 =
p1 =
1 -1
>> c=conv(p1,p2)
c=
ans =
-1.7990 1
1.0000 0.9
-0.1238 0.8
0.7
0.6
>> p1=[1 0];p2=[1 -0.99];p3=[1 0.1238];
>> c=conv(p1,p2) 0.5
0.4
c=
0.3
0.2
1.0000 -0.9900 0
0.1
>> c=conv(c,p3) 0
0 5 10 15 20 25 30 35 40 45 50
c=
0~10sec
0~50 sec
Dahlins Method for for (1/(s+
1)3)
T T
1 (1 e ) Z k 1 Z 3 0.406 Z 2 0.05495 Z 0.002479 (1 e
) Z k 1
D Z
HG ( Z )
T
T
0.3233Z 2 0.3073Z 0.01584
T
T
1 e Z 1 (1 e ) Z k 1 1 e Z 1 (1 e ) Z k 1
0.6321Z 1 0.2566 Z 2 0.03474 Z 3 0.001567 Z 4
Sampling time: 2
Regulatory Control
Consider a process described by
yn = a1yn-1 + a2yn-2 + + b1mn-1 + + bk mn-k
Remark
1. Problems can arise in practice if model parameters are not known
1 N
2. The above choice is equivalent to minimizing P (y n - y sp ) 2
N n 0