Frequency response of $\mathrm{sinc}[n]$

In this image the frequency response of a discrete time filter given as $h[n]$. Can someone explain how the magnitude of the frequency response is found ? • There's a typo in the definition of $h[n]$; there shouldn't be a $t$ in the denominator but an $n$! This is a basic Fourier transform pair: sinc <=> rect. It's easier to start from the rectangular spectrum and go back to the time domain via an inverse DTFT. Then remember that relation both ways. – Matt L. Mar 16 '17 at 15:46
• @panthyon: Z-transform won't help here, because the given $h[n]$ doesn't have a Z-transform. This is one of the cases where the Fourier transform can be used but the Z-transform can't. People always say that the Fourier transform is a special case of the Z-transform, but this is not entirely true (as shown by this example). – Matt L. Mar 16 '17 at 15:54
• @Matt Now I'm confused, how can there not be a z-transform? The Discrete Fourier Transform is a special case (sub-space perhaps more accurately) of the Z-transform, evaluated on the unit circle and the Fourier Transform is a special case of the Laplace Transform, evaluated on the $j\omega$ axis. But the z-transform itself (evaluated everywhere) should exist, no? Is it because n is going to infinity? I believe the z transform converges for all |z|>1 – Dan Boschen Mar 16 '17 at 16:42
• @DanBoschen: The given $h[n]$ is a two-sided sequence, so the ROC of the Z-transform must be a ring $a<|z|<b$. However, in this case there are no constants $a$ and $b$ such that the sum converges in such a ring. The sum only converges (in a generalized sense) for $|z|=1$, but that's the Fourier transform, not the Z-transform (which needs to converge in a ring, or outside/inside a circle). Same for the Laplace transform. Impulse responses of ideally frequency selective filters have no Laplace transform but a Fourier transform. – Matt L. Mar 16 '17 at 17:09
• Same for sinusoids. There is no Laplace transform of the function $\sin(\omega_0t)$, but there is a Fourier transform (using Dirac deltas). (Note that we're not talking about the function $\sin(\omega_0t)u(t)$.) – Matt L. Mar 16 '17 at 17:10

First of all, there is a mistake in that image: there should be an $n$ in the denominator instead of a $t$.

Check that your signal can be expressed as

$$h[n]=2\frac{\sin\left(\frac{\pi}{2}n\right)}{\pi n}=\frac{\sin\left(\frac{\pi}{2}n\right)}{\frac{\pi}{2}n} \tag{1}$$.

Using Euler's formula we can express that sine as the sum of two exponentials:

$$h[n]=\frac{1}{\pi/2}\frac12\frac{e^{jn\pi/2}-e^{-jn\pi/2}}{jn}=\frac{1}{\pi}\frac{e^{jn\pi/2}-e^{-jn\pi/2}}{jn}$$

Let me multiply and divide that expression by $2$, which doesn't change anything but will be useful later:

$$h[n]=\frac{1}{2\pi}2\frac{e^{jn\pi/2}-e^{-jn\pi/2}}{jn} \tag{2}$$

Notice that there exists an integral that returns that exact function of $n$ and, on top of it, that integral represents the inverse Fourier transform of some function:

$$\frac{1}{2\pi}\int\limits_{-\pi/2}^{\pi/2}2e^{j\omega n} \ \mathrm{d}\omega=\mathcal{F}^{-1}[H(e^{j\omega})]=h[n] \tag{3}$$

where $H(e^{j\omega})$ is periodic in $2\pi$ and, for each period:

$$H(e^{j\omega}) = \left\{ \begin{array}{ll} 2 & \mbox{if } |\omega| \leq \pi/2 \\ 0 & \ \mathrm{otherwise} \end{array} \right.$$

So the Fourier transform of $h[n]$ is $H(e^{j\omega})$, because the inverse Fourier transform of the latter is the former. And that's the proof.

However, most of the times one does not do all these calculations and just looks up the transform of $\mathrm(1)$. (In the link's table, look up for your signal and replace $W=2$. Then use the linearity of the Fourier transform to get to the result you are looking for.)