# Why Do Spectral Aliases Arise?

Explore the sampling and aliasing effects in the time and frequency domains.

## We'll cover the following

Varying sample rates (e.g., $f_s=5, 10, 20$ samples/second) for a continuous-time signal determine the spacing between the samples. The question is how close or far we can sample in time. Here, we explore some interesting phenomena observed when the sample rate is changed beyond certain values.

After sampling, a complex sinusoid has a frequency scaled by $f_s$ because

$\begin{align} x[n] &= A e^{j \left(2\pi f t + \theta\right)}| _{t=nT_s}\nonumber \\ &= A e^{ j\left(2 \pi \frac{f}{f_s} n + \theta\right)} \end{align}$

where $f_s=1/T_s$. The frequency $\frac{f}{f_s}$ in the equation above is the frequency of the discrete-time signal $x[n]$.

## Aliasing

Now let’s sample another complex sinusoid at the same rate $f_s$ and with the continuous frequency $f + k f_s$, where $k = \pm 1, \pm 2,etc$.

$\begin{equation*} x(t) = A e^{ j\left\{2 \pi (f +kf_s) t + \theta\right\}} \end{equation*}$

The sampled waveform becomes

$\begin{align*} x[n] &= A e^{ j\left\{2 \pi (f + kf_s) nT_s + \theta\right\}} \\ &= A e^{j \left(2 \pi \frac{f + kf_s}{f_s} n + \theta \right)} \\&= A e^{j\left(2 \pi \frac{f}{f_s} n + 2\pi kn + \theta\right)} \\ &= A e^{j \left(2 \pi \frac{f}{f_s} n + \theta\right)} \end{align*}$

due to the $2\pi$ periodicity of the sinusoid. This expression is exactly the same as that of the discrete-time sinusoid in Eq (1).

It can be concluded that at the output of the sampling process, it’s impossible to distinguish between two discrete-time signals whose frequencies are $f_s$ Hz apart. This phenomenon is known as **aliasing**.

## Time domain

A time domain demonstration of aliasing is shown in the figure below. Observe that both sinusoids pass through the same set of points in the discrete domain. Due to this reason, they cannot be distinguished from one another after the sampling is done.

Get hands-on with 1200+ tech skills courses.