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

EE-338. DSP. Computation Assignment 2 Palash Jhabak 08d07044

Two sinusoidal signals were added to create a composite signal, which was then combined with additive white Gaussian noise. The document analyzes the Fourier transforms of the original signal and noisy signal using different window lengths and FFT sizes. Key findings include that longer FFT sizes provide more accurate frequency estimation and Hamming windows produce broader peaks than rectangular windows. Plots were generated to visualize the Fourier transforms.

Uploaded by

Palash Jhabak
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
74 views6 pages

EE-338. DSP. Computation Assignment 2 Palash Jhabak 08d07044

Two sinusoidal signals were added to create a composite signal, which was then combined with additive white Gaussian noise. The document analyzes the Fourier transforms of the original signal and noisy signal using different window lengths and FFT sizes. Key findings include that longer FFT sizes provide more accurate frequency estimation and Hamming windows produce broader peaks than rectangular windows. Plots were generated to visualize the Fourier transforms.

Uploaded by

Palash Jhabak
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
You are on page 1/ 6

EE-338. DSP.

Computation Assignment 2 Palash Jhabak 08d07044


Signal x1 and x2. Both sinosoidal. x=x1+x2, required resultant signal. y=x+n where n being the additive white guassian noise.

Above is the sceenshot of the Signal + Noise in the time domain.

FFT of the singal + noise with first being a 100 point FFT and second being a 1000 point FFT

FFT of the filtered signal with Hamming window of length 50 ( first if FFT with 100 points and second is with 1000 points ).

FFT of the filtered signal with Hamming window of length 100 ( first if FFT with 100 points and second is with 1000 points ).

FFT of the filtered signal with Kaiser window of length 50 ( first if FFT with 100 points and second is with 1000 points ).

FFT of the filtered signal with Kaiser window of length 100 ( first if FFT with 100 points and second is with 1000 points ).

Observations 1. It can be seen from the above 6 graphs that the a larger length dft gives a more correct measurement of frequency estimation. 2. Output with normal fft is similar to that of with Kaiser Window 3. Hamming window gives a more elongated/brader fft peaks, due to smoothening of edges. 4. Hamming window is better than rectangular window Code a1=100; % Declaring parameters for the Sinosoidal wave a2=25; f1=100; f2=150; fs=1000; % sampling frequency %n=[1:1000]; for n=1:1000 x1(n)=a1*sin(2*pi*f1*n/fs); %1st sine wave x2(n)=a2*sin(2*pi*f2*n/fs); %2nd sine wave x(n)=x1(n)+x2(n); %required signal end x1_fft=abs(fft(x1,1000)); x2_fft=abs(fft(x2,1000)); x_fft=abs(fft(x,1000)); y=awgn(x,12,'measured'); %adding additive white guassian noise to the signal x . adding % 'measured' will ensure that it calculates the % signal power before adding noise. y_fft_100=abs(fft(y,100)); y_fft_1000=abs(fft(y,1000)); hamming_50=hamming(50); % creating hamming windows hamming_100=hamming(100); kaiser_50=kaiser(50); kaiser_100=kaiser(100);

%x_hammed50=x.*hamming_50'; % point wise multiplying with the transpose % of the hamming window for a=1:100 x_hammed100(a)=x(a)*hamming_100(a); end for b=1:50 x_hammed50(b)=x(b)*hamming_50(b); end for c=1:100

x_kaiser100(c)=x(c)*kaiser_100(c); end for d=1:50 x_kaiser50(d)=x(d)*kaiser_50(d); end

xhammed50_fft_100=abs(fft(x_hammed50,100)); xhammed50_fft_1000=abs(fft(x_hammed50,1000)); xhammed100_fft_100=abs(fft(x_hammed100,100)); xhammed100_fft_1000=abs(fft(x_hammed100,1000)); xkaiser50_fft_100=abs(fft(x_kaiser50,100)); xkaiser50_fft_1000=abs(fft(x_kaiser50,1000)); xkaiser100_fft_100=abs(fft(x_kaiser100,100)); xkaiser100_fft_1000=abs(fft(x_kaiser100,1000)); gcf1=figure(1); set(gcf1,'name','FFT of the signal with noise. 100pt and 1000pt. respectively','numbertitle','off') subplot(1,2,1); plot(y_fft_100); subplot(1,2,2); plot(y_fft_1000); gcf2=figure(2); set(gcf2,'name','FFT with hammed window of length 100. 100pt and 1000pt. respectively','numbertitle','off') subplot(1,2,1); plot(xhammed100_fft_100); subplot(1,2,2); plot(xhammed100_fft_1000); gcf3=figure(3); set(gcf3,'name','FFT with hammed window of length 50. 100pt and 1000pt. respectively','numbertitle','off') subplot(1,2,1); plot(xhammed50_fft_100); subplot(1,2,2); plot(xhammed50_fft_1000);

gcf4=figure(4); set(gcf4,'name','FFT with kaiser window of length 100. 100pt and 1000pt. respectively','numbertitle','off') subplot(1,2,1); plot(xkaiser100_fft_100); subplot(1,2,2); plot(xkaiser100_fft_1000); gcf5=figure(5); set(gcf5,'name','FFT with kaiser window of length 50. 100pt and 1000pt.

respectively','numbertitle','off') subplot(1,2,1); plot(xkaiser50_fft_100); subplot(1,2,2); plot(xkaiser50_fft_1000); gcf6=figure(6); set(gcf6,'name','Signal witn noise in time domain','numbertitle','off') plot(y);

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy