You are on page 1of 28

DIGITAL SIGNAL PROCESSING

Chapter 5: FINITE IMPULSE RESPONSE


OF LTI SYSTEMS - CONVOLUTION
Reference:
S J.Orfanidis, ”Introduction to Signal Processing”, Prentice –Hall , 1996,ISBN 0-13-209172-0
M. D. Lutovac, D. V. Tošić, B. L. Evans, “Filter Design for Signal Processing Using MATLAB and
Mathematica”, Prentice Hall, 2001

Lectured by Prof. Dr. Thuong Le-Tien


National Distinguished Lecturer
Tel: 08-38654184; 0903 787 989
Email: ThuongLe@hcmut.edu.vn,
ThuongLe@yahoo.com
1
Dated on Feb 2020
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, etc.)

2
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 (be discussed in the Z-
transform Chapter)

3
1. Block processing methods
1.1. Convolution
Sampling time interval, T=1/fs.
Number of time samples: L = TLfs
x(n) = [x0, x1, … , xL-1]
where n = 0, 1, …, L – 1:
The direct and convolution forms
y ( n )   h ( m) x ( n  m)   x ( m) h( n  m)
m m
Convolution table form
y (n)   h(i ) x( j ) (i  j  n)
i. j
4
1.2 DIRECT FORM
Consider a causal FIR filter of order M with
impulse response h(n),
h = [h0, h1, …, hM]
where n = 0, 1, …, M
the length of the filter or the number of filter
coefficients LH = M + 1
The output of the filter:

y ( n )   h ( m) x ( n  m)
m

5
with conditions 0 mM
and 0  n – m  L – 1
 mnL–1+m
The limit of output index n:
0mnL–1+mL–1+M
 0n L–1+M
y = [y0, y1, y2, … , yL – 1 + M]

The length of output: Ly = L + M

Ly = Lx + Lh –1

6
m must satisfy simultaneously the inequalities
0 mM
n–L+1  mn

7
It follows:
max(0, n – L + 1 )  m  min(n,M)
The direct form of convolution
min( n , M )
y ( n)   h ( m) x ( n  m)
m  max( 0 , n  L 1)
Example: an order 3 filter and a length 5-input
signal: h = [h0, h1, h2, h3]
x = [x0, x1, x2, x3, x4]
y = h * x = [y0, y1, y2, y3, y4, y5, y6, y7]

8
Equation applied:
min( n , 3)
y ( n)   h ( m) x ( n  m)
m  max( 0 , n  4 )
n  0,1, ..., 7
for n= 0, 1, 2,….7
max (0, 0 – 4)  m  min(0, 3) => m = 0
max (0, 1 – 4)  m  min(1, 3) => m = 0, 1
max (0, 2 – 4)  m  min(2, 3) => m = 0,1 ,2
max (0, 3 – 4)  m  min(3, 3) => m = 0, 1, 2, 3
max (0, 4 – 4)  m  min(4, 3) => m = 0, 1, 2, 3
max (0, 5 – 4)  m  min(5, 3) => m = 1, 2, 3
max (0, 6 – 4)  m  min(6, 3) => m = 2, 3
max (0, 7 – 4)  m  min(7, 3) => m = 3
i.e. n = 5, y5 = h1x4 + h2x3 + h3x2
9
All the output samples:
y0 = h0x0
y1 = h0x1 + h1x0
y2 = h0x2 + h1x1 + h2x0
y3 = h0x3 + h1x2 + h2x1 + h3x0
y4 = h0x4 + h1x3 + h2x2 + h3x1
y5 = h1x4 + h2x3 + h3x2
y6 = h2x4 + h3x3
y7 = h3x4

10
1.3. Convolution table:

11
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]
Ly = L + M = 8 + 3 = 11
12
1.4. LTI form:
h = [h0, h0, h2, h3]
x = [x0, x1, x2, x3, x4]
Input x can be rewritten as a linear combination of delayed
impulses
x = x0[1, 0, 0, 0, 0] + x1[0, 1, 0, 0, 0] + x2[0, 0, 1, 0, 0] +
x3[0, 0, 0, 1, 0] + x4[0, 0, 0, 0, 1]
x(n)=x0(n)+x1(n–1)+x2(n–2)+x3(n–3)+x4(n–4)
Then:
y(n)=x0h(n)+x1h(n–1)+x2h(n–2)+x3h(n–3)+x4h(n–4)

13
We can present the input and output signals as blocks:

14
LTI form of convolution

15
Example: h = [1, 2, -1, 1] and
x = [1, 1, 2, 1, 2, 2, 1, 1]

16
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
1.5. Matrix form
Linear matrix form: y = Hx
The filter matrix H must be rectangular with
dimensions:
Ly * Lx = (L + M) * L
 y0   h0 0 0 0 0
 y  h h0 0 0 0 
 1  1  x0 
 y2  h2 h1 h0 0 0  
     x1 
 y3   h3 h2 h1 h0 0
y   x2   Hx
 y4   0 h3 h2 h1 
h0  
     x3 
 y5   0 0 h3 h2 h1 
 x4 
y   0 0 0 h3 h2 
 6  
 y7   0 0 0 0 h3 

H is also called the TOEPLITZ MATRIX in the sense of that


it has the same entry a long each diagonal
18
Example:

There is also a matrix


Form written as follows

19
1.6. Flip and slide

yn = h0xn + h1xn-1 + h2xn-2 + … + hMxn-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
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n<M (input on transient)
MnL–1 (steady state)
L–1<nL–1+M (input off transient)

21
Example: An IIR filter has the impulse response
h(n)=(0.75)nu(n). Using convolution to find y(n)
when the inputs are:
a) x(n) = u(n)
b) x(n) = (-1)nu(n)
c) x(n) = u(n) – u(n – 25)
Find the steady state response for each case.
Solve:
n n
a) y (n)   h(m)x(n - m)   (0.75) n u(m)u(n - m)
m0 m 0

n
n1  (0.75) n 1
  (0.75)   4  3(0.75) n
m 0 1  0.75

1
lim y ( n)   4
1  0.75
22
n n
b) m n -m
y (n)   h(m)x(n - m)   (0.75) (-1)
m 0 m 0

n
 (-1)n  (0.75) m
m 0
Steady state response:

n 1
n 1  ( 0. 75 ) n 4 3
 (-1) = (-1) + (0.75) n
1  0.75 7 7
n 1 n 4
y(n) -  (1)  (1)
1  0.75 7
23
n n
c) m
yn   hm xnm 
m  max( 0 , n  L 1)
 ( 0.75)
m  max( 0 , n  L 1)

Two cases:
n n 1
1  ( 0 . 75)
yn   (0.75) m   4  3(0.75) n
m0 1  0.75
n 25
1 - (0.75)
yn   (0.75) m = (0.75) n -24
m  n  24 1 - 0.75

24
1.8. Overlap-Add Block Convolution Method

Overlap-add convolution method


25
Example:

26
2. Sample processing method

Adder

Multiplier

Delay

27
FIR Filtering in Direct Form

Direct form realization of third-order filter.

28

You might also like