CS计算机代考程序代写 gui matlab DSP First, 2/e

DSP First, 2/e
Lecture 23
Frequency Response, H(z), Poles and Zeros
for IIR and FIR Systems
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 1
LECTURE OBJECTIVES
§ ZEROS and POLES
§ Relate H(z) to FREQUENCY RESPONSE
H ( e j wˆ ) = H ( z ) z = e j wˆ
§ Four demos: PeZ, 3-Domain movies § Placing Poles and Zeros
§ Bandpass Filters: IIR
§ Nulling Filters: FIR Notch Filters: IIR
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 4
READING ASSIGNMENTS
§ This Lecture:
§ Chapter 9, Sects. 9-5 and 9-6
§ Chapter 10, Sects. 10-5 and 10-7
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 3
Z-TRANSFORM TABLES
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 5

THREE DOMAINS: H (e jwˆ )
01 H(z)=b +bz-1
1-a1z-1
TIME-DOMAIN
z = e j wˆ {a!,bk}
FREQ-DOMAIN
y[n]=a y[n-1]+b x[n]+bx[n-1] 101
Z-TRANSFORM-DOMAIN
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 6
POLYNOMIALS: H(z)
b + b e – j wˆ H ( e j wˆ ) = 0 1 – j wˆ
1-a1e
Impulse response, h[n]
H(z) = Rational Function
§ First Order:
§ We can also study Second-Order Systems:
§ Numerator & Denominator Polynomials
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 8
01 H(z)=b +bz-1
1- a1z-1
H(z)=b+bz-1+bz-2 =B(z) 012
1-a1z-1 -a2z-2 A(z)
Motivation: Filter Design
§ Some tasks/analysis easier in one domain § Freq domain: system response to sinusoids
§ Time domain: calculate output to any signal
§ Z-domain: given specs, build a filter
§ Can we design a filter that removes DC and sinusoids at frequency wˆ = p / 3 ?
§ Z-domain reduces this to polynomial roots
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 7
POLES & ZEROS of H(z)
§ Zeros of H(z), i.e., where is H(z)=0?
§ Look for Roots of Numerator Polynomial
§ Poles of H(z), i.e., where is H(z)=infinity? § Look for Roots of Denominator Polynomial
H (z) = B(z) , so B(z0 ) = 0 Þ H (z0 ) = 0 A(z)
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 9
if A(z0)10
H(z)=B(z),so A(z0)=0ÞH(z0)®¥ A(z)
if B(z0)10

Poles/Zeros of 1st-order H(z)
§ Roots of Numerator & Denominator Polys:
1 H(z)= 1+bz-1
1-0.8z-1
H(z)= z(1+bz-1) = z+b 11
z(1-0.8z-1) z-0.8
Pole at : z = 0.8
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 10
Zero at : z = -b 1
PHASE from 3-D PLOT
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 12
3-D VIEWPOINT:
3-D VIEW
EVALUATE H(z) EVERYWHERE
Zero at : z = 0
UNIT CIRCLE
Aug 2016
© 2003-2016, JH McClellan & RW Schafer 11
Pole at : z = 0.8
FREQ. RESPONSE from H(z)
H ( e j wˆ ) = H ( z ) z = e j wˆ
§ Relate H(z) to FREQUENCY RESPONSE
§ EVALUATE H(z) on the
§ ANGLE is same as FREQUENCY
UNIT CIRCLE
ˆ
z = e jwˆ (as w varies)
defines a CIRCLE, radius = 1
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 13

UNIT CIRCLE: RECAP
§ MAPPING BETWEEN ! and “!”
! = #!”
! = 1 = $!”
# = −1 = ‘!”
! = − $ = % # $ %&
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 14
IIR H(z) example: two poles
§ Poles just inside the unit circle (for stability)
H(z) = 1 1+0.97z-1 +0.9409z-2
2 Poles : z = 0.97e± j 2p / 3
2 Zeros : z = 0,0
§ MATLAB: roots( ) and poly( ) §roots( [1, 0.97, 0.9409] ) §poly( 0.97*exp(j*2*pi*[1,-1]/3) )
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 16
Frequency Response from poles and zeros
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 15
MOVIE for H(z) in 3-D
§ POLES to H(z) to Frequency Reponse § TWO POLES SHOWN
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 17

Frequency Response from H(z)
Walking around the Unit Circle
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 18
3 DOMAINS MOVIE: FIR
ZEROS on UNIT-CIRCLE
H(z) NULL NULL
h[n]
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 20
H ( e j wˆ )
THREE DOMAINS: H (e jwˆ )
01 H(z)=b +bz-1
1- a1z-1
TIME-DOMAIN
z = e j wˆ {a!,bk}
FREQ-DOMAIN
y[n]=a y[n-1]+b x[n]+bx[n-1] 101
Impulse response, h[n]
Z-TRANSFORM-DOMAIN
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 19
POLYNOMIALS: H(z)
b + b e – j wˆ
H(ejwˆ)= 0 1
1 – a 1 e – j wˆ
3 DOMAINS MOVIE: IIR
POLE MOVES
h[n]
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 21
H(z)
H ( e j wˆ )

7 IIR MOVIES @ WEBSITE
§ http://dspfirst.gatech.edu/chapters/08feedbac/demos/3_domain/index.html § 3 DOMAINS MOVIES: IIR Filters
§ § § § § § §
Aug 2016
One pole moving and a zero at the origin
One pole and one zero; both moving
Two complex-conjugate poles moving radially Two complex-conjugate poles moving in angle Movement of a zero in a two-pole Filter
Radial Movement of Two out of Four Poles Angular Movement of Two out of Four Poles
© 2003-2016, JH McClellan & RW Schafer 22
Example:
Remove Interference
§ Design a NOTCH filter (Find ak and bk) § To Reject completely 0.7p
§ThisisNULLING 2Zeros:z=e±j0.7p § Zeros on UC
§ Make the frequency response magnitude FLAT
2 Poles : z = 0.97e± j0.7p § Z-POLYNOMIALS provide the TOOLS
away from the notch.
§ Use poles at the same angle
§ PEZDEMO GUI
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 24
Reminder:
4 FIR MOVIES @ WEBSITE
§ http://dspfirst.gatech.edu/chapters/08feedbac/demos/3_domain/index.html § 3 DOMAINS MOVIES: FIR Filters
§ Two zeros moving around UC and inside
§ Three zeros; one held fixed at z = −1
§ Ten zeros; 9 equally spaced around UC; one moving § Ten zeros; 8 equally spaced around UC; two moving
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 23
Example:
Remove Interference
2 Poles : z = 0.97e± j0.7p
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 25
2 Zeros : z = e± j 0.7p

PeZ Demo: Pole-Zero Placing
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 26
h[n]: Decays & Oscillates
“PERIOD”=6
h[n]=(0.9)n cos(pn/3)u[n] Aug 2016 © 2003-2016, JH McClellan & RW Schafer 28
Complex POLE-ZERO PLOT
Where is the peak?
H(z) = 1-0.45z-1 1-0.9z-1 +0.81z-2
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 27
3 DOMAINS MOVIE: IIR
POLE MOVES
H(z)
H(w)
h[n]
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 29

SINUSOIDAL RESPONSE
§ x[n] = SINUSOID => y[n] is SINUSOID § Get MAGNITUDE & PHASE from H(z)
if x[n]=ejwˆn
then y[n]= H(ejwˆ )ejwˆn where H(ejwˆ)=H(z)z=ejwˆ
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 30
Example: Eval Freq. Resp.
§ Given:
§ Find output, y[n], when § Evaluate at
H(z)= 2+2z-1 1-0.8z-1
x[n] = cos(0.25p n)
z = e j 0 . 2 5p
H(z)=2+2(22 -j 22)=5.182e-j1.309 1-0.8e- j0.25p
y[n] = 5.182 cos(0.25p n – 0.417p ) Aug 2016 © 2003-2016, JH McClellan & RW Schafer
34
Evaluate FREQ. RESPONSE
2+2z-1
1-0.8z-1 atwˆ=0.25p
D C i s wˆ = 0
Aug 2016
wˆ = 0.25p zero at w=p
© 2003-2016, JH McClellan & RW Schafer 33