Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Matlab embeded PSD function

Status
Not open for further replies.

neoflash

Advanced Member level 1
Joined
Jul 2, 2005
Messages
492
Helped
10
Reputation
20
Reaction score
2
Trophy points
1,298
Activity points
4,759
matlab psd

%EXAMPLE: Spectral analysis of a signal that contains a 200Hz cosine plus noise.
Fs = 1000; t = 0:1/Fs:.296;
x = cos(2*pi*t*200);
h = spectrum.welch; % Instantiate a welch object.
psd(h,x,'Fs',Fs); % Plot the one-sided PSD.


Folks:

I am curious about above example in matlab. I run this example and found that the PSD is much like what we get from sprectrum analyzer.

However, the psd function for a cosine wave shouldn't be a impulse function located at ω?

What's wrong?
 

psd matlab

Hi

If numberof samples approach infinity, the psd of the cosine approaches to a impulse.
So increasing number of sources sharpen spectrum of the cosine waveform.

Regards
 

matlab psd function

You specified "Welch", and that applies Hamming weighting, so you no longer have a cosine wave. Hamming weighting spreads the peak and causes sidelobes 42dB below the peak.
 

psd in matlab

what is the purpose of doing that? Can echo47 introduce it briefly? or give me some doc as reference?

thanks
 

matlab psd example

Very briefly, we normally apply a "window" to the data before doing an FFT. Otherwise, the time-domain discontinuities at the beginning and end of the data can pollute the frequency spectrum.

MATLAB's help has some info on "windows", but you can learn more from any book about digital signal processing (or search Google).
 

    neoflash

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top