How can I find a threshold of amplitude and (in the same time) of frequency inside a spectrogram?
9 ビュー (過去 30 日間)
古いコメントを表示
I am analyzing 2 vectors of acceleration, ax, az in the frequency domain. They are vectors with sample frequency of 5 ms and gone through a pass band filter of 40 Hz.
My aim is to detect the spectrogram and identify the index of vector ax and/or az that has a certain threshold in amplitude and frequency both in the final spectrogram. I would like to put an alarm (identified with an asterisk) when I have a threshold of the power in a certain range of frequency.
Acc=[ax,az];
Fs=1/0.005;
N=length(az);
%p = nextpow2(N)
figure
nfft=80;
win=hamming(nfft);
nOvl=nfft*0.95;
[s,f,t,pxx] = spectrogram(az,win,nOvl,nfft,Fs,'psd');
waterfall(f,t,pxx')
xlabel('frequency(Hz)')
ylabel('time(sec)')
zlabel('PSD')
5 件のコメント
Mathieu NOE
2021 年 1 月 20 日
hello again
I wonder why we do it so complicated...
why not simply apply the band pass filter (10 - 30 hz) to your time data and look at the positive and negative spikes ?
this would be certainly sipmler and more accurate in time than going through the spectrogram stuff
回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!