Skip to main content
added 1291 characters in body
Source Link
Tendero
  • 5k
  • 6
  • 27
  • 46

You made a mistake in this last equality

$$x[n] = \frac{1}{2\pi jn}\left( e^{-j\pi n/4} -e^{-j\pi n} +2e^{j\pi n/4} -2e^{-j\pi n/4} + e^{j\pi n} -e^{j\pi n/4} \right) \neq \frac{\sin(\pi n/4)}{\pi n}$$

The right way to do this would be:

$$\begin{align} x(n)&=\frac{1}{2\pi jn}\left( e^{-j\pi n/4} -e^{-j\pi n} +2e^{j\pi n/4} -2e^{-j\pi n/4} + e^{j\pi n} -e^{j\pi n/4} \right) \\ &=\frac{1}{\pi n}\left( \frac{e^{-j\pi n/4}-e^{j\pi n/4}}{2j}+ \frac{e^{j\pi n} -e^{-j\pi n}}{2j} +\frac{2e^{j\pi n/4} -2e^{-j\pi n/4}}{2j} \right) \\ &=\frac{1}{\pi n}\left( -\sin\left(\pi n/4\right)+\sin\left(\pi n\right)+2\sin\left(\pi n/4\right) \right)\\ &=\frac{1}{\pi n}\left( \sin\left(\pi n\right)+\sin\left(\pi n/4\right) \right) \end{align}$$

Which makes sense as one can see that the DTFT is the sum of two rectangular windows, one of width $2\pi$ and one of width $\pi/2$, each corresponding to each $\mathrm{sinc}()$.

EDIT:

I've just noticed judging by your comment that the mistake you made was to think that

$$\frac{\sin(\pi n)}{\pi n} =0$$

As you already know, the numerator is $0$ for all $n$... except for $n=0$. In that case, the denominator also is zero, so you have an indetermination. The same happens in the continuous case. Remember that we assume

$$\mathrm{sinc}(0)=1$$

by taking the limit when $t\to0$. To respect the fact that the discrete $\mathrm{sinc}$ is a sampled version of the continuous one, then it equals $1$ at the origin too. So we can state that:

$$\frac{\sin(\pi n)}{\pi n} =\delta(n)$$

Notice that the DTFT you wrote can also be expressed (using the fact that convolution is distributive) as:

$$X(\Omega)=\sum_{k=-\infty}^{+\infty}\left(u(\Omega+\pi)-u(\Omega-\pi)\right)\star \delta(\Omega-2k\pi) + \sum_{k=-\infty}^{+\infty}u\left(\left(\Omega+\frac{\pi}{4}\right)-u\left(\Omega-\frac{\pi}{4}\right)\right)\star \delta(\Omega-2k\pi)$$

The first term is a window of width $2\pi$ that is $2\pi$-periodic... So it's basically $1 \ \forall \Omega$.

$$X(\Omega)=1 + \sum_{k=-\infty}^{+\infty}u\left(\left(\Omega+\frac{\pi}{4}\right)-u\left(\Omega-\frac{\pi}{4}\right)\right)\star \delta(\Omega-2k\pi)$$

Now it's easier to see that the IDTFT I got at the beginning of the question corresponds indeed to the given DTFT.

You made a mistake in this last equality

$$x[n] = \frac{1}{2\pi jn}\left( e^{-j\pi n/4} -e^{-j\pi n} +2e^{j\pi n/4} -2e^{-j\pi n/4} + e^{j\pi n} -e^{j\pi n/4} \right) \neq \frac{\sin(\pi n/4)}{\pi n}$$

The right way to do this would be:

$$\begin{align} x(n)&=\frac{1}{2\pi jn}\left( e^{-j\pi n/4} -e^{-j\pi n} +2e^{j\pi n/4} -2e^{-j\pi n/4} + e^{j\pi n} -e^{j\pi n/4} \right) \\ &=\frac{1}{\pi n}\left( \frac{e^{-j\pi n/4}-e^{j\pi n/4}}{2j}+ \frac{e^{j\pi n} -e^{-j\pi n}}{2j} +\frac{2e^{j\pi n/4} -2e^{-j\pi n/4}}{2j} \right) \\ &=\frac{1}{\pi n}\left( -\sin\left(\pi n/4\right)+\sin\left(\pi n\right)+2\sin\left(\pi n/4\right) \right)\\ &=\frac{1}{\pi n}\left( \sin\left(\pi n\right)+\sin\left(\pi n/4\right) \right) \end{align}$$

Which makes sense as one can see that the DTFT is the sum of two rectangular windows, one of width $2\pi$ and one of width $\pi/2$, each corresponding to each $\mathrm{sinc}()$.

You made a mistake in this last equality

$$x[n] = \frac{1}{2\pi jn}\left( e^{-j\pi n/4} -e^{-j\pi n} +2e^{j\pi n/4} -2e^{-j\pi n/4} + e^{j\pi n} -e^{j\pi n/4} \right) \neq \frac{\sin(\pi n/4)}{\pi n}$$

The right way to do this would be:

$$\begin{align} x(n)&=\frac{1}{2\pi jn}\left( e^{-j\pi n/4} -e^{-j\pi n} +2e^{j\pi n/4} -2e^{-j\pi n/4} + e^{j\pi n} -e^{j\pi n/4} \right) \\ &=\frac{1}{\pi n}\left( \frac{e^{-j\pi n/4}-e^{j\pi n/4}}{2j}+ \frac{e^{j\pi n} -e^{-j\pi n}}{2j} +\frac{2e^{j\pi n/4} -2e^{-j\pi n/4}}{2j} \right) \\ &=\frac{1}{\pi n}\left( -\sin\left(\pi n/4\right)+\sin\left(\pi n\right)+2\sin\left(\pi n/4\right) \right)\\ &=\frac{1}{\pi n}\left( \sin\left(\pi n\right)+\sin\left(\pi n/4\right) \right) \end{align}$$

Which makes sense as one can see that the DTFT is the sum of two rectangular windows, one of width $2\pi$ and one of width $\pi/2$, each corresponding to each $\mathrm{sinc}()$.

EDIT:

I've just noticed judging by your comment that the mistake you made was to think that

$$\frac{\sin(\pi n)}{\pi n} =0$$

As you already know, the numerator is $0$ for all $n$... except for $n=0$. In that case, the denominator also is zero, so you have an indetermination. The same happens in the continuous case. Remember that we assume

$$\mathrm{sinc}(0)=1$$

by taking the limit when $t\to0$. To respect the fact that the discrete $\mathrm{sinc}$ is a sampled version of the continuous one, then it equals $1$ at the origin too. So we can state that:

$$\frac{\sin(\pi n)}{\pi n} =\delta(n)$$

Notice that the DTFT you wrote can also be expressed (using the fact that convolution is distributive) as:

$$X(\Omega)=\sum_{k=-\infty}^{+\infty}\left(u(\Omega+\pi)-u(\Omega-\pi)\right)\star \delta(\Omega-2k\pi) + \sum_{k=-\infty}^{+\infty}u\left(\left(\Omega+\frac{\pi}{4}\right)-u\left(\Omega-\frac{\pi}{4}\right)\right)\star \delta(\Omega-2k\pi)$$

The first term is a window of width $2\pi$ that is $2\pi$-periodic... So it's basically $1 \ \forall \Omega$.

$$X(\Omega)=1 + \sum_{k=-\infty}^{+\infty}u\left(\left(\Omega+\frac{\pi}{4}\right)-u\left(\Omega-\frac{\pi}{4}\right)\right)\star \delta(\Omega-2k\pi)$$

Now it's easier to see that the IDTFT I got at the beginning of the question corresponds indeed to the given DTFT.

Source Link
Tendero
  • 5k
  • 6
  • 27
  • 46

You made a mistake in this last equality

$$x[n] = \frac{1}{2\pi jn}\left( e^{-j\pi n/4} -e^{-j\pi n} +2e^{j\pi n/4} -2e^{-j\pi n/4} + e^{j\pi n} -e^{j\pi n/4} \right) \neq \frac{\sin(\pi n/4)}{\pi n}$$

The right way to do this would be:

$$\begin{align} x(n)&=\frac{1}{2\pi jn}\left( e^{-j\pi n/4} -e^{-j\pi n} +2e^{j\pi n/4} -2e^{-j\pi n/4} + e^{j\pi n} -e^{j\pi n/4} \right) \\ &=\frac{1}{\pi n}\left( \frac{e^{-j\pi n/4}-e^{j\pi n/4}}{2j}+ \frac{e^{j\pi n} -e^{-j\pi n}}{2j} +\frac{2e^{j\pi n/4} -2e^{-j\pi n/4}}{2j} \right) \\ &=\frac{1}{\pi n}\left( -\sin\left(\pi n/4\right)+\sin\left(\pi n\right)+2\sin\left(\pi n/4\right) \right)\\ &=\frac{1}{\pi n}\left( \sin\left(\pi n\right)+\sin\left(\pi n/4\right) \right) \end{align}$$

Which makes sense as one can see that the DTFT is the sum of two rectangular windows, one of width $2\pi$ and one of width $\pi/2$, each corresponding to each $\mathrm{sinc}()$.