Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 2

24

EXPERIMENT-6

AIM: To Estimate Power Spectrum by Using Bartlett and Welch Method


SOFTWARE REQUIRED: Matlab7.0.1
PROGRAMS:
BARTLETT (PERIODOGRAM) METHOD
fs = 1000;
% Sampling frequency
t = (0:fs)/fs;
% One second worth of samples
A = [1 2];
% Sinusoid amplitudes (row vector)
f = [150;140];
% Sinusoid frequencies (column vector)
xn = A*sin(2*pi*f*t) + 0.1*randn(size(t));
Hs = spectrum.periodogram('Hamming');
psd(Hs,xn,'Fs',fs,'NFFT',1024,'SpectrumType','onesided')

OUTPUT WAVEFORM :

25
WELCH (MODIFIED PERIODOGRAM) METHOD
fs = 1000;
% Sampling frequency
t = (0:fs/10)./fs;
% One-tenth second worth of samples
A = [1 2];
% Sinusoid amplitudes
f = [150;140];
% Sinusoid frequencies
xn = A*sin(2*pi*f*t) + 0.1*randn(size(t));
Hrect = spectrum.periodogram;
psd(Hrect,xn,'Fs',fs,'NFFT',1024);

OUTPUT WAVEFORM :

RESULT: The Power Spectrum Is Estimated By Using Bartlett and Welch Methods.

You might also like