|
"maria " <rosariamaria@hotmail.it> wrote in message <j9jns1$hvh$1@newscl01ah.mathworks.com>...
> "Wayne King" wrote in message <j9j7md$jmr$1@newscl01ah.mathworks.com>...
> > "maria " <rosariamaria@hotmail.it> wrote in message <j9j4m5$alf$1@newscl01ah.mathworks.com>...
> > > Good evening,
> > > i am new in signal processing.
> > > I am trying to study noise signal from a sensor pressure and I would like to evaluate its power spectrum.
> > >
> > > I have used in Matlab the SPtool and I have imported my signal into the toolbox and specified a sampling rate frequency. Then I have used the Create Spectra with FFT Option to create the periodogram of my datas.
> > >
> > > I would like to ask some theorical questions. In the spectra plot it is showed the Y- axis in dB. My noise signal is showed at around -100 dB. I know from the theory that dB has the meaning of a comparative measurement. What is in this case the reference from which the spectra dB is computed? What meaning can I address to a negative value of dB?
> > >
> > > Hope to receive an answer soon,
> > >
> > > regards
> > >
> > > Mary
> >
> > Hi Mary, a zero-mean white noise process (not saying you have a white noise process) has a power spectral density that depends on both the variance and the sampling interval.
> >
> > I'll give you a command line example. Let's assume the data is sampled at 1000 Hz.
> >
> > x = detrend(randn(1000,1),0);
> > psdest = psd(spectrum.periodogram,x,'Fs',1000,'NFFT',length(x));
> > plot(psdest.Frequencies(2:end),10*log10(psdest.Data(2:end)));
> >
> > You see that the power spectral density fluctuates around -30 dB. That's because the variance is 1 and the sampling interval is 0.001.
> >
> > Now see what happens if the sampling frequency is 10,000 Hz.
> >
> > psdest = psd(spectrum.periodogram,x,'Fs',10000,'NFFT',length(x));
> > plot(psdest.Frequencies(2:end),10*log10(psdest.Data(2:end)));
> >
> > Now the PSD estimate fluctuates around -40 dB. 10*log10(1*1e-4)
> >
> > Finally, increase the variance of the white noise process to 16
> >
> > x = detrend(4*randn(1000,1),0);
> > % use a sampling frequency of 1000 Hz again
> > psdest = psd(spectrum.periodogram,x,'Fs',1000,'NFFT',length(x));
> > plot(psdest.Frequencies(2:end),10*log10(psdest.Data(2:end)));
> >
> > You see the PSD fluctuates around 10*log10(16*0.001) (approx. -17 dB)
> >
> > Wayne
>
>
> Ok so lets say I have a signal from sensor, which i suppose to be white noise. I sample this signal at 1200 Hz. How can i calculate its variance?
If it's white noise, one thing you can do is to look at the autocorrelation at zero lag.
rng default;
x = sqrt(2)*randn(1000,1);
[c,lags] = xcorr(x,1);
varest = c(2)/length(x)
% answer here is 1.99
The other is to use the periodogram
% Using the periodogram
psdest = psd(spectrum.periodogram,detrend(x,0),'Fs',1000);
varest = mean(psdest.Data(2:end))/(2*0.001)
|