How to interpret this PSD plot?

7 次查看(过去 30 天)
Jianfeng Zhao
Jianfeng Zhao 2018-11-23
回答: Honglei Chen 2018-11-26
I am analyzing the gyro+accelerometer data collected from a statium during a football match. Based on the data collected I can plot the time domain graph, and also using Pwelch method to plot the frequency domian. The purpose is to find out the dominant vibration frequency in the stadium, also to find the (maybe temporary) frequency when many people are applouding and shouting, e.g. during a goal. Here I have some questions:
  1. If I do only FFT over the whole dataset, the result will mute out the frequency which happened temporarily during a goal, is this correct?
  2. I am using following code to do pwelch: the signal is the time domain array, and sampleFrequency is the data logging frequency. After the figure is plotted, but I got more or less a peak frequency around 0. This doesn't seem correct, does it?
nSamples = length(signal);
[Pxx,f] = pwelch(signal,[],nSamples/2,nSamples,sampleFrequency);
[~,loc] = max(Pxx);
estimatedFrequency = f(loc);
I also tried to plot psd with logrithm function as follows:
figure('Name', 'Log Pxx value');clf;
plot(f,10*log10(Pxx))
xlabel('Frequency (Hz)')
ylabel('PSD (dB/Hz)')
There are 2 kind of peaks in this plot but because it's decreasing, the 2 peaks around 30hz and 75Hz are not significant compare to the 0Hz area. Does this plot actually give more information during those 2 peaks?
Thank you for reading. And any help will be appreciated.

回答(1 个)

Honglei Chen
Honglei Chen 2018-11-26
You may want to do a detrend in your signal to get rid of the peak at DC, like
pwelch(detrend(signal),[],nSamples/2,nSamples,sampleFrequency);
As to the FFT, as long as there is sufficient SNR, you should see the temporary frequency component, but what you don't see is when it happens. If you want the time information too, you may want to consider using time-frequency analysis instead.
HTH

类别

Help CenterFile Exchange 中查找有关 Parametric Spectral Estimation 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by