0
276views
Find the DFT of the sequence $x(n)=\left\{\begin{array}{l}1 \text { for } 0 \leq n \leq 2 \\ 0 \text { otherwise }\end{array}\right.$ for N=4 and compute the corresponding amplitude and phase spectrum
1 Answer
0
7views

Solution:

$ X(k)=\sum_{n=0}^{N-1} x(n) e^{\frac{-j 2 \pi k n}{N}}\\ $

The DFT of the sequence $x(n)=\left\{\begin{array}{l}1 \text { for } 0 \leq n \leq 2 \\ 0 \text { otherwise }\end{array}\right.$

Here $x(0)=1, x(1)=1, x(2)=1, x(3)=0 ; \quad N=4$.

For k=0:

$ \begin{aligned} & X(0)=\sum_{n=0}^3 x(n)=x(0)+x(1)+x(2)+x(3) \\\\ & =3 \\\\ & \text { Therefore }|X(0)|=3, \angle X(0)=0 \\\\ & \text { For } k=1 \text { : } \\\\ & X(1)=\sum_{n=0}^3 x(n) e^{\frac{-j \pi n}{2}}=x(0)+x(1) e^{\frac{-j \pi}{2}}+x(2) e^{-j \pi}+x(3) e^{\frac{-j 3 \pi}{2}} \\\\ & =1+\cos \frac{\pi}{2}-j \sin \frac{\pi}{2}+\cos \pi-j \sin \pi+0 \\\\ & =1-j-l=-j \\\\ & \text { Therefore }|X(1)|=1, \angle X(1)=\frac{-\pi}{2} \\\\ & \end{aligned}\\ $

For $k=2$

$ \begin{aligned} X(2) & =\sum_{n=0}^3 x(n) e^{-j \pi n}=x(0)+x(1) e^{-j \pi}+x(2) e^{-j 2 \pi}+x(3) e^{-j 3 \pi} \\\\ & =1+\cos \pi-j \sin \pi+\cos 2 \pi-j \sin 2 \pi+0 \\\\ & =1-1+1=1\\ \end{aligned} $

Therefore $|X(2)|=1, \angle X(2)=0$

For $k=3$

$ \begin{aligned} X(3) & =\sum_{n=0}^3 x(n) e^{\frac{-j 3 \pi n}{2}}=x(0)+x(1) e^{\frac{-j 3 \pi}{2}}+x(2) e^{-j 3 \pi}+x(3) e^{\frac{-j 9 \pi}{2}} \\\\ & =1+\cos \frac{3 \pi}{2}-j \sin \frac{3 \pi}{2}+\cos 3 \pi-j \sin 3 \pi+0 \\\\ & =1+j-l=j\\ \end{aligned}\\ $

Therefore $|X(3)|=1, \angle X(3)=\frac{\pi}{2}$

$ \mid X(k)=\{3,1,1,1\} \quad \angle X(k)=\left\{0, \frac{-\pi}{2}, 0, \frac{\pi}{2}\right\}\\ $

enter image description here

Please log in to add an answer.