I'm using MATLAB to make a spectrogram of some milling vibration data (units of m/s^2) and I had a few questions because I'm a bit out of my depth.
Using the built in MATLAB spectrogram function I get units of Power/frequency (dB/Hz). Are these the correct units or, alternatively, how do I calculate what the proper units should be? Some of the examples have those units, others merely have units of Power (dB).
How does MATLAB define 0dB i.e. is it a set constant or does it change based on the data you feed into the spectrogram? I'm trying to compare multiple spectrograms and if the scale is changing each time I run data then I need to find a different way to run the data.
As a bonus question, I'm trying to compare the vibration magnitude and the frequencies they occur at across different cutting conditions. Outside of visually saying "They're different," is there a way to quantify the differences? I've tried subtracting the two greyscale images and playing around with that to get numbers but I'd like a better way to compare them if possible.
Here is my MATLAB code if it's helpful.
figure(1007) spectrogram(Xacc,windowx,noverlap,nfft,fs,'yaxis') %Acceleration data in X direction and predefined variables for the spectrogram. ylim([0 5]) colormap(jet); caxis([-70 10]) %Colorbar Axis range title('Spectrogram of X') s1=base + "SPEC_Acc_ X_FULL"; saveas(gca,s1,'jpg') Thanks so much for the help!