Professional Documents
Culture Documents
DSPFirst L11
DSPFirst L11
Lecture 11
FIR Filtering Intro
READING ASSIGNMENTS
This Lecture:
Chapter 5, Sects. 5-1, 5-2, 5-3 & 5-4 (partial)
Other Reading:
Next Lecture: Ch. 5, Sects 5-4, 5-6, 5-7 & 5-8
CONVOLUTION
x[n] y[n]
COMPUTER
x[n] y[n]
SYSTEM
EXAMPLES:
POINTWISE OPERATORS
SQUARING: y[n] = (x[n])2
RUNNING AVERAGE
RULE: “the output at time n is the average of three
consecutive input values”
STEM PLOT
n=0
OUTPUT SIGNAL
Figure 5-3 Filter calculation at the present time (ℓ = n) uses values within a
sliding window. Gray shading indicates the past (ℓ < n); orange shading, the
future (ℓ > n). Here, the sliding window encompasses values from both the
future and the past.
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 14
ANOTHER 3-pt AVERAGER
x[n-M] x[n]
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 19
FILTERED STOCK SIGNAL
INPUT
OUTPUT
n
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 21
UNIT IMPULSE SIGNAL d[n]
n3
d[n] is NON-ZERO [n 3]
When its argument
is equal to ZERO
Example:
0 0 0 1
0 0 0 0 10
y[n] [n] 4 [n 1] [n 2] 4 [n 3]
1
4
1 4 1
41
0 0 0 0 4 0 0 0 0
h[n] 0 0 0 0 0 0 0 0 0
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 26
SUM of Shifted Impulses
h[n] 14 [n] 14 [n 1] 14 [n 2] 14 [n 3] 0 [n 4]
n 1 0 1 2 3 4 5 6 7
h[n] 0 1
4
1
4
1
4
1
4 0 0 0 0
h[0] [n] 0 1
4 0 0 0 0 0 0 0
h[1] [n 1] 0 0 1
4 0 0 0 0 0 0
h[2] [n 2] 0 0 0 1
4 0 0 0 0 0
h[3] [n 3] 0 0 0 0 1
0 0 0 0
4
h[4] [n 4] 0 0 0 0 0 0 0 0 0
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 27
FIR IMPULSE RESPONSE
M M
y[n ] bk x[n k ] h[n ] bk [n k ]
k 0 k 0
0 4 n
3: List the values –1
bk { 1, 1, 2, 1, 1 } True for any signal, x[n]
Aug 2016 © 2003-2016, JH McClellan & RW Schafer 30
FILTERING EXAMPLE
6
7-point AVERAGER y 7[n] 17 x[n k]
Removes cosine k 0
By making its amplitude (A) smaller
2
3-point AVERAGER
Changes A slightly
y 3[n] 13 x[n k]
k 0