next up previous
Next: Conclusion Up: number8 Previous: The Z Transform

Convolutions and Digital Filters

Having established the convolution theorem is very important since digital filters can be described in terms of convolutions. The Z transform version allows us to work with these filters by merely manipulating polynomials. In order to see that this is so, I have to reveal one neat fact about the Z transform. The Z transform that we have describe above can be written as,

\begin{displaymath}
X(Z) = \sum_t x_t Z^t
\end{displaymath} (9)

If this is evaluated on the unit circle in the complex plane, that is we let $Z = e^{j \omega}$, then we get

\begin{displaymath}
X(Z) = \sum_t x_t e^{j \omega t}
\end{displaymath} (10)

which is the definition of the (discrete) Fourier transform! In other words the Fourier transform is just the Z transform evaluated on the unit circle. So one way to interpret (7), is that we can make $y$ be a series that has a spectrum that is the spectrum of $x$ modified by the spectrum of $b$. So for example if we design $b$ to have a zero at 60 Hz, then $y$ will be the signal $x$ with 60 Hz removed, i.e. we have a notch filter.

In general we can write a digital filter in the form,

$\displaystyle Y(Z) A(Z) = X(Z) B(Z)$     (11)

or written out in the time domain,
$\displaystyle \sum_{k=0}y_{t-k} a_k = \sum_{k=0} x_{t-k} b_k$     (12)

If $x$ represents the measurement data and $a$ and $b$ are the (somehow) known filter coefficients then the above equation can be reorganized in a way that is more obviously useful,
$\displaystyle y_t = \frac{1}{a_0} \left( \sum_{k=0} x_{t-k} b_k - \sum_{k=1}y_{t-k} a_k \right)$     (13)

This equation is a general formulation of a digital filter. If the $a$ coefficients beyond $a_0$ are nonzero, it is called an Infinite Impluse Response (IIR) filter because an input series $x$ consisting of all zeros except at one point will result in an output series $y$ that will always contain some amount of the original input (for real computers with finite CELL sizes the output will actually eventually decay away because of truncation effects). An example IIR filter is what is known as the leaky integrator,
$\displaystyle y_t = x_t + a y_{t-1}$      

For the special case where the $a$ coefficients beyond $a_0$ are all zero, the filter is called a Finite Impluse Response (FIR) filter because an impulsive input will cause an output that will eventually settle down to a steady state. A simple example is the running average,

$\displaystyle y_t = \sum_{k=0}^M b_k x(t - k)$      

Everything that one can know about a digital filter is contained in the ratio of elements the of $A$ and $B$,

\begin{displaymath}
H(Z) = \frac{B(Z)}{A(Z)}
\end{displaymath} (14)

which is known as the filter characteristic. Foremost is the power transfer function which describes what fraction of energy at a given frequency in the input appears in the output,
\begin{displaymath}
P(Z) = H(Z) H^*(Z)
\end{displaymath} (15)

where $H^*$ is the complex conjugate (the sign of the imaginary part is inverted) of $H$.

Recall that in an earlier column, I pointed out the the power transfer function is only part of the story. One should also consider what the filter does to the phase of the input. In general a filters effect on the phase is frequency dependent and so there is a phase transfer function,

\begin{displaymath}
\Phi(Z) = - \tan^{-1}\frac{ Im(H(Z)) }{Re(H(Z))}
\end{displaymath} (16)

The filter can also have an effect on packets of waves. These packets are what you get, for example, when you modulate a one frequency by another. The frequency of the modulation envelope itself becomes a filterable component with its own transfer function, the group transfer function,

\begin{displaymath}
G(Z) = - \frac{dH(Z)}{d Z}
\end{displaymath} (17)

All of these transfer functions are conventionally computed on the unit complex circle.

The characteristic function for the leaky integrator is,

$\displaystyle H(Z) = \frac{1}{1 - a Z}$      

Converting this to the time domain gives the impulse response of the filter,
$\displaystyle h_t = \left( \frac{1}{a} \right)^t \mbox{ for $t > 0$, \hspace{0.15in}0 otherwise}$      

For the running average filter, the function is,

$\displaystyle H(Z) = \sum_{k=0}^M b_k Z^k$      

and its impulse response is
$\displaystyle h_t = b_t \mbox{ for $t = 0 ... M$,\hspace{0.15in} 0 otherwise}$      

Certain forms for the polynomials $A$ and $B$ have proven to be useful and are widely used. For example the bandpass Butterworth filter has the coefficients in the form,

$\displaystyle B(Z)$ $\textstyle =$ $\displaystyle b (Z^4 - 2 Z^2 + 1)$ (18)
$\displaystyle A(Z)$ $\textstyle =$ $\displaystyle Z^4 + a_3 Z^3 + a_2 Z^2 + a_1 Z + a_0 \nonumber$  

The Butterworth filter chooses to optimize the flatness of the bandpass region of $P(Z)$ and in doing so gives up simple forms for $\Phi$ and $G$.

Chebyshev filters are designed to give the sharpest possible transition between the bandpass and bandstop regions. The filter gets its name because the filter characteristic contains a special polynomial known as a Chebyshev polynomial, $T_n$.

\begin{displaymath}
P( j \omega ) = \frac{1}{1 + \varepsilon^2 T^2_n(\omega)}
\end{displaymath} (19)

This filter gains in the sharp transition by compromising on the flatness of the bandpass region.

Elliptical or Cauer filters get even sharper transitions than Chebyshev filters, but achieve this at the expense of ripples in both the pass and stop bands. The filter characteristic looks like the Chebyshev filter, except the Chebyshev polynomial gets replaced by a Chebyshev rational function.

Bessel filters are designed with the goal of achieving the flattest possible group delay. This results in a filter has no ringing when it receives a step or impulse input. The characteristic function for the $n$th order Bessel filter is given by,

$\displaystyle H( j \omega ) = \frac{b_0}{q_n(s)}$     (20)

where,
$\displaystyle q_n(s)$ $\textstyle =$ $\displaystyle \sum_{k=1}^n b_k s^k$ (21)
$\displaystyle b_k$ $\textstyle =$ $\displaystyle \frac{ (2 n - k)!}{2^{n-k} k! (n-k)!}$  


next up previous
Next: Conclusion Up: number8 Previous: The Z Transform
Skip Carter 2008-08-20