# Maximum phase with the same magnitude response

I'm trying to solve an exercise in a general way and I can't find if my answer is correct.

Given this frequency response:

$$H(z) = 4 + 2\sqrt2 z^{-1} + z^{-2}$$

I need to find a frequency response that has maximum-phase response $H_{1}(z)$ such that $\lvert H(z)\rvert = \lvert H_{1}(z)\rvert$.

First of all, I write:

$$H(z) = \frac{4z^2+2\sqrt2 z + 1}{z^2}$$

So I see that I have zeros in:

\begin{align} z_{01} &= \frac{\sqrt2}{4}+j\frac{\sqrt2}{4}\\ z_{02} &= \frac{\sqrt2}{4}-j\frac{\sqrt2}{4} \end{align}

And poles in:

$$z_x = 0 \text{ (double)}$$

Now, I know that for a maximum phase system I need that all the poles and zeros have to be outside the unit circle, but from Oppenheim-Schafer I also know that I have to add a scalar factor for the minimum-phase case, so I suppose I also have to add that scalar factor now.

So I say that this: $$H_1(z) = k \left(z- \frac{1}{z_{01}}\right) \left(z- \frac{1}{z_{02}}\right)$$ (I used that I have both poles in $z=\infty$, is that right?) has to be the one that makes $\lvert H(z)\rvert = \lvert H_{1}(z)\rvert$.

But I can't find the value of $k$ (scalar factor), because when I write $z=e^{j\omega}$ and use the magnitude definition (magnitude = square root of the squared real part plus the squared imaginary part) I find that $k=1$ and $k=-1$.

Note that the zeros of the given transfer function have a negative real part:

$$z_{01}=\frac{1}{2\sqrt{2}}(-1 + j),\quad z_{02}=z_{01}^*\tag{1}$$

With $(1)$ you can write the transfer function as

$$H(z)=4(1-z_{01}z^{-1})(1-z_{01}^*z^{-1})\tag{2}$$

Reflecting a zero across the unit circle means replacing it by its conjugated inverse, i.e. $z_{01}\rightarrow 1/z_{01}^*$, from which you get

$$H_{max}(z)=k\left(z-\frac{1}{z_{01}}\right)\left(z-\frac{1}{z_{01}^*}\right)=\frac{k}{|z_{01}|^2}(1-z_{01}z)(1-z_{01}^*z)\tag{3}$$

The constant $k$ can be determined by evaluating $(2)$ and $(3)$ at a point on the unit circle $|z|=1$. If you choose $z=1$ you get

$$H(1)=4(1-z_{01})(1-z_{01}^*)\tag{4}$$

and

$$H_{max}(1)=\frac{k}{|z_{01}|^2}(1-z_{01})(1-z_{01}^*)\tag{5}$$

Comparing $(4)$ and $(5)$ you get

$$\frac{k}{|z_{01}|^2}=4\tag{6}$$

and with $(3)$

$$H_{max}(z)=4(1-z_{01}z)(1-z_{01}^*z)\tag{7}$$

Comparing $(7)$ with $(2)$ you can see that

$$H_{max}(z)=H(z^{-1})=z^2+2\sqrt{2}z+4\tag{8}$$

In the time domain this corresponds to a time reversal. If $h[n]$ is the impulse response corresponding to $H(z)$, and $h_{max}[n]$ corresponds to $H_{max}(z)$, then the following holds:

$$h_{max}[n]=h[-n]\tag{9}$$

• Thanks Matt! First, why did you reflect the zeros to the inverse conjugate? I found that I have to reflect them like the inverse. Second, what if they were poles instead of zeros? Is the same thing?. Last question, I know that the equation $$H_{max}(z) = H(z^{-1})$$ is valid if there are not poles/ceros on $|z|=1$. Is that ok? – Euler Jun 20 '16 at 14:35
• @Euler: If you think about it, taking the inverse will invert the magnitude of the zero (you want that), but it also gives you the original angle with a negative sign (you don't want that). You get the original sign back by taking the complex conjugate. Since you have a pair of conjugate zeros, it doesn't matter in this case. As for your other question: poles on the unit circle are not allowed, otherwise you couldn't evaluate $H(z)$ at $|z|=1$. Zeros on the unit circle would remain where they are. – Matt L. Jun 20 '16 at 15:23
• I mean, what happens if there are poles instead of zeros in $Z_{01}$ and $Z_{02}$? What happens if I have only one zero in $Z_{01}$? Where I reflect it? Thanks Matt! – Euler Jun 20 '16 at 15:40
• @Euler: Reflecting always works the same, so if you have a single zero (which must be real-valued for a real-valued system), then you do $1/z_0^*=1/z_0$ (because $z_0$ is real); and the same for the poles. – Matt L. Jun 20 '16 at 15:43
• Thanks Matt! It was really helpful. If you can, I opened another thread with a question about decomposition of a frequency response. Thanks man! – Euler Jun 20 '16 at 16:15