(16 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Link title]][[Category:slecture]]
 
[[Category:ECE438Fall2014Boutin]]
 
[[Category:ECE]]
 
[[Category:ECE438]]
 
[[Category:signal processing]]
 
  
<center><font size= 5>
+
<center><font size="5"></font>
DTFT of a Cosine Sampled Above and Below the Nyquist Rate
+
<font size="5">DTFT of a Cosine Sampled Above and Below the Nyquist Rate </font>  
</font size>
+
  
A [https://www.projectrhea.org/learning/slectures.php slecture] by [[ECE]] student Sahil Sanghani
+
A [http://www.projectrhea.org/learning/slectures.php slecture] by [[ECE]] student Sahil Sanghani  
  
Partly based on the [[2014_Fall_ECE_438_Boutin|ECE438 Fall 2014 lecture]] material of [[user:mboutin|Prof. Mireille Boutin]].  
+
Partly based on the [[2014 Fall ECE 438 Boutin|ECE438 Fall 2014 lecture]] material of [[User:Mboutin|Prof. Mireille Boutin]].  
</center>
+
</center>  
 
----
 
----
  
== Outline ==
+
== Outline ==
* Introduction
+
 
* Useful Background
+
*Introduction  
* DTFT Example of a Cosine Sampled Above the Nyquist Rate
+
*Useful Background  
* DTFT Example of a Cosine Sampled Below the Nyquist Rate
+
*DTFT Example of a Cosine Sampled Above the Nyquist Rate  
* Conclusion
+
*DTFT Example of a Cosine Sampled Below the Nyquist Rate  
* References
+
*Conclusion  
 +
*References
  
 
----
 
----
 +
 
----
 
----
  
== Introduction ==
+
== Introduction ==
In this Slecture, I will walk you through taking the DTFT of a pure frequency sampled above and below the Nyquist Rate. Then I will compare the differences between them.
+
 
 +
In this Slecture, I will walk you through taking the DTFT of a pure frequency sampled above and below the Nyquist Rate. Then I will compare the differences between them.  
 +
 
 
----
 
----
== Useful Background ==
 
Nyquist Condition: <span class="math"> <em>f</em><sub><em>s</em></sub> = 2 * <em>f</em><sub><em>m</em><em>a</em><em>x</em></sub></span><br />DTFT of a Cosine: <span class="math"> <em>x</em><sub><em>d</em></sub>[<em>n</em>] = <em>c</em><em>o</em><em>s</em>(2<em>π</em><em>n</em><em>T</em>) → <em>X</em>(<em>ω</em>) = <em>π</em>(<em>δ</em>(<em>ω</em> − <em>ω</em><sub><em>o</em></sub>) + <em>δ</em>(<em>ω</em> + <em>ω</em><sub><em>o</em></sub>))</span>, for <span class="math"><em>ω</em>  ∈  [ − <em>π</em>, <em>π</em>]</span><br />The DTFT of a sampled signal is periodic with <span class="math">2<em>π</em></span>.
 
  
== DTFT of a Cosine Sampled Above the Nyquist Rate ==
+
== Useful Background  ==
<p>For our original pure frequency, let’s choose the E below middle C. The E occurs at 330<span class="math"><em>H</em><em>z</em></span>.</p>
+
 
 +
Nyquist Condition: <math>f_s = 2f_{max}</math> <br />
 +
DTFT of a Cosine: <font size="2"><math>x_d[n] = cos(2\pi nT){\leftrightarrow}X(\omega) = \pi(\delta(\omega-\omega_o) + \delta(\omega+\omega_o)){ ,for\ } \omega \in [-\pi,\pi]</math></font>
 +
 
 +
<font size="2">The DTFT of a sampled signal is periodic with <span class="texhtml">2π</span>.</font>
 +
 
 +
----
 +
== DTFT of a Cosine Sampled Above the Nyquist Rate ==
 +
 
 +
For our original pure frequency, let’s choose the E below middle C. The E occurs at 330''Hz'' <p><span class="math"><em>x</em>(<em>t</em>) = <em>c</em><em>o</em><em>s</em>(2<em>π</em> * 330<em>t</em>)</span><br /></p>
 +
<p>Now let’s sample this pure cosine at a frequency above the Nyquist Rate. The Nyquist Rate is: <br><span class="math">&nbsp;''f''<sub>''s''</sub> = 2 * ''f''<sub>''max''</sub> = 2 * (330''Hz'') = 660''Hz''</span>. Let’s sample at 990<span class="math">''Hz''</span>.
 +
 
 +
<math> \begin{align} \\
 +
x_d[n] & = x(n*\frac{1}{990Hz})\\
 +
& = cos(2\pi n *\frac{330}{990}) = \frac{e^{j2\pi n \frac{330}{990}} + e^{-j2\pi n \frac{330}{990}}}{2}\\
 +
& = cos(\frac{2\pi n}{3})
 +
\end{align}
 +
</math>
 +
<br />
 +
Because <font style="vertical-align:-150%;"><math>\left | \frac{2\pi}{3}\right | < \pi</math></font>, there is no aliasing occurring in the DTFT, and it can be written as follows:
 +
 
 +
<math> \begin{align} \\
 +
X(\omega) & = \frac{1}{2}(2\pi\delta(\omega - 2\pi \frac{330}{990}) + 2\pi\delta(\omega + 2\pi \frac{330}{990})) , \  \omega \in\ [-\pi,\pi]\\
 +
& = \frac{990}{2}(\delta(\frac{990}{2\pi}\omega - 330) + \delta(\frac{990}{2\pi}\omega + 330)) , \  \omega \in\ [-\pi,\pi]\\
 +
& = rep_{2\pi}(\frac{990}{2}(\delta(\frac{990}{2\pi}\omega - 330) + \delta(\frac{990}{2\pi}\omega + 330))), \forall \omega
 +
\end{align}
 +
</math>
 +
 
 +
[[Image:AboveNyquist.jpg]]
 +
----
 +
== DTFT Of a Cosine Sampled Below the Nyquist Rate ==
 +
Let’s use the same pure frequency as above.</p>
 
<p><span class="math"><em>x</em>(<em>t</em>) = <em>c</em><em>o</em><em>s</em>(2<em>π</em> * 330<em>t</em>)</span><br /></p>
 
<p><span class="math"><em>x</em>(<em>t</em>) = <em>c</em><em>o</em><em>s</em>(2<em>π</em> * 330<em>t</em>)</span><br /></p>
<p>Now let’s sample this pure cosine at a frequency above the Nyquist Rate. The Nyquist Rate is: <br /><span class="math"> <em>f</em><sub><em>s</em></sub>= 2 *<em>f</em><sub><em>m</em><em>a</em><em>x</em></sub>= 2 *(330<em>H</em><em>z</em>) = 660<em>H</em><em>z</em></span>. <br />Let’s sample at 990<span class="math"><em>H</em><em>z</em></span>.
+
<p>Now let’s sample this pure cosine at a frequency below the Nyquist Rate. From above, the Nyquist Rate is 660<span class="math"><em>H</em><em>z</em></span>. Let’s sample at 550<span class="math"><em>H</em><em>z</em></span>.</p>
 +
<p><br />
 +
 
 +
<math> \begin{align} \\
 +
x_d[n] & = x(n*\frac{1}{550Hz})\\
 +
& = cos(2\pi n *\frac{330}{550}) = \frac{e^{j2\pi n \frac{330}{550}} + e^{-j2\pi n \frac{330}{550}}}{2}\\ \\
 +
\end{align}
 +
</math> <br /><br />
 +
 
 +
Because <font style="vertical-align:-125%;"><math>\pi < \frac{2\pi 330}{550} < 2\pi</math></font>, aliasing occurs in the DTFT. The DTFT should be calculated with <span class="math"><em>ω</em> ∈ [ − <em>π</em>, <em>π</em>]</span>, so we will use the periodicity of cosine to shift <math>x_d[n]</math> into an appropriate range.
 +
 
 +
<br />
 +
><math> \begin{align}\\
 +
    x_{d}[n] & = cos(2\pi n*\frac{330}{550})\\
 +
    & = cos(2\pi n*\frac{330}{550} - 2\pi n)\\
 +
    & = cos(2\pi n*(\frac{330}{550} - \frac{550}{550}))\\
 +
    & = cos(2\pi n*(\frac{-220}{550}))\\
 +
    & = cos(2\pi n*\frac{220Hz}{550Hz})
 +
    \end{align}
 +
    </math><br /></p>
 +
<p>Now that the argument of the cosine <font style="vertical-align:-150%;"><math>\left | 2\pi \frac{220}{550}\right | < \pi</math></font>, we can take the DTFT of <span class="math"><em>x</em><sub><em>d</em></sub>[<em>n</em>]</span>, and the initial value will fall into a desired range for <span class="math"><em>ω</em></span>.</p>
 +
<p><br /><math> \begin{align}
 +
    X(\omega) & = \frac{1}{2}(2\pi\delta(\omega - 2\pi \frac{220}{550}) + 2\pi\delta(\omega + 2\pi \frac{220}{550})) , \  \omega \in\ [-\pi,\pi]\\
 +
    & = \frac{550}{2}(\delta(\frac{550}{2\pi}\omega - 220) + \delta(\frac{550}{2\pi}\omega + 220)) , \  \omega \in\ [-\pi,\pi]\\
 +
    & = rep_{2\pi}(\frac{550}{2}(\delta(\frac{550}{2\pi}\omega - 220) + \delta(\frac{550}{2\pi}\omega + 220))), \forall \omega
 +
\end{align}</math><br /></p>
 +
 
 +
[[Image:BelowNyquist.jpg]]
 +
----
 +
== Conclusion ==
 +
 
 +
The DTFT of a sampled signal is always periodic with <math>2\pi</math>. So even though the DTFT of a signal sampled below Nyquist may initially not fall within <math>[-\pi,\pi]</math>, it can be extrapolated to the window you are interested in. In my derivation, I chose to shift the cosine before the DTFT. Looking at Figure 3, you can see the comparison between a cosine sampled above and below the Nyquist Rate. The cosine sampled below the Nyquist Rate exhibits aliasing. The aliased signal has a decreased magnitude compared to the original. The aliased signal also is at a different frequency.
 +
 
 +
[[Image:BothNyquist.jpg]]
 +
 
 +
----
 +
== References ==
 +
[1] Mireille Boutin, "ECE 438 Digital Signal Processing with Applications," Purdue University. September 9, 2014.
 +
 
 +
----
 +
----
 +
==[[Questions_DTFT_AboveBelowNyquist_Sahil|Questions and comments]]==
 +
 
 +
If you have any questions, comments, etc. please post them on [[Questions_DTFT_AboveBelowNyquist_Sahil|this page]]
 +
<br />
 +
----
 +
[[2014_Fall_ECE_438_Boutin_digital_signal_processing_slectures|Back to ECE438 slectures, Fall 2014]]
  
[[2014_Fall_ECE_438_Boutin|Back to ECE438, Fall 2014]]
+
[[Category:Slecture]] [[Category:ECE438Fall2014Boutin]] [[Category:ECE]] [[Category:ECE438]] [[Category:Signal_processing]] [[Category:Discrete-time_Fourier_transform]]

Latest revision as of 19:04, 16 March 2015

DTFT of a Cosine Sampled Above and Below the Nyquist Rate

A slecture by ECE student Sahil Sanghani

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


Outline

  • Introduction
  • Useful Background
  • DTFT Example of a Cosine Sampled Above the Nyquist Rate
  • DTFT Example of a Cosine Sampled Below the Nyquist Rate
  • Conclusion
  • References


Introduction

In this Slecture, I will walk you through taking the DTFT of a pure frequency sampled above and below the Nyquist Rate. Then I will compare the differences between them.


Useful Background

Nyquist Condition: $ f_s = 2f_{max} $
DTFT of a Cosine: $ x_d[n] = cos(2\pi nT){\leftrightarrow}X(\omega) = \pi(\delta(\omega-\omega_o) + \delta(\omega+\omega_o)){ ,for\ } \omega \in [-\pi,\pi] $

The DTFT of a sampled signal is periodic with .


DTFT of a Cosine Sampled Above the Nyquist Rate

For our original pure frequency, let’s choose the E below middle C. The E occurs at 330Hz

x(t) = cos(2π * 330t)

Now let’s sample this pure cosine at a frequency above the Nyquist Rate. The Nyquist Rate is:
 fs = 2 * fmax = 2 * (330Hz) = 660Hz. Let’s sample at 990Hz. $ \begin{align} \\ x_d[n] & = x(n*\frac{1}{990Hz})\\ & = cos(2\pi n *\frac{330}{990}) = \frac{e^{j2\pi n \frac{330}{990}} + e^{-j2\pi n \frac{330}{990}}}{2}\\ & = cos(\frac{2\pi n}{3}) \end{align} $
Because $ \left | \frac{2\pi}{3}\right | < \pi $, there is no aliasing occurring in the DTFT, and it can be written as follows: $ \begin{align} \\ X(\omega) & = \frac{1}{2}(2\pi\delta(\omega - 2\pi \frac{330}{990}) + 2\pi\delta(\omega + 2\pi \frac{330}{990})) , \ \omega \in\ [-\pi,\pi]\\ & = \frac{990}{2}(\delta(\frac{990}{2\pi}\omega - 330) + \delta(\frac{990}{2\pi}\omega + 330)) , \ \omega \in\ [-\pi,\pi]\\ & = rep_{2\pi}(\frac{990}{2}(\delta(\frac{990}{2\pi}\omega - 330) + \delta(\frac{990}{2\pi}\omega + 330))), \forall \omega \end{align} $ AboveNyquist.jpg


DTFT Of a Cosine Sampled Below the Nyquist Rate

Let’s use the same pure frequency as above.

x(t) = cos(2π * 330t)

Now let’s sample this pure cosine at a frequency below the Nyquist Rate. From above, the Nyquist Rate is 660Hz. Let’s sample at 550Hz.


$ \begin{align} \\ x_d[n] & = x(n*\frac{1}{550Hz})\\ & = cos(2\pi n *\frac{330}{550}) = \frac{e^{j2\pi n \frac{330}{550}} + e^{-j2\pi n \frac{330}{550}}}{2}\\ \\ \end{align} $

Because $ \pi < \frac{2\pi 330}{550} < 2\pi $, aliasing occurs in the DTFT. The DTFT should be calculated with ω ∈ [ − π, π], so we will use the periodicity of cosine to shift $ x_d[n] $ into an appropriate range.
>$ \begin{align}\\ x_{d}[n] & = cos(2\pi n*\frac{330}{550})\\ & = cos(2\pi n*\frac{330}{550} - 2\pi n)\\ & = cos(2\pi n*(\frac{330}{550} - \frac{550}{550}))\\ & = cos(2\pi n*(\frac{-220}{550}))\\ & = cos(2\pi n*\frac{220Hz}{550Hz}) \end{align} $

Now that the argument of the cosine $ \left | 2\pi \frac{220}{550}\right | < \pi $, we can take the DTFT of xd[n], and the initial value will fall into a desired range for ω.


$ \begin{align} X(\omega) & = \frac{1}{2}(2\pi\delta(\omega - 2\pi \frac{220}{550}) + 2\pi\delta(\omega + 2\pi \frac{220}{550})) , \ \omega \in\ [-\pi,\pi]\\ & = \frac{550}{2}(\delta(\frac{550}{2\pi}\omega - 220) + \delta(\frac{550}{2\pi}\omega + 220)) , \ \omega \in\ [-\pi,\pi]\\ & = rep_{2\pi}(\frac{550}{2}(\delta(\frac{550}{2\pi}\omega - 220) + \delta(\frac{550}{2\pi}\omega + 220))), \forall \omega \end{align} $

BelowNyquist.jpg


Conclusion

The DTFT of a sampled signal is always periodic with $ 2\pi $. So even though the DTFT of a signal sampled below Nyquist may initially not fall within $ [-\pi,\pi] $, it can be extrapolated to the window you are interested in. In my derivation, I chose to shift the cosine before the DTFT. Looking at Figure 3, you can see the comparison between a cosine sampled above and below the Nyquist Rate. The cosine sampled below the Nyquist Rate exhibits aliasing. The aliased signal has a decreased magnitude compared to the original. The aliased signal also is at a different frequency.

BothNyquist.jpg


References

[1] Mireille Boutin, "ECE 438 Digital Signal Processing with Applications," Purdue University. September 9, 2014.



Questions and comments

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


Back to ECE438 slectures, Fall 2014

Alumni Liaison

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

Dr. Paul Garrett