Chapter 8 Discrete-Time Signals and Systems

advertisement
EE 422G Notes: Chapter 8
Instructor: Zhang
Chapter 8 Discrete-Time Signals and Systems
8-1 Introduction
Most “real” signals and natural (physical) processes: continuous – time
A : System Design Problem
How the computer sees “ the rest”? an equivalent
(Physical Process + Sensor +A/D + D/A )=> discrete-time system
The Equivalent discrete-time system
 Modeled by a discrete-time model
System Design (Design of the computer control Algorithm):
Based on discrete-time model description.
 Needs for discrete-time system analysis and design tool:
Z-Transform (Similar position as Laplace Transform for continuoustime system.)
Page 8-1
EE 422G Notes: Chapter 8
Instructor: Zhang
B. How does the computer understand the progress and behaviors of the
process being monitored and controlled? By sampling the output of the
continuous-time system!
=>
How can we ensure that the sampled signal is a sufficient representation of
its continuous-time origin. i.e., how fast we have to sample?
A question we must answer before z-transform based analysis!
C. Two basic parts of the chapter
Part one : Theoretical frame work for determining how fast we have to sample.
Part two : z-transform
Part one: How fast
8.2A Analog-to-Digital Conversion
1. Sample Operation
Needs to Know:
(1) Sampling period: T
(2) x(t) is sampled at t=nT
(3) What do we mean by x(n)
(4) Sampling function: p(t)
(5) Sampled signal xs = x(t)p(t)
Page 8-2
EE 422G Notes: Chapter 8
Instructor: Zhang
2. Mathematical Description of Sampling Process
Sampled signal : xs(t) = x(t)p(t)
Objective: Derivation of xs(t)’s Fourier Series Expression (Time Domain)
Derivation :
p (t ) 

C e
n  
General Equation for
any periodical signal
Fourier Series Description
of Sampling Function
jn 2f st
n
Sampling function: A Periodical function,
(thus can be expressed using Fourier series), with
period T on fundamental frequency f s 
1
T
With Fourier series coefficients:
1 T /2
Cn 
p (t )e  jn 2f s t dt

T T / 2
general equation for Fourier
coefficient of any periodical
signal
xs (t )  p(t ) x(t )

 (  Cn e
jn 2f st
) x(t )
n 


C
n 
n
general equation: always true for
any r (width of the sampling
pulse).
x(t )e jn 2f st
3. Spectrum of sampled signal
Objective: Find the spectrum of the sampled signal xs(t).
Derivation :
Take Fourier Transform for
xs (t ) 

 C x(t )e
n
jn 2f st
n
Page 8-3
EE 422G Notes: Chapter 8
Instructor: Zhang

 j 2ft
x
(
t
)
e
dt
s

 xs ( f ) 




  C x(t )e
  n  



 C  x(t )e
n  
For n

n  
e  j 2ft dt
 j 2 ( f  nf s ) t
n
dt


C
jn 2f s t
n
n
X ( f  nf s )
X ( f  nf s )
4. Spectral Characteristic of ‘Real Signal’
Most ‘real’ signals: continuous with time
 Highest frequency fh can be found
 X(f) = 0 if | f | f h
5. How ‘sampling process’ modifies the spectrum
Xs( f ) 
Consider a f 0  f h

 Cn X ( f
n  
X s ( f0 ) 

C
n  
n
 nf s )
X ( f 0  nf s )
 C 0 X ( f 0 )  [C1 X ( f 0  f s )  C 1 X ( f 0  f s )]

If
f0  fs  fh
 X ( f0  f s )  0
or
or
f0  fs  fh
X ( f0  f s )  0
 X s ( f 0 )  C0 X ( f 0 )  
Modifier
Page 8-4
EE 422G Notes: Chapter 8
If
Instructor: Zhang
f0  fs  fh
f0  fs  fh
or
 X ( f0  f s )  0
X ( f0  f s )  0
or
 X s ( f 0 )  C0 X ( f 0 )
No spectrum modification
6. How fast we have to sample in order to keep the spectrum:
Xs( f )  X( f )
(| f | f h )
| f  f s | f h
| f  f s | f h
Condition 
Should we consider | f | f s ? Of course not!
( | f | f s implies that the real process
changes faster than the sampling rate.)
Consider | f | f s only =>
 fs  f  fh  fs  2 fh
fs  f  fh 
 =>  f  f  f  f  2 f
fs  f  fh 
h
s
h
 s
Answer : f s  2 f h
Sampling rate: at least twice as the highest
frequency of the “original process”
Sampling Theorem: ………….
Constant with n
7. What about if r 0 ?
(show Figure 8-4)

1 T /2
1
 jn 2f s t
p (t )    (t  nT )  Cn 

(
t
)
e
dt

 fs
T T/ 2
T
n  
 X s ( f )  fs

 X ( f  nf s ) 
n  
8. Practical sampling rate:
f s  10 f h
1 
 X ( f  nf s )
T n  
Similar as r  0
Page 8-5
EE 422G Notes: Chapter 8
Instructor: Zhang
8-2B Data Reconstruction
1. What’s Data Reconstruction?
Original x(t) t  0
(anytime)
Its samples xs(t) t = 0, T, 2T, … (Discrete time)
Can we tell x(t) between sampled points ( nT < t < (n+1)T ) based on xs(t)?
Data Reconstruction problem!
2. Data Reconstruction Method
What’s a filter? A system which processes the input to generate an output.
It could be an algorithm (mathematical equation/operation set) or
circuit/analog computer, depending on the form of xs(t) (digital
number or analogy signal .)
Let’s see how a filter works!
Output
y (t ) 

 xs (kT )h(t  kT ) 
k  

 x(kT )h(t  kT )
k  
Discrete-time
algorithm
y (kT )  x(kT )  h(0)  [ x(kT  T )h(T )  x(kT  T )h(T )
 [ x(kT  2T )h(2T )  x(kT  2T )h(2T )]
 
Weighted sum of the ‘should be point x(kT)
and its surrounding points
|h(0)| should > h()  0
and |h()| decreases as 
What is y (t ) 

 x(kT )h(t  kT )
? (In addition to being an algorithm)
k  
Let’s see:
xs (t )  x(t )

  (t  kT )
k  
or
xs (t ) 

 x(kT ) (t  kT )
k  
Page 8-6
EE 422G Notes: Chapter 8
Instructor: Zhang
Consider xs(t)*h(t) :
a system with impulse response (system
parameter) h() and input xs(t)!

xs (t ) * h(t ) 
 x ( )h(t   )d
s




  x(kT ) (  kT )h(t  )d
 k  




k  

 x(kT )   (  kT )h(t   )d

 x(kT )h(t  kT )
k  
The reconstruction algorithm

y (t ) 
 x(kT )h(t  kT )
k  
Reconstruction Filter: with h(t) as impulse response!
Output of the reconstruction Filter (y(t)): Convolution of xs(t) and h() !
3. Design of Reconstruction Filter: Ideal case
Assumption : fs>2fh
1/2 fs > fh
(xs(t) was generated at a frequency higher than the
Nyquist rate).
fh: highest frequency of the original signal
Ideal Filter
T
H( f )  
0
| f | 0.5 f s
Otherwise (| f | 0.5 f s )
Question : why do we need this low-pass filter to reconstruct x(t) from xs(t)?
answer : xs(t) contains frequencies higher than f h  0.5 f s , but x(t)does not!
Question : Will any spectrum (other than x(t)’s introduced by sampling operation
remains after the filter?
Answer: No. f s  2 f h , has ensured that no overlapping between x(t)’s
frequencies and the undesired frequencies in xs(t) introduced by
sampling!
Page 8-7
EE 422G Notes: Chapter 8
Instructor: Zhang
Implementation of Ideal Reconstruction Filter
(Given the Impulse response of the filter)
Inverse Fourier transform =>

h(t ) 
 H ( f )e
j 2ft
df


fs / 2
 Te
j 2ft
fs / 2
df  T
 fs / 2
e
j 2ft
df
 fs / 2
f  fs / 2
T

e j 2ft
j 2t
f  f s / 2
T sin( f s t ) T 1 / f s sin( f s t )


t
(f s t )
Characteristic of the Ideal Reconstruction Filter: Non causal!
Output at t ( y(t) ) must be generated using xs()  > t
=> Not good for real-time application!
How to reconstruction x(t) from nT < t < nT + T ?
Answer :
t
sin f s (  k )
T
x(t )  y (t )   x(kT )
t
k  n  l 1
f s (  k )
T
nl
for example t = nT + 0.5T
x(nT  0.5T )  y (nT  0.5T )

n l

k  n l 1
x(kT )
sin f s (nT  0.5  k )
f s (nT  0.5  k )
l points before t = nT + 0.5T
l points after t = nT + 0.5T
(k=n-l+1,…,n)
(k=n+1,…,n+l)
Page 8-8
EE 422G Notes: Chapter 8
Instructor: Zhang
Part Two
8-3A The z-Transform
1. Definition
For Laplace transform, we are given a function x(t),
For z-Transform, we are given a sampling sequence: x(0) , x(T), x(2T), …
 Definition: z-transform of a given sequence x(0) , x(T), x(2T), …
 
is Z ( x(nT ))  X ( z ) 
 x(nT ) z
n
 x(0)  x(T ) z 1  x(2T ) z  2  
n 0
 Why do we define such a transform?

L[ x(t )]   x(t )e  st dt
x(t)
0
If we want to compute this Laplace transform by computer

L[ x(t )]   x(nT )e  snT T
n 0

 T  x(nT )(e sT )  n
n 0
On the other hand

Z [ x(nT )]   x(nT ) z
n
z ~ e sT
n 0
 L[ x(t )]  TZ ( xs (t )) z esT
x(nT): samples of
x(t)
 Relationship between z- and s-plane
Basic Relationship : z  e sT
 z  e(  j )T  eT e jT
(1)   0
(eT  1)  | z | 1 (note | e jT | 1)
l.h.p. (s- plane)
 inside the unit circle (z- plane)
Page 8-9
EE 422G Notes: Chapter 8
(2)   0
s: r.h.p.
(3)   0
Instructor: Zhang



s: j axis. 
(4) s = 0 (   0,   0 )
| z | 1
z: outside the unit circle
| z | 1
z: unit circle
 eT  1



jT

 e
 cos T  j sin T 




1


z=1
Page 8-10
EE 422G Notes: Chapter 8
Instructor: Zhang
Note the difference between  (t )
and  (n )
2. Basic z-Transform pairs
 Example 8-4: z-transform of unit pulse  (n) :
n  0 
   ( n)
n  0
1
x(nT )  
0
unbounded
bounded
Solution :
Similar as Laplace
transform
1
X ( z )  x(0)  x(T ) z    1
 Example 8-5 z-Transform of unit step sequence u(n):
n0
n0
1
x(nT )  
0
Solution :
X ( z )  x(0)  x(T ) z 1  
 1  z 1  z 2  
1

1  z 1
(| z 1 | 1
or
| z | 1)
 How to understand?
L[u (t )] 
Step function u(t) :
1
1

s
j
Does TX ( z ) z  e sT give the same spectrum if T 0 ?
TX ( z ) z e sT 
T
1  z 1

T 0 :

z  e sT
T
1  e  sT
T
1  e  sT

s  j
T
1  cos T  j sin T
T
1
1
 lim

T  0  sin T  j cos T
1  cos T  j sin T
j
Page 8-11
EE 422G Notes: Chapter 8
Instructor: Zhang
 z-Transform gives the same spectrum as Laplace transform if the
sampling rate 
 Example 8-6 : z-transform of unit exponential sequence
x(nT )  et |t nT  enT  (eT ) n
(  0)
(k  eT )
 kn
Solution:
X ( z )  x(0)  x(T ) z 1  x(2T ) z 2  
 1  kz 1  k 2 z  2  
 1  (k 1 z ) 1  (k 1 z )  2  
  k 1 z
 1   1    2  
 k 1 z 1  1  




T
 z 
k  e
1
1


1   1 1  kz 1
1
 X ( z) 
T 1
1 e z
 Is this result reasonable?
L[e
t
1 s  j 1
]

s 
  j
s  j
TX ( z ) | z  e sT 
T
1 e
T  0:
T  jT
e
T
1  e (  j )T

T
1 e
 (  j )T
1
1

T 0 (  j )e (  j )T
  j
 lim
Why? Because
lim e  (  j )T  lim e T e  jT
T 0
T 0
 lim e T (cos T  j sin T )  1
T 0
1
1
0
Page 8-12
EE 422G Notes: Chapter 8
Instructor: Zhang
 Example 8-6 B
x(nT ) : k 0 k 1 k 2 
1
=> X ( z ) 
1  kz 1
 Summary: Basic z-transform pairs
continuous Function
sequence
 (t )
 ( n)
u (t )
u (n) : 1, 1,
e t
(e T ) n : 1, e t , e 2t ,
1, k , k 2 ,
(| z | k )
z - transform
1
1
1  z 1
1
1  e t z 1
1
1  kz 1
Would these be sufficient? No!
3. Extended z – transform pairs
Page 8-13
EE 422G Notes: Chapter 8
Instructor: Zhang
4. Find z-transform using symbolic tool box
Example 8-7
 n 
x(nT )  a n cos

 2 
Solution:
X ( z) 

 n
2
 a n cos
n 0
Analysis:
(1) n : odd => cos(k 
 n
z


2
)0
(2) n : even => n  2k  cos(
1
n
)  cos(k )  
2
 1
k : even
k : odd
 n   n
X ( z )   a n cos
z
2


n 0


  a cosk z
2k
1
0
2 k
2
4
3
k 0
 a0
 a 4 z 4  a 8 z 8  
5
 a 2 z 2  a 6 z 6  a10 z 10
 1  a 4 z  4

1   1   2    a 2 z 2 (1  a 4 z 4  a 8 z 8 )
1
a 2 z 2


1   1 1   1
1  a 2 z 2 1  a 2 z 2
1



1
4 4
1
1 a z
1  a 2 z 2
Very complex!
Using Symbolic ToolBox
syms a n z
xn = a^n*cos(n*pi/2);
xz = ztrans (xn, n, z);
xz (enter)
% Declare symbolic
% Define x(n)
% Determine X(z)
Page 8-14
EE 422G Notes: Chapter 8
Instructor: Zhang
xz =
z2
1

2
2
a z
1  a 2 z 2
z^2/(a^2+z^2)
MatLab: always in terms of z instead of z-1.
8-3B Properties of z - transform
1. Linearity
Z ( x1 (nT )  x2 (nT ))  Z ( x1 (nT ))  Z ( x2 (nT ))
X ( z)
2. Initial Value x(0)  lim
z 
why?
X ( z)  x(0)  x(1) z 1  
(1  z 1 ) X ( z )
3. Final value x()  lim
z 1
Why?
x()  lim sX ( s)
s 0
But,
s0
1
s
s

z 1
1
1  z 1
1  z 1


sX ( s )

(1  z 1 ) X ( z )
lim sX ( s )  lim(1  z 1 ) X ( z )
s 0
z 1
Page 8-15
EE 422G Notes: Chapter 8
Instructor: Zhang
8-3C Inverse z-Transform
Two Basic Methods:
(1) Express X(z) into “Definition Form”
X ( z)  x(0)  x(1) z 1  
(very simple, use long division or MatLab:
n=8
X = dimpulse(num,den, n) (enter)
gives the first n terms)
(2) Express X(z) into partial-fraction from
X (z ) 

partial-fraction
expansion
 
 
 

each term has an inverse transform
what Terms?
1
1
z 1
What about if you have
?
1  z 1
1  z 1
1
1

T 1
1 e z
1  kz 1
1
Tz 1
What
about
if
you
have
?
1 2
1 2
(1  z )
(1  z )
T 1
1
Te z
What
about
if
you
have
?
T 1 2
T 1 2
(1  e z )
(1  e z )
Az 1
B


T 1 2
T 1 2
T 1
(1  e z )
(1  e z )
1 e z
1
Let’s see:
Az 1  B  Be T z 1

(1  e T z 1 ) 2
Can we now find A and B? What is the inverse z-transform of
1
(1  e
T 1 2
z )
Page 8-16
EE 422G Notes: Chapter 8
What to do if you have
Instructor: Zhang
1
?
1  z 2
1
1
1 1
1 





1  z 2
(1  jz 1 )(1  jz 1 ) 2 1  jz 1 1  jz 1 


1
1
1



2 1  ( jz 1 ) 1  ( jz 1 ) 
(1) n / 2
1
1
1 n
n
n
n
x(nT )  Z (
)  [(  j )  ( j ) ]  ( j ) [( 1)  1]  
2
2
2
1 z
 0
1
n  even
n  odd
Important: before doing partial-fraction expansion, make sure the ztransform is in proper rational function of z 1 !
Example 8.9
z2
X ( z) 
( z  1)( z  0.2)
1
A
B
Solution : X ( z ) 


(1  z 1 )(1  0.2 z 1 ) 1  z 1 1  0.2 z 1
Heaviside’s Expansion Method:
X ( z) 
A
B

1  z 1 1  0.2 z 1
1
B(1  z 1 ) z 1
 A

(1) (1  z ) X ( z ) 
1  0.2 z 1
1  0.2 z 1
1
B0
1
 A
 A
 1.25
1  0.2
1  0.2
0.8
1
A(1  0.2 z 1 ) B  (1  0.2 z 1 )
1
A(1  0.2 z 1 )
(
1

0
.
2
z
)
X
(
z
)



B
(2)

1  z 1
1  0.2 z 1
1  z 1
1  z 1
1
10.2 z 1 0 ( z 0.2 )

B  1 /(1  5)  1 / 4  0.25 
Page 8-17
EE 422G Notes: Chapter 8
X ( z) 
Instructor: Zhang
1.25
 0.25

 x(nT )  1.25  0.25(0.2) n
1
1
1 z
1  0.2 z
Example 8-9B MatLab Method
(1) Find partial-fraction expansion
z2
1
X ( z)  2

1
z  1.2 z  0.2 1  1.2 z  0.2 z 2
b = 1;
a = [1 –1.2 0.2];
[r, p, k] = residuez(b,a);
r
1.25
r
 0.25
p
k

1.0
p    pole
0.2
1.25
 0.25

1
1  1.0 z
1  0.2 z 1

1.25
 0.25

1
1 z
1  0.2 z 1
 
k 
 
(2) Directly Find Inverse Transform
syms n, z;
% Declare symbolic
xz = 1/(1-1.2*z^(-1)+0.2*z^(-2));
% define X(z)
xn = iztrans(xz,z,n);
% compute x(n)
xn 
xn = 5/4-(1/4)*(1/5)^n  x(nT) = 1.25-0.25(0.2)n
Example 8-10
Y ( z) 
1
z 2  1.2 z  0.2
Solution :
2
z2
Question: Define X ( z )  2
 z 2Y ( z ) (or Y ( z )  z X ( z ) )
z  1.2 z  0.2
any relationship between
Page 8-18
EE 422G Notes: Chapter 8
Instructor: Zhang
x(nT )  z 1 ( X ( z )) and y(nT )  z 1 (Y ( z )) ?
1
z 2
z 2
Y ( z)  2


z  1.2 z  0.2 z 2 ( z 2  1.2 z  0.2) 1  1.2 z 1  0.2 z 2
5(1  1.2 z 1  0.2 z 2 )  5(1  1.2 z 1 )
 5  6 z 1

 5
1  1.2 z 1  0.2 z 2
1  1.2 z 1  0.2 z 2
 5  6 z 1
 5  6 z 1
V ( z) 

1  1.2 z 1  0.2 z 2 (1  z 1 )(1  0.2 z 1 )
A
B


1
1 z
1  0.2 z 1
 5  6 z 1
A  V ( z )(1  z ) | z 1 1 
1  0.2 z 1
1

z 1 1
 5  6 z 1
B  V ( z )(1  0.2 z ) | z 1 5 
1  z 1
1
 1.25
0.8
1

z 1 5
 5  30
 6.25
4
1
1

6
.
25
1  z 1
1  0.2 z 1
y (nT )  5 (n)  1.25  6.25(0.2) n
Y ( z )  5  V ( z )  5  1.25
y(nT )  5 (n)  1.25  6.25(0.2) n x(nT )  1.25  0.25(0.2) n
n=0
n=1
n=2
n=3
5 + 1.25 - 6.25 = 0
0 + 1.25 - 6.25*0.2 = 0
0 + 1.25 - 6.25*0.22 = 1
0 + 1.25 - 6.25*0.23 =1.2
1.25 - 0.25 = 1
1.25 - 0.25*0.2 = 1.2
1.25 - 0.25*0.22 = 1.24
1.25 - 0.25*0.23 = 1.248
Why? 6.25*0.2*0.2=0.25 =>1.25  6.25(0.2) n2  1.25  0.25(0.2) n
y(n+2) = x(n)!
Does Y ( z )  z 2 X ( z ) always imply Z 1 (Y ( z )) has two-step-delay
than Z 1 ( X ( z )) ?
Yes!
Page 8-19
EE 422G Notes: Chapter 8
Instructor: Zhang
z-1 : Delay operator! (Must Assume X(nT)(the sequence to be z^(-1) processed)=0 for n<0)
8-3D Delay operator : z-k ( k steps ) ( k > 0 )
 
Z ( x(nT ))  X ( z )   x(nT ) z n
n 0
 
Z ( x(nT  kT ))   x(nT  kT ) z n
n 0

 z k  x(nT  kT ) z nk
n 0
z
k

 x(nT  kT ) z
( n  k )
n 0
We want to establish the relationship between Z(x(nT-kT)) and Z(x(nT)) !

Let’s see what’s
 x(nT  kT ) z ( nk ) :
n 0

(1)
 x(nT  kT ) z ( nk )
 Z ( x(nT )) ? Yes!
n  k 0

(2)
 x(nT  kT ) z
( n  k )
n 0

n  k 1

( n  k )

kT
  x(nT  kT ) z ( nk )
 x(nT


) z
n 0
0
nk
n k
 nT  kT 0

 x(nT  kT ) z
( n  k )
n  k 0
 Z ( x(nT ))
 Z ( x(nT  kT ))  z
k

 x(nT  kT )) z ( nk )  z k Z ( x(nT ))
n 0
x(nT  kT )

Z ( x(nT  kT ))
k steps
behind
 z k
x(nT )
Z ( x(nT ))
 z  k Z ( x(nT ))
Page 8-20
EE 422G Notes: Chapter 8
Instructor: Zhang
1
Question : If Z ( x(nT )) 
, what’s
1  0.5 z 1
z 2
Z ( x(nT  2T )) ? Answer:
1  0.5 z 1
8-4 Difference Equation and Discrete-Time Systems
Continuous-Time System: Differential Equation, Laplace Transform
Discrete-Time System: Difference Equation, z-Transform
Properties of Continuous-Time Systems
Properties of Discrete-Time Systems
8-4A Properties of Discrete-Time Systems
System : Processes input to generate output
How to process : system-dependent
General symbolic notation for Discrete-Time System:
y( nT ) = H [ x(nT) ]

what does this
notation tell us?

operator or
Processor
1. Shift-Invariant System
(Time-Invariant Systems for continuous-time or general)
An example of time-varying system
The “processing algorithm” which maps input to output changes!
What do we mean by a time-invariant system?
Shift-invariant systems:
Physical:
Mathematic:
Assume x(nT): x(0), x(T), … has generated
y(nT): y(0), y(T), …
For example:
Page 8-21
EE 422G Notes: Chapter 8
Instructor: Zhang
0
1
generated
1
1
2
1
3
1
4
x:
1 has
y : 0.2 0.4 0.6 0.8 1
If we apply x(nT  n0T ) as input
look at if n0  2
x(nT  2T ) 
0 1
x: 0 0
2
1
3
1
4
1
y (nT  2T ) 
y : 0 0 0.2 0.4 0.6
generated
Question: Is this system shift-invariant?
Yes!
Question: Is this example telling us H [ x(nT  2T )]  y (nT  2T ) ? Yes!
Question: Is H [ x(nT  2T )]  y (nT  2T )
or H [ x(nT  n0T )]  y(nT  n0T )
always true for different systems?
No! only for time-invariant systems!
Shift-invariant system: if H [ x(nT  n0T )]  y(nT  n0T ) true for any n0 .
2. Causal and noncausal systems
Physical Description: A system is causal or nonanticipatory if the system’s response
to an input does not depend on future values of the input.
Mathematical Description:
Causal system: x1 (nT )  x2 (nT )
What about for n > n0 ?
for n  n0
Page 8-22
EE 422G Notes: Chapter 8
Instructor: Zhang
 H [ x1 (nT )]  H [ x2 (nT )]
for n  n0
Why? Although x1(nT) may not be the same as x2(nT) for n > n0 , such difference
does not affect the output determined by input up to n = n0 .
3. Linear System
Linear System  H [1x1 (nT )  2 x2 (nT )]  1H [ x1 (nT )]  2 H [ x2 (nT )]
Linear Systems: can be modeled as
y ( nT ) 

 x(kT )h(nT  kT )
or
k  
y ( nT ) 

 h(kT ) x(nT  kT )
k  
Convolution
h(kT ) : response of the shift-invariant linear system at t=kT to an impulse input
applied at t=0. (Or the response at t  kT  k 0T to an impulse input applied at t  k 0T )
Causal systems: h(kT )  0 k  0
Linear+causal+ x(kT )  0
 y (nT ) 
(k  0)

 x(kT )h(nT  kT )
k  
x ( kT ) 0 ( k 0 ) 

 x(kT )h(nT  kT )
k 0
causal n
(nT  kT  0) nT  kT  
n
 x(kT )h(nT  kT )   h(kT ) x(nT  kT )
k 0
k 0
Example: Given
x(0) = 1, x(T) = 2, x(2T) = 2, x(3T) = 1, …
h(0) = 3, h(T) = 2, h(2T) = 1, h(3T) = 0, …
MatLab:
x = [1 2 2 1 1];
h = [3 2 1];
y = conv(x,h);
y
3
8
11
9
7
3
1
Example 8-13:
n

1
x ( nT )    u( n ) 
n
n

2
1
1
 y ( nT )  x ( nT ) * h( nT )  3   2 
n
2
 3

1
h( nT )    u( n ) 
 3

Page 8-23
EE 422G Notes: Chapter 8
Instructor: Zhang
Can you write a program (algorithm) to calculate y(nT) = x(nT)*h(nT) ?
Example 8-13: Symbolic Tool Box
syms n z
xn =(1/2)^n
hn = (1/3)^n
xz = ztrans(xn, n, z)
hz = ztrans(hn, n, z)
yz = xz*hz
yn = iztrans (yz, z, n);
yn (enter)
yn = 3*(1/2)^n-2*(1/3)^n
% Declare Symbolic
% x(n)
% h(n)
% z-transform of x(n)
% z-transform of h(n)
% multiply, not convolution
% Do you know why?
% y(nT)=3(1/2)n – 2(1/3)n
* Analytic solution of convolution
n0
 x(nT )
x(nT )  
n0
0
n0
h(nT )
h(nT )  
n0
0
 Z ( x(nT ) * h(nT ))
 X ( z )  Z ( x(nT ))
 H ( z )  Z (h(nT ))

 Z {  x(kT )h(nT  kT )}
k  


n 0
k  
  {  x(kT )h(nT  kT )} z n


k  
n 0
 x(kT ) h(nT  kT ) z

n<kn-k<0
n

 k 1

n
x
(
kT
)
h
(
nT

kT
)
z

h(nT  kT ) z n 



k 0
nk
 n 0

x ( kT ) 0 

k 0


k 0
nk
  x(kT ) h(nT  kT ) z n

  x(kT )z
k
k 0

 h(nT  kT ) z
z ( nk )
n k
n  k 0
 X ( z)H ( z)
Page 8-24
EE 422G Notes: Chapter 8
Instructor: Zhang
1
i.e. x(nT ) * h(nT )  Z [ X ( z ) H ( z )]
n
3
1
1 1
Example: x ( nT )    u( n  3)     
4
4 4
n
5
1
1 1
h(nT )    u(n  5)     
 3
 3  3
x(nT )  0 h(nT )  0
if
n  0
n 3
u(n  3)
n 5
u(n  5)
Find x(nT)*h(nT)
Solution:
x(nT )  0
h(nT )  0
n  0

n  0 
u(n  3)
due to 
u(n  5)
3
n
  1  3 3
1
 1   1 
X ( z )  z   Z   u (n)    z
1
 4   4 
  4 
1  z 1
4
5
n 5

 1   1 
H ( z )    Z   u (n  5)
 3   3 

3
5
n

 1  5  1 
   z Z   u (n)
3
 3 

5
1
1
   z 5
1
3
1  z 1
3
3
5
1
1 1
X ( z ) H ( z )      z 8
1
1
 4   3
(1  z 1 )(1  z 1 )
4
3
1
3
4
V ( z) 


1
1
1
1
(1  z 1 )(1  z 1 ) 1  z 1 1  z 1
4
3
4
3
Page 8-25
EE 422G Notes: Chapter 8
Instructor: Zhang
1
1
Z 1 (V ( z ))  (4( ) n  3( ) n )u (n)
3
4
1
1
Z 1 ( z 8V ( z ))  (4( ) n 8  3( ) n 8 )u (n  8)
3
4
1 1
1
1
x(nT ) * h(nT )  ( ) 3 ( ) 5 [4( ) n 8  3( ) n 8 )]u (n  8)
4 3
3
4
4. Stable system
Consider linear shift-invariant systems only.
 Definition of BIBO stable:
| y(nT ) | 
n
for all bounded x(nT).
 Derivation of Criterion
y ( nT ) 

 x(kT )h(nT  kT )
k  
x(kT) bounded => | x ( kT ) | M  
 y (nT ) 

 | x(kT ) || h(nT  kT ) |
k  


 M | h(nT  kT ) |
k  
M

 | h(nT  kT ) |
k  
M

 | h(kT ) |
k  

Criterion:
 | h(kT ) |  
k  
 How to use this criterion: A
h: h(0), h(1), … h(N), 0, 0, …
h(k )  0
k  0
Limited number of terms
(causal)
Page 8-26
EE 422G Notes: Chapter 8
Instructor: Zhang
causal + Limited N => stable
Why!
y ( nT ) 

 x(kT )h(nT  kT )
k  
y (nT ) , N  n  k  0  n  k  n  N
for any fixed n in
for example,
n  100
  100  k  90
N  10 
| y (100T ) ||
100
 x(kT )h(100T  kT ) |
k 90
100
 M  | h(100T  kT ) |
k 90
N
 M  | h(kT ) |    stable
k 0
In general
y (nT ) 

 x(kT )h(nT  kT )
k  

n
 x(kT )h(nT  kT )
k n N
| y (nT ) | M
n
 | h(nT  kT ) |
k n N
N
 M  | h(nT ) |  
k 0
Limited Terms
Conclusion: limited terms of h => stable!
Example : y ( nT ) 
n
 x(kT )h(nT  kT )
stable?
k 0
What about y ( nT ) 
n
 x(kT )h(nT  kT )
?
k  n 100
 How to use this criterion: B
If we know
Z(h(nT)) = H(z)
Page 8-27
EE 422G Notes: Chapter 8
H ( z) 
Instructor: Zhang
1
 1  0.2 z 1  0.22 z  2  
1
1  0.2 z
h(0) h(1)
h(2)

 | h(nT ) | 
n 0
Why? |0.2| < 1 !
What about H ( z ) 
1
 1  z 1  z  2  
1
1 z
Not BIBO stable!
In general, deg(num) < deg(den)
H ( z) 

(1  p1 z )  (1  p n z  n )
1
| p j | 1
 stable
(poles inside the unit circle!)
 Example 8-14: h(nT )  [4(1/ 3) n  3(1/ 4) n ]u(n)
h(nT )  0 n  0
Due to u (n)
Solution:


n  
n 0
 | h(nT ) |  | h(nT ) |



n 0
n 0
 | 4(1 / 3)n  3(1 / 4)n |  4(1 / 3)n  4
1
6
1  1/ 3
Stable
8-4B Difference Equations
1. Difference Equations
Problem: determine the output of the system at the present time :
t = nT
y(nT)
What information to use:
Page 8-28
EE 422G Notes: Chapter 8
Instructor: Zhang
(1) input: current input u(nT)
previous input u(kT) (k < n)
future input u(kT) (k > n)
causal system : no future input!
Previous input u (n  1), u (n  2), ..., u (n  )
We do not need all of them  use u(n-1), … , u(n-m)
(2) output: previous output (its history): y(kT) (k < n) ? Yes.
future output y(kT) (k >n) ? No, no future output
previous outputs y (n  1), y (n  2), ..., y (n  )
We do not need all of them! y(n-1), …. , y(n-r) would be sufficient!
Mathematical Equation
y(nT) : depends on
u(n  1),, u(n  m)
y (n  1),..., y (n  r )
Difference
Equation
linear system
y (nT )  L0 x(nT )  L1 x(nT  T )  ...  Lm x(nT  mT )
 k1 y (nT  T )  ...  k r y (nT  rT )
weights: Li , K i
Larger weight: more important in determining y(nT)
Would the weights be the same? No!
(r, m): system’s order
different systems: different order and weights (parameters)
2. z-transfer function
Different Equation
y (nT )  k1 y (nT  T )  ...  k r y (nT  rT )
 L0 x(nT )  L1 x(nT  T )  ...  Lm x(nT  mT )
z-transform =>
Y ( z )  k1 z 1Y ( z )  ...  kr z  rY ( z )
 L0 X ( z )  L1 z 1 X ( z )  ...  Lm z  m X ( z )
Page 8-29
EE 422G Notes: Chapter 8
Instructor: Zhang
Y ( z ) L0  L1 z 1  ...  Lm z  m

 H ( z)
X ( z)
1  k1 z 1  ...  k r z  r
z-transfer function
Y(z) = H(z)X(z)
Why H(z) is the z-transform of impulse response h(nT) ?
8-4C Steady-State Frequency Response of a Linear Discrete-Time System
( X ( s)  L[ x(t )])
x(t)’s spectrum X ( s) s  j
X ( )
Y ( )
x(nT)’s spectrum TX ( z ) z  e sT  TX ( z ) z  e jT
s  j
(Y ( s)  L[ y(t )])
y(t)’s spectrum Y ( s) s  j
y(nT)’s spectrum TY ( z ) z  e sT  TY ( z ) z  e jT
s  j
System’s frequency response

Y ( ) TY ( z ) |z  e jT Y ( z )


X ( ) TX ( z ) |z  e jT X ( z ) z  e jT
What is Y(z)/X(z) ? H(z) = Y(z)/X(z)
System frequency response Y ( ) / X ( )  H ( z ) |z  e jT  H (e jT )
Page 8-30
EE 422G Notes: Chapter 8
Instructor: Zhang
 Property of frequency response H (e jT )
T: sampling period
 s  2f s  2
1
: sampling frequency
T
e j (  k s )T  e jT e jk sT
 s T  2
 e jT e jk 2  e jT (cos k 2  j sin k 2 )  e jT
 H (e j (  k s )T )  H (e jT )
Frequency Response H: periodic function with period  s
 when the frequency  increase by k s , the system’s frequency
response does not change.
Example:
Input 1: 10 sin( 5t )
T = 1 second
Input 2 : 10 sin( 7t )
Generate the same output amplitude?
 Normalized Frequency r   /  s
 s : frequency period  s  2
e
jT
e
j 2 /  s
r  /  s

1
 T  2 /  s
T
e j 2r
Frequency Response in terms of r (argument)
H (e j 2r )
 Amplitude Response | H (e j 2r ) | or
Phase Response H (e j 2r ) or
| H (e jT ) |
H (e jT )
Question: what are their physical meaning?
Example 8-15: y(nT) = x(nT) + x(nT-2T)
Solution :
Y ( z )  X ( z )  z 2 X ( z )
Page 8-31
EE 422G Notes: Chapter 8
H ( z) 
Instructor: Zhang
Y ( z)
 1  z 2
X ( z)
H (e jT )  1  z 2
z e jT
 1  e  j 2T
 (e jT  e  jT )e  jT
 2 cos T  e  jT
H (e j 2r )  2 cos 2r  e j 2r
| H ( e j 2r ) | 2 | cos 2r |
cos 2r  0
 2r
H ( e j 2r )  
cos 2r  0
  2r
 Comment: z-transform: good for analysis
difference equation: computer program
Page 8-32
Download