How can I find a threshold of amplitude and (in the same time) of frequency inside a spectrogram?
조회 수: 8 (최근 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!