Nyquist Sampling

Hydrophones allow people to listen to underwater sound. They convert sound in water (pressure changes) into electrical signals (How is sound measured?). These electrical signals can be recorded and analyzed with computer programs to determine the properties of the sound wave, including amplitude and frequency. Analyzing, modifying, and synthesizing signals, such as sound, is called signal processing.

This page will describe the first step in signal processing: how to properly sample electrical signals to record an acoustic signal to a computer. For more information, see Dr. Kathleen Wage’s excellent introduction to signal processing in this DOSITS webinar: Signal Processing 101 and Soundscapes.

The electrical output from a hydrophone is an analog signal. In this case, it is a continuous signal that varies with time based on the acoustic pressure of the sound wave. To record an analog signal to a computer, one must convert the analog signal to a digital signal, i.e., represent the continuous signal with a series of samples. This is done with an instrument called an Analog-to-Digital Converter (ADC).

To convert the analog signal to a digital signal, one must decide on the sampling frequency (FS), that is, how often a sample should be taken or how many samples should be used to represent the continuous signal. This decision is based on the frequency of the signal (F0). Signal processing theory says that the sampling frequency must be greater than the Nyquist rate, which is defined as twice the frequency in the signal, i.e.,

FS > 2F0

The reason for this is shown in the following figures, where a signal that consists of a simple sine wave with a frequency of 4 Hz
(F0 = 4 Hz, or there are four cycles per second) is sampled at a range of frequencies. The set of samples can then be used to reconstruct an electrical signal using a Digital-to-Analog Converter (DAC). The original signal is shown as a solid line, the samples of the signal are shown as blue dots, a linear interpolation of the samples is shown as a dashed line, and the reconstructed signal is shown as a red line. If the sampling rate was less than or equal to the Nyquist rate, there will be aliasing, in that the reconstructed signal will not represent the original signal.

A simple sine wave with a frequency of 4 Hz. Image courtesy of Kathleen Wage, George Mason University.

As is shown in the figure below, if the signal is sampled at 6 Hz, that is, there are six samples in one second, the linear interpolation of the samples does not recreate the original signal because the sampling rate is less than the Nyquist rate and aliasing will occur when the signal is reconstructed. In the below figure, the reconstructed signal has a frequency of 2 Hz (reconstructed frequency, Fr), which does not match the original signal.

A simple sine wave with a frequency of 4 Hz sampled at 6 Hz. Image courtesy of Kathleen Wage, George Mason University.

As is shown in the figure below, if the signal is sampled at 8 Hz, which is equal to the Nyquist rate, the linear interpolation of the samples does not recreate the original signal and, in fact, creates a signal with values equal to 0 (reconstructed frequency, Fr =0).

A simple sine wave with a frequency of 4 Hz sampled at 8 Hz. Image courtesy of Kathleen Wage, George Mason University.

As is shown in the figure below, if the signal is sampled at 10 Hz, which is greater than the Nyquist rate, the samples can be used to properly reconstruct the original signal. More complex signal processing is used in this figure (below) than linear interpolation to create the reconstructed signal, which is why the dashed line does not match the reconstructed signal.

A simple sine wave with a frequency of 4 Hz sampled at 10 Hz. Image courtesy of Kathleen Wage, George Mason University.

This example used a simple sine wave (also called a sinusoid) with only one known frequency. In reality, almost all signals are much more complex, consisting of multiple sinusoids, and the frequencies may not be known. However, one can reconstruct complex signals by adding up individual sinusoids. More details are available in Kathleen’s webinar: Signal Processing 101 and Soundscapes. In summary, it is critically important that electrical signals recorded from hydrophones are digitally sampled above the Nyquist rate. That is, to properly digitize (save to a computer) an acoustic signal, one must sample the signal at greater than twice the frequency one wishes to record.