next up previous contents index
Next: Designing filters Up: Designing filters Previous: Compound filters   Contents   Index

Real outputs from complex filters

In most applications, we start with a real-valued signal to filter and we need a real-valued output, but in general, a compound filter with a transfer function as above will give a complex-valued output. However, we can construct filters with non-real-valued coefficients which nonetheless give real-valued outputs, so that the analysis that we carry out using complex numbers can be used to predict, explain, and control real-valued output signals. We do this by pairing each elementary filter (with coefficient $A$, say) with another having as its coefficient the complex conjugate $\overline{A}$.

For example, putting two non-recirculating filters, with coefficients $Q$ and $\overline{Q}$, in series gives a transfer function equal to:

\begin{displaymath}
H(Z) = (1 - {Q}{Z^{-1}}) \cdot (1 - \overline{Q}{Z^{-1}})
\end{displaymath}

which has the property that:

\begin{displaymath}
H(\overline{Z}) = \overline{H(Z)}
\end{displaymath}

Now if we put any real-valued sinusoid:

\begin{displaymath}
{X_n} = 2 \, \mathrm{re}(A{Z^n}) = A{Z^n} + \overline{A}
{{\overline{Z}}^n}
\end{displaymath}

we get out:

\begin{displaymath}
AH(Z){Z^n} + \overline{A} \overline{H(Z)} {{\overline{Z}}^n}
\end{displaymath}

Here we're using two properties of complex conjugates. First, you can add and multiply them at will:

\begin{displaymath}
\overline{A+B} = \overline{A} + \overline{B}
\end{displaymath}


\begin{displaymath}
\overline{AB} = \overline{A} \overline{B}
\end{displaymath}

and second, anything plus its complex conjugate is real, and is in fact twice its real part:

\begin{displaymath}
A + \overline{A} = 2 \, \mathrm{re} (A)
\end{displaymath}

The above result for two conjugate filters extends to any compound filter; in general, we always get a real-valued output from a real-valued input if we arrange that each coefficient $Q_i$ and $P_i$ in the compound filter is either real-valued, or in a pair with its complex conjugate.

When pairing recirculating elementary filters, it is possible to avoid computing one of each pair, as long as the input is real-valued (and so, the output is as well.) Supposing the input is a real sinusoid of the form:

\begin{displaymath}
\left (A{Z^n} + \overline{A}{Z^{-n}} \right )
\end{displaymath}

we apply a single recirculating filter with coefficient $P$. Letting $a[n]$ denote the real part of the output, we have:

\begin{displaymath}
a[n] =
2 \mathrm{re} \left[ {
{1 \over {1 - {P}{Z^{-1}}}}...
...n} +
{1 \over {1 - {P}{Z}}} \overline{A}{Z^{-n}}}
} \right ]
\end{displaymath}


\begin{displaymath}
=
2 \mathrm{re} \left[ {
{1 \over {1 - {P}{Z^{-1}}}} {A{Z^n}} +
{1 \over {1 - \overline{P}{Z^{-1}}}} {A{Z^n}}
} \right ]
\end{displaymath}


\begin{displaymath}
=
2 \mathrm{re} \left[ {
{{
2 - 2 \, \mathrm{re} (P) {Z^...
...^{-1}}) (1 - {\overline{P}}{Z^{-1}})
}}
{A{Z^n}}
} \right ]
\end{displaymath}


\begin{displaymath}
=
\mathrm{re} \left[ {
{{
2 - 2 \, \mathrm{re} (P) {Z^{-...
...\overline{P}}{Z^{-1}})
}}
{\overline{A}{Z^{-n}}}
} \right ]
\end{displaymath}

(In the second step we used the fact that you can conjugate all or part of an expression, without changing the result, if you're just going to take the real part anyway. The fourth step did the same thing backward.) Comparing the input to the output, we see that the effect of passing a real signal through a complex one-pole filter, then taking the real part, is equivalent to passing the signal through a two-pole, one-zero filter with transfer function equal to:

\begin{displaymath}
{H_{\mathrm{re}}}(Z) = {{
1 - \mathrm{re} (P) {Z^{-1}}
} \over {
(1 - {P}{Z^{-1}}) (1 - {\overline{P}}{Z^{-1}})
}}
\end{displaymath}

With this definition, we can rewrite:

\begin{displaymath}
a[n] = {H_{\mathrm{re}}}(Z) A {Z^n} +
{H_{\mathrm{re}}}(\overline{Z}) A {Z^{-n}}
\end{displaymath}

A similar calculation shows that taking the imaginary part gives the output:

\begin{displaymath}
b[n] = {H_{\mathrm{im}}}(Z) A {Z^n} +
{H_{\mathrm{im}}}(\overline{Z}) A {Z^{-n}}
\end{displaymath}

with the transfer function:

\begin{displaymath}
{H_{\mathrm{im}}}(Z) = {{
\mathrm{im} (P) {Z^{-1}}
} \over {
(1 - {P}{Z^{-1}}) (1 - {\overline{P}}{Z^{-1}})
}}
\end{displaymath}

So taking either the real or imaginary part of a one-pole filter output gives filters with two poles places at conjugates. We can combine the two in a particular way to give the simplest possible numerator of one:

\begin{displaymath}
{H_{\mathrm{re}}}(Z) +
{{
{\mathrm{im} (P)}
} \over {
...
... } \over {
(1 - {P}{Z^{-1}}) (1 - {\overline{P}}{Z^{-1}})
}}
\end{displaymath}

This is the transfer function for two conjugate recirculating filters in series, and so we have shown that we can just run the signal through one of the stages and combine the real and imaginary part to get the same result. This technique (called partial fractions) may be repeated for any number of stages in series, as long as we compute the appropriate combination of real and imaginary parts of the output of each stage to form the (real) input of the next stage. No similar shortcut seems to exist for non-recirculating filters; in that case it is necessary to compute each member of each complex-conjugate pair explicitly.


next up previous contents index
Next: Designing filters Up: Designing filters Previous: Compound filters   Contents   Index
Miller Puckette 2006-03-03