What is the reference level used in spectrogram power computation?
6 views (last 30 days)
Show older comments
The documentation for the spectrogram function allows an argument 'spectrumtype' to be set as either "psd" or "power". When spectrumtype = "power" the spectrum is plotted with units of dB. The use of dB is meaningless by itself, and implies some reference power. However I see no mention of the reference power anywhere in this documentation.
What is the reference power used in this calculation?
1 Comment
Umar
on 7 Sep 2024
Edited: dpb
on 7 Sep 2024
Hi @Ethan Abele,
Typically, in signal processing, the reference power is often assumed to be 1 milliwatt (mW) when dealing with power spectral density (PSD) calculations. This means that the dB values are calculated relative to this reference power. To illustrate this, you can use the following MATLAB code snippet:
% Example signal
fs = 1000; % Sampling frequency
t = 0:1/fs:1-1/fs; % Time vector
x = cos(2*pi*100*t) + randn(size(t)); % Signal with noise
% Compute and plot the spectrogram
spectrogram(x, 256, 250, 256, fs, 'yaxis', 'spectrumtype', 'power');
title('Spectrogram with Power Spectrum in dB');
When utilizing the spectrumtype argument set to "power," the output is indeed represented in decibel. But you are right about one thing, the absence of a specified reference power in the documentation can lead to ambiguity regarding the interpretation of these dB values. Also, without explicit documentation of the reference power level, I would assume a standard reference as mentioned above. So again, based on your comments, the lack of clarity regarding the reference power when using the "power" option is a noteworthy gap in the documentation.
Answers (1)
Paul
on 7 Sep 2024
Hi Ethan,
In signal processing the concepts of power and energy are similar to, but not exactly the same, as the what those terms mean in other fields. spectrogram computes the power spectrum from the input signal and converts to dB using 10*log10(). spectrogram doesn't even know, nor care, about the units of the input signal, so how could it define a reference level?
0 Comments
See Also
Categories
Find more on Spectral Measurements 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!