Expressing the frequency response in a more 'compact' form

I've just been working through the questions in Discrete-Time Signal Processing (Oppenheim and Schafer) and I came across this (Q33):

Consider an LTI system defined by the difference equation $$y[n] = -2x[n]+4x[n-1]-2x[n-2]$$ ...

(b) Determine the frequency response of this system. Express your answer in the form $$H(e^{j\omega})=A(e^{j\omega})e^{-j{\omega}n_0},$$ where $$A(e^{j\omega})$$ is a real function of $$\omega$$. Explicitly specify $$A(e^{j\omega})$$ and the delay $$n_d$$ of this system.

Now, both the impulse response and frequency response are quite simple to find. I found $$h[n]=-2\delta[n]+4\delta[n-1]-2\delta[n-2]$$ and $$H(e^{j\omega})=-2+4e^{-j\omega}-2e^{-2j\omega}.$$ However, I can't seem to get the frequency response into the overall form defined in the question. I initially thought to try to get it into exponential form by calculating the magnitude and phase, but I feel as though that is not the intended method since those are dealt with separately in part (c). I also put the frequency response in rectangular form: $$H(e^{j\omega})=(-2+4\cos{\omega}-2\cos{2\omega})+j(2\sin{2\omega}-4\sin{\omega}),$$but I don't see this helping when I need to convert back into exponential form. Trigonometric identities seem to just overcomplicate the expression.

Is there some sort of theorem I can use that will help sum up the constant and complex exponentials?

• The point of the question is to teach you about a special property of FIR filters with symmetrical coefficients. Factor out a $e^{‐j\omega}$ and then express things as a sum of cosines. Commented Dec 11, 2022 at 12:04

I think the most straightforward way to obtain the desired form of the frequency response is to rewrite it as

\begin{align}H(e^{j\omega})&=-2+4e^{-j\omega}-2e^{-2j\omega}\\&=4e^{-j\omega}\left[-\frac{e^{j\omega}}{2}+1-\frac{e^{-j\omega}}{2}\right]\\&=4\big[1-\cos(\omega)\big]e^{-j\omega}\end{align}

The real-valued amplitude function is

$$A(e^{j\omega})=4\big[1-\cos(\omega)\big]$$

Note that in general, $$A(e^{j\omega})$$ is bipolar and is not equal to the magnitude of the frequency response. In the special case of the given example, it so happens that $$A(e^{e^{j\omega}})\ge 0$$ and hence it coincides with the magnitude of the frequency response.

As pointed out in a comment by Andy Walls, the phase $$\phi(\omega)=-\omega$$ is linear, which is a consequence of the symmetry of the impulse response (filter coefficients). Phase linearity implies that both the phase delay and the group delay are constant and equal:

$$\tau_p(\omega)=\tau_g(\omega)=1 \textrm{ (sample)}$$

with

$$\tau_p(\omega)=-\frac{\phi(\omega)}{\omega}\qquad\textrm{(phase delay)}$$

and

$$\tau_g(\omega)=-\frac{d\phi(\omega)}{d\omega}\qquad\textrm{(group delay)}$$

• Ah I see - I should more readily consider whether there is symmetry, makes things a lot easier. Thanks a lot! Commented Dec 11, 2022 at 12:49
• And the point of the problem is to show that the phase, $\phi(\omega)$, is determined only by the lone exponential term and thus the phase is linear in $\omega$. From that it follows that the delay of the filer is constant with respect to $\omega$, since $-\frac{d}{d\omega}\phi(\omega)$ is constant. I.e. the phase delay of all frequencies is the same, so in the passband, in input waveform will keep its shape on the output. Commented Dec 11, 2022 at 13:57
• @AndyWalls Got it, so this is a special case where the form of the frequency response lends itself to a convenient check of the phase response (and therefore the phase delay). In turn, this allows for a direct analysis of whether the filter preserves the input's shape. Very helpful interpretation. Your comments are much appreciated! Commented Dec 11, 2022 at 15:09