Download presentation
Presentation is loading. Please wait.
1
Finite Impulse Response Filters
2
Discrete-Time Impulse Signal
Let d[k] be a discrete-time impulse function, a.k.a. Kronecker delta function: Impulse response is response of discrete-time LTI system to discrete impulse function Example: delay by one sample Finite impulse response filter Non-zero extent of impulse response is finite Can be in continuous time or discrete time Also called tapped delay line (see slides 3-13, 3-19, 5-3) d[k] h[k]
3
Discrete-time Tapped Delay Line
Impulse response h[k] of finite extent k = 0,…, M-1 Block diagram (finite impulse response filter) Discrete-time convolution z-1 … x[k] S y[k] h[0] h[1] h[2] h[M-1] x[k-1] Applications of continuous-time tapped delay lines?
4
Discrete-time Convolution Derivation
Output y[k] for input x[k] Any signal can be decomposed into sum of discrete impulses Apply linear properties Apply shift-invariance Apply change of variables k h[k] Averaging filter impulse response 1 2 3 y[k] = h[0] x[k] + h[1] x[k-1] = ( x[k] + x[k-1] ) / 2
5
Comparison to Continuous Time
Continuous-time convolution of x(t) and h(t) For each t, compute different (possibly) infinite integral In discrete-time, replace integral with summation For each k, compute different (possibly) infinite summation LTI system From impulse response and input, one can determine output Impulse response uniquely characterizes LTI system
6
Convolution Demos Johns Hopkins University Demonstrations
( Convolution applet to animate convolution of simple signals and hand-sketched signals Convolving two rectangular pulses of same width gives triangle with width of twice the width of rectangular pulses (also see Appendix E for intermediate calculations) t 1 x(t) Ts 2Ts h(t) * = y(t)
7
Linear Time-Invariant Systems
Complex exponentials zk have a special property when they are input into LTI systems Output will be same complex exponential weighted by H(z) When we specialize the z-domain to frequency domain, magnitude of H(z) will control which frequencies are attenuated or passed H(z) is also known as the transfer function
8
Linear Time-Invariant Systems
The Fundamental Theorem of Linear Systems If a complex sinusoid were input into an LTI system, then the output would be a complex sinusoid of the same frequency that has been scaled by the frequency response of the LTI system at that frequency Scaling may attenuate the signal and shift it in phase Example in continuous time: see handout F Example in discrete time. Let x[k] = e j W k, H(W) is discrete-time Fourier transform of h[k] H(W) is also called the frequency response H()
9
Frequency Response For continuous-time systems, response to complex sinusoid is For discrete-time systems, z-k = (r e j w)–k = r-k e – j w k and the response is For discrete-time systems, response to complex sinusoid is frequency response frequency response
10
Example: Ideal Delay Continuous Time Discrete Time Delay by T seconds
Impulse response Frequency response Discrete Time Delay by 1 sample Impulse response Frequency response x(t) y(t) x[k] y[k] w = W T Allpass Filter Linear Phase
11
Frequency Response System response to complex sinusoid e j W t for all possible frequencies W where W = 2 p f : Above: passes low frequencies, a.k.a. lowpass filter FIR filters are only realizable LTI filters that can have linear phase over all frequencies Not all FIR filters exhibit linear phase |H(W)| |H(W)| Linear phase stopband stopband W W -Ws -Wp Wp Ws passband
12
Linear Time-Invariant Systems
Any linear time-invariant system (LTI) system, whether continuous-time or discrete-time, can be uniquely characterized by its Impulse response: response of system to an impulse OR Frequency response: response of system to a complex sinusoid (e j W t or e j w k) for all possible frequencies OR Transfer function: general transform of impulse response (Laplace transform for continuous-time systems and z-transform for discrete-time systems) Given one, we can find other two if they exist Give an impulse response that has a Laplace transform but not a Fourier transform? What about the other way?
13
Mandrill Demo (DSP First)
Five-tap discrete-time averaging FIR filter with input x[k] and output y[k] Lowpass filter (smooth/blur input signal) Impulse response is {1/5, 1/5, 1/5, 1/5, 1/5} First-order difference FIR filter Highpass filter (sharpens input signal) Impulse response is {1, -1} h[k] First-order difference impulse response k
14
Mandrill Demo (DSP First)
DSP First demos: From lowpass filter to highpass filter original image blurred image sharpened/blurred image From highpass to lowpass filter original image sharpened image blurred/sharpened image Frequencies that are zeroed out can never be recovered (e.g. DC is zeroed out by highpass filter) Order of two LTI systems in cascade can be switched under the assumption that computations are performed in exact precision
15
Mandrill Demo (DSP First)
Precision Input is represented as eight-bit numbers [0,255] per image pixel (i.e. fewer than three decimal digits of accuracy) Filter coeffients represented by one decimal digit each Intermediate computations (filtering) in double-precision floating-point arithmetic (15-16 decimal digits of accuracy) Output is represented as eight-bit number [-128, 127] (i.e. fewer than three decimal digits) No output precision was harmed in the making of this demo
16
Finite Impulse Response Filters
Duration of impulse response h[k] is finite, i.e. zero-valued for k outside interval [0, M-1]: Output depends on current input and previous M-1 inputs Summation to compute y[k] reduces to a vector dot product between M input samples in the vector and M values of the impulse response in vector What instruction set architecture features would you add to accelerate FIR filtering?
17
Symmetric FIR Filters Impulse response often symmetric about midpoint
Phase of frequency response is linear (slides 5-9 to 5-11) Example: three-tap FIR filter (M = 3) with h[0] = h[2] Implementation savings Reduce number of multiplications from M to M/2 for even-length and to (M+1)/2 for odd-length impulse responses Reduce storage of impulse response by same amount TI TMS320C54 DSP has an accelerator instructor FIRS to compute h[0] ( x[k] + x[k-2] ) in one instruction cycle On most DSPs, no accelerator instruction is available
18
Filter Design Specify a desired piecewise constant magnitude response
Lowpass filter example w [0, wp], mag [1-dp, 1] w [ws, p], mag [0, ds] Transition band unspecified Symmetric FIR filter design methods Windowing Least squares Remez (Parks-McClellan) Lowpass Filter Example Desired Magnitude Response forbidden 1 1-dp forbidden Achtung! forbidden ds w wp ws p Passband Transition band Stopband Red region is forbidden dp passband ripple ds stopband ripple
19
Importance of Linear phase
Speech signals Use phase differences to locate a speaker Once locked onto a speaker, our ears are relatively insensitive to phase distortion in speech from that speaker (underlies speech compression systems, e.g. digital cell phones) Linear phase crucial Audio Images Communication systems Linear phase response Need FIR filters Realizable IIR filters cannot achieve linear phase response over all frequencies
20
Z-transform Definition
For discrete-time systems, z-transforms play same role as Laplace transforms do for continuous-time systems Inverse transform requires contour integration over closed contour (region) R Contour integration covered in a Complex Analysis course Compute forward and inverse transforms using transform pairs and properties Bilateral Forward z-transform Bilateral Inverse z-transform
21
Common Z-transform Pairs
h[k] = d[k] Region of convergence: entire z-plane h[k] = d[k-1] h[n-1] z-1 H(z) h[k] = ak u[k] Region of convergence: |z| > |a| |z| > |a| is the complement of a disk
22
Region of Convergence Region of the complex z-plane for which forward z-transform converges Four possibilities (z=0 is a special case that may or may not be included) Im{z} Re{z} Entire plane Im{z} Re{z} Disk Im{z} Re{z} Complement of a disk Im{z} Re{z} Intersection of a disk and complement of a disk
23
Stability Rule #1: For a causal sequence, poles are inside the unit circle (applies to z-transform functions that are ratios of two polynomials) OR Rule #2: Unit circle is in the region of convergence. (For continuous-time signal, imaginary axis would be in region of convergence of Laplace transform.) Example: Stable if |a| < 1 by rule #1 or equivalently Stable if |a| < 1 by rule #2 because |z|>|a| and |a|<1 pole at z=a
24
Transfer Function Transfer function is z-transform of impulse response; e.g. for FIR filter with M taps (slide 5-3) Region of convergence is entire z-plane FIR filters are always stable Substitute z = e j w into transfer function to obtain frequency response Valid when unit circle is in region of convergence (i.e. for stable systems according to rule #2 on last slide)
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.