next up previous contents
Next: Spectrogram Up: Power Spectrum Previous: Power Spectrum of an   Contents

Power spectrum of white noise and filtered noise

White noise is a signal whose power spectrum is homogeneously distributed across frequencies. In this chapter we are going to generate a long random signal by using `rand' with the option `normal'. Then we will calculate its power spectrum.

Once we have produced a `flat' power spectrum coming from Gaussian noise, we can eliminate some frequencies by filtering to get `colored noise'. We can check the behavior of a system by comparing both spectra.

The next code designs a low-pass filter at 0.25 Hz and applies the filter to white noise. Notice that frequencies above 50 are negative corresponding to


-->rand('normal');
 
-->rand('seed',0);

-->x = rand(1,20000);
 
-->lysis = iir(5,'lp','butt',[.25 0],[0 0]);
 
-->y = flts(x,lysis);
 
 
-->N = 100;
 
-->inct = 1;
 
-->incf = 1 / (N * inct);
 
-->fre = [0:(N-1)] * incf;
 
-->xbasc()
 
-->xsetech([0,0,1/2,1/2])
 
-->plot (x(1:100))
 
 
-->xsetech([1/2,0,1/2,1/2])
 
-->plot2d(fre,pspect(50,100,'re',x));
 
 
-->xsetech([0,1/2,1/2,1/2])
 
-->plot(y(1:100));
 
 
-->xsetech([1/2,1/2,1/2,1/2])
 
-->plot2d(fre,pspect(50,100,'re',y));

Figure 12.6: The top line of frames represents the original signal (random noise) and its spectrum. The spectrum is more or less flat. The bottom line of frames represents the low-pass filtered signal and its spectrum. Notice that frequencies above 0.5 are a form of representing negative frequencies and that since low-pass filter eliminated high frequencies, components above 0.25 Hz have disappeared.
\begin{figure}
\epsfbox{figures/noise1.eps}
\end{figure}

If we regroup the frequency axis to show the effect of the filter, we can clearly see the proper behavior of the filter.

Now we can repeat the process by applying a high-pass filter


-->lysis = iir(5,'hp','butt',[.25 0 ],[0 0]);
 
-->y = flts(x,lysis);
 
-->xbasc()
  
-->xsetech([0,0,1/2,1/2])
 
-->plot (x(1:100))
 
-->xsetech([1/2,0,1/2,1/2])
 
-->plot2d(fre,pspect(50,100,'re',x));
  
-->xsetech([0,1/2,1/2,1/2]) 
 
-->plot(y(1:100));
  
-->xsetech([1/2,1/2,1/2,1/2])
 
-->plot2d(fre,pspect(50,100,'re',y));

Figure 12.7: Figure similar to the previous one representing the result of a high-pass filter. Notice that frequencies above 0.50 are a form of representing negative frequencies and that since high-pass filter eliminated low frequencies, components under 0.25 Hz have disappeared. (Since sampling rate has not been specified, it has been considered `1' in both figures)
\begin{figure}
\epsfbox{figures/noise2.eps}
\end{figure}

We can see that we start with white noise whose spectrum is homogeneously distributed and we eliminate some frequencies by filtering. In the left frames we can see the effect in time domain. The disappearance of some frequencies is also evident without spectral analysis.

We could generalize this idea and consider a signal (for instance an EEG trace) as the result of applying a filter to white noise. We could study the parameters of this filter as a way to simplify the description of the signal or to analyze its modifications in time (for instance to detect the transition between wakefulness and sleep).


next up previous contents
Next: Spectrogram Up: Power Spectrum Previous: Power Spectrum of an   Contents
je 2006-10-13