Wiki / Concepts

Decibel (dB, dBm, dBi)

The logarithmic unit every RF number is quoted in. A dB is a pure ratio, a dBm is an absolute power referenced to one milliwatt, a dBi is an antenna gain referenced to an isotropic radiator, and confusing the three is the classic beginner error.

Three things a dB number can be
A value written in decibels
dB: a pure ratio
gain, loss, SNR, margin
dBm: an absolute level
referenced to 1 mW
dBi / dBd: a reference gain
isotropic / half-wave dipole
Only the middle branch is a quantity of power. A dB says how many times, never how much, which is why you may add a dB to a dBm (a level pushed through a gain or a loss) but adding two dBm together means nothing.

A decibel (dB) is a logarithmic way of writing the ratio between two powers. It is not a quantity of anything by itself: a dB tells you how many times bigger or smaller one thing is than another. Attach a reference to it, as dBm and dBi do, and it becomes an absolute level instead.

What it is

For a ratio of two powers the definition is 10 * log10(P1 / P2). For a ratio of two amplitudes or voltages it is 20 * log10(A1 / A2), because power goes as the square of amplitude and the square comes out of the logarithm as a factor of two. That is the whole of it. Everything else is bookkeeping about what the second term of the ratio is:

Unit Referenced to What it expresses
dB nothing, it is a ratio gain, loss, SNR, margin, a difference between two levels
dBm 1 milliwatt an absolute power level
dBW 1 watt an absolute power level, 30 dB below the same figure in dBm
dBi an isotropic radiator antenna gain
dBd a half-wave dipole antenna gain, where gain in dBi equals gain in dBd plus 2.15

Why it matters

A radio link spans an absurd dynamic range. A 1 W transmitter and a receiver that is still working at 0.00000000001 W are eleven orders of magnitude apart, and no one wants to multiply those numbers by hand. In decibels the whole chain collapses into one column of additions and subtractions: transmit power plus antenna gain minus cable loss minus path loss plus antenna gain, and the answer is the level at the receiver. Every datasheet, every regulatory limit, and every link budget is written this way, so reading dB fluently is the entry ticket to the rest of RF.

The arithmetic worth memorising

Two anchors generate almost everything: - 3 dB is a factor of 2 (and -3 dB is a half). - 10 dB is a factor of 10 (and -10 dB is a tenth).

Combine them by addition: 13 dB is 20 times, 20 dB is 100 times, 6 dB is 4 times. On the absolute ladder, 30 dBm is 1 W, 20 dBm is 100 mW, 10 dBm is 10 mW, 0 dBm is 1 mW, -30 dBm is 1 microwatt, and -174 dBm in every hertz of bandwidth is the thermal noise floor at room temperature, the physical bottom of the scale.

# The two conversions, and nothing else.
import math

def db(ratio):            # power ratio -> dB
    return 10.0 * math.log10(ratio)

def dbm_to_mw(level):     # absolute level -> milliwatts
    return 10.0 ** (level / 10.0)

print(db(2), db(10))            # 3.01, 10.0
print(dbm_to_mw(30))            # 1000.0 mW, one watt

Pitfalls

  • Adding two dBm is meaningless. A dBm is a level, not a ratio. You add dB to a dBm; two transmitters of equal power side by side give you 3 dB more, not twice the dBm figure.
  • 10 log versus 20 log. Use 10 log for power ratios and 20 log for amplitude or voltage ratios. Applying 20 log to a power ratio doubles every number you produce.
  • dBi versus dBd. A vendor quoting dBd is quoting a figure 2.15 lower than the same antenna expressed in dBi, so an "8 dBd" antenna and a "10 dBi" antenna are the same antenna.
  • Never drop the suffix. dB, dBm, dBW, dBi, dBc and dBuV are not interchangeable, and a spreadsheet column labelled just "dB" is where link budgets go wrong.

Further reading