SlideShare a Scribd company logo
1 of 109
Chapter 5
Finite-Length
Discrete Transform
§5.2.1 The Discrete Fourier
Transform
 Definition - The simplest relation between a
length-N sequence x[n], defined for 0≤n≤N-1,
and its DTFT X(ejω) is obtained by uniformly
sampling X(ejω) on the ω-axis between
0≤ω≤2π at ωk= 2πk/N, 0≤k≤N-1
 From the definition of the DTFT we thus
have
1
0
,
]
[
)
(
]
[
1
0
/
2
/
2




 




N
k
e
n
x
e
X
k
X
N
n
N
k
j
N
k
j 



§5.2.1 The Discrete Fourier
Transform
 Note: X[k] is also a length-N sequence in the
frequency domain
 The sequence X[k] is called the discrete
Fourier transform (DFT) of the sequence x[n]
 Using the notation WN= e-j2π/N the DFT is
usually expressed as:
1
0
,
]
[
]
[
1
0







N
k
W
n
x
k
X
N
n
n
k
N
§5.2.1 The Discrete Fourier
Transform
 The inverse discrete Fourier transform
(IDFT) is given by
 To verify the above expression we multiply
both sides of the above equation by and
sum the result from n = 0 to n=N-1
W
n
N

1
0
,
]
[
1
]
[
1
0








N
n
W
k
X
N
n
x
N
k
kn
N
§5.2.1 The Discrete Fourier
Transform
 resulting in


 





























1
0
1
0
)
(
1
0
1
0
)
(
1
0
1
0
1
0
]
[
1
]
[
1
]
[
1
]
[
N
k
N
k
n
K
N
N
n
N
k
n
K
N
N
n
n
N
N
k
kn
N
N
n
n
N
W
k
X
N
W
k
X
N
W
W
k
X
N
W
n
x




§5.2.1 The Discrete Fourier
Transform
 Making use of the identity
we observe that the RHS of the last
equation is equal to X[l]
]
[
]
[ 

X
W
n
x
N
n
n
N 



1
0


 







otherwise
,
0
integer
an
,
for
,
1
0
)
( r
rN
k
N
W
N
n
n
k
N


 Hence
§5.2.1 The Discrete Fourier
Transform
 Example – Consider the length-N sequence
1
1
0
0
1




N
n
n
,
,




]
[n
x
1
0
1
]
0
[
]
[
]
[ 0
1
0





 


N
k
W
x
W
n
x
k
X N
N
n
kn
N ,
 Its N-point DFT is given by
§5.2.1 The Discrete Fourier
Transform
 Example – Consider the length-N sequence












1
1
,
1
0
,
0
,
1
]
[
N
n
m
m
n
m
n
n
y
1
0
]
[
]
[
]
[
1
0





 


N
k
W
W
m
y
W
n
y
k
Y km
N
km
N
N
n
kn
N ,
 Its N-point DFT is given by
§5.2.1 The Discrete Fourier
Transform
 Example – Consider the length-N sequence
defined for 0≤n≤N-1
1
0
),
/
2
cos(
]
[ 



 N
r
N
rn
n
g
 
)
(
2
1
2
1
]
[ /
2
/
2
rn
N
rn
N
N
rn
j
N
rn
j
W
W
e
e
n
g





 

 Using a trigonometric identity we can write
§5.2.1 The Discrete Fourier
Transform
 The N-point DFT of g[n] is thus given by
1
0
2
1
]
[
]
[
1
0
1
0
)
(
)
(
1
0












 










N
k
W
W
W
n
g
k
G
N
n
N
n
n
k
r
N
n
k
r
N
N
n
kn
N
§5.2.1 The Discrete Fourier
Transform
 Making use of the identity


 







otherwise
,
0
integer
an
,
for
,
1
0
)
( r
rN
k
N
W
N
n
n
k
N


we get
1
0
otherwis
0
for
,
2
/
for
,
2
/
]
[












N
k
r
N
k
N
r
k
N
k
G
,
§5.2.2 Matrix Relations
 The DFT samples defined by
1
0
,
]
[
]
[
1
0



 


N
k
W
n
x
k
X
N
n
kn
N
T
T
N
x
x
x
x
N
X
X
X
X
]
1
[
]
1
[
]]
0
[
[
]]
1
[
]
1
[
]
0
[
[






can be expressed in matrix form as
X=Dnx
where
§5.2.2 Matrix Relations
and DN is the N×N DFT matrix given by






















2
)
1
(
)
1
(
2
)
1
(
)
1
(
2
4
2
)
1
(
2
1
1
1
1
1
1
1
1
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
W
W
W
W
W
W
W
W
W
D









§5.2.2 Matrix Relations
 Likewise, the IDFT relation given by
where is the N×N DFT matrix
DN
1

1
0
,
]
[
1
]
[
1
0



 



N
n
W
K
X
N
n
x
N
k
kn
N
X
D
x N
1


can be expressed in matrix form as
§5.2.2 Matrix Relations
where
 Note:
D
D N
N
N
*
1 1


































2
)
1
(
)
1
(
2
)
1
(
)
1
(
2
4
2
)
1
(
2
1
1
1
1
1
1
1
1
1
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
W
W
W
W
W
W
W
W
W
D









§5.2.3 DFT Computation Using
MATLAB
 The functions to compute the DFT and the
IDFT are fft and ifft
 These functions make use of FFT
algorithms which are computationally highly
efficient compared to the direct computation
 Programs 5_1.m and 5_2.m illustrate the use
of these functions
§5.2.3 DFT Computation Using
MATLAB
 Example –a Program 5_3.m can be used to
compute the DFT and the DTFT of the
sequence x[n]=cos(6πn/16), 0≤n≤15
as shown below
indicates DFT samples
§5.3.3 DTFT from DFT by
Interpolation
 The N-point DFT X[k] of a length-N
sequence x[n] is simply the frequency
samples of its DTFT X(ejω) evaluated at N
uniformly spaced frequency points
1
0
,
/
2 



 N
k
N
k
k 


 Given the N-point DFT X[k] of a length-N
sequence x[n], its DTFT X(ejω) can be
uniquely determined from X[k]
§5.3.3 DTFT from DFT by
Interpolation
 Thus

 

 

S
N
n
n
N
k
j
N
k
n
j
N
n
kn
N
N
k
N
n
n
j
j
e
e
W
e
e
k
X
N
k
X
N
n
x
X


 



















1
0
)
/
2
(
1
0
1
0
1
0
1
0
]
[
1
]
]
[
1
[
]
[
)
(





§5.3.3 DTFT from DFT by
Interpolation
 To develop a compact expression for the
sum S, let
)
/
2
( N
k
j
e
r 



 Then
 From the above




1
0
N
n
n
r
S
1
1
1
1
1
0
1
1
1












 





N
N
N
n
n
N
N
n
N
n
n
n
r
S
r
r
r
r
r
rS
§5.3.3 DTFT from DFT by
Interpolation
 Or, equivalently,
 Hence
]
2
/
)
1
)][(
/
2
[
)]
/
2
(
[
)
2
(
2
2
sin
2
2
sin
1
1
1
1













 





 







N
N
k
j
N
k
j
k
N
j
N
e
N
k
N
k
N
e
e
r
r
S










N
r
S
r
rS
S 



 1
)
1
(
§5.3.3 DTFT from DFT by
Interpolation
 therefore
]
2
/
)
1
)][(
/
2
[
1
0
2
2
sin
2
2
sin
]
[
1
)
(











 





 
  N
N
k
j
N
k
j
e
N
k
N
k
N
k
X
N
e
X







§5.3.4 Sampling the DTFT
 Consider a sequence x[n] with a DTFT
X(ejω)
 We sample X(ejω) at N equally spaced
points ωk=2πk/N, 0≤k≤N-1 deleloping the N
frequency samples
 These N frequency samples can be
considered as an N-point DFT Y[k] whose
N- point IDFT is a length-N sequence y[n]
)}
(
{ e
k
j
X

§5.3.4 Sampling the DTFT
 Now 




=-


 
 j
j
e
x
e
X ]
[
)
(











=-
=- 




 k
N
N
k
j
N
k
j
j
W
x
e
x
e
X
e
X
k
Y k
]
[
]
[
)
(
)
(
]
[
/
2
/
2



kn
N
N
k
W
k
Y
N
n
y 



1
0
]
[
1
]
[
=
 Thus
 An IDFT of Y[k] yields
§5.3.4 Sampling the DTFT
 i.e.










 








 


1
0
)
(
1
0
1
]
[
]
[
1
]
[
N
k
n
k
N
kn
N
k
N
N
k
W
N
x
W
W
x
N
n
y






=
 Making use of the identity


 






otherwise
,
0
for
,
1
1 1
0
)
( mN
n
r
W
N
N
n
r
n
k
N
=
§5.3.4 Sampling the DTFT
 we arrive at the desired relation









m
N
n
mN
n
x
n
y 1
0
,
]
[
]
[
 Thus y[n] is obtained from x[n] by adding an
infinite number of shifted replicas of x[n],
with each replica shifted by an integer
multiple of N sampling instants, and
observing the sum only for the interval
0≤n≤N-1
§5.3.4 Sampling the DTFT
 To apply
1
0
,
]
[
]
[ 



 



N
n
mN
n
x
n
y
m
to finite-length sequences, we assume that
the samples outside the specified range are
zeros
 Thus if x[n] is a length-M sequence with
M≤N, then y[n]= x[n] , for 0≤n≤N-1
§5.3.4 Sampling the DTFT
 If M > N, there is a time-domain aliasing of
samples of x[n] in generating y[n], and x[n]
cannot be recovered from y[n]
 Example – Let {x[n]}={0 1 2 3 4 5}
↑
 By sampling its DTFT X(ejω) at ωk=2πk/4,
0≤k≤3 and then applying a 4-point IDFT to
these samples, we arrive at the sequence
y[n] given by
§5.3.4 Sampling the DTFT
y[n]= x[n]+ x[n+4]+x[n-4] 0≤n≤3
 i.e. {y[n]}={4 6 2 3}
↑
{x[n]} cannot be recovered from {y[n]}
Numerical Computation of the
DTFT Using the DFT
 A practical approach to the numerical
computation of the DTFT of a finite-length
sequence
 Let X(ejω) be the DTFT of a length-N
sequence x[n]
 We wish to evaluate X(ejω) at a dense grid of
frequencies ωk=2πk/M, 0≤k≤M-1,where M >>
N:
Numerical Computation of the
DTFT Using the DFT
 Define a new sequence
M
kn
j
N
n
n
j
N
n
j
e
n
x
e
n
x
e
X k
k /
2
1
0
1
0
]
[
]
[
)
( 

 






 

M
kn
j
M
n
e
j
e
n
x
e
X k /
2
1
0
]
[
)
( 
 














1
,
0
1
0
,
]
[
]
[
M
n
N
N
n
n
x
n
xe
 Then
Numerical Computation of the
DTFT Using the DFT
 The DFT Xe[k] can be computed very
efficiently using the FFT algorithm if M is an
integer power of 2
 The function freqz employs this approach to
evaluate the frequency response at a
prescribed set of frequencies of a DTFT
expressed as a rational function in e-jω
 Thus is essentially an M-point DFT
Xe[k] of the length-M sequence xe[n]
)
(e
k
j
X

DFT Properties
 Like the DTFT, the DFT also satisfies a
number of properties that are useful in
signal processing applications
 Some of these properties are essentially
identical to those of the DTFT, while some
others are somewhat different
 A summary of the DFT properties are given
in tables in the following slides
Table 5.1: DFT Properties: Symmetry
Relations
x[n] is a complex sequence
Table 5.2: DFT Properties: Symmetry
Relations
x[n] is a real sequence
Table 5.3: General Properties of DFT
§5.4.1 Circular Shift of a Sequence
 This property is analogous to the time-
shifting property of the DTFT as given in
Table 3.4, but with a subtle difference
 Consider length-N sequences defined for
0≤n≤N-1
 Sample values of such sequences are equal
to zero for values of n<0 and n≥N
§5.4.1 Circular Shift of a Sequence
 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 thus need to define another type of a
shift that will always keep the shifted
sequence in the range 0≤n≤N-1
§5.4.1 Circular Shift of a Sequence
 The desired shift, called the circular shift,
is defined using a modulo operation:
]
[
]
[ 0 N
c n
n
x
n
x 
















0
0
0
0
0
,
]
[
1
,
]
[
]
[
n
n
for
n
n
N
x
N
n
n
for
n
n
x
n
xc
 For n0>0 (right circular shift), the above
equation implies
§5.4.1 Circular Shift of a Sequence
 Illustration of the concept of a circular shift
]
5
[
]
1
[
6
6






n
x
n
x -
]
2
[
]
4
[
6
6






n
x
n
x -
]
[n
x
§5.4.1 Circular Shift of a Sequence
 As can be seen from the previous figure, a
right circular shift by n0 is equivalent to a left
circular shift by N-n0 sample periods
 A circular shift by an integer number n0
greater than N is equivalent to a circular shift
by N
n0
§5.4.2 Circular Convolution
 This operation is analogous to linear
convolution, but with a subtle difference
 Consider two length-N sequences, g[n] and
h[n], respectively
 Their linear convolution results in a length-
(2N-1) sequence yL[n] given by
2
2
0
1
0




 


N
n
m
n
h
m
g
n
y
N
m
L ],
[
]
[
]
[
§5.4.2 Circular Convolution
 In computing yL[n] we have assumed that
both length-N sequence have been zero-
padded to extend their lengths to 2N-1
 The longer form of yL[n] results from the
time-reversal of the sequence h[n] and its
linear shift to the right
 The first nonzero value of yL[n] is
yL[0]=g[0]h[0] ,and the last nonzero value is
yL[2N-2]=g[N-1]h[N-1]
§5.4.2 Circular Convolution
 To develop a convolution-like operation
resulting in a length-N sequence yC[n] , we
need to define a circular time-reversal, and
then apply a circular time-shift
 Resulting operation, called a circular
convolution, is defined by
1
0
],
[
]
[
]
[
1
0



 





N
n
m
n
h
m
g
n
y
N
m
N
C
§5.4.2 Circular Convolution
 Since the operation defined involves two
length-N sequences, it is often referred to as
an N-point circular convolution, denoted as
 The circular convolution is commutative, i.e.
]
[
]
[
]
[
]
[ n
g
n
h
n
h
n
g  N
N
]
[
]
[
]
[ n
h
n
g
n
y  N
§5.4.2 Circular Convolution
 Example – Determine the 4-point circular
convolution of the two length-4 sequences:
as sketched below



 }
1
1
2
2
{
]}
[
{
},
1
0
2
1
{
]}
[
{ n
h
n
g
§5.4.2 Circular Convolution
 The result is a length-4 sequence yC[n]
given by
6
)
2
1
(
)
1
0
(
)
1
2
(
)
2
1
(
]
1
[
]
3
[
]
2
[
]
2
[
]
3
[
]
1
[
]
0
[
]
0
[
]
[
]
[
]
0
[ 4
3
0















 

h
g
h
g
h
g
h
g
m
h
m
g
m
C
y
,
]
[
]
[
]
[
]
[
]
[
3
0
4
 





m
C m
n
h
m
g
n
h
n
g
n
y 4
3
0 
 n
 From the above we observe
§5.4.2 Circular Convolution
 Likewise
7
)
1
1
(
)
1
0
(
)
2
2
(
)
2
1
(
]
2
[
]
3
[
]
3
[
]
2
[
]
0
[
]
1
[
]
1
[
]
0
[
]
1
[
]
[
]
1
[ 4
3
0


















h
g
h
g
h
g
h
g
m
h
m
g
m
C
y
6
)
1
1
(
)
2
0
(
)
2
2
(
)
1
1
(
]
3
[
]
3
[
]
0
[
]
2
[
]
1
[
]
1
[
]
2
[
]
0
[
]
2
[
]
[
]
2
[ 4
3
0


















h
g
h
g
h
g
h
g
m
h
m
g
m
C
y
§5.4.2 Circular Convolution
 The circular convolution can also be
computed using a DFT-based approach as
indicated in Table 5.3
5
)
2
1
(
)
2
0
(
)
1
2
(
)
1
1
(
]
0
[
]
3
[
]
1
[
]
2
[
]
2
[
]
1
[
]
3
[
]
0
[
]
3
[
]
[
]
3
[ 4
3
0
















 

h
g
h
g
h
g
h
g
m
h
m
g
m
C
y
yC[n]
and
§5.4.2 Circular Convolution
 Example – Consider the two length-4
sequences repeated below for convenience:
 The 4-point DFT G[k] of g[n] is given by
G[k]= g[0]+g[1]e-j2πk/4 +g[2]e-j4πk/4 +g[3]e-j6πk/4
=1+2e-jπk/2 +e-j3πk/2 , 0≤k≤3
§5.4.2 Circular Convolution
 Therefore G[0]=1+2+1=4,
G[1]=1-j2+j=1-j,
G[2]=1-2-1=-2,
G[3]= 1+j2-j=1+j
 Likewise,
H[k]=h[0]+h[1]e-j2πk/4 +h[2]e-j4πk/4
+h[3]e-j6πk/4
=2+2e-jπk/2 +e-jπk +e-j3πk/2 , 0≤k≤3
§5.4.2 Circular Convolution
 Hence, H[0]=2+2+1+1=6,
H [1]=2-j2-1+j=1-j,
H [2]=2-2+1-1=0,
H [3]=2+j2-1-j=1+j
 The two 4-point DFTs can also be computed
using the matrix relation given earlier
§5.4.2 Circular Convolution








































































j
j
j
j
j
j
g
g
g
g
D
G
G
G
G
1
2
1
4
1
0
2
1
1
1
1
1
1
1
1
1
1
1
1
1
]
3
[
]
2
[
]
1
[
]
0
[
]
3
[
]
2
[
]
1
[
]
0
[
4







































































j
j
j
j
j
j
h
h
h
h
D
H
H
H
H
1
0
1
6
1
1
2
2
1
1
1
1
1
1
1
1
1
1
1
1
]
3
[
]
2
[
]
1
[
]
0
[
]
3
[
]
2
[
]
1
[
]
0
[
4
D4 is the 4-point DFT matrix
§5.4.2 Circular Convolution
 If YC[k] denotes the 4-point DFT of yC[n]
then from Table 3.5 we observe
YC[k]= G[k] H[k] , 0≤k≤3









































2
0
2
24
]
3
[
]
3
[
]
2
[
]
2
[
]
1
[
]
1
[
]
0
[
]
0
[
]
3
[
]
2
[
]
1
[
]
0
[
j
j
H
G
H
G
H
G
H
G
Y
Y
Y
Y
C
C
C
C
 Thus
§5.4.2 Circular Convolution
 A 4-point IDFT of YC[k] yields













































































5
6
7
6
2
0
2
24
1
1
1
1
1
1
1
1
1
1
1
1
4
1
]
3
[
]
2
[
]
1
[
]
0
[
4
1
]
3
[
]
2
[
]
1
[
]
0
[
*
4
j
j
j
j
j
j
Y
Y
Y
Y
D
y
y
y
y
C
C
C
C
C
C
C
C
§5.4.2 Circular Convolution
 Example – Now let us extended the two
length-4 sequences to length 7 by appending
each with three zero-valued samples, i.e.
















6
4
,
0
3
0
,
]
[
]
[
6
4
,
0
3
0
,
]
[
]
[
n
n
n
h
n
h
n
n
n
g
n
g
e
e
§5.4.2 Circular Convolution
 We next determine the 7-point circular
convolution of ge[n] and he[n] :
 From the above
y[0]=ge[0]he[0]+ge[1]he[6]+ge[3]he[4]
+ge[4]he[3]+ge[5]he[2]+ge[6]he[1]
=ge[0]he[0]=1×2=2
6
0
,
]
[
]
[
]
[
6
0
7





n
m
n
h
n
g
n
y
m
e
e
§5.4.2 Circular Convolution
 Continuing the process we arrive
y[1]=g[0]h[1]+g[1]h[0]=(1×2)+(2×2)=6,
y[2]=g[0]h[2]+g[2]h[0]
=(1×2)+(2×2)+(0×2)=5,
y[3]=g[0]h[3]+g[1]h[2]+g[2]h[1]+g[3]h[0]
=(1×1)+(2×1)+(0×2)+(1×2)=5,
y[4]=g[1]h[3]+g[2]h[2]+g[3]h[1]
=(2×1)+(0×1)+(1×2)=4,
§5.4.2 Circular Convolution
y[5]=g[2]h[3]+g[3]h[2]=(0×1)+(1×1)=1,
y[6]=g[3]h[3]=(1×1)=1
 As can be seen from the above that y[n] is
precisely the sequence yL[n] obtained by a
linear convolution of g[n] and h[n]
§5.4.2 Circular Convolution
 The N-point circular convolution can be
written in matrix form as
























































 ]
1
[
]
2
[
]
1
[
]
0
[
]
0
[
]
3
[
]
2
[
]
1
[
]
3
[
]
0
[
]
1
[
]
2
[
]
2
[
]
1
[
]
0
[
]
1
[
]
1
[
]
2
[
]
1
[
]
0
[
]
1
[
]
2
[
]
1
[
]
0
[
N
g
g
g
g
h
N
h
N
h
N
h
h
h
h
h
h
N
h
h
h
h
N
h
N
h
h
N
y
y
y
y
C
C
C
C











 Note: The elements of each diagonal of the
N×N matrix are equal
 Such a matrix is called a circulant matrix
§5.4.2 Circular Convolution
 First, the samples of the two sequences are
multiplied using the conventional
multiplication method as shown on the next
slide
 Consider the evaluation of y[n]=h[n] g[n]
where {g[n]} and {h[n]} are length-4
sequences
*
 Tabular Method
 We illustrate the method by an example
§5.4.2 Circular Convolution
 The partial products generated in the 2nd, 3rd, and
4th rows are circularly shifted to the left as
indicated above
§5.4.2 Circular Convolution
 The modified table after circular shifting is
shown below
 The samples of the sequence { yc[n]} are
obtained by adding the 4 partial products in
the column above of each sample
§5.4.2 Circular Convolution
 Thus
yc[0]=g[0]h[0]+ g[3]h[1]+ g[2]h[2]+ g[1]h[3]
yc[1]=g[1]h[0]+ g[0]h[1]+ g[3]h[2]+ g[2]h[3]
yc[2]=g[2]h[0]+ g[1]h[1]+ g[0]h[2]+ g[3]h[3]
yc[3]=g[3]h[0]+ g[2]h[1]+ g[1]h[2]+ g[0]h[3]
§5.9 Computation of the DFT of
Real Sequences
 In most practical applications, sequences of
interest are real
 In such cases, the symmetry properties of
the DFT given in Table 5.2 can be exploited
to make the DFT computations more
efficient
§5.9.1 N-Point DFTs of Two Length-
N Real Sequences
 Let g[n] and h[n] be two length-N real
sequences with G[k] and H[k] denoting their
respective N-point DFTs
 These two N-point DFTs can be computed
efficiently using a single N-point DFT
 Define a complex length-N sequence
x[n]=g[n]+jh[n]
 Hence, g[n]=Re{x[n]} and h[n]=Im{x[n]}
§5.9.1 N-Point DFTs of Two Length-
N Real Sequences
 Let X[k] denote the N-point DFT of x[n]
 Then, from Table 5.1 we arrive at
 
 
]
[
]
[
2
1
]
[
]
[
]
[
2
1
]
[
*
*
N
N
k
X
k
X
j
k
H
k
X
k
X
k
G








]
[
]
[ *
*
N
N k
N
X
k
X 





 Note that for 0≤k≤N-1,
§5.9.1 N-Point DFTs of Two Length-
N Real Sequences
 Example – We compute the 4-point DFTs of
the two real sequences g[n] and h[n] given
below
       



 1
1
2
2
]
[
,
1
0
2
1
]
[ n
h
n
g
 Then {x[n]}={g[n]}+j{h[n]} is given by
   




 j
j
j
j
n
x 1
2
2
2
1
]
[
§5.9.1 N-Point DFTs of Two Length-
N Real Sequences
 Its DTF X[k] is





























































2
2
2
6
4
1
2
2
2
1
1
1
1
1
1
1
1
1
1
1
1
1
]
3
[
]
2
[
]
1
[
]
0
[
j
j
j
j
j
j
j
j
j
j
X
X
X
X
 From the above
X*[k]=[4-j6 2 -2 -j2]
 Hence
X*[<4-k>4]=[4-j6 -j2 -2 2]
§5.9.1 N-Point DFTs of Two Length-
N Real Sequences
 Therefore
{G[k]}=[4 1-j -2 1+j]
{G[k]}=[6 1-j 0 1+j]
verifying the results derived earlier
§5.9.2 2N-Point DFT of a Real
Sequence Using an N-point DFT
 Let v[n] be a length-2N real sequence with
an 2N-point DFT V[k]
 Define two length-N real sequences g[n]
and h[n] as follows:
N
n
n
v
n
h
n
v
n
g 



 0
,
]
1
2
[
]
[
,
]
2
[
]
[
 Let G[k] and H[k] denote their respective N-
point DFTs
§5.9.2 2N-Point DFT of a Real
Sequence Using an N-point DFT
 Define a length-N complex sequence
{x[n]}={g[n]}+j{h[n]}
with an N-point DFT X[k]
 Then as shown earlier
]}
[
]
[
{
2
1
]
[
]}
[
]
[
{
2
1
]
[
N
N
k
X
k
X
j
k
H
k
X
k
X
k
G










§5.9.2 2N-Point DFT of a Real
Sequence Using an N-point DFT
 Now
1
2
0
,
]
[
]
[
]
[
]
[
]
1
2
[
]
2
[
]
[
]
[
1
0
2
1
0
2
1
0
1
0
)
1
2
(
2
1
0
2
2
1
0
2
1
2
0

































N
k
n
h
n
g
n
h
n
g
n
v
n
v
n
v
k
V
W
W
W
W
W
W
W
W
W
nk
N
N
n
k
N
nk
N
N
n
k
N
nk
N
N
n
nk
N
N
n
k
n
N
N
n
nk
N
N
n
nk
N
N
n
§5.9.2 2N-Point DFT of a Real
Sequence Using an N-point DFT
 i.e.,
1
2
0
,
]
[
]
[
]
[ 2 







 N
k
k
H
W
k
G
k
V N
k
N
N

 }
1
1
1
0
2
2
2
1
{
]}
[
{ n
v
 We form two length-4 real sequences as
follows
 Example – Let us determine the 8-point
 DFT V[k] of the length-8 real sequence
§5.9.2 2N-Point DFT of a Real
Sequence Using an N-point DFT
 Now
7
0
,
]
[
]
[
]
[ 4
8
4 






 k
k
H
W
k
G
k
V k
 Substituting the values of the 4-point DFTs
G[k] and H[k] computed earlier we get







}
1
1
2
2
{
]}
1
2
[
{
]}
[
{
}
1
0
2
1
{
]}
2
[
{
]}
[
{
n
v
n
h
n
v
n
g
§5.9.2 2N-Point DFT of a Real
Sequence Using an N-point DFT
2
6
4
]
0
[
]
0
[
]
4
[
4142
.
0
1
)
1
(
)
1
(
]
3
[
]
3
[
]
3
[
2
0
2
]
2
[
]
2
[
]
2
[
4142
.
2
1
)
1
(
)
1
(
]
1
[
]
1
[
]
1
[
10
6
4
]
0
[
]
0
[
]
0
[
4
8
4
/
3
3
8
2
/
2
8
4
/
1
8












































j
j
j
j
e
H
W
G
V
j
j
e
j
H
W
G
V
e
H
W
G
V
j
j
e
j
H
W
G
V
H
G
V
§5.9.2 2N-Point DFT of a Real
Sequence Using an N-point DFT
4142
.
2
1
)
1
(
)
1
(
]
3
[
]
3
[
]
7
[
2
0
2
]
2
[
]
2
[
]
6
[
4142
.
0
1
)
1
(
)
1
(
]
1
[
]
1
[
]
5
[
4
/
7
7
8
2
/
3
6
8
4
/
5
5
8
j
j
e
j
H
W
G
V
e
H
W
G
V
j
j
e
j
H
W
G
V
j
j
j






























§5.10 Linear Convolution Using
the DFT
 Linear convolution is a key operation in
many signal processing applications
 Since a DFT can be efficiently implemented
using FFT algorithms, it is of interest to
develop methods for the implementation of
linear convolution using the DFT
§5.10.1 Linear Convolution of Two
Finite-Length Sequences
 Let g[n] and h[n] be two finite-length
sequences of length N and M, respectively
 Denote L=N+M-1
 Define two length-L sequences




















1
,
0
1
0
,
]
[
]
[
1
,
0
1
0
,
]
[
]
[
L
n
M
N
n
n
h
n
h
L
n
N
N
n
n
g
n
g
e
e
§5.10.1 Linear Convolution of Two
Finite-Length Sequences
 The corresponding implementation scheme
is illustrated below
Then
Zero-padding
with
(M-1) zeros
Zero-padding
with
(N-1) zeros
(N+M-1)
point DFT
(N+M-1)
point DFT
(N+M-1)
point IDFT
g[n]
h[n]
ge[n]
he[n]
yL[n]
Length-N
Length-M Length-(N+M-1)
L
yL[n]=g[n] h[n]=yC[n]=ge[n] he[n]
﹡
§5.10.2 Linear Convolution of a
Finite- Length Sequence with an
Infinite-Length Sequence
 We next consider the DFT-based
implementation of
]
[
]
[
]
[
]
[
]
[
1
0
n
x
n
h
n
x
h
n
y
M



 





where h[n] is a finite-length sequence of
length M and x[n] is an infinite length (or a
finite length sequence of length much
greater than M)
§5.10.2 Overlap-Add Method
 We first segment x[n], assumed to be a
causal sequence here without any loss of
generality, into a set of contiguous finite-
length subsequences xm [n] of length N each:





0
]
[
]
[
m
m mN
n
x
n
x
where



 




otherwise
,
0
1
0
,
]
[
]
[
N
n
mN
n
x
n
xm
§5.10.2 Overlap-Add Method
Thus we can write
where






0
]
[
]
[
]
[
]
[
m
m mN
n
y
n
x
n
h
n
y ﹡
Since h[n] is of length M and xm [n] is of
length N, the linear convolution
is of length N+M-1
﹡ ]
[
]
[ n
x
n
h m
]
[
]
[
]
[ n
x
n
h
n
y m
m  ﹡
§5.10.2 Overlap-Add Method
 As a result, the desired linear convolution
has been broken up into a
sum of infinite number of short-length linear
convolutions of length N+M-1
each: ]
[
]
[
]
[ n
h
n
x
n
y m
m  ﹡
]
[
]
[
]
[ n
x
n
h
n
y  ﹡
 Each of these short convolutions can be
implemented using the DFT-based method
discussed earlier, where now the DFTs (and
the IDFT) are computed on the basis of
N+M-1 points
§5.10.2 Overlap-Add Method
 There is one more subtlety to take care of
before we can implement





0
]
[
]
[
m
m mN
n
y
n
y
 Now the first convolution in the above sum,
, is of length N+M-1 and
is defined for 0≤ N+M-2
﹡ ]
[
]
[
]
[ 0
0 n
x
n
h
n
y 
using the DFT-based approach
§5.10.2 Overlap-Add Method
 There is an overlap of M-1samples
between these two short linear convolutions
 The second short convolution
, is also of length N+M-1
but is defined for N≤n≤2N+M-2
]
[
]
[
]
[ 1
1 n
x
n
h
n
y  ﹡
 Likewise, the third short convolution
, is also of length N+M-1 but
is defined for 2N≤n≤3N+M-2
﹡ ]
[
]
[
]
[ 2
2 n
x
n
h
n
y 
§5.10.2 Overlap-Add Method
 This process is illustrated in the figure on
the next slide for M=5 and N=70
 In general, there will be an overlap of M-1
samples between the samples of the short
convolutions h[n] xr-1[n] and h[n] xr [n] for
(r-1)N≤n≤rN+M-2
﹡
﹡
 Thus there is an overlap of M-1 samples
between h[n] x1[n] and h[n] x2[n]
﹡
﹡
§5.10.2 Overlap-Add Method
§5.10.2 Overlap-Add Method
§5.10.2 Overlap-Add Method
 Therefore, y[n] obtained by a linear
convolution of x[n] and h[n] is given by
y[n]=y0[n], 0≤n≤6
y[n]=y0[n]+ y1[n-7], 7≤n≤10
y[n]=y1[n-7], 11≤n≤13
y[n]= y1[n-7]+ y2[n-14], 14≤n≤17
y[n]= y2[n-14], 18≤n≤20

§5.10.2 Overlap-Add Method
 The above procedure is called the overlap-
add method since the results of the short
linear convolutions overlap and the
overlapped portions are added to get the
correct final result
 The function fftfilt can be used to implement
the above method
§5.10.2 Overlap-Add Method
 Program 5_5 illustrates the use of fftfilt in the
filtering of a noise-corrupted signal using a
length-3 moving average filter
 The plots generated by running this program
is shown below
§5.10.2 Overlap-Save Method
 In implementing the overlap-add method
using the DFT, we need to compute two
(N+M-1)-point DFTs and one (N+M-1)-point
IDFT since the overall linear convolution
was expressed as a sum of short-length
linear convolutions of length (N+M-1) each
 It is possible to implement the overall linear
convolution by performing instead circular
convolution of length shorter than (N+M-1)
§5.10.2 Overlap-Save Method
 To this end, it is necessary to segment x[n]
into overlapping blocks xm[n], keep the terms
of the circular convolution of h[n] with xm[n]
that corresponds to the terms obtained by a
linear convolution of h[n] and xm[n], and
throw the other parts of the circular
convoluition
§5.10.2 Overlap-Save Method
 To understand the correspondence between
the linear and circular convolutions, consider
a length-4 sequence x[n] and a length-3
sequence h[n]
 Let yL[n] denote the result of a linear
convolution of x[n] with h[n]
 The six samples of yL[n] are given by
§5.10.2 Overlap-Save Method
yL[0]=h[0]x[0]
yL[1]=h[0]x[1]+h[1]x[0]
yL[2]=h[0]x[2]+h[1]x[1]+h[2]x[0]
yL[3]=h[0]x[3]+h[1]x[2]+h[2]x[1]
yL[4]=h[1]x[3]+h[2]x[2]
yL[5]=h[2]x[3]
§5.10.2 Overlap-Save Method
 If we append h[n] with a single zero-valued
sample and convert it into a length-4
sequence he[n], the 4-point circular
convolution yC[n] of he[n] and x[n] is given by
yC[0]=h[0]x[0]+h[1]x[3]+h[2]x[2]
yC[1]=h[0]x[1]+h[1]x[0]+h[2]x[3]
yC[2]=h[0]x[2]+h[1]x[1]+h[2]x[0]
yC[3]=h[0]x[3]+h[1]x[2]+h[2]x[1]
§5.10.2 Overlap-Save Method
 If we compare the expressions for the
samples of yL[n] with the samples of yC[n],
we observe that the first 2 terms of yC[n] do
not correspond to the first 2 terms of yL[n],
whereas the last 2 terms of yC[n] are
precisely the same as the 3rd and 4th terms
of yL[n], i.e.,
yL[0]≠yC[0], yL[1]≠yC[1]
yL[2]≠yC[2], yL[3]≠yC[3]
§5.10.2 Overlap-Save Method
 General case: N-point circular convolution of
a length-M sequence h[n] with a length-N
sequence x[n] with N > M
 First M-1samples of the circular convolution
are incorrect and are rejected
 Remaining N - M+1 samples correspond to
the correct samples of the linear convolution
of h[n] with x[n]
§5.10.2 Overlap-Save Method
 Now, consider an infinitely long or very long
sequence x[n]
 Break it up as a collection of smaller length
(length-4) overlapping sequences xm[n] as
xm[n]= x [n+2m], 0≤n≤3, 0≤m≤∞
 Next,form
wm[n]=h[n] xm[n]
4
§5.10.2 Overlap-Save Method
 Or, equivalently,
wm[0]=h[0]xm[0]+h[1]xm[3]+h[2]xm[2]
wm[1]=h[0]xm[1]+h[1]xm[0]+h[2]xm[3]
wm[2]=h[0]xm[2]+h[1]xm[1]+h[2]xm[0]
wm[3]=h[0]xm[3]+h[1]xm[2]+h[2]xm[1]
 Computing the above for m = 0, 1, 2, 3, . . . ,
and substituting the values of xm[n] we arrive
at
§5.10.2 Overlap-Save Method
w0[0]=h[0]x[0]+h[1]x[3]+h[2]x[2] ← Reject
w0[1]=h[0]x[1]+h[1]x[0]+h[2]x[3] ← Reject
w0[2]=h[0]x[2]+h[1]x[1]+h[2]x[0]=y[2]← Save
w0[3]=h[0]x[3]+h[1]x[2]+h[2]x[1]=y[2]← Save
w1[0]=h[0]x[2]+h[1]x[5]+h[2]x[4] ← Reject
w1[1]=h[0]x[3]+h[1]x[2]+h[2]x[5] ← Reject
w1[2]=h[0]x[4]+h[1]x[3]+h[2]x[2]=y[4]← Save
w1[3]=h[0]x[5]+h[1]x[4]+h[2]x[3]=y[5]← Save
§5.10.2 Overlap-Save Method
w2[0]=h[0]x[4]+h[1]x[5]+h[2]x[6] ← Reject
w2[1]=h[0]x[5]+h[1]x[4]+h[2]x[7] ← Reject
w2[2]=h[0]x[6]+h[1]x[5]+h[2]x[4]=y[6]← Save
w2[3]=h[0]x[7]+h[1]x[6]+h[2]x[5]=y[7]← Save
§5.10.2 Overlap-Save Method
 It should be noted that to determine y[0] and
y[1], we need to form x-1[n] :
x-1[0]=0, x-1[1]=0,
x-1[2]=x[0], x-1[3]=x[1]
]
[
]
[
]
[ 1
1 n
x
n
h
n
w 
  4
and compute for 0≤n≤3
reject w-1[0] and w-1[1] ,and save w-1[2]= y[0]
and w-1[3]= y[1]
§5.10.2 Overlap-Save Method
 General Case: Let h[n] be a length-N
sequence
 Let xm[n] denote the m-th section of an
infinitely long sequence x[n] of length N and
defined by
xm[n]= x [n+m(N-m+1)], 0≤n≤N-1
with M<N
§5.10.2 Overlap-Save Method
 Then, we reject the first M-1 samples of
wm[n] and “abut” the remaining N-M+1
samples of wm[n] to form yL[n], the linear
convolution of h[n] and x[n]
 If ym[n] denotes the saved portion of wm[n],
i.e.
 Let wm[n]=h[n] xm[n]
N











2
1
,
]
[
2
0
,
0
]
[
N
n
M
n
w
M
n
n
y
m
m
§5.10.2 Overlap-Save Method
 Then
yL [n+m(N-M+1)]=ym[n] , M-1≤n≤N-1
 The approach is called overlap-save method
since the input is segmented into
overlapping sections and parts of the results
of the circular convolutions are saved and
abutted to determine the linear convolution
result
§5.10.2 Overlap-Save Method
 Process is illustrated next
§5.10.2 Overlap-Save Method

More Related Content

Similar to Circular conv_7767038.ppt

Exponential-plus-Constant Fitting based on Fourier Analysis
Exponential-plus-Constant Fitting based on Fourier AnalysisExponential-plus-Constant Fitting based on Fourier Analysis
Exponential-plus-Constant Fitting based on Fourier AnalysisMatthieu Hodgkinson
 
UNIT-2 DSP.ppt
UNIT-2 DSP.pptUNIT-2 DSP.ppt
UNIT-2 DSP.pptshailaja68
 
Speech signal time frequency representation
Speech signal time frequency representationSpeech signal time frequency representation
Speech signal time frequency representationNikolay Karpov
 
DSP_FOEHU - MATLAB 04 - The Discrete Fourier Transform (DFT)
DSP_FOEHU - MATLAB 04 - The Discrete Fourier Transform (DFT)DSP_FOEHU - MATLAB 04 - The Discrete Fourier Transform (DFT)
DSP_FOEHU - MATLAB 04 - The Discrete Fourier Transform (DFT)Amr E. Mohamed
 
Introduction_to_fast_fourier_transform ppt
Introduction_to_fast_fourier_transform pptIntroduction_to_fast_fourier_transform ppt
Introduction_to_fast_fourier_transform pptVikashKumar547263
 
Time Series Analysis
Time Series AnalysisTime Series Analysis
Time Series AnalysisAmit Ghosh
 
imagetransforms1-210417050321.pptx
imagetransforms1-210417050321.pptximagetransforms1-210417050321.pptx
imagetransforms1-210417050321.pptxMrsSDivyaBME
 
signal homework
signal homeworksignal homework
signal homeworksokok22867
 
DSP_FOEHU - Lec 09 - Fast Fourier Transform
DSP_FOEHU - Lec 09 - Fast Fourier TransformDSP_FOEHU - Lec 09 - Fast Fourier Transform
DSP_FOEHU - Lec 09 - Fast Fourier TransformAmr E. Mohamed
 
Low rank tensor approximation of probability density and characteristic funct...
Low rank tensor approximation of probability density and characteristic funct...Low rank tensor approximation of probability density and characteristic funct...
Low rank tensor approximation of probability density and characteristic funct...Alexander Litvinenko
 
Dft and its applications
Dft and its applicationsDft and its applications
Dft and its applicationsAgam Goel
 
DSP_FOEHU - MATLAB 02 - The Discrete-time Fourier Analysis
DSP_FOEHU - MATLAB 02 - The Discrete-time Fourier AnalysisDSP_FOEHU - MATLAB 02 - The Discrete-time Fourier Analysis
DSP_FOEHU - MATLAB 02 - The Discrete-time Fourier AnalysisAmr E. Mohamed
 
Lecture 04 Adaptive filter.pptx
Lecture 04 Adaptive filter.pptxLecture 04 Adaptive filter.pptx
Lecture 04 Adaptive filter.pptxZainULABIDIN496386
 

Similar to Circular conv_7767038.ppt (20)

zeropadding
zeropaddingzeropadding
zeropadding
 
Exponential-plus-Constant Fitting based on Fourier Analysis
Exponential-plus-Constant Fitting based on Fourier AnalysisExponential-plus-Constant Fitting based on Fourier Analysis
Exponential-plus-Constant Fitting based on Fourier Analysis
 
UNIT-2 DSP.ppt
UNIT-2 DSP.pptUNIT-2 DSP.ppt
UNIT-2 DSP.ppt
 
Speech signal time frequency representation
Speech signal time frequency representationSpeech signal time frequency representation
Speech signal time frequency representation
 
lecture_16.ppt
lecture_16.pptlecture_16.ppt
lecture_16.ppt
 
DSP_FOEHU - MATLAB 04 - The Discrete Fourier Transform (DFT)
DSP_FOEHU - MATLAB 04 - The Discrete Fourier Transform (DFT)DSP_FOEHU - MATLAB 04 - The Discrete Fourier Transform (DFT)
DSP_FOEHU - MATLAB 04 - The Discrete Fourier Transform (DFT)
 
c5.pdf
c5.pdfc5.pdf
c5.pdf
 
c5.pdf
c5.pdfc5.pdf
c5.pdf
 
Introduction_to_fast_fourier_transform ppt
Introduction_to_fast_fourier_transform pptIntroduction_to_fast_fourier_transform ppt
Introduction_to_fast_fourier_transform ppt
 
Time Series Analysis
Time Series AnalysisTime Series Analysis
Time Series Analysis
 
DFT,DCT TRANSFORMS.pdf
DFT,DCT TRANSFORMS.pdfDFT,DCT TRANSFORMS.pdf
DFT,DCT TRANSFORMS.pdf
 
Properties of dft
Properties of dftProperties of dft
Properties of dft
 
imagetransforms1-210417050321.pptx
imagetransforms1-210417050321.pptximagetransforms1-210417050321.pptx
imagetransforms1-210417050321.pptx
 
signal homework
signal homeworksignal homework
signal homework
 
Wave diffraction
Wave diffractionWave diffraction
Wave diffraction
 
DSP_FOEHU - Lec 09 - Fast Fourier Transform
DSP_FOEHU - Lec 09 - Fast Fourier TransformDSP_FOEHU - Lec 09 - Fast Fourier Transform
DSP_FOEHU - Lec 09 - Fast Fourier Transform
 
Low rank tensor approximation of probability density and characteristic funct...
Low rank tensor approximation of probability density and characteristic funct...Low rank tensor approximation of probability density and characteristic funct...
Low rank tensor approximation of probability density and characteristic funct...
 
Dft and its applications
Dft and its applicationsDft and its applications
Dft and its applications
 
DSP_FOEHU - MATLAB 02 - The Discrete-time Fourier Analysis
DSP_FOEHU - MATLAB 02 - The Discrete-time Fourier AnalysisDSP_FOEHU - MATLAB 02 - The Discrete-time Fourier Analysis
DSP_FOEHU - MATLAB 02 - The Discrete-time Fourier Analysis
 
Lecture 04 Adaptive filter.pptx
Lecture 04 Adaptive filter.pptxLecture 04 Adaptive filter.pptx
Lecture 04 Adaptive filter.pptx
 

More from ASMZahidKausar

More from ASMZahidKausar (20)

mri_coil.pptx
mri_coil.pptxmri_coil.pptx
mri_coil.pptx
 
tre8982736.ppt
tre8982736.ppttre8982736.ppt
tre8982736.ppt
 
wer8403625.ppt
wer8403625.pptwer8403625.ppt
wer8403625.ppt
 
1234734309.ppt
1234734309.ppt1234734309.ppt
1234734309.ppt
 
ch4_2_v1.ppt
ch4_2_v1.pptch4_2_v1.ppt
ch4_2_v1.ppt
 
lecture8impulse.pdf
lecture8impulse.pdflecture8impulse.pdf
lecture8impulse.pdf
 
BAETE_workshop_for_PEV_October_2017.pdf
BAETE_workshop_for_PEV_October_2017.pdfBAETE_workshop_for_PEV_October_2017.pdf
BAETE_workshop_for_PEV_October_2017.pdf
 
Introduction to medical image processing.pdf
Introduction to medical image processing.pdfIntroduction to medical image processing.pdf
Introduction to medical image processing.pdf
 
Image-Processing-ch3-part-3.pdf
Image-Processing-ch3-part-3.pdfImage-Processing-ch3-part-3.pdf
Image-Processing-ch3-part-3.pdf
 
EEE 328 05.pdf
EEE 328 05.pdfEEE 328 05.pdf
EEE 328 05.pdf
 
EEE 328 06.pdf
EEE 328 06.pdfEEE 328 06.pdf
EEE 328 06.pdf
 
EEE 328 07.pdf
EEE 328 07.pdfEEE 328 07.pdf
EEE 328 07.pdf
 
bme301_lec_11.pdf
bme301_lec_11.pdfbme301_lec_11.pdf
bme301_lec_11.pdf
 
EEE 328 01.pdf
EEE 328 01.pdfEEE 328 01.pdf
EEE 328 01.pdf
 
EEE 328 02.pdf
EEE 328 02.pdfEEE 328 02.pdf
EEE 328 02.pdf
 
EEE 328 08.pdf
EEE 328 08.pdfEEE 328 08.pdf
EEE 328 08.pdf
 
EEE 328 09.pdf
EEE 328 09.pdfEEE 328 09.pdf
EEE 328 09.pdf
 
EEE321_Lecture8.pdf
EEE321_Lecture8.pdfEEE321_Lecture8.pdf
EEE321_Lecture8.pdf
 
EEE321_Lecture13.pdf
EEE321_Lecture13.pdfEEE321_Lecture13.pdf
EEE321_Lecture13.pdf
 
bme301_lec_13.pdf
bme301_lec_13.pdfbme301_lec_13.pdf
bme301_lec_13.pdf
 

Recently uploaded

Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
MICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptxMICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptxabhijeetpadhi001
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 

Recently uploaded (20)

9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
MICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptxMICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptx
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 

Circular conv_7767038.ppt

  • 2. §5.2.1 The Discrete Fourier Transform  Definition - The simplest relation between a length-N sequence x[n], defined for 0≤n≤N-1, and its DTFT X(ejω) is obtained by uniformly sampling X(ejω) on the ω-axis between 0≤ω≤2π at ωk= 2πk/N, 0≤k≤N-1  From the definition of the DTFT we thus have 1 0 , ] [ ) ( ] [ 1 0 / 2 / 2           N k e n x e X k X N n N k j N k j    
  • 3. §5.2.1 The Discrete Fourier Transform  Note: X[k] is also a length-N sequence in the frequency domain  The sequence X[k] is called the discrete Fourier transform (DFT) of the sequence x[n]  Using the notation WN= e-j2π/N the DFT is usually expressed as: 1 0 , ] [ ] [ 1 0        N k W n x k X N n n k N
  • 4. §5.2.1 The Discrete Fourier Transform  The inverse discrete Fourier transform (IDFT) is given by  To verify the above expression we multiply both sides of the above equation by and sum the result from n = 0 to n=N-1 W n N  1 0 , ] [ 1 ] [ 1 0         N n W k X N n x N k kn N
  • 5. §5.2.1 The Discrete Fourier Transform  resulting in                                  1 0 1 0 ) ( 1 0 1 0 ) ( 1 0 1 0 1 0 ] [ 1 ] [ 1 ] [ 1 ] [ N k N k n K N N n N k n K N N n n N N k kn N N n n N W k X N W k X N W W k X N W n x    
  • 6. §5.2.1 The Discrete Fourier Transform  Making use of the identity we observe that the RHS of the last equation is equal to X[l] ] [ ] [   X W n x N n n N     1 0            otherwise , 0 integer an , for , 1 0 ) ( r rN k N W N n n k N    Hence
  • 7. §5.2.1 The Discrete Fourier Transform  Example – Consider the length-N sequence 1 1 0 0 1     N n n , ,     ] [n x 1 0 1 ] 0 [ ] [ ] [ 0 1 0          N k W x W n x k X N N n kn N ,  Its N-point DFT is given by
  • 8. §5.2.1 The Discrete Fourier Transform  Example – Consider the length-N sequence             1 1 , 1 0 , 0 , 1 ] [ N n m m n m n n y 1 0 ] [ ] [ ] [ 1 0          N k W W m y W n y k Y km N km N N n kn N ,  Its N-point DFT is given by
  • 9. §5.2.1 The Discrete Fourier Transform  Example – Consider the length-N sequence defined for 0≤n≤N-1 1 0 ), / 2 cos( ] [      N r N rn n g   ) ( 2 1 2 1 ] [ / 2 / 2 rn N rn N N rn j N rn j W W e e n g          Using a trigonometric identity we can write
  • 10. §5.2.1 The Discrete Fourier Transform  The N-point DFT of g[n] is thus given by 1 0 2 1 ] [ ] [ 1 0 1 0 ) ( ) ( 1 0                         N k W W W n g k G N n N n n k r N n k r N N n kn N
  • 11. §5.2.1 The Discrete Fourier Transform  Making use of the identity            otherwise , 0 integer an , for , 1 0 ) ( r rN k N W N n n k N   we get 1 0 otherwis 0 for , 2 / for , 2 / ] [             N k r N k N r k N k G ,
  • 12. §5.2.2 Matrix Relations  The DFT samples defined by 1 0 , ] [ ] [ 1 0        N k W n x k X N n kn N T T N x x x x N X X X X ] 1 [ ] 1 [ ]] 0 [ [ ]] 1 [ ] 1 [ ] 0 [ [       can be expressed in matrix form as X=Dnx where
  • 13. §5.2.2 Matrix Relations and DN is the N×N DFT matrix given by                       2 ) 1 ( ) 1 ( 2 ) 1 ( ) 1 ( 2 4 2 ) 1 ( 2 1 1 1 1 1 1 1 1 N N N N N N N N N N N N N N N W W W W W W W W W D         
  • 14. §5.2.2 Matrix Relations  Likewise, the IDFT relation given by where is the N×N DFT matrix DN 1  1 0 , ] [ 1 ] [ 1 0         N n W K X N n x N k kn N X D x N 1   can be expressed in matrix form as
  • 15. §5.2.2 Matrix Relations where  Note: D D N N N * 1 1                                   2 ) 1 ( ) 1 ( 2 ) 1 ( ) 1 ( 2 4 2 ) 1 ( 2 1 1 1 1 1 1 1 1 1 N N N N N N N N N N N N N N N W W W W W W W W W D         
  • 16. §5.2.3 DFT Computation Using MATLAB  The functions to compute the DFT and the IDFT are fft and ifft  These functions make use of FFT algorithms which are computationally highly efficient compared to the direct computation  Programs 5_1.m and 5_2.m illustrate the use of these functions
  • 17. §5.2.3 DFT Computation Using MATLAB  Example –a Program 5_3.m can be used to compute the DFT and the DTFT of the sequence x[n]=cos(6πn/16), 0≤n≤15 as shown below indicates DFT samples
  • 18. §5.3.3 DTFT from DFT by Interpolation  The N-point DFT X[k] of a length-N sequence x[n] is simply the frequency samples of its DTFT X(ejω) evaluated at N uniformly spaced frequency points 1 0 , / 2      N k N k k     Given the N-point DFT X[k] of a length-N sequence x[n], its DTFT X(ejω) can be uniquely determined from X[k]
  • 19. §5.3.3 DTFT from DFT by Interpolation  Thus        S N n n N k j N k n j N n kn N N k N n n j j e e W e e k X N k X N n x X                        1 0 ) / 2 ( 1 0 1 0 1 0 1 0 ] [ 1 ] ] [ 1 [ ] [ ) (     
  • 20. §5.3.3 DTFT from DFT by Interpolation  To develop a compact expression for the sum S, let ) / 2 ( N k j e r      Then  From the above     1 0 N n n r S 1 1 1 1 1 0 1 1 1                    N N N n n N N n N n n n r S r r r r r rS
  • 21. §5.3.3 DTFT from DFT by Interpolation  Or, equivalently,  Hence ] 2 / ) 1 )][( / 2 [ )] / 2 ( [ ) 2 ( 2 2 sin 2 2 sin 1 1 1 1                              N N k j N k j k N j N e N k N k N e e r r S           N r S r rS S      1 ) 1 (
  • 22. §5.3.3 DTFT from DFT by Interpolation  therefore ] 2 / ) 1 )][( / 2 [ 1 0 2 2 sin 2 2 sin ] [ 1 ) (                       N N k j N k j e N k N k N k X N e X       
  • 23. §5.3.4 Sampling the DTFT  Consider a sequence x[n] with a DTFT X(ejω)  We sample X(ejω) at N equally spaced points ωk=2πk/N, 0≤k≤N-1 deleloping the N frequency samples  These N frequency samples can be considered as an N-point DFT Y[k] whose N- point IDFT is a length-N sequence y[n] )} ( { e k j X 
  • 24. §5.3.4 Sampling the DTFT  Now      =-      j j e x e X ] [ ) (            =- =-       k N N k j N k j j W x e x e X e X k Y k ] [ ] [ ) ( ) ( ] [ / 2 / 2    kn N N k W k Y N n y     1 0 ] [ 1 ] [ =  Thus  An IDFT of Y[k] yields
  • 25. §5.3.4 Sampling the DTFT  i.e.                         1 0 ) ( 1 0 1 ] [ ] [ 1 ] [ N k n k N kn N k N N k W N x W W x N n y       =  Making use of the identity           otherwise , 0 for , 1 1 1 0 ) ( mN n r W N N n r n k N =
  • 26. §5.3.4 Sampling the DTFT  we arrive at the desired relation          m N n mN n x n y 1 0 , ] [ ] [  Thus y[n] is obtained from x[n] by adding an infinite number of shifted replicas of x[n], with each replica shifted by an integer multiple of N sampling instants, and observing the sum only for the interval 0≤n≤N-1
  • 27. §5.3.4 Sampling the DTFT  To apply 1 0 , ] [ ] [          N n mN n x n y m to finite-length sequences, we assume that the samples outside the specified range are zeros  Thus if x[n] is a length-M sequence with M≤N, then y[n]= x[n] , for 0≤n≤N-1
  • 28. §5.3.4 Sampling the DTFT  If M > N, there is a time-domain aliasing of samples of x[n] in generating y[n], and x[n] cannot be recovered from y[n]  Example – Let {x[n]}={0 1 2 3 4 5} ↑  By sampling its DTFT X(ejω) at ωk=2πk/4, 0≤k≤3 and then applying a 4-point IDFT to these samples, we arrive at the sequence y[n] given by
  • 29. §5.3.4 Sampling the DTFT y[n]= x[n]+ x[n+4]+x[n-4] 0≤n≤3  i.e. {y[n]}={4 6 2 3} ↑ {x[n]} cannot be recovered from {y[n]}
  • 30. Numerical Computation of the DTFT Using the DFT  A practical approach to the numerical computation of the DTFT of a finite-length sequence  Let X(ejω) be the DTFT of a length-N sequence x[n]  We wish to evaluate X(ejω) at a dense grid of frequencies ωk=2πk/M, 0≤k≤M-1,where M >> N:
  • 31. Numerical Computation of the DTFT Using the DFT  Define a new sequence M kn j N n n j N n j e n x e n x e X k k / 2 1 0 1 0 ] [ ] [ ) (              M kn j M n e j e n x e X k / 2 1 0 ] [ ) (                  1 , 0 1 0 , ] [ ] [ M n N N n n x n xe  Then
  • 32. Numerical Computation of the DTFT Using the DFT  The DFT Xe[k] can be computed very efficiently using the FFT algorithm if M is an integer power of 2  The function freqz employs this approach to evaluate the frequency response at a prescribed set of frequencies of a DTFT expressed as a rational function in e-jω  Thus is essentially an M-point DFT Xe[k] of the length-M sequence xe[n] ) (e k j X 
  • 33. DFT Properties  Like the DTFT, the DFT also satisfies a number of properties that are useful in signal processing applications  Some of these properties are essentially identical to those of the DTFT, while some others are somewhat different  A summary of the DFT properties are given in tables in the following slides
  • 34. Table 5.1: DFT Properties: Symmetry Relations x[n] is a complex sequence
  • 35. Table 5.2: DFT Properties: Symmetry Relations x[n] is a real sequence
  • 36. Table 5.3: General Properties of DFT
  • 37. §5.4.1 Circular Shift of a Sequence  This property is analogous to the time- shifting property of the DTFT as given in Table 3.4, but with a subtle difference  Consider length-N sequences defined for 0≤n≤N-1  Sample values of such sequences are equal to zero for values of n<0 and n≥N
  • 38. §5.4.1 Circular Shift of a Sequence  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 thus need to define another type of a shift that will always keep the shifted sequence in the range 0≤n≤N-1
  • 39. §5.4.1 Circular Shift of a Sequence  The desired shift, called the circular shift, is defined using a modulo operation: ] [ ] [ 0 N c n n x n x                  0 0 0 0 0 , ] [ 1 , ] [ ] [ n n for n n N x N n n for n n x n xc  For n0>0 (right circular shift), the above equation implies
  • 40. §5.4.1 Circular Shift of a Sequence  Illustration of the concept of a circular shift ] 5 [ ] 1 [ 6 6       n x n x - ] 2 [ ] 4 [ 6 6       n x n x - ] [n x
  • 41. §5.4.1 Circular Shift of a Sequence  As can be seen from the previous figure, a right circular shift by n0 is equivalent to a left circular shift by N-n0 sample periods  A circular shift by an integer number n0 greater than N is equivalent to a circular shift by N n0
  • 42. §5.4.2 Circular Convolution  This operation is analogous to linear convolution, but with a subtle difference  Consider two length-N sequences, g[n] and h[n], respectively  Their linear convolution results in a length- (2N-1) sequence yL[n] given by 2 2 0 1 0         N n m n h m g n y N m L ], [ ] [ ] [
  • 43. §5.4.2 Circular Convolution  In computing yL[n] we have assumed that both length-N sequence have been zero- padded to extend their lengths to 2N-1  The longer form of yL[n] results from the time-reversal of the sequence h[n] and its linear shift to the right  The first nonzero value of yL[n] is yL[0]=g[0]h[0] ,and the last nonzero value is yL[2N-2]=g[N-1]h[N-1]
  • 44. §5.4.2 Circular Convolution  To develop a convolution-like operation resulting in a length-N sequence yC[n] , we need to define a circular time-reversal, and then apply a circular time-shift  Resulting operation, called a circular convolution, is defined by 1 0 ], [ ] [ ] [ 1 0           N n m n h m g n y N m N C
  • 45. §5.4.2 Circular Convolution  Since the operation defined involves two length-N sequences, it is often referred to as an N-point circular convolution, denoted as  The circular convolution is commutative, i.e. ] [ ] [ ] [ ] [ n g n h n h n g  N N ] [ ] [ ] [ n h n g n y  N
  • 46. §5.4.2 Circular Convolution  Example – Determine the 4-point circular convolution of the two length-4 sequences: as sketched below     } 1 1 2 2 { ]} [ { }, 1 0 2 1 { ]} [ { n h n g
  • 47. §5.4.2 Circular Convolution  The result is a length-4 sequence yC[n] given by 6 ) 2 1 ( ) 1 0 ( ) 1 2 ( ) 2 1 ( ] 1 [ ] 3 [ ] 2 [ ] 2 [ ] 3 [ ] 1 [ ] 0 [ ] 0 [ ] [ ] [ ] 0 [ 4 3 0                   h g h g h g h g m h m g m C y , ] [ ] [ ] [ ] [ ] [ 3 0 4        m C m n h m g n h n g n y 4 3 0   n  From the above we observe
  • 48. §5.4.2 Circular Convolution  Likewise 7 ) 1 1 ( ) 1 0 ( ) 2 2 ( ) 2 1 ( ] 2 [ ] 3 [ ] 3 [ ] 2 [ ] 0 [ ] 1 [ ] 1 [ ] 0 [ ] 1 [ ] [ ] 1 [ 4 3 0                   h g h g h g h g m h m g m C y 6 ) 1 1 ( ) 2 0 ( ) 2 2 ( ) 1 1 ( ] 3 [ ] 3 [ ] 0 [ ] 2 [ ] 1 [ ] 1 [ ] 2 [ ] 0 [ ] 2 [ ] [ ] 2 [ 4 3 0                   h g h g h g h g m h m g m C y
  • 49. §5.4.2 Circular Convolution  The circular convolution can also be computed using a DFT-based approach as indicated in Table 5.3 5 ) 2 1 ( ) 2 0 ( ) 1 2 ( ) 1 1 ( ] 0 [ ] 3 [ ] 1 [ ] 2 [ ] 2 [ ] 1 [ ] 3 [ ] 0 [ ] 3 [ ] [ ] 3 [ 4 3 0                    h g h g h g h g m h m g m C y yC[n] and
  • 50. §5.4.2 Circular Convolution  Example – Consider the two length-4 sequences repeated below for convenience:  The 4-point DFT G[k] of g[n] is given by G[k]= g[0]+g[1]e-j2πk/4 +g[2]e-j4πk/4 +g[3]e-j6πk/4 =1+2e-jπk/2 +e-j3πk/2 , 0≤k≤3
  • 51. §5.4.2 Circular Convolution  Therefore G[0]=1+2+1=4, G[1]=1-j2+j=1-j, G[2]=1-2-1=-2, G[3]= 1+j2-j=1+j  Likewise, H[k]=h[0]+h[1]e-j2πk/4 +h[2]e-j4πk/4 +h[3]e-j6πk/4 =2+2e-jπk/2 +e-jπk +e-j3πk/2 , 0≤k≤3
  • 52. §5.4.2 Circular Convolution  Hence, H[0]=2+2+1+1=6, H [1]=2-j2-1+j=1-j, H [2]=2-2+1-1=0, H [3]=2+j2-1-j=1+j  The two 4-point DFTs can also be computed using the matrix relation given earlier
  • 53. §5.4.2 Circular Convolution                                                                         j j j j j j g g g g D G G G G 1 2 1 4 1 0 2 1 1 1 1 1 1 1 1 1 1 1 1 1 ] 3 [ ] 2 [ ] 1 [ ] 0 [ ] 3 [ ] 2 [ ] 1 [ ] 0 [ 4                                                                        j j j j j j h h h h D H H H H 1 0 1 6 1 1 2 2 1 1 1 1 1 1 1 1 1 1 1 1 ] 3 [ ] 2 [ ] 1 [ ] 0 [ ] 3 [ ] 2 [ ] 1 [ ] 0 [ 4 D4 is the 4-point DFT matrix
  • 54. §5.4.2 Circular Convolution  If YC[k] denotes the 4-point DFT of yC[n] then from Table 3.5 we observe YC[k]= G[k] H[k] , 0≤k≤3                                          2 0 2 24 ] 3 [ ] 3 [ ] 2 [ ] 2 [ ] 1 [ ] 1 [ ] 0 [ ] 0 [ ] 3 [ ] 2 [ ] 1 [ ] 0 [ j j H G H G H G H G Y Y Y Y C C C C  Thus
  • 55. §5.4.2 Circular Convolution  A 4-point IDFT of YC[k] yields                                                                              5 6 7 6 2 0 2 24 1 1 1 1 1 1 1 1 1 1 1 1 4 1 ] 3 [ ] 2 [ ] 1 [ ] 0 [ 4 1 ] 3 [ ] 2 [ ] 1 [ ] 0 [ * 4 j j j j j j Y Y Y Y D y y y y C C C C C C C C
  • 56. §5.4.2 Circular Convolution  Example – Now let us extended the two length-4 sequences to length 7 by appending each with three zero-valued samples, i.e.                 6 4 , 0 3 0 , ] [ ] [ 6 4 , 0 3 0 , ] [ ] [ n n n h n h n n n g n g e e
  • 57. §5.4.2 Circular Convolution  We next determine the 7-point circular convolution of ge[n] and he[n] :  From the above y[0]=ge[0]he[0]+ge[1]he[6]+ge[3]he[4] +ge[4]he[3]+ge[5]he[2]+ge[6]he[1] =ge[0]he[0]=1×2=2 6 0 , ] [ ] [ ] [ 6 0 7      n m n h n g n y m e e
  • 58. §5.4.2 Circular Convolution  Continuing the process we arrive y[1]=g[0]h[1]+g[1]h[0]=(1×2)+(2×2)=6, y[2]=g[0]h[2]+g[2]h[0] =(1×2)+(2×2)+(0×2)=5, y[3]=g[0]h[3]+g[1]h[2]+g[2]h[1]+g[3]h[0] =(1×1)+(2×1)+(0×2)+(1×2)=5, y[4]=g[1]h[3]+g[2]h[2]+g[3]h[1] =(2×1)+(0×1)+(1×2)=4,
  • 59. §5.4.2 Circular Convolution y[5]=g[2]h[3]+g[3]h[2]=(0×1)+(1×1)=1, y[6]=g[3]h[3]=(1×1)=1  As can be seen from the above that y[n] is precisely the sequence yL[n] obtained by a linear convolution of g[n] and h[n]
  • 60. §5.4.2 Circular Convolution  The N-point circular convolution can be written in matrix form as                                                          ] 1 [ ] 2 [ ] 1 [ ] 0 [ ] 0 [ ] 3 [ ] 2 [ ] 1 [ ] 3 [ ] 0 [ ] 1 [ ] 2 [ ] 2 [ ] 1 [ ] 0 [ ] 1 [ ] 1 [ ] 2 [ ] 1 [ ] 0 [ ] 1 [ ] 2 [ ] 1 [ ] 0 [ N g g g g h N h N h N h h h h h h N h h h h N h N h h N y y y y C C C C             Note: The elements of each diagonal of the N×N matrix are equal  Such a matrix is called a circulant matrix
  • 61. §5.4.2 Circular Convolution  First, the samples of the two sequences are multiplied using the conventional multiplication method as shown on the next slide  Consider the evaluation of y[n]=h[n] g[n] where {g[n]} and {h[n]} are length-4 sequences *  Tabular Method  We illustrate the method by an example
  • 62. §5.4.2 Circular Convolution  The partial products generated in the 2nd, 3rd, and 4th rows are circularly shifted to the left as indicated above
  • 63. §5.4.2 Circular Convolution  The modified table after circular shifting is shown below  The samples of the sequence { yc[n]} are obtained by adding the 4 partial products in the column above of each sample
  • 64. §5.4.2 Circular Convolution  Thus yc[0]=g[0]h[0]+ g[3]h[1]+ g[2]h[2]+ g[1]h[3] yc[1]=g[1]h[0]+ g[0]h[1]+ g[3]h[2]+ g[2]h[3] yc[2]=g[2]h[0]+ g[1]h[1]+ g[0]h[2]+ g[3]h[3] yc[3]=g[3]h[0]+ g[2]h[1]+ g[1]h[2]+ g[0]h[3]
  • 65. §5.9 Computation of the DFT of Real Sequences  In most practical applications, sequences of interest are real  In such cases, the symmetry properties of the DFT given in Table 5.2 can be exploited to make the DFT computations more efficient
  • 66. §5.9.1 N-Point DFTs of Two Length- N Real Sequences  Let g[n] and h[n] be two length-N real sequences with G[k] and H[k] denoting their respective N-point DFTs  These two N-point DFTs can be computed efficiently using a single N-point DFT  Define a complex length-N sequence x[n]=g[n]+jh[n]  Hence, g[n]=Re{x[n]} and h[n]=Im{x[n]}
  • 67. §5.9.1 N-Point DFTs of Two Length- N Real Sequences  Let X[k] denote the N-point DFT of x[n]  Then, from Table 5.1 we arrive at     ] [ ] [ 2 1 ] [ ] [ ] [ 2 1 ] [ * * N N k X k X j k H k X k X k G         ] [ ] [ * * N N k N X k X        Note that for 0≤k≤N-1,
  • 68. §5.9.1 N-Point DFTs of Two Length- N Real Sequences  Example – We compute the 4-point DFTs of the two real sequences g[n] and h[n] given below             1 1 2 2 ] [ , 1 0 2 1 ] [ n h n g  Then {x[n]}={g[n]}+j{h[n]} is given by          j j j j n x 1 2 2 2 1 ] [
  • 69. §5.9.1 N-Point DFTs of Two Length- N Real Sequences  Its DTF X[k] is                                                              2 2 2 6 4 1 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 ] 3 [ ] 2 [ ] 1 [ ] 0 [ j j j j j j j j j j X X X X  From the above X*[k]=[4-j6 2 -2 -j2]  Hence X*[<4-k>4]=[4-j6 -j2 -2 2]
  • 70. §5.9.1 N-Point DFTs of Two Length- N Real Sequences  Therefore {G[k]}=[4 1-j -2 1+j] {G[k]}=[6 1-j 0 1+j] verifying the results derived earlier
  • 71. §5.9.2 2N-Point DFT of a Real Sequence Using an N-point DFT  Let v[n] be a length-2N real sequence with an 2N-point DFT V[k]  Define two length-N real sequences g[n] and h[n] as follows: N n n v n h n v n g      0 , ] 1 2 [ ] [ , ] 2 [ ] [  Let G[k] and H[k] denote their respective N- point DFTs
  • 72. §5.9.2 2N-Point DFT of a Real Sequence Using an N-point DFT  Define a length-N complex sequence {x[n]}={g[n]}+j{h[n]} with an N-point DFT X[k]  Then as shown earlier ]} [ ] [ { 2 1 ] [ ]} [ ] [ { 2 1 ] [ N N k X k X j k H k X k X k G          
  • 73. §5.9.2 2N-Point DFT of a Real Sequence Using an N-point DFT  Now 1 2 0 , ] [ ] [ ] [ ] [ ] 1 2 [ ] 2 [ ] [ ] [ 1 0 2 1 0 2 1 0 1 0 ) 1 2 ( 2 1 0 2 2 1 0 2 1 2 0                                  N k n h n g n h n g n v n v n v k V W W W W W W W W W nk N N n k N nk N N n k N nk N N n nk N N n k n N N n nk N N n nk N N n
  • 74. §5.9.2 2N-Point DFT of a Real Sequence Using an N-point DFT  i.e., 1 2 0 , ] [ ] [ ] [ 2          N k k H W k G k V N k N N   } 1 1 1 0 2 2 2 1 { ]} [ { n v  We form two length-4 real sequences as follows  Example – Let us determine the 8-point  DFT V[k] of the length-8 real sequence
  • 75. §5.9.2 2N-Point DFT of a Real Sequence Using an N-point DFT  Now 7 0 , ] [ ] [ ] [ 4 8 4         k k H W k G k V k  Substituting the values of the 4-point DFTs G[k] and H[k] computed earlier we get        } 1 1 2 2 { ]} 1 2 [ { ]} [ { } 1 0 2 1 { ]} 2 [ { ]} [ { n v n h n v n g
  • 76. §5.9.2 2N-Point DFT of a Real Sequence Using an N-point DFT 2 6 4 ] 0 [ ] 0 [ ] 4 [ 4142 . 0 1 ) 1 ( ) 1 ( ] 3 [ ] 3 [ ] 3 [ 2 0 2 ] 2 [ ] 2 [ ] 2 [ 4142 . 2 1 ) 1 ( ) 1 ( ] 1 [ ] 1 [ ] 1 [ 10 6 4 ] 0 [ ] 0 [ ] 0 [ 4 8 4 / 3 3 8 2 / 2 8 4 / 1 8                                             j j j j e H W G V j j e j H W G V e H W G V j j e j H W G V H G V
  • 77. §5.9.2 2N-Point DFT of a Real Sequence Using an N-point DFT 4142 . 2 1 ) 1 ( ) 1 ( ] 3 [ ] 3 [ ] 7 [ 2 0 2 ] 2 [ ] 2 [ ] 6 [ 4142 . 0 1 ) 1 ( ) 1 ( ] 1 [ ] 1 [ ] 5 [ 4 / 7 7 8 2 / 3 6 8 4 / 5 5 8 j j e j H W G V e H W G V j j e j H W G V j j j                              
  • 78. §5.10 Linear Convolution Using the DFT  Linear convolution is a key operation in many signal processing applications  Since a DFT can be efficiently implemented using FFT algorithms, it is of interest to develop methods for the implementation of linear convolution using the DFT
  • 79. §5.10.1 Linear Convolution of Two Finite-Length Sequences  Let g[n] and h[n] be two finite-length sequences of length N and M, respectively  Denote L=N+M-1  Define two length-L sequences                     1 , 0 1 0 , ] [ ] [ 1 , 0 1 0 , ] [ ] [ L n M N n n h n h L n N N n n g n g e e
  • 80. §5.10.1 Linear Convolution of Two Finite-Length Sequences  The corresponding implementation scheme is illustrated below Then Zero-padding with (M-1) zeros Zero-padding with (N-1) zeros (N+M-1) point DFT (N+M-1) point DFT (N+M-1) point IDFT g[n] h[n] ge[n] he[n] yL[n] Length-N Length-M Length-(N+M-1) L yL[n]=g[n] h[n]=yC[n]=ge[n] he[n] ﹡
  • 81. §5.10.2 Linear Convolution of a Finite- Length Sequence with an Infinite-Length Sequence  We next consider the DFT-based implementation of ] [ ] [ ] [ ] [ ] [ 1 0 n x n h n x h n y M           where h[n] is a finite-length sequence of length M and x[n] is an infinite length (or a finite length sequence of length much greater than M)
  • 82. §5.10.2 Overlap-Add Method  We first segment x[n], assumed to be a causal sequence here without any loss of generality, into a set of contiguous finite- length subsequences xm [n] of length N each:      0 ] [ ] [ m m mN n x n x where          otherwise , 0 1 0 , ] [ ] [ N n mN n x n xm
  • 83. §5.10.2 Overlap-Add Method Thus we can write where       0 ] [ ] [ ] [ ] [ m m mN n y n x n h n y ﹡ Since h[n] is of length M and xm [n] is of length N, the linear convolution is of length N+M-1 ﹡ ] [ ] [ n x n h m ] [ ] [ ] [ n x n h n y m m  ﹡
  • 84. §5.10.2 Overlap-Add Method  As a result, the desired linear convolution has been broken up into a sum of infinite number of short-length linear convolutions of length N+M-1 each: ] [ ] [ ] [ n h n x n y m m  ﹡ ] [ ] [ ] [ n x n h n y  ﹡  Each of these short convolutions can be implemented using the DFT-based method discussed earlier, where now the DFTs (and the IDFT) are computed on the basis of N+M-1 points
  • 85. §5.10.2 Overlap-Add Method  There is one more subtlety to take care of before we can implement      0 ] [ ] [ m m mN n y n y  Now the first convolution in the above sum, , is of length N+M-1 and is defined for 0≤ N+M-2 ﹡ ] [ ] [ ] [ 0 0 n x n h n y  using the DFT-based approach
  • 86. §5.10.2 Overlap-Add Method  There is an overlap of M-1samples between these two short linear convolutions  The second short convolution , is also of length N+M-1 but is defined for N≤n≤2N+M-2 ] [ ] [ ] [ 1 1 n x n h n y  ﹡  Likewise, the third short convolution , is also of length N+M-1 but is defined for 2N≤n≤3N+M-2 ﹡ ] [ ] [ ] [ 2 2 n x n h n y 
  • 87. §5.10.2 Overlap-Add Method  This process is illustrated in the figure on the next slide for M=5 and N=70  In general, there will be an overlap of M-1 samples between the samples of the short convolutions h[n] xr-1[n] and h[n] xr [n] for (r-1)N≤n≤rN+M-2 ﹡ ﹡  Thus there is an overlap of M-1 samples between h[n] x1[n] and h[n] x2[n] ﹡ ﹡
  • 90. §5.10.2 Overlap-Add Method  Therefore, y[n] obtained by a linear convolution of x[n] and h[n] is given by y[n]=y0[n], 0≤n≤6 y[n]=y0[n]+ y1[n-7], 7≤n≤10 y[n]=y1[n-7], 11≤n≤13 y[n]= y1[n-7]+ y2[n-14], 14≤n≤17 y[n]= y2[n-14], 18≤n≤20 
  • 91. §5.10.2 Overlap-Add Method  The above procedure is called the overlap- add method since the results of the short linear convolutions overlap and the overlapped portions are added to get the correct final result  The function fftfilt can be used to implement the above method
  • 92. §5.10.2 Overlap-Add Method  Program 5_5 illustrates the use of fftfilt in the filtering of a noise-corrupted signal using a length-3 moving average filter  The plots generated by running this program is shown below
  • 93. §5.10.2 Overlap-Save Method  In implementing the overlap-add method using the DFT, we need to compute two (N+M-1)-point DFTs and one (N+M-1)-point IDFT since the overall linear convolution was expressed as a sum of short-length linear convolutions of length (N+M-1) each  It is possible to implement the overall linear convolution by performing instead circular convolution of length shorter than (N+M-1)
  • 94. §5.10.2 Overlap-Save Method  To this end, it is necessary to segment x[n] into overlapping blocks xm[n], keep the terms of the circular convolution of h[n] with xm[n] that corresponds to the terms obtained by a linear convolution of h[n] and xm[n], and throw the other parts of the circular convoluition
  • 95. §5.10.2 Overlap-Save Method  To understand the correspondence between the linear and circular convolutions, consider a length-4 sequence x[n] and a length-3 sequence h[n]  Let yL[n] denote the result of a linear convolution of x[n] with h[n]  The six samples of yL[n] are given by
  • 97. §5.10.2 Overlap-Save Method  If we append h[n] with a single zero-valued sample and convert it into a length-4 sequence he[n], the 4-point circular convolution yC[n] of he[n] and x[n] is given by yC[0]=h[0]x[0]+h[1]x[3]+h[2]x[2] yC[1]=h[0]x[1]+h[1]x[0]+h[2]x[3] yC[2]=h[0]x[2]+h[1]x[1]+h[2]x[0] yC[3]=h[0]x[3]+h[1]x[2]+h[2]x[1]
  • 98. §5.10.2 Overlap-Save Method  If we compare the expressions for the samples of yL[n] with the samples of yC[n], we observe that the first 2 terms of yC[n] do not correspond to the first 2 terms of yL[n], whereas the last 2 terms of yC[n] are precisely the same as the 3rd and 4th terms of yL[n], i.e., yL[0]≠yC[0], yL[1]≠yC[1] yL[2]≠yC[2], yL[3]≠yC[3]
  • 99. §5.10.2 Overlap-Save Method  General case: N-point circular convolution of a length-M sequence h[n] with a length-N sequence x[n] with N > M  First M-1samples of the circular convolution are incorrect and are rejected  Remaining N - M+1 samples correspond to the correct samples of the linear convolution of h[n] with x[n]
  • 100. §5.10.2 Overlap-Save Method  Now, consider an infinitely long or very long sequence x[n]  Break it up as a collection of smaller length (length-4) overlapping sequences xm[n] as xm[n]= x [n+2m], 0≤n≤3, 0≤m≤∞  Next,form wm[n]=h[n] xm[n] 4
  • 101. §5.10.2 Overlap-Save Method  Or, equivalently, wm[0]=h[0]xm[0]+h[1]xm[3]+h[2]xm[2] wm[1]=h[0]xm[1]+h[1]xm[0]+h[2]xm[3] wm[2]=h[0]xm[2]+h[1]xm[1]+h[2]xm[0] wm[3]=h[0]xm[3]+h[1]xm[2]+h[2]xm[1]  Computing the above for m = 0, 1, 2, 3, . . . , and substituting the values of xm[n] we arrive at
  • 102. §5.10.2 Overlap-Save Method w0[0]=h[0]x[0]+h[1]x[3]+h[2]x[2] ← Reject w0[1]=h[0]x[1]+h[1]x[0]+h[2]x[3] ← Reject w0[2]=h[0]x[2]+h[1]x[1]+h[2]x[0]=y[2]← Save w0[3]=h[0]x[3]+h[1]x[2]+h[2]x[1]=y[2]← Save w1[0]=h[0]x[2]+h[1]x[5]+h[2]x[4] ← Reject w1[1]=h[0]x[3]+h[1]x[2]+h[2]x[5] ← Reject w1[2]=h[0]x[4]+h[1]x[3]+h[2]x[2]=y[4]← Save w1[3]=h[0]x[5]+h[1]x[4]+h[2]x[3]=y[5]← Save
  • 103. §5.10.2 Overlap-Save Method w2[0]=h[0]x[4]+h[1]x[5]+h[2]x[6] ← Reject w2[1]=h[0]x[5]+h[1]x[4]+h[2]x[7] ← Reject w2[2]=h[0]x[6]+h[1]x[5]+h[2]x[4]=y[6]← Save w2[3]=h[0]x[7]+h[1]x[6]+h[2]x[5]=y[7]← Save
  • 104. §5.10.2 Overlap-Save Method  It should be noted that to determine y[0] and y[1], we need to form x-1[n] : x-1[0]=0, x-1[1]=0, x-1[2]=x[0], x-1[3]=x[1] ] [ ] [ ] [ 1 1 n x n h n w    4 and compute for 0≤n≤3 reject w-1[0] and w-1[1] ,and save w-1[2]= y[0] and w-1[3]= y[1]
  • 105. §5.10.2 Overlap-Save Method  General Case: Let h[n] be a length-N sequence  Let xm[n] denote the m-th section of an infinitely long sequence x[n] of length N and defined by xm[n]= x [n+m(N-m+1)], 0≤n≤N-1 with M<N
  • 106. §5.10.2 Overlap-Save Method  Then, we reject the first M-1 samples of wm[n] and “abut” the remaining N-M+1 samples of wm[n] to form yL[n], the linear convolution of h[n] and x[n]  If ym[n] denotes the saved portion of wm[n], i.e.  Let wm[n]=h[n] xm[n] N            2 1 , ] [ 2 0 , 0 ] [ N n M n w M n n y m m
  • 107. §5.10.2 Overlap-Save Method  Then yL [n+m(N-M+1)]=ym[n] , M-1≤n≤N-1  The approach is called overlap-save method since the input is segmented into overlapping sections and parts of the results of the circular convolutions are saved and abutted to determine the linear convolution result
  • 108. §5.10.2 Overlap-Save Method  Process is illustrated next