SlideShare a Scribd company logo
1 of 27
1
Discrete Fourier Transform
2
Example 56.2. Compute the DFT of the signal given by the
following four samples, x[n] = [2 1 -3 4].
Solution: We are going to use the DFT Eq. (56.c), although this is
not a particularly hard calculation. N, the length of the signal is 4,
hence the fundamental frequency is equal to 2/4 = /2. We write
the DFT as
3
Figure 6.7: The two ways of looking at a DFT The real and
imaginary parts of the DFT vs. bin number in (a) and (b), and in (c)
and (d) the magnitude and the phase for same bin numbers.
4
In Fig. 6.7 we see the computed DFT in both its common forms. In the top row,
we see the Real and Imaginary plots and in the second row, we have the
Magnitude and Phase plots. They are different but contain the same information.
Both forms have their particular use. Since this is a 4 point sequence, we get just
four values of the DFT, X[k]. It is hard to make sense of what is going on when
there are so few values. We should plot them against the DTFT to see if there is
a pattern. Where to get the DTFT? In this case it is pretty simple. We use Eq.
(6.1). The signal is simple enough that we go ahead and solve the DTFT in
closed form.
Note the DTFT equation we used to compute this DTFT. Now we can plot the
continuous DTFT from Eq. (??) along with the four computed points of the
DFT from Eq. (??) and we see where these points are coming from. First thing
to note, the DFT points are exactly the correct samples of the DTFT.
5
Figure 6.8: The phase and the magnitude of the signal when seen along with
the DTFT as its sample points.
We can see from this picture that the four discrete points the
DFT although accurate, missed the highs of the magnitude as
well as the lows of the phase. Since discrete points is all we get
from the DFT, we need more points to see the underlying
spectrum better. Butt here is a problem, if we are given the
sequence x[n] which consists of just 4 points and no more data
can be had, what can we do?
6
Figure 6.9: Zero-
padding increases N and
hence provides better
sampling of the DTFT.
There is something magical we can do at this point and it is called zero-
padding. This is about the most “fun” you can have in DSP for nothing. It’s a
very valuable tool. We add a bunch of zeros to the end of the signal, x[n] to
lengthen it artificially. Now we redo the DFT for this zero-padded and hence
lengthened signal (N + added zeros). Remember we said that the DFT counts
the zeros at the ends of a signal as real data. But what is truly amazing is what
we can extract from these zeros. In Fig. 6.9, we see the result of this zero-
padding. For 16 point signal, the signal x[n] is zero-padded with 12 zeros at
the end. Because we count these new points as part of the period, N is now 16
samples. Its DFT in Fig. 6.9 now has a frequency resolution of 2=16 instead
of 2=4 it had for the 4-point DFT. And of course we get 16 sampled data
points of the DTFT instead of 4. The new plot looks quite good!
7
Example 56.2. Compute the DFT of the signal given by the
following four samples, x[n] = [2 1 -3 4].
Solution: We are going to use the DFT Eq. (56.c), although this is
not a particularly hard calculation. N, the length of the signal is 4,
hence the fundamental frequency is equal to 2/4 = /2. We write
the DFT as
8
Figure 6.7: The two ways of looking at a DFT The real and
imaginary parts of the DFT vs. bin number in (a) and (b), and in (c)
and (d) the magnitude and the phase for same bin numbers.
9
In Fig. 6.7 we see the computed DFT in both its common forms. In the top row,
we see the Real and Imaginary plots and in the second row, we have the
Magnitude and Phase plots. They are different but contain the same information.
Both forms have their particular use. Since this is a 4 point sequence, we get just
four values of the DFT, X[k]. It is hard to make sense of what is going on when
there are so few values. We should plot them against the DTFT to see if there is
a pattern. Where to get the DTFT? In this case it is pretty simple. We use Eq.
(6.1). The signal is simple enough that we go ahead and solve the DTFT in
closed form.
Note the DTFT equation we used to compute this DTFT. Now we can plot the
continuous DTFT from Eq. (??) along with the four computed points of the
DFT from Eq. (??) and we see where these points are coming from. First thing
to note, the DFT points are exactly the correct samples of the DTFT.
10
Figure 6.8: The phase and the magnitude of the signal when seen along with
the DTFT as its sample points.
We can see from this picture that the four discrete points the
DFT although accurate, missed the highs of the magnitude as
well as the lows of the phase. Since discrete points is all we get
from the DFT, we need more points to see the underlying
spectrum better. Butt here is a problem, if we are given the
sequence x[n] which consists of just 4 points and no more data
can be had, what can we do?
11
Figure 6.9: Zero-
padding increases N and
hence provides better
sampling of the DTFT.
There is something magical we can do at this point and it is called zero-
padding. This is about the most “fun” you can have in DSP for nothing. It’s a
very valuable tool. We add a bunch of zeros to the end of the signal, x[n] to
lengthen it artificially. Now we redo the DFT for this zero-padded and hence
lengthened signal (N + added zeros). Remember we said that the DFT counts
the zeros at the ends of a signal as real data. But what is truly amazing is what
we can extract from these zeros. In Fig. 6.9, we see the result of this zero-
padding. For 16 point signal, the signal x[n] is zero-padded with 12 zeros at
the end. Because we count these new points as part of the period, N is now 16
samples. Its DFT in Fig. 6.9 now has a frequency resolution of 2/16 instead
of 2/4 it had for the 4-point DFT. And of course we get 16 sampled data
points of the DTFT instead of 4. The new plot looks quite good!
12
N= 4 Point DFT Matlab Coding
xn=[1, 1, 1, 0]
Xk=fft (xn);
mag=abs (Xk)
ang=angle (Xk)
subplot (3, 1, 1)
stem (xn,'filled')
xlabel ('n'), ylabel ('x(n)')
subplot (3, 1, 2)
stem (abs (Xk),'filled')
xlabel ('k'), ylabel ('abs (X(k)')
subplot (3, 1, 3)
stem (angle (Xk),'filled')
xlabel ('k'), ylabel ('angle (X(k)')
N= 8 (4 Zero-Padding) Point DFT Matlab Coding
xn=[1, 1, 1, 0, 0, 0, 0, 0]
Xk=fft (xn);
mag=abs (Xk)
ang=angle (Xk)
subplot (3, 1, 1)
stem (xn,'filled')
xlabel ('n'), ylabel ('x(n)')
subplot (3, 1, 2)
stem (abs (Xk),'filled')
xlabel ('k'), ylabel ('abs (X(k)')
subplot (3, 1, 3)
stem (angle (Xk),'filled')
xlabel ('k'), ylabel ('angle (X(k)')
N= 32 (28 Zero-Padding) Point DFT Matlab Coding
xn=[1, 1, 1, 0]
Xk=fft (xn,32);
mag=abs (Xk)
ang=angle (Xk)
subplot (3, 1, 1)
stem (xn,'filled')
xlabel ('n'), ylabel ('x(n)')
subplot (3, 1, 2)
stem (abs (Xk),'filled')
xlabel ('k'), ylabel ('abs (X(k)')
subplot (3, 1, 3)
stem (angle (Xk),'filled')
xlabel ('k'), ylabel ('angle (X(k)')
13
DFT CALCULATION USING MATLAB
xn=input ('Enter the sequence x(n)=')
[N]=length (xn);
xn=xn.';
n=0:N-1;
for k=0:N-1
xk(k+1)=exp(-j*2*pi*k*n/N)*xn;
end
disp ('x(k)=');
disp (xk)
14
Computing DFT the Easier Way with Matrix Math
In previous example we calculated the DFT and the DTFT in closed
form. The DTFT of arbitrary signals using this method is a difficult
task, not one we want to do on paper. The DFT on the other hand, has a
reasonably easy to understand architecture amenable to digital
calculations. It can be implemented as a linear device as shown in Fig.
6.10 with N inputs and N outputs. It is completely lossless and
bidirectional. N numbers go in and N numbers come out, using only
addition and multiplication.
We can view the DFT as a linear input/output processor
consisting of N equations. We have collected L data symbols. If N is
less than L, then we select N samples out of the L and perform the DFT
calculations on these N points. If N is larger than the L collected
samples, then we have to do something to increase the number of
samples from L to N. Some algorithms of the DFT will automatically
zero-pad a time domain signal to make the length equal to N.
15
Figure 6.10: Architecture of a DFT Processor.
We can build the DFT calculating machine in two parts, one for the
forward or the DFT and the other for the inverse, or the iDFT. We feed N
time-domain samples into the DFT machine in Fig. 6.10. The device needs
all N points simultaneously before anything can happen. This is because
each sample makes a contribution to the each of the outputs, the harmonic
components X[k]. N samples go in and N samples of frequency response,
X[k] come out. Each X[k] gets a little contribution from each x[n].
16
Here is how each output point will be calculated. There are N of these
equations that the machine has to compute. Here we write out a few of
these equations, for k = 0, 1 and N.
…(56.n)
Computers were designed to do matrix math, so these equations can be easily
solved. The only problem comes as N increases. The number of calculations gets
very large. The matrix computation done this way requires a number of calculations
that are proportional to N2. If we take advantage of the symmetry as well the phase
relationship of the sine and cosine, the number of computations can come down to a
number more like N log2 N. This and other algorithmic innovations were first
proposed by J.W. Cooley and John Tukey in 1965. There are now many variations
on their original invention and they are all referred to as the Fast Fourier transform
or FFT. Their innovation was extremely important particularly for hardware
implementation. We use this algorithm today for calculating the DFT, so much so
that we often find ourselves saying “take a FFT” when we really mean the DFT.
17
We notice that all calculations require the manipulation of the
complex exponential. The complex exponential is hard to type, so
we simplify it by writing it like this.
We introduced this idea in Chapter 3, when discussing the discrete
Fourier series calculations. It is easy to see that WN is a function of
N only, the rest of the terms are all constants. Now we also define
the same constant in terms of other two variables, n and k. These
are the time and harmonic indexes.
N
N
j
W
e 


2
…(56.o)
nk
N
j
nk
N
j
nk
N e
e
W

 2
2











 …(56.p)
18
This form has the variables n and k in the exponent and so the
constant WN is written with all three indexes as WN
nk. Here we are
merely raising WN to power nk, or (e-j2/N)nk. Hence WN
nk is a matrix
of size n  k with each index ranging from 0 to N - 1. Now rewrite
the DFT using the term, WN
nk. This is somewhat easier to write than
the exponential, as it has less moving parts.
Now we write Eq. (6.9) in matrix form as




1
0
]
[
]
[
N
n
nk
N
W
n
x
k
X …(56.q)
…(56.r)
x
.
X
nk
N
W

19
X is the output Fourier transform vector of size N and x is the input
vector of the same size.
The WN
nk term in Eq. (6.15) is called the DFT matrix and is written
for all n and k indices as
…(56.s)
20
Note that the matrix size is n  k, but since both n and k are equal to N,
the DFT matrix size is equal to N  N, hence this matrix is always
square. The columns represent the index k of the harmonics and rows the
index n, time. The first row has index n = 0, so all the first row terms are
equal to 1, because WN
(n=0)k =e-j(2k/N).0 = 1
The first column has index k = 0, hence all WN
nk terms in the first
column have a zero exponent and so all are also equal to 1. The third
row, second term is equal to WN
2, for k = 1 and n = 2. The rest can be
understood the same way. The matrix is symmetrical about the right
diagonal such that
kn
N
nk
N W
W  …(56.t)
21
All of the terms in Eq.(56.s) are constant for given n and k integers. If
you stare at the equation long enough, I am sure just as Cooley and
Tukey, you will be able to see the advantage of matrix calculations. This
matrix can be pre-computed and stored for various value of N. That
saves computation time. We don’t need to compute the whole matrix as
well, because it is symmetrical. There are actually a lot of tricks that can
be used to make computations efficient. We can also show that the
inverse of this matrix is easy to compute because it is just the inverse of
the individual terms. This also makes reverse computation easier and
quicker.
   *
1 1 nk
N
nk
N W
N
W 

…(56.u)
22
Let’s write out the DFT matrix for N = 4. The fundamental frequency
for N = 4 sample signal is equal to 0 = 2/4 = /2. Hence we write
W4
nk=e-j(2k/4)n.
This is equal in Euler form to
j
j
j
W
W
j
j
W
W
j
j
j
W
W
j
j
W
W
j
nk
j
nk
e
e
W nk
nk
j
nk
j
nk










































































































)
1
.(
0
1
.
3
2
sin
1
.
3
2
cos
1
0
.
1
1
.
2
2
sin
1
.
2
2
cos
1
.
0
1
.
1
2
sin
1
.
1
2
cos
1
0
.
1
1
.
0
2
sin
1
.
0
2
cos
)
(
2
sin
2
cos
3
4
1
.
3
4
2
4
1
.
2
4
1
4
1
.
1
4
0
4
1
.
0
4
2
4
2
4












,
1
k
3,
n
For
,
1
k
2,
n
For
,
1
k
1,
n
For
,
1
k
0,
n
For
Method-1:
23
From this we can develop the WN
nk matrix as















































j
-
1
-
j
1
1
-
1
1
-
1
j
1
j
1
1
1
1
1
3
2
1
0
9
6
3
6
4
2
3
2
1
3
.
3
2
.
3
1
.
3
0
.
3
3
.
2
2
.
2
1
.
2
0
.
2
3
.
1
2
.
1
1
.
1
0
.
1
3
.
0
2
.
0
1
.
0
0
.
0
1
1
1
1
1
1
1
3
2
1
0
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
nk
N
W
W
W
W
W
W
W
W
W
W
W
W
W
W
W
W
W
W
W
W
W
W
W
W
W
k
W
n
Method-2:
…(56.v)
24
…(56.w)
The inverse comes easily from Eq.(56.u)
[In case of Inverse/conjugate, only the sign of j
should be changed.]












j
1
j
1
1
1
1
1
j
1
j
1
1
1
1
1
Matrix
t
Coefficien














j
-
1
-
j
1
1
-
1
1
-
1
j
1
j
1
1
1
1
1
DFT
For













j
1
-
j
-
1
1
-
1
1
-
1
j
-
1
j
1
1
1
1
1
IDFT
For
Non-negative sign Non-negative sign
DFT and IDFT Coefficients
 















j
1
-
j
-
1
1
-
1
1
-
1
j
-
1
j
1
1
1
1
1
N
W
nk
N
1
1
25
We can now use this DFT matrix to calculate the DFT of any arbitrary
signal of 4 input points using the equation (56.q). Larger DFT matrices
would be needed to compute larger size DFT. What is nice is that these
matrices (of any given size) are always the same and can be pre-
computed and kept in memory to speedup calculation.
Notice from Eq.(56.v) and Eq.(56.w) that only the imaginary components
changed sign. All the real terms kept their sign. Some values of the
matrix are complex conjugate pairs so we don’t even need to calculate
them saving time. This is of course related to that fact that for the
forward transform we need e-j2nk/N and for the reverse we need ej2nk/N.
The difference between these is that the imaginary part changes sign.
(cos + j sin) vs. the (cos - j sin). Hence the Eq.(56.u) for the inverse
we are seeing the imaginary part changing sign but not the real part.
26
Example 56.3. Compute the DFT and IDFT for the signal, x[n] = [2 1 -3
4] using the matrix method.
Solution: We already computed the 4 point DFT. Now we write the
matrix equation using the DFT matrix for N = 4.









































































































j3
5
6
-
j3
-
5
4
2
2
2
2
4
3
-
1
2
j
-
1
-
j
1
1
-
1
1
-
1
j
1
j
1
1
1
1
1
x(3)
x(2)
x(1)
x(0)
j
-
1
-
j
1
1
-
1
1
-
1
j
1
j
1
1
1
1
1
X(3)
X(2)
X(1)
X(0)
4
3
4
3
1
4
3
4
3
1
j
j
j
j
We get the original values back. The DFT
matrix of size (4x4) can be used to determine
the DFT and the iDFT of any discrete signal
of length 4 samples. The generalization of
this idea can be used to compute the DFT and
the iDFT of any length signal using the
matrix method. This is exactly what happens
inside Matlab when asked to execute the
FFT/iFFT function.
27
Now let’s compute the inverse DFT.
1
-















































































 
4
3
-
1
2
j3
5
6
-
j3
-
5
4
j
1
-
j
-
1
1
-
1
1
-
1
j
-
1
j
1
1
1
1
1
X(3)
X(2)
X(1)
X(0)
j
-
1
-
j
1
1
-
1
1
-
1
j
1
j
1
1
1
1
1
x(3)
x(2)
x(1)
x(0)
4
1
]
[ 1
X
W
x N

More Related Content

Similar to Fourier-Series_FT_Laplace-Transform_Letures_Regular_F-for-Students_13.ppt

The Concept of Dimension
The Concept of DimensionThe Concept of Dimension
The Concept of Dimensiongizemk
 
Digital Signal Processing and Control System under MATLAB Environment
Digital Signal Processing and Control System under MATLAB EnvironmentDigital Signal Processing and Control System under MATLAB Environment
Digital Signal Processing and Control System under MATLAB EnvironmentParamjeet Singh Jamwal
 
Fourier Specturm via MATLAB
Fourier Specturm via MATLABFourier Specturm via MATLAB
Fourier Specturm via MATLABZunAib Ali
 
lec08_computation_of_DFT.pdf
lec08_computation_of_DFT.pdflec08_computation_of_DFT.pdf
lec08_computation_of_DFT.pdfshannlevia123
 
EE 567ProjectDue Tuesday, December 3, 2019 at 640 p.m..docx
EE 567ProjectDue Tuesday, December 3, 2019 at 640 p.m..docxEE 567ProjectDue Tuesday, December 3, 2019 at 640 p.m..docx
EE 567ProjectDue Tuesday, December 3, 2019 at 640 p.m..docxgidmanmary
 
Sure interview algorithm-1103
Sure interview algorithm-1103Sure interview algorithm-1103
Sure interview algorithm-1103Sure Interview
 
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier TransformDSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier TransformAmr E. Mohamed
 
Fourier-Series_FT_Laplace-Transform_Letures_Regular_F-for-Students_10-1-1.ppt
Fourier-Series_FT_Laplace-Transform_Letures_Regular_F-for-Students_10-1-1.pptFourier-Series_FT_Laplace-Transform_Letures_Regular_F-for-Students_10-1-1.ppt
Fourier-Series_FT_Laplace-Transform_Letures_Regular_F-for-Students_10-1-1.pptMozammelHossain31
 
A combined sdc
A combined sdcA combined sdc
A combined sdcsakthi1986
 
s.Magesh kumar DECE,BTECH,ME (ASAN MEMORIAL COLLEGE OF ENGINEERING AND TECHNO...
s.Magesh kumar DECE,BTECH,ME (ASAN MEMORIAL COLLEGE OF ENGINEERING AND TECHNO...s.Magesh kumar DECE,BTECH,ME (ASAN MEMORIAL COLLEGE OF ENGINEERING AND TECHNO...
s.Magesh kumar DECE,BTECH,ME (ASAN MEMORIAL COLLEGE OF ENGINEERING AND TECHNO...sakthi1986
 
pradeepbishtLecture13 div conq
pradeepbishtLecture13 div conqpradeepbishtLecture13 div conq
pradeepbishtLecture13 div conqPradeep Bisht
 
Problem Solving by Computer Finite Element Method
Problem Solving by Computer Finite Element MethodProblem Solving by Computer Finite Element Method
Problem Solving by Computer Finite Element MethodPeter Herbert
 
Visualization of general defined space data
Visualization of general defined space dataVisualization of general defined space data
Visualization of general defined space dataijcga
 
Unit 05 - Limits and Continuity.pdf
Unit 05 - Limits and Continuity.pdfUnit 05 - Limits and Continuity.pdf
Unit 05 - Limits and Continuity.pdfSagarPetwal
 

Similar to Fourier-Series_FT_Laplace-Transform_Letures_Regular_F-for-Students_13.ppt (20)

The Concept of Dimension
The Concept of DimensionThe Concept of Dimension
The Concept of Dimension
 
5 4 Notes
5 4 Notes5 4 Notes
5 4 Notes
 
Digital Signal Processing and Control System under MATLAB Environment
Digital Signal Processing and Control System under MATLAB EnvironmentDigital Signal Processing and Control System under MATLAB Environment
Digital Signal Processing and Control System under MATLAB Environment
 
5 numerical analysis
5 numerical analysis5 numerical analysis
5 numerical analysis
 
Fourier Specturm via MATLAB
Fourier Specturm via MATLABFourier Specturm via MATLAB
Fourier Specturm via MATLAB
 
lec08_computation_of_DFT.pdf
lec08_computation_of_DFT.pdflec08_computation_of_DFT.pdf
lec08_computation_of_DFT.pdf
 
EE 567ProjectDue Tuesday, December 3, 2019 at 640 p.m..docx
EE 567ProjectDue Tuesday, December 3, 2019 at 640 p.m..docxEE 567ProjectDue Tuesday, December 3, 2019 at 640 p.m..docx
EE 567ProjectDue Tuesday, December 3, 2019 at 640 p.m..docx
 
02 Notes Divide and Conquer
02 Notes Divide and Conquer02 Notes Divide and Conquer
02 Notes Divide and Conquer
 
Sure interview algorithm-1103
Sure interview algorithm-1103Sure interview algorithm-1103
Sure interview algorithm-1103
 
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier TransformDSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
 
Fourier-Series_FT_Laplace-Transform_Letures_Regular_F-for-Students_10-1-1.ppt
Fourier-Series_FT_Laplace-Transform_Letures_Regular_F-for-Students_10-1-1.pptFourier-Series_FT_Laplace-Transform_Letures_Regular_F-for-Students_10-1-1.ppt
Fourier-Series_FT_Laplace-Transform_Letures_Regular_F-for-Students_10-1-1.ppt
 
A combined sdc
A combined sdcA combined sdc
A combined sdc
 
s.Magesh kumar DECE,BTECH,ME (ASAN MEMORIAL COLLEGE OF ENGINEERING AND TECHNO...
s.Magesh kumar DECE,BTECH,ME (ASAN MEMORIAL COLLEGE OF ENGINEERING AND TECHNO...s.Magesh kumar DECE,BTECH,ME (ASAN MEMORIAL COLLEGE OF ENGINEERING AND TECHNO...
s.Magesh kumar DECE,BTECH,ME (ASAN MEMORIAL COLLEGE OF ENGINEERING AND TECHNO...
 
pradeepbishtLecture13 div conq
pradeepbishtLecture13 div conqpradeepbishtLecture13 div conq
pradeepbishtLecture13 div conq
 
lec07_DFT.pdf
lec07_DFT.pdflec07_DFT.pdf
lec07_DFT.pdf
 
c5.pdf
c5.pdfc5.pdf
c5.pdf
 
DFT.pptx
DFT.pptxDFT.pptx
DFT.pptx
 
Problem Solving by Computer Finite Element Method
Problem Solving by Computer Finite Element MethodProblem Solving by Computer Finite Element Method
Problem Solving by Computer Finite Element Method
 
Visualization of general defined space data
Visualization of general defined space dataVisualization of general defined space data
Visualization of general defined space data
 
Unit 05 - Limits and Continuity.pdf
Unit 05 - Limits and Continuity.pdfUnit 05 - Limits and Continuity.pdf
Unit 05 - Limits and Continuity.pdf
 

Recently uploaded

Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 

Recently uploaded (20)

DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 

Fourier-Series_FT_Laplace-Transform_Letures_Regular_F-for-Students_13.ppt

  • 2. 2 Example 56.2. Compute the DFT of the signal given by the following four samples, x[n] = [2 1 -3 4]. Solution: We are going to use the DFT Eq. (56.c), although this is not a particularly hard calculation. N, the length of the signal is 4, hence the fundamental frequency is equal to 2/4 = /2. We write the DFT as
  • 3. 3 Figure 6.7: The two ways of looking at a DFT The real and imaginary parts of the DFT vs. bin number in (a) and (b), and in (c) and (d) the magnitude and the phase for same bin numbers.
  • 4. 4 In Fig. 6.7 we see the computed DFT in both its common forms. In the top row, we see the Real and Imaginary plots and in the second row, we have the Magnitude and Phase plots. They are different but contain the same information. Both forms have their particular use. Since this is a 4 point sequence, we get just four values of the DFT, X[k]. It is hard to make sense of what is going on when there are so few values. We should plot them against the DTFT to see if there is a pattern. Where to get the DTFT? In this case it is pretty simple. We use Eq. (6.1). The signal is simple enough that we go ahead and solve the DTFT in closed form. Note the DTFT equation we used to compute this DTFT. Now we can plot the continuous DTFT from Eq. (??) along with the four computed points of the DFT from Eq. (??) and we see where these points are coming from. First thing to note, the DFT points are exactly the correct samples of the DTFT.
  • 5. 5 Figure 6.8: The phase and the magnitude of the signal when seen along with the DTFT as its sample points. We can see from this picture that the four discrete points the DFT although accurate, missed the highs of the magnitude as well as the lows of the phase. Since discrete points is all we get from the DFT, we need more points to see the underlying spectrum better. Butt here is a problem, if we are given the sequence x[n] which consists of just 4 points and no more data can be had, what can we do?
  • 6. 6 Figure 6.9: Zero- padding increases N and hence provides better sampling of the DTFT. There is something magical we can do at this point and it is called zero- padding. This is about the most “fun” you can have in DSP for nothing. It’s a very valuable tool. We add a bunch of zeros to the end of the signal, x[n] to lengthen it artificially. Now we redo the DFT for this zero-padded and hence lengthened signal (N + added zeros). Remember we said that the DFT counts the zeros at the ends of a signal as real data. But what is truly amazing is what we can extract from these zeros. In Fig. 6.9, we see the result of this zero- padding. For 16 point signal, the signal x[n] is zero-padded with 12 zeros at the end. Because we count these new points as part of the period, N is now 16 samples. Its DFT in Fig. 6.9 now has a frequency resolution of 2=16 instead of 2=4 it had for the 4-point DFT. And of course we get 16 sampled data points of the DTFT instead of 4. The new plot looks quite good!
  • 7. 7 Example 56.2. Compute the DFT of the signal given by the following four samples, x[n] = [2 1 -3 4]. Solution: We are going to use the DFT Eq. (56.c), although this is not a particularly hard calculation. N, the length of the signal is 4, hence the fundamental frequency is equal to 2/4 = /2. We write the DFT as
  • 8. 8 Figure 6.7: The two ways of looking at a DFT The real and imaginary parts of the DFT vs. bin number in (a) and (b), and in (c) and (d) the magnitude and the phase for same bin numbers.
  • 9. 9 In Fig. 6.7 we see the computed DFT in both its common forms. In the top row, we see the Real and Imaginary plots and in the second row, we have the Magnitude and Phase plots. They are different but contain the same information. Both forms have their particular use. Since this is a 4 point sequence, we get just four values of the DFT, X[k]. It is hard to make sense of what is going on when there are so few values. We should plot them against the DTFT to see if there is a pattern. Where to get the DTFT? In this case it is pretty simple. We use Eq. (6.1). The signal is simple enough that we go ahead and solve the DTFT in closed form. Note the DTFT equation we used to compute this DTFT. Now we can plot the continuous DTFT from Eq. (??) along with the four computed points of the DFT from Eq. (??) and we see where these points are coming from. First thing to note, the DFT points are exactly the correct samples of the DTFT.
  • 10. 10 Figure 6.8: The phase and the magnitude of the signal when seen along with the DTFT as its sample points. We can see from this picture that the four discrete points the DFT although accurate, missed the highs of the magnitude as well as the lows of the phase. Since discrete points is all we get from the DFT, we need more points to see the underlying spectrum better. Butt here is a problem, if we are given the sequence x[n] which consists of just 4 points and no more data can be had, what can we do?
  • 11. 11 Figure 6.9: Zero- padding increases N and hence provides better sampling of the DTFT. There is something magical we can do at this point and it is called zero- padding. This is about the most “fun” you can have in DSP for nothing. It’s a very valuable tool. We add a bunch of zeros to the end of the signal, x[n] to lengthen it artificially. Now we redo the DFT for this zero-padded and hence lengthened signal (N + added zeros). Remember we said that the DFT counts the zeros at the ends of a signal as real data. But what is truly amazing is what we can extract from these zeros. In Fig. 6.9, we see the result of this zero- padding. For 16 point signal, the signal x[n] is zero-padded with 12 zeros at the end. Because we count these new points as part of the period, N is now 16 samples. Its DFT in Fig. 6.9 now has a frequency resolution of 2/16 instead of 2/4 it had for the 4-point DFT. And of course we get 16 sampled data points of the DTFT instead of 4. The new plot looks quite good!
  • 12. 12 N= 4 Point DFT Matlab Coding xn=[1, 1, 1, 0] Xk=fft (xn); mag=abs (Xk) ang=angle (Xk) subplot (3, 1, 1) stem (xn,'filled') xlabel ('n'), ylabel ('x(n)') subplot (3, 1, 2) stem (abs (Xk),'filled') xlabel ('k'), ylabel ('abs (X(k)') subplot (3, 1, 3) stem (angle (Xk),'filled') xlabel ('k'), ylabel ('angle (X(k)') N= 8 (4 Zero-Padding) Point DFT Matlab Coding xn=[1, 1, 1, 0, 0, 0, 0, 0] Xk=fft (xn); mag=abs (Xk) ang=angle (Xk) subplot (3, 1, 1) stem (xn,'filled') xlabel ('n'), ylabel ('x(n)') subplot (3, 1, 2) stem (abs (Xk),'filled') xlabel ('k'), ylabel ('abs (X(k)') subplot (3, 1, 3) stem (angle (Xk),'filled') xlabel ('k'), ylabel ('angle (X(k)') N= 32 (28 Zero-Padding) Point DFT Matlab Coding xn=[1, 1, 1, 0] Xk=fft (xn,32); mag=abs (Xk) ang=angle (Xk) subplot (3, 1, 1) stem (xn,'filled') xlabel ('n'), ylabel ('x(n)') subplot (3, 1, 2) stem (abs (Xk),'filled') xlabel ('k'), ylabel ('abs (X(k)') subplot (3, 1, 3) stem (angle (Xk),'filled') xlabel ('k'), ylabel ('angle (X(k)')
  • 13. 13 DFT CALCULATION USING MATLAB xn=input ('Enter the sequence x(n)=') [N]=length (xn); xn=xn.'; n=0:N-1; for k=0:N-1 xk(k+1)=exp(-j*2*pi*k*n/N)*xn; end disp ('x(k)='); disp (xk)
  • 14. 14 Computing DFT the Easier Way with Matrix Math In previous example we calculated the DFT and the DTFT in closed form. The DTFT of arbitrary signals using this method is a difficult task, not one we want to do on paper. The DFT on the other hand, has a reasonably easy to understand architecture amenable to digital calculations. It can be implemented as a linear device as shown in Fig. 6.10 with N inputs and N outputs. It is completely lossless and bidirectional. N numbers go in and N numbers come out, using only addition and multiplication. We can view the DFT as a linear input/output processor consisting of N equations. We have collected L data symbols. If N is less than L, then we select N samples out of the L and perform the DFT calculations on these N points. If N is larger than the L collected samples, then we have to do something to increase the number of samples from L to N. Some algorithms of the DFT will automatically zero-pad a time domain signal to make the length equal to N.
  • 15. 15 Figure 6.10: Architecture of a DFT Processor. We can build the DFT calculating machine in two parts, one for the forward or the DFT and the other for the inverse, or the iDFT. We feed N time-domain samples into the DFT machine in Fig. 6.10. The device needs all N points simultaneously before anything can happen. This is because each sample makes a contribution to the each of the outputs, the harmonic components X[k]. N samples go in and N samples of frequency response, X[k] come out. Each X[k] gets a little contribution from each x[n].
  • 16. 16 Here is how each output point will be calculated. There are N of these equations that the machine has to compute. Here we write out a few of these equations, for k = 0, 1 and N. …(56.n) Computers were designed to do matrix math, so these equations can be easily solved. The only problem comes as N increases. The number of calculations gets very large. The matrix computation done this way requires a number of calculations that are proportional to N2. If we take advantage of the symmetry as well the phase relationship of the sine and cosine, the number of computations can come down to a number more like N log2 N. This and other algorithmic innovations were first proposed by J.W. Cooley and John Tukey in 1965. There are now many variations on their original invention and they are all referred to as the Fast Fourier transform or FFT. Their innovation was extremely important particularly for hardware implementation. We use this algorithm today for calculating the DFT, so much so that we often find ourselves saying “take a FFT” when we really mean the DFT.
  • 17. 17 We notice that all calculations require the manipulation of the complex exponential. The complex exponential is hard to type, so we simplify it by writing it like this. We introduced this idea in Chapter 3, when discussing the discrete Fourier series calculations. It is easy to see that WN is a function of N only, the rest of the terms are all constants. Now we also define the same constant in terms of other two variables, n and k. These are the time and harmonic indexes. N N j W e    2 …(56.o) nk N j nk N j nk N e e W   2 2             …(56.p)
  • 18. 18 This form has the variables n and k in the exponent and so the constant WN is written with all three indexes as WN nk. Here we are merely raising WN to power nk, or (e-j2/N)nk. Hence WN nk is a matrix of size n  k with each index ranging from 0 to N - 1. Now rewrite the DFT using the term, WN nk. This is somewhat easier to write than the exponential, as it has less moving parts. Now we write Eq. (6.9) in matrix form as     1 0 ] [ ] [ N n nk N W n x k X …(56.q) …(56.r) x . X nk N W 
  • 19. 19 X is the output Fourier transform vector of size N and x is the input vector of the same size. The WN nk term in Eq. (6.15) is called the DFT matrix and is written for all n and k indices as …(56.s)
  • 20. 20 Note that the matrix size is n  k, but since both n and k are equal to N, the DFT matrix size is equal to N  N, hence this matrix is always square. The columns represent the index k of the harmonics and rows the index n, time. The first row has index n = 0, so all the first row terms are equal to 1, because WN (n=0)k =e-j(2k/N).0 = 1 The first column has index k = 0, hence all WN nk terms in the first column have a zero exponent and so all are also equal to 1. The third row, second term is equal to WN 2, for k = 1 and n = 2. The rest can be understood the same way. The matrix is symmetrical about the right diagonal such that kn N nk N W W  …(56.t)
  • 21. 21 All of the terms in Eq.(56.s) are constant for given n and k integers. If you stare at the equation long enough, I am sure just as Cooley and Tukey, you will be able to see the advantage of matrix calculations. This matrix can be pre-computed and stored for various value of N. That saves computation time. We don’t need to compute the whole matrix as well, because it is symmetrical. There are actually a lot of tricks that can be used to make computations efficient. We can also show that the inverse of this matrix is easy to compute because it is just the inverse of the individual terms. This also makes reverse computation easier and quicker.    * 1 1 nk N nk N W N W   …(56.u)
  • 22. 22 Let’s write out the DFT matrix for N = 4. The fundamental frequency for N = 4 sample signal is equal to 0 = 2/4 = /2. Hence we write W4 nk=e-j(2k/4)n. This is equal in Euler form to j j j W W j j W W j j j W W j j W W j nk j nk e e W nk nk j nk j nk                                                                                                           ) 1 .( 0 1 . 3 2 sin 1 . 3 2 cos 1 0 . 1 1 . 2 2 sin 1 . 2 2 cos 1 . 0 1 . 1 2 sin 1 . 1 2 cos 1 0 . 1 1 . 0 2 sin 1 . 0 2 cos ) ( 2 sin 2 cos 3 4 1 . 3 4 2 4 1 . 2 4 1 4 1 . 1 4 0 4 1 . 0 4 2 4 2 4             , 1 k 3, n For , 1 k 2, n For , 1 k 1, n For , 1 k 0, n For Method-1:
  • 23. 23 From this we can develop the WN nk matrix as                                                j - 1 - j 1 1 - 1 1 - 1 j 1 j 1 1 1 1 1 3 2 1 0 9 6 3 6 4 2 3 2 1 3 . 3 2 . 3 1 . 3 0 . 3 3 . 2 2 . 2 1 . 2 0 . 2 3 . 1 2 . 1 1 . 1 0 . 1 3 . 0 2 . 0 1 . 0 0 . 0 1 1 1 1 1 1 1 3 2 1 0 N N N N N N N N N N N N N N N N N N N N N N N N N nk N W W W W W W W W W W W W W W W W W W W W W W W W W k W n Method-2: …(56.v)
  • 24. 24 …(56.w) The inverse comes easily from Eq.(56.u) [In case of Inverse/conjugate, only the sign of j should be changed.]             j 1 j 1 1 1 1 1 j 1 j 1 1 1 1 1 Matrix t Coefficien               j - 1 - j 1 1 - 1 1 - 1 j 1 j 1 1 1 1 1 DFT For              j 1 - j - 1 1 - 1 1 - 1 j - 1 j 1 1 1 1 1 IDFT For Non-negative sign Non-negative sign DFT and IDFT Coefficients                  j 1 - j - 1 1 - 1 1 - 1 j - 1 j 1 1 1 1 1 N W nk N 1 1
  • 25. 25 We can now use this DFT matrix to calculate the DFT of any arbitrary signal of 4 input points using the equation (56.q). Larger DFT matrices would be needed to compute larger size DFT. What is nice is that these matrices (of any given size) are always the same and can be pre- computed and kept in memory to speedup calculation. Notice from Eq.(56.v) and Eq.(56.w) that only the imaginary components changed sign. All the real terms kept their sign. Some values of the matrix are complex conjugate pairs so we don’t even need to calculate them saving time. This is of course related to that fact that for the forward transform we need e-j2nk/N and for the reverse we need ej2nk/N. The difference between these is that the imaginary part changes sign. (cos + j sin) vs. the (cos - j sin). Hence the Eq.(56.u) for the inverse we are seeing the imaginary part changing sign but not the real part.
  • 26. 26 Example 56.3. Compute the DFT and IDFT for the signal, x[n] = [2 1 -3 4] using the matrix method. Solution: We already computed the 4 point DFT. Now we write the matrix equation using the DFT matrix for N = 4.                                                                                                          j3 5 6 - j3 - 5 4 2 2 2 2 4 3 - 1 2 j - 1 - j 1 1 - 1 1 - 1 j 1 j 1 1 1 1 1 x(3) x(2) x(1) x(0) j - 1 - j 1 1 - 1 1 - 1 j 1 j 1 1 1 1 1 X(3) X(2) X(1) X(0) 4 3 4 3 1 4 3 4 3 1 j j j j We get the original values back. The DFT matrix of size (4x4) can be used to determine the DFT and the iDFT of any discrete signal of length 4 samples. The generalization of this idea can be used to compute the DFT and the iDFT of any length signal using the matrix method. This is exactly what happens inside Matlab when asked to execute the FFT/iFFT function.
  • 27. 27 Now let’s compute the inverse DFT. 1 -                                                                                  4 3 - 1 2 j3 5 6 - j3 - 5 4 j 1 - j - 1 1 - 1 1 - 1 j - 1 j 1 1 1 1 1 X(3) X(2) X(1) X(0) j - 1 - j 1 1 - 1 1 - 1 j 1 j 1 1 1 1 1 x(3) x(2) x(1) x(0) 4 1 ] [ 1 X W x N