Nothing says “I’m an engineer” like the humble decibel. It’s right up there with the slide rule and the pocket calculator. Who could have anything bad to say about such an iconic unit?
But decibels are a flawed unit of measure, and you should be careful with them.
What is a decibel?
In the early 20th century, Bell Labs was looking for a better way to express the attenuation of signals in telephone wire. What they needed was a convenient way to express the ratio between an output power and an input (reference) power.
It’s convenient to work with ratios in a log scale because expressing a ratio logarithmically allows many ratios to be composed additively. And base-10 is a convenient logarithm for engineering applications because engineers are already familiar with powers of 10. Thus, the new unit the bel was defined:
Pₒ measured in bels = Log₁₀(Pₒ/Pᵣ)
(Being Bell Labs, they opted to name their new unit after Alexander Graham Bell.)
However, it was clear that for practical applications, this scale was too coarse, and so the decibel (deci-bel) was defined as one tenth of a bel:
Pₒ measured in decibels = 10 Log₁₀(Pₒ/Pᵣ)
(This is equivalent to using a base 10^(1/10) logarithm, aka base-1.258… we’re not off to a good start, are we?)
Because of the power and convenience of the logarithmic scale, decibels became popular not only in telephony, but also in acoustics, signal processing, radioengineering, electronics, control theory, and many other fields of engineering.
But decibels are dangerously ambiguous
Being correct and unambiguous about units is serious business. In 1999, an unfortunate unit-of-measure mixup between Lockheed Martin and NASA doomed the Mars Climate Orbiter.
Anyone who thinks that such mistakes should be easily avoidable haven’t spent enough time in contact with Murphy’s law. To reduce the risk of a critical mistake, you can increase your level of care with every step, or you can reduce your mistake surface area: the number of opportunities for a mistake to creep in.
Decibels, as a quantity expressing the ratio between two values that have the same unit, are intrinsically dimensionless. Yet, they are commonly used to express dimensional values.
For example, let’s say you read in a safety manual that exposure to noise levels above “100 decibels” risks causing hearing damage.
You are in charge of writing software for a microphone that measures sound pressure, and you want to produce a warning if the sound exceeds safe levels.1 The SI unit of pressure is the pascal (Pa), which expresses force per unit area, and is defined as 1 N/m². At what measured sound pressure should your microphone emit the warning?
How do we go from a dimensionless 100 decibels to a corresponding sound pressure level that is actually a pressure?
100 decibels is defined as a ratio relative to a reference value. So we need to look up the correct reference pressure, and make sure it’s the same reference pressure that the author of our safety manual was using. That’s the first opportunity for error.
(The usual reference pressure for acoustics is 20 micropascals, set to be the threshold of human hearing, but there are times when other reference pressures are used).
Then we have a second problem. The definition of a decibel above was for power ratios. But sound pressure isn’t a power at all. It’s a pressure.
The power transferred by a sound wave in air is proportional to the square of its pressure. As a result, to express the ratio of two pressures in decibels, we need to first convert them to a power ratio:
10 Log₁₀(Pₒ/Pᵣ) = 10 Log₁₀((pₒ/pᵣ)²) = 20 Log₁₀(pₒ/pᵣ)
So when dealing with field ratios (pressure, velocity, voltage, current, etc) rather than power ratios, an extra power of 2 shows up in the decibel formula. That’s the second opportunity for error.
If you have a noise-reduction technique that cuts the emitted sound power of an engine by -10 dB, you should make sure that marketing advertises it as a -20 dB reduction in sound pressure. But they’ll probably just say “-20 dB” for brevity.
But wait, are we sure the manual wasn’t specifying sound energy density, which is also measured in decibels? Or sound intensity, which is also measured in decibels?
We’d better be sure, because not only will that determine whether we use a coefficient of 10 or 20 for our logarithm, it will also determine the appropriate reference value. (Did you know that sound energy density is also measured in pascals? Because 1 J/m³ = 1 N/m² = 1 Pa. But the standard reference sound energy density is 10⁻¹² Pa, which is quite considerably less than 20 μPa.)
Some might ask if this really matters. After all, the reference value for sound intensity is 1 pW/m², which in air at room temperature and pressure almost exactly corresponds to a 20 μPa sound pressure.
But yes, that conversion will be different on Mars.
It’s not just acoustics. Similar ambiguities occur in electronic amplifier design, feedback control, and so on. 3 dB of power gain is a doubling of power; 6 dB of voltage gain is a doubling of voltage. A first-order low-pass filter rolls off its output by a factor of ten for each 10x increase in frequency (“decade”), which means 20 decibels per decade, unless you’re looking at signal power, in which case that’s 10 decibels per decade.
Usually, feedback control designers assume that they are working with signals that are field quantities, and are thus “voltage-like” in nature rather than “power-like”, so they get a factor of 20 on that decibel logarithm. But what if the feedback system is itself controlling a power quantity?
(Even though these days, many of those signals are actually digital numbers represented abstractly in a microprocessor’s memory, rather than analog voltages or powers).
When in doubt, I recommend skipping decibels and just expressing the relevant ratio directly, on a log scale. This is a perfectly unambiguous Bode plot:
I’m not saying that you shouldn’t ever use decibels. When the ratio or quantity being described is entirely clear, everyone agrees on whether it’s a power or a field amplitude, and for any absolute value the reference is uniquely specified, there is no problem with using decibels. They are wonderfully convenient and expressive. And somehow charming.
What I’m saying is: make sure those conditions are satisfied. Don’t leave it to chance that a specialist from another field, with different conventions, won’t read your datasheet and get the wrong idea because you assumed that they’d make the same assumptions that you always make.
After all, they might be Martians.
This post isn’t intended as professional engineering advice. If you are looking for professional engineering advice, please contact me with your requirements.
I’ll set aside perceptual weighting, which only makes matters worse, but that’s not the decibel’s fault. The science of sound is a detailed one, and you’re actually programming this feature you should be aware of the (numerous) relevant standards.
so a mole is about 238 decibels or 79 octaves