Outcome Based Education 1 Dr.P.Meena,Assoc.Prof., EEE Focus Learning, not teaching Students, not faculty Outcomes, not inputs or capacity INDIA HAS BECOME A PERMANENT MEMBER OF THE WASHINGTON ACCORD
Dec 23, 2015
Outcome Based Education
1
Dr.P.Meena,Assoc.Prof., EEE
FocusLearning, not teachingStudents, not facultyOutcomes, not inputs or capacity
INDIA HAS BECOME A PERMANENT MEMBER OF
THE WASHINGTON ACCORD
2
Academic abilities
Course Lectures/Demonstrations/
Videos/Animations /power point presentations/hand outs
Problem solving • Teacher led• Students in pairs/share
Industry Visits
Open ended experiments
Components that contribute to Academic Abilities
Components that contribute to Transferable Skills
3
Transferable skills
Student Activities
Project work/
Open ended experiments
The components of course delivery that contribute to the defined attributes of the course .
Attributes
Technical Symposia
Community
connect
4Dr.P.Meena,Assoc.Prof.,EEE
55
Digital Signal ProcessingIntroduction
Inception:1975 with the development of Digital Hardware such as digital hardware.
Personal computer revolution in 1980s and 1990s caused DSP explosion with new applications.
Dr. P.Meena, Assoc.Prof(EE) BMSCE
66
Advantages of DSP TechnologyHigh reliabilityReproducibility
Flexibility & ProgrammabilityAbsence of Component Drift problem
Compressed storage facility (especially in the case of speech signals which has a lot
of redundancy).DSP hardware allows for programmable
operations.Signal Processing functions to be performed by hardware can be easily modified through
soft ware(efficient algorithms)Dr. P.Meena, Assoc.Prof(EE) BMSCE
77
Advantages of DSP TechnologyHigh reliabilityReproducibility
Flexibility & ProgrammabilityAbsence of Component Drift problem
Compressed storage facility (especially in the case of speech signals which has a lot
of redundancy).DSP hardware allows for programmable
operations.Signal Processing functions to be performed by hardware can be easily modified through
soft ware(efficient algorithms)Dr. P.Meena, Assoc.Prof(EE) BMSCE
1010
A TYPICAL DIGITAL SIGNAL PROCESSING SYSTEM
)(tx)(txa )(nx )(ns )(ts D/A
CONVERTER
Analog prefilter orAntialiasingfilter
A/DCONVERTER
Dig.SignalProcessor
Reconstructionfilter same as the pre filter
Low pass filtered signal
Discrete time signal
Discrete time signal
Samplingfrequency
dB dB
Dr. P.Meena, Assoc.Prof(EE) BMSCE
Dr. P.Meena, Assoc.Prof(EE) BMSCE 11
CO1: Ability to apply the knowledge of mathematics, science and fundamentals of signals and systems to ascertain the behavior of complex engineering systems.
CO2:Ability to Identify techniques, formulate representations and analyze responses of digital systems.
CO3:Ability to Design digital system components and test their application using modern engineering tools, as solutions to engineering problems.
Course Outcomes
Dr. P.Meena, Assoc.Prof(EE) BMSCE 12
Course Contents
• Different operations on a signal in the digital domain
• Different forms of realizations of a Digital System.
• Design Procedures for Digital Filters
1313
Outcomes of this Course: By The End Of The Course ,
• Distinguish The Digital and Analog Domains.
• Analyse Signals, and reconstruct.
• Develop Block Diagrams For Different System Representations,.
• Design Analog And Digital Filters.
• Ready to Take up Specialized Courses in Audio, speech, image and Real-time Signal Processing, Further On
Dr. P.Meena, Assoc.Prof(EE) BMSCE
Dr. P.Meena, Assoc.Prof(EE) BMSCE 14
Course Outline
Course Delivery:Lecture,hand outs,videos,animations,discussions,activities
Course Assessment:
Marks: Tests: 20 (T1 & T2)Quiz ; 05Tutorials: 10Lab: 15
1616
Signals
Audio Video (Represented as a function of 3 variables.) Speech-
Continuous-represented as a function of a single (time) variable). Discrete-as a one dimensional sequence which is a function of a discrete variable.
Image:Represented as a function of two spatial variables
Electrical - Dr. P.Meena, Assoc.Prof(EE) BMSCE
2020
Relation between analog frequency and digital frequency
s
2 unit is radians per second.
y=a sin , a signal in the continuous time domain.
t=n*
z=a sin( )
sin( )
= is the digital frequency in radians/sample
Therefore, given a 2 , get
Ts
s
f
t is
n
z a n
where
f to
T
T
s
2 or (2 * )T
s
ff
f
Dr. P.Meena, Assoc.Prof(EE) BMSCE
Dr. P.Meena, Assoc.Prof(EE) BMSCE 21
f in Hertz(analog)
Ω in radians/sampleDigital
0
Fs/2-Fs/4-Fs/2-Fs FsFs/4 3/2Fs-3/2Fs
f=0,Ω=0
Ω=∏/2,f=Fs/4
Ω=∏,f=Fs/2
Ω= -∏/2,f=-Fs/4
Ω=2∏Ω=∏Ω=0Ω=∏/2Ω=-∏/2
Ω=-2∏ Ω=-∏ Ω=3∏Ω=-3∏
Nyquist interval
Ω=-∏,f=-Fs/2
Sl.No.
Frequencyin HertzOf the signal
Sampling FrequencyFs in Hertz
Ω in radians/cycle
1. f=0 Fs 0
2. f=Fs/4 Fs ∏/2
3 f=-Fs/4 Fs -∏/2
4. f=Fs/2 Fs ∏
5. f= -Fs/2 Fs -∏
Diagrammatic Representation of relation between analog frequency and digital frequency:+ve angle counter clock wise
Dr. P.Meena, Assoc.Prof(EE) BMSCE 22
Sampling of continuous time signals
The Fourier transform pair for continuous-time signals is defined by
dj2
1t
dttj
eXx
exX
tj
aa
tj
aa
dj2
1t
dttj
eXx
exX
tj
aa
tj
aa
If txa is sampled uniformly at times T seconds apart
from to a discrete- time signal x[n] is obtained. )t(xa]n[x
nTt
Dr. P.Meena, Assoc.Prof(EE) BMSCE 23
The Fourier transform of the resulting sequence x[n] can be shown to be
r 2T
1j
T
1X
ra
j
Xe
Thus ej
X
is the sum of an infinite number of amplitude-scaled, frequency-scaled, and translated versions of jXa
The Fourier transform of the continuous-time signal
txa
is illustrated in the following figure..
Tlogana
T
Dr. P.Meena, Assoc.Prof(EE) BMSCE 25
From the figure it is easy to see that the triangles of ej
X
Will not overlap if T0 <π
This inequality can be re arranged to give,
0
T
1
If we let,Ω0 equal 2πf0 where f0 is in Hertz, the above inequality becomes,
f 0
2T
1
Therefore, if the sampling rate I/T is greater than 2 f0 no overlap occurs. If there is no overlap, the spectrum
Can be found and by the inverse transform can be reconstructed. If however,
jXa
txa
T0 >π
The triangles will overlap and the spectrum of the continuous signal cannot be reconstructed
Dr. P.Meena, Assoc.Prof(EE) BMSCE 26
The Sampling Theorem A signal xa(t) can be
reconstructed from its sample values xa(nT) if the sampling rate 1/T is greater than twice the highest frequency (f0 in Hertz ) present in xa(t).• The sampling rate 2f0 for
an analog band limited signal is referred to as the Nyquist Rate.
Dr. P.Meena, Assoc.Prof(EE) BMSCE 27
Effect of Variation of Sampling frequency on the sampling of a sine wave of frequency 50Hz.
2929
Periodic Signals
Dr. P.Meena, Assoc.Prof(EE) BMSCE
,2 N
M
What is the equation to this sequence ???
Dr. P.Meena, Assoc.Prof(EE) BMSCE 31
n
nn
nn
nn
Consider
xx
4.0cos
24.0cos
4.2cos
4.0cos
,
2
1
The two signals shown though of different digital frequencies have the same sampled sequence .
n
nn
nn
nn
Consider
xx
4.0cos
24.0cos
6.1cos
4.0cos
,
2
1
Dr. P.Meena, Assoc.Prof(EE) BMSCE 32
Therefore we find that a sampled sine wave of frequency f is indistinguishable from a sine wave of frequency fs-f, fs+f,2fs-f,2fs+f….Or in general kfs ±f for any integer k.•These set of frequencies that are indistinguishable from one another are called aliases and the phenomenon is called “Aliasing”
Dr. P.Meena, Assoc.Prof(EE) BMSCE 33
enj ee
njnjH
Linear Shift Invariant System
enj
H
Is the frequency response of the system is recognized as the Fourier transform of the system’s impulse response
n
nj
n
n2jnj
n
n2j)2(j
n
njj
ee
ee
ee
)n(h)n(h
)n(hH
)n(hH
Dr. P.Meena, Assoc.Prof(EE) BMSCE 34
Frequency spectrum of a 100Hz sine wave sampled at 500Hz
Frequency spectrum of a 100Hz sine wave sampled at 80Hz
Under Sampling
3636
0 5 10 15-1
0
1
n
x1[n
]
Plot of Cos(0.4*pi*n)
0 5 10 15-1
0
1
n
x1(t
)
Cosine wave of frequency 100Hz sampled at 500Hz
0 5 10 15-1
0
1
n
x2[n
]
Cos(2.4*pi*n)
0 5 10 15-1
0
1
nx2(t
)
Cosine wave of frequency 600Hz sampled at 500Hz
Effect of aliasing
Effect of Aliasing
Dr. P.Meena, Assoc.Prof(EE) BMSCE
3838
Representation of a Complex Exponential Function
Extract from cnx.orgDr. P.Meena, Assoc.Prof(EE) BMSCE
4040
Frequency content of a signal
Continuous time :Periodic - Fourier seriesNon-periodic- Fourier transform
Discrete time:Discrete Time Fourier Transform-DTFTDiscrete Fourier Transform -DFT
Dr. P.Meena, Assoc.Prof(EE) BMSCE
Dr. P.Meena, Assoc.Prof(EE) BMSCE 41
freq.dig,)n(xXn
njj
ee
THE DISCRETE TIME FOURIER TRANSFORM
The discrete time Fourier transform of a sequence:
The discrete time Fourier transform of a system:
n
nj
n
n2jnj
n
n2j)2(j
n
njj
ee
ee
ee
)n(h)n(h
)n(hH
)n(hH
It seen that the discrete time Fourier transform of a system is 2π periodic and continuous in Ω
Dr. P.Meena, Assoc.Prof(EE) BMSCE 44
e5e4e32e.1enxeX
5,4.3,2,1)n(x If.2
.1e]n[e:DTFT Its],n[]n[x If.1
3j-2j-j-jnjj
n
nj-j
Disadvantage of DTFT
Dr. P.Meena, Assoc.Prof(EE) BMSCE 4747
1.The Transfer function is a function of the continuous variable Ω.2. This needs computation of infinite sum at uncountable infinite frequencies.3.Hence the above transform is not numerically computable. 4.The transform is defined for aperiodic sequences.
A repeated sequence of finite length N
Dr. P.Meena, Assoc.Prof(EE) BMSCE 48
nx
x
N
r
N) ulomod n(x
rNnx)n(
x[n]=0 for n<0 and >N;≠0 otherwise
Dr. P.Meena, Assoc.Prof(EE) BMSCE 49
Discrete Fourier Transform, DFT
10,1
is, IDFT
.2
,
10,
frequency digital is
0
0
1
0
0
1
0
NkkXN
nx
THEN
where
NknxkX
e
e
njkN
k
njkN
n
Dr. P.Meena, Assoc.Prof(EE) BMSCE 50
210.1
2x1x0x0X
3
2.
N
2
1] 0 1[)n(x.;N
2, where
1Nk0,nxkX
eee
e
2.3
20j1.
3
20j0.
3
2jk
0
0
njk1N
0n
0
51P.Meena,Asst.Prof(EE)BMSCE 51
Discrete Fourier Transform
1
0
2
2( ) ( ) .... 0,1,2,.... 1
.
nk
N
n
jN
N
jX k x n k NNe
W e
1
0
2 /
( )N kn
Nn
j N
N
X k x n
whereW
W e
Dr. P.Meena, Assoc.Prof(EE) BMSCE
5252
1
0
1
0
2( ) ( ) .... 0,1,2,.... 1.
( ) ( ) .... 0,1,2,.... 1.
nk
N
n
nkN
n
jX k x n k NN
X k x n k NN
e
W
2
.jN
NW e
is known as twiddle factor.
21
1
N
N
NN
jNN eW
W
Dr. P.Meena, Assoc.Prof(EE) BMSCE
N roots of Unity.
5353
The Locus of the Twiddle Factor for N roots traces N points on a unit circle.
Dr. P.Meena, Assoc.Prof(EE) BMSCE
5454
2.Find the four point DFT of the sequence :
x[n]=(1,0.5,0.25,0.125)
2
244
= 12 2
j
j
Cos jSin j
eW
e
Dr. P.Meena, Assoc.Prof(EE) BMSCE
5555
Location of Roots
1=W4 0
j=√-1=W4 3
-1=W4 2
-j=-√-1=W4 1
Dr. P.Meena, Assoc.Prof(EE) BMSCE
jjW
jW
jjW
jW
334
224
114
004
1
1
Dr. P.Meena, Assoc.Prof(EE) BMSCE 56
1 1 1 1 (0) 1 1.875
1 1 (1) 0.5 0.75-j0.37
1 1 1 1(2) 0.25
1 1 (3) 0.125
4
Xj j
Xk
Xj j
X
n
knW
5
0.625
0.75+j0.375
1
5757
Solution:
1 1 1 1 (0) 1 1.875
1 1 (1) 0.5 0.75-j0.37
1 1 1 1(2) 0.25
1 1 (3) 0.125
4
Xj j
Xk
Xj j
X
n
knW
5
0.625
0.75+j0.375
Dr. P.Meena, Assoc.Prof(EE) BMSCE
Dr. P.Meena, Assoc.Prof(EE) BMSCE 58
123
4
5
6
78 9
10
1112
1314
mod
mod
mod
[ ] =[1 2 3 4 5 6 7 8 9 10 11 12 13 14]
[1 14 13 12 11 10 9 8 7 6 5 4 3 2]
[2 1 14 13 12 11 10 9 8 7 6 5 4 3 ]
[3 2 1 14 13 12 11 10 9 8
[ ][1 ][2 ]
N
N
N
x n
x kx kx k
7 6 5 4 ]
........... so on
N
Circular Folding
5959
Discrete Fourier TransformDFT
It’s a numerically computable transform.Its obtained by sampling the discrete
time Fourier Transform in the frequency domain.
This is developed by analyzing periodic sequences such as the Discrete Fourier Series.
DFS is then extended to finite duration sequences, leading to DFT
Dr. P.Meena, Assoc.Prof(EE) BMSCE
6565
The importance of DFT
( )j
X e
0 1n N
From the frequency sampling theorem it can be concluded that N equispaced samples of the Discrete Time Fourier Transform of the N point sequence x(n) can uniquely reconstruct
These N samples around the unit circle are called the discrete Fourier transform coefficients.
It is clear that the DFS is practically equivalent to the DFT when
If x(n) is a sequence defined only over the interval from0 to N-1, the DFT,X(k) of x(n) is defined only over the same interval from 0 to N-1.
Dr. P.Meena, Assoc.Prof(EE) BMSCE
6666
2
1
0
1, 0, 1,.......
N j knN
kn k n
Nx eX
The IDFT-Inverse DFT
Dr. P.Meena, Assoc.Prof(EE) BMSCE
1,.......0,1
)(1
0
NnWKX
Nnx Kn
N
N
k
6767
3.Find the eight point DFT of the sequence :
x[n]=(1 2 3 4 4 3 2 1 )
Assignment
Dr. P.Meena, Assoc.Prof(EE) BMSCE
Dr. P.Meena, Assoc.Prof(EE) BMSCE 69
Properties of the DFT
Linearity : The DFT is a linear transform
DFT [ax1[n]+bx2[n]]= a DFT[x1[n]]+ b DFT [x2[n]]
If x1[n] and x2[n] have different durations that is, they are N1 point and N2 sequences, respectively, then choose N3 =max(N1,N2) and proceed by taking N3 point DFTs.
74P.Meena,Asst.Prof(EE)BMSCE 74
4 point DFT plots of a sequence x[n]=[1 1 1 1] in Matlab
Dr. P.Meena, Assoc.Prof(EE) BMSCE
7575
The Eight point DFT of [1 1 1 1]obtained by appending with zeros
Dr. P.Meena, Assoc.Prof(EE) BMSCE
7676
Effect of zero padding
The zero padding gives a High density Spectrum and a better displayed version for plotting but not a high resolution spectrum.
More data points needs to be obtained in order to get a high resolution spectrum
Dr. P.Meena, Assoc.Prof(EE) BMSCE
7878
MATLAB PROGRAM
n=input('input the values of nin the form [0:deltaN:N-1]=');
k=input('input the values of kin the form [0:deltak:k-1]=');
xn=input('input the sequence of signal values=');w=(2*pi/(length(n))*k);WN=exp(-j*2*pi/(length(n)));nk=n'*k;WNnk=WN.^nk;Xk=xn*WNnk;stem(w/pi,abs(Xk))
Dr. P.Meena, Assoc.Prof(EE) BMSCE
7979
Let
conjugate
complex are K)-X(N and K)X(N eff-co DFT
sequence real valued2N a be ][
nx
Dr. P.Meena, Assoc.Prof(EE) BMSCE
8080
Circular Folding
123
4
5
6
78 9
10
1112
1314
Dr. P.Meena, Assoc.Prof(EE) BMSCE
DFT [x((-n))N]= X((-k)) N =
x[n]=[1 2 3 4 5 6 7 8 9 10 11 12 13 14]
x[-n]modN=[1 14 13 12 11 10 9 8 7 6 5 4 3 2]
Dr. P.Meena, Assoc.Prof(EE) BMSCE 81
Circular Shift
1
x13
2
4
5
6 78
9
10
12
11
1314
x0
x2
x3
x4x5
x6x7
x9
x8
x10x11
x12x13
x1x0
x2
x3
x4x5
x6x7
x9
x8
x10x11
x12x13
141
2
3
4
56
7
8
9
10
1112
13x[n]x[n-1] mod 14
x1x0
x2
x3
x4x5
x6x7
x9
x8
x10x11
x12x13
23
4
6
7 89
10
11
12
13x[n+1] mod 14
5
114
[right shift the sequence]14
[left shift the sequence]14
Dr. P.Meena, Assoc.Prof(EE) BMSCE 82
In general,
mod
mod
[ (0), (1),........ ( 3), ( 2), ( 1)]
[ ( 1), (0), (1),........ ( 3), ( 2)]
[ ( 2), ( 1), (0), (1),........ ( 3)]
[ ][ 1][ 2]
N
N
x x x N x N x N
x N x x x N x N
x N x N x x x N
x nx nx n
8
[ ] [1 2 3 4 5 6 7 8]
x [7 8 1 2 3 4 5 6](n-2)x n
2,1,14,13,12,11,10,9,8,7,6,5,4,3]2[
1,14,13,12,11,10,9,8,7,6,5,4,3,2]1[
12,11,10,9,8,7,6,5,4,3,2,1,14,13]2[
13,12,11,10,9,8,7,6,5,4,3,2,1,14]1[
]14,13,12,11,10,9,8,7,6,5,4,3,2,1[ ][
4mod
4mod
14mod
14mod
nx
nx
nx
nx
nx
8383
Properties of Discrete Fourier Transform
1.Linearity: The DFT is a linear transform
1
29)()(a
4
20)(;
3
9)(a
4b3;a
1
5)(;
1
3)(
1
2915] 14DFT[)]()](DFT[a
12] 8[)(b 4,b
,3]; 6[)(a 3,a If 3]; 2[)( ;1 2)(
)]([)]([a
)]([)]([ )]()([
21
21
21
21
2
121
21
2121
kbk
kbk
Let
kk
nbn
n
nnn
kbk
nbDFTnDFTanbnaDFT
XX
XX
XX
xx
xxxx
XXxxxx
Dr. P.Meena, Assoc.Prof(EE) BMSCE
8484
2.Circular Folding /Shift :
][][modmod
KXnxNN
DFT
mod 4
mod 4
mod 4
[1 4 3 2]
10 10
-2 j2 -2 j2X[K] ; [ ]
-2 -2
-2-j2 -2 j2
10
-2 j2
-2
-2 j2
[ ]
[ ]
[ ]
DFT
x n
x n
X K
4] 3 2 [1 x[n] let
4] 3 2 [1 x[n] let10
-2+j2
-2
-2-j2
-2+j2
10
-2-j2
-2
Dr. P.Meena, Assoc.Prof(EE) BMSCE
85
3a.DFT of circular shifted sequence
mod
DFT[x[n]]=X[K]
then DFT X[K]x[n-m]Km
N
If
NW
mod 4 x[n]=[1 2 2 0]. Find DFT of ,mod 4x[n],x[n-1] x[n-2]If
mod4[0 1 2 2]
1 1 1 1 0 5
1 -j -1 +j 1 2
1 -1 1 -1 2 1
1 +j -1 -j 2 2
x[n-1]
j
j
Dr. P.Meena, Assoc.Prof(EE) BMSCE
86
3a.DFT of circular shifted sequence
mod
1
mod 4
DFT X[K]
DFT X[K]4
x[n-m]
x[n-1]
Km
N
K
NW
W
4
(0) 1 1 1 1 1 5
(1) 1 -j -1 +j 2 -1-j2
(2) 1 -1 1 -1 2 1
(3) 1 +j -1 -j 0 -1+j2
0 5*4
1 -1-j2*4
W
W[ 1]
X
X
X
X
DFT x n
5*1 5
(-1-j2)*(-j) -2+j
2 1*(-1) -11*4
(-1+j2)*(j) -2-j3 -1+j2*4
W
W
1
j
-j
-1
Dr. P.Meena, Assoc.Prof(EE) BMSCE
Dr. P.Meena, Assoc.Prof(EE) BMSCE 87
Find the DFT of
Circular Convolution
Find the circular convolution of ,[1 ,2 ,2, 0] and [1,2,3,4]
4.If x[n] is a 2N valued real sequence,
X[N+k] and X[N-k] are complex conjugate. X[0] X[1] X[2] X[3] X[4] X[5] X[6] X[7]
Dr. P.Meena, Assoc.Prof(EE) BMSCE 88
x[n]=x[n]=
Inverse DFT of a sequence
Find the inverse DFT of [ 5 (-2+j1) -1 (-2-j1) ]
8989
3b. Multiplication by Exponentials or Cicular Frequency Shift
[ ] ( )mn
N NDFT x n X K mW
If X(K) is circularly shifted, the resulting inverse transform will be the multiplication of the inverse of X(K) by a complex exponential.
Dr. P.Meena, Assoc.Prof(EE) BMSCE
If g[n] and h[n] are two sequences of length 6. They have six point DFTs G[K] and H[K] . The sequence g[n] is given by
g[n]= 4.1, 3.5, 1.2, 5, 2, 3.3
If DFTs G[k] and H[k are related by circular frequency shift as,
H[k]=G[k-3] 6 Find h[n].
91
Circular Convolution
2
1 2
1 2 1 2
[1 2 2 0]; [ ] [1 1 1 1]1
5 4
1 2 0[ ] [ ]
0 0
1 2 0
20
0[ ] [ ] ; [ ] [ ]
0
0
20
0
0
0
[ ] n
jK K
j
K K IDFT K K
IDFT
n xx
X X
X X X X
1 1 1 1 20 5
1 +j -1 -j 0 51
1 -1 1 -1 0 54
1 -j -1 +j 0 5
Dr. P.Meena, Assoc.Prof(EE) BMSCE
92
Circular Convolution
1 2
1 2 2 0 1 2 2 0 1 2 2 0 1 2 2 01
2 mod 4
[ ] [ ] 1 2 2 0 1 1 1 1
[ ] 1111 1111 1111 1111[ ]
------- ------- ------ ------
n nx xnxn kx
5 5 5 5
1 2[ ] [ ]1 2[ ] [ ] IDFT K Kn n X Xx x
Dr. P.Meena, Assoc.Prof(EE) BMSCE
93
Evaluating the IDFTFind the IDFT of [5 (-1-j2) 1 (-1+j2)]
1 2
1 2 2 0 1 2 2 0 1 2 2 0 1 2 2 01
2 mod 4
[ ] [ ] 1 2 2 0 1 1 1 1
[ ] 1111 1111 1111 1111[ ]
------- ------- ------ ------
n nx xnxn kx
5 5 5 5
1
+j
-j
-1
kn
NW
Dr. P.Meena, Assoc.Prof(EE) BMSCE
Dr. P.Meena, Assoc.Prof(EE) BMSCE 94
1
2
4
56
n=0
n=1n=2
n=3
n=4 n=5
12
45
6n=0
n=1n=2
n=3
n=4 n=5
x[n] x[n-1]mod6
3
x[-n]=x[N-n]modNCircular Shift
n=0
n=1n=2
n=3
n=4 n=5
2
3
34
5
6 1
n=0
n=1n=2
n=3
n=4 n=5
3
45
6
21
n=0
n=1n=2
n=3
n=4 n=5
4
56
1
2 3x[n+1] x[n+2] x[n+3]
n=0
n=1n=2
n=3
n=4 n=5
5
61
2
34
x[n+4]
x[n-1]=x[n+5]modN
Dr. P.Meena, Assoc.Prof(EE) BMSCE 95
Symmetry property for real valued x[n]
If the sequence is real, X[N-k] =X*[k]=X[-k]
If the first 5 points of the 8 point DFT of a real valued sequence areX[k]=[ 0.5 (1-j) 0 (1-j1.72) 0 ],find the remaining 3 points of the DFT.
From the symmetry property,
X[N-k]=X*[k]
If x[n]=Find the four point DFT of x[n].[ 4 ( -1+j) 2 (-1-j ) ]
Dr. P.Meena, Assoc.Prof(EE) BMSCE 96
If x[n] is real ,We know that DFT of x[-n] = X[-k] = X[N-k= X*[K]Example DFT of[1 ,2, 3 ,4]
Which implies that, for real valued time signals,
X*[K]= X[-K]
And for imaginary valued time signals,
X*[K]= -X[-K]
Conjugation: DFT [x*(n)]= X* ((-K))N
Dr. P.Meena, Assoc.Prof(EE) BMSCE 97
Symmetry properties for real sequences
If x[n] is real and a N point sequence. then x[n]=x*[n]. Using the above property, X(K)= X*(-K) N
Dr. P.Meena, Assoc.Prof(EE) BMSCE 98
x(ev)[n]= 1/2[ x[n]+x[-n]]
X (ev) (K)=1/2[ X[K]+X[-K]]If signal is real, x[-n]=x[n]
Therefore X[-K]= X*[K]
Hence X[K] is real and even=
½[ X[K]+X*[K]]=X(real)[K].Case 2:If x[n] is real and odd, then its X[K] is purely imaginary X(odd)[n]= 1/2[ x[n]-[-n]]Therefore, X(odd[K])=1/2[X[K]-X[-K]]=jX(imag)[K].
Dr. P.Meena, Assoc.Prof(EE) BMSCE 99
Case 3 :If x[n] is imaginary and even, then its X[K] is purely imaginary.
x(ev)[n]= 1/2[ x[n]+x[-n]]
X (ev) (K)=1/2[ X[K]+X[-K]]
If the signal is imaginary,Then we know that X*[K]=-X[-K].Hence X[K] imaginary and even,=1/2[X[K]-X*[K]]= jX(imag)[K].Case 4 :If x[n] is imaginary and odd , then its X[K] is purely real.X(odd)[n]= 1/2[ x[n]-[-n]]X(odd[K])=1/2[X[K]-X[-K]]If signal is imaginary
X*[K]=-X[-K],therefore½[X[k]+x*[-K]]=1/2[ X(real)[K + j X(imag)[K] + [ X(real)[K - j X(imag)[K]= X(real[K]).
Dr. P.Meena, Assoc.Prof(EE) BMSCE 100
Complex Conjugate Properties
x*[n] has a DFT X*[N-k]= X*[-K] N
Dr. P.Meena, Assoc.Prof(EE) BMSCE 101
Even and odd parts of a sequence
nxnx
2
1n
nxnx2
1n
Nmododd
Nmodev
x
x
Find the even and odd parts of the sequence x[n]=[1 2 2 0]
Dr. P.Meena, Assoc.Prof(EE) BMSCE 102
Real and Imaginary Parts of X[K]
][
][*
*
*
Im
*
][2
1
][2
1
][][2
1
][][2
1
KXX
KXX
xx
xx
Nim
Nre
re
KXK
KXK
nnxj
n
nnxn
Dr. P.Meena, Assoc.Prof(EE) BMSCE 103
Computation of N point DFT of a real sequence using N point DFT.
g[n]=[1 2 0 1]; h[n]=[2 2 1 1]x[n]=
105
Multiplication:
It is the dual of the circular convolution property.
][][1
][][2111KK
NnnDFT XXxx
Dr. P.Meena, Assoc.Prof(EE) BMSCE
107
Parseval’s RelationThis Computes the energy in the frequency
domain1 12 2
0 0
2
2
1
is called the energy spectrum of finite
duration sequences.Similarly , for periodic sequences, the quantity
called the power spectrum
[ ] [ ]
[ ]
( )
N N
xn kN
The quantityN
is
x n X KE
X K
X KN
Dr. P.Meena, Assoc.Prof(EE) BMSCE
108
Some quick relations:
N-1-kn
Nk=0
N-1 N-10
Nk=0 k=0
N-1
k=0
1 x[n]= X[K]
N
1 1[0] X[K] X[K]
N N
X[K]=N [0];
W
W
f
x
x
1 12 2
0 0
1 12 2
0 0
1[ ] [ ]
[ ] [ ]
N N
xn k
N N
k n
N
OR
N
x n X KE
X K x n
1.
2.
2N-1 n
n=0
x[n] be a 2N valued real sequence,
X[N]= x[n](-1)
If
3.
Dr. P.Meena, Assoc.Prof(EE) BMSCE
109
Problems on Quick Relations
7 7 2
k=0 k=0
[ ] [1 2 0 3 -2 4 7 5]
with a 8 point DFT X(K). Evaluate the following without
explicitly computing
X(K).
1)x[0] 2)x(4) 3) ( ) 4) ( )
x n
X K X K
Ans: 1)20 2)-8 3)8 4) 864
Dr. P.Meena, Assoc.Prof(EE) BMSCE
110
0 1 2 3 4 5 6 70
50
100
w in radians
Mag
nitud
e
0 20 40 60 80 100 120 140 1600
50
100
k
mag
nitud
e
0 20 40 60 80 100 120 140 160-100
0
100
kangle
in d
egre
es
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20
50
100
w/pi
mag
nitud
e
DFT OF A 50 Hz SINE WAVE SAMPLED AT 8KHZ
Dr. P.Meena, Assoc.Prof(EE) BMSCE
111
0 500 1000 1500 2000 25000
5
10x 10
5
Ene
rgy
Spe
ctru
m
DFT and energy spectrum of a wave form with sag
0 1 2 3 4 5 6 70
500
1000
mag
nitu
de o
f DFT
0 500 1000 1500 2000 25000
500
1000
mag
of D
FT
0 500 1000 1500 2000 2500-100
0
100
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 20
500
1000
0 500 1000 1500 2000 2500-1
0
1
DFT & Energy Spectrum OF A 50 Hz SINE WAVE with SAG
Dr. P.Meena, Assoc.Prof(EE) BMSCE
112
DFT & Energy Spectrum OF A 50 Hz Normal SINE WAVE and a Sine wave with sag
Dr. P.Meena, Assoc.Prof(EE) BMSCE
Dr. P.Meena, Assoc.Prof(EE) BMSCE 116
Therefore zero padding is used to make the signals of equal length.
117
Linear Convolution & Circular Convolution.
FIR(Finite Impulse Response) filters are implemented using linear convolution.
Given two sequences
1N
n.convolutiolinear toidentical isn convolutiocircular
then thezeros, ofnumber eappropriatan padding
by Nlength same theof made are sequences
, Nlength of and
21
2121
NN
Both
Nandnn xx
Dr. P.Meena, Assoc.Prof(EE) BMSCE
118
Let
1]. 1 1- 2- 1- 1 1 [:Ans
equal. arethat they
show andn convolutiocircular theCompute
n.convolutiolinear their Determine
1]; 1 1 1[1]; 2 2 1[ 21 nxnx
Dr. P.Meena, Assoc.Prof(EE) BMSCE
Dr. P.Meena, Assoc.Prof(EE) BMSCE 119
Error between Circular convolution & Linear convolution due to choice in N
When N=max(N1,N2) is chosen for circular convolution then the first M-1 samples are in error where M=min(N1,N2).
Hence this leads to different methods of convolution in block processing.
Dr. P.Meena, Assoc.Prof(EE) BMSCE 120
BLOCK CONVOLUTIONS
Necessity of Block Convolutions:• To filter an input sequence received continuously such as a speech
signal from a microphone and if this filtering operation is done using a FIR filter, in which the linear convolution is computed using the DFT then there are some practical problems .
• A large DFT is to be computed. • Output samples are not available until all input samples are
processed resulting in a large amount of delay.
In Block Convolution:• The speech signal is segmented into smaller sections /blocks .• Each section is processed using the DFT • Finally the output sequence is assembled by assembling the
outputs of each section.
P.Meena, Asst.Prof(EE) BMSCE 121
Errors in BLOCK CONVOLUTIONS
• If x[n] is sectioned into N point sequences and• The impulse response of the filter is an M point sequence ,
where M <N. • Then the N point circular convolution between the input block
and the impulse response will yield a block output sequence in which the first M-1 samples are not the correct output values.
• Therefore x[n] is partitioned into sections by adding M-1 zeros into first section each overlapping with the previous one by exactly (M-1) samples, save the last (N-M+1) output samples and finally concatenate these outputs into a sequence.
• To correct for the first M-1 samples in the first output block, set the first (M-1) samples in the first input block to zero. This procedure is called the Overlap –save method
121Dr. P.Meena, Assoc.Prof(EE) BMSCE
M
2
[ ] [1 2] [1 2 3 4 5 6];
length of h[n]=M;
length of x[n]=L;
To evaluate the length of the sequences N for convolution,
1,
2 1, 4 1 3. 4
Overlap and save method,Input sequence overl
22
h n
M N
N N N
In
1 2
aps by (M-1) samples.
[ ] [1 2 0 0]; x [n]=[0 1 2 3],x [n]=[3 4 5 6]
1 2 0 0 1 2 0 0 1 2 0 0 1 2 0 0 |1 2 0 0 1 2 0 0 1 2 0 0 1 2 0 0
0 3 2 1 1 0 3 2
h n
2 1 0 3 3 2 1 0 | 3 6 5 4 4 3 6 5 5 4 3 6 6 5 4 3
---------- ----------- ----------- ----------- |---------- ----------- ----------- -----------
1 4 7 | 10 13 16
--------- ----------- ----------- ----------- |---------- --
--------- ----------- -----------
The linear convolution result y[n]=[1 4 7 10 13 16]
122Dr. P.Meena, Assoc.Prof(EE) BMSCE
Dr. P.Meena, Assoc.Prof(EE) BMSCE 123
Using overlap and save method compute y[n] if h[n]=[3 2 1]And input x[n]=[ 2 1 -1 -2 -3 5 6 -1 2 0 2 1 ].
Use only 8 point circular convolution.M=3;
1] 2 [3 h[n]
1] 2 0 2 1- 6 5 3[][
5] 3- 2- 1- 1 2 0 0[][
2
1
nx
nx
Dr. P.Meena, Assoc.Prof(EE) BMSCE 124
------------------------------------------------
12 16 13 10 7 4 1
-------------------------------------------------
12 16 13 4
6 7 4 1
----- ------ ------ ------- ----- - ------ -- ------ ------
4 5 6 0 0 4 5 6 6 0 4 5 5 6 0 4 1 2 3 0 0 1 2 3 3 0 1 2 2 3 0 1
0 0 2 1 0 0 2 1 0 0 2 1 0 0 2 1 0 0 2 1 0 0 2 1 0 0 2 1 0 0 2 1
0] 6 5 [40]; 3 2 1[][
]0 0 2 1[][
4array. in the considered sizeblock theis ,3
;124
;12
nconvolutiocircular of size theis N
6], 5 4 3 2 1 [x[n]
2] ,1[][
M
nx
nh
NL
L
LM
nhOverlap and Add method of Sectional Convolution:
Dr. P.Meena, Assoc.Prof(EE) BMSCE 125
12] 6 16 13 10 7 4 1 [:Ans
0 0 12 6 16 13 10 15
---------------------------------------------------------
6 0 0 0 60 0 0 0 0 6 0 0 0 0 6 3 4 5 6 6 3 4 5 5 6 3 4 4 5 6 3
| 00 2 1 0 0 2 1 0 0 2 1 0 0 2 1 00 2 1 0 0 2 1 0 0 2 1 0 0 2 1
------------------------------ ------------- ------- ------
7 4 1 6
----------------------------- ------------ -------- ------
0 1 2 3 3 0 1 2 2 3 0 1 1 2 3 0
00 2 1 0 0 2 1 0 0 2 1 0 0 2 1
] 0 0 0 6[][x
6] 5 4 3[][
]3 2 1 0[][x
0] 0 2 1[][
21;3;4
12 ,2
3
2
1
n
nx
n
nh
MLN
LMNM M
Verify by overlap and Save Method
Dr. P.Meena, Assoc.Prof(EE) BMSCE 126
content.energy
thefind hence 1.and-Nn0 where2
cos][
sequence theof DFT Obtain the
0
N
nKnx
Relationship of the DFT to Other TransformsRelationship to Z- transform:
kN
N
kj
Wez
j
N
n
n
knN
N
n
n
n
zXKXez
znx
ce
WnxKX
znxzX
2)()(,
][X(z)
1,-Nn0 range theoutside 0 x[n]sin
][)(
][)(
1
0
1
0
130Dr. P.Meena, Assoc.Prof(EE) BMSCE
Dr. P.Meena, Assoc.Prof(EE) BMSCE 131
0.05.05.05.05.0)3(
0.15.05.05.05.0)2(
05.05.05.05.0)1(
0.15.05.05.05.0)0(
)()(
5.05.0.05.00.z0.5X(z)
DFT. its find transform Zthe
0].Using 0.5 0 [0.5 of transform
2.34
2.24
2.14
2.04
2321-
WX
WX
WX
WX
zXkX
zzz
ZtheFind
kNWz
The Limitations of the directcalculation of the DFT
It requires
pair each for fourtions,multiplica real
4N requiresk each for X(k) of evaluationdirect For
additions.
complex 1)-N(N and tionsmultiplicacomplex 2N
132Dr. P.Meena, Assoc.Prof(EE) BMSCE
Dr. P.Meena, Assoc.Prof(EE) BMSCE 133
THE FAST FOURIER TRANSFORM
• This is proposed by Cooley and Tukey• Based on decomposing /breaking the transform into smaller transforms and combining them to give the total transform.• This can be done in both Time and Frequency domains.
Dr. P.Meena, Assoc.Prof(EE) BMSCE 134
DECIMATION IN TIME FFT
The number of points is assumed as a power of 2,that is
obtained. are sformspoint tran- two
int4
N twointo sformpoint tran
2
Neach
breaking then and int 2
N twointo transforms
point - N thebreaking of one isapproach
2
until
transformspo
transformspo
This
N v
Dr. P.Meena, Assoc.Prof(EE) BMSCE 135
1.-2
N0,1,.....,k ,],[][)
2X(
follows, as computed be can binsfrequency of half second thethen,
equations, above theusing andfact following thegConsiderin
1.-2
N0,1,.....,k ,],[][][
bins,frequency halffirst the
yieldsX[K],for expression theinto thisngsubstituti
1.-2
N0,1,.....,k ,],
2[][
1.-2
N0,1,.....,k ,],
2[][ that note
sint2/ )12(,]12[][
sint2/ )2(,]2[][
as, functionsnew definenow we
1.-N0,1,.....,k
.]12[ ]2[][
that,followsit ,
relation, theusing
1.-N0,1,.....,k
.]12[]2[][
)2
(
1)2/(
0 2
1)2/(
0 2
1)2/(
0 2
1)2/(
0 2
2
2
21)2/(
0
1)2/(
0
2
forKHWKGN
K
WW
forKHWKGKX
forN
KHKH
forN
KGKG
poNwithmxDFTWmxKH
poNwithmxDFTWmxKG
for
WmxWWmxKX
W
for
WWmxWmxKX
kN
kN
KN
N
kN
N
m
mkN
N
m
mkN
N
n
mkN
kN
N
m
mkN
NN
mkN
N
m
kN
N
m
mkN
W
Dr. P.Meena, Assoc.Prof(EE) BMSCE 136
https://engineering.purdue.edu/VISE/ee438/demos/flash/decimation.swf
Dr. P.Meena, Assoc.Prof(EE) BMSCE 137
0x
1x
12W
02W
)0(X
)1(X
0x
2x 12W
02W
1x
3x
02W
12W
04W
14W
24W
34W
X(0)
X(1)
X(2)
X(3)
2-POINT DFT
4-POINT DFT
Dr. P.Meena, Assoc.Prof(EE) BMSCE 138
Find the DFT of x[n]=[1 2 3 4] using DIT algorithm
Ans:[10 -2+j2 -2 -2-j2].
Find the inverse of :[10 -2+j2 -2 -2-j2]. using DITFFT.
Dr. P.Meena, Assoc.Prof(EE) BMSCE 140
0x
4x 12W
02W
2x
6x
02W
12W
04W
14W
24W
34W
X(1)
X(2)
X(3)
12W
02W
02W
12W
04W
14W
24W
34W
X(4)
X(5)
X(6)
X(7)
08W
18W
28W
38W
48W
58W
68W
78W
1x
5x
3x
7x
BIT REVERSED SEQUENCE EIGHT POINT DFT
x[n]=[1, -1, -1, -1, 1, 1, 1, -1]1
1
-1
1
-1
1
-1
-1
2
0
0
-2
0
-2
-2
0
2
2j
2
-2j
-2
-2
2
-2
X(0)
3.69+j1.96
2.82-j0.78
1.53-j0.39
4-j0.0
1.53+j0.39
2.82+j0.78
3.69-j1.96
0.0-j0.0
Dr. P.Meena, Assoc.Prof(EE) BMSCE 142
2
2
2
2
2
2
2
2
j
2
2
2
2
2
2
2
2
-1 ;1
78
38
68
28
58
18
48
08
jWjW
WjW
jWjW
WW
Dr. P.Meena, Assoc.Prof(EE) BMSCE 143
]x,[x ],x,[x
into decimateor
] x x x[x Let x[n]
3120
3210
Divide
]x,[x ],x,[x
into decimateor
] x x x[x Let x[n]
3120
3210
Divide
1x0 25.0x2
02W
02W
5.0x1
125.0x3
12W
12W
04W
34W
X(0)=1.875
X(1)=0.75-j0.375
X(2)=0.625
X(3)=0.75+j0.375
14W
24W
0.125] 0.25 0.5 1[][ nx
25.1
75.0
625.0
375.0
Dr. P.Meena, Assoc.Prof(EE) BMSCE 144
Computation of Inverse DFT
]j21- 1 j2-1- [5
of IDFT the
.][N
1x[n]
bygiven is DFT inverse 1
0
Find
WKX
TheN
k
knN
Twiddle Factors are negative powers of NW
The output is scaled by 1/N
Dr. P.Meena, Assoc.Prof(EE) BMSCE 145
02W
02W
12W
12W
04W
34W
14W
24W2
4j
50 x
12 x
211 jx
213 jx
6
4
4
8
8
0
1
2
0
2
4
1
4
1
4
1
4
1
+j
-j
-1 1
Dr. P.Meena, Assoc.Prof(EE) BMSCE 146
20x
11x
12W
02W
12
x
23x
02W
12W
04W
14W
24W
34W
6)3
1
3
1
1+j
0
1-j
10x
11
x12W
02W
13x
02W
12W
04W
14W
24W
34W
1
0
2
12x
1
0
20
2+j2
0
2+j2
2-j2
Dr. P.Meena, Assoc.Prof(EE) BMSCE 147
02W
02W
12W
12W
04W
34W
14W
24W2
4j
00x
02x
41jx
43
jx
4
8
8
4
1
4
1
4
1
0
0
0
2
0
2
Dr. P.Meena, Assoc.Prof(EE) BMSCE 148
DECIMATION IN FREQUENCY FFT (DIF) FFT
or k=0,1……..N-1,Where = is the twiddle factor and N=2,4,8,16… can be expanded as,X[K]=x(0)+x(1)k +………+x(N-1)k(N-1)
Again if we split the above equation into,X[K]=x(0)+x(1)k+…x(-1)k(-1)+x()WN
k +… …+x(N-1) k(N-1)
Then we can rewrite as a sum of the following two parts,+Which can be written as ,+=-1 , then we have ,+Now letting k=2m as an even number achieves,X[2m]=+ ,X[2m+1]=-,a[n]=x[n]+x[n+N/2], for n=0,1,………N/2 -1,b[n]=x[n]-x[n+N/2], for n=0,1….N/2 -1We get DFTx[n]with N points=
Dr. P.Meena, Assoc.Prof(EE) BMSCE 150
If x[n]=[1 2 3 4]. Find X[K] using DIF FFT.
02W
04W
10 x
22 x
33x
44 x8
4
1
1
6
-2
-2 `14W
-2
-2j
10
1
1
2
-2-j2
02W
-2+j2
X0
X2
X1
X3
X[K]= [10, -2-j2, -2, -2+j2]