› Forums › Foundations of speech › Signal processing › Sampling and Nyquist Frequency
- This topic has 5 replies, 4 voices, and was last updated 4 years, 2 months ago by Simon.
-
AuthorPosts
-
-
October 1, 2020 at 11:07 #12159
Hi,
I’m having problems with fully understanding the concept of the Nyquist frequency.
Initially, it was introduced in response to the question “how often should we sample a waveform” and this makes sense to me. We need at least 2 samples per cycle to reconstruct the shape of the wave. Then the Nyquist frequency was defined and I also understand that the highest frequency in our signal that we can capture is dependent on the sampling rate/Nyquist frequency.But when we look at an analogous signal and we would like to sample it, why should we ever choose a sampling rate that is too low? So, why should it ever be necessary to remove frequencies that are higher than the Nyquist frequency in order to prevent aliasing?
Or am I understanding something wrong and we don’t really have access to the “original wave” that we would like to have in a digital form?
-
October 1, 2020 at 12:36 #12160
I think it’s just an example to demonstrate why the Nyquist frequency is the limit. In practical terms , you wouldn’t choose a sampling frequency above the Nyquist frequency because of aliasing, as you said. But I might be wrong too.
-
October 1, 2020 at 12:41 #12161
It’s also super strange for me to read/ to say that we choose a sampling frequency above the Nyquist frequency.
Nyquist frequency is defined in terms of sampling rate, how can you make your sampling rate dependent on the Nyquist frequency when the sampling rate is “prior to” Nyquist frequency as it is used in its definition? -
October 2, 2020 at 11:51 #12167
An analogue signal – such as a sound wave propagating through air – may contain frequencies over a very wide range, with no upper limit.
When we need a digital representation of such a signal, we need to choose a sampling rate (which then determines the Nyquist frequency). Our choice of sampling rate will be influenced by:
- What information in the sound we think is important – we might say that only frequencies up to 8 kHz are useful for Automatic Speech Recognition, for example.
- Practical considerations such as the amount of storage the digital waveform will require (higher sampling rate = larger files) or whether we need to transmit it (higher sampling rate = larger bandwidth required).
We will generally choose the lowest possible sampling rate that satisfies the first requirement, related to the application we are building.
We must remove any components of the analogue signal that are above the Nyquist frequency, before sampling it. This is done in the analogue domain using a low-pass filter (an ‘anti-aliasing filter’). There is such a filter in your computer’s audio input, for example.
You’re unlikely to ever need to build an analogue-to-digital convertor, so you might be wondering why we care about this…
The same thing applies when reducing the sampling rate of an existing digital signal – a process known as downsampling. For example, to halve the sampling rate, we cannot simply take every second sample. We must first pass the digital signal through a low-pass filter (an ‘anti-aliasing filter’ in the digital domain) to remove everything above the new, lower, Nyquist frequency.
Downsampling is quite common when preparing existing speech recordings for use in speech technology. They may have been recorded at a higher sampling rate than we wish to use.
-
October 4, 2020 at 10:23 #12186
And how do you ensure that the sampling rate is capturing points at the peaks and troughs so that you can rebuild the waveform correctly – would this not be hard to do for complex sine waves, or even for pure sine tones if it didn’t match the phase of the sine waves peaks and troughs…?
-
October 4, 2020 at 11:40 #12188
A very good question, which is about how the theory of sampling meets practical application.
Let’s start with the easy case of a sampling frequency much higher than than any component frequency of the signal being sampled. We will get many samples per cycle and therefore good reconstruction when we ‘join the dots’ (the samples). All good so far.
Now consider the limiting case: a sampling rate that is only twice as high as any component of the signal being sampled. You are right that we might be ‘lucky’ or ‘unlucky’ in where the sampling points fall with respect to the signal being sampled. This is explored in one of the notebooks.
The take-home message is that a digital representation of a signal is going to be reliable for frequencies well below the Nyquist frequency, but that we should not entirely trust the representation of frequencies close to the Nyquist frequency.
The Nyquist frequency is a theoretical limit – an absolute maximum frequency that we can capture by sampling. In practical applications, we would not want to operate too close to this limit. For example, if you thought that speech synthesis requires perfect reconstruction of frequencies up to 10 kHz, then you would not choose to sample at 20 kHz but something a little higher.
The digital signal is an approximation of the original analogue signal that was sampled. We have made compromises, which are unavoidable in all real engineering applications. They are not a problem, so long as we understand the consequences.
-
-
AuthorPosts
- You must be logged in to reply to this topic.