Revision as of 08:32, 3 October 2014 by Shathorn (Talk | contribs)


Discrete-time Fourier transform (DTFT) of a sampled cosine

A slecture by ECE student Sutton Hathorn

Partly based on the ECE438 Fall 2014 lecture material of Prof. Mireille Boutin.



Background


A cosine wave with frequency f can be written as $ cos(2 \pi f t) $. When sampling this cosine with period T (frequency $ f_{s}=1/T $, the sampled signal $ x[n] $ can be written as $ x[n]=cos(\frac{2 \pi f n}{T}) $.

The nyquist rate for a given signal is given as $ f_{s} = 2 f_{m} $, where $ f_{m} $ is the highest frequency in the signal. Since a cosine has only one positive frequency, for a cosine $ f_{m}=f $ and the nyquist rate is $ f_{s}=2 f \ Hz $.

For demonstration, consider a cosine with frequency 880 Hz. This represents a pure A note. This signal can be written as: $ x(t)=cos(2 \pi 880 t) $

In continuous time, the signal looks like this:

Example.jpg

Using the continuous time signal, it is possible to sample the signal. Due to the Nyquist Theorem, $ f_{s}>1760\ Hz $. To demonstrate sampling above the Nyquist Rate, a $ f_{s} $ of 2000 Hz will be used. The sampling points are shown in red on top of the original signal below

Example.jpg


CTFT vs DTFT

In order to understand what is happening in the frequency domain, we can compare the CTFT of the cosine to the DTFT of the sampled cosine.

From the CTFT table, the CTFT of a Cosine is

$ X(f)=\frac{\delta(f-880)+\delta(f+880)}{2} $

To obtain the DTFT from the CTFT, three steps must occur:

  • Rescale the frequency axis: $ \chi(\omega) = X(\frac{\omega f_{s}}{2 \pi }) $
  • Rescale the magnitude by 1/T
  • Repeat ("rep") the signal every $ 2 \pi $

Sampling above the nyquist rate For the sampling at 2000Hz, this results in the following DTFT:

$ \Chi(\omega)=2000\frac{\delta(\frac{2000 \omega}{2 \pi }-880)+\delta(\frac{2000 \omega}{2 \pi }+880)}{2} $

$ \Chi(\omega)=2000\frac{\delta(\frac{2000 \omega-2 \pi 880}{2 \pi })+\delta(\frac{2000 \omega+2 \pi 880}{2 \pi })}{2} $

$ \Chi(\omega)=2000\frac{\delta(2000\frac{ \omega-2 \pi \frac{880}{2000}}{2 \pi })+\delta(\frac{2000\omega+2 \pi \frac{880}{2000}}{2 \pi })}{2} $


$ \Chi(\omega)=2\pi \frac{\delta( \omega- \pi \frac{880}{1000})+\delta(\omega+\pi \frac{880}{1000})}{2} $

$ \Chi(\omega)=\pi \delta( \omega- \pi \frac{880}{1000})+\pi \delta(\omega+\pi \frac{880}{1000}) $

$ \Chi(\omega)=\left\{\begin{array}{ll}\pi \delta( \omega- \pi \frac{880}{1000})+\pi \delta(\omega+\pi \frac{880}{1000}), & \text{ if }-\pi<\omega<\pi,\\ \text{periodic period } 2\pi\end{array} \right. \ $

Example.jpg <center> Sampling Below the Nyquist Rate

We can repeat the same process for a sampling below the Nyquist rate. In this case, we will sample at 1000 Hz. Using the same process as above, the result is:

$ \Chi(\omega)=\left\{\begin{array}{ll}\pi \delta( \omega- \pi \frac{880}{500})+\pi \delta(\omega+\pi \frac{880}{500}), & \ ,\\ \text{periodic period } 2\pi\end{array} \right. \ $

$ \Chi(\omega)=\left\{\begin{array}{ll}\pi \delta( \omega- \pi \frac{120}{500})+\pi \delta(\omega+\pi \frac{120}{500}), & \text{ if }-\pi<\omega<\pi,\\ \text{periodic period } 2\pi\end{array} \right. \ $

The plot of the DTFT is shown below: Example.jpg

Note that the original frequency components are outside of the $ [-\pi,\pi] $ range. This leads to aliasing, which creates an additional frequency component at 120 Hz. This illustrates the fact that sampling below the nyquist rate will create aliasing and prevent shannnon reconstruction of the signal.


Conclusion

As a brief overview, there are two main takeaways:

  • The DTFT can be obtained from the CTFT by time scaling f by $ 2\pi/f_s $, magnitude scaling by $ f_s $, and repeating every $ 2\pi $
  • Sampling below the nyquist rate will cause aliasing and add low frequency components to the signal, potentially preventing any recovery.


(create a question page and put a link below)

Questions and comments

If you have any questions, comments, etc. please post them on this page.


Back to ECE438, Fall 2014

Alumni Liaison

Basic linear algebra uncovers and clarifies very important geometry and algebra.

Dr. Paul Garrett