I have a lot of signals and I would like to figure out the averaged spectrum. How can I perform the rms spectral averaging in matlab? I want to perform the averaging explained at page 5 on this pdf http://www.thinksrs.com/downloads/PDFs/ApplicationNotes/AboutFFTs.w
thanks
Pietro
|
|
0
|
|
|
|
Reply
|
pietro
|
11/15/2010 11:47:04 PM |
|
"pietro " <bracardi82@email.it> wrote in message <ibsgpo$9cd$1@fred.mathworks.com>...
> I have a lot of signals and I would like to figure out the averaged spectrum. How can I perform the rms spectral averaging in matlab? I want to perform the averaging explained at page 5 on this pdf http://www.thinksrs.com/downloads/PDFs/ApplicationNotes/AboutFFTs.w
>
> thanks
> Pietro
This is the properly link, in which it is explained the rms speactra averaging
http://www.thinksrs.com/downloads/PDFs/ApplicationNotes/AboutFFTs.pdf
|
|
0
|
|
|
|
Reply
|
pietro
|
11/16/2010 8:27:04 AM
|
|
"pietro " <bracardi82@email.it> wrote in message <ibtf8n$g7f$1@fred.mathworks.com>...
> "pietro " <bracardi82@email.it> wrote in message <ibsgpo$9cd$1@fred.mathworks.com>...
> > I have a lot of signals and I would like to figure out the averaged spectrum. How can I perform the rms spectral averaging in matlab? I want to perform the averaging explained at page 5 on this pdf http://www.thinksrs.com/downloads/PDFs/ApplicationNotes/AboutFFTs.w
> >
> > thanks
> > Pietro
>
> This is the properly link, in which it is explained the rms speactra averaging
>
> http://www.thinksrs.com/downloads/PDFs/ApplicationNotes/AboutFFTs.pdf
Hi Pietro, This is what they call their "linear weighting"
t = linspace(0,1,1000);
x = cos(2*pi*250*t)';
for k = 1:10
y = x+randn(size(x));
ydft(:,k) = abs(fft(y));
end
xdftavg = mean(ydft,2);
I've used a two-sided spectral estimate here. If you only want one-sided, you just need to make the necessary adjustment. You can also do this with spectral objects if you have the Signal Processing Toolbox as follows:
hper = spectrum.periodogram;
for k = 1:10
y = x+randn(size(x));
psdest = psd(hper,y,'NFFT',length(y),'Fs',1000);
yper(:,k) = psdest.Data;
end
xdftavg = mean(yper,2);
plot(psdest.Frequencies,10*log10(xdftavg));
Note this results in a one-sided estimate by default.
Hope that helps,
Wayne
|
|
0
|
|
|
|
Reply
|
Wayne
|
11/16/2010 11:36:03 AM
|
|
"Wayne King" <wmkingty@gmail.com> wrote in message <ibtqb3$8fp$1@fred.mathworks.com>...
> "pietro " <bracardi82@email.it> wrote in message <ibtf8n$g7f$1@fred.mathworks.com>...
> > "pietro " <bracardi82@email.it> wrote in message <ibsgpo$9cd$1@fred.mathworks.com>...
> > > I have a lot of signals and I would like to figure out the averaged spectrum. How can I perform the rms spectral averaging in matlab? I want to perform the averaging explained at page 5 on this pdf http://www.thinksrs.com/downloads/PDFs/ApplicationNotes/AboutFFTs.w
> > >
> > > thanks
> > > Pietro
> >
> > This is the properly link, in which it is explained the rms speactra averaging
> >
> > http://www.thinksrs.com/downloads/PDFs/ApplicationNotes/AboutFFTs.pdf
>
> Hi Pietro, This is what they call their "linear weighting"
>
> t = linspace(0,1,1000);
> x = cos(2*pi*250*t)';
> for k = 1:10
> y = x+randn(size(x));
> ydft(:,k) = abs(fft(y));
> end
>
> xdftavg = mean(ydft,2);
>
> I've used a two-sided spectral estimate here. If you only want one-sided, you just need to make the necessary adjustment. You can also do this with spectral objects if you have the Signal Processing Toolbox as follows:
>
> hper = spectrum.periodogram;
> for k = 1:10
> y = x+randn(size(x));
> psdest = psd(hper,y,'NFFT',length(y),'Fs',1000);
> yper(:,k) = psdest.Data;
> end
> xdftavg = mean(yper,2);
> plot(psdest.Frequencies,10*log10(xdftavg));
>
> Note this results in a one-sided estimate by default.
>
> Hope that helps,
> Wayne
thanks a lot, maybe I haven't understood the code, but it doesn't figure out the rms averaging, doesn't it?
Try to take a look at this link:
http://zone.ni.com/reference/en-XX/help/371361E-01/lvanlsconcepts/average_improve_measure_freq/
|
|
0
|
|
|
|
Reply
|
pietro
|
11/16/2010 2:47:03 PM
|
|
"pietro " <bracardi82@email.it> wrote in message <ibu5h7$5mb$1@fred.mathworks.com>...
> "Wayne King" <wmkingty@gmail.com> wrote in message <ibtqb3$8fp$1@fred.mathworks.com>...
> > "pietro " <bracardi82@email.it> wrote in message <ibtf8n$g7f$1@fred.mathworks.com>...
> > > "pietro " <bracardi82@email.it> wrote in message <ibsgpo$9cd$1@fred.mathworks.com>...
> > > > I have a lot of signals and I would like to figure out the averaged spectrum. How can I perform the rms spectral averaging in matlab? I want to perform the averaging explained at page 5 on this pdf http://www.thinksrs.com/downloads/PDFs/ApplicationNotes/AboutFFTs.w
> > > >
> > > > thanks
> > > > Pietro
> > >
> > > This is the properly link, in which it is explained the rms speactra averaging
> > >
> > > http://www.thinksrs.com/downloads/PDFs/ApplicationNotes/AboutFFTs.pdf
> >
> > Hi Pietro, This is what they call their "linear weighting"
> >
> > t = linspace(0,1,1000);
> > x = cos(2*pi*250*t)';
> > for k = 1:10
> > y = x+randn(size(x));
> > ydft(:,k) = abs(fft(y));
> > end
> >
> > xdftavg = mean(ydft,2);
> >
> > I've used a two-sided spectral estimate here. If you only want one-sided, you just need to make the necessary adjustment. You can also do this with spectral objects if you have the Signal Processing Toolbox as follows:
> >
> > hper = spectrum.periodogram;
> > for k = 1:10
> > y = x+randn(size(x));
> > psdest = psd(hper,y,'NFFT',length(y),'Fs',1000);
> > yper(:,k) = psdest.Data;
> > end
> > xdftavg = mean(yper,2);
> > plot(psdest.Frequencies,10*log10(xdftavg));
> >
> > Note this results in a one-sided estimate by default.
> >
> > Hope that helps,
> > Wayne
>
> thanks a lot, maybe I haven't understood the code, but it doesn't figure out the rms averaging, doesn't it?
> Try to take a look at this link:
> http://zone.ni.com/reference/en-XX/help/371361E-01/lvanlsconcepts/average_improve_measure_freq/
Hi, the previous link you included described the lnear RMS average as the mean of the spectral magnitudes. It looks just like what is described in your latest link. What they are calling "vector averaging" averages the complex-valued DFT coefficients.
Wayne
|
|
0
|
|
|
|
Reply
|
Wayne
|
11/16/2010 3:09:03 PM
|
|
"Wayne King" <wmkingty@gmail.com> wrote in message <ibu6qf$csv$1@fred.mathworks.com>...
> "pietro " <bracardi82@email.it> wrote in message <ibu5h7$5mb$1@fred.mathworks.com>...
> > "Wayne King" <wmkingty@gmail.com> wrote in message <ibtqb3$8fp$1@fred.mathworks.com>...
> > > "pietro " <bracardi82@email.it> wrote in message <ibtf8n$g7f$1@fred.mathworks.com>...
> > > > "pietro " <bracardi82@email.it> wrote in message <ibsgpo$9cd$1@fred.mathworks.com>...
> > > > > I have a lot of signals and I would like to figure out the averaged spectrum. How can I perform the rms spectral averaging in matlab? I want to perform the averaging explained at page 5 on this pdf http://www.thinksrs.com/downloads/PDFs/ApplicationNotes/AboutFFTs.w
> > > > >
> > > > > thanks
> > > > > Pietro
> > > >
> > > > This is the properly link, in which it is explained the rms speactra averaging
> > > >
> > > > http://www.thinksrs.com/downloads/PDFs/ApplicationNotes/AboutFFTs.pdf
> > >
> > > Hi Pietro, This is what they call their "linear weighting"
> > >
> > > t = linspace(0,1,1000);
> > > x = cos(2*pi*250*t)';
> > > for k = 1:10
> > > y = x+randn(size(x));
> > > ydft(:,k) = abs(fft(y));
> > > end
> > >
> > > xdftavg = mean(ydft,2);
> > >
> > > I've used a two-sided spectral estimate here. If you only want one-sided, you just need to make the necessary adjustment. You can also do this with spectral objects if you have the Signal Processing Toolbox as follows:
> > >
> > > hper = spectrum.periodogram;
> > > for k = 1:10
> > > y = x+randn(size(x));
> > > psdest = psd(hper,y,'NFFT',length(y),'Fs',1000);
> > > yper(:,k) = psdest.Data;
> > > end
> > > xdftavg = mean(yper,2);
> > > plot(psdest.Frequencies,10*log10(xdftavg));
> > >
> > > Note this results in a one-sided estimate by default.
> > >
> > > Hope that helps,
> > > Wayne
> >
> > thanks a lot, maybe I haven't understood the code, but it doesn't figure out the rms averaging, doesn't it?
> > Try to take a look at this link:
> > http://zone.ni.com/reference/en-XX/help/371361E-01/lvanlsconcepts/average_improve_measure_freq/
>
> Hi, the previous link you included described the lnear RMS average as the mean of the spectral magnitudes. It looks just like what is described in your latest link. What they are calling "vector averaging" averages the complex-valued DFT coefficients.
>
> Wayne
thanks a lot Wayne,
How can I perform vector averaging with matlab?
|
|
0
|
|
|
|
Reply
|
pietro
|
11/18/2010 2:38:04 PM
|
|
"pietro " <bracardi82@email.it> wrote in message <ic3doc$mqp$1@fred.mathworks.com>...
> "Wayne King" <wmkingty@gmail.com> wrote in message <ibu6qf$csv$1@fred.mathworks.com>...
> > "pietro " <bracardi82@email.it> wrote in message <ibu5h7$5mb$1@fred.mathworks.com>...
> > > "Wayne King" <wmkingty@gmail.com> wrote in message <ibtqb3$8fp$1@fred.mathworks.com>...
> > > > "pietro " <bracardi82@email.it> wrote in message <ibtf8n$g7f$1@fred.mathworks.com>...
> > > > > "pietro " <bracardi82@email.it> wrote in message <ibsgpo$9cd$1@fred.mathworks.com>...
> > > > > > I have a lot of signals and I would like to figure out the averaged spectrum. How can I perform the rms spectral averaging in matlab? I want to perform the averaging explained at page 5 on this pdf http://www.thinksrs.com/downloads/PDFs/ApplicationNotes/AboutFFTs.w
> > > > > >
> > > > > > thanks
> > > > > > Pietro
> > > > >
> > > > > This is the properly link, in which it is explained the rms speactra averaging
> > > > >
> > > > > http://www.thinksrs.com/downloads/PDFs/ApplicationNotes/AboutFFTs.pdf
> > > >
> > > > Hi Pietro, This is what they call their "linear weighting"
> > > >
> > > > t = linspace(0,1,1000);
> > > > x = cos(2*pi*250*t)';
> > > > for k = 1:10
> > > > y = x+randn(size(x));
> > > > ydft(:,k) = abs(fft(y));
> > > > end
> > > >
> > > > xdftavg = mean(ydft,2);
> > > >
> > > > I've used a two-sided spectral estimate here. If you only want one-sided, you just need to make the necessary adjustment. You can also do this with spectral objects if you have the Signal Processing Toolbox as follows:
> > > >
> > > > hper = spectrum.periodogram;
> > > > for k = 1:10
> > > > y = x+randn(size(x));
> > > > psdest = psd(hper,y,'NFFT',length(y),'Fs',1000);
> > > > yper(:,k) = psdest.Data;
> > > > end
> > > > xdftavg = mean(yper,2);
> > > > plot(psdest.Frequencies,10*log10(xdftavg));
> > > >
> > > > Note this results in a one-sided estimate by default.
> > > >
> > > > Hope that helps,
> > > > Wayne
> > >
> > > thanks a lot, maybe I haven't understood the code, but it doesn't figure out the rms averaging, doesn't it?
> > > Try to take a look at this link:
> > > http://zone.ni.com/reference/en-XX/help/371361E-01/lvanlsconcepts/average_improve_measure_freq/
> >
> > Hi, the previous link you included described the lnear RMS average as the mean of the spectral magnitudes. It looks just like what is described in your latest link. What they are calling "vector averaging" averages the complex-valued DFT coefficients.
> >
> > Wayne
>
> thanks a lot Wayne,
>
> How can I perform vector averaging with matlab?
Hi Pietro, What they are calling "vector averaging" is just averaging the complex-valued DFT coefficients instead of their magnitudes. So just substitute:
ydft(:,k) = fft(y);
for
ydft(:,k) = abs(fft(y));
in the example code I gave you.
Wayne
|
|
0
|
|
|
|
Reply
|
Wayne
|
11/18/2010 4:20:07 PM
|
|
"Wayne King" <wmkingty@gmail.com> wrote in message <ic3jnn$5hg$1@fred.mathworks.com>...
> "pietro " <bracardi82@email.it> wrote in message <ic3doc$mqp$1@fred.mathworks.com>...
> > "Wayne King" <wmkingty@gmail.com> wrote in message <ibu6qf$csv$1@fred.mathworks.com>...
> > > "pietro " <bracardi82@email.it> wrote in message <ibu5h7$5mb$1@fred.mathworks.com>...
> > > > "Wayne King" <wmkingty@gmail.com> wrote in message <ibtqb3$8fp$1@fred.mathworks.com>...
> > > > > "pietro " <bracardi82@email.it> wrote in message <ibtf8n$g7f$1@fred.mathworks.com>...
> > > > > > "pietro " <bracardi82@email.it> wrote in message <ibsgpo$9cd$1@fred.mathworks.com>...
> > > > > > > I have a lot of signals and I would like to figure out the averaged spectrum. How can I perform the rms spectral averaging in matlab? I want to perform the averaging explained at page 5 on this pdf http://www.thinksrs.com/downloads/PDFs/ApplicationNotes/AboutFFTs.w
> > > > > > >
> > > > > > > thanks
> > > > > > > Pietro
> > > > > >
> > > > > > This is the properly link, in which it is explained the rms speactra averaging
> > > > > >
> > > > > > http://www.thinksrs.com/downloads/PDFs/ApplicationNotes/AboutFFTs.pdf
> > > > >
> > > > > Hi Pietro, This is what they call their "linear weighting"
> > > > >
> > > > > t = linspace(0,1,1000);
> > > > > x = cos(2*pi*250*t)';
> > > > > for k = 1:10
> > > > > y = x+randn(size(x));
> > > > > ydft(:,k) = abs(fft(y));
> > > > > end
> > > > >
> > > > > xdftavg = mean(ydft,2);
> > > > >
> > > > > I've used a two-sided spectral estimate here. If you only want one-sided, you just need to make the necessary adjustment. You can also do this with spectral objects if you have the Signal Processing Toolbox as follows:
> > > > >
> > > > > hper = spectrum.periodogram;
> > > > > for k = 1:10
> > > > > y = x+randn(size(x));
> > > > > psdest = psd(hper,y,'NFFT',length(y),'Fs',1000);
> > > > > yper(:,k) = psdest.Data;
> > > > > end
> > > > > xdftavg = mean(yper,2);
> > > > > plot(psdest.Frequencies,10*log10(xdftavg));
> > > > >
> > > > > Note this results in a one-sided estimate by default.
> > > > >
> > > > > Hope that helps,
> > > > > Wayne
> > > >
> > > > thanks a lot, maybe I haven't understood the code, but it doesn't figure out the rms averaging, doesn't it?
> > > > Try to take a look at this link:
> > > > http://zone.ni.com/reference/en-XX/help/371361E-01/lvanlsconcepts/average_improve_measure_freq/
> > >
> > > Hi, the previous link you included described the lnear RMS average as the mean of the spectral magnitudes. It looks just like what is described in your latest link. What they are calling "vector averaging" averages the complex-valued DFT coefficients.
> > >
> > > Wayne
> >
> > thanks a lot Wayne,
> >
> > How can I perform vector averaging with matlab?
>
> Hi Pietro, What they are calling "vector averaging" is just averaging the complex-valued DFT coefficients instead of their magnitudes. So just substitute:
>
> ydft(:,k) = fft(y);
>
> for
> ydft(:,k) = abs(fft(y));
>
> in the example code I gave you.
>
> Wayne
Thank Wayne
I will test it.
Bye
Pietro
|
|
0
|
|
|
|
Reply
|
pietro
|
11/23/2010 8:19:04 AM
|
|
|
7 Replies
471 Views
(page loaded in 0.099 seconds)
|