You are on page 1of 72

Chapter 02.

Discrete Fourier Transform:


Discrete Fourier Transform:
DTFT, Frequency Domain Sampling, Properties of DFT,
DIT-FFT algorithm, Spectral Analysis using FFT,
Linear FIR filtering using FFT based Overlap Save and
Overlap Add Method.

(Discrete Time Fourier Transform)


(Discrete Fourier Transform)
(Decimations in time fast Fourier Transform)
Conjugate of complex number imaginary
part is negated

Chapter 02
Dec 2011
6a/12/10 . x [n] = { 1, 2, 3, 4} and h [n] = {1, -1]}
Find linear convolution using circular convolution
June 2011
1. Find the DFT of the image
0121
1232
2343
1232

Perform circular convolution on the given


x1 (n) = { 1, 2, 3, 4} and x2 (n) = {4, 1, 1, 2}
x1(1)

x4(3)
x1(2)

x2(2)

x2(0)

2
x1(0)

x2(1)
x1(3)

1
4

Y(0) = 1.4 + 2.2 + 3.1 + 4.1 = 15


Y(1) = 1.1 + 2.4 + 3.2 + 4.1 = 19
Y(2) = 1.1 + 2.1 + 3.4 + 4.2 = 23
Y(3) = 1.2 + 2.1 + 3.1 + 4.4 = 23
Y (n) = { 15, 19, 23, 23}
3

Preliminary concepts
Complex numbers:
C=R+jI
C is complex number
R and I are real numbers
j is an imaginary number j = -1 or (j2 = -1)
R denotes real part and I imaginary part
Real numbers are subsets of complex numbers
where I is 0
Conjugate of complex number C * = R J I

(Definition)

Complex numbers are viewed geometrically as points in a Complex Plan


IWhose abscissa is the real axis (value of R)
ordinate Cis imaginary axis (value of I )

Complex number in polar coordinates:


R (cos + j sin )
C = |C|
|C| = (R2 + I2)
4
-1
= tan ( I / R)

Using Eulers formula,

= cos + j sin Where e = 2.71828 ( the base of natural algorithm)

Thus C = |C| e j

(Complex number in polar coordinates)

The polar representation of

1 + j2

is 3 e j

where = tan-1 2/1


= 1.1 radians,
2 radians =360
1 radian = 360 / 2
= 360 x 7 / 22 / 2. = 2520/44
= 57.3
= 22/7 = 3.141

series:

eriodic function can be expressed as the sum of sines and/ or c


ifferent frequencies, each multiplied by a different coefficient
sum is called

Fourier series

Transform:

n the functions that are not-periodic


but whose area under the curve is finite
can be expressed as the integrals of sines and/ or cosines
of different frequencies,
each multiplied by a weighing functions

he formulation in this case is called Fourier Transform


6

Important characteristics:
- A function can be expressed in either in
Fourier series or
Fourier Transform
The function can be reconstructed (recovered) completely
via an inverse process, with no loss of information
Fourier transformations allows us to work in the Fourier domain
and then return to the original domain
without loosing any information

The function at the bottom is the sum of the four functions above

Approximating a square wave as the sum of sine waves9

urier series
A function f (t) of a continuous variable t
that is periodic with period T,
can be expressed as the sum of sines and cosines
multiplied by appropriate coefficients.
f (t)

where t is variable, with a period T

f (t) = c n e
n=-
T/2
where c n = 1/T

+ j . 2 n / T

- T/2

.t
- j . 2 n/ T

f (t) e

for n = 0, 1, 2, . . .

. dt

are the weighing coefficien


10

Frequency Analysis of Signals and Systems


- The Fourier transform can be used for:
Analysis and design of LT I (Linear Time-Invariant) systems
- This involves decomposition of the signals in in terms of
sinusoidal (or Complex exponential) signals
- Such decomposed signals are said to be represented in
Frequency Domain
- For the class of periodic signals such a decomposition
into sinusoidal components is called a Fourier Series
- For the class of finite energy signals such a decomposition
into sinusoidal components is called a Fourier transform
(The signals that are not periodic, but the area
under the curve is finite)
11

Such decompositions of the signals are very important


for analysis and design of LTI systems: (Linear Time-Invariant)

- For a sinusoidal input signal to a LTI system,


The output is of the same frequency, but may differ in
Amplitude and phase
- The linearity property of LTI systems implies that:
A linear sum of sinusoidal components at the input, produces
a similar linear sum of sinusoidal components at the output
which differs only in:
the amplitudes and phases
from the input sinusoids

12

1-Dimensional Fourier transform


Let f (x) be a continuous function of x
The Fourier transform of f (x) is
-j2 ux

F (u) = f (x) e
. dx
where j =-1
-

= f (x) [ cos 2 u x j sin 2 u x] dx


f (x)
-
Given Fourier transform F (u),
the function f (x ) can be found out by
The Inverse Fourier transform:
+j2 ux

f (x) = F (u) e
.du
-

13

Because F (u) is complex,


F (u) = R (u) + j I (u)

(R real I imaginary)

Magnitude of F (u) = | F (u) | = [R2 (u) + I2(u)]


Phase

angle

I(u)
F (u) = tan-1
R ( u)

The plot of |F (u)| is called the magnitude plot or the Fourier spectrum
Power spectrum can also be plotted:
Power P (u) = | F (u) | 2 = [R2 (u) + I2(u)]

14

Find the Fourier transform of the signal


f (t)
A
x

F (u) =
-

Time

-j 2 u x
f (x) e

x
-j 2 u t
= Ae
.dt
0
A
x
-j 2 u t
= ----------- [e
- j2 u

]
0

A
-j 2 u x
= ---------- [ 1 - e
j2 u

.dx

-A
= ------- [e
j2 u

-j 2 u x

- 1]

]
15

A
= ---------

[e

+j u x

-j u x

-e

] e

21

-j u x

j 2 u
A
e = ----------u

+j u x

e
-----------------2j

+j u x

-j u x

.e

-j u x

A
= -------- . [ sin ( u x ) . e
u
sin ( u x )
F (u) = A ---------------u

]
-j u x

.[e

16

F (u) = A

sin ( u x )
---------------u

-j u x

.[e

Multiplying and dividing by x


sin ( u x ) -j u x
= A . x ------------------ [e
ux

Since the Fourier Transform F (u ) is complex:


The magnitude value of F (u )
sin ( u x )
-j u x
|F (u )| = |A . X| . | -------------------- | . | [e
ux
Because | [e j u x] | = | cos u x - j sin u x |
= (cos2 u x + sin 2 u x) = 1
sin ( u x )
|F (u )| = |A . X | . | ------------------- | . 1
ux

17

]|

sin 0
At u = 0 ;
|F (u)| = Ax -------0
But sin x
is indeterminate
x
In such a case L Hospitals rule is used,
Derivative of the numerator and the denominator is taken
with its limit tending to 0
d/dx sin x
Lim
x0

dx/dx

= lim cos x /1 = 1
x0

Thus |F (u)| = A . X .1 = A . x at u =0

Magnitude plot for different values of u


18
Since the original sequence is aperiodic, the spectrum
will be continuous

2-Dimensional Fourier Transform


Since images are 2-dimensional functions, 2D Fourier Transforms
are required for processing image signals
1D Fourier Transform equations can be easily extended to
a function, f (x, y) of two variables
Fourier Transform of the 2- D function f (x, y):
j2 (u x + v y)

F {f (x, y)} = F (u, v ) =

f (x, y) e.
dx dy
-
-
+j2 (u x + v y)
Inverse Fourier Transform of F (u, v)

F-1 { F (u, v)} = f (x, y) =

F (u, v) e
- -

Magnitude plot of F (u, v) = | R2(u,v) + I2(u,v)|1/2


Phase plot of F (u, v) is given by = tan-1 | I (u,v) / R (u,v)|
19

du dv

Find the Fourier Transform of the following function


z
A
y

x
x

Magnitude

sin( u x)
F (u, v) = A . x. y
ux

sin( v y)
.
vy

20


F (u, v) =
-
x

=
=

A
e
=A

f (x, y) e

y
A
0

j2 (u x + v y)

j2 (u x + v y)

dx dy

x j2 u x
e
dx
0
j2 u
x e

---------------j2 u

y
j2 v y
e
dy
0
x

j2 v y

---------------j2 v

j2 u
1 -e
x

1 -e
=A
-------------j2 u
e
=A

+j u x

dx dy

j u x

-e
-----------------------j2 u

j2 v y

-------------------j2 v
e
j u x
e

+j v y

j v y

-e
-------------------21
j2 v

j v y

F (u, v ) = A. x. y

sin( u x)
ux

e j u x

sin( v y)
vy

e j v y .

Because e j u x = (cos 2 u x + sin 2 u x) = 1


and
e j v y = (cos 2 v y + sin 2 v y) = 1

Therefore the magnitude

sin( u x)
F (u, v) = A. x. y
ux

sin( v y)
.
vy

22

2-D Fourier Transform

23

Since both the sequences 1-D and 2-D signals,


are aperiodic,

the Fourier spectrum is continuous


Continuous spectrum cannot be used
unless it is discretized
only by discretizing the continuous signal,
specific frequencies can be obtained
This is known as the Discrete Fourier Transform (DFT)

24

Discrete Fourier Transform (DFT)


- Continuous spectrum cannot be of used
unless it is discretized
- If the continuous signal is discretized,
specific frequencies in the signal can be obtained
- This is called Discrete Fourier Transform (DFT)
- The DFT is slight modification of Fourier transform
DFT of discrete time function, f (x) is given by:
N-1
F (u ) = f (x) e
x=0

-j2ux/N

for u = 0. 1, 2 . . . N-1

Where N is the number of samples of the input signal x (n)


25

Inverse Discrete Fourier Transform (IDFT) is given by:


N-1
f (x) = 1/N
u=0

F (u) e

+j2ux/N

; for x = 0, 1, 2 . . . , N-1

1/ N is the scaling function


(Here 1/N is used in IDFT formula,
some books prefer to write in forward DFT)
The values u = 0, 1, 2, . . .N-1 in DFT correspond to
the samples of the continuous spectrum

26

Similarly, a 2-D discrete Fourier Transform ( DFT) is

M-1

N-1
- j 2 (u x /M
F (u, v ) =

f (x, y) e
x=0 y=0

+ v y /N)

Where M, N is the number of samples of


the input 2-D signal
Inverse 2-Discrete Fourier Transform (IDFT) is given by:
M-1 N-1
f (x, y) = 1/MN

u = 0 v=0

+ j 2 (u x /M + v y /N)

F (u, v) e

1/ MN is the scaling function

27

Find the DFT of f (x) = { 0, 1, 2, 1}

DFT

N-1
F (u ) = f (x) e -j2 (u x / N)
x=0

[Here ( f(0)= 0, f(1)= 1, f(2)= 2, f(3)= 1)]

; for u = 0, 1, 2 . . . N-1

Here N = 4
4-1
so F (u ) = f (x) e -j2 (u x / 4) : for u = 0. 1, 2 . . (4 -1 = 3)
x=0
-j2 (u x / 4 )
3
Fourier Transform: F (u) = f (x) e
for u = 0 to 3
x=0
For u = 0 and x = 0 to 3
F(0) = [ f (0) e -j2 (0 . 0 / 4) + f (1) e -j2 (0 . 1 / 4) + f (2) e -j2 (0 . 2 / 4)
+ f (3) e -j2 (0
= [0. 1

. 3/ 4)

]
+1.1

+2.1

+ 1 . 1] = 4
28

For u = 1 and x = 0 to 3

F(1) = [ f (0) e -j2 (1 . 0 / 4) + f (1) e -j2 (1


+ f (3) e -j2 (1 . 3 / 4) ]
= [ f (0)
=[0

. 1 / 4)

+ f (2) e -j2 (1

. 2 / 4)

+ f (1) e -j2 / 4) + f (2) e -j2 /2) + f (3) e -j2 3/ 4) ]

+ 1. e -j / 2 + 2. e -j + 1. e -j 3/2 ]

=[ 0 + 1. (cos /2 j sin /2) + 2. (cos - jsin )


+ 1. (cos 6/4 - jsin 6/4) ]
= [ 0 + 1. (0 - j . 1)
=[0

-j

+ 2 ( -1 j . 0)

+ 1. ( 0

- j . -1)]
+ j ] = -2

29

Sin 0
= 0 cos 0 = 1
Sin /2 = 1 cos /2=0
Sin
= 0 cos = -1
Sin 3 /2 = -1 cos 3 /2 =0

e -j = sin - j cos
e -j 0 = sin 0 - j cos 0
e -j /2 = sin /2 - j cos /2
e -j = sin - j cos

(0 )
=1-0 = 1
(90 ) = 0 -j = - j
(180 ) = -1 0 = -1

e -j 3/2 = sin 3/2 - j cos 3/2

(270 ) = 0 +j = + j

e +j = sin + j cos
e +j 0 = sin 0 + j cos 0
(0 )
= 1 +0 = 1
e +j /2 = sin /2 + j cos /2 (90 ) = 0 +j = + j
e +j = sin + j cos
(180 ) = -1 0= -1
e +j 3/2 = sin 3/2 - j cos 3/2

(270 ) = 0 -j

=-j
30

For u = 2 and x = 0 to 3

F(2) = [ f (0) e -j 2 (2 . 0/ 4) + f (1) e -j 2 (2. 1/ 4) + f (2) e -j2 (2 . 2/ 4)


+ f (3) e -j2 (2. 3/ 4) ]
= [ f (0)

+ f (1) e -j

+ f (2) e -j 2

+ f (3) e -j 3 ]

= [ 0 + 1. (cos - jsin ) + 2. (cos 2- jsin 2) + 1. (cos 3- jsin 3) ]


= [ - 1 + 2 + -1] = 0

31

For u = 3 and x = 0 to 3

F(3) = [ f (0) e -j 2 (3 . 0/ 4) + f (1) e j2 (3. 1/ 4) + f (2) e -j2 (3 . 2/ 4)


+ f (3) e -j2 (3. 3/ 4) ]
= [ f (0)

+ f (1) e j6 / 4+ f (2) e -j 3

+ f (3) e -j 9 / 4 ]

= [ 0 + 1 ( Cos 6 / 4 j sin 6 / 4 ) + 2 ( Cos 3 j sin 3 ) +


( Cos 9 / 4 j sin9 / 4 ) ]
= [ 0 + -j -2 +j] = -2
F (u) = { 4, -2, 0 , -2}

DFT spectrum is by taking magnitude = { 4, 2, 0. 2}

Mag |F(u)|

F(u)
4

4
2

0
0 1 2 3
-2
-2

0
1 2 3

u
32

DFT: Matrix method


- Easy way to calculate DFT
- Input sequence is x (n)
- Output sequence X (k)
N-1
j .2 n k / N
DFT X (k) = x (n) e
n =0

where x (n) is input sequence

Twiddle Factor:
Let us define a new factor, WN, called Twiddle factor
j 2 / N

WN = e

or

= cos (2 /N) j sin (2 /N)

j 2. n k / N

W Nn k = e
Thus
N-1
DFT X (k) = x (n) WNn k
n =0
- To solve the above equation , let us form a matrix WN = N . N matrix
33
Thus DFT equation reduces to

Example: Find DFT of x (n) = { 0, 1, 2, 1}

Since N = 4, WN will be a 4 x4 matrix


j2 / N
Twiddle Factor WN = e
For N=4
j2 n k /4
nk
nk
WN = W4 = e
For n = 0 , k =0; W40.0 = e

=1

j2 .0.0/ 4

n =1, k =1 W41.1 = e j2 . 1. 1 / 4 = -j
n =2, k =1 W42.1 = e j2 . 2. 1 / 4 = -1
n =3, k =1 W43.1 = e j2 . 3. 1 / 4 = j
n =2, k =2 W42.2 = e j2 . 2. 2 / 4 = 1
n =3, k =2 W43.2= e j2 . 3. 2 / 4 = -1
n =3, k =3
W43.3= e j2 . 3. 3 / 4 = -j
2 3

W 4 nk
(n) 0
1
(k)
0
W40.0 W41.0 W42.0 W43.0
W4 =
2

W40.1 W41.1 W42.1 W43.1


W40.2 W41.2 W42.2 W42.3

1
=
1

-j

-1

-1

-1

DFT 34
matrix

WNnk = cos 2 (kn)/ N - j sin 2 (kn)/ N


WNnk = cos 2 (kn)/4 - j sin 2 (kn)/ 4
WNnk = cos 2 (0)/4 - j sin 2 (0)/ 4

for N =4
for N =4, for nk = 0

=1

WNnk = cos 2 (1)/4 - j sin 2 (1)/ 4

for N =4, for nk = 1

= -j

WNnk = cos 2 (2)/4 - j sin 2 (2)/ 4

for N =4, for nk = 2

= -1

WNnk = cos 2 (3)/4 - j sin 2 (3)/ 4

for N =4, for nk = 3

=j

WNnk = cos 2 (4)/4 - j sin 2 (4)/ 4

for N =4, for nk = 4

=1

WNnk = cos 2 (6)/4 - j sin 2 (6)/ 4

for N =4, for nk = 6

= -1

WNnk = cos 2 (9)/4 - j sin 2 (9)/ 4

for N =4, for nk = 9

35

= -j

X (k) = W4 . x (n)
X (0)
X (1)
X (2)
X (3)
X (0)
X (1)
X (2)
X (3)

1
=
1
1

1 1 1
1 -j -1
-1 1 -1
j -1 -j

1 1 1
=
1 -j -1
1 -1 1 -1
1 j -1 -j

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

x (0)
j x x (1)
x (2)
x (3)

0
x

j
2

1.0 +1.1 + 1.2 +1.1


4
1 = 1.0+ -j.1 + -1.2 + j.1 = -2
1.0 + -1.1 + 1.2 +-1.1
0
1.0 + j.1 + -1.2 + -j.1
-2

X (k) = { 4, -2, 0, -2}

36

Inverse Discrete Fourier Transform


x (n) the IDFT of the DFT X (k) is given by:
N-1
x (n) = 1/N

k=0

X (k) e

N-1
x (n) = 1/N

k=0

X (k) WN n k

+j 2 n k / N

1/ N is the scaling function


The Matrix form of IDFT:
x = 1/N . [W * X]

(W * Complex conjugate of W)

37

Find the inverse DFT


IDFT x (n)
Given DFT X [k] = { 4, -2, 0, -2}
Here N = 4

x =.

W 4*

1 1 1 1
4
x (n) = 1 j -1 -j x -2
1 -1 1 -1
0
1 -j -1 j
-2

0
8
4

0
= 4
2
1

x (n) = { 0, 1, 2, 1}
A* Complex conjugate is obtained from A by taking the

negative of their imaginary parts

38

Find the DFT of the given signal and also find


the inverse DFT of the result obtained
x (n) = { 11, 21, 3, 4}

N-1
DFT
X (k) =
x (n) e j
n =0

2 n k / N

N-1
DFT X (k) = x (n) WNn k
n =0
Matrix form: X = W. x
X(0)
X(1)
X(2)
X(3)

1 1
1 -j
1 -1
1 j

1 1
-1 j
1 -1
-1 -j

11
x 21
3
4

X (k) = { 39, 8-17j, -11, 8+17j}

where x (n) is input sequence

(WN nk = e j 2 / N

nk

1.11 +1.21 + 1.3 +1.4


39
= 1.11+ -j.21 + -1.3 + j.4 =
8 -17j
1.0 + -1.21 + 1.3 +-1.4
-11
1.0+ j.21 + -1.3 + -j.4
8 +17j

39

X (k) = { 39, 8-17j, -11, 8+17j}


Inverse DFT of X ( k )

N-1
IDFT x (n) = 1/N

X (k) e +j 2 nk / N
k=0
N-1
Matrix x = 1/N [W * X]
and N =4
x (0)
x (1) = 1/N
x (2)
x (2)

1 1 1 1
1 j -1 -j
1 -1 1 -1
1 -j -1 j

39
8 17j
-11
8 + 17j

1.39 + 1. (8-17j) + 1. -11 + 1. (8+ 17j)


39 +8 -11+8 = 44
= 1/4 x
1.39 + j. (8-17j) + -1. -11 + -j. (8+ 17j) =1/4 39 +17 +11+17 =84
1.39 + -1. (8-17j) + 1. -11 + -1. (8+ 17j) 39 -8 -11-8
= 12
1.39 + -j. (8-17j) + -1. -11 + j. (8+ 17j)
39 -17+11-17 =16

x (n) = { 11, 21, 3, 4}

40

The Fourier Spectrum


Meaning of Fourier Spectrum
Given x (n) = { 8, 2, 1, 5, 6, 2, 4, 3}
DFT of the signal x (n) is : X (k)
X (k) = {31, (0.58 + 1.58j), (9+4j), (3.41 + 4.4j), 7, (3.41 + 4.4 j), (9-4.4j), (0.58- 1.58j)}
Magnitude of |X (k) | = ( 31, 1.68, 9.84, 5.58, 7, 5.58,9.84, 1.68}

That means:
31
|X((k)|
7
9.84
9.84
5.58
5.58
1.68
0

1.68
2

DC 1KHz 2KHz 3Hz 4KHz 5KHz 6KHz 7KHz

If sampling frequency is 8 KHz,


DFT will split this frequency into 8 parts,
=1 KHz each
k = 0 is DC component, k= 1 is 1KHz, k = 2 is 2 KHz . . . .
DFT split x-axis into k. Fs / N ( k . 8 KHz/ 8) parts;
41
k = 0, 1, 2, . . . 7 (for 8-point DFT)

DFT Properties:
1.
2.
3.
4.
5.
6.
7.
8.

Linearity
Periodicity
Circular time shift property
Circular frequency shift
Complex conjugate property
Circular convolution
Multiplication of two sequences
Time reversal

Linearity:
If x1 (n)

DFT

X1 (k)

x2 (n)

DFT

X2 (k) then

a. x1(n) + b. x2(n)

DFT

and

a. X1 (k) + b. X2 (k)

42

Periodicity
If

x (n)

DFT

X (k)

then

DFT X (k + N )
= DFT
X (k)
The DFT is periodic with a period N
Circular shift of a sequence:
A periodic extension of a sequence x (n) can be written as:

x p (n) =
x (n - l . N)
Where N is the period
l=-
xp (n) = x ( (n) )N is the periodic extension of x (n)
here ( (n) )N denotes,
n modulo N
x (n) = x ( (n) )
p

x (n)

1 2
0 1 2 3

1
n

4
1 2

4
1

-4 -3 -2 -1 0 1 2 3 4 5 6 7

43

A simple way of visualizing a periodic signal x p (n) :


Imagine x (n) on a circle in the counter clockwise direction
x (n) = { 1, 2, 3, 4, 1, 2 . . )
x(1)
2
x(2) 3

x(n) 1 x(0)
4
x(3)

If we move around circle in counterclockwise direction se get


x(0), x(1), x(2), x(3), x(0), x(1), x(2), x(3), . . .

Therefore xp (n) = x [ n modulo N ] = xp ( (n) )N


( (n) )N denotes n modulo N

44

If we sift the periodic signal by say 2:

x (n) = { 1, 2, 3, 4, 1, 2 . . )

xp (n-2) = x ( (n-2) )N`


4
1 2

1 2

4
1

3
1

-6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7

x (2) 1

x (1)
4
x(n)

3 x (0)

2
x 3)
( (n) )N denotes n modulo N
x ( -3 modulo 4 ) = x( (-3) )4 = x (1)
x ( 11 modulo 4 ) = x( (11) )8 = x (3)

45

Shift in x (n) x (n m)

3. Circular time shift property


if

x (n) DFT

X (k)

Then x ( (n m ) )N

j2 k m / N

DFT e

. X ( k)

DFT of x (n m )N, x (n) delayed by m, modulo N


is DFT X (k ) . e - j2 k m / N
4. Circular frequency shift property
if
Then

x (n) DFT
x (n) e

Shift in frequency

X (k)
j2mn /N

DFT of { x (n) . e j 2 m n

DFT

/N

X ( (k m ) ) N

} is X ((k m )N

X ( k m )N is frequency shift
46

5. Complex conjugate property


if

x (n)

Then

DFT

x * (n)

X (k)

DFT X * (N - k) = X * ( (-k) )N
* Complex conjugate

6. Circular Convolution :
If x1(n)
DFT
X1(k)
x2(n)

DFT

DFT ( x1(n)

X2(k)
*
x2(n) )

and
then
X1(k) . X2(k)

Multiplication of two DFTs is equal to


circular convolution of their time domain representations
Means circular convolution
*
applied to periodic signals
Linear convolution y (n) = x (k) . h (n - k)
k = - to
47

+
Linear convolution y (n) = x (k) h (n - k)
k=-
Where x (n) is input signal
h (n) is impulse response
both non periodic
For periodic signals, the above formula cannot be used
It needs some changes
Let x1 (n) and x2 (n) be periodic signals
Let
DFT of x1(n) = X1(k)
DFT of x2(n) = X2 (k)
If X3 (k) = X1(k) . X2 (k) then
the IDFT of [X3 (k) )= x3 (n) will be
N-1
x3 (n) = x1 (m) . x2 (n - m)
m=0
Since x1, x2, and x3 are periodic with period N
N-1
x3 ((n))N =
x1 ((m))N . x2 ((n m))N
48
m=0

N-1
x3 (n) =

x1 (m). x2 ((n m))N As x3 ((n)) N = x3 (n) and


m=0
x1 ((m )) N = x1 (m)

x3 (n) = x1 (n )

x2 (n)

Therefore DFT [x1 (n )

x2 (n) ] = X1 (k ) . X2 (k)

49

7. Multiplication of two sequences:


If

x1(n)

DFT

X1 (k)

and

x2(n)

DFT

X2 (k)

then

x1(n). x2(n)

DFT

1/N [ X1 (k)

X2(k) ]

Circular convolution

9. Time Reversal
if

x (n) is periodic

Then
if

x ( (-n) )N
x (n )

= x (N-n)

for 0 n N-1

input signal

DFT X (k )

x (N - n )

DFT X (N - k )

x ( ( n ) )N DFT X ( N k )

or
50

Circular Convolution
Given two periodic signals x1 (n) and x2 (n)
Find circular convolution
y (n) = x1 (n) x2 (n )
(circular convolution)
Two methods:
1. Concentric circle method
2. Matrix multiplication method

51

Concentric Circle Method


Two periodic sequences : x1(n) and x2(n)
y (n) = x1 (n)

x2 (n)

1. Plot x1(n) evenly spaced along the outer circle in counterclockwise


direction

2. Plot x2(n) evenly spaced along the inner circle in clockwise direction,
such that x1(0) matches x2(0)

3. Multiply all the corresponding samples of x1(n) and x2(n)


to give y(0)

4. Rotate the inner circle in the direction of


the outer circle (counterclockwise)
one step and again multiply the corresponding samples to give y(1)

Repeat the above process to give y (2), y (3), . .

52

Perform circular convolution on the given:


x1(n) = { 1, 2, 3, 4} and x2(n) = { 4, 1, 1, 2}

x (1)
1

x4(3)
x1(2)

x2(2)

x2(0)

2
x1(0)

x2(1)
x1(3)

1
4

Y(0) = 1.4 + 2.2 + 3.1 + 4.1 = 15


Rotate the inner circle in the
direction of the outer circle

Y(1) = 1.1 + 2.4 + 3.2 + 4.1 = 19


Y(2) = 1.1 + 2.1 + 3.4 + 4.2 = 23
Y(3) = 1.2 + 2.1 + 3.1 + 4.4 = 23

y (n) = { 15, 19, 23, 23}

53

Matrix method
In this method circular matrix of x2 (n) is generated
it is multiplied by x1 (n )

y (0)

x2 (0)

x2 (N-1)

y (1)

x2 (1)

x2 (0)

y (2)

= x2 (2)
.
.
.
x2 (N-1)

x2 (1)

.
.
.
y (N-1)

x2 (N-2)
x2 (N-1)

x2 (0)
.
.
.
.
.
.
.
x2 (N-2)

. . . X2 (1)

x1 (0)

. . . X2 (2)
.. .

X2 (3)
.
.
.
. . . X2 (0)

54

and

x1 (1)
.

x1 (2)
.
.
.
x1 (N-1)

Matrix method:
In this a circular matrix of x2(n) is generated
and multiplied by x1(n)

x1(n) = { 1, 2, 3, 4}

y (n) = x1 (n)
x2 (n)
x2(n)
y (0)
4 2
y (1) =
1 4
y (2)
1 1
y (3)
2 1

x1(n)
x
1 1
2 1
4 2
1 4

and

1
2
3
4

x2(n) = { 4, 1, 1, 2}

4 + 4 + 3 +4 = 15
= 1+ 8 + 6 +4 = 19
1 + 2 + 12 +8 = 23
2 + 2 + 3 +16 = 23

y (n) = { 15, 19, 23, 23}

55

Use the four point DFT and IDFT to determine the circular convolution
of the sequences
x1 (n) = { 1, 2, 3, 1}
x2 (n) = { 4, 3, 2, 2}

Circular convolution property


x1 (n) x2 (n) DFT X1 (k) . X2 (k)
(Find DFT of both
First find X1 (k ) and X2 (k )
and multiply)
Matrix X1 =

WN

X1 (0)

1 1 1 1 1

X2 (1)

1 -j -1

X1 (2)
X1 (3)

x1

j 2
.
1 -1 1 -1 3
1 j -1 -j 1

Therefore
Similarly

X1 (k) = { 7, -2 -j,

1,

X2 (k) = { 11, 2 -j, 1,

Multiplying X1( k) and X2 (k) = { 77,

5 , 1,

-2 +j }
2 +j }
-5 }

56

Find the DFT of the given sequence x (n) = { 1, 2, 3, 4 }


using the result obtained find DFT of

the given sequence x1(n) = { 1, 4, 3, 2 }


(x1(n) is x (n))

DFT of x (n)
Matrix X = W N nk . x
X (0)
X (1)
X (2)
X (3)

1 1 1 1 1
=

1 -j -1 j

1 -1 1 -1 3
1 j 1 -j 4

Therefore

X (k) = { 10, (-2 +2j), -2, ( -2 -2j) }

Now x (n ) = { 4, 3, 2, 1} since
it is periodic = { 4, 3, 2, 1, 4, 3, 2 } = { 1, 4, 3, 2 }

it is = x1 (n)
x ( n )

DFT

X (-k ) = { 10,

X (-k ) = {(-2 -2j), -2,( -2+2j), 10 )

(-2-2j), -2, ( -2 + 2j )} is the DFT of x1 (n)

57

END

58

Properties of 2D discrete Fourier Transfrom


1 Separability property
2 Translation property (Shifting property )
3 - Periodicity and conjugate symmetry property
4 - Rotational property
5 Distributivity and scaling property
6 - Average value property
7 Lapalacian property (Second Derivative)
8- Convolution property

59

eparability Property of 2-D DFT

The 2-D DFT can be computed by


computing, 1-D DFT Transforms along the rows (columns) of the image,
followed by , 1-D transforms along the columns (rows) of the result
Translation property (Shifting property )

+j2 (u0. x + v0 . y)/N

f f (x, y) is multiplied by an exponential e


the original Fourier transform F (u, v ) gets shifted in frequency by
F (u - u0, v - v0 )

+j2 (u0. x + v0 . y)/N

f (x, y) e

FT

F (u - u0, v - v0 )

60

3 - Periodicity property and conjugate symmetry


F (u) = F (u + N)

|F (u)| = |F (u + N)|

Fourier transform is also symmetric


F (u) = F * (-u)
|F (u)| = |F * (-u)|
4 Distributivity and scaling property
F[ f1 (x, y) + f2 (x, y) } = F[ f1 (x, y)] + F[ f2(x, y)]
and

F[ f1 (x, y) - f2 (x, y) ] F[ f1 (x, y)] - F[ f2 (x, y)]

61

Explain the separability property of DFT


Separability Property of 2-D DFT
The 2-D DFT can be computed by,
computing1-D DFT Transforms along the rows (columns) of the
image,
followed by 1-D transforms along the columns (rows) of the
result
A 2-D DFT can be separated into two 1-D DFTs:

62

A 2-D discrete Fourier Transform ( DFT) is


M-1 N-1
- j 2 (ux /M + vy /N)
F (u, v ) =

f (x, y) e
;
x=0 y=0
Where M, N is the number of samples of
the input 2-D signal
This can split up as :
M-1
N-1
- j 2 (ux /M)
F (u, v ) =
e
.

f (x, y) e

x=0
y=0
N-1
- j 2 (vy /N)
Let F (x, v ) =
f (x, y) e
y=0
- j 2 (ux /M)
M-1
Therefore F (u, v ) =
F (x, v) e
x=0
63

- j 2 (vy /N)

N-1
F (x, v ) =
f (x, y) e -j2 v y/N
y=0
For each value of x and for v = 0, 1, 2, . . , N-1
F (x, v) is simply 1-D DFT of a row of

f (x, y)

- By varying x from 0 to M-1 in the above equation


1-D DFTs of all rows of f (x, y) are computed
Similarly

M-1
In F (u, v ) =
x=0

F (x, v) e - j 2 u x / M

F (u, v) are 1-D transformations of the columns of F (x, v)


Thus we conclude that the 2-D DFT of

f (x, y)

can be obtained by 1-D transformation of each row of f (x, y)


64

(0,0)

N-1
y
f (x, y
Row
transformation

(0,0)
v
F (x, v)

(0,0)
y
F (u,v)

Column
transformation
x

65

Find DFT of the image 0 1 2 1


using separable property
1 2 3 2
2 3 4 3
1 2 3 2
W4 =
1 1 1 1
1 j -1 j
1 -1 1 -1
DFT of 1st Row 0 1 2 1
1 j -1 -j
= [W4] . 0
= 4
1 -2
2 0
1 -2
DFT of 2nd row 1 2 3 2
=[W4] . 1 = 8
2 -2
3 0
2 -2
DFT of 3rd row
= 12
-2
0
Partial result
-2
4 -2 0 -2
DFT of 4th row
8
8 -2 0 -2
-2
12 -2 0 -2
66
0
8 -2 0 -2

Partial result
4 -2 0 -2
8 -2 0 -2
12 -2 0 -2
8 -2 0 -2
DFT of 1st column=W4 . 4
8 -8
12 0
8 -8

32

DFT of 2nd column=W4 . -2


-2 0
-2 0
-2 0

-8

DFT of 3rd column=W4 . 0 0


0 0
0 0
0 0
Final result
DFT of 4th column=W4 . -2 -8
32 -8 0 -8
-2 0
-8 0 0 0
-2 0
0 0 0 0
67
-2 0
-8 0 0 0

+
Linear convolution y (n) = x (k) h (n - k)
k=-
Where x (n) is input signal
h (n) is impulse response
both non periodic
For periodic signals, the above formula cannot be used
It needs some changes
Let x1 (n) and x2 (n) be periodic signals
Let
DFT of x1(n) = X1(k)
DFT of x2(n) = X2 (k)
If X3 (k) = X1(k) . X2 (k) then
the IDFT of [X3 (k) ]= x3 (n) will be
N-1
x3 (n) =
x1 (m) . x2 (n - m)
m=0
Since x1, x2, and x3 are periodic with period N
N-1
x3 ((n))N =
x1 ((m))N . x2 ((n m))N
68
m=0

N-1
x3 (n) =

x1 (m). x2 ((n m))N As x3 ((n)) N = x3 (n) and


m=0
x1 ((m )) N = x1 (m)

x3 (n) = x1 (n )

x2 (n)

Therefore DFT [x1 (n )

x2 (n) ] = X1 (k ) . X2 (k)

Find linear convolution using circular convolution


if x (n) = { 1, 2, 3, 4} and h (n) = 1, -1}
To find linear convolution by circular convolution,
Select period N [(length of x (n) + length of h (n) -1]: 4 +2 -1 = 5
Let N be 6
x (n) = { 1, 2, 3, 4, 0, 0}
h (n) = { 1, -1, 0, 0, 0, 0}
N-1
y (n) = x (m). h (n m)
m=0
We can use mathematical formula OR graphically or matrix
69 multiplication

Using Matrix method


In this method circular matrix of x2 (n) is generated
it is multiplied by x1 (n )

y (0)

x2 (0)

x2 (N-1)

y (1)

x2 (1)

x2 (0)

y (2)

= x2 (2)
.
.
.
x2 (N-1)

x2 (1)

.
.
.
y (N-1)

x2 (N-2)
x2 (N-1)

x2 (0)
.
.
.
.
.
.
.
x2 (N-2)

. . . X2 (1)

x1 (0)

. . . X2 (2)
.. .

X2 (3)
.
.
.
. . . X2 (0)

70

and

x1 (1)
.

x1 (2)
.
.
.
x1 (N-1)

x (n) = { 1, 2, 3, 4, 0, 0}
h (n) = { 1, -1, 0, 0, 0, 0}
Y (n)

Y (0)
Y (1)
Y (2)
Y (3)
Y (4)
Y (5)

Circular matrix of h (n) .

1
-1
0
0
0
0

0
1
-1
0
0
0

0 0 0
0 0 0
1 0 0
-1 1 0
0 -1 1
0 0 -1

-1
0
0 .
0
0
1

x (n)
1
2
3
4
0
0

1
1
=
1
-4
0

Y = { 1, 1, 1, 1, -4, 0}

71

72

You might also like