0% found this document useful (0 votes)
37 views6 pages

Lab Report 05

This lab report discusses a digital signal processing lab experiment on the discrete Fourier transform (DFT), fast Fourier transform (FFT), and using FFT to remove noise from speech signals. The objective was to gain knowledge of DFT, FFT. Code is provided to calculate DFT and FFT for various sample sizes and signals. Results show plots of the DFT, FFT, and inverse FFT for sample sizes of 32 and 128. The experiment helped learn how to plot the DFT and calculate values at any point, as well as measure the IFFT and FFT.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views6 pages

Lab Report 05

This lab report discusses a digital signal processing lab experiment on the discrete Fourier transform (DFT), fast Fourier transform (FFT), and using FFT to remove noise from speech signals. The objective was to gain knowledge of DFT, FFT. Code is provided to calculate DFT and FFT for various sample sizes and signals. Results show plots of the DFT, FFT, and inverse FFT for sample sizes of 32 and 128. The experiment helped learn how to plot the DFT and calculate values at any point, as well as measure the IFFT and FFT.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

LAB REPORT 04

Course code: EEE 304

Course title: Digital Signal Processing Lab

Submitted by:

Name: Kazi Israkul Haque

ID: 181016018

Submitted to:

Dr. Abul Barkat Mollah Sayeed Ud Doulah

Assistant Professor, Dept. of EEE, ULAB

Date of experiment: 21/08/2021

Date of submission: 26/08/2021


Objective:
The objective of this experiment is to gain knowledge DFT. FFT and also using FFT to remove noise from noisy
speech.

Answer to question no: 01


clear all;
close all;
N = 64;
n = 0: (N-1);
x = 2*sin(2*pi*(5/16)*n) + 5*sin(2*pi*(5/8)*n); subplot(511)
stem(x)
for k = 0: N-1 m = k + 1;
expo_term = exp(-j*2*pi*k*n / N); mult_term = x.*expo_term;
X(m) = sum(mult_term);

end
X_mag = abs(X);
subplot(512);
stem(X_mag);
% FFT
X2 = fft(x);
X_fft = abs(fft(X2));
subplot(513);
stem(X_fft);
%IFFT
x_ifft = ifft(X2);
X_ifft = ifft(X2);
subplot(514);
stem(x_ifft);
%DFT
N=4;
x=[2 3 -1 4];
t=0:N-1;
subplot(311);
stem(t,x);
xlabel('Time (s)');
ylabel('Amplitude');
title('Input sequence')
subplot(312);
stem(0:N-1,abs(fft(x)));
xlabel('Frequency');
ylabel('|X(k)|');
title('Magnitude Response');
subplot(313);
stem(0:N-1,angle(fft(x)));
xlabel('Frequency');
ylabel('Phase');
title('Phase Response');
Results:
Answer to the question no: 02
For 32:

clear all;
close all;
clc;

N = 32;
n = 0: (N-1);
x = 2*sin(2*pi*(5/16)*n) + 5*sin(2*pi*(5/8)*n);
subplot(511);
stem(x);
for k = 0: N-1 m = k + 1;
expo_term = exp(-j*2*pi*k*n / N); mult_term = x.*expo_term;
X(m) = sum(mult_term);

end

For 128

clear all;
close all;
clc;
N = 128;
n = 0: (N-1);

x = 2*sin(2*pi*(5/16)*n) + 5*sin(2*pi*(5/8)*n);
subplot(511);
stem(x);
for k = 0: N-1 m = k + 1;
expo_term = exp(-j*2*pi*k*n / N); mult_term = x.*expo_term;
X(m) = sum(mult_term);

end

Results:

Pic: for 32
Pic: for 128

For both:

clear all;
close all;
clc;

N = 32;
n = 0: (N-1);
x = 2*sin(2*pi*(5/16)*n) + 5*sin(2*pi*(5/8)*n);
subplot(511);
stem(x);
for k = 0: N-1 m = k + 1;
expo_term = exp(-j*2*pi*k*n / N); mult_term = x.*expo_term;
X(m) = sum(mult_term);

end

% for 128
N = 128;
n = 0: (N-1);

x = 2*sin(2*pi*(5/16)*n) + 5*sin(2*pi*(5/8)*n);
subplot(512);
stem(x);
for k = 0: N-1 m = k + 1;
expo_term = exp(-j*2*pi*k*n / N); mult_term = x.*expo_term;
X(m) = sum(mult_term);

end
Pic: For both 32 and 128

Discussion: In our experiment we learn how to plot the dft and we can calculate the any point and also measuring
the ifft and fft and also plot them. We also repeat the value for the 32 and 128 and find the accurate results.

You might also like