0
$\begingroup$

I have seen that one converts the amplitude to decibels through: $\text{dB(S)}=10 \text{log}_{10} \big(\text{S/ref}\big)$, where $\text{S}$ is the output of a STFT and ref the reference value for the logarithmic scale, i.e. the value that should be mapped to decibel, right?

However, I've seen implementations with $\text{ref = max(S)}$ and I do not understand why. Can someone clarify on that?

$\endgroup$
  • $\begingroup$ Some people like the maximum value to be 0 dB. It's just a preference, that's all. $\endgroup$ – MBaz Mar 10 at 19:29
  • $\begingroup$ But what's the point of this? Seems very counter-intuitive to me $\endgroup$ – tmueller Mar 10 at 19:43
  • $\begingroup$ "I have seen" -- please provide a reference. Where have you seen this? Context matters. $\endgroup$ – TimWescott Mar 10 at 22:51
  • $\begingroup$ @tmueller, In audio, 0 dB is practically the norm. It allows you to compare different tracks in terms of their amplitude/power easily (and you can also estimate the amplitude of a single track easily). $\endgroup$ – dsp_user Mar 11 at 6:43
1
$\begingroup$

dB is a power ratio, so when we see units in dB we are seeing units on a relative scale. The reason that a 0 dB reference is so common is because this is simply normalizing the number scale to 1. $10Log(1) = 0$ dB

This is similar to using 100% (1) instead of absolute numbers.

| improve this answer | |
$\endgroup$
0
$\begingroup$

This is not generally true. As mentioned in the comments, it may be a preference to take the maximum of the signal as 0 dB. But a counter example is the power measurements in wireless systems. We define dBm as: $P [dBm] = 10log(P / 1 (mW))$

We may have actual powers as high as 30 dBm. The voice ratings are other counter examples. There is no single reference for conversion from linear scale to logarithmic scale.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.