Digital low-pass filter coefficients
The bilinear transform (BLT) maps poles and zero's of an analog system to the digital domain. This makes it possible to implement an analog system such as a filter on a digital system, for example on a microcontroller or an fpga.
Pole locations of an nth order analog filter
Using the BLT it is possible to design digital filters that have the same characteristic's as "standard" analog filters. To make use of the BLT the poles and zero's of the analog filter must be calculated (it is also possible to look them up in a filter book).
The poles of an analog low-pass Chebyshev filter can be calculated based on three specifications:
- \(\omega_c\), is \(2\pi f_c\) where \(f_c\) is the cutoff frequency;
- n, is the order of the filter;
- \(R_{dB}\), is the allowed ripple in the passband in dB.
The transfer function of an nth order low-pass filter can be calculated with equation \ref{eq:expandAnalogTransfer}. Incase of a third order low-pass filter this will result in equation \ref{eq:analogThirdOrderLp}. \begin{equation}\label{eq:expandAnalogTransfer} H_A\left(s\right)=\prod^n_{k=1}\frac{1}{\left(1-\frac{s}{p_k}\right)} \end{equation} \begin{equation}\label{eq:analogThirdOrderLp} H_A\left(s\right)=\frac{p_1p_2p_3}{-s^3+\left(p_1+p_2+p_3\right)s^2-\left(p_1p_2+p_1p_3+p_2p_3\right)s+p_1p_2p_3} \end{equation}
The Bilinear transfer
The BLT maps the analog poles and zero's to the digital domain using the approximation as shown in equation \ref{eq:bilinearTransform}. The digital transfer function can thus be calculated with equation \ref{eq:simpelDig}. \begin{equation}\label{eq:bilinearTransform} s\approx\frac{2}{T}\frac{z-1}{z+1} \end{equation} \begin{equation}\label{eq:simpelDig} H_D\left(z\right)=H_A\left(\frac{2}{T}\frac{z-1}{z+1}\right)=\prod^n_{k=1}\frac{1}{\left(1-\frac{2z-2}{Tp_kz+Tp_k}\right)} \end{equation} Equation \ref{eq:simpelDig} can be rewritten to make it easier to find all the poles and zero's of the digital transfer function, this is shown in equation \ref{eq:standardHd}. From equation \ref{eq:standardHd} it follows that the poles of the digital transfer function are all located at \(1+0j\) while the pole locations can be calculated with equation \ref{eq:digitalFilterPoleLocations}. \begin{equation} \label{eq:standardHd} H_D\left(z\right)=\prod^n_{k=1}\frac{Tp_k\left(z+1\right)}{\left(Tp_k-2\right)z+Tp_k+2} \end{equation} \begin{equation}\label{eq:digitalFilterPoleLocations} p_{D_k}=\frac{-Tp_k-2}{Tp_k-2} \end{equation}
The filter coefficients needed to implement the digital filter can be found by expanding equation \ref{eq:digitalFilterPoleLocations}, the resulting equation will have the form om equation \ref{eq:digHz}. \begin{equation} \label{eq:digHz} H_D(z)=\frac{b_nz^n+b_{n-1}z^{n-1}+\cdots+b_0z^0}{a_nz^n+a_{n-1}z^{n-1}+\cdots+a_0z^0} \end{equation} It is possible to show algebraically that the filter coefficients of a third order low-pass filter can be calculated with equations \ref{eq:startCoefBlock}-\ref{eq:endCoefBlock}. For filters that have a higher order then 2, it is recommended to use a cas program such as wxMaxima. \begin{align} b_0{}&=b_3=T^3p_1p_2p_3\label{eq:startCoefBlock}\\ b_1{}&=b_2=3T^3p_1p_2p_3\\ a_0{}&= T(p_1+2)(p_2+2)(p_3+2)\\ a_1{}&=3T^3p_1p_2p_3+2T^2\left(p_1p_2+p_2p_3+p_1p_3\right)-4T\left(p_1+p_2+p_3\right)-24\\ a_2{}&=3T^3p_1p_2p_3-2T^2\left(p_1p_2+p_2p_3+p_1p_3\right)-4T\left(p_1+p_2+p_3\right)+24\\ a_3{}&= T(p_1-2)(p_2-2)(p_3-2)\label{eq:endCoefBlock} \end{align}