(New page: Category:2010 Fall ECE 438 Boutin ---- == Solution to HW7 == ---- Q1. <br/> Recall, the Discrete Fourier Transform is defined as follows - Definition: let x[n] be a DT signal with ...)
 
Line 22: Line 22:
 
<math>
 
<math>
 
\begin{align}
 
\begin{align}
x[n] &=  \frac{1}{3} \sum_{k=0}^{2} X[k].e^{j2\pi kn/3} \\
+
x_1[n] &=  \frac{1}{3} \sum_{k=0}^{2} X[k].e^{j2\pi kn/3} \\
 
e^{j \frac{2}{3} \pi n} &= \frac{1}{3} \sum_{k=0}^{2} X[k].e^{j2\pi kn/3} \\
 
e^{j \frac{2}{3} \pi n} &= \frac{1}{3} \sum_{k=0}^{2} X[k].e^{j2\pi kn/3} \\
  &= \frac{1}{3} \left[ X[0].e^{j0} + X[1].e^{j2\pi n/3} + X[2].e^{j2\pi (2/3)} \right]  \\
+
  &= \frac{1}{3} \left[ X[0].e^{j0} + X[1].e^{j2\pi n/3} + X[2].e^{j2\pi n(2/3)} \right]  \\
  &= \frac{1}{3} \left[ X[0] + X[1].e^{j2\pi n/3} + X[2].e^{j4\pi /3} \right]  
+
  &= \frac{1}{3} \left[ X[0] + X[1].e^{j2\pi n/3} + X[2].e^{j4\pi n/3} \right]  
 
\end{align}
 
\end{align}
 
</math>
 
</math>
Line 64: Line 64:
 
<math>j \frac{2}{\sqrt{3}} \pi N = j 2\pi n,</math>  where n is an integer<br/>
 
<math>j \frac{2}{\sqrt{3}} \pi N = j 2\pi n,</math>  where n is an integer<br/>
 
<math>N = n\sqrt{3}</math> <br/>  
 
<math>N = n\sqrt{3}</math> <br/>  
N is not an integer and this contradicts our assumption proving that it cannot be true.<br/>
+
N is not an integer and this contradicts our assumption, proving that it cannot be true.<br/>
Thus, the x_2[n] is aperiodic and we cannot apply the DFT. <br/>
+
Thus, x_2[n] is aperiodic and we cannot apply the DFT. <br/>
 
----
 
----
  
Line 74: Line 74:
 
<math>
 
<math>
 
\begin{align}
 
\begin{align}
x[n] &=  \frac{1}{3} \sum_{k=0}^{2} X[k].e^{j2\pi kn/3} \\
+
x_3[n] &=  \frac{1}{3} \sum_{k=0}^{2} X[k].e^{j2\pi kn/3} \\
 
e^{j \frac{4}{3} \pi n} &= \frac{1}{3} \sum_{k=0}^{2} X[k].e^{j2\pi kn/3} \\
 
e^{j \frac{4}{3} \pi n} &= \frac{1}{3} \sum_{k=0}^{2} X[k].e^{j2\pi kn/3} \\
 
  &= \frac{1}{3} \left[ X[0].e^{j0} + X[1].e^{j2\pi n/3} + X[2].e^{j2\pi n(2/3)} \right]  \\
 
  &= \frac{1}{3} \left[ X[0].e^{j0} + X[1].e^{j2\pi n/3} + X[2].e^{j2\pi n(2/3)} \right]  \\
Line 98: Line 98:
 
<math>
 
<math>
 
\begin{align}
 
\begin{align}
x[n] &=  \frac{1}{1000} \sum_{k=0}^{999} X[k].e^{j2\pi kn/1000} \\
+
x_4[n] &=  \frac{1}{1000} \sum_{k=0}^{999} X[k].e^{j2\pi kn/1000} \\
 
e^{j \frac{2}{1000} \pi n} &= \frac{1}{1000} \sum_{k=0}^{999} X[k].e^{j2\pi kn/1000} \\
 
e^{j \frac{2}{1000} \pi n} &= \frac{1}{1000} \sum_{k=0}^{999} X[k].e^{j2\pi kn/1000} \\
 
  &= \frac{1}{1000} \left[ X[0].e^{j0} + X[1].e^{j2\pi n/1000} + X[2].e^{j2\pi n(2/1000)} + ... \right]  \\
 
  &= \frac{1}{1000} \left[ X[0].e^{j0} + X[1].e^{j2\pi n/1000} + X[2].e^{j2\pi n(2/1000)} + ... \right]  \\
Line 132: Line 132:
 
<math>
 
<math>
 
\begin{align}
 
\begin{align}
x[n] &=  \frac{1}{1000} \sum_{k=0}^{999} X[k].e^{j2\pi kn/3} \\
+
x_5[n] &=  \frac{1}{1000} \sum_{k=0}^{999} X[k].e^{j2\pi kn/1000} \\
 
e^{j 2\pi n\frac{999}{1000}} &= \frac{1}{1000} \sum_{k=0}^{999} X[k].e^{j2\pi kn/1000} \\
 
e^{j 2\pi n\frac{999}{1000}} &= \frac{1}{1000} \sum_{k=0}^{999} X[k].e^{j2\pi kn/1000} \\
  &= \frac{1}{1000} \left[ X[0].e^{j0} + X[1].e^{j2\pi n/1000} + X[2].e^{j2\pi n(2/1000)}+ ... + X[999].e^{j2\pi (999/1000)} \right]  \\
+
  &= \frac{1}{1000} \left[ X[0].e^{j0} + X[1].e^{j2\pi n/1000} + X[2].e^{j2\pi n(2/1000)}+ ... + X[999].e^{j2\pi n(999/1000)} \right]  \\
  &= \frac{1}{1000} \left[ X[0] + X[1].e^{j2\pi n/1000} + X[2].e^{j2\pi n (2/1000)} + ... + X[999].e^{j2\pi (999/1000)} \right] \\
+
  &= \frac{1}{1000} \left[ X[0] + X[1].e^{j2\pi n/1000} + X[2].e^{j2\pi n (2/1000)} + ... + X[999].e^{j2\pi n(999/1000)} \right] \\
 
\end{align}
 
\end{align}
 
</math>
 
</math>
Line 153: Line 153:
 
----
 
----
  
<math>x_6[n]= \cos\left( \frac{2}{1000} \pi n\right) ;</math>
+
<math>
 +
\begin{align}
 +
x_6[n] &= \cos\left( \frac{2}{1000} \pi n\right) \\
 +
&= \frac{1}{2}\left( e^{j\frac{2\pi n}{1000}} + e^{-j\frac{2\pi n}{1000}} \right) \\
 +
&= \frac{1}{2} (x_4[n] + x_5[n]) \\
 +
\end{align}
 +
</math>
  
 +
We have an additional (1/2) to factor into the final coefficients, giving us - <br/>
 +
<math>
 +
X[k] = \begin{cases}
 +
500, & k = 1 \\
 +
500, & k = 999 \\
 +
0, & \mbox{else}
 +
\end{cases}
 +
</math>
 +
----
  
 +
<math>
 +
\begin{align}
 +
x_7[n] &= \cos^2\left( \frac{2}{1000} \pi n\right) \\
 +
&= \left[ \frac{1}{2}\left( e^{j\frac{2\pi n}{1000}} + e^{-j\frac{2\pi n}{1000}} \right)\right]^2 \\
 +
&= \frac{1}{4}\left( e^{j\frac{4\pi n}{1000}} + 2 + e^{-j\frac{4\pi n}{1000}} \right) \\
 +
&= \frac{1}{4}\left( 2 + e^{j2\pi n\frac{2}{1000}} +  e^{-j2\pi n\frac{2}{1000}}e^{-j2\pi n} \right) \\
 +
&= \frac{1}{4}\left( 2 + e^{j2\pi n\frac{2}{1000}} +  e^{j2\pi n\frac{998}{1000}} \right) \\
 +
\end{align}
 +
</math>
  
:<math>x_7[n]= \cos^2\left( \frac{2}{1000} \pi n\right) ;</math>.
+
Function's period N = 1000, <br/>
:<math>x_8[n]= (-j)^n .</math>
+
Using IDFT, <br/>
 +
<math>
 +
\begin{align}
 +
x_7[n] &= \frac{1}{1000} \sum_{k=0}^{999} X[k].e^{j2\pi kn/1000} \\
 +
&= \frac{1}{1000} \left[ X[0] + X[1].e^{j2\pi n/1000} + X[2].e^{j2\pi n(2/1000)} + ... X[998].e^{j2\pi n(998/1000)} + X[999].e^{j2\pi n(999/1000)} \right] \\
 +
\end{align}
 +
</math>
  
 +
Comparing LHS and RHS, <br/>
 +
X[0] = 2000 <br/>
 +
X[1] = 0 <br/>
 +
X[2] = 250 <br/>
 +
... <br/>
 +
X[998] = 250 <br/>
 +
X[999] = 0 <br/>
  
 +
<math>
 +
X[k] = \begin{cases}
 +
2000, & k = 0 \\
 +
250, & k = 2 \\
 +
250, & k = 998 \\
 +
0, & \mbox{else}
 +
\end{cases}
 +
</math>
 +
----
 +
 +
<math>
 +
\begin{align}
 +
x_8[n]= (-j)^n \\
 +
&= (e^{j \pi /2})^n \\
 +
&= e^{j \pi n/2} \\
 +
\end{align}
 +
</math>
 +
 +
Function's period N = 4, <br/>
 +
Using IDFT, <br/>
 +
<math>
 +
\begin{align}
 +
x_8[n] &=  \frac{1}{4} \sum_{k=0}^{3} X[k].e^{j2\pi kn/4} \\
 +
e^{j \pi n/2} &= \frac{1}{4} \sum_{k=0}^{3} X[k].e^{j2\pi kn/4} \\
 +
&= \frac{1}{4} \left[ X[0].e^{j0} + X[1].e^{j2\pi n/4} + X[2].e^{j2\pi n(2/4)} + X[3].e^{j2\pi n(3/4)}\right]  \\
 +
&= \frac{1}{4} \left[ X[0] + X[1].e^{j\pi n/2} + X[2].e^{j\pi n} + X[3].e^{j\pi n(3/2)} \right]
 +
\end{align}
 +
</math>
 +
 +
For the two sides to be equal, <br/>
 +
X[0] = 0 <br/>
 +
X[1] = 4 <br/>
 +
X[2] = 0 <br/>
 +
X[2] = 0 <br/>
 +
 +
<math>
 +
X[k] = \begin{cases}
 +
4, & k = 1 \\
 +
0, & \mbox{else}
 +
\end{cases}
 +
</math>
  
 
----
 
----
 +
 +
 
Back to [[Hw7ECE438F10|HW7]]
 
Back to [[Hw7ECE438F10|HW7]]
  
 
Back to [[2010_Fall_ECE_438_Boutin|ECE 438 Fall 2010]
 
Back to [[2010_Fall_ECE_438_Boutin|ECE 438 Fall 2010]

Revision as of 05:58, 1 November 2010



Solution to HW7


Q1.

Recall, the Discrete Fourier Transform is defined as follows -

Definition: let x[n] be a DT signal with Period N. Then,

$ X [k] = \sum_{k=0}^{N-1} x[n].e^{-j2\pi kn/N} $

$ x [n] = (1/N) \sum_{k=0}^{N-1} X[k].e^{j2\pi kn/N} $


$ x_1[n]= e^{j \frac{2}{3} \pi n}; $

Function's period N = 3,
Using IDFT,
$ \begin{align} x_1[n] &= \frac{1}{3} \sum_{k=0}^{2} X[k].e^{j2\pi kn/3} \\ e^{j \frac{2}{3} \pi n} &= \frac{1}{3} \sum_{k=0}^{2} X[k].e^{j2\pi kn/3} \\ &= \frac{1}{3} \left[ X[0].e^{j0} + X[1].e^{j2\pi n/3} + X[2].e^{j2\pi n(2/3)} \right] \\ &= \frac{1}{3} \left[ X[0] + X[1].e^{j2\pi n/3} + X[2].e^{j4\pi n/3} \right] \end{align} $

For the two sides to be equal,
X[0] = 0
X[1] = 3
X[2] = 0

Plugging in we can verify,
$ \begin{align} e^{j \frac{2}{3} \pi n} &= \frac{1}{3} \left[ 0 + 3.e^{j2\pi n/3} + 0 \right]\\ e^{j \frac{2}{3} \pi n} &= \frac{1}{3} 3.e^{j2\pi n/3} \\ e^{j \frac{2}{3} \pi n} &= e^{j \frac{2}{3} \pi n} \end{align} $

So our three selected values for X[k] are correct. Thus
$ X[k] = \begin{cases} 3, & k = 1 \\ 0, & \mbox{else} \end{cases} $


$ x_2[n]= e^{j \frac{2}{\sqrt{3}} \pi n}; $

Function x2[n] is aperiodic. Let's see why -
Assume x2[n] is periodic, then
$ e^{j \frac{2}{\sqrt{3}} \pi n} = e^{j \frac{2}{\sqrt{3}} \pi (n + N)} $ for function to be periodic, where N is an integer
$ e^{j \frac{2}{\sqrt{3}} \pi n} = e^{j \frac{2}{\sqrt{3}} \pi n}e^{j \frac{2}{\sqrt{3}} \pi N} $
$ e^{j \frac{2}{\sqrt{3}} \pi n} = e^{j \frac{2}{\sqrt{3}} \pi n}.(1) $
$ e^{j \frac{2}{\sqrt{3}} \pi N} = 1 $
For this to be true -
$ j \frac{2}{\sqrt{3}} \pi N = j 2\pi n, $ where n is an integer
$ N = n\sqrt{3} $
N is not an integer and this contradicts our assumption, proving that it cannot be true.
Thus, x_2[n] is aperiodic and we cannot apply the DFT.


$ x_3[n]= e^{j \frac{4}{3} \pi n}; $

Function's period N = 3,
Using IDFT,
$ \begin{align} x_3[n] &= \frac{1}{3} \sum_{k=0}^{2} X[k].e^{j2\pi kn/3} \\ e^{j \frac{4}{3} \pi n} &= \frac{1}{3} \sum_{k=0}^{2} X[k].e^{j2\pi kn/3} \\ &= \frac{1}{3} \left[ X[0].e^{j0} + X[1].e^{j2\pi n/3} + X[2].e^{j2\pi n(2/3)} \right] \\ &= \frac{1}{3} \left[ X[0] + X[1].e^{j2\pi n/3} + X[2].e^{j4\pi n/3} \right] \end{align} $

For the two sides to be equal,
X[0] = 0
X[1] = 0
X[2] = 3

$ X[k] = \begin{cases} 3, & k = 2 \\ 0, & \mbox{else} \end{cases} $


$ x_4[n]= e^{j \frac{2}{1000} \pi n}; $ Function's period N = 1000,
Using IDFT,
$ \begin{align} x_4[n] &= \frac{1}{1000} \sum_{k=0}^{999} X[k].e^{j2\pi kn/1000} \\ e^{j \frac{2}{1000} \pi n} &= \frac{1}{1000} \sum_{k=0}^{999} X[k].e^{j2\pi kn/1000} \\ &= \frac{1}{1000} \left[ X[0].e^{j0} + X[1].e^{j2\pi n/1000} + X[2].e^{j2\pi n(2/1000)} + ... \right] \\ &= \frac{1}{1000} \left[ X[0] + X[1].e^{j2\pi n/1000} + X[2].e^{j4\pi n/1000} + ... \right] \end{align} $

For the two sides to be equal,
X[0] = 0
X[1] = 1000
X[2] = 0

$ X[k] = \begin{cases} 1000, & k = 1 \\ 0, & \mbox{else} \end{cases} $


$ x_5[n]= e^{-j \frac{2}{1000} \pi n}; $ Function's period N = 1000,
$ \begin{align} x_5[n]&= e^{-j \frac{2}{1000} \pi n}.1 \\ &= e^{-j \frac{2}{1000} \pi n}.e^{-j 2\pi n} \\ &= e^{j 2\pi n(1 - (1/1000))} \\ &= e^{j 2\pi n\frac{999}{1000} } \\ \end{align} $

Using IDFT,
$ \begin{align} x_5[n] &= \frac{1}{1000} \sum_{k=0}^{999} X[k].e^{j2\pi kn/1000} \\ e^{j 2\pi n\frac{999}{1000}} &= \frac{1}{1000} \sum_{k=0}^{999} X[k].e^{j2\pi kn/1000} \\ &= \frac{1}{1000} \left[ X[0].e^{j0} + X[1].e^{j2\pi n/1000} + X[2].e^{j2\pi n(2/1000)}+ ... + X[999].e^{j2\pi n(999/1000)} \right] \\ &= \frac{1}{1000} \left[ X[0] + X[1].e^{j2\pi n/1000} + X[2].e^{j2\pi n (2/1000)} + ... + X[999].e^{j2\pi n(999/1000)} \right] \\ \end{align} $

For the two sides to be equal,
X[0] = 0
X[1] = 0
X[2] = 0
X[999] = 1000

$ X[k] = \begin{cases} 1000, & k = 999 \\ 0, & \mbox{else} \end{cases} $


$ \begin{align} x_6[n] &= \cos\left( \frac{2}{1000} \pi n\right) \\ &= \frac{1}{2}\left( e^{j\frac{2\pi n}{1000}} + e^{-j\frac{2\pi n}{1000}} \right) \\ &= \frac{1}{2} (x_4[n] + x_5[n]) \\ \end{align} $

We have an additional (1/2) to factor into the final coefficients, giving us -
$ X[k] = \begin{cases} 500, & k = 1 \\ 500, & k = 999 \\ 0, & \mbox{else} \end{cases} $


$ \begin{align} x_7[n] &= \cos^2\left( \frac{2}{1000} \pi n\right) \\ &= \left[ \frac{1}{2}\left( e^{j\frac{2\pi n}{1000}} + e^{-j\frac{2\pi n}{1000}} \right)\right]^2 \\ &= \frac{1}{4}\left( e^{j\frac{4\pi n}{1000}} + 2 + e^{-j\frac{4\pi n}{1000}} \right) \\ &= \frac{1}{4}\left( 2 + e^{j2\pi n\frac{2}{1000}} + e^{-j2\pi n\frac{2}{1000}}e^{-j2\pi n} \right) \\ &= \frac{1}{4}\left( 2 + e^{j2\pi n\frac{2}{1000}} + e^{j2\pi n\frac{998}{1000}} \right) \\ \end{align} $

Function's period N = 1000,
Using IDFT,
$ \begin{align} x_7[n] &= \frac{1}{1000} \sum_{k=0}^{999} X[k].e^{j2\pi kn/1000} \\ &= \frac{1}{1000} \left[ X[0] + X[1].e^{j2\pi n/1000} + X[2].e^{j2\pi n(2/1000)} + ... X[998].e^{j2\pi n(998/1000)} + X[999].e^{j2\pi n(999/1000)} \right] \\ \end{align} $

Comparing LHS and RHS,
X[0] = 2000
X[1] = 0
X[2] = 250
...
X[998] = 250
X[999] = 0

$ X[k] = \begin{cases} 2000, & k = 0 \\ 250, & k = 2 \\ 250, & k = 998 \\ 0, & \mbox{else} \end{cases} $


$ \begin{align} x_8[n]= (-j)^n \\ &= (e^{j \pi /2})^n \\ &= e^{j \pi n/2} \\ \end{align} $

Function's period N = 4,
Using IDFT,
$ \begin{align} x_8[n] &= \frac{1}{4} \sum_{k=0}^{3} X[k].e^{j2\pi kn/4} \\ e^{j \pi n/2} &= \frac{1}{4} \sum_{k=0}^{3} X[k].e^{j2\pi kn/4} \\ &= \frac{1}{4} \left[ X[0].e^{j0} + X[1].e^{j2\pi n/4} + X[2].e^{j2\pi n(2/4)} + X[3].e^{j2\pi n(3/4)}\right] \\ &= \frac{1}{4} \left[ X[0] + X[1].e^{j\pi n/2} + X[2].e^{j\pi n} + X[3].e^{j\pi n(3/2)} \right] \end{align} $

For the two sides to be equal,
X[0] = 0
X[1] = 4
X[2] = 0
X[2] = 0

$ X[k] = \begin{cases} 4, & k = 1 \\ 0, & \mbox{else} \end{cases} $



Back to HW7

Back to [[2010_Fall_ECE_438_Boutin|ECE 438 Fall 2010]

Alumni Liaison

Ph.D. 2007, working on developing cool imaging technologies for digital cameras, camera phones, and video surveillance cameras.

Buyue Zhang