How can I find a threshold of amplitude and (in the same time) of frequency inside a spectrogram?
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Mathieu NOE
el 20 de En. de 2021
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
Respuestas (0)
Ver también
Categorías
Más información sobre Time-Frequency Analysis en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!