1
$\begingroup$

I'm struggling to get my head round the mathematical proof for the alias frequencies in a sampled sine wave.

I understand that sampling a sine wave of frequency $f_0$ every $t_s$ seconds gives you:

$$x[n]=\sin(2\pi f_0nt_s)$$

I also understand that, because the sine wave is periodic every $2\pi$, you can add any multiple of $2\pi$ to the angle and get the same values for the sine, i.e.,

$$\sin(2\pi f_0nt_s)=\sin(2\pi f_0nt_s+2\pi m) \quad\text{(where $m$ is any integer).}$$

The proof I'm looking at then factors out $2\pi$ and $nt_s$ to get:

$$\sin\left(2\pi(f_0+\frac{m}{nt_s})nt_s\right)$$

...but then it says to let $m$ be an integer multiple of $n$ so we can replace the $\frac{m}{n}$ ratio with an integer $k$.

I don't understand how $m$ can go from being "any integer" to "an integer multiple of $n$". If $m$ is any integer and $n$ is an integer then how can the ratio between them be an integer?

I know I'm missing something obvious here and I'm searching for that light-bulb moment but it's not happening. Because this is so fundamental to DSP I don't just want to accept the formula and move on without thoroughly understanding it.

$\endgroup$
  • 1
    $\begingroup$ Can you provide a link to the whole proof? $\endgroup$ – oxuf Nov 11 '17 at 20:31
  • $\begingroup$ @oxuf I don't have a link, I'm afraid. It's in a book "Understanding Digital Signal Processing by Richard G. Lyons". $\endgroup$ – IanR Nov 12 '17 at 12:23
7
$\begingroup$

The reason is that if it is true for any $m$, it is also true for $m=kn$.

I will sketch the proof in another way.

Call $f_s = 1/t_s$ sampling frequency where $t_s$ is sampling period, the two signal $x(t) = \sin(2\pi f_0 t)$ and $x_k(t) = \sin(2\pi (f_0 + k f_s) t)$ have the same values at sampling instants (aliasing), i.e. $x[n] = x_k[n]$.

Indeed,

\begin{align} x[n] &= \sin (2 \pi f_0 n t_s) \\ x_k[n] &= \sin \left(2 \pi (f_0 + k f_s) n t_s\right) \\ &= \sin (2 \pi f_0 n t_s + 2\pi k f_s n t_s) \\ &= \sin (2 \pi f_0 n t_s + 2\pi k n) = \sin (2 \pi f_0 n t_s)\\ &=x[n] \end{align}

$\endgroup$
  • $\begingroup$ Thanks for the help. I can see that if you work backwards you can show that for every value of k you get an alias frequency, but does that mean there might be other values of m that we've ignored that might also produce an alias frequency? Sorry - I'm sure I'm missing something quite fundamental and obvious. Maybe I just need to keep experimenting by plugging different values in the formulas and see which ones do/don't create alias frequencies. $\endgroup$ – IanR Nov 12 '17 at 12:28
  • 3
    $\begingroup$ Try changing $k f_s$ by an arbitrary $\Delta f$ and calculate the substraction $x[n] - x_{\Delta f}[n]$. To have alias, the substraction needs to be equal to 0 for all $n$ then $\Delta f$ must be a multiple of $1/t_s$. $\endgroup$ – AlexTP Nov 12 '17 at 12:51
  • $\begingroup$ Thanks @AlexTP that's a useful way to look at it. It also helped me see what the mathematical proof was getting at as well. If $\Delta f=\frac{m}{nts}=\frac{m}{n}f_s$ then $m=n\frac{\Delta f}{f_s}$ and the only way for $m$ to be an integer for all $n$ is if $\frac{\Delta f}{f_s}$ is also an integer, $k$. $\frac{\Delta f}{f_s}=k$ so $\Delta f=kf_s$ $\endgroup$ – IanR Nov 13 '17 at 13:06
  • $\begingroup$ @AlexTP: your answer was great but is it independent of the nyquist frequency. you didn't mention nyquist so my guess is yes. thanks. $\endgroup$ – mark leeds Nov 14 '17 at 8:15
  • 1
    $\begingroup$ @markleeds it's my understanding (which admittedly is still very limited) that this formula kind of leads you to the Nyquist frequency. It's showing that, when sampling, you'll get spectral replications in the frequency domain every $f_s$, so then you need to choose a value for the sampling rate $f_s$ such that the replications won't interfere with other giving aliasing errors in your band of interest. $\endgroup$ – IanR Nov 14 '17 at 12:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.