EECE 3 Signals & Systems Prof. ark Fowler Note Set #28 D-T Systems: DT Filters Ideal & Practical /4
Ideal D-T Filters Just as in the CT case we can specify filters. We looked at the ideal filter for the CT case here we look at it for the DT case. Ideal Lowpass Filter (LPF) H ( Ω) Cut-off frequency = B rad/sample 4π 3π 2π π -B B π 2π 3π 4π Ω H ( Ω) Linear Phase 4π 3π 2π π -B B π 2π 3π 4π As always with DT only need to look here As for CT there are lowpass, highpass, pass, and stop filters. 2/4
Why can t an ideal filter exist in practice?? Same as for CT. It is non-causal For the ideal LPF 2 jωn H( Ω ) = p ( Ω) e d Ω [ ππ, ) repeats elsewhere B Now consider applying a delta function as its input: x[n] = δ[n] X(Ω) = Then the output has DTFT: jωn Y( Ω ) = X( Ω) H( Ω ) = p ( Ω) e d Ω [ ππ, ) repeats elsewhere B From the DTFT Table: sinc[ B n] p ( 2 ) 2 Ω+ π k π π 2B k= B Linear Phase Imparts Delay So the response to a delta (applied at t = ) is: [ ] = ( / π)sinc [( / π)( )] yn B B n n d x[n] = δ[n] Ideal LPF yn [ ] t Starts before input starts Thus, system is non-causal! n d n 3/4
Causal LPF Design Truncated sinc ethod In practice, the best we can do is try to approximate the ideal LPF. We already tried this: yn [ ] = xn [ ] + xn [ ] +... + xn [ ( N )] N N N A really bad LPF! But now we ve seen that a shifted sinc function seems to be involved so a simple approach is to define the b coefficients in terms of a truncated shifted sinc function: b m B = Cutoff Frequency Error in Video [ π ] b = ( B/ π)sinc ( B/ )( m /2), m =,,2,, m yn [ ] = bxn [ ] + bxn [ ] +... + b xn [ ] H z b bz b z /2 ( ) = + +... + m H( Ω ) = b + be Ω +... + b e Causal, Non-Recursive Filter j jω 4/4
Let s see how well this method works These all have Linear Phase! All cases for B =.6π.2.8.6.4.2 - -.8 -.6 -.4 -.2.2.4.6.8 Ω/π.2.8.6.4.2 - -.8 -.6 -.4 -.2.2.4.6.8 Ω/π.2.8.6.4.2 N = 2 = 2 N = 6 = 6 N = 2 - -.8 -.6 -.4 -.2.2.4.6.8 Ω/π Frequency Response of a sinc filter truncated to 2 samples Frequency Response of a sinc filter truncated to 6 samples Frequency Response of a sinc filter truncated to 2 samples Some general insight: Longer lengths for the truncated impulse response Gives better approximation to the ideal filter response!! 5/4
For DT filters always plot in db but never use a log frequency axis! This truncated sinc approach is a very simplistic approach and does not yield the best possible filters as we can see even better in the db plot below! There are very powerful methods for designing REALLY good DT filters we ll look at those in the next set of notes. - -2 Pass looks OK Stop not so good! (db) -3-4 -5-6 -7-8 Red: = 3 Blue: = 2-9 - -.8 -.6 -.4 -.2.2.4.6.8 Normalized DT Frequency Ω/π 6/4
Practical Filter Specification Lowpass Filter Specification δ p H ( Ω) + δ p + δ p H ( Ω) δ s δ p Pass Ripple = 2log ( + δ p ) db Stop Attenuation = 2log ( δ s ) db To make filter more ideal : δ p, δ s, Ω s Ω p δ s Ω p Ω s Ω Pass- Transition Stop- 7/4
Highpass Filter Specification To make filter more ideal : δ p, δ s, Ω s Ω p + δ p δ p Pass Ripple = 2log ( + δ p ) db Stop Attenuation = 2log ( δ s ) db δ s Ω s Ω p π Ω Stop- Transition Pass- 8/4
Bandpass Filter Specification To make filter more ideal : δ p, δ si, Ω si Ω pi + δ p δ p δ s δ s2 Ω s Ω p Ω p2 Ω s2 π Ω Stop Trans Pass- Trans Stop- 9/4
Bandstop Filter Specification + δ p δ p To make filter more ideal : δ p, δ si, Ω si Ω pi + δ p2 δ p2 δ s Ω p Ω s Ω s2 Ω p2 π Ω Pass Trans Stop- Trans Pass- /4
DT Filter Types There are 2 main types of DT filters, based on the structure of their Diff. Equation: Recursive Filters Have Feedback in the Difference Equation y n] + a y[ n ] +... + an y[ n N ] = b x[ n] + b x[ n ] +... + b x[ n ] [ Feedback Terms y[ n] = N i= a i y[ n i] + i= b x[ n i i] Feedback Terms Non-Recursive Filters Have No Feedback in the Difference Equation yn [ ] = bxn [ ] + bxn [ ] +... + b xn [ ] /4
Recursive Filters y[ n] = N i= a y[ n i] + i i= b x[ n i] i H( z) = Feedback Terms b + bz +... + b z N + az +... + an z Feedback Terms! H( z) = z 3.5 3 H ( Ω ) = bz + bz +... + b ( N ) N N z + az +... + an Ω b + be +... + b e Ω + ae +... + a e j jω j jωn N? Poles/Zeros @ Origin N > : N zeros @ Origin N < : N poles @ Origin Only Feedback can give poles not at origin! 2.5 2.5.5 - -.5.5 Normalized DT Frequency Ω/π ust worry about stability! ake sure all poles are inside UC! 2/4
Non-Recursive Filters y[ n] = bx[ n i] i= i H z = b + bz + + b z ( )... H( z) = bz + bz +... + b z Poles @ Origin H( Ω ) = b + be Ω +... + b e 4 3.5 3 2.5 2 j jω No Feedback Only Poles at Origin! No worries about stability! Always Stable!!!.5.5 - -.8 -.6 -.4 -.2.2.4.6.8 Normalized DT Frequency Ω/π 3/4
IIR & FIR Filters These are just new names for filters we ve already seen! IIR: Infinite Impulse Response Impulse Response has infinite duration FIR: Finite Impulse Response Impulse Response has finite duration Recursive Filters are IIR H( z) n n n = 2 2 N N ( N ) Bz ( ) z Az ( ) Assumes no repeated roots & No Direct Terms hn [ ] = kpun [ ] + k pun [ ] + + k p un [ ] Non-Recursive Filters are FIR ( )... H z = b + bz + + b z hn [ ] = {,, b, b, b,, b,,,, } 2 n= 4/4