# factoring poles / zeros: off by constant gain compared with textbook

(From Schaum's DSP outline, 2nd edition, problem 5.32)

Book says factor it and extract H(z) from the factored product:

$$H(z)H(z^{-1})= \frac{ \frac{5}{4} - \frac{1}{2}z - \frac{1}{2}z^{-1} }{ \frac{10}{9}- \frac{1}{3}z - \frac{1}{3}z^-1 }$$

ok.. no problem... so i convert to the form used by the book for nearly every problem:

$$H(z)H(z^{-1})= \left( \frac{z^{-1}}{z^{-1}} \right) \left( \frac{ \frac{5}{4} - \frac{1}{2}z - \frac{1}{2}z^{-1} }{ \frac{10}{9}- \frac{1}{3}z - \frac{1}{3}z^-1 } \right)$$

$$H(z)H(z^{-1})= \left( \frac{ - \frac{1}{2} + \frac{5}{4}z^{-1} - \frac{1}{2}z^{-2} }{ \frac{1}{3} + \frac{10}{9}z^{-1}- \frac{1}{3}z^{-2} } \right)$$

Then I apply quadractic formula to determine the zeros and poles:

$$zeros = \left\{ \frac{1}{2}, 2 \right\}$$ $$poles = \left\{ \frac{1}{3}, 3 \right\}$$

Then I rewrite $$H(z)H^{-1}(z)$$ in factored form:

$$H(z)H(z^{-1})=\frac{\left(1-\frac{1}{2}z^{-1}\right)(1-2z^{-1})}{\left(1-\frac{1}{3}z^{-1}\right)(1-3z^{-1})}$$

At this point I realize that I have a different answer from the book which says, the answer at this point should be:

$$H(z)H(z^{-1})=\frac{\left(1-\frac{1}{2}z^{-1}\right)(1-\frac{1}{2}z)}{\left(1-\frac{1}{3}z^{-1}\right)\left(1-\frac{1}{3}z\right)}$$

I think... well... ok.. it should be equivalent to my version... i can rewrite my equation to get it to match the book.. so i try that:

$$H(z)H(z^{-1})=\frac{\left(1-\frac{1}{2}z^{-1}\right)(-2z^{-1})(1-\frac{1}{2}z)}{\left(1-\frac{1}{3}z^{-1}\right)(-3z^{-1})(1-\frac{1}{3}z)}$$

$$H(z)H(z^{-1})=\left(\frac{2}{3}\right)\frac{\left(1-\frac{1}{2}z^{-1}\right)(1-\frac{1}{2}z)}{\left(1-\frac{1}{3}z^{-1}\right)(1-\frac{1}{3}z)}$$

At this point i'm scratching my head wondering why it doesn't match because its off by a different gain? Wondering why the gain doesn't matter when picking out H(z) from the factorization of $$H(z)H(z^{-1})$$? Is this good practice to write it the other way around? which way is correct?

• Its like you only look at one pole and one zero to recreate $H(z)$ and ignore the other pole and zero, then define $H(z^{-1})$ from $H(z)$....then, it matches the book – Bill Moore Jan 20 '19 at 23:23
• what i don't understand is $\left(1-\frac{1}{2}z\right) \ne \left(1-2z^{-1}\right)$. if you set z =1. it doesn't equate. but individually the roots are the same.$\left(1-\frac{1}{2}z\right)=0$ verses $\left(1-2z^{-1}\right)=0$ – Bill Moore Jan 20 '19 at 23:30
• or maybe its like this... if you see $H(Z)H(z^{-1})$ then you just automatically know that your zeros and also your poles come in reciprocal pairs so you need to use the form $(1-(zeropole)^{-1}z)$ on the first zero/pole and $(1-(zeropole)z^{-1})$ on the second zero/pole... that's just the rule... no idea... it just works.. – Bill Moore Jan 20 '19 at 23:42
• i would suggest multiplying both numerator and denominator by a sufficient power of $z$ so that all of the unfactored terms of $z^n$ have a non-negative power, $n$, and that when factored, all of the factors have $z$, not $z^{-1}$. – robert bristow-johnson Jun 20 '19 at 19:48

Spectral factorization is not unique, unless you specify further constraints.

So let your given $$H(z)H(z^-1)$$ be (taking from your derivation) :

\begin{align} H(z)H(z^{-1})&= \frac{ \frac{5}{4} - \frac{1}{2}z - \frac{1}{2}z^{-1} }{ \frac{10}{9}- \frac{1}{3}z - \frac{1}{3}z^-1 } \tag{1}\\ &= \frac{\left(1-\frac{1}{2}z^{-1}\right)(1-2z^{-1})}{\left(1-\frac{1}{3}z^{-1}\right)(1-3z^{-1})} \end{align}

Then all of the following are valid possibilities that satisf Eq.(1)

$$H_1(z) =\frac{1-\frac{1}{2}z^{-1}}{1-\frac{1}{3}z^{-1}}$$

$$H_2(z) =\frac{1-2z^{-1}}{1-3z^{-1}}$$

$$H_3(z) =\frac{1-\frac{1}{2}z^{-1}}{1-3z^{-1}}$$

$$H_4(z) =\frac{1-2z^{-1}}{1-\frac{1}{3}z^{-1}}$$

So you must have further constraints that make one of them as a unique answer. Such as minimum-phase, maximum phase, causal, stable, bothe etc...

• that's an interesting point of view...so basically what you are saying is that reciprocating a real pole/zero has the same magnitude response $|H(e^{j\omega})|$. but $X[z^{-1}] <-> x[-n]$ is time-reversal and anti-casual? – Bill Moore Jan 21 '19 at 1:28
• No. What I say is given $G(z)=H(z)H(z^{-1})$ there are many possible $H(z)$ that yield the same $G(z)$. Each $H(z)$ will have different pole zero combinations and hence their magnitudes, in general, will not be same, except those of reciprocal ones. – Fat32 Jan 21 '19 at 1:32
• ok... thanks... i'll chew on that for awhile.. – Bill Moore Jan 21 '19 at 1:41

for consistency with the book, i'm just going to make up the following rule:

if $$\alpha$$ is a pole or zero of $$H(z)$$, then it must be factored as: $$\left(1-\alpha z^{-1}\right)$$

if $$\alpha$$ is a pole or zero of $$H(z^{-1})$$, then it must be factored as: $$\left(1-\frac{1}{\alpha}z\right)$$

if $$\alpha$$ is a pole or zero of $$H\left( \frac{1}{\alpha^*}\right)$$, then it must be factored as: $$\left(z^{-1} - \alpha^*\right)$$

At this point, i'm not really sure what the casual, min-max phase, stable, etc... implication are for always choosing this way of factoring... it just follows what the book always does.

You got the poles and zeros right, but you ignored the scaling. Your factorization

$$H(z)H(z^{-1})=\frac{\left(1-\frac{1}{2}z^{-1}\right)(1-2z^{-1})}{\left(1-\frac{1}{3}z^{-1}\right)(1-3z^{-1})}\tag{1}$$

is not equal to the original function

$$H(z)H(z^{-1})= \frac{ \frac{5}{4} - \frac{1}{2}z - \frac{1}{2}z^{-1} }{ \frac{10}{9}- \frac{1}{3}z - \frac{1}{3}z^{-1} }\tag{2}$$

This is easy to see by looking at the constants corresponding to the terms with no powers of $$z$$ in the numerator and denominator in $$(1)$$ (they're all $$1$$), and by comparing them to the corresponding terms in $$(2)$$ (here we need to look at the constants of the $$z$$ terms, which are $$-\frac12$$ and $$-\frac13$$).

So if you take those constant into account you end up with

$$\frac{-\frac12}{-\frac13}\cdot\frac{\left(1-\frac{1}{2}z^{-1}\right)(1-2z^{-1})}{\left(1-\frac{1}{3}z^{-1}\right)(1-3z^{-1})}=\frac{\left(1-\frac{1}{2}z^{-1}\right)(z^{-1}-\frac12)}{\left(1-\frac{1}{3}z^{-1}\right)(z^{-1}-\frac13)}\tag{3}$$

If you multiply the numerator and the denominator of $$(3)$$ by $$z$$ then you end up with the same result as in the given solution. Note that in this case your dividing by $$z$$ had to be undone, so you could have skipped that step.