Units of spectrogram and pspectrum questions
48 views (last 30 days)
Show older comments
Hi
I have a time signal as follows:
I am trying out "pspectrum" and "spectrogram" to see this signal in frequency-time domain and frequency domain.
The left picture is the result of "pspectrum" and at the right "spectrogram". Now i have some questions regarding the units of the amplitude. With "pspectrum" the unit is expressed as db and with "spectrogram" the unit is expressed as db/Hz. What is the difference between these two units?
My second question and also the most important one is as follows: I need to extract the signal information from these figures, so im using the output arguments with these two. For both functions you get a mxn matrix but both has other values. i want to know what the units are from these two, how can i calculate amplitude in "volts" from these values? The matrix at the top is the result of "pspectrum" and the bottom matrix is the result of "spectrogram". With spectrogram i know i need to use abs(x) to get the amplitude information.
Summarized: i want to know what the units of these two output arguments are and how can i transform them to a unit expressed in "volt"?
PS: the time domain is a sinus with a frequency of 50Hz. The top matrix show the values corresponding with the frequency 50Hz wich is 0.0032. for the bottom matrix row #80 corresponds with 50Hz)
any help would be appreciated!
With kind regards
0 Comments
Answers (1)
Frantz Bouchereau
on 24 Aug 2020
spectrogram by default plots the magnitude of the power spectral density and hence the units at db/Hz. pspectrum computes and plots power spectrum so the units are simply dB.
pspectrum outputs short-time power spectrum columns in linear units (Watts with respect to a 1 Ohm load).
HTH
0 Comments
See Also
Categories
Find more on Time-Frequency Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!