DSPRelated.com
Forums

PSD of white noise NOT flat?

Started by BreadPaPa February 5, 2009
Hi, all,

I would like to generate a white noise whose power spectral density is 1(
flat over all frequency). I used Matlab function wgn to get it:
   wn=wgn(1,10000,1,'linear');
Does the function above generate a white gaussian noise whose PSD is 1?

Then I did simple experiment to check its PSD. I used Matlab function
periodogram without any window:
   [p,w]=periodogram(wn);
   figure; plot(w,p);
Theoretically, the PSD of a white noise should be flat( or at least flat
looking in numerical computation). But the plot showed the PSD of wn is
totally noisy, no flat looking at all. So I got confused about that.

Could you guys check if I made mistake here? Can you figure a way to
generate white noise whose PSD is 1 in Matlab? Thanks a lot!

Steve


On 5 Feb, 17:28, "BreadPaPa" <iamstevew...@yahoo.com> wrote:
> Hi, all, > > I would like to generate a white noise whose power spectral density is 1( > flat over all frequency). I used Matlab function wgn to get it: > &#4294967295; &#4294967295;wn=wgn(1,10000,1,'linear'); > Does the function above generate a white gaussian noise whose PSD is 1?
Check the documentation.
> Then I did simple experiment to check its PSD. I used Matlab function > periodogram without any window: > &#4294967295; &#4294967295;[p,w]=periodogram(wn); > &#4294967295; &#4294967295;figure; plot(w,p); > Theoretically, the PSD of a white noise should be flat( or at least flat > looking in numerical computation). But the plot showed the PSD of wn is > totally noisy, no flat looking at all. So I got confused about that.
The statistsics of stochastic processes are valid over double infinites: Infinite numbers of sequences, which each are infinetly long. You are working with one sequence which is finitely long. Rune
On 2009-02-05 12:28:44 -0400, "BreadPaPa" <iamstevewang@yahoo.com> said:

> Hi, all, > > I would like to generate a white noise whose power spectral density is 1( > flat over all frequency). I used Matlab function wgn to get it: > wn=wgn(1,10000,1,'linear'); > Does the function above generate a white gaussian noise whose PSD is 1? > > Then I did simple experiment to check its PSD. I used Matlab function > periodogram without any window: > [p,w]=periodogram(wn); > figure; plot(w,p); > Theoretically, the PSD of a white noise should be flat( or at least flat > looking in numerical computation). But the plot showed the PSD of wn is > totally noisy, no flat looking at all. So I got confused about that. > > Could you guys check if I made mistake here? Can you figure a way to > generate white noise whose PSD is 1 in Matlab? Thanks a lot! > > Steve
You have a periodogram just like the name says. It is not a CONSISTENT estimator as it has no averaging. If it were consistent then it would have a limiting distribution which got narrower until it was pragmatically a constant. To get the sort of thing you were expecting you will have to do some spectral averaging. Probabely the best thing would be to read a bit more of your text book. The lack of consistency confused a whole lot of folks back about 1900 but there has been better understanding since the 1930s. You could get a lot of periodograms and see if their mean is like what you expect. The individual periodogram values are distributed as the sum of 2 Gaussians squared or Chi Square on 2 degress of freedom or exponential depening on which name you prefer. Or you could do one of the smoothed estimators. But this is such a basic confusion that it is not clear what level of understanding you have so one could make a recommendation that you would be able to follow. Otherwise you got white Gaussian noise.
On Feb 6, 5:28&#4294967295;am, "BreadPaPa" <iamstevew...@yahoo.com> wrote:
> Hi, all, > > I would like to generate a white noise whose power spectral density is 1( > flat over all frequency). I used Matlab function wgn to get it: > &#4294967295; &#4294967295;wn=wgn(1,10000,1,'linear'); > Does the function above generate a white gaussian noise whose PSD is 1? > > Then I did simple experiment to check its PSD. I used Matlab function > periodogram without any window: > &#4294967295; &#4294967295;[p,w]=periodogram(wn); > &#4294967295; &#4294967295;figure; plot(w,p); > Theoretically, the PSD of a white noise should be flat( or at least flat > looking in numerical computation). But the plot showed the PSD of wn is > totally noisy, no flat looking at all. So I got confused about that. > > Could you guys check if I made mistake here? Can you figure a way to > generate white noise whose PSD is 1 in Matlab? Thanks a lot! > > Steve
Oh... you must average over hundreds of ensembles.
On Thu, 05 Feb 2009 10:28:44 -0600, BreadPaPa wrote:

> Hi, all, > > I would like to generate a white noise whose power spectral density is > 1( flat over all frequency). I used Matlab function wgn to get it: > wn=wgn(1,10000,1,'linear'); > Does the function above generate a white gaussian noise whose PSD is 1? > > Then I did simple experiment to check its PSD. I used Matlab function > periodogram without any window: > [p,w]=periodogram(wn); > figure; plot(w,p); > Theoretically, the PSD of a white noise should be flat( or at least flat > looking in numerical computation). But the plot showed the PSD of wn is > totally noisy, no flat looking at all. So I got confused about that. > > Could you guys check if I made mistake here? Can you figure a way to > generate white noise whose PSD is 1 in Matlab? Thanks a lot! > > Steve
(sigh). Study stochastic processes until you understand the difference between an expectation value of a process, and the value of one sample of the process. Then come back and ask your question again, if you still think it makes sense. -- http://www.wescottdesign.com