You are on page 1of 4

EE406 Discrete-Time Signal Processing Fast Fourier Transform (FFT) Algorithms

ZA-041 Page - 8
Linear Convolution vs Circular Convolution in the DFT
The linear convolution of two sequences ] [
1
n x of
1
N -point and ] [
2
n x of
2
N -point is given
by
] [ ] [ ] [ ] [ ] [ ] [ ] [
2
1
0
1 2 1 2 1 3
1
k n x k x k n x k x n x n x n x
N
k k



] [
3
n x is a ( ) 1
2 1
+ N N -point sequence. If we choose N =max(
2 1
, N N ) and compute a N-
point circular convolution ] [ ] [
2 1
n x n x , then we obtain a N -point sequence, which is
obviously different from ] [
3
n x .
If we choose N=( ) 1
2 1
+ N N and perform a ( ) 1
2 1
+ N N -point circular convolution, the
result becomes
( ) ] [ ] [ ] [ ] [ ] [ ] [
2
1
0
1 2 1 4
n R m n x m x n x n x n x
N N
N
m
]
]
]

] [ ] [ ] [
1
0
2 1
n R rN m n x m x
N
N
m r
]
]
]


] [ ] [ ] [
1
0
2 1
n R rN m n x m x
N
r
N
m
]
]
]

] [ ] [
3
n R rN n x
N
r
]
]
]


Thus the circular convolution is an aliased version of the linear convolution.
Since ] [
3
n x is a N=( ) 1
2 1
+ N N -point sequence, we have
1 0 [n] ] [
3 4
N n x n x
which means that there is no aliasing in the time domain. If we make both ] [
1
n x and ] [
2
n x a
N=( ) 1
2 1
+ N N -point sequence by padding an appropriate number of zeros, then the circular
convolution is identical to the linear convolution.
In order to use the DFT for linear convolution, we must choose N properly. However, when
N is large, there is an immense requirement on memory. If N is chosen to be less than the
required value, an error will be introduced. Suppose we choose N such that
( ) ( ) 1 , max
2 1 2 1
+ < N N N N N
Since ] [ ] [ ] [
3 4
n R rN n x n x
N
r
]
]
]


,
the error introduced is then
EE406 Discrete-Time Signal Processing Fast Fourier Transform (FFT) Algorithms
ZA-041 Page - 9
] [ ] [ ] [ ] [ ] [
0
3 3 4
n R rN n x n x n x n e
N
r
r
]
]
]
]
]

.
In general ] [
1
n x and ] [
2
n x are causal, thus ] [
3
n x is also causal. As ( ) N N N
2 1
, max , only
two terms 1 t r remain, and
[ ] ] [ ] [ ] [ ] [
3 3
n R N n x N n x n e
N
+ +
1 0 , 0 ] [
3
N n N n x
then ] [ ] [
3
N n x n e + 1 0 N n .
Thus even though we choose ( ) N N N
2 1
, max , the error sample at n is the same as the linear
convolution N samples away. Now the linear convolution will be zero after ( ) 1
2 1
+ N N
samples. This means that the first few samples of the circular convolution are in error, while
the remaining ones are the correct linear convolution values.
Example:
Let ] [
1
n x and ] [
2
n x be the two 4-point sequences given by
]} [ {
1
n x ={1, 2, 2, 1} and ]} [ {
2
n x ={1, 1, 1, 1}
a. Determine the linear convolution ] [
3
n x = ] [ ] [
2 1
n x n x .
b. Compute the circular convolution ] [
4
n x = ] [ ] [
2 1
n x n x for N = 6, 5, and 4, and verify the
error relations in each case.
[Solution]
The linear convolution is
] [
3
n x ={1, 1, 1, 2, 1, 1, 1}.
When N=6, 6-point sequence
] [ ] [ ] [
2 1 4
n x n x n x ={2, 1, 1, 2, 1, 1}
Therefore
e[n] = {2, 1, 1, 2, 1, 1} {1, 1, 1, 2, 1, 1} 5 0 n
= {1, 0, 0, 0, 0, 0} = ] 6 [
3
+ n x
When N=5, 5-point sequence
] [ ] [ ] [
2 1 4
n x n x n x ={2, 2, 1, 2, 1}
and
EE406 Discrete-Time Signal Processing Fast Fourier Transform (FFT) Algorithms
ZA-041 Page - 10
e[n] = {2, 2, 1, 2, 1} {1, 1, 1, 2, 1} 4 0 n
= {1, 1, 0, 0, 0}
= ] 5 [
3
+ n x .
Finally when N = 4, the 4-point sequence is
] [ ] [ ] [
2 1 4
n x n x n x ={0, 2, 0, 2}
e[n] = {0, 2, 0, 2} {1, 1, 1, 2} 3 0 n
= ] 4 [
3
+ n x
Thus when N= ( )
2 1
, max N N is chosen for circular convolution, the first (M1) samples are in
error where M = min( )
2 1
, N N . This result is very useful for the implementation of long
convolutions in the form of block processing.
Block Convolution of the DFT for Spectral Analysis
For an infinite-length sequence, a practical approach is to partition the infinite-length input
sequence into smaller blocks, process each block using the DFT, and finally assemble the
output sequence from the outputs of each block. This procedure is called a block
convolution.
Overlap-save method for block convolution
Consider an input sequence x[n] being partitioned into N-point sequences and the impulse
response of the filter is a M-point sequence where M <N. If we simply partition x[n] into
nonoverlapping blocks, then the resulting output sequence will have intervals of incorrect
samples. To correct this problem, we can partition x[n] into overlapping blocks with the
previous one by exactly (M1) samples, save the last (NM +1) output samples, and finally
concatenate these outputs into a sequence. To correct for the first (M1) samples in the first
output block, we set the first (M1) samples to zero. This procedure is called overlap-save
method.
Example:
Let x[n]=(n+1), 9 0 n and { 1 0, , 1 ] [ n h . Calculate the linear convolution with N =6
by using the overlap-save method.
[Solution]
Now M = 3, N = 6 and we will need (M1)=2 zeros at the beginning. We need to have 3
blocks with
{ 4 3, 2, 1, 0, 0, ] [
1
n x
{ 8 7, 6, 5, 4, 3, ] [
2
n x
{ 0 0, 10, 9, 8, 7, ] [
3
n x
EE406 Discrete-Time Signal Processing Fast Fourier Transform (FFT) Algorithms
ZA-041 Page - 11
We pad ] [
3
n x with two zeros since x[n] is running out of data. Now
] [ ] [ ] [
1 1
n h n x n y = {3, 4, 1, 2, 2, 2}
] [ ] [ ] [
2 2
n h n x n y = {4, 4, 2, 2, 2, 2}
] [ ] [ ] [
3 3
n h n x n y = {7, 8, 2, 2, 9, 10}
] [ ] [ ] [ n h n x n y ={1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 9, 10}.
Overlap-add method for block convolution
There is another method called overlap-add method for block convolution. In this method,
the input sequence x[n] is partitioned into nonoverlapping blocks and convolved with the
impulse response. Let x[n] be a long sequence of length ML with M, L>>0, and h[n] is a L-
point sequence. First divide x[n] into M nonoverlapping blocks with each length L, and
( )

'
+

otherwise , 0
1 1 , ] [
] [
M k n kM n x
n x
k
Then
] [ ] [ ] [ n h n x n y =


1
0
1
0
] [ ] [ ] [
M
k
k
M
k
k
n y n h n x .
where ] [n y
k
is a (2L 1)-point sequence.
Example:
Recalculate the convolution in the previous example by using overlap-add method.
[Solution]
Now L = 3,
] [
1
n x {1, 2, 3}
] [
2
n x {4, 5, 6}
] [
3
n x {7, 8, 9}
] [
4
n x {10, 0, 0}
] [ ] [ ] [
1 1
n h n x n y {1, 2, 2, 2, 3}
] [ ] [ ] [
2 2
n h n x n y {4, 5, 2, 5, 6}
] [ ] [ ] [
3 3
n h n x n y {7, 8, 2, 8, 9}
] [ ] [ ] [
4 4
n h n x n y {10, 0, 10, 0, 0}
] [ ] [ ] [ n h n x n y = {1, 2, 2, 2, 3} +
{4, 5, 2, 5, 6} +
{7, 8, 2, 8, 9} +
{10, 0, 10, 0, 0}
= {1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 9, 10}

You might also like