Introduction to Digital Logic

advertisement
Digital Signal Processing
Prof. Nizamettin AYDIN
naydin@yildiz.edu.tr
http://www.yildiz.edu.tr/~naydin
1
Digital Signal Processing
Lecture 18
3-Domains for IIR
2
READING ASSIGNMENTS
• This Lecture:
– Chapter 8, all
• Other Reading:
– Recitation: Ch. 8, all
• POLES & ZEROS
– Next Lecture: Chapter 9
LECTURE OBJECTIVES
• SECOND-ORDER IIR FILTERS
– TWO FEEDBACK TERMS
2
y[n]  a1 y[n 1] a2 y[n  2]   bk x[n  k]
k 0
• H(z) can have COMPLEX POLES & ZEROS
• THREE-DOMAIN APPROACH
– BPFs have POLES NEAR THE UNIT CIRCLE
THREE DOMAINS
Z-TRANSFORM-DOMAIN: poles & zeros
POLYNOMIALS: H(z)
Use H(z) to get
Freq. Response
bz

H(z) 
1  a z
k
k
TIME-DOMAIN
N

a ,bk 
FREQ-DOMAIN
M
M
y[n ]   a y[n  ]   bk x[n  k ]
1
ze
k 0
jˆ 
H ( e jˆ ) 
 bk e
k 0
N
 jˆ k
1   a e  jˆ 
 1
Z-TRANSFORM TABLES
SECOND-ORDER FILTERS
• Two FEEDBACK TERMS
y[n]  a1 y[n 1]  a2 y[n  2]
 b0 x[n]  b1 x[n 1]  b2 x[n  2]
1
2
b0  b1z  b2 z
H(z) 
1
2
1  a1z  a2 z
MORE POLES
• Denominator is QUADRATIC
– 2 Poles: REAL
– or COMPLEX CONJUGATES
b0  b1 z  b2 z
b0 z  b1 z  b2
H(z) 
1
2 
2
1  a1 z  a2 z
z  a1 z  a2
1
2
2
TWO COMPLEX POLES
• Find Impulse Response ?
– Can OSCILLATE vs. n
– “RESONANCE”
n
pk   re   r e
j n
n
jn
• Find FREQUENCY RESPONSE
– Depends on Pole Location
– Close to the Unit Circle?
• Make BANDPASS FILTER
pole  re
r  1?
j
2nd ORDER EXAMPLE
h[n]  (0.9)n cos( 3 n)u[n]  (0.9)n 12 (e j n / 3  e j n / 3 )u[n]
0.5
0.5
H(z) 
j /3 1 
 j / 3 1
1 0.9e z
1 0.9e
z
 1
1 0.9cos( 3 )z
H(z) 
j /3 1
 j /3 1
(1 0.9e z )(1 0.9e
z )
1
1 0.45z
H(z) 
1
2
1 0.9z  0.81z
h[n]: Decays & Oscillates
“PERIOD”=6

h[n]  (0.9) cos( 3 n)u[n]
n
1  0.45z1
1
2
1  0.9z  0.81z
2nd ORDER Z-transform PAIR
h[n]  r cos(n)u[n]
n
GENERAL ENTRY for
z-Transform TABLE
1 r cos z
H(z) 
1
2 2
1 2r cos z  r z
1
h[n]  Ar cos(n   )u[n]
1
cos  rcos(   )z
H(z)  A
1
2 2
1  2rcos  z  r z
n
2nd ORDER EX: n-Domain
1  0.45z
1
2
1  0.9z  0.81z
1
y[n]  0.9y[n 1] 0.81y[n  2] x[n] 0.45x[n 1]
aa
bb
nn
hh
HH
=
=
=
=
=
[ 1, -0.9, 0.81 ];
[ 1, -0.45 ];
-2:19;
filter( bb, aa, (nn==0) );
freqz( bb, aa, [-pi,pi/100:pi] );
Complex POLE-ZERO PLOT
2
1 z
2
1  0.7225z
UNIT CIRCLE
• MAPPING BETWEEN
ˆ
z and 
ze
jˆ 
ˆ0

ˆ  
z  1  
1
ˆ
z   j     2 
z1

FREQUENCY RESPONSE
from POLE-ZERO PLOT
ˆ
 j 2 
1 e
H(e ) 
ˆ
 j 2
1 0.7225e
ˆ
j
h[n]: Decays & Oscillates
“PERIOD”=6

h[n]  (0.9) cos( 3 n)u[n]
n
1  0.45z1
1
2
1  0.9z  0.81z
Complex POLE-ZERO PLOT
1  0.45z
1
2
1  0.9z  0.81z
1
h[n]: Decays & Oscillates
“PERIOD”=12

h[n]  (0.95) cos( 6 n)u[n]
n
1
1 0.8227z
1
2
1 1.6454z  0.9025z
Complex POLE-ZERO PLOT
1
1 0.8227z
1
2
1 1.6454z  0.9025z
3 DOMAINS MOVIE: IIR
POLE MOVES
H(z)
H()
h[n]
THREE INPUTS
• Given:
5
H(z) 
1
1 0.8z
• Find the output, y[n]
– When
x[n]  cos(0.2 n)
x[n]  u[n]
x[n]  cos(0.2 n)u[n]
SINUSOID ANSWER
5
H(z) 
1
1 0.8z
• Given:
• The input:
x[n]  cos(0.2 n)
• Then y[n]
y[n]  Mcos(0.2 n   )
H (e
j 0.2
5
j 0.089
)
 2.919e
 j 0.2
1  0.8e
Step Response
5  1 

Y(z)  H(z)X(z) 
1  .8z 1 1  z 1 
Partial Fraction Expansion
A
B
(A  B)  (.8B  A)z
Y(z) 
1 
1 
1
1
1  .8z
1 z
1  .8z 1  z


 (A  B)  5 and (.8B  A)  0
A
B
Y(z) 
1 
1
1  .8z
1 z
1

Step Response
20
25
9
9
Y(z) 

1
1
1  .8z
1 z
20
25
n
y[n]  (.8) u[n]  u[n]
9
9
25
y[n] 
as n  
9
Stability
• Nec. & suff. condition:

 h[n]  
n
b
h[n]  b(a) u[n]  H(z) 
1
1  az
n

 b a   if a  1 
n0
n
Pole must be
Inside unit circle
SINUSOID starting at n=0
• We’ll look at an example in MATLAB
– cos(0.2n)
– Pole at –0.8, so an is (–0.8) n
• There are two components:
– TRANSIENT
• Start-up region just after n=0;
(–0.8) n
– STEADY-STATE
• Eventually, y[n] looks sinusoidal.
• Magnitude & Phase from Frequency Response
Cosine input
cos(0.2n)u[n]
(0.8)
n
2
ˆ 

0
10
STABILITY
• When Does the TRANSIENT DIE OUT ?
need a1 1
STABILITY CONDITION
• ALL POLES INSIDE the UNIT CIRCLE
• UNSTABLE EXAMPLE:
POLE @ z=1.1
x[n]  cos(0.2n)u[n]
BONUS QUESTION
• Given:
5
H(z) 
1
1 0.8z
• The input is
• Then find y[n]
x[n ]  4 cos( n  0.5 )
y[ n ]  ?
Download