Digital Signal Processing Fundamentals
Digital Signal Processing Fundamentals
PROCESSING
(DSP)
FUNDAMENTAL
S
Dr. Bhagya H K
Professor
Dept of ECE
KVGCE, Sullia.
Digital Signal
• Converting a continuously changing
waveform (analog) into a series of discrete
levels (digital)
Digital Signal
• The analog waveform is sliced into equal
segments and the waveform amplitude is
measured in the middle of each segment
• The collection of measurements make up
the digital representation of the waveform
What is DSP?
SYLLABUS
Module 1:
a)Basic of Discrete Fourier Transform(DFT)
b)DFT and IDFT for N=4,8
c)Properties
Module 2:
a)Circular Convolution-problems and properties
b) Overlap-save and overlap-add method to find
DFT
Module 3:
Radix-2 FFT algorithm for the computation of DFT
IDFT–decimation-in-time and decimation-in-
frequency algorithms.
Goertzel algorithm, and chirp-z transform
Module 4:
a)Structure for IIR Systems: Direct form, Cascade
form, Parallel form structures.
b)Butterworth and Chebyshev filters
c)Analog to analog frequency transformations.
d) Design of IIR Filters from analog filter using
Butterworth filter: Impulse invariance, Bilinear
transformation.
Module 5:
Structure for FIR Systems: Direct form, Linear
Phase, Frequency sampling structure, Lattice structure.
{
(d) x(n) = 1 for even
0 for odd
(a) Find the 4-point DFT of x(n) = {1, –1, 2, –2} directly.
USE
TRY
Solution:
Note
DFT IDFT
[1 -2 3 2] [4 -2+4j 4 -2 -4j]
[1 1 0 0] [2 1-j 0 1+j ]
Complex Conjugate
Compute the DFT of the 3-point sequence x(n) = {2, 1, 2}.
Using the same sequence, compute the 6-point DFT and
compare the two DFTs.
X[n] X(k)
[0 -1-j 6 -1+j ]
[1 -1 2 -2]
[1 -2 3 2] [4 -2+4j 4 -2 -4j]
[2 1-j 0 1+j ]
[1 1 0 0]
1) Periodicity
If a sequence x(n) is periodic with periodicity of N samples, then N-
point DFT of the sequence, X(k) is also periodic with periodicity of N
samples. Hence, if x(n) and X(k) are an N-point DFT pair, then
Step 5: Repeat Step 4 until the inner circle first sample lines up
with the first sample of the outer circle once again.
Relationship between DTFT and DFT
DTFT and
its Inverse
Let x(n) be a discrete-time sequence with Fourier transform
X(ω), then the DFT of x(n) denoted by X(k) is defined as:
Summary
: The DFT is obtained by sampling one period of the
Fourier transform X(ω ) of the signal x(n) at a finite
number of frequency points. This sampling is
conventionally performed at N equally spaced points in
the period 0 ≤ ω ≤ 2π or at k = 2 π k/N;
0 ≤ k ≤ N – 1.
Relationship between DTFT and Z-Transform
FAST FOURIER TRANSFORM
Because x(n) may be either real or complex, evaluating X(k) requires on the
order of N complex multiplications and N complex additions for each value of
k. Therefore, because there are N values of X(k), computing an N-point DFT
requires N2 complex multiplications and additions.
The basic strategy that is used in the FFT algorithm is one of "divide
and conquer." which involves decomposing an N-point DFT into
successively smaller DFTs.
To see how this works, suppose that the length of x(n) is even (i.e.,
N is divisible by 2). If x(n) is decimated into two sequences of
length N/2, computing the N/2-point DFT of each of these
sequences requires approximately (N /2)2 multiplications and the
same number
of additions.
Thus, the two DFTs require 2 (N/ 2 )2= multiplies and adds.
Therefore, if it is possible to find the N-point DFT of s(n) from these
two N/2-point DFTS in fewer than N2/2 operations, a savings has
been realized.
The decimation-in-time FFT algorithm is based on splitting
(decimating) x(n) into smaller sequences and finding X ( k )
from the DFTs of these decimated sequences.
Position
Index Input x[n]
0 x(0) X(0)
W2 0
W8 0
W 40
x(4) X(1)
1 W21
W 41 W 81
2 x(2) X(2)
W2 0 W
4
2
W 82
3 x(6) X(3)
W21 W43 W83
X(4)
4 x(1) W 20
W 84
W85
W 40
X(5)
5 x(5) W21
W 41 W86
X(6)
6 x(3) W 4
2
W 20 W87
X(7)
x(7)
7 W21 W43
N=2 N=4
Find the 8-point DFT of a sequence
x[n]=(1,1,1,1,0,0,0,0) using DIT-FFT radix-2
algorithm. Use Butterfly Diagram
Solution:
W 40 = 1 W80 = 1 W 84 = - 1
W20 =1
W41 = -j W81 = 0.707-j0.707 W85 = - 0.707+j0.707
2 1 1+0=1 1-1=0
1
-1 0
-j
0 1-0=1 1+j 1-j(0.414)
3 -1 j -1
-1
1 1+0=1 2-2=0
4 1+1=2
1 - 0.707+j0.707
1
5 0 1-0=1 1-j 1+j(0.414)
-1
-j j
6 1 1-1=0 0
1+0=1 -1
W 8
5
1 1+j(2.41)
1+j
7 0 1-0=1 j
-1
Further Reduction: Cooley Tukey Algorithm
a a+b WNr
W Nr
b a-b WNr
The number of complex multiplications required for calculating
N point DFT using DIT-FFT algorithm based on Cooley-Tukey is
(Nlog 2 N)/2. Also, since there are two additions per butterfly.
x(4) X(1)
1 W20 -1
x(2) X(2)
2 W40 -1
3 x(6) X(3)
W 20 -1 W4 1
-1 X(4)
4 x(1) -1
W80
5 x(5) X(5)
W20 -1 W81 -1
6 x(3) X(6)
W 40 -1 W8 2
-1
7 x(7) W 0 X(7)
2 -1 W4 1
-1 W8 3
-1
Find the 8-point DFT of a sequence
x[n]=(1,1,1,1,0,0,0,0) using DIT-FFT radix-2
algorithm. Use Butterfly Diagram
Solution:
W 40 = 1 W80 = 1
W20 =1
W41 = -j W81 = 0.707-j0.707
W82 =-j
W21 = -1 W4 =-1
2
W83 =- 0.707-j0.707
W 43 = j
Input x[n]
1-j
x(4) 0 1-0=1 1-j(2.41)
1 -1
1+0=1 1-1=0 0
x(2) 1
1 -1
x(1) 1+1=2
1 1+0=1 2-2=0
-1
1
x(5) 1-j 1+j 0.414
0 1-0=1
-1
1 -1 0.707-j0.707
2-2=0
1-1=0 -1
x(3) 1 1+0=1 -1
-j
1
1+j 1+j(2.41)
1-0=1 -0.707-j0.707 -1
x(7) 0 -j -1
1 -1
Find the 8-point DFT of a sequence
x[n]=(1,2,3,4,4,3,2,1) using DIT-FFT radix-2
algorithm. Use Butterfly Diagram
Solution:
W 40 = 1 W80 = 1 W 84 = - 1
W20 =1
W41 = -j W81 = 0.707-j0.707 W85 = - 0.707+j0.707
-3-j
x(4) 4 1-4=-3 -5.828-j2.414
1 -1
3+2=5 5-5=0 0
x(2) 3
1 -1
x(1) 5+5=10
2 2+3=5 2-2=0
-1
1
x(5) -1-3j -0.171+0.414
3 2-3=-1
-1
1 -1 0.707-j0.707
2-2=0
5-5=0 -1
x(3) 4 4+1=5 -1
-j
1
-1+3j -5.828+j2.414
4-1=3 -0.707-j0.707 -1
x(7) 1 -j -1
1 -1
Decimation-in-Frequency FFT
Another class of FFT algorithms may be derived by decimating the output
sequence X(k) into smaller and smaller subsequences. These algorithms are
called decimation-in-frequency FFTs and may be derived as follows.
Let N be a power of 2, N = 2v. and consider separately evaluating the even-index
and odd-index samples of X(k).
The even samples are
Proceeding in the same way for the odd samples of X(k) leads to
The basic butterfly for DIF-FFT
a a+b
b (a-b) WNr
-1
WN r
Input x[n] Output x[k]
x(0) X(0)
x(1) X(4)
-1 W20
x(2) X(2)
-1 W4 0
x(3) -1 W4
1 -1 W20 X(6)
x(4) X(1)
-1 W80
x(5) X(5)
-1 -1 W20
W81
x(6) X(3)
-1 W82 -1 W40
x(7) X(7)
-1 W83 -1 W41 -1 W0
Find the 8-point DFT of a sequence
x[n]=(1,1,1,1,0,0,0,0) using DIF-FFT radix-2
algorithm. Use Butterfly Diagram
Solution:
W 40 = 1 W80 = 1 W 84 = - 1
W20 =1
W41 = -j W81 = 0.707-j0.707 W85 = - 0.707+j0.707
-1
x(4)=0
1 1
X(1)=1-j(2.414)
1-j
-1 0.707-j 0.707
x(5)=0 X(5)=1+j0.414
0.707-j 0.707 -j(1.414) -1 1
-1
-j 1+j
x(6)=0 X(3)=1-j(0.414)
-j -1 1
-1 -j(1.414)
x(7)=0 -0.707-j 0.707
-1 1 X(7)=1+j2.414
-0.707-j 0.707 -1 -j
Find the 8-point DFT of a sequence
x[n]=(1,2,2,2,1,0,0,0) using DIF-FFT radix-2
algorithm. Use Butterfly Diagram
Solution:
X(0)=8
X(1)=-2j(2.414)
X(2)=0
X(3)=2j(0.414)
X(4)=0
X(5)= -2j(0.414)
X(6)=0
X(7)= 2j(2.414)
Find the 4-point circular convolution of x[n]=(1,1,1,1)
and h(n)=[1,0,1,0] using DIF-FFT radix-2 algorithm.
Solution:
W 40 = 1
W20 =1
W41 = -j
W 43 = j
Input x[n]
x(0)=1
X(0)=4
2
x(1)=1 X(2)=0
2 -1 1
0
x(2)=1 X(1)=0
-1 1 X(k)={4,0,0,0}
0
x(3)=1 X(3)=0
-1 -j -1 1
Input h[n]
h(0)=1
H(0)=2
2
h(1)=0
-1 1 H(2)=2 H(k)={2,0,2,0}
0
0
h(2)=1 H(1)=0
-1 1
0
h(3)=0 H(3)=0
-1 -j -1 1
Y(k)=IFFT(X(k)H(k))=IFFT(8,0,0,0)
Input x[n]
Y(0)=8 2
8
8 1/4
Y(1)=0 8 2
0 -1 1
1/4
Y(2)=0
8
8 2
-1 1 1/4
0
Y(3)=0 8 2
-1 -j -1 1
1/4
First 5 points of the 8-point DFT of a real valued sequence is
given by X(0)=0 , X(1)=2+2j, X(2)= -4j , X(3)=2-2j , X(4)=0
*
Take Complex conjugates of Twiddle factors to
calculate IDFT
Input x[n]
X(0) 0 0 0
x(0)=8/8=1
8
X(4) 0 0 x(1)=8/8=1
1 -1
x(2)=-8/8=-1
X(2) -4j 0 0
1 -1
4j -8j -8 x(3)=-8/8=-1
X(6) j -1
1 -1
X(1) 2+2j 8
4+4j x(4)-8/8=-1
-1
1
X(5) 2+2j 0 0 x(5)=8/8=1
-1
1 -1 0.707+j0.707
x(6)=8/8=1
8j -1
X(3) 2-2j 4-4j -1
j
1
0 x(7)=-8/8=-1
2-2j 0 -0.707+j0.707 -1
X(7) j -1
1 -1