4
$\begingroup$

I am having trouble reconciling my derivation of the phase response of an N-th order all-pass filter with those I am finding in the literature, and I figured someone here could help me.


Real Version:

An $N$-th order real coefficient all-pass filter's transfer function is given by [1,2]:

$$ H_{A}(z) = z^{-N} \frac{A(z^{-1})}{A(z)}$$

where:

$$ A(z) = 1 + a_{1} z^{-1} + a_{2} z^{-2} + \cdots + a_{N-1} z^{-(N-1)} $$

We find its transfer function by appealing to standard results. We know that, if a transfer function has the following form: \begin{equation} H(z) = \frac{N(z)}{D(z)} \end{equation}

then the phase response is given by: \begin{equation} \Phi_{H}(\omega) = \angle N - \angle D \end{equation}

So we see that, since $N(z) = A(z^{-1}) = D(z^{-1})$, then $\angle N = - \angle D = -\angle A$. Similarly, we know that $\mathcal{F}\left\{ x(t-\tau)\right\} = e^{-j \omega \tau} \mathcal{F}\left\{ x(t) \right\}$, we have:

\begin{equation} \Phi_{H_{A}}(\omega) = -NT\omega - 2 \angle A(\omega) \end{equation}

where $T = \frac{1}{fs}$ is the spacing between samples, which we often set $T=1$ for a standardized design, and $\angle A(\omega) = \text{arg}\left[ A(\omega) \right]$. Plugging in, we get:

\begin{equation} \Phi_{H_{A}}(\omega) = -NT\omega - 2 \text{arctan}\left( \frac{ \displaystyle\sum_{n=0}^{N-1} a_{n} \text{sin}\left( \omega n T \right) }{ \displaystyle\sum_{n=0}^{N-1} a_{n} \text{cos}\left( \omega n T \right) } \right) \end{equation}

Complex Version:

There are multiple versions of what it means to be a complex all-pass filter in the literature. In [3], we have:

\begin{equation} H_{A}(z) = z^{-N} \frac{A^{\ast}(z^{-1})}{ A(z)} \end{equation} the corresponding phase response is: \begin{align} \Phi_{H_{A}}(\omega) &= -NT\omega + \angle N - \angle D \\ \Phi_{H_{A}}(\omega) &= -NT\omega + \left( - \angle A(\omega) - \angle A(\omega) \right) \\ \Phi_{H_{A}}(\omega) &= -NT\omega - 2 \angle A(\omega) \end{align} since $\mathcal{F}\left\{ x^{\ast}(-t)\right\} = X^{\ast}(\omega)$, and $\Phi_{X^{\ast}}(\omega) = -\Phi_{X}(\omega) $. And so, since $a_{n} = a_{n,r} + j a_{n,i}$ we have again:

\begin{equation} \Phi_{H_{A}}(\omega) = -NT\omega - 2 \text{arctan}\left( \frac{ \displaystyle\sum_{n=0}^{N-1} a_{n,i} \text{cos}\left( \omega n T \right) - a_{n,r} \text{sin}\left( \omega n T \right) }{ \displaystyle\sum_{n=0}^{N-1} a_{n,r} \text{cos}\left( \omega n T \right) + a_{n,i} \text{sin}\left( \omega n T \right) } \right) \end{equation}

[3] says, after bringing in the minus sign into the $\text{arctan}(\cdot)$ function:

\begin{equation} \Phi_{H_{A}}(\omega) = -NT\omega + 2 \text{arctan}\left( \frac{ \displaystyle\sum_{n=0}^{N-1} a_{n,r} \text{sin}\left( \omega n T \right) - a_{n,i} \text{cos}\left( \omega n T \right) }{ \displaystyle\sum_{n=0}^{N-1} a_{n,r} \text{cos}\left( \omega n T \right) + a_{n,i} \text{sin}\left( \omega n T \right) } \right) \end{equation}

However, [4] has it as: \begin{equation} H_{A}(z) = z^{-N} \frac{A(z^{-1})}{ A^{\ast}(z)} \end{equation} but the corresponding phase response is again back to: \begin{align} \Phi_{H_{A}}(\omega) &= -NT\omega + \angle N - \angle D \\ \Phi_{H_{A}}(\omega) &= -NT\omega + \left( - \angle A(\omega) - \angle A(\omega) \right) \\ \Phi_{H_{A}}(\omega) &= -NT\omega - 2 \angle A(\omega) \end{align} since $\mathcal{F}\left\{ x(-t)\right\} = X(-\omega)$, and so $\Phi_{X}(-\omega) = -\Phi_{X}(\omega)$, and $\mathcal{F}\left\{ x^{\ast}(t)\right\} = X^{\ast}(-\omega) $ and so $\Phi_{X^\ast}(-\omega) = -\Phi_{X^\ast} (\omega) = - (- \Phi_{X}(\omega)) = \Phi_{X}(\omega)$.

And so it should be:

\begin{equation} \Phi_{H_{A}}(\omega) = -NT\omega - 2 \text{arctan}\left( \frac{ \displaystyle\sum_{n=0}^{N-1} a_{n,i} \text{cos}\left( \omega n T \right) - a_{n,r} \text{sin}\left( \omega n T \right) }{ \displaystyle\sum_{n=0}^{N-1} a_{n,r} \text{cos}\left( \omega n T \right) + a_{n,i} \text{sin}\left( \omega n T \right) } \right) \end{equation}

but [4] has:

\begin{equation} \Phi_{H_{A}}(\omega) = -NT\omega + 2 \text{arctan}\left( \frac{ \displaystyle\sum_{n=0}^{N-1} a_{n,r} \text{sin}\left( \omega n T \right) + a_{n,i} \text{cos}\left( \omega n T \right) }{ \displaystyle\sum_{n=0}^{N-1} a_{n,r} \text{cos}\left( \omega n T \right) - a_{n,i} \text{sin}\left( \omega n T \right) } \right) \end{equation}


Question:

So who is right? What is the phase response of an $N$-th order all-pass filter?


References:

[1] D. Schlichthaerle, $\textit{Digital Filters: Basic and Design}$, 2nd ed. Heidelberg, Germany: Springer, 2011

[2] S. C. Pei and C. C. Tseng, "IIR Multiple Notch Filter Design Based on Allpass", IEEE TENCON, pp.267-272, 1996.

[3] M. Ikehara, M. Funaishi, and H. Kuroda, "Design of complex allpass networks using Remez algorithm," IEEE Trans. Circuits Syst. II, vol. 39, pp. 549–556, Aug. 1992.

[4] X. Zhang and H. Iwakura, "Design of IIR Digital Allpass Filters Based on Eigenvalue Problem", IEEE Trans. Sig. Proc., vol.47, no.2, pp.554-559, Feb. 1999.

$\endgroup$

1 Answer 1

0
$\begingroup$

So who is right?

Both, I think. On first looks version [3] and version [4] use different definitions of $A(z)$. [3] conjugates the zeros and [4] conjugates the poles. Either one will probably work but the definition of the coefficients is different. Specifically the $a$ coefficients of version [4] or conjugates of those of version [3].

So you have

$$a_{n,i,v3} = -a_{n,i,v4}$$

So if your complex allpass is

$$H(z) = \frac{(1-j)/2+z^{-1}}{1+(1+j)/2 \cdot z^{-1}}$$

[3] would say $a_1 = (1+j)/2$ and [4] defines $a_1 = (1-j)/2$

$\endgroup$
3
  • $\begingroup$ So they both will work out? I haven't built them to test this, but it doesn't really matter which one you conjugate? $\endgroup$
    – The Dude
    Jul 20, 2021 at 16:33
  • $\begingroup$ Personally I'd go with [3] especially if you use the notation of $a$ and $A$. That typically is used for the pole polynomial. [4] uses $a$ as the "conjugates of the pole polynomial" which feels weird to me. $\endgroup$
    – Hilmar
    Jul 20, 2021 at 18:03
  • $\begingroup$ Yea I would say that [3] seems more natural too. Thanks! $\endgroup$
    – The Dude
    Jul 20, 2021 at 18:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.