Test Your Ears: Working with decibels
The use of the Decibel (dB) significantly simplifies calculations with amplification and attenuation factors in a signal chain.
Where we had to multiply and divide before, calculations with dB's go by addition and subtraction. That is because the dB is a logarithmic unit.
The decibel (dB) is 1/10 of a Bel, which is the 10-logarithm of the ratio of two powers. So if two powers differ a factor of 10 it will be 1 Bel or 10 dB. The Bel as such is never used.
In most cases however we measure ratios of electrical (AC) voltages. Assuming the same impedance the power goes with the square of the voltage. P=U2/R. A tenfold voltage produces a hundredfold power.
Taking
the square in the linear domain is equivalent to doubling in the
logarithmic domain. So if you measure a voltage ratio X than that will be 2
times the log(X) in Bel or 20 times the log(X) in dB
Note
that de decibel is based on the logarithm with base 10. Most computer
languages only know the so called natural logarithm on base e
= 2.71828.
The conversion goes as follows (in pseudo C-code):
double RatioToDecibel (double Ratio)
{
return
(20 * log(Ratio) / log(10));
}
en
the reverse:
double Decibel2Ratio (double Decibel)
{
return
(10^(Decibel / 20));
//
The exp() function in many program languages is based on e.
//
Here the log-base conversion has been replaced by using a 10-to-
//
the-power-of-expression, which is often
faster in execution.
}
Note that the dB defines a ratio between two powers. It is not an absolute value! For several applications however standard reference levels have been established. For sound levels the dB yields the ratio between the measured level and the reference level of 20 micro-Pascal. (See the chapter about our hearing). For other purposes we know the dB-Watt, dB-Volt, dB-µV, dB-µV/m and so on, where the suffix refers to the 0dB level. You may chose any unit and any level as your reference as long as it results in a power ratio or a power density ratio and you make clear what it is.