Decibels: What’s the Reference?

Matthew Duggan

The bioSNR package is an open-source SONAR equation calculator. The calculator is capable of handling simple to intermediate level acoustic problems associated with bioacoustics and passive acoustic monitoring (PAM) systems.

This document gives quick examples of bioSNR’s capabilities with dB operations.

#Stable - Install package from CRAN 
install.packages("bioSNR")

#Unstable - Install package from Github repository 
devtools::install_github("MattyD797/bioSNR")

#Attach package namespace to active libraries in Rstudio
library(bioSNR)

decibel

The decibel (dB) is the logarithmic ratio between a common metric of sound (e.g., power, intensity, pressure) and its corresponding reference level. No matter the reference chosen, the formula used to calculate dBs remains the same and is adapted from the unit Bell or \(Bel=\log_{10}(\frac{Power_2}{Power_1})\). Below are the specific equations for the three common metrics of sound (power, intensity, or pressure, respectively):

\[ dB\:re\:W_{ref}=10\log_{10}(\frac{W}{W_{ref}}) \] \[ dB\:re\:I_{ref}=10\log_{10}(\frac{I}{I_{ref}}) \] \[ dB\:re\:P_{ref}=10\log_{10}(\frac{P^2}{P_{ref}^2})\;\; |\;\;dB\:re\:P_{ref}=20\log_{10}(\frac{P}{P_{ref}}) \]

When reporting back dB values, it is important to always label the value with the correct reference level, which is primarily decided upon by the ecosystem the sound value is calculated in (e.g., air, water). The common reference levels that are always IMPORTANT to show are in the table below:

Pressure Intensity Power
Air \(20\: \mu Pa\) \(1*10^{-12}\: W/m^2\) \(1*10^{-12}\: W\)
Water \(1\: \mu Pa\) \(6.7*10^{-19}\: W/m^2\) \(6.7*10^{-19}\: W\)
If you need to compute a bioacoustics calculation in a pinch,, these are important relationships to keep in mind that may be helpful for a back-of-the-envelope dB calculation (notice how we need to increase dB by 10 to double the perceived ‘loudness’):
dBs Pressure Intensity Power ‘Loudness’
\(+3\) \(1.41*\) \(2*\) \(2*\) \(1.23*\)
\(+6\) \(2*\) \(4*\) \(4*\) \(1.52*\)
\(+10\) \(3.16*\) \(10*\) \(10*\) \(2*\)
\(+20\) \(10*\) \(100*\) \(100*\) \(4*\)

Say you are interested in playing an excerpt from your favorite radio hit both underwater and in air (of course, we don’t recommend this without the right permits!) If you wanted the song to be heard underwater at the same dB level you played it in air, you would need to increase the dB level by 61.5 dBs. This is due to different reference levels and impedances between the two ecosystems. Differences in reference levels account for 26 dB, and differences in impedances account for 35.5 dB, in total amounting to 61.5 dBs.

\(waterdB - 61.5 = airdB\)

Simple operations with dBs are performed in three steps: calculating linear values, add/subtract these linear values, and convert back to dB-s (a logarithmic value). We can write out this operation as below:

  1. \(raw\;values = 10^{measurement/X}*ref\;level\)
  2. \(Add/Subtract\)
  3. \(dB\;value = X*log_{10}(measurement/ref\;level)\)

Since comparing dBs can be more complicated than performing simple operations, the bioSNR package makes adding, subtracting, and averaging relatively simple and streamlined with just a single function.

Examples

  1. Given some source level measurements of the Galápagos penguin (Spheniscus mendiculus), you want to average them to get an idea on how many recorders you will need to record. Here are your measurements dB re \(1\:\mu Pa\): 34, 57, 48, 66, 80, 55.
opDB(c(34, 57, 48, 66, 80, 55), 20, op="avg")
#> [1] 67.08656
  1. A lab assignment for your bioacoustics course asks you to add up given source level measurements. You have just heard about the bioSNR package and are up for hee task. Here are your measurements dB re \(1*10^{-12} \frac{W}{m^2}\): 18, 27, 12, 22, 5, 50. Compute the total dB value value of the measurements using your go-to bioSNR function for the task!
opDB(c(18, 27, 12, 22, 5, 50), 10, op="add")
#> [1] 50.0321

mirror server hosted at Truenetwork, Russian Federation.