A-level Computing/AQA/Paper 2/Fundamentals of data representation/Nyquist-theorem





We have seen the various ways that you can reduce the size of files, we have also seen that humans have a limit to the frequencies that they can perceive, so what sampling rate would be needed to only store the samples that humans can perceive. The full range of human hearing is between 20 Hz and 20 kHz.

People are able to hear different frequencies, up to what level can you hear? You lose your hearing with age, so the older you are the less likely you are to be able to hear the full spectrum.

So why not just use 20 kHz as our sampling rate record 20k cycles per second and be done with it? There is a small problem:



What we need to properly represent a sound wave is to sample it at least two times per cycle:

Therefore the minimum sampling rate that satisfies the sampling for the human ear is 40 kHz (2*20 kHz). The 44.1 kHz sampling rate used for Compact Disc was chosen for this and other technical reasons.

Shannon's version of the theorem states:

"If a function x(t) contains no frequencies higher than B Hz, it is completely determined by giving its ordinates at a series of points spaced 1/(2B) seconds apart."

We can relate Frequency and period together using this equation. This equation will be very useful for working out the sample rate of a given wave. $$ \text{frequency (f)} = \frac{1}{\text{Period (T)}}$$ What happens when you have a graph of time against displacement? We know that Nyquist's Theorem is that the sample rate should be double than the highest frequency. So to calculate the sample rate, $$ \text{sample rate} = 2 \times \text{freqency(f)}$$
 * 1) Work out the period by looking at the time taken for one complete oscillation.
 * 2) Work out the frequency
 * 3) Work out the sample rate with this:
 * TIP - sometimes the period is hard to determine in one go as it may not cross an easily readable point on the axis.
 * To Compensate, you can go to where it does cross the axis at a readable point, then divide by how many oscillations have occurred from 0 to the time

Describe Nyquist's-theorem You should set the sample rate at a frequency which is at least twice the value of the highest frequency in the sampled signal

For a sound sample of maximum frequency 16 kHz what should the sample rate be? 32 kHz

How many cycles per second in the following sample?

For the sample what should the sample rate be according to nyquist's-theorem?



the sample has a frequency of 4 cycles per second. using Nyquist's theorem you would have to sample this at at least 8 Hz