Reply by Jerry Avins March 24, 20092009-03-24
HyeeWang wrote:
> How can I get a smooth straight line corrsponding with the spectra of > white noise? > > As we know, the spectra of white noise should be a smooth straight > line.
Sure, if you measure for infinite time. As we know, any one instance of a random process has random variation!
> But I ploted it using matlab and did not get the desired > result,although I raised the length of DFT a lot. > > What is matter? > > Following is my matlab script to illustrate it. > > N = 256; > x = randn(N,1); > X = fft(x); > X = abs(X); > > y = randn(N*N,1); > Y = fft(y); > Y = abs(Y); > > subplot 211; > plot(X); > grid; > subplot 212; > plot(Y); > grid; > > Any comments would be appreciated! > > HyeeWang@Gmail.com
-- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by Rune Allnor March 24, 20092009-03-24
On 24 Mar, 08:51, HyeeWang <hyeew...@gmail.com> wrote:
> How can I get a smooth straight line corrsponding with the spectra of > white noise? > > As we know, the spectra of white noise should be a smooth straight > line.
Nope. It's the _expected_ value of the spectrum of the _true_autocorrelation_function_ that should be a smooth constant line. These are two infinite averages: 1) The autocorrelation is averaged over infinitely many time lags for each realization. 2) The expected value is averaged over infinitely many realizations. Rune
Reply by Rick Lyons March 24, 20092009-03-24
On Tue, 24 Mar 2009 00:51:02 -0700 (PDT), HyeeWang
<hyeewang@gmail.com> wrote:

>How can I get a smooth straight line corrsponding with the spectra of >white noise? > >As we know, the spectra of white noise should be a smooth straight >line. > >But I ploted it using matlab and did not get the desired >result,although I raised the length of DFT a lot. > >What is matter? >
[snipped by Lyons] Hi HyeeWang, Ha ha. You've discovered an extremely important characteristic of the discrete Fourier transform (DFT). The variance (fluctuations) of individual spectral measurements, DFT values, of noisy signals is very high. That is, repeat your code many times and look at the different values you obtain for, say, |X(54)|. Those measured values will fluctuate a lot. And as you noticed, increasing the DFT size will NOT reduce the fluctuations in repeated computed values of |X(54|. The MATLAB Signal Processing Toolbox User's Manual (I think that's the correct title) gives a fairly comprehensive explanation of this DFT behavior, and discusses things like "Bartlett's Method" and "Welch's Method" regarding spectral analysis. (You can Google those methods for more information.) In any case, the bottom line here is what Julius suggested. That is, average multiple DFT magnitude (or power) sequences, and the "averaged" sequence will start to look like the smooth "line" that you desire. [-Rick-]
Reply by julius March 24, 20092009-03-24
On Mar 24, 3:51&#4294967295;am, HyeeWang <hyeew...@gmail.com> wrote:
> How can I get a smooth straight line corrsponding with the spectra of > white noise? > > As we know, the spectra of white noise should be a smooth straight > line. > > But I ploted it using matlab &#4294967295;and did not get the desired > result,although I raised the length of DFT a lot. > > What is matter? >
The spectrum of a stationary signal is the AVERAGE of the magnitude of its Fourier transform. Mathematically, Pxx(f) = E[ |X(f)|^2 ]. So in other words, you need to compute several (squared) magnitudes and average over them for it to look flat. Julius
Reply by SG March 24, 20092009-03-24
On 24 Mrz., 08:51, HyeeWang <hyeew...@gmail.com> wrote:
> How can I get a smooth straight line corrsponding with the spectra of > white noise? > [...] > Following is my matlab script to illustrate it. > [...]
Use "pwelch" with appropriate window/overlap settings. Cheers! SG
Reply by dbd March 24, 20092009-03-24
On Mar 24, 12:51 am, HyeeWang <hyeew...@gmail.com> wrote:
> How can I get a smooth straight line corrsponding with the spectra of > white noise?
Plot the continuous domain spectum.
> > As we know, the spectra of white noise should be a smooth straight > line.
Only in the continuous domain.
> > But I ploted it using matlab and did not get the desired > result,although I raised the length of DFT a lot. > > What is matter?
You went to a discrete domain where your statement about a white noise spectrum is not valid.
> > Following is my matlab script to illustrate it. > > N = 256; > x = randn(N,1); > X = fft(x); > X = abs(X); > > y = randn(N*N,1); > Y = fft(y); > Y = abs(Y); > > subplot 211; > plot(X); > grid; > subplot 212; > plot(Y); > grid; > > Any comments would be appreciated! > > HyeeW...@Gmail.com
Dale B. Dalrymple
Reply by HyeeWang March 24, 20092009-03-24
How can I get a smooth straight line corrsponding with the spectra of
white noise?

As we know, the spectra of white noise should be a smooth straight
line.

But I ploted it using matlab  and did not get the desired
result,although I raised the length of DFT a lot.

What is matter?

Following is my matlab script to illustrate it.

N = 256;
x = randn(N,1);
X = fft(x);
X = abs(X);

y = randn(N*N,1);
Y = fft(y);
Y = abs(Y);

subplot 211;
plot(X);
grid;
subplot 212;
plot(Y);
grid;

Any comments would be appreciated!

HyeeWang@Gmail.com