You are on page 1of 28

By Assoc.Prof.Dr.

Thuong Le-Tien 1
DIGITAL SIGNAL PROCESSING
FINITE IMPULSE RESPONSE
OF LTI SYSTEMS
Lectured by: Assoc. Prof. Dr. Thuong Le-Tien
National Distinguished Lecturer
HCMC September, 2011
1
Practical DSP methods fall in two basis classes:
1. Block Processing Methods
2. Sample Processing Methods
In block processing methods, data are collected and
processed in blocks (DFT/FFT spectrum
computation, speech analysis and synthesis, image
processing.
In sample processing methods, data are processed
one at a time (real-time applications, audio effects
processing , digital controls,
2 By Assoc.Prof.Dr. Thuong Le-Tien
In this chapter, block processing and sample
processing methods applied to FIR filtering
and Convolution. Several computational
aspects of convolution equations are
considered:
* Direct form
* Convolution table
* LTI form
* Matrix form
* Flip-and-slide form
* Overlap-add block convolution form.
* Z-Transform (discussed in the Z-transform
Chapter)
3 By Assoc.Prof.Dr. Thuong Le-Tien
1. Block processing methods
1.1. Convolution
Sampling time interval, T=1/f
s
.
Number of time samples: L = T
L
f
s
x(n) = [x
0
, x
1
, , x
L-1
]
where n = 0, 1, , L 1:
The direct and convolution forms
Convolution table form

= =
m m
m n h m x m n x m h n y ) ( ) ( ) ( ) ( ) (
) ( ) ( ) ( ) (
.
n j i j x i h n y
j i
= + =

4 By Assoc.Prof.Dr. Thuong Le-Tien


1.2 DIRECT FORM
Consider a causal FIR filter of order M with
impulse response h(n),
h = [h
0
, h
1
, , h
M
]
where n = 0, 1, , M
the length of the filter or the number of filter
coefficients L
H
= M + 1
The output of the filter:

=
m
m n x m h n y ) ( ) ( ) (
5 By Assoc.Prof.Dr. Thuong Le-Tien
with conditions 0 s m s M
and 0 s n m s L 1
m s n s L 1 + m
The limit of output index n:
0 s m s n s L 1 + m s L 1 + M
0 s n s L 1 + M
y = [y
0
, y
1
, y
2
, , y
L 1 + M
]
The length of output: L
y
= L + M
L
y
= L
x
+ L
h
1
6 By Assoc.Prof.Dr. Thuong Le-Tien
M must satisfy simultaneously the inequalities
0 s m s M
n L + 1 s m s n
7 By Assoc.Prof.Dr. Thuong Le-Tien
It follows:
max(0, n L + 1 ) s m s min(n,M)
The direct form of convolution
Example: an order 3 filter and a length 5-input
signal: h = [h
0
, h
1
, h
2
, h
3
]
x = [x
0
, x
1
, x
2
, x
3
, x
4
]
y = h * x = [y
0
, y
1
, y
2
, y
3
, y
4
, y
5
, y
6
, y
7
]

+ =
=
) , min(
) 1 , 0 max(
) ( ) ( ) (
M n
L n m
m n x m h n y
8 By Assoc.Prof.Dr. Thuong Le-Tien
Equation applied:
for n= 0, 1, 2,.7
max (0, 0 4 ) s m s min(0, 3) => m = 0
max (0, 1 4 ) s m s min(1, 3) => m = 0, 1
max (0, 2 4 ) s m s min(2, 3) => m = 0,1 ,2
max (0, 3 4 ) s m s min(3, 3) => m = 0, 1, 2, 3
max (0, 4 4 ) s m s min(4, 3) => m = 0, 1, 2, 3
max (0, 5 4 ) s m s min(5, 3) => m = 1, 2, 3
max (0, 6 4 ) s m s min(6, 3) => m = 2, 3
max (0, 7 4 ) s m s min(7, 3) => m = 3
i.e. n = 5, y
5
= h
1
x
4
+ h
2
x
3
+ h
3
x
2
7 ..., , 1 , 0 ) ( ) ( ) (
) 3 , min(
) 4 , 0 max(
= =

=
n m n x m h n y
n
n m
9 By Assoc.Prof.Dr. Thuong Le-Tien
All the output samples:
y
0
= h
0
x
0
y
1
= h
0
x
1
+ h
1
x
0
y
2
= h
0
x
2
+ h
1
x
1
+ h
2
x
0
y
3
= h
0
x
3
+ h
1
x
2
+ h
2
x
1
+ h
3
x
0
y
4
= h
0
x
4
+ h
1
x
3
+ h
2
x
2
+ h
3
x
1
y
5
= h
1
x
4
+ h
2
x
3
+ h
3
x
2
y
6
= h
2
x
4
+ h
3
x
3
y
7
= h
3
x
4
10 By Assoc.Prof.Dr. Thuong Le-Tien
1.3. Convolution table:
11 By Assoc.Prof.Dr. Thuong Le-Tien
Example: Find the convolution of the following
filter and input signal
h = [1, 2, -1, 1]
x = [1, 1, 2, 1, 2, 2, 1, 1]
y = [1, 3, 3, 5, 3, 7, 4, 3, 3, 0, 1]
L
y
= L + M = 8 + 3 = 11
12 By Assoc.Prof.Dr. Thuong Le-Tien
1.4. LTI form:
h = [h
0
, h
0
, h
2
, h
3
]
x = [x
0
, x
1
, x
2
, x
3
, x
4
]
Input x can be rewritten as a linear combination of delayed
impulses
x = x
0
[1, 0, 0, 0, 0] + x
1
[0, 1, 0, 0, 0] + x
2
[0, 0, 1, 0, 0] +
x
3
[0, 0, 0, 1, 0] + x
4
[0, 0, 0, 0, 1]
x(n)=x
0
o(n)+x
1
o(n1)+x
2
o(n2)+x
3
o(n3)+x
4
o(n4)
Then:
y(n)=x
0
h(n)+x
1
h(n1)+x
2
h(n2)+x
3
h(n3)+x
4
h(n4)
13 By Assoc.Prof.Dr. Thuong Le-Tien
We can present the input and output signals as blocks:
14 By Assoc.Prof.Dr. Thuong Le-Tien
LTI form of convolution
15 By Assoc.Prof.Dr. Thuong Le-Tien
Example: h = [1, 2, -1, 1] and
x = [1, 1, 2, 1, 2, 2, 1, 1]
16 By Assoc.Prof.Dr. Thuong Le-Tien
The LTI form can also be written in a form
similar by determine the proper limits of
For n = 0, 1, , L + M 1
17 By Assoc.Prof.Dr. Thuong Le-Tien
1.5. Matrix form
Linear matrix form: y = Hx
The filter matrix H must be rectangular with
dimensions:
L
y
* L
x
= (L + M) * L
H is also called the TOEPLITZ MATRIX in the sense of that
it has the same entry a long each diagonal
Hx
x
x
x
x
x
h
h h
h h h
h h h h
h h h h
h h h
h h
h
y
y
y
y
y
y
y
y
y =
(
(
(
(
(
(

(
(
(
(
(
(
(
(
(
(
(

=
(
(
(
(
(
(
(
(
(
(
(

=
4
3
2
1
0
3
2 3
1 2 3
0 1 2 3
0 1 2 3
0 1 2
0 1
0
7
6
5
4
3
2
1
0
0 0 0 0
0 0 0
0 0
0
0
0 0
0 0 0
0 0 0 0
18 By Assoc.Prof.Dr. Thuong Le-Tien
Example:
There is also a matrix
Form written as follows
19 By Assoc.Prof.Dr. Thuong Le-Tien
1.6. Flip and slide
y
n
= h
0
x
n
+ h
1
x
n-1
+ h
2
x
n-2
+ + h
M
x
n-M
the first M outputs correspond to the input-on
transient behavior of the filter, and the last M
outputs beyond the end of the input data are
the input-off transients. The remains are the
steady-state outputs.
20 By Assoc.Prof.Dr. Thuong Le-Tien
1.7. Transient and Steady-State Behavior
Length of input signal is L, filter order M, the output
can be separated into 3 parts
0 s n < M (input on transient)
M s n s L 1 (steady state)
L 1 < n s L 1 + M (input off transient)
21 By Assoc.Prof.Dr. Thuong Le-Tien
Example: An IIR filter has xung h(n) =
(0.75)
n
u(n). Using convolution to find y(n)
when the inputs are:
a) x(n) = u(n)
b) x(n) = (-1)
n
u(n)
c) x(n) = u(n) u(n 25)
Find the steady state response for each case.
Solve:
a)

= =
= =
n
m
n
m
n y
0 0
) ( m) - u(m)u(n (0.75) m) - h(m)x(n
n

=
+
=

= =
n
m
n
n
0
1
) 75 . 0 ( 3 4
75 . 0 1
) 75 . 0 ( 1
n
(0.75)
4
75 . 0 1
1
) ( =

> n y
lim
22 By Assoc.Prof.Dr. Thuong Le-Tien
b)
Steady state response:

=
=
n
m 0
(
m n
(0.75) -1)

= =
= =
n
m
n
m
n y
0 0
) (
m - n m
(-1) (0.75) m) - h(m)x(n
(0.75)
7
3
+
7
4
(-1) =
75 . 0 1
) 75 . 0 ( 1
(-1)
n n
1
n
+

=
+ n
7
4
) 1 (
75 . 0 1
1
1) ( - y(n)
n n
=
+
>
23 By Assoc.Prof.Dr. Thuong Le-Tien

+ = + =

= =
n
L n m
m
n
L n m
m n m n
x h y
) 1 , 0 max( ) 1 , 0 max(
) 75 . 0 (
c)
Two cases:
24 By Assoc.Prof.Dr. Thuong Le-Tien
n
n
n
m
n
y ) 75 . 0 ( 3 4
75 . 0 1
) 75 . 0 ( 1
(0.75)
1
0
m
=

= =
+
=

=
=
n
n m
n
y
24
25
24 - n m

0.75 - 1
(0.75) - 1
(0.75) = (0.75)
1.8. Overlap-Add Block Convolution Method
Overlap-add convolution method
25 By Assoc.Prof.Dr. Thuong Le-Tien
Example:
26 By Assoc.Prof.Dr. Thuong Le-Tien
2. Sample processing method
Adder
Multiplier
Delay
27 By Assoc.Prof.Dr. Thuong Le-Tien
FIR Filtering in Direct Form
Direct form realization of third-order filter.
28 By Assoc.Prof.Dr. Thuong Le-Tien

You might also like