# finding phase and group delay from frequency response

(From Schaum's Outlines, DSP, second edition, problem 5.25, second part of problem)

What's the procedure to find the Phase and Group Delay of:

$$H(e^{j\omega}) = e^{-j\theta}\left( \frac{e^{-j(\omega-\theta)}- |\alpha| }{1-|\alpha|\ e^{-j(\omega - \theta)}} \right)$$

Book says that group delay should be:

$$\tau(\omega) = \tau_0(\omega - \theta) = \frac{1-\alpha^2}{|1-\alpha\ e^{-j(\omega-\theta)}|^2}$$

I want to say the phase is $$\phi(\omega) = (\omega - \theta)$$ and group delay is: $$\tau(\omega) = - \phi ' (\omega)= 1$$... but i know that's not correct because the book gives a more complicated group delay. it looks like book version has something to do with "$$\tau_0$$", which i'm guessing is the initial group delay at time zero?? actually, i have no idea... its not explained in the book. (Any ideas how to do this same problem using the method in second part of problem?)

I feel there's a 50% chance i need to do this the complicated algebra and calculus way using this expresss as start:

$$\phi(\omega) = \arg\Big\{ H_R(e^{j\omega})+jH_I(e^{j\omega}) \Big\}$$

but then, i'm not really sure if there's a shortcut to just convert it to polar form instead of slugging it out in complex Cartesian form alegbra. like it seems the phase is $$\phi(\omega) = (\omega - \theta)$$...

with a lot of algebra I obtained this result:

$$\tau(\omega) = \frac{(-\alpha^2_I - \alpha^2_R + 1)}{1 + \alpha_{R}^{2} + \alpha_{I}^{2} -2 \alpha_{R} \cos(\omega) - 2 \alpha_{I} \sin(\omega)}$$

still would be nice if there were a simpler way..like the way the second part of the problem suggests...but doesn't really explain...

Fancy factoring to match book result:

$$1 + \alpha_{R}^{2} + \alpha_{I}^{2} -2 \alpha_{R} \cos(\omega) - 2 \alpha_{I} \sin(\omega)$$

$$= (1-\alpha e^{-j\omega}) (1- \alpha^{*} e^{j\omega})$$

$$=|1-\alpha\ e^{-j\omega}|^2$$

other factor:

$$|z|^2 = z_I^2 + z_R^2$$

$$(-\alpha^2_I - \alpha^2_R + 1)$$

$$=(1 -(\alpha^2_I + \alpha^2_R) )$$

$$=(1 - |\alpha|^2)$$

can remove absolute value as long as $$\alpha$$ remains squared.

$$=(1 - \alpha^2)$$

• The complex $\arg\{\cdot\}$ is not always that $\arctan(\cdot)$ function you had. You should look it up. – robert bristow-johnson Jan 18 '19 at 21:08
• what is $\alpha_R$ and $\alpha_I$? isn't $\alpha$ real? and i think that $\theta$ needs to be in the expression somewhere, doesn't it? – robert bristow-johnson Jan 18 '19 at 21:13
• $\alpha_R=Re\{\alpha\}$ and $\alpha_I=Im\{\alpha\}$ – Bill Moore Jan 19 '19 at 1:05
• but Bill, there is no place in your transfer function (which totally describes the input-output relationship of the LTI system) where there are separated real and imaginary parts to $\alpha$. in fact, it is only shown as $|\alpha|$ which must be real and non-negative. $$H(e^{j\omega}) = e^{-j\theta}\left( \frac{e^{-j(\omega-\theta)}- |\alpha|}{1-|\alpha|\ e^{-j(\omega - \theta)}} \right)$$ nowhere, anywhere, can there be a meaningful imaginary part to the value of $\alpha$. you can just replace $|\alpha|$ with $\beta$ and require that $\beta$ is real and non-negative. – robert bristow-johnson Jan 19 '19 at 4:17
• sorry, i'm just showing part II of question, H(z) is really an all-pass filter: $$H(z)=\frac{z^-1 - \alpha}{1-\alpha^{*} z^{-1}}$$. first part of problem is a little bit of a simplification because they just assume that $\alpha$ is always real. $$H(z)=\frac{z^-1 - \alpha}{1-\alpha z^{-1}}$$. but then they fix it in part II. so, I was trying to solve the complex $\alpha$ using the same method as part I by assuming that ($\alpha = \Re{\alpha} + j\Im{\alpha})$, but really they tell you a better way in part II to use polar for $\alpha$ and factor out the phase offet rather than using cartesian. – Bill Moore Jan 19 '19 at 20:07

Define a frequency response

$$\tilde{H}(e^{j\omega})=\frac{e^{-j\omega}-|\alpha|}{1-|\alpha|e^{-j\omega}}\tag{1}$$

and note that the group delay $$\tilde{\tau}(\omega)$$ corresponding to $$(1)$$ is related to the group delay $$\tau(\omega)$$ of the original frequency response $$H(e^{j\omega})$$ by

$$\tau(\omega)=\tilde{\tau}(\omega-\theta)\tag{2}$$

because $$(1)$$ is just a scaled and frequency-shifted version of the original $$H(e^{j\omega})$$.

$$\tilde{H}(e^{j\omega})$$ is the frequency response of a first-order all-pass filter with a real-valued pole at $$z_{\infty}=|\alpha|<1$$, and a real-valued zero at $$z_0=1/|\alpha|$$. The original frequency response $$H(e^{j\omega})$$ describes a first-order all-pass filter with a complex-valued pole at $$z_{\infty}=\alpha=|\alpha|e^{j\theta}$$ ($$|\alpha|<1$$), and a zero at $$z_0=1/\alpha^*$$.

Now write

$$\tilde{H}(e^{j\omega})=\frac{B(e^{j\omega})}{A(e^{j\omega})}\tag{3}$$

and note that

$$\tilde{\phi}(\omega)=\phi_B(\omega)-\phi_A(\omega)\tag{4}$$

where $$\tilde{\phi}(\omega)$$ is the phase of $$\tilde{H}(e^{j\omega})$$, and $$\phi_A(\omega)$$ and $$\phi_B(\omega)$$ are the phases of $$A(e^{j\omega})$$ and $$B(e^{j\omega})$$, respectively. Consequently,

$$\tilde{\tau}(\omega)=\tau_B(\omega)-\tau_A(\omega)\tag{5}$$

where $$\tau_A(\omega)$$ and $$\tau_B(\omega)$$ are the group delays of $$A(e^{j\omega})$$ and $$B(e^{j\omega})$$, respectively.

We have

$$\phi_B(\omega)=-\arctan\left(\frac{\sin(\omega)}{\cos(\omega)-|\alpha|}\right)\tag{6}$$

and

$$\phi_A(\omega)=\arctan\left(\frac{|\alpha|\sin(\omega)}{1-|\alpha|\cos(\omega)}\right)\tag{7}$$

where I've ignored any ambiguities by $$\pm\pi$$ due to the principal value of $$\arctan()$$ because they are irrelevant for computing the group delay.

Taking the negative derivative of $$(6)$$ and $$(7)$$ with respect to $$\omega$$ gives

$$\tau_B(\omega)=\frac{1-|\alpha|\cos(\omega)}{1-2|\alpha|\cos(\omega)+|\alpha|^2}\tag{8}$$

and

$$\tau_A(\omega)=\frac{|\alpha|^2-|\alpha|\cos(\omega)}{1-2|\alpha|\cos(\omega)+|\alpha|^2}\tag{9}$$

From $$(5)$$ we get

$$\tilde{\tau}(\omega)=\frac{1-|\alpha|^2}{1-2|\alpha|\cos(\omega)+|\alpha|^2}=\frac{1-|\alpha|^2}{\big|1-|\alpha|e^{-j\omega}\big|^2}\tag{10}$$

From $$(2)$$ the group delay of the complex first-order all-pass is given by

$$\tau(\omega)=\frac{1-|\alpha|^2}{1-2|\alpha|\cos(\omega-\theta)+|\alpha|^2}=\frac{1-|\alpha|^2}{\big|1-|\alpha|e^{-j(\omega-\theta)}\big|^2}\tag{11}$$

The difference with the given solution in Schaum's outline is the fact that in $$(11)$$ you have $$|\alpha|$$ instead of the complex-valued $$\alpha$$. Note that $$(11)$$ is correct and Schaum's formula is wrong because a complex-valued group delay doesn't make much sense.

• Thanks. the $\tilde{H}$ trick makes it about 10 times easier. – Bill Moore Jan 19 '19 at 15:38
• I can follow it to the end of the problem, but i'm still a little confused about the minus sign for $\tilde{\phi}(\omega)=\phi_B(\omega)-\phi_A(\omega)\tag{4}$ I would have thought its positive? where does the minus sign come from? $$\tilde{H}(e^{j\omega})=(e^{-j\omega}-|\alpha|) \left(\frac{1}{1-|\alpha|e^{-j\omega}}\tag{1}\right)$$ – Bill Moore Jan 19 '19 at 16:34
• maybe i lost a sign somewhere... – Bill Moore Jan 19 '19 at 16:39
• @BillMoore: The minus sign is there because $\phi_A$ is the phase of the denominator, so you have to subtract it from the phase of the numerator. The phase of $u=v/w$ is the phase of $v$ minus the phase of $w$. – Matt L. Jan 19 '19 at 17:06

Just apply the definitions.

\begin{align} H(e^{j\omega}) &= \Re\Big\{H(e^{j\omega})\Big\} + j \Im\Big\{H(e^{j\omega})\Big\} \\ \\ &= \Big| H(e^{j\omega}) \Big| e^{j \arg\{H(e^{j\omega})\}} \\ \\ &= \Big| H(e^{j\omega}) \Big| e^{j \phi(\omega)} \\ \end{align}

Where

$$\phi(\omega)\triangleq \arg\Big\{ H(e^{j\omega}) \Big\}$$

and

\begin{align} \arg\Big\{H(e^{j\omega})\Big\} &= \operatorname{atan2}(\Im\Big\{H(e^{j\omega})\Big\},\, \Re\Big\{H(e^{j\omega})\Big\}) \\ \\ &=\begin{cases} \arctan\left(\frac{\Im\{H(e^{j\omega})\}}{\Re\{H(e^{j\omega})\}}\right) &\text{if } \Re\Big\{H(e^{j\omega})\Big\} > 0 \\ \\ \frac{\pi}{2} - \arctan\left(\frac{\Re\{H(e^{j\omega})\}}{\Im\{H(e^{j\omega})\}}\right) &\text{if } \Im\Big\{H(e^{j\omega})\Big\} > 0 \\ \\ -\frac{\pi}{2} - \arctan\left(\frac{\Re\{H(e^{j\omega})\}}{\Im\{H(e^{j\omega})\}}\right) &\text{if } \Im\Big\{H(e^{j\omega})\Big\} < 0 \\ \\ \arctan\left(\frac{\Im\{H(e^{j\omega})\}}{\Re\{H(e^{j\omega})\}}\right) \pm \pi &\text{if } \Re\Big\{H(e^{j\omega})\Big\} < 0 \\ \\ \text{undefined} &\text{if } H(e^{j\omega}) = 0 \end{cases} \end{align}

Phase delay is the delay in time of a sinusoid at normalized angular frequency of $$\omega$$ passed through this LTI system and turns out to be this ratio ($$\phi(\omega)$$ must be "unwrapped" in this phase delay definition):

$$\tau_\phi(\omega) \triangleq -\frac{\phi(\omega)}{\omega}$$

Group delay is the delay in time of an envelope of a sinusoid at normalized angular frequency of $$\omega$$ passed through this LTI system and turns out to be this derivative:

$$\tau_\mathrm{g}(\omega) \triangleq -\frac{\mathrm{d}\phi(\omega)}{\mathrm{d}\omega}$$

Just apply the definitions and slug it out.

• how to get the $\phi(\omega)$ to start with? – Bill Moore Jan 18 '19 at 21:03
• You will have to split $H(e^{j\omega})$ into real and imaginary parts. then apply the definition of the complex $\arg\{\cdot\}$. – robert bristow-johnson Jan 18 '19 at 21:12