# In the Sampling Theorem, why are the image frequencies at n*fc not a problem?

In this example I have been working through, we first look at the situation when fs > 2fc and then the situation when it isn't:

In the example, the frequency responses of a sampled sinusoid at fc = 5 kHz are shown. In the first instance, the sampling rate is fs = 16 kHz, and in the second it is fs = 8 kHz.

I understand the concept of aliasing and I can see how it has occurred in the second example - an alias has crossed over fc. What I don't quite get is why the situation in the first instance is acceptable - there are still aliases in the signal. Is it simply that we can window (low-pass filter) the frequency response to fs/2 as we know this is the highest frequency that can be resolved?

• yes as your last sentence says... – Fat32 May 27 at 18:24
• Note that a sampled sinusoid doesn't have a frequency response... what you're looking at is the spectrum. Only systems have frequency responses. – MBaz May 27 at 21:29

The "alias" frequencies you see appearing above the Nyquist limit $$f_s/2$$ do not exist in a proper interpretation of the digitised signal; they are appearing due to incorrect interpolation of the samples during reconstruction. If you correctly interpolate the signal from the samples, those frequences will not be there.

Remember, a key condition of the Nyquist–Shannon sampling theorem is that it can perfectly record the input signal only so long as it contains no frequencies above $$f_s/2$$. A corollary of this is that the output signal you produce from correctly interpreting the samples must not contain such frequences either. The core of the theorem is that if you sample a signal under this condition, and then plot a sequence of points corresponding to each sample, there will be only one curve you can interpolate that both passes through every point and also contains no frequencies above $$f_s/2$$; that curve is the same as the original input.

The difficulties and details of adhering to this condition and properly interpolating the output are what cause problems like the one you're seeing.

In the case of your output, you're probably reconstructing the signal using piecewise interpolation, producing a "stair-step" output that looks like this:

(Image credit: https://wiki.xiph.org/Videos/Digital_Show_and_Tell)

That's certainly one way of doing it, but it (or at least it used alone) is the wrong way. Such an interpolation clearly has a lot of frequency information above $$f_s/2$$ (the alias frequencies) and is significantly different the original input signal meeting the conditions above.

It is, however, often an intermediate signal during the interpolation process; it turns out that one way of doing the interpolation fairly accurately is to to generate a signal using piecewise interpolation and then filter out all components of it above $$f_s/2$$, which will leave us with the original waveform.

You can do this in your first diagram by simply erasing everything above $$f_s/2$$, leaving only the original 5 Khz frequency you sampled.

For a more in-depth explanation of this, I recommend Monty Montgomery's, "D/A and A/D | Digital Show and Tell" video (also on YouTube). There's also a text version if you're short on time, but the video demonstration is signifantly more clear. I would consider this almost mandatory viewing for anybody involved in any details of digital sampling, audio or otherwise.

How comfortable are you with the concept of negative frequencies? Your 5 kHz cosine consists of two lines in the spectrum, one at +5kHz one at -5kHz. If you made your first diagram such that it goes from $$-fs/2$$ to $$+fs/2$$, you'd see exactly these two. I find this way of displaying the spectrum much more intuitive.

Outside this band, you will see periodic copies of this spectrum, this happens automatically whenever you sample. They come at distances of $$fs$$ and therefore, your -5kHz line reappears at 11 kHz, 27 kHz, 43 kHz and so on. These are not really different, they are just different "interpretations" of the same data.