Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: dBm plot of frequency spectrum of signal
Replies: 2   Last Post: Apr 8, 2013 9:51 PM

 Timothy Rink Posts: 1 Registered: 4/10/13
Re: dBm plot of frequency spectrum of signal
Posted: Apr 8, 2013 9:51 PM

"Abhay Kumar" <akumar.elex@dauniv.ac.in> wrote in message <eed0992.0@webx.raydaftYaTP>...
> shahida wrote:
> >
> >
> >
> > i want to plot frequency spectrum of a signal dBm vs frequency.
> > e-g. for following signal
> > t=(0:1:100)/10e3;
> > s=sin(2*pi*t*1e3);
> >
> > Hi

> Thats pretty simple
>
> s1=fft(s);
> w=(0:length(s1)/2)*1/2% generate frequencies
> s2=10*log10(s1.*conj(s1)*1e3)%power in dBm
> plot(w,s2(1:length(w)))
>
> hope it helps
> Dr. A. Kumar

Thanks for your input, Dr. Kumar. That formula is correct, but I wanted to add that this particular formula is normalized to a system impedance of 1 ohm. A more generalized form would include the system impedance:
R=50;
s2=10*log10((s1.*conj(s1))/R*1e3);

A good article that goes into depth about plotting a power spectrum can be found here:
http://www.bitweenie.com/listings/power-spectrum-matlab/

That website also included some interesting information on single-sided and double-sided power spectrums.