Why sampling frequency matters – how to avoid audio aliasing
Audio Aliasing is an effect which occurs when converting an analogue signal into a digital one with an insufficient sampling frequency. The result of this effect is that the high-frequency components of that analogue signal will not be correctly interpreted, and the digital signal will not be an accurate copy of the analogue one.
This is important especially for the measurement work that we do at Xi Engineering Consultants as we always must consider our target frequency range when selecting what sampling frequency to use.
What is Audio Aliasing?
When analogue signals are digitised and turned into digital signals, the analogue signal is sampled at regularly occurring points in time, or in other words, the instantaneous amplitude of the analogue signal is recorded to create a digital copy of the analogue signal. This happens very quickly in audio signals, for example, CD audio is sampled at 44.1 kHz (44,100 samples per second).
Aliasing occurs when a signal is sampled at an insufficient rate. Two different signals can become indistinguishable from each other when they are sampled – they are aliases of each other.
The Nyquist sampling theorem states that to avoid aliasing the sampling frequency must be at least twice that of the highest frequency which is to be represented. If we return to the example of CD audio, a sampling frequency of 44.1 kHz means that the highest frequency which can be represented without aliasing is 22.05 kHz. For CD audio this is ample as the very upper limit of human hearing is around 20 kHz.
The cosine wave example
If we take an example of two analogue cosine waves, one with a frequency of 1 kHz and the other with a frequency of 7 kHz. These cosine waves have then both been sampled at 8 kHz – the sampling points are represented by the red crosses:
Now if we take away the original analogue signal and just plot the sampled digital signal:
It can be seen that the 1 kHz cosine wave still bears a resemblance to the original analogue version, but the 7 kHz cosine wave has changed! Worse, it appears identical to a 1 kHz cosine wave, it’s alias.
If we apply the Nyquist theorem to our 1 kHz cosine wave, 1 kHz x 2 = 2 kHz, we can see that 2 kHz is less than the 8 kHz sampling frequency that was used, therefore according to the Nyquist theorem, the 1 kHz signal is sufficiently represented.
If we apply the Nyquist theorem to our 7 kHz cosine wave, 7 kHz x 2 = 14 kHz, we can see that 14 kHz is higher than the 8 kHz sampling frequency that was used, therefore according to the Nyquist theorem, the 7 kHz signal will not be sufficiently represented, and that’s why we don’t see a 7 kHz signal after sampling.
The spinning wheel effect eXA
Aliasing can also be observed in a more visual way, described as the wagon wheel effect. This takes its name from its common occurrence on wagon wheels in classic Western films, but it is also often observed on films of helicopter blades or car wheels.
Each frame of the film is captured at a set point in time, which means that if the first frame shows the wheel spokes in one position and then the wheel rotates at such a speed that when the next frame is captured the when spokes are in the same position, then the result will be a film in which the wheels look as if they are stationary or slowly moving.
Why does this matter?
When making low-frequency seismic measurements, a lower sampling frequency is sufficient, but for measurements of noise most audible to humans, for example, a Noise Impact Assessment, a much higher sampling frequency must be used. A more extreme example is where Xi Engineering made measurements to assess the impact of a development adjacent to Edinburgh Zoo, much higher sampling rates had to be used to account for the fact that some Zoo inhabitants extended hearing range. Pandas are especially sensitive to high frequencies and can hear far into the ultrasonic range, which means it was important to make the measurements with a carefully considered sample rate.
How Xi Engineering can help you with your measurement
Xi Engineering has the expertise to understand that no two measurements are the same and use high-quality measurement equipment and tailored methods to ensure the most accurate results. If you have any requirement, don’t hesitate to contact us and one of our engineers will be in touch with you.