You are on page 1of 31

©angsuman sarkar,ece,jgec,angsumansarkar@gmail.

com page 1of 31

Introduction
Fourier methods are commonly used for signal analysis and system design in modern telecommunications,
radar, and image processing systems. Classical Fourier methods such as the Fourier series
and the Fourier integral are used for continuous time (CT) signals and systems, i.e., systems in which
a characteristic signal, s.t/, is defined at all values of t on the continuum −1 < t < 1 . Amore
recently developed set of Fouriermethods, including the discrete time Fourier transform(DTFT) and
the discrete Fourier transform (DFT), are extensions of basic Fourier concepts that apply to discrete
time (DT) signals.

Concept of Fourier analysis:

We have already seen that any arbitrary sequence is weighted linear combination of unit
sample sequences ( wδ (n − k ) ). We consider in this chapter an alternate description of a

sequence in terms of complex exponential sequences { e − jwn


} This leads to a useful
representation of DT sequences and LTI DT systems in frequency domain. This alternate
description will lead to a set of basic function known as Fourier series and
Transformation.
In a Fourier analysis the basic elementary signals are sinusoidal signal with different
periods giving rise to concept of frequency. The amplitude of sinusoids of various
frequencies form frequency spectrum of the signal. Concentration or spread of power
indicates the correlated or random character of a signal. Thus Fourier analysis tells us the
predictive character of the signal. For a pure sine wave the signal power is concentrated
in one frequency & for a pure random signal the signal power is spread equally in the
frequency domain indicating the random nature of the signal.

Response of a LTI system to complex exponentials:


A signal for which the system output is (possibly complex) constant time the input is
referred to as an Eigen function of the system and the amplitude factor is referred to as
system’s Eigen value.
Complex exponentials are Eigen function of an LTI system. We can verify that.
©angsuman sarkar,ece,jgec,angsumansarkar@gmail.com page 2of 31

st
Let x(t) =e is input to a CT LTI system with impulse response h(t). We can determine
the output by convolution integral.

y (t ) = ∫ h(t ) x(t − τ )dτ
−∞

∫ h (t ) e
s ( t −τ )
y (t ) = dτ
−∞

∫ h(t )e
− sτ
y (t ) = e st

−∞

y (t ) = e .H ( s)
st

∫ h(t )e
− sτ
where..H ( s) = eigen..value = dτ
−∞

e st = eigen.... function

Discrete time Fourier Transformation (DTFT):-


The Discrete time Fourier Transformation (DTFT) of DT sequence ({x[n]}) is a

representation of the sequence in terms of complex exponential sequences( e − jwn ).


Where w=frequency variable. The original sequence can be obtained by inverse operation
known as IDTFT.
We have already seen that when we apply a sinusoid as an i/p to an LTI system , the o/p
is also a sinusoid at the same frequency , although it may have a different amplitude and
phase. To demonstrate this kind of invariance , let us take the ip to the LTI system

{x[n]}={ e jw0n
}
o/p=convolution of i/p and unit sample response of the system
©angsuman sarkar,ece,jgec,angsumansarkar@gmail.com page 3of 31


y[n] = ∑ h[k ]x[n − k ]
k = −∞

y[n] = ∑ h[k ]e
k = −∞
jw0 ( n − k )


y[n] = e jw0 n ∑ h[k ]e
k = −∞
− jw0 k

y[n] = e jw0 n
H (e jw0 )

where...H (e jw0 ) = ∑ h[k ]e
k = −∞
− jw0 k

in..general..

H (e jw ) = ∑ h[n]e
n = −∞
− jw0 n
.....DTFT
The o/p sequence is also a complex exponential at the same frequency, but has been
jw
multiplied by a complex valued time coefficient (H(e )). This coefficient has
introduced gain and phase factors.

We will observe that the DTFT of a sequence x[n] is a continuous function of w. It is also
periodic in w with period 2 π .
Proof of periodicity

X (e j ( w1+ 2πk )
)= ∑ x[n]e
n = −∞
− j ( w1+ 2πk ) n


= ∑ x[n]e
n = −∞
− jw1n
e − j 2πkn
− j 2πkn
e = 1...if ..k , n..are.. int eger
= X (e jw1 )
Thus if DT signal is unique over the frequency interval (0,2 π ) or (- π , π ).then
X(w)is periodic with period 2 π

IDTFT:-
π
1
x[ n] = ∫
jwn
X ( w) e dw
2π −π
Discrete Fourier Transformation:-
©angsuman sarkar,ece,jgec,angsumansarkar@gmail.com page 4of 31

A difficulty encountered with the DTFT of a DT signal is the resulting representation


X(w) becomes continuous function of frequency.
It can’t be processed by computer because
1) DTFT involves summing of infinite number of terms
2) IDTFT requires integration
In this section we will discuss the representation of a DT signal x[n] by samples of its
spectrum X(w). Such a frequency sampling process leads to DFT, a transform domain
which is applicable only to finite length sequences.
DFT itself a sequence, rather than a continuous function.
The DFT of a finite duration sequence x[n] is obtained by sampling the DTFT X(w) at N
equally spaced points over the interval 0<= w <=2 π with a spacing of 2 π /N.
DFT is obtained by sampling one period of the DTFT at a finite number of frequency
points.

DFT:-
©angsuman sarkar,ece,jgec,angsumansarkar@gmail.com page 5of 31

X [k ] = X ( w) 2πk
w=
N

where...0 ≤ k ≤ N − 1
N −1 j 2πnk

X [ K ] = ∑ x[n]e N
.....DFT
n =0
N −1 j 2πnk
1
x[n] =
N
∑ X [ K ]e
k =0
N
.....IDFT
Now when a CT signal is sampled with sampling time T, the spectrum of the
resulting DT sequence becomes a periodic function of frequency 2 π /T.
Similarly when X(w) is sampled with sampling points 2 π /N, the corresponding DT
sequence becomes periodic in time with period N.
Thus the periodic sequence Xp[n], is formed by adding an infinite number of shifted
replicas.
©angsuman sarkar,ece,jgec,angsumansarkar@gmail.com page 6of 31

Example:-
Find the DFT of a 3 point signal x(n) as shown in fig

solution:-
2 j 2πNk

X (K ) = ∑ x ( n )e
N =0
N

j 2π j 4π
− k − k
X ( K ) = 3 + 2e + 3e 3 3

X ( 0) = 3 + 2 + 3 = 8
j 2π j 4π
− −
X (1) = 3 + 2e 3
+ 3e 3

X (1) = 3 + (−1 − j 3 ) + (−3 / 2 + j 3 / 2


X (1) = 1 / 2 + j 3 / 2 = e 3



X ( 2) = e 3

K 0 1 2
|X(K)| 8 1 1
∠ X(K) 0 PI/3 -PI/3

observe that because x(n) is a3 point sequence, its DFT is also a 3 point sequence.
Now we want to know about the DTFT from the DFT. The DTFT of X(K) is given by
©angsuman sarkar,ece,jgec,angsumansarkar@gmail.com page 7of 31

2
X (e jw ) = ∑ x(n)e − jwn
k =0
− jw
= 3 + 2e + 3e − j 2 w
= e − jw (2 + 3e jw + 3e − jw )
= e − jw (2 + 6 cos w)
F ( w) =| 2 + 6 cos w |
⎧ − w for (2 + 6 cos w) > 0
∠F ( w) = ⎨
⎩π − w for (2 + 6 cos w) < 0
Observe that DFT values are equal to DTFT values at sampling frequencies. But DFT in
this example has too few points to give a reasonable picture of DTFT. The peaks of the
DTFT appearing between the 2nd and 3rd sample is missing by the DFT. The goal can be
accomplished by zero padding.
Use of zero padding:-Seeing the DTFT through DFT is like a viewing F(w) through a
picket fence. Only the spectral components at the sampled frequencies will be visible. If
DFT has too few points, major peaks and valleys of F(w) existing DFT points will not be
visible. Actually it is possible to compute DTFT from DFT by using interpolation
formulae. But in that case we seek to reduce the distance at which we sampled. ( i.e.
equal to 2.PI/N).So N must be increased. So length of the sample must be increased. It
can be done by adding sufficient number of zero points to input sample sequence.
BY appending sufficient number of zeros to input sequence, the period N will increase
and thereby number of points in the DFT increases. Thus zero valued dummy elements
contribute nothing to the sum of DFT but act to decrease the frequency spacing.

Example:-The previous example is zero padded to become a 6 point sequence.


5 j 2πNk

X (K ) = ∑ x ( n)e
N =0
N

jπ j 2π
− k − k
X ( K ) = 3 + 2e 3
+ 3e 3

X ( 0) = 3 + 2 + 3 = 8
− jπ
X (1) = 5e 3


X (2) = e 3

X (3) = 4
− jπ
X (4) = e 3


X (5) = 5e 3
©angsuman sarkar,ece,jgec,angsumansarkar@gmail.com page 8of 31

DFT –as a linear transformation or DFT using matrix


Matrix relations

we can now view DFT and IDFT as linear combination on sequences {x[n]} and {X[k]}.
Let us define a N point vector x of the signal sequence.

then we can write


©angsuman sarkar,ece,jgec,angsumansarkar@gmail.com page 9of 31

therefore
X = DN x
x = XD N−1 ....(1)
agian.. from...IDFT ...Eqn
1
x = D N* X
N
1
D N−1 = D N*
N
D N D N = N .I N
*

Very... Im por tan t... Pr operty


D NK + N / 2 = − D NK
example: compute the DFT of the 4 point sequencex(n)={0 1 2 3}.
Solution:-
WN = W4 =

1 1 1 1
1 2
1 W 4 W 4 W43
2 4
1 W 4 W 4 W46
3 6
1 W 4 W 4 W49
©angsuman sarkar,ece,jgec,angsumansarkar@gmail.com page 10of 31

− j 2π
W41 = e 4
= cos π / 2 − j sin π / 2 = − j
− j 2π .2
W42 = e 4
= cos π − j sin π = −1
W42 = W40+ 4 / 2 = W NK + N / 2 = −W NK = −W40 = −1
W44 = W42+ 4 / 2 = −W42 = 1
1 1 1 1
1 -j -1 j
1 -1 1 -1
1 j -1 -j
⎡0⎤ ⎡1 1 1 1 ⎤
⎢1 ⎥ ⎢1 − j − 1 j ⎥
X 4 = ⎢ ⎥⎢ ⎥
⎢2⎥ ⎢1 − 1 1 − 1 ⎥
⎢ ⎥⎢ ⎥
⎣3⎦ ⎣1 j − 1 − j ⎦
⎡ 6 ⎤
⎢− 2 + 2 j ⎥
X4 = ⎢ ⎥
⎢ −2 ⎥
⎢ ⎥
⎣− 2 − 2 j ⎦

example:-
compute the IDFT of the 4 point sequencex(n)={6,-2+2j,-2,-2-2j}.
Solution:-
©angsuman sarkar,ece,jgec,angsumansarkar@gmail.com page 11of 31

1 *
xN = WN X N
N
1
W N−1 = W N*
N
x N = W N−1 X N
⎡1 1 1 1 ⎤
⎢1 j − 1 − j ⎥
1
W4−1 = ⎢ ⎥
4 ⎢1 − 1 1 − 1 ⎥
⎢ ⎥
⎣1 − j − 1 j ⎦
⎡1 1 1 1 ⎤⎡ 6 ⎤
⎢1 j − 1 − j ⎥ ⎢− 2 + 2 j ⎥
1
x4 = ⎢ ⎥⎢ ⎥
4 ⎢1 − 1 1 − 1 ⎥ ⎢ − 2 ⎥
⎢ ⎥⎢ ⎥
⎣1 − j − 1 j ⎦ ⎣ − 2 − 2 j ⎦
⎡0 ⎤
⎢1 ⎥
x4 = ⎢ ⎥
⎢ 2⎥
⎢ ⎥
⎣ 3⎦
Circular shift of a sequence:-

The periodic extension of sequence x[n] can be written as x p (n) = ∑ x(n − lN )
l = −∞

One way of visualizing the periodic sequence x p (n) is wrapping the finite duration
sequence x(n) around a circle in counterclockwise direction which is selected as +ve
direction.
As we repeatedly traverse the circumference of the circle , we see the finite length
sequence ,periodically repeated on a circular(modulo N) time axis. Thus we can write
x p (n) =x[(n modulo N)].
If the argument n is between 0 to N-1, leave it as it is , otherwise add/subtract multiples
of N, until the result is between 0 to N-1.
Example:-
x(-3 modulo 4)=x(1)
x(10 modulo 8)=x(2)
x(-11 modulo 4)=x(1)

x 'p = x p (n − k )

= ∑ x(n − lN − k )
l = −∞
©angsuman sarkar,ece,jgec,angsumansarkar@gmail.com page 12of 31

x ' (n) = x 'p (n)......0 ≤ n ≤ N − 1


= 0 otherwise

In In

In last figure we find x(n) and its periodic extension x p (n) . The sequence x 'p (n) is
obtained by shifting x p (n) by 2 units right.
From the figure we find that the sequence x’(n) is not a linear shift of x(n) and x’(n) can
be formed by shifting x(n) so that as a sequence value leaves the interval 0 to N-1 at one
end it enters at the other end.
We know that a periodic sequence x p (n) can be interpreted
from the finite duration sequence x(n) by displaying x(n) around the circumference of a
circle with a circumference of exactly N points.
The linear shift of the periodic sequence
x p (n) is equal shifting the sequence x(n) circularly in anticlockwise direction.
©angsuman sarkar,ece,jgec,angsumansarkar@gmail.com page 13of 31

x(n) = [ x(0), x(1), x(2),.................x( N − 1)]


x((n − 1)) N = [ x( N − 1), x(0), x(1),.................x( N − 2)]
x((n − 2)) N = [ x( N − 2), x( N − 1), x(0),.................x( N − 3)]
x((n − k )) N = [ x( N − k ), x( N − k + 1),.................x( N − k − 1)]
x((n − N )) N = [ x(0), x(1), x(2),.................x( N − 1)]
i.e....x((n − N )) = x(n)
a shift of k=N results in original sequence in the same way x((n − m)) N =x (N - m + n )

Summary:-If you consider a length-N sequence defined for 0<=n<=N-1. such a sequence
have sample values equal to zero for n<0 and n>=N.
If x[n] is such a sequence , then for any arbitrary integer n0, the shifted sequence
x1[n]=x[n-n0] is no longer defined for the range 0<=n<=N-1. we therefore need to define
another type of shift that will always keep the shifted sequence in the range 0<=n<=N-1.
This is known as circular shift.
©angsuman sarkar,ece,jgec,angsumansarkar@gmail.com page 14of 31

above equation reduces to

if we substitute the result we get the desired expression for x3(m)

The last expression has the form of a convolution sum. However it is not the ordinary
linear convolution. Instead the convolution sum involves the index and is
called circular convolution. Thus we conclude that multiplication of the DFT of 2
sequence is equivalent to the circular convolution of the to sequences in time domain.

x1(n) (*) x2(n) ÅDFT---> X1(k)X2(k)

example:-
©angsuman sarkar,ece,jgec,angsumansarkar@gmail.com page 15of 31
©angsuman sarkar,ece,jgec,angsumansarkar@gmail.com page 16of 31

similarly
©angsuman sarkar,ece,jgec,angsumansarkar@gmail.com page 17of 31

Example:-

x1(n)={2,1,2,1} x2(n)={1,2,3,4}
©angsuman sarkar,ece,jgec,angsumansarkar@gmail.com page 18of 31

which is the result obtained from circular convolution.

Matrix Method of circular convolution:-


©angsuman sarkar,ece,jgec,angsumansarkar@gmail.com page 19of 31

⎡ x 2 ( 0) x 2 ( N − 1) x 2 ( N − 2)....... x 2 ( 2) x 2 (1) ⎤
⎢ x (1) x 2 ( N − 1)....... x 2 ( 2) ⎥⎦
⎣ 2 x 2 ( 0) x 2 (3)

⎡ x 2 (0) x 2 (3) x 2 (2) x 2 (1) ⎤ ⎡ x1 (0) ⎤ ⎡ x 3 (0) ⎤


⎢ x (1) x (0) x (3) x (2)⎥ ⎢ x (1) ⎥ ⎢ x (1) ⎥
⎢ 2 2 2 2 ⎥⎢ 1 ⎥ = ⎢ 3 ⎥
⎢ x 2 (2) x 2 (1) x 2 (0) x 2 (3) ⎥ ⎢ x1 (2)⎥ ⎢ x 3 (2)⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎣ x 2 (3) x 2 (2) x 2 (1) x 2 (0) ⎦ ⎣ x1 (3) ⎦ ⎣ x 3 (3) ⎦
⎡1 4 3 2⎤ ⎡2⎤ ⎡14⎤
⎢2 1 4 3⎥ ⎢1⎥ ⎢16⎥
⎢ ⎥⎢ ⎥ = ⎢ ⎥
⎢3 2 1 4⎥ ⎢2⎥ ⎢14⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎣4 3 2 1⎦ ⎣1⎦ ⎣16⎦

Circular convolution using tabular array:-

n -3 -2 -1 0 1 2 3
x1(n) 2 1 2 1
x2(n) 1 2 3 4
When m=0
x2(-n) 4 3 2 1 4 3 2 x3(0)=2.1+1.4+2.4+1.2=14
When m=1
x2(1-n) 4 3 2 1 4 3 x3(1)=2.2+1.1+2.4+1.3=16
When m-2
x2(2-n) 4 3 2 1 4 x3(2)=2.3+1.2+2.1+1.4=14
When m=3
x2(3-n) 4 3 2 1 x3(3)=2.4+1.3+2.2+1.1=16

x3(m)={14,16,14,16}
©angsuman sarkar,ece,jgec,angsumansarkar@gmail.com page 20of 31

Linear Filtering Using DFT:-

In Linear filter the basic building block is a LTI system. Let us consider a LTI system of
frequency response H(w)

H(w)
X(w) Y(w)=H(w)X(w)

X(w)=spectrum of input signal/sequence


Y(w)=spectrum of output signal/sequence
Since all these three spectrums are continuous function of w, Y(w) can not be computed
using a digital computer. To use a computer the signals should be sampled. We have to
use DFT and IDFT method to get the output sequence.

h(n)/H[k]
x(n)/X[k] Y(k)=H(K)X(k)

But IDFT of Y[k] is the circular convolution. But the desired output is linear convolution. So we
must do something to get linear convolution output.
Let x[n] is finite duration sequence of length L
And h[n] is finite duration sequence of length M
We can write
X[n]=0 for n<0 and n >= L
And h[n]=0 for n<0 and n>=M
Both x[n] and h[n] are causal sequence
Therefore]
M −1
y[n] = ∑ h[k ]x[n − k ] = x[n] * h[n]
k =0
Impulse response of the linear system is a finite duration sequence, hence called FIR filter or
finite duration Impulse Response Filter.
The output sequence is also a finite duration sequence of length (L+M-1).
Conversely we can say that if the output sequence contains at least (L+M-1) samples or more ,
then taking IDFT of output sequence we can get the time domain sequence y[n]. So the size of the
DFT must be greater than (L+M-1) or

N >= L+M-1

Note:- N can have any value greater than (L+M-1). But the value of N should be power of 2
otherwise DFT computation will have large amount of time.
The output signal spectrum
Y(K)=Y(w)|w=2.PI.K/N, k=0,1,2,…N-1
= X(w).H(w)| w=2.PI.K/N
=X(k).H(K)
©angsuman sarkar,ece,jgec,angsumansarkar@gmail.com page 21of 31

where {X[k]}=N point DFT of the sequence {x[n]}


and {H[k]}=N point DFT of the impulse response sequence {h[n]}
We have to pad 0’s in the sequence {x[n]} and {h[n]} to make their length N. Zero Padding in
time domain sequence does not change their spectrum.
So we can conclude that the result of linear and circular convolution will be same if the size of
the DFT is N where N=L+M-1

Example:=BY means of DFT and IDFT determine the response of FIR filter with impulse
response h[n]={1,2,3,} to the input sequence x[n]={1,2,2,1}
Solution:- In this case L=4 & M=3
N>=3+4-1 or N>=6
Choosing N as power of 2 ,let N=8
Linear convolution of x[n] & h[n]={1,4,9,11,8,3}

1 2 2 1

1 1 2 2 1
2 2 4 4 2
3 3 6 6 3

After zero padding to x[n] & h[n] , we get


X[n]={1,2,2,1,0,0,0,0}
H[n]={1,2,3,0,0,0,0,0}
7
x(n)e − j 2πkn / 8 ; k = 0,1,2...7
X (K ) = ∑
n =0 7
h(n)e − j 2πkn / 8 ; k = 0,1,2...7
H (K ) = ∑
X (0) = 6 n =0

2+ 2 4+3 2 H ( 0) = 6
X (1) = − j( )
2 2 H (1) = 1 + 2 − j (3 + 2)
X ( 2) = −1 − j
H ( 2) = −2 − j 2
2− 2 4 −3 2
X ( 3) = + j( ) H ( 3) = 1 − 2 + j (3 − 2)
2 2
X ( 4) = 0 H ( 4) = 2

2− 2 4 −3 2 H ( 5) = 1 − 2 − j (3 − 2)
X ( 5) = − j( ) H ( 6) = −2 + j 2
2 2
X ( 6) = −1 + j H (7) = 1 + 2 + j (3 + 2)
2+ 2 4+3 2
X (7) = + j( )
2 2

Y(0)=36
Y(1)=-14.07-j17.48
Y(2)=j4
Y(3)=0.07+j0.515
Y(4)=0
©angsuman sarkar,ece,jgec,angsumansarkar@gmail.com page 22of 31

Y(5)=0.07-j0.515
Y(6)=-j4
Y(7)=-14.07+j17.48

1 7
y[n]= ∑ Y [ K ]e
j 2πkn / 8
; n = 0,1,2...7
8 k =0
y[n]={1,4,9,11,8,3,0,0}

We can perform 6 point circular convolution between


x[n]={1,2,2,1,0,0} and h[n]={1,2,3,0,0,0}
⎡1 0 0 0 3 2⎤ ⎡1 ⎤ ⎡1 +0 +0 +0 +0 + 0⎤ ⎡ 1 ⎤
⎢2 1 0 0 0 3⎥⎥ ⎢⎢2⎥⎥ ⎢⎢2 +2 +0 +0 +0 + 0⎥⎥ ⎢⎢ 4 ⎥⎥

⎢3 2 1 0 0 0⎥ ⎢2⎥ ⎢ 3 +4 +2 +0 +0 + 0⎥ ⎢ 9 ⎥
⎢ ⎥⎢ ⎥ = ⎢ ⎥=⎢ ⎥
⎢0 3 2 1 0 0 ⎥ ⎢1 ⎥ ⎢ 0 +6 + 4 +1 + 0 + 0⎥ ⎢11⎥
⎢0 0 3 2 1 0 ⎥ ⎢0 ⎥ ⎢0 +0 +6 +2 +0 + 0⎥ ⎢ 8 ⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎢⎣0 0 0 3 2 1⎥⎦ ⎢⎣0⎥⎦ ⎢⎣0 +0 +0 +3 +0 + 0⎥⎦ ⎢⎣ 3 ⎥⎦

Linear Filtering:=
x[n]={1,2,2,1}Æ L=4
h[n]={1,2,3}ÆM=3
N>=L+M-1=6

But let us calculate 4 point DFT


X(0)=6 X(1)=-1-j X(2)=0 X(3)=-1+j
H(0)=6 H(1)=-2-j2 H(2)=2 H(3)=-2+j2

Y^(0)=36 Y^(1)=j4 Y^(2)=0 Y^(3)=-j4

Taking 4 point IDFT on Y^(K) we get


y^(n)={9,7,9,11}
but result of 8 point DFT is y[n]={1,4,9,11,8,3}
so
y^(0)=y(0)+y(4)=1+8=9
y^(1)=y(1)+y(5)=4+3=7

this is known as aliasing error.


Conclusion:- If the size of the DFT is smaller then N( N>=L+M-1) the output is corrupted due to
aliasing error.

Summary:= since the DFT provides a discrete frequency representation of a finite duration
sequence in the frequency domain, It is interesting to explore its use as a computational tool for
linear system analysis, specially for linear filtering. Digital computers can only store and perform
computations on quantities at discrete frequencies.
So we can use linear filtering in freq. domain using DFT as an alternative to time domain
convolution.
In fact Freq. domain approach based on DFT is computationally more efficient than time domain
convolution due to existence of efficient algorithms for computing the DFT known a FFT.
©angsuman sarkar,ece,jgec,angsumansarkar@gmail.com page 23of 31

We have demonstrated that the product of 2 DFT is equivalent to circular convolution of the time-
domain sequences. But circular convolution is of no use to us if our objective is to determine the
output of a linear filter to a given input sequence.
In this case we seek a frequency domain methodology equivalent to linear convolution.
The N point circular convolution is equivalent to linear convolution. So here we first find the N
point DFT of x[n] and h[n]. Then multiply them and then find IDFT. To make the x[n] and h[n] N
point sequence we use zero padding technique. Where N>=L+M-1.
So finally with the help of zero padding DFT can be used to perform linear filleting.

Filtering Long-duration sequences:-

1. Overlap – Save method:-


©angsuman sarkar,ece,jgec,angsumansarkar@gmail.com page 24of 31

Ls=Length of the input sequence


M=Length of FIR filter sequence
For Long duration sequence Ls>>M

The length M is fixed but L can have any value. So the entire long duration sequence is divided
into blocks. For each block DFT is performed and output sequence is calculated. The output
sequence of each block is overlapped to get the final output sequence. This is called Overlap-Save
method.
A block contains (M-1) data points from previous block & L no. of points from current block. So
Total No of data points =L+M-1;which is the required condition for DFT/IDFT method.
For the first block, since there is no previous block , we must take
(M-1) zeros.

x i (n) Linear Filter h[n] y y i ( n ) = x i ( n ) ⊗ h ( n)

L+M-1

In each block output seq. , discard first (M-1) no. of data points a they will be computed due to
aliasing error.
In the h[n] seq. , we have to pad (L-1) no. of zeros , to make the length =L+M-1
Example:=
Ls=15 M=3 let us choose N=5
©angsuman sarkar,ece,jgec,angsumansarkar@gmail.com page 25of 31

5=L+M-1
5=L+3-1
therefore L=3

x1(n)={0,0,x(0),x(1),x(2)}
x2(n)={x(1),x(2),x(3),x(4),x(5)}
x3(n)={x(4),x(5),x(6),x(7),x(8)}
x4(n)={x(7),x(8),x(9),x(10),x(11)}
x5(n)={x(10),x(11),x(12),x(13),x(14)}
x6(n)={x(13),x(14),0,0,0}

h(n)={h(0),h(1),h(2),0,0}

y1(n)=x1(n) (N) h(n)={y1(0),y1(1),y1(2),y1(3),y1(4)}


y2(n)=x2(n) (N) h(n)={y2(0),y2(1),y2(2),y2(3),y2(4)}
y3(n)=x3(n) (N) h(n)={y3(0),y3(1),y3(2),y3(3),y3(4)}
y4(n)=x4(n) (N) h(n)={y4(0),y4(1),y4(2),y4(3),y4(4)}
y5(n)=x5(n) (N) h(n)={y5(0),y5(1),y5(2),y5(3),y5(4)}
y6(n)=x6(n) (N) h(n)={y6(0),y6(1),y6(2),y6(3),y6(4)}
after discarding
y[n]={ y1(2),y1(3),y1(4), y2(2),y2(3),y2(4), y3(2),y3(3),y3(4), y4(2),y4(3),y4(4),
y5(2),y5(3),y5(4), y6(2),y6(3),y6(4)}

2. Overlap – Add method:-


©angsuman sarkar,ece,jgec,angsumansarkar@gmail.com page 26of 31

x1(n)={x(0),x(1),……..x(L-1),0,0,0..0,0}

M-1 zeros
x2(n)={x(L),x(L+1),……x(2L-1),0,0,0..0,0}
x3(n)={x(2L),x(2L+1),……x(3L-1),0,0,0..0,0}

y i (n) = x i (n) ⊗ h(n) with N=L+M-1

y1(n)={y1(0),y1(1),….y1(N-1)}
y2(n)={y2(0),y2(1),….y2(N-1)}
y3(n)={y3(0),y3(1),….y3(N-1)}

y(n)={ y1(0),y1(1),….y1(L-1),y1(L)+y2(0),….y1(N-1)+y2(M-2),y2(M-
1,…..y3(L)+y3(0),y2(L+1)+y3(1),…..}

Example:-
Find the output y[n] of a filter whose impulse response is h[n]={1,1,1} and the input signal is
x[n]={3,-1,0,1,3,2,0,1,2,1} using i)overlap-save ii)overlap-add method

Solution:- here M=3 Ls=10 ..let choose L=3 then N=L+M-1=3+3-1=5


©angsuman sarkar,ece,jgec,angsumansarkar@gmail.com page 27of 31

Using normal linear convolution the o/p should come


y[n]={3,2,2,0,4,6,5,3,3,4,3,1}…this can be used for final checking of the answer

x1[n]={0,0,3,-1,0}
x2[n]={-1,0,1,3,2}
x3[n]={3,2,0,1,2}
x4[n]={1,2,1,0,0}

h[n]={1,1,1,0,0}

⎡1 0 0 1 1⎤ ⎡ 0 ⎤
⎢1 1 0 0 1⎥⎥ ⎢⎢ 0 ⎥⎥

y1[n]= ⎢1 1 1 0 0⎥ ⎢ 3 ⎥ = [− 1 0 3 2 2]
⎢ ⎥⎢ ⎥
⎢0 1 1 1 0⎥ ⎢− 1⎥
⎢⎣0 0 1 1 1⎥⎦ ⎢⎣ 0 ⎥⎦

⎡1 0 0 1 1⎤ ⎡− 1⎤
⎢1 1 0 0 1⎥⎥ ⎢⎢ 0 ⎥⎥

y2[n]= ⎢1 1 1 0 0⎥ ⎢ 1 ⎥ = [4 1 0 4 6]
⎢ ⎥⎢ ⎥
⎢0 1 1 1 0⎥ ⎢ 3 ⎥
⎢⎣0 0 1 1 1⎥⎦ ⎢⎣ 2 ⎥⎦
⎡1 0 0 1 1 ⎤ ⎡ 3⎤
⎢1 1 0 0 1⎥⎥ ⎢⎢2⎥⎥

y3[n]= ⎢1 1 1 0 0⎥ ⎢0⎥ = [6 7 5 3 3]
⎢ ⎥⎢ ⎥
⎢0 1 1 1 0⎥ ⎢1 ⎥
⎢⎣0 0 1 1 1⎥⎦ ⎢⎣2⎥⎦
⎡1 0 0 1 1 ⎤ ⎡1 ⎤
⎢1 1 0 0 1⎥⎥ ⎢⎢2⎥⎥

y4[n]= ⎢1 1 1 0 0⎥ ⎢1⎥ = [1 3 4 3 1]
⎢ ⎥⎢ ⎥
⎢0 1 1 1 0⎥ ⎢0 ⎥
⎢⎣0 0 1 1 1⎥⎦ ⎢⎣0⎥⎦

y[n]={3,2,2,0,4,6,5,3,3,4,3,1}

repeat the problem with L=4 therefore N=L+M-1=4+3-1=6


x1[n]={0,0,3,-1,0,1}
x2[n]={0,1,3,2,0,1}
x3[n]={0,1,2,1,0,0}
h[n]={1,1,1,0,0,0}
©angsuman sarkar,ece,jgec,angsumansarkar@gmail.com page 28of 31

⎡1 0 0 1⎤ ⎡ 0 ⎤
0 1
⎢1 1 0 1⎥⎥ ⎢⎢ 0 ⎥⎥
0 0

⎢1 1 1 0⎥ ⎢ 3 ⎥
0 0
y1[n] = ⎢ ⎥⎢ ⎥ = 1 1 3 2 2 0
⎢0 1 1 0⎥ ⎢− 1⎥
1 0
⎢0 0 1 0⎥ ⎢ 0 ⎥
1 1
⎢ ⎥⎢ ⎥
⎣⎢0 0 0 1 1 1⎦⎥ ⎣⎢ 1 ⎦⎥
⎡1 0 0 0 1 1 ⎤ ⎡0 ⎤
⎢1 1 0 0 0 1⎥⎥ ⎢⎢1 ⎥⎥

⎢1 1 1 0 0 0 ⎥ ⎢ 3⎥
y 2[n] = ⎢ ⎥⎢ ⎥ = 1 2 4 6 5 3
⎢0 1 1 1 0 0 ⎥ ⎢ 2⎥
⎢0 0 1 1 1 0 ⎥ ⎢0 ⎥
⎢ ⎥⎢ ⎥
⎢⎣0 0 0 1 1 1⎥⎦ ⎢⎣1 ⎥⎦
⎡1 0 0 0 1 1⎤ ⎡0 ⎤
⎢1 1 0 0 0 1⎥⎥ ⎢⎢1⎥⎥

⎢1 1 1 0 0 0⎥ ⎢ 2 ⎥
y3[n] = ⎢ ⎥⎢ ⎥ = 0 1 3 4 3 1
⎢0 1 1 1 0 0⎥ ⎢1 ⎥
⎢0 0 1 1 1 0⎥ ⎢0 ⎥
⎢ ⎥⎢ ⎥
⎣⎢0 0 0 1 1 1⎦⎥ ⎣⎢0⎦⎥
y[n]= y[n]={3,2,2,0,4,6,5,3,3,4,3,1}

ii)Overlap-Add method:-

X[n]= x[n]={3,-1,0,1,3,2,0,1,2,1}
x1(n)={3,-1,0,0,0}
x2(n)={1,3,2,0,0}
x3(n)={0,1,2,0,0}
x4(n)={1,0,0,0,0}

h[n]={1,1,1,0,0}
©angsuman sarkar,ece,jgec,angsumansarkar@gmail.com page 29of 31

⎡1 0 0 1 1⎤ ⎡ 3 ⎤
⎢1 1 0 0 1⎥⎥ ⎢⎢− 1⎥⎥

y1[n]= ⎢1 1 1 0 0⎥ ⎢ 0 ⎥ = [3 2 2 − 1 0]
⎢ ⎥⎢ ⎥
⎢0 1 1 1 0⎥ ⎢ 0 ⎥
⎢⎣0 0 1 1 1⎥⎦ ⎢⎣ 0 ⎥⎦

⎡1 0 0 1 1 ⎤ ⎡1 ⎤
⎢1 1 0 0 1⎥⎥ ⎢⎢3⎥⎥

y2[n]= ⎢1 1 1 0 0⎥ ⎢2⎥ = [1 4 6 5 2]
⎢ ⎥⎢ ⎥
⎢0 1 1 1 0⎥ ⎢0 ⎥
⎢⎣0 0 1 1 1⎥⎦ ⎢⎣0⎥⎦
⎡1 0 0 1 1⎤ ⎡0 ⎤
⎢1 1 0 0 1⎥⎥ ⎢⎢1⎥⎥

y3[n]= ⎢1 1 1 0 0⎥ ⎢2⎥ = [0 1 3 3 2]
⎢ ⎥⎢ ⎥
⎢0 1 1 1 0⎥ ⎢0 ⎥
⎢⎣0 0 1 1 1⎥⎦ ⎢⎣0⎥⎦
⎡1 0 0 1 1 ⎤ ⎡1 ⎤
⎢1 1 0 0 1⎥⎥ ⎢⎢0⎥⎥

y4[n]= ⎢1 1 1 0 0⎥ ⎢0⎥ = [1 1 1 0 0]
⎢ ⎥⎢ ⎥
⎢0 1 1 1 0⎥ ⎢0⎥
⎢⎣0 0 1 1 1⎥⎦ ⎢⎣0⎥⎦

y[n]={3,2,2,0,4,6,5,3,3,4,3,1}

Exercise:-

Using linear convolution find y[n] for the sequences x[n]={1,2,-1,2,3,-2,-3,-1,1,1,2,-1}


And h[n]={1,2} by using i)overlap-add ii) by using overlap-save method

Solution:= using linear convolution the result can be verified as


Y[n]={1,4,3,0,7,4,-7,-7,-1,3,4,3,-2}

i) overlap-add method:-
M=2
Ls=12 let L=4
N=L+M-1=4+2-1=5
x1[n]={1,2,-1,2,0}
x2[n]={3,-2,-3,1,0}
x3[n]={1,1,2,-1,0}
©angsuman sarkar,ece,jgec,angsumansarkar@gmail.com page 30of 31

⎡1 0 0 0 2 ⎤ ⎡ 1 ⎤ ⎡1 ⎤
⎢2 1 0 0 0⎥⎥ ⎢⎢ 2 ⎥⎥ ⎢⎢4⎥⎥

y1[n]= ⎢0 2 1 0 0⎥ ⎢− 1⎥ = ⎢3⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢0 0 2 1 0 ⎥ ⎢ 2 ⎥ ⎢0 ⎥
⎢⎣0 0 0 2 1⎥⎦ ⎢⎣ 0 ⎥⎦ ⎢⎣4⎥⎦

⎡1 0 0 0 2⎤ ⎡ 3 ⎤ ⎡ 3 ⎤
⎢2 1 0 0 0⎥⎥ ⎢⎢− 2⎥⎥ ⎢⎢ 4 ⎥⎥

y2[n]= ⎢0 2 1 0 0 ⎥ ⎢ − 3⎥ = ⎢ − 7 ⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢0 0 2 1 0⎥ ⎢ − 1 ⎥ ⎢− 7 ⎥
⎢⎣0 0 0 2 1⎥⎦ ⎢⎣ 0 ⎥⎦ ⎢⎣− 2⎥⎦
⎡1 0 0 0 2⎤ ⎡ 1 ⎤ ⎡ 1 ⎤
⎢2 1 0 0 0⎥⎥ ⎢⎢ 1 ⎥⎥ ⎢⎢ 3 ⎥⎥

y3[n]= ⎢0 2 1 0 0⎥ ⎢ 2 ⎥ = ⎢ 4 ⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢0 0 2 1 0⎥ ⎢− 1⎥ ⎢ 3 ⎥
⎢⎣0 0 0 2 1⎥⎦ ⎢⎣ 0 ⎥⎦ ⎢⎣− 2⎥⎦

therefore y[n]={1,4,3,0,7,4,-7,-7,-1,3,4,3,-2}

ii)overlap-save method:-
Ls=12
Let N=5 5=L+M-1=L+1
L=4
x1(n)={0,1,2,-1,2}
x2(n)={2,3,-2,-3,-1}
x3(n)={-1,1,1,2,-1}
x4(n)={-1,0,0,0,0}
h[n]={1,2,0,0,0}
⎡1 0 0 0 2 ⎤ ⎡ 0 ⎤ ⎡ 4 ⎤
⎢ 2 1 0 0 0 ⎥ ⎢ 1 ⎥ ⎢1 ⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥
y1[n]= ⎢0 2 1 0 0⎥ ⎢ 2 ⎥ = ⎢4⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢0 0 2 1 0⎥ ⎢− 1⎥ ⎢3⎥
⎢⎣0 0 0 2 1⎥⎦ ⎢⎣ 2 ⎥⎦ ⎢⎣0⎥⎦
⎡1 0 0 0 2 ⎤ ⎡ 2 ⎤ ⎡ 0 ⎤
⎢2 1 0 0 0⎥ ⎢ 3 ⎥ ⎢ 7 ⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥
y2[n]= ⎢0 2 1 0 0⎥ ⎢− 2⎥ = ⎢ 4 ⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢0 0 2 1 0 ⎥ ⎢ − 3⎥ ⎢ − 7 ⎥
⎢⎣0 0 0 2 1 ⎥⎦ ⎢⎣ − 1⎥⎦ ⎢⎣− 7⎥⎦
©angsuman sarkar,ece,jgec,angsumansarkar@gmail.com page 31of 31

⎡1 0 0 0 2⎤ ⎡− 1⎤ ⎡− 3⎤
⎢2 1 0 0 0⎥⎥ ⎢⎢ 1 ⎥⎥ ⎢⎢ − 1⎥⎥

y3[n]= ⎢0 2 1 0 0⎥ ⎢ 1 ⎥ = ⎢ 3 ⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢0 0 2 1 0⎥ ⎢ 2 ⎥ ⎢ 4 ⎥
⎢⎣0 0 0 2 1⎥⎦ ⎢⎣− 1⎥⎦ ⎢⎣ 3 ⎥⎦

⎡1 0 0 0 2⎤ ⎡− 1⎤ ⎡ − 1⎤
⎢2 1 0 0 0⎥⎥ ⎢⎢ 0 ⎥⎥ ⎢⎢− 2⎥⎥

y4[n]= ⎢0 2 1 0 0⎥ ⎢ 0 ⎥ = ⎢ 0 ⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢0 0 2 1 0⎥ ⎢ 0 ⎥ ⎢ 0 ⎥
⎢⎣0 0 0 2 1⎥⎦ ⎢⎣ 0 ⎥⎦ ⎢⎣ 0 ⎥⎦

y[n]={1,4,3,0,7,4,-7,-7,-1,3,4,3,-2}

You might also like