EE313 Linear Systems and Signals Fall 2010 Frequency Response of Discrete-Time Systems Prof. Brian L. Evans Dept. of Electrical and Computer Engineering The University of Texas at Austin Initial conversion of content to PowerPoint by Dr. Wade C. Schwartzkopf Complex Exponentials • Two-sided complex exponential zn when input into LTI systems Output will be same complex exponential weighted by H(z) Provided that z is in region of convergence for H(z) yn hn xn hn z n nm h m z m z n h[m] z m m z n H ( z) • When we specialize the z-domain to frequency domain, the magnitude of H(z) will control which frequencies are attenuated or passed 23 - 2 Frequency Response for LTI Systems • Continuous time • Discrete time H j e j t e jt cos t h(t ) H e cos k H e H e j e j k e j k cos k H j cos t H j h[k ] j j • Real-valued impulse response: H(e-j ω) = H*(ej ω) Input e j k e j k 2 cos( k ) Output H e j e j k H e j e j k H * e j e j k H e j e j k e e H e e 2 H e cos ω k H e He j j jH ( e j ) j k j j jH ( e j ) j k e 23 - 3 Response to Sampled Sinusoids • Start with a continuous-time sinusoid x(t ) cos t • Sample it every Ts seconds (see slide 7-6) x[n] x(t ) t nT cos n Ts s • We show discrete-time sinusoid with cos n cos Ts n Ts • Resulting in • Discrete-time frequency is equal to continuoustime frequency multiplied by sampling period 23 - 4 Example • Calculate the frequency response of the system given as a difference equation as y[n 1] 0.8 y[n] x[n 1] • Assuming zero initial conditions we take the ztransform of both sides Y ( z )z 0.8 X ( z ) z Y ( z) z 1 H ( z) X ( z ) z 0.8 1 0.8 z 1 • Since pole is inside unit circle, He j 1 1 j 1 0.8e 1 0.8cos j sin 23 - 5 Example • Group real and imaginary parts • Absolute value (magnitude response) 1 0.8 cos 1 j0.8 sin 1 H e 1 0.8 cos j 0.8 sin H ej j a j b a 2 b 2 b a j b tan 1 a • Find angle (phase response) 1 1 0.8 cos 2 0.8 sin 2 1 1.64 1.6 cos 0.8 sin H e 0 tan 1 0.8 cos j 1 23 - 6 Magnitude and Phase Responses • Output of system for input cos(0 k) is simply H e j 0 cos 0 k H e j 0 H e j 5 Magnitude response H e j Phase response 2 3 2 3 53.13 23 - 7 Discrete-time Frequency Response • As in previous example, frequency response of a discrete-time system is periodic with 2 Why? Frequency response is function of complex exponential which has period of 2 : e j e j 2 m • Absolute value of discrete-time frequency response is even and angle is odd symmetric Discrete-time sinusoid is symmetric around cos 2m n cosn 2mn cos n cos x n cos x n cosn sin x n sin n cos x n cosn cos x n cos x n 23 - 8 Aliasing and Sampling Rate • Continuous-time sinusoid can have a frequency from 0 to infinity • By sampling a continuous-time sinusoid, sample cos t cos n T cos n t nT • Discrete-time frequency unique from 0 to 0 T 0 f s 0 2f f s 0 f f s / 2 T We only can represent frequencies up to half of the sampling frequency. Higher frequencies exist would be “wrapped” to some other frequency in the range. 23 - 9 Effect of Poles and Zeros of H(z) • The z-transform of a difference equation can be written in general form as H ( z ) bn z z1 z z2 z zm z 1 z 2 z m • Complex number as vector in complex plane z and zi are both complex numbers Their difference is also a complex number (vector in complex plane) Im zi z zi z Re 23 - 10 Effect of Poles and Zeros of H(z) • Each difference term in H(z) may be represented as a complex number in polar form Magnitude is distance of pole/zero to chosen point (frequency) on unit circle Angle is angle of vector with respect to horizontal axis jm j1 j2 r e r e r e H e j bn 1 j1 2 j 2 m j m d1e d 2e d m e Im 1 1 x r z2 1 2 o 2 2 x r1r2 rm j 1 2 m 1 2 m bn e d1d 2 d m d1 d2 r2 z1 1 o 23 - 11 Re Digital Filter Design • Poles near unit circle indicate filter’s passband(s) • Zeros on/near unit circle indicate stopband(s) • Biquad with zeros z0 and z1, and poles p0 and p1 Transfer function Magnitude response |a – b| is distance between complex numbers a and b H ( z) C H (e j z z0 z z1 z p0 z p1 e )C e H ( e j ) C Distance from point on unit circle ej and pole location p0 j z0 e j z1 j p0 e j p1 e j z0 e j z1 e j p0 e j p1 23 - 12 Digital Filter Design Examples z z0 z z1 1 z0 z 1 1 z1 z 1 C • Transfer function H ( z) C 1 p0 z 1 1 p1z 1 z p0 z p1 • Poles (X) & zeros (O) in conjugate symmetric pairs For coefficients in unfactored transfer function to be real • Filters below have what magnitude responses? Im(z) O O Im(z) X X Im(z) O X Re(z) O X Re(z) X O X O Zeros are on the unit circle lowpass highpass bandpass Re(z) bandstop allpass notch? Poles have radius r Zeros have radius 1/r 23 - 13 DSP First Demonstrations • IIR Filters (Chapter 8) • Three-domain demonstrations IIR filter with one pole IIR filter with one pole and one zero Radial movement of poles (second-order section) • Z-to-Freq demonstration Figure 4: Movie takes points on unit circle to create magnitude response (double click on plot to start animation) Last figure: Movie takes slice of 3-D view of the zdomain to create magnitude response (double click on plot to start animation) 23 - 14 DSP First Demonstrations • BIBO stable causal systems All poles inside unit circle • Filter amplitude response at Enhance it by placing a pole close to ej Suppress it by placing a zero close to or at ej • Poles/zeros at origin Do not affect amplitude response Add a phase of (– T ) which is a pure delay • Poles and zeros can cancel each other’s effect if placed close together 23 - 15 Effect of Poles/Zeros H H T x o x - -/2 H H H H T o T x o T x x x - - H H 23 - 16