Professional Documents
Culture Documents
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
For education purpose. Commercialization of this material is strictly not allowed without permission from author.
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
Properties of the Fourier Transform for DTS Frequency domain characteristics of LTI systems LTI system as a frequency selective filter Inverse systems and de-convolution
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
e-TECHNote
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
Fourier Series
Fourier series for continuous-time periodic signal 1 j 2 kF t
x (t ) =
where
Ck =
k =
Tp
x(t )e
j 2kF0t
dt
Tp
Tp
Continuous time variable t Discrete frequency variable k Signal to be analyzed has to be periodic
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
Fourier Transform
x(t ) =
X ( F )e
dF
X (F ) =
x (t ) e
j 2Ft
dt
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
x(t ) = lim xT (t )
T
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
DTFS
Fourier series for discrete-time periodic signal
x(n ) =
N 1
C ke
j 2 kn N
where
k=0
1 Ck = N
N 1
x ( n )e
j 2 kn N
n=0
Discrete time variable t Discrete frequency variable k Signal to be analyzed has to be periodic
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
DTFT
1 x ( n) = 2
Tp
X ( )e
X ( ) =
n =
x ( n ) e jwn
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
10
Dirichlet Conditions
To exist Fourier transform of the signal, it should satisfy Dirichlet Conditions 1. The signal has finite number of discontinuities 2. It has finite number of maxima and minima 3. The signal should be absolutely integral i.e.
x ( t ) dt
<
or
n =
x ( n ) dt
<
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
11
Problem(1)
Obtain exponential Fourier series for the waveform shown in fig
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
12
Solution (1)
As per Fourier series
5 0 t 2
2
1 T0
2
T0
x ( t )e
jk 0 t
dt
T0 = 2
x (t ) =
for 0 wt 2
1 Ck = T0
5
5 2
0te
jkw0t
jkw0t
dw0t
2
1 5 Ck = 2 2
e ( jkw0t 1) = 2 2 ( 2 ) ( jk ) 0
5 Ck = j 2k
13
Problem (2)
Obtain Fourier transform for the gate function ( rectangular pulse) as shown in fig
f (t ) = 1,
=0
T 2
t T 2
otherwise
-T/2
T/2
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
14
Solution (2)
We know
F ( w) =
T /2
f (t )e jwt dt
dt
e = jw T / 2
jwt T / 2
1.e
jwt
T / 2
1 = e jwT / 2 e jwT / 2 jw
Amplitude
Phase
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
15
Problem (3)
A finite duration sequence of Length L is given as
x( n) = 1,
=0
0 n L 1
otherwise
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
16
Solution (3)
The Fourier transform (DTFT) is given by
X ( ) = =
n = L 1 n=0
x ( n ) e jwn 1 .e
jwn
=
n
L 1
( e jw ) n
n=0
1 e jwL X ( ) = 1 e jw
17
Contd..
DFT of x(n) can be obtained by sampling X(w) at N equally spaced frequencies
2k wk = N 1 e j 2kL / N X (k ) = 1 e j 2k / N
If N=L,
k = 0,1,.......N 1
k = 0,1,.......N 1
X ( k ) = L,
K =0
=0
K = 1,2.......L 1
If N>L, computational point of view sequence x(n) is extended by appending N-L zeroes(zero padding). DFT would approach to DTFT as no of points in DFT tends to infinity
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
18
xs (t ) = x(t ) gT (t )................(1)
Where gT(t) continuous train of pulse with period T (sampling period)
1 samplingfrequency( f s ) = samplingperiod (T )
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
19
Contd..
The Fourier series of periodic signal gT(t) can be given as
g (t ) =
n =
C ne
j 2 nf s t
.......... ........( 2 )
Where
1 j 2nf s t Cn = dt / 2g (t )e T T
T /2
x(t) t
x s (t ) = x (t ) =
n =
C ne
j 2 nf s t
gT(t)
n =
C n x (t ) e
j 2 nf s t
.......... .........( 3 )
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
20
Contd..
Taking Fourier transform of xs(t), we get
Xs( f ) = =
xs (t )e j 2ft dt
C x(t )e
n
j 2nf s t j 2ft
dt
n =
Interchanging the order of integration and summation , we get j 2 ( f nf s ) t n n =
C
n
x(t )e
s
dt
By definition
Xs( f ) =
10/6/2009
C X ( f nf )
n =
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
21
Contd..
Thus, spectrum of sampled signal is the spectrum of x(t) plus the spectrum of x(t) translated to each harmonic fo the sampling frequency as shown in figure X(f)
-fh
fh
Xs(f)
-fs
-fs+fh
-fh
fh
fs-fh
fs
fs+fh 2fs-fh
2fs
2fs+fh
There are three cases when sampling frequency fs is compared with highest frequency present in original signal
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
22
Contd..
Case I: fs > 2fh In this case all spectrums would be isolated from each other . This leads to proper reconstruction of original signal Case II: fs = 2fh Xs(f)
-fs
-fs+fh
-fh
fh
fs-fh
fs
fs+fh 2fs-fh
2fs
2fs+fh
-2fs
-fs
-fh
fh
fs
2fs
Overlapping of spectrum causes aliasing effect which distorts in reconstruction of original signal
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
23
DFT
DTFT has continuous frequency domain variable which makes impossible to store X(w) with digital device. Thus continuous frequency variable (f or w) from DTFT is sampled to get discrete frequencies (wk). DTFT calculated for discrete frequencies (wk) is called as Discrete Fourier Transform 2k N-points in time wk = domain will give N
DFT
X (k ) =
Inverse DFT ( IDFT)
N 1
x ( n ) e j 2 kn / N
n=0
k = 0,1,.......N 1
1 x(n) = N
10/6/2009
N 1
X (k )e
j 2 kn / N
n = 0,1,.......N 1
k =0
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
24
Physical Significance
Signal to be analyzed is 64 points in length x(n) analog discrete
0 -0 . 1 -0 . 2 -0 . 3 -0 . 4 -0 . 5
-0.5
10
20
30
40
50
60
70
10
20
30
40
50
60
70
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
25
k=0
2nk N
= cos(2nk / N ) + j sin(2nk / N )
SINE SEQUENCE 1 0.5 Amplitude
0.5 0.4 0.3 0.2 0.1 0 -0. 1 -0. 2 -0. 3 -0. 4 -0. 5
0 -0.5 -1
Im{X(0)}
0 10 20 40 n COSINE SEQUENCE 30 50 60 70
10
20
30
40
50
60
70
Amplitude
0.5
Re{X(0)}
0 10 20 30 n 40 50 60 70
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
26
k=1
2nk N
0.5
Im{X(1)}
10
20
40 n COSINE SEQUENCE
30
50
60
70
1
0 10 20 30 40 50 60 70
Re{X(1)}
0 10 20 30 n 40 50 60 70
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
27
k=2
2nk N
= cos(2nk / N ) + j sin(2nk / N )
SINE SEQUENCE 1 0.5 Amplitude 0 -0.5 -1
Im{X(2)}
0 10 20 40 n COSINE SEQUENCE 30 50 60 70
1 0.5
0 10 20 30 40 50 60
-0. 5
Amplitude
-0. 4
70
-0.5 -1
10
20
30 n
40
50
60
70
Re{X(2)}
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
28
k=3
2nk N
= cos(2nk / N ) + j sin(2nk / N )
SINE SEQUENCE 1 0.5 Amplitude 0 -0.5 -1
0.5 0.4 0.3 0.2 0.1 0 -0. 1 -0. 2 -0. 3 -0. 4 -0. 5
Im{X(3)}
0 10 20 40 n COSINE SEQUENCE 30 50 60 70
1 0.5
0 10 20 30 40 50 60 70
Amplitude
0 -0.5 -1
Re{X(3)}
0 10 20 30 n 40 50 60 70
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
29
k=31
2nk N
= cos(2nk / N ) + j sin(2nk / N )
SINE SEQUENCE
1 0.5 0 -0.5 -1
Amplitude
Amplitude
-1
10
20
10
20
30
40
50
60
70
n COSINE SEQUENCE 1
40 n COSINE SEQUENCE
30
50
60
70
Amplitude
0.5 0 -0.5 -1
10
20
30 n
40
50
60
70
10
20
30 n
40
50
60
70
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
30
No of analysis vectors
2/3
2/3
Inner Product
Inner Product
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
31
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
32
2D Fourier Transform
2D FT basis images for 8x8
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
33
Problem(1)
Find the 6-point DFT of the sequence x(n)= cos(n/6)
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
34
Solution(1)
N=6 x(n) = [cos(0), cos( / 6), cos( / 3), cos( / 2), cos(2 / 3), cos(5 / 6)]
X (k ) = X (0 ) =
N 1
x ( n ) e j 2 kn / N x (n )e =
0
k = 0,1,.......N 1
n=0 5
n=0 5
n=0
x(n)
= 1 + 0 . 86 + 0 . 5 + 0 + ( 0 . 5 ) + ( 0 . 86 )
=1
For k=1
X (1 ) =
n=0
x ( n ) e j n / 3
= x ( 0 ) e 0 + x (1) e j / 3 + x ( 2 ) e j 2 / 3 + x ( 3 ) e j + x ( 4 ) e j 4 / 3 + x ( 5 ) e j 5 / 3
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
35
Contd..
= 1 + 0 . 86 ( 0 . 5 + j 0 . 86 ) + 0 . 5 ( 0 . 5 + j 0 . 86 ) + ( 1 ) + ( 0 . 5 )( 0 . 5 j 0 . 86 ) + ( 0 . 86 )( 0 . 5 j 0 . 86 )
X (1) = 1 + j 2 . 34
Similarly, calculate X(2)---X(5)
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
36
Problem(2)
Calculate DFT of x(n)= {1 2 2 1}. From calculated DFT of x(n), determine x(n) again using IDFT. Verify your answer.
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
37
Solution(2)
N=4
x(n) = {1 2 2 2}
X (k ) = X (0 ) =
N 1
x ( n ) e j 2 kn / N x (n )e =
0
k = 0,1,.......N 1
n=0 3
n=0
n=0
x(n)
= 1+ 2 + 2 +1 = 6
For k=1
X (1 ) =
n=0
x ( n ) e j n / 4
= x ( 0 ) e 0 + x (1) e j / 4 + x ( 2 ) e j / 2 + x (3 ) e j 3 / 4
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
38
Contd..
= x ( 0 ) e 0 + x (1) e j / 2 + x ( 2 ) e j + x ( 3 ) e j 3 / 2 = 1 + 2 .( j ) + 2 .( 1) + 1 . j
X (1) = 1 j
Similarly, calculate X(2) & X(3) Then use IDFT to calculate x(n)
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
39
Twiddle Factors
Twiddle Factor
WN = e
j 2N l
j 2N 0
j 2N
W 43
WN = e WN
0
WN WN
( ) =e = (e ) = 1 = (e ) = e = (e ) = e
j 2N 1 j 2N 2
j 2N l
W 42
For N=4
W 40
j 2N
W 41 W 86 W 85 W 87
j 4N
W 84
For N=8
W 80
So on.
W 83 W 82
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
W 81
40
10/6/2009
Contd..
W4 = W
Proof:
mod 4 ( 5 ) 4
=W
1 4
W4 = e
( ) =e
j 24 5
j 10 4
=e =W
j ( 2 + 1 ) 2
j 24
=e
j 2
.e
j 1 2
= 1.e
1 4
=e
j 2 .1 4
Q WN = e
j 2N l
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
41
Contd..
W8 = W
Proof:
3 4
W8 = e
( ) =e
j 28 6
j 12 8
=e
j 64
=e
l
j 2 .3 4
j 2N l
=W
W8 = W82
Proof:
3 4
Q WN = e
W8 = e
( ) =e
j 28 6
j 12 8
=e
4 j (1+ 8 )
=e e
j 2N l
j 48
= (1)W = W
10/6/2009
2 8
Q WN = e
2 8
42
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
X (k ) =
and
N 1
x ( n ) e j 2 kn / N
j 2N
k = 0,1,.......N 1
n=0
WN = e
X (k ) =
In matrix form
N 1
x ( n )W N
kn
k = 0,1,.......N 1
n=0
[ X ] = [W Nkn ][ x ]
X ( 0 ) W 40 X (1) 0 = W 4 X ( 2 ) W 40 0 X ( 3 ) W 4 W 40 W 41 W 42 W 43 W 40 W 42 W 44 W 46 W 40 x ( 0 ) W 43 x (1) W 46 x ( 2 ) 9 W 4 x (3)
43
4-point DFT
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
Contd..
X ( 0 ) W 40 X (1) 0 = W 4 X ( 2 ) W 40 0 X ( 3 ) W 4 X ( 0 ) W 40 X (1) 0 = W 4 X ( 2 ) W 40 0 X ( 3 ) W 4 W 40 W 41 W 42 W 43 W 40 W 41 W 40 W 41 W 40 W 42 W 40 W 42 W 40 W 40 W 40 W 40 W 40 x ( 0 ) 3 W 4 x (1) W 42 x ( 2 ) 1 W 4 x (3) W 40 x ( 0 ) W 41 x (1) W 40 x ( 2 ) 1 W 4 x (3)
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
44
Problems
Calculate DFT of x(n)= {1 2 2 1} & x(n)={ 0 1 2 3 } by using matrix method.
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
45
Solution(1)
x(n)= {1 2 2 1}
X ( 0 ) W 40 X (1) 0 = W 4 X ( 2 ) W 40 0 X ( 3 ) W 4
W 40 W 41 W 42 W 43
W 40 W 42 W 40 W 42
W 40 x ( 0 ) 3 W 4 x (1) W 42 x ( 2 ) 1 W 4 x (3)
W43 = j
W42 = 1
W40 = 1
W41 = j
X ( 0 ) 1 X (1) 1 = X ( 2 ) 1 X ( 3 ) 1
1 j 1 j
1 1 1 1
1 1 j 2 1 2 j 1
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
46
Solution(2)
x(n)={ 0 1 2 3 }
X ( 0 ) W 40 X (1) 0 = W 4 X ( 2 ) W 40 0 X ( 3 ) W 4
W 40 W 41 W 42 W 43
W 40 W 42 W 40 W 42
W 40 x ( 0 ) 3 W 4 x (1) W 42 x ( 2 ) 1 W 4 x (3)
W43 = j
W42 = 1
W40 = 1
W41 = j
X ( 0 ) 1 X (1) 1 = X ( 2 ) 1 X ( 3 ) 1
1 j 1 j
1 1 1 1
1 0 j 1 1 2 j 3
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
47
W21
W20
x(1) W
1 2
X(1)
x(0)
1
X(0)
x(1)
X(1)
x(0)
X(0)
x(1)
1
X(1)
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
48
Contd..
W43
4-point DFT
W42 W40
W41
X(0)
x(2) W
2 4
X(1) W41
x(1) W W
0 4 2 4
X(2)
x(3) W
2 4
X(3) W
3 4
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
49
Contd..
W43 = j
4-point DFT
W42 = 1 W40 = 1
W41 = j
x(0)
1
X(0)
x(2)
1
X(1)
x(1)
1
X(2)
x(3)
1
j
X(3)
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
50
Problems
Calculate DFT of x(n)= {1 2 2 1} & x(n)={ 0 1 2 3 } by FFT flow diagram
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
51
Solution (1)
x(n)= {1 2 2 1}
1+2=3 x(0)=1
1
3+3=6 X(0)=6
1-2=-1 x(2)=2
1
-1-j1=-1-j X(1)=-1+j
j
2+1=3 3-3=0 X(2)=0
1
x(1)=2
2-1=1 x(3)=1
1
-1+j1=-1+j X(3)=-1+j
10/6/2009
52
Solution(2)
x(n)= {0 1 2 3 }
0+2=2 x(0)=0
1
2+4=6 X(0)=6
0-2=-2 x(2)=2
1
-2+j2 X(1)=-2+j2
j
1+3=4 2-4=-2 X(2)=-2
1
x(1)=1
1-3=-2 x(3)=3
1
-2-j2 X(3)=-2-j2
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
53
Shuffled sequence
The input sequence placement at FFT flow graph is not in order but in shuffled order. Perfect shuffling can be obtained by using bit reversal algorithm. ( to be used in FFT implementation) 2 point FFT
0 1 0 1 0 1 2 3
4 point FFT
0 1 2 3 0 2 1 3 0 1 2 3 4 5 6 7
8 point FFT
0 1 2 3 4 5 6 7 0 4 1 5 2 3 6 7 0 4 2 6 1 5 3 7
54
8 point FFT 000 001 010 011 100 101 110 111 000 100 010 110 001 101 011 111 0 4 2 6 1 5 3 7
0 1
6 7
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
55
W80
W80
X(0)
x(4)
X(1)
W
4 8
2 8
1 8
x(2)
X(2)
W80
W84
W82
x(6)
W
x(1)
4 8
W86 W84
W
0 8
W83
X(3)
X(4)
W80
x(5)
4 8
2 8
W85
X(5)
x(3)
W80
X(6)
W84
W86
x(7)
W84
W86
W87
X(7)
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
56
Contd..
= j
W 86
W 87
= 0.707 + j 0.707
W 80
=1
W 82
W 81
= 0.707 j 0.707
=j
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
57
Problem
Calculate DFT of x(n)= {1 2 2 1 0 1 2 3 } by FFT flow diagram
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
58
x(n)= {1 2 2 1 0 1 2 3 }
1+0=1 x(0)=1 1+4=5 X(0)=5+7=12
1
1-0=1 x(4)=0 1-0=1
1
X (1) = 1 + (0.707 j 0.707)(1 + j 2) = 1 + 2.121 + j 0.707 = 3.121 + j 0.707
0.707 j 0.707
1
2+2=4
j
1-4=-3
X(2)=-3+j
x(2)=2
1
2-2=0 1+0=1
j
X (3) = 1 + (0.707 j 0.707)(1 j 2) = 1 2.121 + j 0.707 = 1.121 + j 0.707
0.707 j 0.707
x(6)=2
1
2+1=3 x(1)=2
j
3+4=7
X(4)=5-7=-2
1 X (5) = 1 + (0.707 + j 0.707)(1 + j 2)
1
2-1=1 x(5)=1 1+j2
1
1+3=4
j
3-4=-1
X(6)=-3-j
x(3)=1
1
1-3=-2 1-j2
j
X (7) = 1 + (0.707 + j 0.707)(1 j 2) = 1 + 2.121 j 0.707 = 3.121 j 0.707
0.707 + j 0.707
x(7)=3
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
59
Properties of DFT
1) Periodicity If x[n] X(k) , and x[n] is periodic such that Then, x[n+N]=x[n] for all n for all k
X[k+N] = X(k)
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
60
2) Linearity
If and
x1[n] X 1[k ]
DFT x2 [n] X 2 [k ]
DFT
DFT
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
61
Problem
a) Find the DFT of x1(n)={ 0 1 2 3} and x2(n)= { 1 2 2 1}. b) Calculate the DFT of x3(n)={ 2 5 6 5} using results obtained in a) otherwise not.
62
x(1)=2
x(n)
x(0)=1
x(3)=4 x(2)=3
x((n+1))4
x(1)=2
x(0)=1 x(0)=3
x((n-1))4
x(3)=4
x(2)=3
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
10/6/2009
63
Contd..
x(3)=4 x(0)=3
x(0)=1
x((n+2))4
x(2)=3
x(1)=2
x((n+3))4
x(3)=4
X(1)=2
x(2)=1
x(3)=4
x(2)=3
x(0)=1
x((n-2))4
x(2)=3
x(3)=4
x((n-3))4
x(1)=2
x(1)=2
x(0)=1
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
64
Contd..
Circular shift property If then
DFT x[n] X [k ]
x((n l )) N X [k ].e
DFT
j 2 kl N
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
65
Problem
If x(n)= { 1 2 3 4} ,find X(k). Also using this result find the DFT of h(n)={ 3 4 1 2}.
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
66
Solution
x(n)= { 1 2 3 4} h(n)={ 3 4 1 2} Circular shift DFT property
X (k ) = {10,2 + j 2,2,2 j 2}
x(n) = h((n-2))4
x((n l )) N X [k ].e
l=2
DFT
DFT
j 2 kl N
j 2 4k 2
= {1 1 1 1}
H ( k ) = {10,2 j 2,2,2 + j 2}
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
67
4) Time Reversal
If then
x[n] X [k ]
DFT x(( n)) N = x( N n) X ((k )) N = X ( N k )
DFT
i.e. reversing the N-point sequence in time domain is equivalent to reversing the DFT sequence
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
68
Problem
If x(n)= { 1 2 3 4} ,find X(k). Also using this result find the DFT of h(n)={ 1 4 3 2}. Verify your answer with DFT calculation
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
69
x ( n )e
j 2 nl N
X ((k l )) N
DFT
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
70
Problem
If x(n)= { 1 2 3 4} ,find X(k). Also using this result find the DFT of h(n)={ 1 -2 3 -4}. Verify your answer with DFT calculation
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
71
6) Symmetry properties
e o x(n) = xR (n) + xR (n) + jxIe ( n) + jx Io ( n)
e o X (k ) = X R (k ) + X R (k ) + jX Ie (k ) + jX Io (k )
DFT Re al , Even Re al , Even
DFT Im aginary , Even Im aginary , Even
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
72
Problems
Find DFT for followings
a ) X (k ) = {11 1 1 5 1 1}
c) X (k ) = {0 j 9.65
j 4 j1.65 0
j1.65 j 4
j 9.65}
j 2}
j1.828 j 3 j1.828 j 3 j 3.828}
d ) X (k ) = { j 21 j 3.82 j 3
e) x ( n) = { j
j2
j3
j4
j j 4 j3 j 2}
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
73
7)Parsevals Relation
1 N 1 | x ( n ) | 2 = | X ( k ) |2 N k =0 n=0
N 1
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
74
Problem
1) x(n)= {1 2 3 1}. Prove parsevals relation for this sequence and its DFT . 2) Determine the missing value from following sequence x(n)= { 1 3 _ 2 } if its DFT is X(k)={ 8 -1-j -2 -1+j}
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
75
8) Circular Convolution
If and
x1[n] X 1[k ]
DFT x2 [n] X 2 [k ]
DFT
then
DFT x1[n] x2 [n] X 1[k ]. X 2 [k ]
where
N 1
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
76
x(2)=2
x1(n)
x(0)=2
x(2)=3
x2(n)
x(0)=1
x(3)=1
x(3)=4 4
x2(3)=4
x2(2)=3
x2((-n))
x2(0)=1
x1(n)x2((-n))
x3(0)=2+4+6+2 = 14
x2(1)=2
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
77
Contd..
x2(3)=4
x2(0)=1
x2((1-n))
x2(1)=2
x1(n)x2((1-n))
x3(1)=4+1+8+3 = 16
x2(2)=3 x2(1)=2
3 2
x2(0)=1
x2((2-n))
x2(2)=3
x1(n)x2((2-n))
x3(2)=6+2+2+4 = 14
x2(3)=4 x2(2)=3
4 3
x2(1)=2
x2((3-n))
x2(3)=4
x1(n)x2((3-n))
x3(3)=8+3+4+1 = 16
x2(0)=1
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
78
Problem
Find the circular convolution of sequences x1(n)={2 1 2 1} and x2(n)={1 2 3 4 } using DFT .
Steps: 1. Find DFT of both sequences 2. Multiply both DFTs 3. Take inverse DFT of product ( DFT product IDFT )
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
79
Contd..
x1(n)= {2 1 2 1}
2+2=4 x1(0)=2
1
4+2=6 X(0)=6
2-2=0 x1(2)=2
1
0-0=0 X(1)=0
j
1+1=2 4-2=2 X(2)=2
1
x1(1)=1
1-1=0 x1(3)=1
1
0+0=0 X(3)=0
80
Contd..
x2(n)= {1 2 3 4}
1+3=4 x2(0)=1
1
4+6=10 X(0)=10
1-3=-2 x2(2)=3
1
-2+j2 X(1)=-2+j2
j
2+4=6 4-6=-2 X(2)=-2
1
x2(1)=2
2-4=-2 x2(3)=4
1
-2-j2 X(3)=-2-j2
81
Contd..
X3(k)= X1(k).X2(k)= {60 0 -4 0}=
60-4=56 X3(0)=60
1
60+4=64 X3(2)=-4
1
64-0=64
j
0+0=0 56-0=56
1
1 -4
x3(1)=16
X3(1)=0
x3(2)=14
0-0=0 X3(3)=0
1
64+0=64
x3(3)=16
82
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
83
Problem
Calculate the linear convolution of following signals by using DFT method only. x(n)={ 1 2 3 2 -2} and h(n)={ 1 2 2 1} Verify your answer with tabulation method.
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
84
Linear Filtering
If the system has frequency response H(w) and input signal spectrum is X(w)
X(w)
H(w)
Y(w)
In application, convolution would be used to calculate the output of the system or DFT would be used to calculate the spectrum of output. Even, DFT can be used for convolution
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
85
Contd..
If the input length is very large as compared to impulse response of the system, then computational complexity of the DFT/convolution would be more. Instead of taking DFT/convolution for whole input sequence, DFT/convolution can be applied to smaller blocks of input sequence. This would yields two advantages DFT/convolution size would be smaller and hence computational complexity In online filtering delay can be kept small as only small number of points will required to store in buffer for DFT/convolution calculations There are two methods to do linear filtering by braking up input sequence into smaller blocks Overlap add method Overlap save method
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
86
Overlap-add Method
In the overlap-add method the input x(n) is broken up into consecutive non-overlapping blocks xi(n) The output yi(n) for each input xi(n) is computed separately by convolving (non-cyclic/linear) xi(n) with h(n). The output blocks yi(n) would be lager than corresponding input blocks xi(n) Hence, the each output block yi(n) will be overlapped with next and previous blocks to get y(n)
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
87
Contd..
x(n)
Overlapping length=M-1
xi(n)
h(n)
Length of impulse response = M
yi(n)
y(n)
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
88
Problem
An FIR digital filter has the unit impulse response sequence h(n)={ 2 2 1}. Determine the output sequence in response to the input sequence x(n)= {3 0 -2 0 2 1 0 -2 -1 0}
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
89
Solution
x(n)= {3 0 -2 0 2 1 0 -2 -1 0} Length of convolution between each block and impulse response would be 4. x1(n)= {3 0} x2(n)= {-2 0} x3(n)= {2 1} x4(n)= {0 -2} x5(n)= {-1 0} h(n)={ 2 2 1} x1(n)= {3 0 0 0} x2(n)= {-2 0 0 0} x3(n)= {2 1 0 0} x4(n)= {0 -2 0 0} x'5(n)= {-1 0 0 0} h(n)={ 2 2 1 0} X1(k)= {3 3 3 3} X2(k)= {-2 -2 -2 -2} X3(k)= {3 2-j 1 2+j} X4(k)= {-2 j2 2 -j2} X'5(k)= {-1 -1 -1 -1} H(k)={ 5 1-j2 1 1+j2} h(n)={ 2 2 1}
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
90
Contd..
Y1(k)=X1(k)H(k) = {15 3-j6 3 3+j6} Y2(k)=X2(k)H(k) = {-10 -2+j4 -2 -2-j4} Y3(k)=X3(k)H(k) = { 15 -j5 1 j5} Y4(k)=X4(k)H(k) = {-10 4+j2 2 4-j2} Y5(k)=X5(k)H(k) = {-5 -1+j2 -1 -1-j2} Overlapping length= M-1 =3-1=2 y1(n)= { 6 6 3 0} y2(n)= {-4 -4 -2 0} y3(n)= { 4 6 4 1} y4(n)= {0 -4 -4 -2} y5(n)= { -2 -2 -1 0}
y(n)= {6 6 -1 -4 2 6 4 -3 -6 -4 -1 0}
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
91
Problem
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
92
Overlap-save Method
x(n)
Overlapping length=M-1 Overlapping length=M-1
xi(n)
h(n)
Length of impulse response = M
yi(n)
M-1 zeros
y(n)
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
93
Problem
An FIR digital filter has the unit impulse response sequence h(n)={ 2 2 1}. Determine the output sequence in response to the input sequence x(n)= {3 0 -2 0 2 1 0 -2 -1 0}
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
94
Solution
x(n)= {3 0 -2 0 2 1 0 -2 -1 0} h(n)={ 2 2 1}
Length of convolution between modified each block and impulse response would be 8. x1(n)= {3 0 -2 0} x2(n)= {2 1 0 -2} x3(n)= { -1 0 0 0} x1(n)= {0 0 3 0 -2 0} x2(n)= {-2 0 2 1 0 -2} x3(n)= {0 -2 -1 0 0 0} h(n)={ 2 2 1}
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
95
End of Chapter 03
Queries ???
10/6/2009
Watumull Institute of Technology, Worli Prepared by Chandrashekhar Padole, DSP-BE Computer, Mumbai Uni
96