Line 14: Line 14:
 
</center>
 
</center>
 
----
 
----
 +
----
 +
 +
<center><font size= 3>
 +
Background
 +
</font size>
 +
 
----
 
----
 
A cosine wave with frequency f can be written as <math>cos(2 \pi f t)</math>. When sampling this cosine with period T (frequency <math>f_{s}=1/T</math>, the sampled signal <math>x[n]</math> can be written as <math>x[n]=cos(\frac{2 \pi f n}{T})</math>.  
 
A cosine wave with frequency f can be written as <math>cos(2 \pi f t)</math>. When sampling this cosine with period T (frequency <math>f_{s}=1/T</math>, the sampled signal <math>x[n]</math> can be written as <math>x[n]=cos(\frac{2 \pi f n}{T})</math>.  
Line 29: Line 35:
  
 
[[Image:Example.jpg]]
 
[[Image:Example.jpg]]
 +
 +
----
 +
<center><font size= 3>
 +
CTFT vs DTFT
 +
</font size>
  
 
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.  
 
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.  
Line 36: Line 47:
 
<math>X(f)=\frac{\delta(f-880)+\delta(f+880)}{2}</math>
 
<math>X(f)=\frac{\delta(f-880)+\delta(f+880)}{2}</math>
  
 +
To obtain the DTFT from the CTFT, three steps must occur:
  
 +
* Rescale the frequency axis: <math>\chi(\omega) = X(\frac{\omega f_{s}}{2 \pi })</math>
 +
* Rescale the magnitude by 1/T
 +
* Repeat ("rep") the signal every <math>2 \pi</math>
 +
<center><font size= 3>
 +
Sampling above the nyquist rate
 +
</font size>
 +
For the sampling at 2000Hz, this results in the following DTFT:
  
 +
<math>\Chi(\omega)=2000\frac{\delta(\frac{2000 \omega}{2 \pi }-880)+\delta(\frac{2000 \omega}{2 \pi }+880)}{2}</math>
  
 +
<math>\Chi(\omega)=2000\frac{\delta(\frac{2000 \omega-2 \pi 880}{2 \pi })+\delta(\frac{2000 \omega+2 \pi 880}{2 \pi })}{2}</math>
 +
 +
<math>\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}</math>
 +
 +
 +
<math>\Chi(\omega)=2\pi \frac{\delta( \omega- \pi \frac{880}{1000})+\delta(\omega+\pi \frac{880}{1000})}{2}</math>
 +
 +
<math>\Chi(\omega)=\pi \delta( \omega- \pi \frac{880}{1000})+\pi \delta(\omega+\pi \frac{880}{1000})</math>
 +
 +
<math>\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.  \ </math>
 +
 +
[[Image:Example.jpg]]
 +
<center><font size= 3>
 +
Sampling Below the Nyquist Rate
 +
</font size>
 +
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:
 +
 +
<math>\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.  \ </math>
 +
 +
<math>\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.  \ </math>
 +
 +
The plot of the DTFT is shown below:
 +
[[Image:Example.jpg]]
 +
 +
Note that the original frequency components are outside of the <math>[-\pi,\pi]</math> 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.
 +
----
 +
<center><font size= 3>
 +
Conclusion
 +
</font size>
 
----
 
----
 +
<center><font size= 3>
 +
References
 +
</font size>
 
----
 
----
 
----
 
----

Revision as of 06:14, 3 October 2014


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


<center> 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 $

<center> 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.


<center> Conclusion


<center> References



(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

Sees the importance of signal filtering in medical imaging

Dhruv Lamba, BSEE2010