2
$\begingroup$

$h[n] = 2( \delta[n-2]-\delta[n-1]-\delta[n-3])$

i computed my frequency response and i have this now: $H[e^{j \omega}] = 2[ e^{-2 j \omega} - e^{-j \omega}-e^{-3 j \omega}]$

$H[e^{j \omega}] = 2[ \cos(2\omega) -i \sin(2\omega)-\cos(\omega)+i\sin(\omega)-\cos(3\omega)+i\sin(3\omega)]$

And i need to compute magnitude and phase. But how can i simplify that? there was a hint given to use trigonometric identities but i can't find some that suit my example.

  • 0
    detailed computation is in my answer.2011-04-22

3 Answers 3

2

Expanding my comment above. From

$H\left[ e^{-\mathrm{i}\omega }\right] =2\left[ \mathrm{e}^{-\mathrm{i}\left( 2\omega \right) }-\mathrm{e}^{-\mathrm{i}\omega }-\mathrm{e}^{-\mathrm{i}\left( 3\omega \right) }\right] =2\mathrm{e}^{-\mathrm{i}\left( 2\omega \right) }% \left[ 1-\mathrm{e}^{\mathrm{i}\omega }-\mathrm{e}^{-\mathrm{i}\omega }% \right]$

we get the following

$\begin{eqnarray*} \left\vert H\left[ e^{-\mathrm{i}\omega }\right] \right\vert &=&\left\vert 2\mathrm{e% }^{-\mathrm{i}\left( 2\omega \right) }\left[ 1-\mathrm{e}^{\mathrm{i}\omega }-\mathrm{e}^{-\mathrm{i}\omega }\right] \right\vert \\ &=&\left\vert 2\right\vert \left\vert \mathrm{e}^{-\mathrm{i}\left( 2\omega \right) }\right\vert \left\vert 1-\mathrm{e}^{\mathrm{i}\omega }-\mathrm{e}% ^{-\mathrm{i}\omega }\right\vert \\ &=&2\cdot 1\cdot \left\vert 1-\cos \omega -\mathrm{i}\sin \omega -\cos \omega +\mathrm{i}\sin \omega \right\vert \\ &=&2\left\vert 1-2\cos \omega \right\vert \\ \end{eqnarray*}$

1

Expanding upon Américo and samanwita's answers:

$H[e^{-j\omega }] =2e^{-j 2\omega}\left(1-2\cos(\omega)\right) \; ,$

from which Américo deduced the magnitude to be

$|H[e^{-j\omega }]| =2\left|1-2\cos(\omega)\right| \; .$

The phase is then simply

$e^{j\phi[\omega]}=e^{-j 2\omega}\frac{\left(1-2\cos(\omega)\right)}{\left|1-2\cos(\omega)\right| }$

or

$\phi[\omega] = \begin{cases} -2\omega \; , \text{ if } \omega \in \left]\frac{\pi}{3}+2k\pi,\frac{5\pi}{3}+2k\pi\right[\\ -2\omega + \pi \; , \text{ if } \omega \in \left]-\frac{\pi}{3}+2k\pi,\frac{\pi}{3}+2k\pi\right[\end{cases} \text{ for } k \in \mathbb{Z} \; .$

  • 0
    @Raskolnikov: To me your explanation makes sense. @madmax: By the way may $\omega$ be either positive or negative? I had thought it was always positive.2011-04-24
0

It's a bit confusing here so to sum it up:

The frequency response is $ H[e^{j \omega}] = 2[ \cos(2\omega) -i \sin(2\omega)-\cos(\omega)+i\sin(\omega)-\cos(3\omega)+i\sin(3\omega)] $

$ H[e^{j \omega}] = 2[1-2*cos(\omega)] $

To get magnitude and phase i need real and imaginary parts: $ H_R[e^{j \omega}] = 2[ \cos(2\omega) -\cos(\omega)-\cos(3\omega)] $ $ H_I[e^{j \omega}] = 2[ -\sin(2\omega)+\sin(\omega)+\sin(3\omega)] $ $ |H[e^{j \omega}]| = (H_R[e^{j \omega}]^2 + H_I[e^{j \omega}]^2)^{\frac{1}{2}} $

And that is $|H[e^{j \omega}]| = \sqrt{(2 \cos \omega - 1)^2}$

PLOTS

  • 0
    yes, the square root of the sum of the squares of the real and imaginary parts. The modulus of the complex $z=a+ib$ is $|z|=\sqrt{a^2+b^2}$.2011-04-23