Finite Impulse Response Filters
Finite Impulse Response Filters
Lecture 5 http://www.ece.utexas.edu/~bevans/courses/realtime
Outline
• Many Roles for Filters
• Convolution
• Z-transforms
• Linear time-invariant systems
Transfer functions
Frequency responses
• Finite impulse response (FIR) filters
Filter design with demonstration
Cascading FIR filters demonstration
Linear phase
5-2
Many Roles for Filters
• Noise removal
Signal and noise spectrally separated
Example: bandpass filtering to suppress out-of-band noise
• Analysis, synthesis, and compression
Spectral analysis
Examples: calculating power spectra (slides 14-10 and 14-11)
and polyphase filter banks for pulse shaping (lecture 13)
• Spectral shaping
Data conversion (lectures 10 and 11)
Channel equalization (slides 16-8 to 16-10)
Symbol timing recovery (slides 13-17 to 13-20 and slide 16-7)
Carrier frequency and phase recovery
5-3
Finite Impulse Response (FIR) Filter
• Same as discrete-time tapped delay line (slide 3-18)
x[n-1]
x[n] z-1 z-1 … z-1
S y[n]
Convolution Comparison
• Continuous-time convolution of x(t) and h(t)
yt xt ht x ht d h xt d
t t t
0 Ts 0 Ts Ts 2Ts
Z-transform Definition
• For discrete-time systems, z-transforms play same
role as Laplace transforms do in continuous-time
Bilateral Forward z-transform Bilateral Inverse z-transform
hn z n
1
H ( z)
n
h[n]
2 j R
H ( z ) z n 1dz
5-8
Review
n n 0 n
n
Region of convergence: entire a
a n z n
z-plane n 0 n 0 z
1 a
1
• h[n] = [n-1] 1
a
if
z
1
H z n 1 z n 1 z n z 1
n z
n n 1 Region of convergence
Region of convergence: entire for summation: |z| > |a|
z-plane except z = 0 |z| > |a| is the complement
h[n-1] z-1 H(z) of a disk
Region of Convergence
• Region of the complex z- • Four possibilities (z = 0 is
plane for which forward z- special case that may or
transform converges may not be included)
Im{z} Im{z}
Entire Disk
plane Re{z} Re{z}
Im{z} Im{z}
Intersection
Complement of a disk and
of a disk Re{z} complement Re{z}
of a disk
5 - 10
Review
n n 0
n 0
5 - 11
Example: Ideal Delay
• Continuous Time • Discrete Time
Delay by T seconds Delay by 1 sample
x(t) y(t) x[n] 1
y[n]
T z
yt x(t T ) y[n] x[n 1]
| H | 1 | H w | 1
H T H w w 5 - 12
Linear Time-Invariant Systems
• Fundamental Theorem of Linear Systems
If a complex sinusoid were input into an LTI system, then
output would be input scaled by frequency response of
LTI system (evaluated at complex sinusoidal frequency)
Scaling may attenuate input signal and shift it in phase
Example in continuous time: see handout F
Example in discrete time. Let x[n] = e j w n,
y[n] e j w n m
h[m] e jw n
h[ m ] e jw m
e jw n
H w
m m
w w
wstop wp wp wstop
d
passband delay (w ) H (w ) kdelay
dw
Lowpass filter: passes low and attenuates high frequencies
Linear phase: must be FIR filter with impulse response that is
symmetric or anti-symmetric about its midpoint
• Not all FIR filters exhibit linear phase 5 - 15
Filter Design
• Specify a desired Lowpass Filter Example
piecewise constant Desired Magnitude Response
magnitude response
forbidden
• Lowpass filter example 1
1p
w [0, wp], mag [1-p, 1] forbidden
5 - 22
Importance of Linear Phase
code
• For images, vital visual information in phase