# Why should one choose the maximum as reference for power-to-decibel conversion?

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?

• Some people like the maximum value to be 0 dB. It's just a preference, that's all. – MBaz Mar 10 at 19:29
• But what's the point of this? Seems very counter-intuitive to me – tmueller Mar 10 at 19:43
• "I have seen" -- please provide a reference. Where have you seen this? Context matters. – TimWescott Mar 10 at 22:51
• @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). – dsp_user Mar 11 at 6:43

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 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))$$