The Celtic Engineer is a weekly newsletter produced by Celtic Engineering Solutions.  We hope you enjoy it.  If you have any suggestions for topics, would like to give feedback or want your email added to the distribution list please send an email to[email protected].
Harry Nyquist is famous for his many contributions to the field of engineering.  His achievement concerning aliasing comes from a paper he published in 1924 in the Bell System Technical Journal, “Certain factors affecting telegraph speed.” In this paper, he lays out the criteria for determining the bandwidth requirements for transmitting information, in particular how many telegraph pulses can be put through a telegraph channel per unit time relative to the bandwidth of the channel.
Folding? Where did that signal come from?
Nyquist explained that to reproduce a signal of a certain frequency, you have to sample that signal at least twice its maximum frequency.  If you have a signal that ranges from 80 hz to 100 hz, then you must sample it at 200 hz or above to be able to reproduce the original signal accurately.
What happens if a signal is under sampled.  For example, what happens if the signal above has a component of 120 hz and we sample it at 200 hz.  There is a phenomenon in communication theory known as folding.  Folding occurs at ½ the sample frequency.  In our example, a 200 hz sample rate is folded at 100 hz.  Frequencies between 100 and 200 appear mirrored (or folded) around the 100hz mark.  A signal at 120 hz appears at 80 hz. A formula that expresses this is the following:

fa is the alias frequency (80 hz),
R is the sample rate (200 hz),
N is an integer (1),
fs is the frequency of the signal being sampled (120 hz).

The signal would appear to have an 80 hz and a 120 hz component because both signal can be reproduced from the collected data.
Anti-aliasing Filters
To prevent aliasing, it is important to always filter your signal appropriately.  The trick is to pick a filter that will not affect the signal of interest much, but will attenuate the signals with frequencies above the Nyquist frequency.  For example, to filter a 100 hz signal, you could put a low pass filter between the signal and the A to D converter and sample at 200 hz.  That meets the technical requirement.   However, the cutoff frequency is the ½ power or 3dB point, so your signal will be affected significantly by the filter.  A better way would be to put the filter at 200 hz and set the sample rate at 400 hz or even 500 hz.  This is called oversampling.  This will prevent aliasing, but depending on what you want to do with the data, it might not be useful.  Oversampling by 10 times will give a better reconstruction of the signal.  As an example, listen to some old-time radio programs.  Some will sound crisp and clear, these are oversampled.  Others are muted and muddy. They don’t have much in the way of high frequency content.  This information is there, but the quality is bad.  If you hear a low frequency buzzing the signal was not filtered properly.  You are hearing aliasing.  The buzzing is the part of the signal that was close to the sample frequency and was folded down close to ½ the sample frequency.
Other types of Aliasing
As electrical engineers, we tend to think of everything as a single signal, a voltage changing with time.  But there is also such a thing as two-dimensional temporal aliasing.  You have experienced this if you ever watched a move of a wagon.  When the spoked wheel is rotating close to the frame rate of the camera, the wheel can appear to be rotating much too slow or even rotating backwards.
There is also a phenomenon called spatial aliasing.  When a photograph is under sampled image can have fuzzy edges or even form a moiré pattern in the image which can lead to some very unusual images for example a wave moving through a brick wall.

Don’t be deceived by DC
I have heard this many times, “I don’t have to worry about aliasing because my signal is DC.  There will still be noise on your signal.  Not filtering your signal will lead to, not only the original noise issue, but that noise aliased into your sampled signal making the problem all the worse for being lazy.
Final thoughts
This newsletter is sponsored by Celtic Engineering Solutions LLC, a design engineering firm based out of West Jordan, Utah, which can be found on the web at:  You can find the newsletter on the company blog, LinkedIn or by subscribing.  Send your emails to The Celtic Engineer at:  [email protected].