4

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 ?enter image description here

Tendero
  • 5,020
  • 6
  • 27
  • 46
Jawad
  • 55
  • 4
  • Have you studied Z-transforms? – panthyon Mar 16 '17 at 15:42
  • 1
    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
  • 4
    @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
  • 1
    @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
  • 1
    @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
  • 1
    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
  • 1
    @MattL Interesting, thanks for the explanation. I would have thought the convergence on |z|=1 (or equivalently the $j\omega$ in Laplace) would have counted as a solution in those domains but do see how they must be impulses as opposed to the exponential surface around poles due to the u[n] and u(t), so never really thought through that case, nor do I recall ever seeing impulses as the solution in Laplace or z so that all makes sense. Prior to this I was always thinking that Laplace/z had the solutions when FT didn't, so this is an interesting twist (for me). Thanks! – Dan Boschen Mar 16 '17 at 17:18
  • 1
    @DanBoschen: Yes, there are cases where Laplace/Z-transforms exist but Fourier doesn't (which everybody knows about), but there are also cases where only Fourier exists but not Laplace/Z (which not everybody seems to realize), even though everybody is so used to working with ideal filters or ideal sinusoids :) – Matt L. Mar 16 '17 at 17:20
  • @Matt L. Does it matter that instead of $\sin x / x$ we have $\sin \frac{x}{2} / x $? – panthyon Mar 16 '17 at 17:23
  • 1
    @panthyon: The two are different, obviously, but it doesn't matter when it comes to convergence of the Z-transform or Fourier transform. Note that $\sin(x/2) / x=\frac12\sin(x/2)/(x/2)$ – Matt L. Mar 16 '17 at 17:30
  • that identity helped me a lot when i did this out on paper, thanks! – panthyon Mar 16 '17 at 17:40
  • @MattL what about the 2 sided Laplace Transform; does something disallow impulses on the frequency axis from being a solution in that case? – Dan Boschen Mar 16 '17 at 19:05
  • @DanBoschen: Everything said so far was about the bilateral Laplace (Z-) transform, because the function / sequence is two-sided. Note that the distribution $\delta(\omega)$ can't be a Laplace transform. – Matt L. Mar 16 '17 at 20:48
  • @Matt (sorry I am so confused) So why can't impulses on the unit circle or $j\omega$ axis be a viable solution then as the z and Laplace transforms even though it is just a line and not a region of convergence; is it strictly because of just that: a region with non-zero width is necessary for the Transform to exist, because of convention or is there more to it than that? – Dan Boschen Mar 16 '17 at 21:12
  • @Matt ok it's a little clearer to me now, remembering that the ROC is bounded by but does not include the poles- with that I can see that a line cannot exist, at least a line with the poles on it. Thanks for the insights. – Dan Boschen Mar 16 '17 at 21:44
  • @Matt How can I see that the function does not have a Z transform just by looking at the function? And I have studied Z transforms. – Jawad Mar 17 '17 at 16:01
  • 1
    @Jawad: The DTFT is discontinuous, which implies that the Z-transform doesn't exist. – Matt L. Mar 17 '17 at 17:12
  • I am confused what do you mean by continuos? – Jawad Mar 17 '17 at 17:18

1 Answers1

3

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.)

Tendero
  • 5,020
  • 6
  • 27
  • 46