Line 122: | Line 122: | ||
'''Solution''' | '''Solution''' | ||
+ | |||
+ | Using Euler's fomula | ||
+ | |||
+ | <math>\begin{align} | ||
+ | x_2[n] &= e^{j\frac{\pi}{3}n} \left ( \frac{1}{2} e^{j\frac{\pi}{6}} + \frac{1}{2}e^{-j\frac{\pi}{6}}\right ) \\ | ||
+ | &= \frac{1}{2}e^{\frac{\pi}{2}n} + \frac{1}{2}e^{j\frac{\pi}{6}n} | ||
+ | \end{align}</math> | ||
g) <math>x_8[n]= (-j)^n .</math> | g) <math>x_8[n]= (-j)^n .</math> |
Revision as of 15:01, 7 October 2014
Contents
Homework 5 Solution, ECE438, Fall 2014
Questions 1
Compute the DFT of the following signals x[n] (if possible). How does your answer relate to the Fourier series coefficients of x[n]?
a) $ x_1[n] = \left\{ \begin{array}{ll} 1, & n \text{ multiple of } N\\ 0, & \text{ else}. \end{array} \right. $
Solution
The period of the input is N, so we will calculate the N-point DFT:
$ \begin{align} X_n[k]&=\sum_{n=0}^{N-1} x[n] e^{-j2\pi kn /N} \\ &= 1e^{-j2\pi k 0 /N} + 0e^{-j2\pi k1 /N} + \ldots + 0e^{-j2\pi k(N-1) /N} \\ &= 1 \text{ for all } k \end{align} $
b) $ x_1[n]= e^{j \frac{2}{3} \pi n} $
Solution
Notice that the period is 3, so we will calculate the 3-point DFT. Beginning with the inverse-DFT:
$ \begin{align} x[n]&=\frac{1}{3} \sum_{k=0}^{2} X_3[k] e^{j2\pi kn/3} \\ &= \frac{1}{3} \left ( X_3[0]e^{j2\pi k0/3} + X_3[1]e^{j2\pi k1/3} + X_3[2]e^{j2\pi k2/3} \right ) \\ &= e^{j2\pi n/3} \end{align} $
From this we can see that
$ X_3[1]=3 \mbox{, and } X_3[0]=X_3[2]=0 $
or
$ X_3[k]=\begin{cases} 3\mbox{, }k=1\\ 0\mbox{, else} \end{cases} \mbox{ , periodic with period} = 3 $
c) $ x_5[n]= e^{-j \frac{2}{1000} \pi n} $
Solution
The period of this signal is 1000. To make life easier, we will multiple by a factor (noting that the factor is always 1, so it doesn't change the signal):
$ \begin{align} x_5[n]&=e^{-j \frac{2}{1000} \pi n}e^{j2\pi n} \\ &= e^{j2\pi \frac{1000-1}{1000}} \\ &=e^{j2\pi \frac{998}{1000}} \end{align} $
The positive exponent is easier to deal with.
Now we can use the inverse transform as before, using a 1000-point IDFT:
$ \begin{align} x_5[n] &= \frac{1}{1000} \sum_{k=0}^{k=999} X_{1000}[k]e^{j2\pi k n/1000} \\ &= e^{j2\pi \frac{999}{1000}} \end{align} $
By matching terms, we can see that
$ X_{1000}[k]=\begin{cases} 1000&\mbox{, if }k=999 \\ 0 &\mbox{, else} \end{cases} $
d) $ x_2[n]= e^{j \frac{2}{\sqrt{3}} \pi n} $
Solution
The period of the input is $ \sqrt{3} $. We cannot take a $ \sqrt{3} $-point DFT (only integer values).
e) $ x_6[n]= \cos\left( \frac{2}{1000} \pi n\right) ; $
Solution
First, use Euler's formula
$ x_6[n]=\frac{1}{2} e^{j2\pi n/1000} + \frac{1}{2}e^{-j2\pi n/1000} $
As in d), change the exponents so they are both positive:
$ \begin{align} x_6[n]&=\frac{1}{2} e^{j2\pi n/1000} + \frac{1}{2}e^{-j2\pi n/1000}e^{2\pi n} \\ &=\frac{1}{2} e^{j2\pi n/1000} + \frac{1}{2}e^{j2\pi 999n/1000} \end{align} $
Then looking at the 1000-point inverse DFT:
$ \begin{align} x_6[n] &= \frac{1}{1000} \sum_{k=0}^{999} X_{1000}[k]e^{j2\pi kn/1000} \\ &= \frac{1}{2} e^{j2\pi n/1000} + \frac{1}{2}e^{j2\pi 999n/1000} \end{align} $
Again, by matching terms we can see that
$ X_{1000}[k] = \begin{cases} 500&\mbox{, if } k=1 \mbox{ or }k=999 \\ 0 &\mbox{, else} \end{cases} $
f) $ x_2[n]= e^{j \frac{\pi}{3} n } \cos ( \frac{\pi}{6} n ) $
Solution
Using Euler's fomula
$ \begin{align} x_2[n] &= e^{j\frac{\pi}{3}n} \left ( \frac{1}{2} e^{j\frac{\pi}{6}} + \frac{1}{2}e^{-j\frac{\pi}{6}}\right ) \\ &= \frac{1}{2}e^{\frac{\pi}{2}n} + \frac{1}{2}e^{j\frac{\pi}{6}n} \end{align} $
g) $ x_8[n]= (-j)^n . $
h) $ x_3[n] =(\frac{1}{\sqrt{2}}+j \frac{1}{\sqrt{2}})^n $
Note: All of these DFTs are VERY simple to compute. If your computation looks like a monster, look for a simpler approach!
Question 2
Compute the inverse DFT of $ X[k]= e^{j \pi k }+e^{-j \frac{\pi}{2} k} $.
Note: Again, this is a VERY simple problem. Have pity for your grader, and try to use a simple approach!
Question 3
Prove the time shifting property of the DFT.
Discussion
You may discuss the homework below.
- write comment/question here
- answer will go here