B.P. Poddar Institute of Management and Technology
B.P. Poddar Institute of Management and Technology
Linear transformation
3
Introduction
In digital signal applications, continuous biological signals are first sampled by an analog-to-
digital converter and then transferred to a computer, where they can be further analysed and
processed. Since the Fourier transform applies only to continuous signals of time, analysing
discrete signals in the frequency domain requires that we first modify the Fourier transform
equations so they are structurally compatible with the digital samples of a continuous signal.
The discrete Fourier transform (DFT) provides the tool necessary to analyse and represent
discrete signals in the frequency domain. The DFT is essentially the digital version of the Fourier
transform.
4
Discrete Fourier Transform
It is a finite duration discrete frequency sequence which is obtained by sampling one period of
Fourier transform. Sampling is done at ‘N’ equally spaced points
Here, k = 0, 1, 2, 3, ........N-1
Since summation is taken for N points hence it is called as N-Point DFT
5
Inverse Discrete Fourier Transform
The inverse discrete Fourier transform (IDFT) is the discrete-time version of the inverse Fourier
transform. The inverse discrete Fourier transform (IDFT) is represented as,
Here n = 0, 1, 2, 3, ........N-1
6
Twiddle Factor & Its Importance
Now, we will define the new term W as,
N=
This is called as twiddle factor. Twiddle factor makes the computation of DFT a bit easy and fast.
Using twiddle factor we can write equations of DFT and IDFT as under:
7
Linear transformation
The DFT and IDFT as linear transformation on sequences x(n) and x(k), respectively
as an N-point vector xN of frequency samples and an N X N matrix wN as
x(n) = =
8
With this definitions the N point DFT may be expressed as :
9
Properties of DFT and IDFT
PERIODICITY:
For a given DFT and IDFT pair, if the discreet sequence x(n) is periodic with a period N, then the
N-point DFT of the sequence X(k) is also periodic with the period of N samples.
LINEARITY:
The linearity property states that if X1(k) and X2(k) are the N-point DFTs of x1(n) and x2(n)
respectively and a and b are arbitrary constant then,
10
CIRCULAR TIME SHIFT:
Shifting the sequence in time domain by ‘L’ samples is equivalent to multiplying the sequence in
frequency domain by the twiddle factor.
11
CIRCULAR CONVOLUTION:
The multiplication of two DFT sequences is equivalent to the circular convolution of their
sequences in the time domain
and
TIME REVERSAL
This property basically points to the circular folding of a sequence in a clockwise direction.
When this is done, the DFT of the sequence will also get circularly folded.
12
COMPLEX CONJUGATE PROPERTY
The DFT of a complex conjugate of any sequence is equal to the complex conjugate of the DFT
of that sequence; with the sequence delayed by k samples in the frequency domain.
PARSEVAL’S THEOREM
For a complex valued sequence x(n) and y(n) in general if
then,
13
Discrete Fourier Transform and its
Inverse using MATLAB
CODE FOR DFT
xlabel('Frequency');
ylabel('Phase');
% MATLAB code for DFT
function[Xk] = calcdft(xn,N)
clc;
L=length(xn);
xn=input('Input sequence: ');
if(N<L)
N = input('Enter the number of points: ');
error('N must be greater than or equal to L!!')
Xk=calcdft(xn,N);
end
disp('DFT X(k): ');
x1=[xn, zeros(1,N-L)];
disp(Xk);
for k=0:1:N-1
mgXk = abs(Xk);
for n=0:1:N-1
phaseXk = angle(Xk);
p=exp(-i*2*pi*n*k/N);
k=0:N-1;
W(k+1,n+1)=p;
subplot (2,1,1);
end
stem(k,mgXk);
end
title ('DFT sequence: ');
disp('Transformation matrix for DFT')
xlabel('Frequency');
disp(W);
ylabel('Magnitude');
Xk=W*(x1.')
subplot(2,1,2);
end
stem(k,phaseXk);
title('Phase of the DFT sequence');
14
Output:
>> Input sequence: [1 2 3 4 4 3 2 1]
>> Enter the number of points: 8
15
CODE FOR IDFT
function [xn] = calcidft(Xk) %function to
% MATLAB code for IDFT
calculate IDFT
Xk = input('Input sequence X(k): '); N=length(Xk);
for k=0:1:N-1
xn=calcidft(Xk); for n=0:1:N-1
N=length(xn); p=exp(i*2*pi*n*k/N);
IT(k+1,n+1)=p;
disp('xn'); end
disp(xn); end
disp('Transformation Matrix for IDFT');
n=0:N-1; disp(IT);
xn = (IT*(Xk.'))/N;
stem(n,xn);
end
xlabel('time');
ylabel('Amplitude');
16
Output:
>> Enter the input sequence: [1 2 3 4 4 3 2 1]
17
CONCLUSION
The DFT is one of the most powerful tools in digital signal processing which enables us to find
the spectrum of a finite-duration signal. The DFT is one of the most powerful tools in digital
signal processing which enables us to find the spectrum of a finite-duration signal. And for DFT
we get The Fast Fourier Transform (FFT) which is an implementation of the DFT which
produces almost the same results as the DFT, but it is incredibly more efficient and much faster
which often reduces the computation time significantly.
18
REFERENCES
● https://www.tutorialspoint.com/digital_signal_processing/dsp_discrete_time_frequency_transform.htm
● https://www.geeksforgeeks.org/discrete-fourier-transform-and-its-inverse-using-matlab/
● https://technobyte.org/properties-discrete-fourier-transform-summary-proofs/
19
20