Skip to main content

Frequency Variation

Attenuation

In an ideal world, every sound can be modeled as a simple sine wave with the following formula.

x=Asin(B(tC))x = A \sin(B(t - C))

In this formula,

  • AA determines the amplitude,
  • BB determine the frequency,
  • CC determine the phase,
  • tt is time,
  • xx is the position of a the vibration sensor in the microphone.

Unfortunately, very few sounds are represented by a simple sine wave. Vibrating strings have harmonics that produce sounds at multiple frequencies. This doesn't even take into account that there could be multiple sound sources producing sound at the same time. With the discrete Fourier transform (DFT), we can separate out the frequency components of an audio signal. A more accurate formula for this situation would be the following formula.

x=i=0nAisin(Bi(tCi))x = \sum_{i=0}^{n} A_i \sin(B_i(t - C_i))

Unfortunately, this scenario is still highly unrealistic. Sound is caused by vibration, and vibrating objects lose energy through friction as they are vibrating. This phenomenon is called attenuation. High frequency waves attenuate faster than low frequency waves because more vibrations result in more friction between air molecules. If we let αi\alpha_i represent attenuation for the iith frequency component, the a sound signal can be modeled by the following formula.

x=i=0nαiAisin(Bi(tCi))x = \sum_{i=0}^{n} \alpha_i A_i \sin(B_i(t - C_i))

Attenuation typically increases with the square of the frequency, αiBi2\alpha_i \propto B_i^2. This means that not only does the overall amplitude of a wave change over time, but the weighted distribution of frequency components changes as well.

Ultimately, it doesn't take a lot of math to figure out that sounds don't last forever. In a 5-minute audio clip, frequencies will change over time and we need to have tools to analyze audio in these situations.

Linear Chirps

A chirp is an audio signal in which the frequency changes over time. The frequency BB is replaced with a function of time ϕ(t)\phi(t).

x=Asin(ϕ(t)(tC))x = A \sin(\phi(t) \cdot (t - C))

Technically speaking, every wave with constant frequency would have ϕ(t)=B\phi(t) = B, but since those waves have a constant frequency they aren't considered chirps.

If ϕ(t)=t\phi(t) = t, then the chirp is called a linear chirp. The time domain, frequency domain and audio for a linear chirp are shown in Module 1.

Module 1
The frequency domain of a linear chirp.

Exponential Chirps

Notice how the linear chirp sweeps through the low frequencies so quickly that you can barely notice them at the end. This is because humans perceive frequencies on a logarithmic scale, not a linear scale. If we want to generate a chirp we perceive as linearly decreasing, then we need to generate an exponential chirp. The time domain, frequency domain and audio for an exponential chirp are shown in Module 2.

Module 2
The frequency domain of a exponential chirp.

Hyperbolic Chirps

The Doppler effect is given by the following equation.

fo=v+vov+vsfsf_{o} = \frac{v+v_{o}}{v+v_{s}} f_{s}

In this equation,

  • fof_{o} is the observer frequency of sound,
  • vv is the speed of sound waves,
  • vov_{o} is the observer velocity,
  • vsv_{s} is the source velocity, and
  • fsf_{s} is the actual frequency of sound waves.

If the source of the sound is accelerating, i.e. if the velocity of the source is increasing, then the observed frequency is decreasing hyperbolically.

Module 3
The frequency domain of a hyperbolic chirp.
Copyright © 2024 Audio Internals