Rajshahi University of Engineering & Technology
Rajshahi University of Engineering & Technology
Submitted by Submitted to
Jubayer Al Mahmud Md Manirul Islam
Roll: 1908056 Assistant Professor
Department of Mechatronics Engineering
Rajshahi University of Engineering & Technology
Objective:
● Develop a program to compute the Discrete Fourier Transform (DFT) using the Fast
Fourier Transform (FFT) algorithm in MATLAB.
● Compute the Inverse Discrete Fourier Transform (IDFT) using the Inverse Fast Fourier
Transform (IFFT) in MATLAB.
Theory:
The Discrete Fourier Transform (DFT) is a fundamental mathematical tool used in signal
processing to convert a discrete-time sequence into its frequency-domain representation. The
DFT transforms a sequence of length N into another sequence of length N by evaluating the
frequency components of the original signal. It is mathematically defined as:
𝑁−1 2π
−𝑗 𝑘𝑛
X(k)= ∑ x(n).𝑒 𝑁
for k=1,2,3,.............,N-1
𝑛=0
Where:
The Inverse Discrete Fourier Transform (IDFT) converts the frequency-domain sequence back
into the time domain and is given by:
𝑁−1 2π
1 𝑗 𝑘𝑛
x(n)= 𝑁
∑ X(k).𝑒 𝑁
𝑘=0
The Fast Fourier Transform (FFT) is an efficient algorithm to compute the DFT and IDFT with a
time complexity of O(NlogN), which is significantly faster than the direct computation of DFT,
2
which has a time complexity of O(𝑁 ).
MATLAB Code:
% Define the input sequence
X_fft = fft(x);
x_ifft = ifft(X_fft);
disp('Original Sequence:');
disp(x);
disp(X_fft);
disp(x_ifft);
Output:
Explanation of Code:
Discussion:
The DFT computation using FFT allows for efficient transformation of a time-domain signal
into the frequency domain. In this experiment, the fft function in MATLAB was used to
compute the DFT of a given sequence. The FFT reduces the computational complexity, making it
practical to analyze long sequences. The output of the FFT is a sequence of complex numbers
that represent the amplitude and phase of different frequency components in the original signal.
This frequency-domain representation is critical for tasks like filtering, spectral analysis, and
system identification.
The Inverse DFT (IDFT), computed using the ifft function, reconstructs the original
time-domain sequence from its frequency-domain representation. This process verifies that the
FFT and IFFT are inverse operations, and they allow signals to be transformed back and forth
between time and frequency domains without loss of information. The results from the IDFT are
consistent with the original sequence, showing that the transformation is accurate and reversible.
The ability to efficiently compute both DFT and IDFT is essential in numerous applications,
including digital signal processing, image processing, and communications systems.
Conclusion: