bioSNR: An Introduction to the Physics Behind Bioacoustics

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

This document gives quick examples of bioSNR’s more basic capabilities and functions while introducing some of the basic physics behind sound.

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

Sound wave: frequency and wavelength

A acoustic wave is a mechanical wave with longitudinal propagation. It means that under the influence of a wave (e.g., issued from a sound source) the particles of a medium (e.g. air, water) oscillate parallel to the direction of propagation of the wave, propagating the perturbation. This movement of particles results in repeated patterns of compression and dilatation around the value of ambient pressure, resulting in a travelling pressure wave (Klinck 2022). Along with the majority of organisms, our hearing is based on these pressure changes, but some species (mainly fish and squid) rely on the motion of the particles. Therefore, we typically only measure sounds through small pressure changes, in Pascals (Pa).

For simplicity we often describe acoustics variables in relation with the illustration of sinusoid, the simplest waveform, where this oscillation exist both in space (for simplicity along one dimension) and in time. The period is the time interval between the successive occurrence of the same state in this oscillation. The frequency, (or pitch) is the number oscillations produced in one second represented by the unit Hertz (Hz). In reference to human hearing range, sound with a frequency below 20 Hz is infrasound and sound above 20kHz is ultrasound. The wavelength is the distance between successive crests if a wave and is measured in meters (m).

The relationship between the length of a wavelength and the frequency can be represented as

$$\lambda = \frac{c}{f}$$, where, * λ is the wavelength (m), * c is speed of sound in (m/s) and, * f frequency in Hz (cycles per second).

By using this equation, the wof() function allows you to calculate either λ or the f. — whichever your value of interest is. The first entry defaults to either λ or f — whichever value you already have. In the second position, you must set the c argument equal to the constant of sound speed in water or air.

You may calculate your own value for c relative to the conditions present in your ecosystem of study. As a general rule of thumb, however, c is equal to 1500 m/s in saltwater and 350 m/s in air. Note that the distinction between freshwater and saltwater is important. Sound speed is faster in saltwater than freshwater.

Examples

  1. Toothed whales like dolphins often use ultrasonic signals for a range of important behaviors, such as communication. What is the wavelength of a false killer whale broadband click at 40 kHz?
#Find the wavelength (m) given a sound level of 75 kHz (75000 Hz) in SALTWATER
wof(40000, c=15000)
#> [1] 0.375
  • The wavelength is 0.375 m.
  1. Bats produce ultrasonic sounds to find prey, such as the invasive mosquito. What is the frequency of a sheath-tailed bat echolocation that has a wavelength of 0.012?
#Find the frequency (Hz) given a wavelength of 0.015 in AIR
wof(0.012, c=350)
#> [1] 29166.67
  • The frequency is ~29 kHz.

Speed of Sound

While a sound wave travels similarly no matter its medium, different media still have different physical properties that alter the wave’s speed. The speed of a wave is influenced dynamic ecosystem conditions. In air, the parameters that influence sound speed are temperature, humidity, and wind speed. In water, the parameters are temperature, depth, and salinity. Nonetheless, on average, sound travels ~340 $\frac{m}{s}$ in air and ~1500 $\frac{m}{s}$ in salt water.

The formula to find sound speed in the ocean (Wilson 1960) is

c = 1449.2 + 4.6t–0.055t2 + 0.00029t3 + (1.34 − 0.010t) * (s − 35) + 0.0165z where, * c is sound speed in $\frac{m}{s}$ * t is temperature in °C * s is salinity in parts per thousand (ppt) * z is depth in m

The formula to find sound speed in air is

c = 331 + 0.6t where, * c is sound speed in $\frac{m}{s}$ * t is temperature in °C

The first entry corresponds to temperature. The second entry, either denote “water” or “air” for sound speed default. The third entry corresponds to salinity, while the fourth entry corresponds to depth.

Example

  1. How does the speed of airborne sound compare between Hawai’i (23°C) and a polar-like region, such as Ithaca, NY (3°C)?
#Speed of sound in air at 23°C 
soundSpeed(23)
#> [1] 344.8
#Speed of sound in air at 3°C 
soundSpeed(3)
#> [1] 332.8
  • In air, sound is 12 $\frac{m}{s}$ faster in Hawai’i (23°C) compared to Ithaca, NY (3°C).
  1. How fast will a black durgon warning call travel in 30°C water with a salinity of 35 ppt and a depth of 10 meters?
#Speed of fish sound in saltwater
soundSpeed(30, "water", 35, 10)
#> [1] 1545.695
  • In water, the call will travel at the speed of 1545.695 $\frac{m}{s}$.

Sound Reflection, Transmission, and Refraction

As a sound wave travels through a medium, it will be dynamically reflected and refracted. Reflection is like a ball bouncing off the ground in which the energy of a sound is directed into another direction by an object. Sound enters water from air at the critical angle of 15° at the air-water boundary – or the place where the surface of water meets air. Refraction is when sound changes speed after crossing into a different medium, such as when a sound from air enters the water. Refraction can also occur when sound changes speed in a medium with varying conditions, such as when temperature shifts through the water column in the ocean. The angle and longitudinal wave velocity of this new direction from reflection can be calculated utilizing Snell’s law, where reflection angle is represented as Θ1 and refraction angle is represented as Θ2:

$$ \frac{\sin\Theta_1}{{V_L}_1} = \frac{\sin\Theta_2}{{V_L}_2} $$ where, * c1 and c2 are the sounds speeds in medium 1 and 2 given in $\frac{m}{s}$ * theta1 and theta2 are the angles of incidence and refraction in °

Examples

  1. Calculate the reflection angle given the angle of a black-tailed godwit sound source is 64°, VL1 is 1564 $\frac{m}{s}$ and VL2 is 1494 $\frac{m}{s}$.
snell(64,1564,1494)
#> [1] 61.13555
  • The reflection angle is 61.14°.
  1. Calculate the refraction angle given the angle of a Dixie Valley toad sound source is 15.5°, VL1 is 1493 $\frac{m}{s}$ and VL2 is 1502 $\frac{m}{s}$.
snell(15.5,1493,1502)
#> [1] 15.59344
  • The refraction angle is 15.593°.

Sound Absorption, Impedance, Pressure, and Intensity

Sound absorption is the energy dissipation through a medium or the total transmission loss of sound from a source to a receiver. The transmission loss is impacted by the same factors impacting the speed of sound in each medium.

Regarding absorption in air, the factors to take into consideration are the frequency of the sound source, ambient temperature, pressure, and relative humidity (if curious about how each of these paramters independently affects sound pressure, explore this interactive plot developed by Daniel Russel at Pennsylvania State University)Figure.

In water, absorption is impacted by the frequency of the sound source, ambient temperature, depth, salinity and pH. Absorption is only one factor of transmission loss and more details on transmission loss are provided later, but for more information on the calculation please refer to ISO 9613 Part 1 for sound absorption in air (Acoustics 1996) and Ainslie and McColm 1998 for sound absorption in water (Ainslie and McColm 1998). The equation pre-programmed within this package estimates absorption on average in a marine environment and thus would not be precise in estimating absorption freshwater environments. Note: There are several equations to estimate absorption in water for different ranges of predictors not functional in this package.

Impedance is the measure of resistance of a medium to wave propagation, or in other words, the willingness of a sound wave to move through a medium (Acoustic Impedance 2009). The factors that affect impedance are the medium’s properties and the type of wave propagation. Water is 800 times more dense than air. Coupled with a faster speed of sound, water has an acoustic impedance approximately 3,500 times higher than that of air (for further reading, see this explained from the University of South Wales). When perceiving the effect of impedance on a sound, the modality often considered is perception. The outcome of impedance is usually an altered intensity of how the signal of interest is perceived, which will be described in greater depth with sound intensity.

The unit of specific acoustic impedance is the Rayl (Ry), which is equal to 1 kg/(m2s) or 1 Ns/m3. For air, z= 428 Ry at 20°C and z = 413 Ry at 0°C. For water, z = 14.8 MRy. We can map the relationship of impedance to the speed of the sound and density of the medium:

z = c * ρ

Sound pressure is the average local pressure deviation from the surrounding pressure of the medium. In the case of bioacoustics, sound pressure is how the pressure of the vocalization of interest alters the average sound pressure of the surrounding ecosystem. We can measure the sound pressure (pressure root mean square) from either simulated sine wave representations of sound waves $Prms = P_{zero2peak}/\sqrt{2}$ or, more typically, by averaging the absolute pressure measurements $Prms = \sqrt{(P^2)_{average}}$. Below is a simulated sine wave representation to give you an understanding of Pzero2peak(blue) and Ppeak2peak(red)(“Introduction to Signal Levels” 2019):

#> Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
#> ℹ Please use `linewidth` instead.
#> This warning is displayed once every 8 hours.
#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
#> generated.
#> Warning in ggplot2::geom_segment(ggplot2::aes(x = pi/2, y = 0, xend = pi/2, : All aesthetics have length 1, but the data has 126 rows.
#> ℹ Please consider using `annotate()` or provide this layer with data containing
#>   a single row.
#> Warning in ggplot2::geom_segment(ggplot2::aes(x = 5 * pi/2, y = 0, xend = 5 * : All aesthetics have length 1, but the data has 126 rows.
#> ℹ Please consider using `annotate()` or provide this layer with data containing
#>   a single row.
#> Warning in ggplot2::geom_segment(ggplot2::aes(x = 5 * pi/2, y = 0, xend = 5 * : All aesthetics have length 1, but the data has 126 rows.
#> ℹ Please consider using `annotate()` or provide this layer with data containing
#>   a single row.

Finally, the sound intensity can be measured by the relationship between pressure and the impedance. Therefore, the definition of intensity of sound is the average amount of energy transmitted per unit time through a unit area in a specified direction. The acoustic impedance of water is 3,500 times higher than in air, meaning a specific sound produced in air would be 3,500 times less intense if instead produced in water. Further, if two different sounds in water and air were estimated to have the same intensity, the sound prouced in air would have much smaller pressure, since speed of sound is held relatively constant for each environment (“Acoustic Impedance, Intensity and Power,” n.d.; “Sound Intensity,” n.d.). The relationship between impedance and pressure can be represented as the following:

Soundintensity = soundpressure * particlevelocity $$ I = \frac{P_{rms}^2}{z}$$ * I is the intensity of sound in $\frac{W}{m^2}$

Excercises

  1. A call of the rarest beaked whale, the spade-toothed beaked whale (Mesoplodon traversii), has never been confirmed via scientific literature. What would be the absorption coefficient of a possible spade-toothed beaked whale call at 48kHz, a average salinity of 34ppt, a temperature of 18°C, a pH of 7.75, and estimated average depth of 2km?
absorptionWater(48,7.75,18,34,2)
#> [1] 9.433558
  • The absorption of the call would be 9.434 $\frac{dB}{km}$.
  1. The land lobster (Dryococelus australis), was a thought-to-be extinct insect in 1920 but was rediscovered in 2001. It is thought these insects make a small squeak noise when threatened. What would be the absorption coefficient with a call at 10 kHz, standard pressure, 20°C, and 99% humidity?
absorptionAir(10000,101.325,20,99)
#> [1] 0.0885461
  • The absorption of the call would be 0.089 $\frac{dB}{m}$.
  1. A vector of hypothetical pressure values is given to you for a defensive call from a mangrove whiptail (Himantura granulate). Recorded in the Indo-Pacific, the call was produced at 24 kHz. What was the intensity of the sound?
#Assume standard impedance in water
z <- 14.8

#pressure values for example
press <- c(20, 24, 18, 34, 51, 29, 29, 15)

#pressure root mean square of pressure values
prms <- sqrt(mean(press^2))

#Formula for impedance
prms^2/z
#> [1] 58.81757
  • The intensity of the call would be 58.818 $\frac{W}{m^2}$.

References

Acoustic Impedance. 2009. University of Wisconsin Stevens Point; Lippincott Williams & Wilkins.
“Acoustic Impedance, Intensity and Power.” n.d. Acoustic Impedance and Intensity: From Physclips Waves and Sound. UNSW School of Physics Sydney Australia. https://www.animations.physics.unsw.edu.au/jw/sound-impedance-intensity.htm.
Acoustics, ISO. 1996. “Attenuation of Sound During Propagation Outdoors.” Markham, ON: ISO 533: 1–8.
Ainslie, Michael A, and James G McColm. 1998. “A Simplified Formula for Viscous and Chemical Absorption in Sea Water.” The Journal of the Acoustical Society of America 103 (3): 1671–72.
“Introduction to Signal Levels.” 2019. Discovery of Sound in the Sea. University of Rhode Island; Inner Space Center. https://dosits.org/science/advanced-topics/introduction-to-signal-levels/.
Klinck, Holger. 2022. “The Science of Sound.” K. Lisa Yang Center for Conersvation Bioacoustics; Cornell University Lecture.
“Sound Intensity.” n.d. Siemens. Siemens Digital Industries Software. https://community.sw.siemens.com/s/article/Sound-Intensity.
Wenz, Gordon M. 1962. “Acoustic Ambient Noise in the Ocean: Spectra and Sources.” The Journal of the Acoustical Society of America. Acoustical Society of America.
Wilson, Wayne D. 1960. “Equation for the Speed of Sound in Sea Water.” The Journal of the Acoustical Society of America 32 (10): 1357–57.