You are on page 1of 85

Z-Transforms and Transfer Functions

Ting Yan ( )

CS851: Feedback Control for Computer Systems


Outline
• Signals and Systems
• Z-Transforms
– How to do Z-Transforms
– How to do inverse Z-Transforms
– How to infer properties of a signal from its Z-
transform
• Transfer Functions
– How to obtain Transfer Functions
– How to infer properties of a system from its
Transfer Function

CS851: Feedback Control for Computer Systems


Signals
• The signals we are studying in this course –
Discrete Signals
– A discrete signal takes value at each non-negative
time instance
18

16

14

12

10

0
0 2 4 6 8 10 12

CS851: Feedback Control for Computer Systems


Example of a System
18
18

16
16

14
14

12
12

10
10

8
8

6
6

4
4

0
Filter 2

0 2 4 6 8 10 12 0
0 2 4 6 8 10 12

u(k  1)  u(k  2)  u(k  3)


raw readings from y(k) 
3
smooth temperature
a noisy temperature values after filtering
sensor - Output Signal
- Input Signal

A (SISO) system takes an input signal, manipulates it


and gives a corresponding output signal.

CS851: Feedback Control for Computer Systems


Control System

Reference Control Controller Control Target Measured


Input error Input System Output

Transduced Transducer
Output

CS851: Feedback Control for Computer Systems


Common Signals exponential
1
1

0.9
6
(ak)
5
0.8

0.5 impulse
0.7

0.6
4
a = 1.2
|a|>1
|a|<1
0.5 3

0.4
2
0.3
0
-1 0 1 2 3 4 5 6 7 8 9 0.2 1

0.1
0
0 -1 0 1 2 3 4 5 6 7 8 9
0 5 10 15

0.5
delayed impulse 0.5
1

sin (k*p i/ 6)

sine
0
-1 0 1 2 3 4 5 6 7 8 9
-0.5

-1
0 2 4 6 8 10 12 14 16 18
1

0.5 step 1

c o s(k*p i/ 6)
0.5
0
-1 0 1 2 3 4 5 6 7 8 9
0
cosine
-0.5

4
-1

ramp
0 2 4 6 8 10 12 14 16 18

3
exponentially
1

0.8

0.6

2 u (k) = c o s(k*p i/ 6 ) *0 .9 k

modulated
0.4

0.2

1 -0.2

-0.4 cosine/sine
-0.6

0 -0.8

-1 0 1 2 3 4 -1
0 2 4 6 8 10 12 14 16 18

CS851: Feedback Control for Computer Systems


Z-Transform of a Signal
u(k) Z U(z)
Z-1
u(0) u(0) · z0
u(1) +u(1) · z-1
u(2) +u(2) · z-2
u(3) +u(3) · z-3
u(4) +u(4) · z-4
… …

U(z)   u(k)  z k
k 0
CS851: Feedback Control for Computer Systems
Z-Transform – Cont’d
• Mapping from a discrete signal to a function
of z
– Many Z-Transforms have this form:
n

a z i
i
Rational Function of z
U(z)  i 0
m

b z j 0
j
j

• Helps intuitively derive the signal properties


– Does it converge?
– To which value does it converge?
– How fast does it converges to the value?

CS851: Feedback Control for Computer Systems


Z Transform of Unit Impulse Signal

uimpulse(k) Z Uimpulse(z)
Z-1
u(0) = 1 1 · z0
u(1) = 0 +0 · z-1
u(2) = 0 +0 · z-2
u(3) = 0 +0 · z-3
u(4) = 0 +0 · z-4
… …
1

0.5

0
Uimpulse (z)  1
-1 0 1 2 3 4 5 6 7 8 9

CS851: Feedback Control for Computer Systems


Delayed Unit Impulse Signal
udelay(k) Z Udelay(z)
Z-1
u(0) = 0 0 · z0
u(1) = 1 +1 · z-1
u(2) = 0 +0 · z-2
u(3) = 0 +0 · z-3
u(4) = 0 +0 · z-4
… …
1

0.5

0
Udelay (z)  z 1
-1 0 1 2 3 4 5 6 7 8 9

CS851: Feedback Control for Computer Systems


Z-Transform of Unit Step Signal
ustep(k) Z Ustep(z)
Z-1
u(0) = 1 1 · z0
u(1) = 1 +1 · z-1
u(2) = 1 +1 · z-2
u(3) = 1 +1 · z-3
u(4) = 1 +1 · z-4
… …
1

0.5
Ustep (z)  1 z 1  z 2  z 3  ...
0
-1 0 1 2 3 4 5 6 7 8 9

CS851: Feedback Control for Computer Systems


Unit Step Signal - continued
A little bit more math …
(1 a)(1  a  a 2
 ...  a n )
1 a  a 2
 ...  a n 
1 a
n 1
1 a

1 a
n  , assuming | a |  1,
(1  a)(1  a  a 2  ...  a n )
1 a  a  ...  lim
2
n 1 a
1 a n 1
 lim
n 1 a

1

1 a

1 2 3 1
Ustep (z)  1 z z z  ... 
1- z -1
CS851: Feedback Control for Computer Systems
Z-Transform of Exponential Signal
uexp(k) Z Uexp(z)
Z-1
u(0) = 1 1 · z0
u(1) = a +a · z-1
u(2) = a2 +a2 · z-2
u(3) = a3 +a3 · z-3 Remember
u(4) = a4 +a4 · z-4 this!

… …
6

4
a = 1.2 Uexp (z)  1 az 1  a 2 z 2  a 3 z 3  ...
1
3


2

1- az -1
1

0
-1 0 1 2 3 4 5 6 7 8 9

CS851: Feedback Control for Computer Systems


LTI Systems
• Linear, Time Invariant (LTI) System
– Many systems we analyze or design are or can be
approximated by LTI systems
– We have a well-established theory for LTI system
analysis and design
• Example - A simple moving average
– y(k)=[u(k-1)+u(k-2)+u(k-3)]/3

u(k) 3-MA y(k)

CS851: Feedback Control for Computer Systems


Control System

Reference Control Controller Control Target Measured


Input error Input System Output

Transduced Transducer
Output

CS851: Feedback Control for Computer Systems


What does “Linear” mean exactly?
• Scaling u(k) 3-MA y(k)

λu(k) 3-MA λy(k)

• Superposition u1(k) 3-MA y1(k)

u2(k) 3-MA y2(k)

u1(k)+u2(k) 3-MA y1(k)+y2(k)

CS851: Feedback Control for Computer Systems


Time Invariance
u(k) 3-MA y(k)

u’(k)=u(k-n) 3-MA y’(k)=y(k-n)

Idiom:
u(k-n) is u(k) y(k+1)=[u(k)+u(k-1)+u(k-2)]/3
delayed by n time
units!
y(k+1-n)=[u(k-n)+u(k-1-n)+u(k-2-n)]/3

y’(k+1)=[u’(k)+u’(k-1)+u’(k-2)]/3

CS851: Feedback Control for Computer Systems


Reality Check
• Typically speaking, are computing systems
linear? Why?
– Consider saturation …
• Typically speaking, are computing systems
time-invariant? Why?

CS851: Feedback Control for Computer Systems


Unit Impulse Response
uimpulse(k) 3-MA yimpulse(k)

1 1

0.5 0.5

0 0
-1 0 1 2 3 4 5 6 7 8 9 10 -1 0 1 2 3 4 5 6 7

u(k  1)  u(k  2)  u(k  3)


y(k) 
3
Claim:
If we know yimpulse(k), we can obtain y(k) corresponing to
ANY input u(k)!
yimpulse(k) contains ALL information about
the input-output relationship of an LTI system.

CS851: Feedback Control for Computer Systems


An Example: 3-MA
uimpulse(k) 3MA yimpulse(k)
1 1

0.5 0.5

0 0
-1 0 1 2 3 4 5 6 7 -1 0 1 2 3 4 5 6 7

u (k) 3MA y (k) ?


1 uimpulse(k)
0.5

9
6x 0
-1 0 1 2 3 4 5 6 7

8 +
7 1 uimpulse(k-1)
6
9x 0.5

u(k) =
5 -1 0 1 2 3 4 5 6 7

+
4

3 1
uimpulse(k-2)
2
3x 0.5

1 0
-1 0 1 2 3 4 5 6 7
0
-1 0 1 2 3 4 5 6 7
+…

CS851: Feedback Control for Computer Systems


An Example: 3-MA
uimpulse(k) 3MA yimpulse(k)
1 1

0.5 0.5

0 0
-1 0 1 2 3 4 5 6 7 -1 0 1 2 3 4 5 6 7

u (k) 3MA y (k) ?


1 yimpulse(k)
0.5

9
6x 0
-1 0 1 2 3 4 5 6 7

8 +
7 1 yimpulse(k-1)
6
9x 0.5

y(k) =
5 0
-1 0 1 2 3 4 5 6 7

+
4

3 1 yimpulse(k-2)
2
3x 0.5

1
0
-1 0 1 2 3 4 5 6 7
0
-1 0 1 2 3 4 5 6 7
+…

CS851: Feedback Control for Computer Systems


Convolution
• y(5)= u(0) · yimpulse(k) k 1

+ u(1) · yimpulse(k-1) y(k)  [u(i)  y impulse (k  i)]


i 0
+ u(2) · yimpulse(k-2)  u(k) * y impulse (k)
+ u(3) · yimpulse(k-3)
+ u(4) · yimpulse(k-4) 1 yimpulse(k)
0.5

9
u(0) x 0
-1 0 1 2 3 4 5 6 7

8 +
7 1 yimpulse(k-1)
6
u(1) x 0.5

y(k) =
5 0
-1 0 1 2 3 4 5 6 7

+
4

3 1 yimpulse(k-2)
2
u(2) x 0.5

1
0
-1 0 1 2 3 4 5 6 7
0
-1 0 1 2 3 4 5 6 7
+…

CS851: Feedback Control for Computer Systems


Important Theorem
Time Domain

u(k)
* v(k) = y(k)
(convolution)

Z Z-1 Z Z-1 Z Z-1

U(z) · V(z) = Y(z)


(multiplication)

Z Domain
CS851: Feedback Control for Computer Systems
Z-Transform/Inverse Z-Transform
u (k)=0.7k LTI: yimpuse(k)=0.3k-1 y (k)?

1 1 1

0.9 0.9 0.9

* =
0.8 0.8 0.8

0.7 0.7 0.7

0.6 0.6 0.6

0.5 0.5 0.5


0.4
(convolution)
0.4
0.4
0.3 0.3
0.3
0.2 0.2
0.2
0.1 0.1
0.1
0 0
0 5 10 15 0 2 4 6 8 10 12 14 16 18 0
0 5 10 15

Z Z Transfer Z-1
Function

1 -1 z 1
1 0.7z 1
· z
1 0.3z 1
= (1 0.3z 1)(1  0.7z 1)
(multiplication)

CS851: Feedback Control for Computer Systems


Delay the Unit Step Signal
y(k)=u(k-1)

LTI: yimpuse(k)
u (k) y (k)
=udelayed(k)
1 1 1

0.5 0.5 0.5

0 0
-1 0 1 2 3 4 0
-1 0 1 2 3 4 5 6 7 8 9 -1 0 1 2 3 4 5 6 7 8 9

ustep (k)
* udelayed(k) = udstep(k)

Z
(convolution)
Transfer
Z
Function Z
1 z -1
1 z 1
· z-1 = 1 z 1
(multiplication)

CS851: Feedback Control for Computer Systems


Delayed Unit Step Signal – Cont’d

udstep(k) Z Udstep(z)
Z-1
u(0) = 0 0 · z0
u(1) = 1 +1 · z-1
u(2) = 1 +1 · z-2
u(3) = 1 +1 · z-3 Remember
u(4) = 1 +1 · z-4 this!

… …
1
Udstep (z)  z 1  z 2  z 3  ...
0.5

z -1 1
0  
-1 0 1 2 3 4 5 6 7 8 9
1- z -1 z 1

CS851: Feedback Control for Computer Systems


Transfer Function
• Transfer function provides a much more intuitive way
to understand the input-output relationship, or system
characteristics of an LTI system
– Stability
– Accuracy
– Settling time
– Overshoot
– …

CS851: Feedback Control for Computer Systems


Signals and Systems in Computer
Systems
1
Spike, one-time fluctuation in input/output,
0.5
or disturbance
0
-1 0 1 2 3 4

0.5 Change of reference value


0
-1 0 1 2 3 4 5 6 7 8 9

12

10

6
Multiple changes of reference value
4
-Sum of delayed step signals
ustep(k)+8ustep(k-3)-4ustep(k-6)
2

0
0 1 2 3 4 5 6 7 8 9 10

Input got delayed for n time units


y(k)=u(k-n)
CS851: Feedback Control for Computer Systems
n-Delay
y(k)=u(k-n)

1, k n
y impulse (k)  u n delay (k)   Yimpulse (z)  z n
0, otherwise

Y(z) z nU(z)

U(z)  u(0)  u(1)z 1  u(2)z 2  u(3)z 3  ...

Y(z) y(0)  ...  y(n  1)z n 1  y(n)z n  y(n  1)z n 1  y(n  2)z n 2  y(n  3)z n 3  ...
 0  ...  0z n 1  u(0)z n  u(1)z n 1  u(2)z n 2  u(3)z n 3  ...
 z -nU(z)
Transfer function: z-n
CS851: Feedback Control for Computer Systems
Unit Shift and n-Shift
y(k)=u(k+1)
1 1

0.5 0.5

0 0
-1 0 1 2 3 4 5 6 7 8 9 -1 0 1 2 3 4 5 6 7 8 9

Caveat: u(0) disappears

U(z)  u(0)  u(1)z 1  u(2)z 2  u(3)z 3  ...

Y(z) y(0)  y(1)z 1  y(2)z 2  y(3)z 3  ...


Y(z) zU(z) zu(0)
 u(1)  u(2)z 1  u(3)z 2  u(4)z 3  ...

y(k)=u(k+n) Y(z) znU(z) zn u(0)  ...  zu(n - 1)

CS851: Feedback Control for Computer Systems


Other properties of Z-Transform
• Linearity
Time Domain Z-Transform

Scaling y(k)=au(k) Y(z)=aU(z)

Superposition y(k)=u(k)+v(k) Y(z)=U(z)+V(z)

CS851: Feedback Control for Computer Systems


sin? cos?
1

0.5
sin (k*p i/ 6 )

-0.5

-1
0 2 4 6 8 10 12 14 16 18

c o s(k*p i/ 6 )
0.5

-0.5

-1
0 2 4 6 8 10 12 14 16 18

CS851: Feedback Control for Computer Systems


From Exponential to Trigonometric
Uexp (z)  1 az 1  a 2 z 2  a 3 z 3  ... ? Z[cos(kθ)]?
1
 Z[sin(kθ)]?
1- az -1

Euler Formula: e i  cos   isin

e   cos(  )  isin( )  cos   isin

e i  e  i e i  e i
cos   sin  
2 2i

CS851: Feedback Control for Computer Systems


Z-Transform of sin/cos
Time Domain Z-Transform
1
u(k)  e ik U(z)  i
1- e  z -1

u(k)  e -ik 1
U(z) 
1- e -i  z -1
1 1
ik  ik U(z)  (  )/2
e e i i
1- e  z 1 e  z 1
-1

u(k)  cos(k  )  1 1
2 (  )/2
1 cos   z  isin  z
1 1
1 cos   z  isin  z 1
1

1 cos   z 1

(1 cos   z 1)2  (sin   z 1)2
1 cos   z 1

1 2cos   z 1  z 2
e ik  e  ik
u(k)  sin(k  )  sin   z -1
2i U(z) 
1- 2cos   z -1  z 2

CS851: Feedback Control for Computer Systems


Exponentially Modulated sin/cos
1

0.8

0.6
u (k) = c o s(k*p i/ 6 )*0 .9 k
0.4

0.2

-0.2

-0.4

-0.6

-0.8

-1
0 2 4 6 8 10 12 14 16 18

i k  i k
(ae i k
)  (ae  i k
) (ae )  (ae )
u expcos (k)  a cos(k  ) 
k
u expsin (k)  a sin(k  ) 
k

2 2i

a  sin   z -1 a  sin   z -1
U(z)  U(z) 
1- 2a  cos   z -1  a 2 z 2 1- 2a  cos   z -1  a 2 z 2

A damped oscillating signal – a typical output of a second order system

CS851: Feedback Control for Computer Systems


An LTI System – Discrete Integrator
y(k)=y(k-1)+u(k-1)
Y(k)=u(k-1)+u(k-2)+…+u(1)+u(0)

u (k) LTI: yimpuse(k) y (k)


4

=udstep(k) 3

1 1
1

0.5
0. 5

0
0
-1 0 1 2 3 4 0
-1 0 1 2 3 4 -1 0 1 2 3 4

ustep(k)
* udstep(k) = uramp(k)
Z
Transfer
(convolution)
Function Z Z-1
z -1
1
1 z 1
· z -1
1 z 1
= (1 z 1)2
(multiplication)

CS851: Feedback Control for Computer Systems


Inverse Z-Transform
u(k) Z U(z)
Z-1?

• Table Lookup – if the Z-Transform looks familiar,


look it up in the Z-Transform table!
3 2z 1
u(k)  3u step (k)  2u ramp (k)
Z-1? U(z)  
1 z 1 (1 z 1)2
 3Ustep (z)  2Uramp (z)
• Long Division
• Partial Fraction Expansion

CS851: Feedback Control for Computer Systems


Long Division
• Sort both nominator and denominator with descending
order of z first

3  z 1
U(z) 
1 2z 1  z 2

• u(0)=3, u(1)=5, u(2)=7, u(3)=9, …, guess:


u(k)=3ustep(k)+2uramp(k)
CS851: Feedback Control for Computer Systems
Partial Fraction Expansion
• Many Z-transforms of interest can be expressed as
division of polynomials of z
m cj
U(z)  c 0  
n

 i
a z i

j1 z p j
U(z)  i 0
m

 j
b
j 0
z j May be trickier:
complex root
z 1
1
duplicate root 1 p jz 1

m
u(k)  c 0u impulse (k)   u p j dexp (k)
b 0  b 1z  b 2 z 2  ...  b m zm j1
 b m (z  p 1)(z  p 2 )...(z  p m )
k 1
where u p j dexp (k)  p j , k>0

CS851: Feedback Control for Computer Systems


An Example

3z 2  14z  14 c1 c
U(z)  U(z)  c 0   2
z 2  6z  8 z2 z4

(z-2)(z-4)

U1(z)=c0 Z-1 u1(k)=c0*uimpulse(k)

c1
U2 (z) 
z2 Z-1 u2(k)=c1*2k-1, k>0
c
U3 (z)  2
z4 Z-1 u2(k)=c2*4k-1, k>0

c , k0
u(k)   0 k 1 k 1
c 0? c 1 ? c 2 ?
c
 1  2  c 2  4 , k0

CS851: Feedback Control for Computer Systems


Get The Constants!

3z 2  14z  14 c1 c
U(z)  U(z)  c 0   2
z 2  6z  8 z2 z4

(z-2)(z-4)

c1 c 3z 2  14z  14
U(z)  c 0   2 , z  , U(z)  c , c 0  lim 2 3
z2 z4 0
z  z  6z  8

c 1(z  4)
K(z) (z - 4)U(z)  (z  4)c 0  c 2,
z2
3z 2  14z  14
K(4)  c 2  | z 4  3
z2

CS851: Feedback Control for Computer Systems


Partial Fraction Expansion – cont’d
n

a z i
i
m cj
U(z)  i 0
U(z)  c 0  
z p j
m

b z
j 0
j
j j1

How to get c0 and cj’s ?

c 0  lim U(z)
z 

define Up j (z)  (z - p j )U(z)

c j  Up j (p j )

CS851: Feedback Control for Computer Systems


An Example – Complete Solution

3z 2  14z  14 c1 c
U(z)  U(z)  c 0   2
z 2  6z  8 z2 z4

3z 2  14z  14
c 0  lim U(z)  lim 2 3
z  z  z  6z  8

3z 2  14z  14
U2 (z)  (z  2)
z 2  6z  8 3  2 2  14  2  14
c 1  U2 (2)  1
3z 2  14z  14 2 -4

z-4
3  4 2  14  4  14
3z  14z  14
2 c 2  U4 (4)  3
U4 (z)  (z  4) 4 -2
z 2  6z  8
3z 2  14z  14

z-2

1 3 3, k0
U(z)  3   u(k)   k 1 k 1
z2 z4 2  3  4 , k  0
CS851: Feedback Control for Computer Systems
Solving Difference Equations
y(k)  a 1y(k  1)  ...  a n y(k  n)  b 1u(k  1)  ...  b m u(k  m)

Z
Y(z) a 1z 1Y(z) ...  a n z n Y(z) b 1z 1U(z) ...  b m z m U(z)

b 1z 1  ...  b m z m
Y(z) 1 n
U(z)
1 a 1z  ...  a n z

Z-1 Transfer
y(k)  ... Function

CS851: Feedback Control for Computer Systems


A Difference Equation Example

Exponentially Weighted Moving Average

y(k)=cy(k-1)+(1-c)u(k-1)

CS851: Feedback Control for Computer Systems


Solve it!
u (k)=0.8k LTI: y(k)=0.4y(k-1)+0.6u(k-1) y (k)?

Z
Z
Y(z) 0.4z 1Y(z) 0.6z 1U(z)

1
U(z)  0.6z 1 0.6z -1
1 0.8z 1 Y(z) U(z) 
1 0.4z 1 (1- 0.4z -1)(1- 0.8z -1)
0.6z  0.6 1.2
  
1 (z  0.4)(z  0.8) z  0.4 z  0.8 1

0.8
 0.6z 1 1.2z 1 0.8

 
1 0.4z 1 1 0.8z 1
0.6 0.6

0.4 0.4

Z -1
0.2 0.2

0 0
-1 0 1 2 3 4 5 6 7 8 9 -1 0 1 2 3 4 5 6 7 8 9

y(k)  -0.6  0.4 k 1  1.2  0.8 k -1


CS851: Feedback Control for Computer Systems
Signal Characteristics from Z-Transform
• If U(z) is a rational function, and

y(k)  a 1y(k  1)  ...  a n y(k  n)  b 1u(k  1)  ...  b m u(k  m)

• Then Y(z) is a rational function, too


zeros
n

N(z) (z  z ) i
Y(z)  i1
m
D(z)
(z  p
j1
j )
poles

• Poles are more important – determine key


characteristics of y(k)

CS851: Feedback Control for Computer Systems


Why are poles important?

Z domain n

N(z) (z  z ) i m cj
Y(z)  i1
c0 
D(z) m
z p j
(z  p j)
j1
j1

poles

Z-1
Time domain
m
Y(k)  c 0  u impulse (k)   c j  p kj -1
j1

components

CS851: Feedback Control for Computer Systems


Various pole values (1)
2.5
2.5
2

1.5
2
1

1.5 0.5

0
1
-0.5

0.5
p=1.1
-1

-1.5 p=-1.1
-2
0
-1 0 1 2 3 4 5 6 7 8 9
-2.5
-1 0 1 2 3 4 5 6 7 8 9

0.8
1
0.6

0.8 0.4

0.2

p=-1
0.6

p=1
0

-0.2
0.4
-0.4

0.2 -0.6

-0.8

0 -1
-1 0 1 2 3 4 5 6 7 8 9 -1 0 1 2 3 4 5 6 7 8 9

1
1
0.8

0.6
0.8
0.4

0.6 0.2

0.4
p=0.9 -0.2

-0.4
p=-0.9
0.2
-0.6

-0.8
0
-1 0 1 2 3 4 5 6 7 8 9
-1
-1 0 1 2 3 4 5 6 7 8 9

CS851: Feedback Control for Computer Systems


Various pole values (2)
1 1

0.9 0.8

0.8
0.6
0.7
0.4
0.6
0.2
0.5
0
0.4
-0.2
0.3

0.2

0.1
p=0.9 -0.4

-0.6 p=-0.9
-0.8
0
-1 0 1 2 3 4 5 6 7 8 9
-1
-1 0 1 2 3 4 5 6 7 8 9

1 1

0.9 0.8

0.8 0.6

0.7 0.4

0.6 0.2

0.5

p=0.6 p=-0.6
0
0.4
-0.2
0.3
-0.4
0.2
-0.6
0.1
-0.8
0
-1 0 1 2 3 4 5 6 7 8 9 -1
-1 0 1 2 3 4 5 6 7 8 9

1 1

0.9 0.8

0.8 0.6

0.7
0.4
0.6
0.2
0.5

0.4
p=0.3 0

-0.2
p=-0.3
0.3
-0.4
0.2
-0.6
0.1
-0.8
0
-1 0 1 2 3 4 5 6 7 8 9
-1
-1 0 1 2 3 4 5 6 7 8 9

CS851: Feedback Control for Computer Systems


Conclusion for Real Poles
• If and only if all poles’ absolute values are
smaller than 1, y(k) converges to 0
• The smaller the poles are, the faster the
corresponding component in y(k) converges
• A negative pole’s corresponding component is
oscillating, while a positive pole’s
corresponding component is monotonous

CS851: Feedback Control for Computer Systems


How fast does it converge?
• U(k)=ak, consider u(k)≈0 when the absolute
value of u(k) is smaller than or equal to 2% of
u(0)’s absolute value
| a | k  0.02 1

kln| a |  ln0.02  3.912 0.9

0.8
y(k)=0.7 k
4
k 0.7
ln| a | 0.6

Remember 0.5

This! 0.4

0.3
a  0.7 0.2
y( 11)=0.0198

4 4
k   11 0.1

ln| 0.7 |  0.36 0


0 2 4 6 8 10 12

CS851: Feedback Control for Computer Systems


Example
u (k)=0.8k LTI: y(k)=0.4y(k-1)+0.6u(k-1) y (k)?

Z
Z
Y(z) 0.4z 1Y(z) 0.6z 1U(z)

1
U(z)  0.6z 1 0.6z -1
1 0.8z 1 Y(z) U(z) 
1 0.4z 1 (1- 0.4z -1)(1 - 0.8z -1)
Y(z) 0.6
G(z)  
U(z) z  0.4
Z -1

y(k)  a  0.4 k 1  b  0.8 k 1


CS851: Feedback Control for Computer Systems
When There Are Complex Poles …
b 1z 1  ...  b m z m
Y(z) 1 n
U(z)
1 a 1z  ...  a n z
(az 2  bz  c)...
 b  b 2  4ac
z
2a
If b 2  4ac  0,
 b  b 2  4ac  b  b 2  4ac
az  bz  c  a(z 
2
)(z  )
2a 2a

If b 2  4ac  0, az  bz  c  a(z 
2  b  i 4ac  b 2
)(z 
 b  i 4ac  b 2
)
2a 2a

Or in polar coordinates,

az 2  bz  c  a(z  r cos θ  ir sin θ )(z  r cos θ  ir sin θ )

CS851: Feedback Control for Computer Systems


What If Poles Are Complex
• If Y(z)=N(z)/D(z), and coefficients of both D(z) and
N(z) are all real numbers, if p is a pole, then p’s
complex conjugate must also be a pole
– Complex poles appear in pairs

l cj c c'
Y(z) c 0    
j1 z p j z  r cos θ  ir sin θ z  r cos θ  ir sin θ
l cj bzr sin θ  dz(z  r cos θ )
c0  
j1 z p j z 2  (2r cos θ )z  r 2

Z-1
Time domain m
y(k)  c 0  u impulse (k)   c j  p kj -1  br k sinkθ  dr k cosk θ
j1

CS851: Feedback Control for Computer Systems


An Example
Z-Domain: Complex Poles

1.5 Time-Domain:
Exponentially Modulated Sin/Cos
z2  z
Y(z) 2
1 z  0.8z  0.64
kπ kπ
y(k)  2  0.8 k  sin( )  0.8 k  cos( )
0.5
3 3

-0.5

-1
0 2 4 6 8 10 12 14 16 18 20

CS851: Feedback Control for Computer Systems


Poles Everywhere

CS851: Feedback Control for Computer Systems


Observations
• Using poles to characterize a signal
– The smaller is |r|, the faster converges the signal
• |r| < 1, converge
• |r| > 1, does not converge, unbounded
• |r|=1?
– When the angle increase from 0 to pi, the frequency of oscillation
increases
• Extremes – 0, does not oscillate, pi, oscillate at the maximum frequency

CS851: Feedback Control for Computer Systems


Change Angles

0.8 1

0.6 0.8

0.4 0.6
1
0.2 0.4
0.8
0 0.2
0.6
-0.2 0
0.4
-0.4 -0.2

0.2 -0.6 -0.4

0 -0.8 -0.6

-1 -0.8
-0.2 0 5 10 15
-1
-0.4 0 5 10 15

1
-0.6
0.8
-0.8
0.6
-1
0 5 10 15 0.4
1
0.2
0.8
0
0.6
-0.2

0.4 -0.4

0.2 -0.6

Im
0 -0.8

-1
-0.2 0 5 10 15

-0.4

-0.6

-0.8
1
-1
1 0 5 10 15 0.8

0.8 0.6

0.4
0.6
0.2
0.4
0
0.2
-0.2
0
-0.4
-0.2
-0.6
-0.4
-0.8
-0.6
-1
0 5 10 15
-0.8

-1
0 5 10 15

0.8 1

0.6

0.4

0.2
-0.9 0.9 Re 0.8

0.6

0.4

0 0.2

-0.2 0

-0.4 -0.2

-0.6 -0.4

-0.8 -0.6

-1 -0.8
0 5 10 15
-1
0 5 10 15

CS851: Feedback Control for Computer Systems


Changing Absolute Value
1 1

0.8
0.8

1 0.6
0.6
0.4
0.4 0.8
0.2
0.2 0.6
0
0.4
0
-0.2 4
0.2
-0.2 -0.4

-0.4 0
-0.6

-0.6 -0.2 -0.8 3

-0.8 -0.4 -1
0 5 10 15

-1 -0.6
0 5 10 15 2
-0.8

-1
0 5 10 15

12
0

-1
1

0.8
10

Im
0.6

0.4
-2

0.2

-0.2 8 -3
0 2 4 6 8 10 12 14
-0.4

-0.6

-0.8

-1
0 5 10 15

Re 2

1 0

-2

-4

-6
0 2 4 6 8 10 12 14
CS851: Feedback Control for Computer Systems
Conclusion for Complex Poles
• A complex pole appears in pair with its
complex conjugate
• The Z-1-transform generates a combination of
exponentially modulated sin and cos terms
• The exponential base is the absolute value of
the complex pole
• The frequency of the sinusoid is the angle of
the complex pole (divided by 2π)

CS851: Feedback Control for Computer Systems


Steady-State Analysis
• If a signal finally converges, what value does it
converge to?
• When it does not converge
– Any |pj| is greater than 1
– Any |r| is greater than or equal to 1
• When it does converge
– If all |pj|’s and |r|’s are smaller than 1, it converges to 0
– If only one pj is 1, then the signal converges to cj
• If more than one real pole is 1, the signal does not converge …
(e.g. the ramp signal)
-1
m
z
y(k)  c 0  u impulse (k)   c j  p kj -1  br k sin k  dr k cos k (1 z 1)2
j1

CS851: Feedback Control for Computer Systems


An Example
2z z 3z
U(z)   
z  1 z  0.5 z  0.9
u(k)  2  0.5 k  3 (0.9) k
6

converge to 2
4

-1
0 10 20 30 40 50 60

CS851: Feedback Control for Computer Systems


Final Value Theorem
• Enable us to decide whether a system has a
steady state error (yss-rss)

CS851: Feedback Control for Computer Systems


Final Value Theorem
Theorem: If all of the poles of (1  z )Y ( z ) lie within the unit circle, then
 y ( k )  z lim
k lim 1 ( z  1)Y ( z )

0.11z 0.11z -0.05

Y ( z)  2  -0.1
z  1.6 z  0.6 ( z  1)( z  0.6) -0.15
0.11z

y(k)
( z  1)Y ( z ) |z 1  |z 1  0.275 -0.2

z  0.6 -0.25

-0.3

-0.35
0 5 10 15
k

If any pole of (1-z)Y(z) lies out of or ON the


unit circle, y(k) does not converge!

CS851: Feedback Control for Computer Systems


What Can We Infer from TF?
• Almost everything we want to know
– Stability
– Steady-State
– Transients
• Settling time
• Overshoot
– …

CS851: Feedback Control for Computer Systems


Bounded Signals

5 5 5 1

a=0.4 a=0.9 a=1.2


0.5

0 0 0 0

-0.5
-5 -5 -5
-1
0 2 4 6 8
1
5 5 5
a=-0.4 a=-0.9 a=-1.2 0.5
1

0 0.8
0 0 0

0.6

-0.5
0.4

-5 0.2 -5 -5
0 5 10 0 5 10 0 5 10 -1
0 10 20 30 40 50 60 70
0
0 5 10 15 20

CS851: Feedback Control for Computer Systems


BIBO Stability
• Bounded Input Bounded Output Stability
– If the Input is bounded, we want the Output is
bounded, too
– If the Input is unbounded, it’s okay for the Output
to be unbounded
• For some computing systems, the output is
intrinsically bounded (constrained), but limit
cycle may happen

CS851: Feedback Control for Computer Systems


Limit Cycle

Output constrained,
But oscillating –
Bad!

Imagine CPU utilization


Constantly switching from
1 to 0, 0 to 1, …

Solution: make sure the system works in a linearized operating region

CS851: Feedback Control for Computer Systems


Are these BIBO?

Unity y(k+1) = 1
P Controller y(k+1) = KP u(k)
Integrator y(k+1) = y(k) + u(k)
I Controller y(k+1) = y(k) + KI u(k)
M/M/1/K y(k+1) = 0.49y(k) + 0.033u(k)
Mystery y(k+1) = -1.3y(k) + 2.3u(k)

CS851: Feedback Control for Computer Systems


Better Way to Decide BIBO or NOT
Theorem:
A system G(z) is BIBO stable iff all the poles of G(z) are inside the
unit circle.

System Time domain Eq Transfer Function Poles


Unity y(k+1) = 1 G(z) = 1 N/A

P Controller y(k+1) = KP u(k) G(z) = KP N/A

Integrator y(k+1) = y(k) + u(k) G(z) = 1/(z-1) z=1

I Controller y(k+1) = y(k) + KI u(k) G(z) = KI/(z-1) z=1

M/M/1/K y(k+1) = 0.49y(k) + 0.033u(k) G(z) = 0.033/(z-0.49) z = 0.49

Mystery y(k+1) = -1.3y(k) + 2.3u(k) G(z) = 2.3/(z+1.3) z = -1.3

CS851: Feedback Control for Computer Systems


Example
u (k)=0.8k LTI: y(k)=0.4y(k-1)+0.6u(k-1) y (k)?

Z
Z
Y(z) 0.4z 1Y(z) 0.6z 1U(z)

1
U(z) 
1 0.8z 1
0.6z 1 0.6z -1
Y(z) 1
U(z) 
1 0.4z (1- 0.4z -1)(1 - 0.8z -1)
Y(z) 0.6
G(z)  
U(z) z  0.4

BIBO? – only one pole at 0.4, so BIBO!

CS851: Feedback Control for Computer Systems


Steady State Gain
yss

CS851: Feedback Control for Computer Systems


Steady-State Gain – Cont’d
• Which value does the output converges to
when the input is an unit step signal?
– First of all, it has to converge
Final Value
Theorem

y ss  lim y(k)  lim(z  1)Y(z)


k  z 1

z
 lim(z  1)G(z)
z 1 z 1
 lim zG(z)
z 1

 G(1)
Unit Step
Input

CS851: Feedback Control for Computer Systems


More General Cases
y(k)  a 1y(k  1)  ...  a n y(k  n)  b 1u(k  1)  ...  b m u(k  m)

Z
b 1z 1  ...  b m z m
Y(z) 1 n
U(z)
1 a 1z  ...  a n z

z=1 Transfer
b 1  ...  b m Function
y ss 
1 a 1  ...  a n

CS851: Feedback Control for Computer Systems


Example
u (k)=1 LTI: y(k)=0.4y(k-1)+0.6u(k-1) y (k)?

Z
Z
Y(z) 0.4z 1Y(z) 0.6z 1U(z)

1
U(z) 
1 z 1
0.6z 1 0.6z -1
Y(z) 1
U(z) 
1 0.4z (1- 0.4z -1)(1- z -1)
Y(z) 0.6
G(z)  
U(z) z  0.4

Yss? G(1)=1, so yss=1

CS851: Feedback Control for Computer Systems


System Orders
• System Order = Number of Poles
• The higher the system order is, the more
complex the system behavior is
• Some poles are more important than others
– Why?
– If |pi|<|pj|,|pi/pj|k-1 approaches 0 when k is large (pik-1
converges faster than pjk-1)

m
y(k)  c 0  u impulse (k)   c j  p kj -1
j1

CS851: Feedback Control for Computer Systems


Overshoot and Setting Time
• If not all poles are positive real numbers,
overshoot may happen
– Easy to figure out when the system is first order
– For higher order systems, approximation to first
order systems works under certain conditions
• Setting time
– First order system
– Higher order systems 4
ks 
ln| p |

CS851: Feedback Control for Computer Systems


How fast does it converge?
• U(k)=ak, consider u(k)≈0 when the absolute
value of u(k) is smaller than or equal to 2% of
u(0)’s absolute value
| p | k  0.02 1

kln| p |  ln0.02  3.912 0.9

0.8
y(k)=0.7 k
4
k 0.7
ln| p | 0.6

Remember 0.5

This! 0.4

0.3
p  0.7 0.2
y( 11)=0.0198

4 4
k   11 0.1

ln| 0.7 |  0.36 0


0 2 4 6 8 10 12

CS851: Feedback Control for Computer Systems


Examples: Positive Pole
1

0.8

0.6
0.1
0.4

0.2
z  0.9
0
0 5 10 15 20 25 30

0.8
0.09
Dominant
0.6

0.4
(z  0.9)(z - 0.1)
0.2

0
Pole: 0.9
0 5 10 15 20 25 30

0.8

0.6

0.4
0.07
0.2

0
(z  0.9)(z - 0.3)
0 5 10 15 20 25 30

0.8

0.6 0.063
0.4

0.2 (z  0.9)(z - 0.3)(z - 0.1)


0
0 5 10 15 20 25 30

CS851: Feedback Control for Computer Systems


Examples: Negative Pole
2

1.5

1
1.9
0.5 z  0.9
0
0 5 10 15 20 25 30

1.5

1 1.71
Dominant
0.5
(z  0.9)(z - 0.1)
0 Pole: -0.9
0 5 10 15 20 25 30

1.5

0.5
1.33
0
0 5 10 15 20 25 30
(z  0.9)(z - 0.3)
2

1.5

1 1.197
0.5
(z  0.9)(z - 0.3)(z - 0.1)
0
0 5 10 15 20 25 30

CS851: Feedback Control for Computer Systems


Dominant Pole
• We can approximate a high-order system with
a first-order system with the dominant pole of
the high-order system
– IF the dominant pole DOES exist
– Can give a pretty good estimation of settling time
– Can give a reasonable estimate of the maximum
overshoot
• Some high-order systems do not have
dominant pole! – for example

CS851: Feedback Control for Computer Systems


No Dominant Pole
Step Response
5

4 pole=-0.9
pole=-0.7
poles=-0.9, -0.7
3

2
Amplitude

-1

-2

-3
0 5 10 15 20 25 30 35 40 45 50
Time (sec)

CS851: Feedback Control for Computer Systems


Dominant Pole – Cont’d
• If there is a dominant pole, it must be the pole
with the maximum magnitude
– The largest pole should have at least twice the
magnitude of the other poles!
• If the dominant pole is real (p’), the high-
order system can be approximated by a first-
order system

G(1)(1  p' )
G' (z)  4
z  p' ks 
ln| p'|

CS851: Feedback Control for Computer Systems


Summary
• Signals/Systems
– An LTI system can be specified by
• Difference equation
• Unit impulse response
• Transfer function
– If one is known, how to get the other two?
• Characterize a signal with Z-transform
– Z-domain (poles) -> Time domain (convergence, etc.)
• Characterize a system with Transfer function
– BIBO stability
– Steady-State Gain
– Transients: overshoot, settling time
• If there exists a dominant pole

CS851: Feedback Control for Computer Systems

You might also like