HOME
PDF letter size
PDF legal size

IIR digital filter design for low pass filter based on impulse invariance and bilinear transformation methods using butterworth analog filter

Nasser M. Abbasi

May 5, 2010   Compiled on March 19, 2020 at 12:26 Noon

Contents

1 Introduction
 1.1 Filter specifications
2 The design steps
 2.1 Impulse invariance method
 2.2 bilinear transformation method
 2.3 Summary of analytical derivation method
3 Numerical design examples
 3.1 Example 1
  3.1.1 using impulse invariance method (using T=1)
  3.1.2 bilinear method
 3.2 Example 2
  3.2.1 using impulse invariance method
  3.2.2 Using bilinear
4 IIR design for minmum order filter
 4.1 Impulse invariance method
 4.2 bilinear transformation method
5 References

A low pass digital filter (IIR) is designed based on given specifications. Butterworth analog filter \(H(s)\) is designed first, then it is converted to digital filter \(H(z)\)

Analytical procedure is illustrated below and simplified to allow one to more easily program the algorithm. 4 numerical examples are used to illustrate the procedure.

1 Introduction

This report derives a symbolic procedure to design a low pass IIR digital filter from an analog Butterworth filter using 2 methods: impulse invariance and bilinear transformation. Two numerical examples are then used to illustrate using the symbolic procedure. There are a total of 13 steps.

A Mathematica program with GUI is written to enable one to use this design for different parameters. A Matlab script is being written as well.

1.1 Filter specifications

Filter specifications are 5 parameters. The frequency specifications are analog frequencies, while the attenuation for the passband and the stopband are given in db





\(F_{s}\) The sampling frequency in Hz


\(f_{c}\) The passband cutoff frequency in Hz


\(f_{s}\) The stopband corner frequency in Hz


\(\delta _{p}\) The attenuation in db at \(f_{c}\)


\(\delta _{s}\) The attenuation in db at \(f_{s}\)


This diagram below illustrates these specifications

pict

The frequency specifications are in \(Hz\) and they must be first converted to digital frequencies \(\omega \) where \(0\leq \left \vert \omega \right \vert \leq \pi \) before using the attenuation specifications, The sampling frequency \(F_{s}\) is used to do this conversion since \(F_{s}\) corresponds to \(2\pi \) on the digital frequency scale.

2 The design steps

1.
Convert specifications from analog to digital frequencies
2.
Based on design method (impulse invariance of bilinear) apply the attenuation criteria to determine \(\Omega _{c}\) and \(N\) (the filter order)
3.
Using \(\Omega _{c}\) and \(N\) find the locations of the poles of the butterworth analog filter \(H(s)\).
4.
Find \(H(z)\) from \(H(s)\). The method of doing this depends if we are using impulse invariance or bilinear. This step is much simpler for the bilinear method as it does not require performing partial fractions decomposition on \(H(s)\)

Now we begin the analytical design procedure.

2.1 Impulse invariance method

We first convert analog specifications to digital specifications: \(\frac{F_s}{2\pi }=\frac{f_p}{\omega _p}\), hence \(\omega _{p}=2\pi \frac{f_{p}}{F_{s}}\) and \(\omega _{s}=2\pi \frac{f_{s}}{F_{s}}\)

Convert the criteria relative to the digital normalized scale:\begin{align*} 20\log \left \vert H\left ( e^{j\omega _{p}}\right ) \right \vert & \geq \delta _{p}\\ 20\log \left \vert H\left ( e^{j\omega _{s}}\right ) \right \vert & \leq \delta _{s} \end{align*}

Therefore

\begin{align} \left \vert H\left ( e^{j\omega _{p}}\right ) \right \vert & \geq 10^{\frac{\delta _{p}}{20}}T \tag{A}\\ \left \vert H\left ( e^{j\omega _{s}}\right ) \right \vert & \leq 10^{\frac{\delta _{s}}{20}}T \tag{B} \end{align}

Notice that we added the \(T\) scaling factor. Now, Butterworth analog filter squared magnitude Fourier transform is given by\[ \left \vert H_{a}\left ( j\Omega \right ) \right \vert ^{2}=\frac{T^{2}}{1+\left ( \frac{j\Omega }{j\Omega _{c}}\right ) ^{2N}}\] hence equations (A) and (B) above are now written in terms of the analog Butterworth amplitude frequency response and become\begin{align*} \frac{T^{2}}{1+\left ( \frac{\Omega _{p}}{\Omega _{c}}\right ) ^{2N}} & \geq \left ( 10^{\frac{\delta _{p}}{20}}\right ) ^{2}T^{2}\\ \frac{T^{2}}{1+\left ( \frac{\Omega _{s}}{\Omega _{c}}\right ) ^{2N}} & \leq \left ( 10^{\frac{\delta _{s}}{20}}\right ) ^{2}T^{2} \end{align*}

Therefore the above becomes

\begin{align*} \frac{1}{1+\left ( \frac{\Omega _{p}}{\Omega _{c}}\right ) ^{2N}} & \geq \ 10^{\frac{\delta _{p}}{10}}\\ \frac{1}{1+\left ( \frac{\Omega _{s}}{\Omega _{c}}\right ) ^{2N}} & \leq 10^{\frac{\delta _{s}}{10}} \end{align*}

Now, for impulse invariance, \(\Omega _{p}=\frac{\omega _{p}}{T}\,\ \) and \(\Omega _{s}=\frac{\omega _{s}}{T}\).  

\begin{align} 1+\left ( \frac{\omega _{p}/T}{\Omega _{c}}\right ) ^{2N} & \leq 10^{-\frac{\delta _{p}}{10}}\tag{1}\\ 1+\left ( \frac{\omega _{s}/T}{\Omega _{c}}\right ) ^{2N} & \geq 10^{-\frac{\delta _{s}}{10}}\tag{2} \end{align}

Change inequalities to equalities and simplify\begin{align*} \left ( \frac{\omega _{p}/T}{\Omega _{c}}\right ) ^{2N} & =10^{-\frac{\delta _{p}}{10}}-1\\ \left ( \frac{\omega _{s}/T}{\Omega _{c}}\right ) ^{2N} & =10^{-\frac{\delta _{s}}{10}}-1 \end{align*}

Divide the above 2 equations\begin{align*} \left ( \frac{\omega _{p}}{\omega _{s}}\right ) ^{2N} & =\frac{10^{-\frac{\delta _{p}}{10}}-1}{10^{-\frac{\delta _{s}}{10}}-1}\\ 2N\left [ \log \left ( \omega _{p}\right ) -\log \left ( \omega _{s}\right ) \right ] & =\log \left ( 10^{-\frac{\delta _{p}}{10}}-1\right ) -\log \left ( 10^{-\frac{\delta _{s}}{10}}-1\right ) \\ N & =\frac{1}{2}\frac{\log \left [ 10^{-\frac{\delta _{p}}{10}}-1\right ] -\log \left [ 10^{-\frac{\delta _{s}}{10}}-1\right ] }{\log \left ( \omega _{p}\right ) -\log \left ( \omega _{s}\right ) } \end{align*}

We need to round the above to then nearest integer using the Ceiling function \(N=\) \(\left \lceil N\right \rceil \)

Now for impulse invariance method, use equation (1) above to solve for \(\Omega _{c}\) \begin{align*} \left ( \frac{\omega _{p}/T}{\Omega _{c}}\right ) ^{2N} & =10^{-\frac{\delta _{p}}{10}}-1\\ 2N\left ( \log _{10}\frac{\omega _{p}/T}{\Omega _{c}}\right ) & =\log _{10}\left ( 10^{-\frac{\delta _{p}}{10}}-1\right ) \\ \log _{10}\frac{\omega _{p}/T}{\Omega _{c}} & =\frac{1}{2N}\log _{10}\left ( 10^{-\frac{\delta _{p}}{10}}-1\right ) \\ \frac{\omega _{p}/T}{\Omega _{c}} & =10^{\left ( \frac{1}{2N}\log _{10}\left ( 10^{-\frac{\delta _{p}}{10}}-1\right ) \right ) }\\ \Omega _{c} & =\frac{\omega _{p}/T}{10^{\left ( \frac{1}{2N}\log _{10}\left ( 10^{-\frac{\delta _{p}}{10}}-1\right ) \right ) }} \end{align*}

Now that we found \(N\) and \(\Omega _{c}\), next find the poles of \(H\left ( s\right )\) Since the butterworth magnitude square of the transfer function is \[ \left \vert H_{a}\left ( s\right ) \right \vert ^{2}=\frac{T^{2}}{1+\left ( \frac{s}{j\Omega _{c}}\right ) ^{2N}}\] Hence \(H\left ( s\right ) \) poles are found by setting the denominator of the above to zero \begin{align*} 1+\left ( \frac{s}{j\Omega _{c}}\right ) ^{2N} & =0\\ \left ( \frac{s}{j\Omega _{c}}\right ) ^{2N} & =-1\\ & =e^{j\left ( \pi +2\pi k\right ) }\ \ \ \ \ k=0,1,2,\cdots 2N-1\\ \frac{s}{j\Omega _{c}} & =e^{j\left ( \frac{\pi +2\pi k}{2N}\right ) }\\ s & =j\Omega _{c}\ e^{j\left ( \frac{\pi +2\pi k}{2N}\right ) }\\ & =\Omega _{c}\ e^{j\frac{\pi }{2}}e^{j\left ( \frac{\pi +2\pi k}{2N}\right ) }\\ & =\Omega _{c}\ e^{j\left ( \frac{\pi \left ( 1+2k+N\right ) }{2N}\right ) } \end{align*}

We only need to find the LHS poles, which are located at \(i=0\cdots N-1\), because these are the stable poles. Hence the \(i^{th}\) pole is \[ s_{i}=\Omega _{c}\ e^{j\left ( \frac{\pi \left ( 1+2i+N\right ) }{2N}\right ) }\] For example for \(i=0\), \(N=6\) we get\[ s_{0}=\Omega _{c}\ e^{j\left ( \frac{\pi \left ( 1+N\right ) }{2N}\right ) }=\Omega _{c}\ e^{j\left ( \frac{\pi 7}{12}\right ) }\] Now we can write the analog filter generated based on the above selected poles, which is, for impulse invariance\begin{equation} H_{a}\left ( s\right ) =\frac{T\ K}{{\displaystyle \prod \limits _{i=0}^{N-1}} \left ( s-s_{i}\right ) }\tag{3} \end{equation} \(K\) is found by solving \(H_{a}\left ( 0\right ) =T\)  hence\[ k={\displaystyle \prod \limits _{i=0}^{N-1}} \left ( -s_{i}\right ) \]

Now we need to write poles in non-polar form and plug them into (3)\[ s_{i}=\Omega _{c}\ e^{j\left ( \frac{\pi \left ( 1+2i+N\right ) }{2N}\right ) }=\Omega _{c}\left ( \cos \frac{\pi \left ( 1+2i+N\right ) }{2N}+j\sin \frac{\pi \left ( 1+2i+N\right ) }{2N}\right ) \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ i=0\cdots N-1 \] Hence, \begin{equation} H_{a}\left ( s\right ) =\frac{T\ K}{{\displaystyle \prod \limits _{i=0}^{N-1}} \left ( s-\Omega _{c}\left ( \cos \frac{\pi \left ( 1+2i+N\right ) }{2N}+j\sin \frac{\pi \left ( 1+2i+N\right ) }{2N}\right ) \right ) }\tag{4} \end{equation} Where \[ \Omega _{c}=\frac{\omega _{p}/T}{10^{\left ( \frac{1}{2N}\log _{10}\left ( 10^{-\frac{\delta _{p}}{10}}-1\right ) \right ) }}\] and\[ N=\left \lceil \frac{1}{2}\frac{\log \left [ 10^{-\frac{\delta _{p}}{10}}-1\right ] -\log \left [ 10^{-\frac{\delta _{s}}{10}}-1\right ] }{\log \left ( \omega _{p}\right ) -\log \left ( \omega _{s}\right ) }\right \rceil \] Now that we have found \(H\left ( s\right ) \) we need to convert it to \(H\left ( z\right ) \)

We need to make sure that we multiply poles of complex conjugates with each others to make the result simple to see.

Now that we have \(H_{a}\left ( s\right ) \), we do the \(A\rightarrow D\) conversion. I.e. obtain \(H\left ( z\right ) \) from the above \(H\left ( s\right ) \). When using impulse invariance, we need to perform partial fraction decomposition on (4) above in order to write \(H\left ( s\right ) \) in this form\[ H\left ( s\right ) ={\displaystyle \sum \limits _{i=0}^{N-1}} \frac{A_{i}}{s-s_{i}}\] For example, to obtain \(A_{j}\), we write\[ A_{j}=\lim _{s\rightarrow s_{j}}H_{a}\left ( s\right ) =\frac{T\ k}{{\displaystyle \prod \limits _{\substack{i=0\\i\neq j}}^{N-1}} \left ( s-s_{i}\right ) }\] Once we find all the \(A^{\prime }s\), we now write \(H\left ( z\right ) \) as follows\[ H\left ( z\right ) ={\displaystyle \sum \limits _{i=0}^{N-1}} \frac{A_{i}}{1-\exp \left ( s_{i}\ T\right ) z^{-1}}\] This completes the design. We can try to convert the above form of \(H\left ( z\right ) \) to a rational expression as \(H\left ( z\right ) =\frac{N\left ( z\right ) }{D\left ( z\right ) }\)

2.2 bilinear transformation method

We first convert analog specifications to digital specifications: \(\frac{F_{s}}{2\pi }=\frac{f_{p}}{\omega _{p}}\), hence \(\omega _{p}=2\pi \frac{f_{p}}{F_{s}}\) and \(\omega _{s}=2\pi \frac{f_{s}}{F_{s}}\)

Convert the criteria relative to the digital normalized scale:\begin{align*} 20\log \left \vert H\left ( e^{j\omega _{p}}\right ) \right \vert & \geq \delta _{p}\\ 20\log \left \vert H\left ( e^{j\omega _{s}}\right ) \right \vert & \leq \delta _{s} \end{align*}

Hence \begin{align} \left \vert H\left ( e^{j\omega _{p}}\right ) \right \vert & \geq 10^{\frac{\delta _{p}}{20}}\tag{A}\\ \left \vert H\left ( e^{j\omega _{s}}\right ) \right \vert & \leq 10^{\frac{\delta _{s}}{20}}\tag{B} \end{align}

Butterworth analog filter squared magnitude Fourier transform is given by\[ \left \vert H_{a}\left ( j\Omega \right ) \right \vert ^{2}=\frac{1}{1+\left ( \frac{j\Omega }{j\Omega _{c}}\right ) ^{2N}}\] hence equations (A) and (B) above are now written in terms of the analog Butterworth amplitude frequency response and become\begin{align*} \frac{1}{1+\left ( \frac{\Omega _{p}}{\Omega _{c}}\right ) ^{2N}} & \geq \left ( 10^{\frac{\delta _{p}}{20}}\right ) ^{2}=\ 10^{\frac{\delta _{p}}{10}}\\ \frac{1}{1+\left ( \frac{\Omega _{s}}{\Omega _{c}}\right ) ^{2N}} & \leq \left ( 10^{\frac{\delta _{s}}{20}}\right ) ^{2}=10^{\frac{\delta _{s}}{10}} \end{align*}

Now we assign values for \(\Omega _{p}\) and \(\Omega _{s}\) as follows,\(\Omega _{p}=\frac{2}{T}\tan \left ( \frac{\omega _{p}}{2}\right ) \), \(\Omega _{s}=\frac{2}{T}\tan \left ( \frac{\omega _{s}}{2}\right ) \)

\begin{align} 1+\left ( \frac{\frac{2}{T}\tan \left ( \frac{\omega _{p}}{2}\right ) }{\Omega _{c}}\right ) ^{2N} & \leq 10^{\frac{\delta _{p}}{10}}\tag{1}\\ 1+\left ( \frac{\frac{2}{T}\tan \left ( \frac{\omega _{s}}{2}\right ) }{\Omega _{c}}\right ) ^{2N} & \geq 10^{\frac{\delta _{s}}{10}}\tag{2} \end{align}

Change inequalities to equalities and simplify

\begin{align*} \left ( \frac{\frac{2}{T}\tan \left ( \frac{\omega _{p}}{2}\right ) }{\Omega _{c}}\right ) ^{2N} & =10^{\frac{\delta _{p}}{10}}-1\\ \left ( \frac{\frac{2}{T}\tan \left ( \frac{\omega _{s}}{2}\right ) }{\Omega _{c}}\right ) ^{2N} & =10^{\frac{\delta _{s}}{10}}-1 \end{align*}

Divide the above 2 equations\begin{align*} \left ( \frac{\tan \left ( \frac{\omega _{p}}{2}\right ) }{\tan \left ( \frac{\omega _{s}}{2}\right ) }\right ) ^{2N} & =\frac{10^{\frac{\delta _{p}}{10}}-1}{10^{\frac{\delta _{s}}{10}}-1}\\ 2N\left [ \log \left ( \tan \left ( \frac{\omega _{p}}{2}\right ) \right ) -\log \left ( \tan \left ( \frac{\omega _{s}}{2}\right ) \right ) \right ] & =\log \left ( 10^{\frac{\delta _{p}}{10}}-1\right ) -\log \left ( 10^{\frac{\delta _{s}}{10}}-1\right ) \\ N & =\frac{1}{2}\frac{\log \left ( 10^{\frac{\delta _{p}}{10}}-1\right ) -\log \left ( 10^{\frac{\delta _{s}}{10}}-1\right ) }{\log \left ( \tan \left ( \frac{\omega _{p}}{2}\right ) \right ) -\log \left ( \tan \left ( \frac{\omega _{s}}{2}\right ) \right ) } \end{align*}

We need to round the above to then nearest integer using the Ceiling function. i.e. \(N=\) \(\left \lceil N\right \rceil \)

Now for bilinear transformation we used equation (2) above to find \(\Omega _{c}\) Hence we now solve for \(\Omega _{c}\)\begin{align*} 1+\left ( \frac{\frac{2}{T}\tan \left ( \frac{\omega _{s}}{2}\right ) }{\Omega _{c}}\right ) ^{2N} & =10^{\frac{\delta _{s}}{10}}\\ 2N\left ( \log _{10}\frac{\frac{2}{T}\tan \left ( \frac{\omega _{s}}{2}\right ) }{\Omega _{c}}\right ) & =\log _{10}\left ( 10^{\frac{\delta _{s}}{10}}-1\right ) \\ \log _{10}\frac{\frac{2}{T}\tan \left ( \frac{\omega _{s}}{2}\right ) }{\Omega _{c}} & =\frac{1}{2N}\log _{10}\left ( 10^{\frac{\delta _{s}}{10}}-1\right ) \\ \frac{\frac{2}{T}\tan \left ( \frac{\omega _{s}}{2}\right ) }{\Omega _{c}} & =10^{\left ( \frac{1}{2N}\log _{10}\left ( 10^{\frac{\delta _{s}}{10}}-1\right ) \right ) }\\ \Omega _{c} & =\frac{\frac{2}{T}\tan \left ( \frac{\omega _{s}}{2}\right ) }{10^{\left ( \frac{1}{2N}\log _{10}\left ( 10^{\frac{\delta _{s}}{10}}-1\right ) \right ) }} \end{align*}

Now that we found \(N\) and \(\Omega _{c}\) we find the poles of \(H\left ( s\right ) \). Since for bilinear the magnitude square of the transfer function is\[ \left \vert H_{a}\left ( s\right ) \right \vert ^{2}=\frac{1}{1+\left ( \frac{s}{j\Omega _{c}}\right ) ^{2N}}\] Hence \(H\left ( s\right ) \) poles are found by setting the denominator of the above to zero \begin{align*} 1+\left ( \frac{s}{j\Omega _{c}}\right ) ^{2N} & =0\\ \left ( \frac{s}{j\Omega _{c}}\right ) ^{2N} & =-1\\ & =e^{j\left ( \pi +2\pi k\right ) }\ \ \ \ \ k=0,1,2,\cdots 2N-1\\ \frac{s}{j\Omega _{c}} & =e^{j\left ( \frac{\pi +2\pi k}{2N}\right ) }\\ s & =j\Omega _{c}\ e^{j\left ( \frac{\pi +2\pi k}{2N}\right ) }\\ & =\Omega _{c}\ e^{j\frac{\pi }{2}}e^{j\left ( \frac{\pi +2\pi k}{2N}\right ) }\\ & =\Omega _{c}\ e^{j\left ( \frac{\pi \left ( 1+2k+N\right ) }{2N}\right ) } \end{align*}

We only need to find the LHS poles, which are located at \(i=0\cdots N-1\), because these are the stable poles. Hence the \(i^{th}\) pole is \[ s_{i}=\Omega _{c}\ e^{j\left ( \frac{\pi \left ( 1+2i+N\right ) }{2N}\right ) }\] For example for \(i=0\), \(N=6\) we get\[ s_{0}=\Omega _{c}\ e^{j\left ( \frac{\pi \left ( 1+N\right ) }{2N}\right ) }=\Omega _{c}\ e^{j\left ( \frac{\pi 7}{12}\right ) }\] For bilinear, \(H(s)\) is given by\begin{equation} H_{a}\left ( s\right ) =\frac{K}{{\displaystyle \prod \limits _{i=0}^{N-1}} \left ( s-s_{i}\right ) }\tag{3} \end{equation} \(K\) is found by solving \(H_{a}\left ( 0\right ) =1\), hence we obtain\[ k={\displaystyle \prod \limits _{i=0}^{N-1}} \left ( -s_{i}\right ) \] We see that the same expression results for \(k\) for both cases.

Now we need to write poles in non-polar form and plug them into (3)\[ s_{i}=\Omega _{c}\ e^{j\left ( \frac{\pi \left ( 1+2i+N\right ) }{2N}\right ) }=\Omega _{c}\left ( \cos \frac{\pi \left ( 1+2i+N\right ) }{2N}+j\sin \frac{\pi \left ( 1+2i+N\right ) }{2N}\right ) \ \ \ \ \ \ i=0\cdots N-1 \] then\begin{equation} H_{a}\left ( s\right ) =\frac{\ K}{{\displaystyle \prod \limits _{i=0}^{N-1}} \left ( s-\Omega _{c}\left ( \cos \frac{\pi \left ( 1+2i+N\right ) }{2N}+j\sin \frac{\pi \left ( 1+2i+N\right ) }{2N}\right ) \right ) }\tag{4} \end{equation} Where \[ \Omega _{c}=\frac{\frac{2}{T}\tan \left ( \frac{\omega _{s}}{2}\right ) }{10^{\left ( \frac{1}{2N}\log _{10}\left ( 10^{\frac{\delta _{s}}{10}}-1\right ) \right ) }}\] and\[ N=\left \lceil \frac{1}{2}\frac{\log _{10}\left ( 10^{\frac{\delta _{p}}{10}}-1\right ) -\log _{10}\left ( 10^{\frac{\delta _{s}}{10}}-1\right ) }{\log _{10}\left ( \tan \left ( \frac{\omega _{p}}{2}\right ) \right ) -\log _{10}\left ( \tan \left ( \frac{\omega _{s}}{2}\right ) \right ) }\right \rceil \] Now that we have found \(H\left ( s\right ) \) we need to convert it to \(H\left ( z\right ) \). After finding \(H(s)\) as shown above, we simply replace \(s\) by \(\frac{2}{T}\frac{1-z^{-1}}{1+z^{-1}}\). This is much simpler than the impulse invariance method. Before doing this substitution, make sure to multiply poles which are complex conjugate of each others in the denominator of \(H(s)\). After this, then do the above substitution

2.3 Summary of analytical derivation method

We will now make a table with the derivation equations to follow to design in either bilinear or impulse invariance. Note that the same steps are used in both designs except for step \(5,6,8,13\). This table make it easy to develop a program.\[\begin{tabular} [c]{|l|l|l|l|}\hline step & Impulse invariance & common equation & bilinear\\\hline $1$ & & $\omega _{p}=2\pi \frac{f_{p}}{F_{s}}$ & \\\hline $2$ & & $\omega _{s}=2\pi \frac{f_{s}}{F_{s}}$ & \\\hline $3$ & & $\alpha _{p}=\frac{1}{10^{\frac{\delta _{p}}{10}}}$ & \\\hline $4$ & & $\alpha _{s}=\frac{1}{10^{\frac{\delta s}{10}}}$ & \\\hline $5$ & $\Omega _{p}=\frac{\omega _{p}}{T}$ & & $\frac{2}{T}\tan \left ( \frac{\omega _{p}}{2}\right ) $\\\hline $6$ & $\Omega _{s}=\frac{\omega _{s}}{T}$ & & $\frac{2}{T}\tan \left ( \frac{\omega _{s}}{2}\right ) $\\\hline $7$ & & $N=\left \lceil \frac{1}{2}\frac{\log \left [ \alpha _{p}-1\right ] -\log \left [ \alpha _{s}-1\right ] }{\log \left ( \Omega _{p}\right ) -\log \left ( \Omega _{s}\right ) }\right \rceil $ & \\\hline $8$ & $\Omega _{c}=\frac{\Omega _{p}}{10^{\left ( \frac{1}{2N}\log _{10}\left [ \alpha _{p}-1\right ] \right ) }}$ & & $\Omega _{c}=\frac{\Omega _{s}}{10^{\left ( \frac{1}{2N}\log _{10}\left [ \alpha _{s}-1\right ] \right ) }}$\\\hline $9$ & & poles of H(S)$\ s_{i}=\Omega _{c}\ e^{j\left ( \frac{\pi \left ( 1+2i+N\right ) }{2N}\right ) \ \ \ \ i=0\cdots N-1}$ & \\\hline $10$ & & $k={\displaystyle \prod \limits _{i=0}^{N-1}} \left ( -s_{i}\right ) $ & \\\hline $11$ & $H_{a}\left ( s\right ) =\frac{T\ K}{{\displaystyle \prod \limits _{i=0}^{N-1}} \left ( s-s_{i}\right ) }$ & & $H_{a}\left ( s\right ) =\frac{K}{{\displaystyle \prod \limits _{i=0}^{N-1}} \left ( s-s_{i}\right ) }$\\\hline & do partial fractions: & & \\\hline $12$ & $H_{a}\left ( s\right ) ={\displaystyle \sum \limits _{i=0}^{N-1}} \frac{A_{i}}{s-s_{i}}$ & & \\\hline $13$ & $H\left ( z\right ) ={\displaystyle \sum \limits _{i=0}^{N-1}} \frac{A_{i}}{1-\exp \left ( Ts_{i}\right ) z^{-1}}$ & & $H\left ( z\right ) =\left . H_{a}\left ( s\right ) \right \vert _{s=\frac{2}{T}\frac{1-z^{-1}}{1+z^{-1}}}$\\\hline \end{tabular} \ \ \ \]

3 Numerical design examples

3.1 Example 1

Sampling frequency \(F_{s}=20khz\), passband frequency \(f_{p}=2khz\), stopband frequency \(f_{s}=3khz\), with \(\delta _{p}\geq -1db\) and \(\delta _{stop}\leq -15db\)

3.1.1 using impulse invariance method (using T=1)

\[\begin{tabular} [c]{|l|l|}\hline step & Impulse invariance\\\hline $1$ & $\omega _{p}=2\pi \frac{f_{p}}{F_{s}}$ $\rightarrow \frac{2\pi \left ( 2000\right ) }{20000}\rightarrow \allowbreak 0.2\pi $\\\hline $2$ & $\omega _{s}=2\pi \frac{f_{s}}{F_{s}}\rightarrow \frac{2\pi \left ( 3000\right ) }{20000}\rightarrow \allowbreak 0.3\pi $\\\hline $3$ & $\alpha _{p}=\frac{1}{10^{\frac{\delta _{p}}{10}}}\rightarrow \frac{1}{10^{\frac{-1}{10}}}\rightarrow $ $1.\,\allowbreak 258\,9$\\\hline $4$ & $\alpha _{s}=\frac{1}{10^{\frac{\delta s}{10}}}\rightarrow \frac{1}{10^{\frac{-15}{10}}}\rightarrow $ $31.\,\allowbreak 623$\\\hline $5$ & $\Omega _{p}=\frac{\omega _{p}}{T}\rightarrow \frac{\omega _{p}}{1}\rightarrow 0.2\pi $\\\hline $6$ & $\Omega _{s}=\frac{\omega _{s}}{T}\rightarrow \frac{\allowbreak 0.3\pi }{1}\rightarrow \allowbreak 0.3\pi $\\\hline $7$ & $N=\left \lceil \frac{1}{2}\frac{\log \left [ \alpha _{p}-1\right ] -\log \left [ \alpha _{s}-1\right ] }{\log \left ( \Omega _{p}\right ) -\log \left ( \Omega _{s}\right ) }\right \rceil \rightarrow \frac{1}{2}\frac{\log _{10}\left ( 1.\,\allowbreak 258\,9-1\right ) -\log _{10}\left ( 31.\,\allowbreak 623-1\right ) }{\log _{10}\left ( 0.2\pi \right ) -\log _{10}\left ( 0.3\pi \right ) }\rightarrow $ $\left \lceil 5.\,\allowbreak 885\,9\right \rceil \rightarrow 6$\\\hline $8$ & $\Omega _{c}=\frac{\Omega _{p}}{10^{\left ( \frac{1}{2N}\log _{10}\left [ \alpha _{p}-1\right ] \right ) }}\rightarrow \frac{0.2\pi }{10^{\left ( \frac{1}{2\times 6}\log _{10}\left ( 1.\,\allowbreak 258\,9-1\right ) \right ) }}$ $\rightarrow 0.703\,21$\\\hline $9$ & poles of H(S)$\ s_{i}=\Omega _{c}\ e^{j\left ( \frac{\pi \left ( 1+2i+N\right ) }{2N}\right ) }\rightarrow s_{i}=0.703\,21\ e^{j\left ( \frac{\pi \left ( 7+2i\right ) }{12}\right ) }\ \ i=0\cdots 5$\\\hline & $s_{0}=-0.182\,+j0.679\,25\allowbreak ,s_{1}=-0.497\,24+j0.497\,24\allowbreak \allowbreak ,s_{2}=-0.679\,25+j0.182\,\allowbreak $\\\hline & $s_{3}=-0.679\,25-j0.182\,\allowbreak ,s_{4}=-0.497\,24-j0.497\,24\allowbreak ,s_{5}=$ $-0.182\,-j0.679\,25\allowbreak $\\\hline $10$ & $k={\displaystyle \prod \limits _{i=0}^{N-1}} \left ( -s_{i}\right ) \rightarrow \left ( 0.182\,-j0.679\,25\right ) \left ( 0.497\,24-j0.497\,24\right ) \left ( 0.679\,25-j0.182\,\allowbreak \right ) $\\\hline & $\left ( 0.679\,25+j0.182\right ) \left ( 0.497\,24+j0.497\,24\right ) \left ( 0.182\,+j0.679\,25\right ) \rightarrow \allowbreak 0.120\,92$\\\hline $11$ & $H_{a}\left ( s\right ) =\frac{T\ K}{{\displaystyle \prod \limits _{i=0}^{N-1}} \left ( s-s_{i}\right ) }\rightarrow $\\\hline & $\frac{1\times \allowbreak 0.120\,92}{\left ( s+0.182\,-j0.679\,25\right ) \left ( s+0.497\,24-j0.497\,24\right ) \left ( s+0.679\,25-j0.182\,\allowbreak \right ) \left ( s+0.679\,25+j0.182\right ) \left ( s+0.497\,24+j0.497\,24\right ) \left ( s+0.182\,+j0.679\,25\right ) }$\\\hline & $\rightarrow $multiply complex conjugates$\rightarrow \frac{\allowbreak 0.120\,92}{\left ( s^{2}+0.364\,s+0.494\,5\right ) \left ( s^{2}+0.994\,48s+0.494\,50\right ) \left ( s^{2}+1.\,\allowbreak 358\,5s+0.494\,5\right ) }$\\\hline & $\rightarrow \frac{\allowbreak 0.120\,92}{s^{6}+2.\,\allowbreak 717\,0s^{5}+3.\,\allowbreak 691\,0s^{4}+3.\,\allowbreak 178\,9\allowbreak s^{3}+1.\,\allowbreak 825\,2s^{2}+0.664\,38\allowbreak s+0.120\,92}$\\\hline $12$ & partial fraction $H_{a}\left ( s\right ) ={\displaystyle \sum \limits _{i=0}^{N-1}} \frac{A_{i}}{s-s_{i}}\rightarrow \frac{0.143\,54+j0.248\,61}{s+0.182\,-j0.679\,25}-\allowbreak \frac{1.\,\allowbreak 071\,4-j1.\,\allowbreak 166\,8\times 10^{-5}}{s+0.497\,24+j0.497\,24}+\frac{0.927\,85-j1.\,\allowbreak 607\,1}{s+0.679\,25-j0.182\,}\allowbreak $\\\hline & $+\frac{0.927\,85+j1.607\,1}{s+0.679\,25+j0.182\,}-\allowbreak \frac{1.071\,4+j1.166\,8\times 10^{-5}}{s+0.497\,24-j0.497\,24}+\frac{0.143\,54-j0.248\,61}{s+0.182\,+j0.679\,25}$\\\hline $13$ & $H\left ( z\right ) ={\displaystyle \sum \limits _{i=0}^{N-1}} \frac{A_{i}}{1-\exp \left ( Ts_{i}\right ) z^{-1}}\rightarrow \frac{0.143\,54+j0.248\,61}{1-\exp \left ( -0.182\,+j0.679\,25\right ) z^{-1}}-$\\\hline & $\frac{1.071\,4-j1.166\,8\times 10^{-5}}{1-\exp \left ( -0.497\,24-j0.497\,24\right ) z^{-1}}+ \frac{0.927\,85-j1.607\,1}{1-\exp \left ( -0.679\,25+j0.182\right ) \,}$\\\hline & \\\hline & $+\frac{0.927\,85+j1.607\,1}{1-\exp \left ( -0.679\,25-j0.182\right ) \,z^{-1}}-\frac{1. 071\,4+j1.166\,8\times 10^{-5}}{1-\exp \left ( -0.497\,24+j0.497\,24\right ) z^{-1}}+\frac{0.143\,54-j0.248\,61}{1-\exp \left ( -0.182\,-j0.679\,25\right ) z^{-1}}$\\\hline & $H\left ( z\right ) =\frac{0.143\,54+j0.248\,61}{1-(0.648\,58+j0.523\,68)z^{-1}}$ $-\frac{1. 071\,4-j1.166\,8\times 10^{-5}}{1-\left ( 0.534\,55-j0.290\,12\right ) z^{-1}}+\frac{0.927\,85-j1.607\,1}{1-\left ( 0.498\,62+j9. 176\,5\times 10^{-2}\right ) z^{-1}\,}$\\\hline & $+\frac{0.927\,85+j1.607\,1}{1-\left ( 0.498\,62-j9.176\,5\times 10^{-2}\right ) \,z^{-1}}-\frac{1.071\,4+j1.166\,8\times 10^{-5}}{1-\left ( 0.534\,55+j0.29012\right ) z^{-1}}$ $+\frac{0.143\,54-j0.248\,61}{1-\left ( 0.648\,58-j0.52368\right ) z^{-1}}$\\\hline \end{tabular} \ \ \ \ \ \ \]

3.1.2 bilinear method

Using the above design table, these are the numerical values: \(T=\frac{1}{F_{s}}=\frac{1}{20000}\)\[\begin{tabular} [c]{|l|l|}\hline step & Bilinear\\\hline $1$ & $\omega _{p}=2\pi \frac{f_{p}}{F_{s}}$ $\rightarrow \frac{2\pi \left ( 2000\right ) }{20000}\rightarrow \allowbreak 0.2\pi $\\\hline $2$ & $\omega _{s}=2\pi \frac{f_{s}}{F_{s}}\rightarrow \frac{2\pi \left ( 3000\right ) }{20000}\rightarrow \allowbreak 0.3\pi $\\\hline $3$ & $\alpha _{p}=\frac{1}{10^{\frac{\delta _{p}}{10}}}\rightarrow \frac{1}{10^{\frac{-1}{10}}}\rightarrow $ $1.\,\allowbreak 258\,9$\\\hline $4$ & $\alpha _{s}=\frac{1}{10^{\frac{\delta s}{10}}}\rightarrow \frac{1}{10^{\frac{-15}{10}}}\rightarrow $ $31.\,\allowbreak 623$\\\hline $5$ & $\Omega _{p}=\frac{2}{T}\tan \left ( \frac{\omega _{p}}{2}\right ) \rightarrow 2\times 20000\tan \left ( \frac{0.2\pi }{2}\right ) \rightarrow $ $12997$\\\hline $6$ & $\Omega _{s}=\frac{2}{T}\tan \left ( \frac{\omega _{s}}{2}\right ) \rightarrow 2\times 20000\tan \left ( \frac{\allowbreak 0.3\pi }{2}\right ) \rightarrow \allowbreak 20381$\\\hline $7$ & $N=\left \lceil \frac{1}{2}\frac{\log \left [ \alpha _{p}-1\right ] -\log \left [ \alpha _{s}-1\right ] }{\log \left ( \Omega _{p}\right ) -\log \left ( \Omega _{s}\right ) }\right \rceil \rightarrow \frac{1}{2}\frac{\log _{10}\left ( 1.\,\allowbreak 258\,9-1\right ) -\log _{10}\left ( 31.\,\allowbreak 623-1\right ) }{\log _{10}\left ( 12997\right ) -\log _{10}\left ( 20381\right ) }\rightarrow $ $\left \lceil 5.\,\allowbreak 304\,8\right \rceil \rightarrow 6$\\\hline $8$ & $\Omega _{c}=\frac{\Omega _{s}}{10^{\left ( \frac{1}{2N}\log _{10}\left [ \alpha _{s}-1\right ] \right ) }}\rightarrow \frac{\allowbreak 20381}{10^{\left ( \frac{1}{2\times 6}\log _{10}\left ( 31.\,\allowbreak 623-1\right ) \right ) }}\rightarrow $ $15325.6$\\\hline $9$ & poles of H(S)$\ s_{i}=\Omega _{c}\ e^{j\left ( \frac{\pi \left ( 1+2i+N\right ) }{2N}\right ) }\rightarrow s_{i}=15325\ e^{j\left ( \frac{\pi \left ( 7+2i\right ) }{12}\right ) }\ \ i=0\cdots 5$\\\hline & $s_{0}=-3966.\,\allowbreak 4+j14803,s_{1}=-10836+j10836.,s_{2}=\allowbreak -14803+j3966.4$\\\hline & $s_{3}=-14803-j3966.4,s_{4}=-10836-j10836.,s_{5}=-3966.4-j14803$\\\hline $10$ & $k={\displaystyle \prod \limits _{i=0}^{N-1}} \left ( -s_{i}\right ) \rightarrow \left ( 3966.\,\allowbreak 4-j14803\right ) \left ( 10836-j10836\right ) \left ( 14803-j3966.4\allowbreak \,\allowbreak \,\allowbreak \right ) $\\\hline & $\left ( 14803+j3966.\,\allowbreak 4\allowbreak \right ) \left ( \allowbreak 10836+j10836\right ) \left ( 3966.4+j14803\right ) $\\\hline & $\rightarrow $ \ multiply complex conjugate terms\\\hline & $\rightarrow \left ( 2.\,\allowbreak 348\,6\times 10^{8}\right ) \left ( 2.\,\allowbreak 348\,4\times 10^{8}\right ) $ $\left ( 2.\,\allowbreak 348\,6\times 10^{8}\right ) $ $\rightarrow $ $1.\,\allowbreak 295\,4\times 10^{25}$\\\hline $11$ & $H_{a}\left ( s\right ) =\frac{K}{{\displaystyle \prod \limits _{i=0}^{N-1}} \left ( s-s_{i}\right ) }\rightarrow $\\\hline & $\frac{1.\,\allowbreak 295\,4\times 10^{25}}{\left ( s+3966.\,\allowbreak 4-j14803\right ) \left ( s+10836-j10836\right ) \left ( s+14803-j3966.4\allowbreak \right ) \left ( s+14803+j3966.\,\allowbreak 4\right ) \left ( s+10836+j10836\right ) \left ( s+3966.4+j14803\right ) }$\\\hline & $\rightarrow $ \ multiply complex conjugate\\\hline & $\frac{1.\,\allowbreak 295\,4\times 10^{25}}{\left ( s^{2}+7932.\,\allowbreak 8s+2.\,\allowbreak 348\,6\times 10^{8}\right ) \left ( s^{2}+21\,672s+234\,837\,792\right ) \left ( s^{2}+29606.s+2.\,\allowbreak 348\,6\times 10^{8}\right ) }$\\\hline & \\\hline & $\allowbreak =\frac{6257.\,\allowbreak 4s-1.\,\allowbreak 355\,8\times 10^{8}}{s^{2}+7932.\,\allowbreak 8s+2.\,\allowbreak 348\,6\times 10^{8}}-\allowbreak \frac{46702.s+5.\,\allowbreak 060\,4\times 10^{8}}{s^{2}+21672.s+2.\,\allowbreak 348\,4\times 10^{8}}+\allowbreak \frac{40445.s+8.\,\allowbreak 765\,4\times 10^{8}}{s^{2}+29606.s+2.\,\allowbreak 348\,6\times 10^{8}}\rightarrow $\\\hline & $\rightarrow \frac{1.\,\allowbreak 295\,4\times 10^{25}}{s^{6}+59211.s^{5}+1.\,\allowbreak 753\,0\times 10^{9}s^{4}+\allowbreak 3.\,\allowbreak 290\,2\times 10^{13}s^{3}+4.\,\allowbreak 116\,9\times 10^{17}\allowbreak s^{2}+3.\,\allowbreak 265\,8\times 10^{21}s+1.\,\allowbreak 295\,3\times 10^{25}\allowbreak }$\\\hline & \\\hline $12$ & $\allowbreak $\\\hline & \\\hline $13$ & $H\left ( z\right ) =\left . H_{a}\left ( s\right ) \right \vert _{s=\frac{2}{T}\frac{1-z^{-1}}{1+z^{-1}}}\rightarrow TODO$\\\hline & $\cdots $\\\hline \end{tabular} \ \ \ \ \]

3.2 Example 2

Sampling frequency \(F_{s}=10khz\), passband corner frequency \(f_{p}=1khz\), stopband corner frequency \(f_{s}=2khz\), with criteria \(\delta _{p}\geq -3db\) and \(\delta _{stop}\leq -10db\)

3.2.1 using impulse invariance method

\(T=1\)\[\begin{tabular} [c]{|l|l|}\hline step & Impulse invariance\\\hline $1$ & $\omega _{p}=2\pi \frac{f_{p}}{F_{s}}$ $\rightarrow \frac{2\pi \left ( 1000\right ) }{10000}\rightarrow \allowbreak 0.2\pi $\\\hline $2$ & $\omega _{s}=2\pi \frac{f_{s}}{F_{s}}\rightarrow \frac{2\pi \left ( 2000\right ) }{10000}\rightarrow \allowbreak 0.4\pi $\\\hline $3$ & $\alpha _{p}=\frac{1}{10^{\frac{\delta _{p}}{10}}}\rightarrow \frac{1}{10^{\frac{-3}{10}}}\rightarrow $ $1.\,\allowbreak 995\,3$\\\hline $4$ & $\alpha _{s}=\frac{1}{10^{\frac{\delta s}{10}}}\rightarrow \frac{1}{10^{\frac{-10}{10}}}\rightarrow $ $10.0$\\\hline $5$ & $\Omega _{p}=\frac{\omega _{p}}{T}\rightarrow \frac{\omega _{p}}{1}\rightarrow 0.2\pi $\\\hline $6$ & $\Omega _{s}=\frac{\omega _{s}}{T}\rightarrow \frac{\allowbreak \allowbreak 0.4\pi }{1}\rightarrow \allowbreak 0.4\pi $\\\hline $7$ & $N=\left \lceil \frac{1}{2}\frac{\log \left [ \alpha _{p}-1\right ] -\log \left [ \alpha _{s}-1\right ] }{\log \left ( \Omega _{p}\right ) -\log \left ( \Omega _{s}\right ) }\right \rceil \rightarrow \frac{1}{2}\frac{\log _{10}\left ( 1.\,\allowbreak 995\,3-1\right ) -\log _{10}\left ( 10.0-1\right ) }{\log _{10}\left ( 0.2\pi \right ) -\log _{10}\left ( 0.4\pi \right ) }\rightarrow $ $1.\,\allowbreak 588\,4\rightarrow $ $2$\\\hline $8$ & $\Omega _{c}=\frac{\Omega _{p}}{10^{\left ( \frac{1}{2N}\log _{10}\left [ \alpha _{p}-1\right ] \right ) }}\rightarrow \frac{0.2\pi }{10^{\left ( \frac{1}{2\times 2}\log _{10}\left ( 1.\,\allowbreak 995\,3-1\right ) \right ) }}\rightarrow $ $0.629\,06$\\\hline $9$ & poles of H(S)$\ s_{i}=\Omega _{c}\ e^{j\left ( \frac{\pi \left ( 1+2i+N\right ) }{2N}\right ) }\rightarrow s_{i}=0.629\,06\ e^{j\left ( \frac{\pi \left ( 3+2i\right ) }{4}\right ) }\ \ i=0\cdots 1$\\\hline & $s_{0}=-0.444\,81+j0.444\,81\allowbreak ,s_{1}=-0.444\,81-j0.444\,81\allowbreak $\\\hline & \\\hline $10$ & $k={\displaystyle \prod \limits _{i=0}^{N-1}} \left ( -s_{i}\right ) \rightarrow \left ( 0.444\,81-j0.444\,81\right ) \left ( 0.444\,81+j0.444\,81\allowbreak \right ) \rightarrow \allowbreak 0.395\,71$\\\hline & \\\hline $11$ & $H_{a}\left ( s\right ) =\frac{T\ K}{{\displaystyle \prod \limits _{i=0}^{N-1}} \left ( s-s_{i}\right ) }\rightarrow \frac{\allowbreak 0.395\,71}{\left ( s+0.444\,81-j0.444\,81\right ) \left ( s+0.444\,81+j0.444\,81\allowbreak \right ) }\rightarrow \frac{\allowbreak 0.395\,71}{s^{2}+0.889\,62s+0.395\,71}$\\\hline & \\\hline $12$ & partial fraction $H_{a}\left ( s\right ) ={\displaystyle \sum \limits _{i=0}^{N-1}} \frac{A_{i}}{s-s_{i}}\rightarrow \allowbreak \frac{0.444\,81j}{s+0.444\,81+0.444\,81j}-\frac{\allowbreak 0.444\,81j}{s+0.444\,81-0.444\,81j}\allowbreak $\\\hline & $\rightarrow \allowbreak \frac{0.245\,35z}{z^{2}-1.\,\allowbreak 157\,2z+0.410\,81}$\\\hline $13$ & $H\left ( z\right ) ={\displaystyle \sum \limits _{i=0}^{N-1}} \frac{A_{i}}{1-\exp \left ( Ts_{i}\right ) z^{-1}}\rightarrow \frac{\allowbreak 0.444\,81i}{1-\exp \left ( -0.444\,81-j0.444\,81\right ) z^{-1}}-\allowbreak \frac{0.444\,81i}{1-\exp \left ( -0.444\,81+j0.444\,81\right ) z^{-1}}\allowbreak $\\\hline & \\\hline \end{tabular} \ \ \ \ \ \ \]

3.2.2 Using bilinear

\(T=\frac{1}{10000}\)\[\begin{tabular} [c]{|l|l|}\hline step & Impulse invariance\\\hline $1$ & $\omega _{p}=2\pi \frac{f_{p}}{F_{s}}$ $\rightarrow \frac{2\pi \left ( 1000\right ) }{10000}\rightarrow \allowbreak 0.2\pi $\\\hline $2$ & $\omega _{s}=2\pi \frac{f_{s}}{F_{s}}\rightarrow \frac{2\pi \left ( 2000\right ) }{10000}\rightarrow \allowbreak 0.4\pi $\\\hline $3$ & $\alpha _{p}=\frac{1}{10^{\frac{\delta _{p}}{10}}}\rightarrow \frac{1}{10^{\frac{-3}{10}}}\rightarrow $ $1.\,\allowbreak 995\,3$\\\hline $4$ & $\alpha _{s}=\frac{1}{10^{\frac{\delta s}{10}}}\rightarrow \frac{1}{10^{\frac{-10}{10}}}\rightarrow $ $10.0$\\\hline $5$ & $\Omega _{p}=\frac{2}{T}\tan \left ( \frac{\omega _{p}}{2}\right ) \rightarrow 2\times 10000\tan \left ( \frac{0.2\pi }{2}\right ) \rightarrow $ $6498.\,\allowbreak 4$\\\hline $6$ & $\Omega _{s}=\frac{2}{T}\tan \left ( \frac{\omega _{s}}{2}\right ) \rightarrow 2\times 10000\tan \left ( \frac{0.4\pi }{2}\right ) \rightarrow 14531.$\\\hline $7$ & $N=\left \lceil \frac{1}{2}\frac{\log \left [ \alpha _{p}-1\right ] -\log \left [ \alpha _{s}-1\right ] }{\log \left ( \Omega _{p}\right ) -\log \left ( \Omega _{s}\right ) }\right \rceil \rightarrow \frac{1}{2}\frac{\log _{10}\left ( 1.\,\allowbreak 995\,3-1\right ) -\log _{10}\left ( 10.0-1\right ) }{\log _{10}\left ( 6498.\,\allowbreak 4\right ) -\log _{10}\left ( 14531.\right ) }\rightarrow $ $1.\,\allowbreak 368\,1$ $\rightarrow 2$\\\hline $8$ & $\Omega _{c}=\frac{\Omega _{s}}{10^{\left ( \frac{1}{2N}\log _{10}\left [ \alpha _{s}-1\right ] \right ) }}\rightarrow \frac{14531}{10^{\left ( \frac{1}{2\times 2}\log _{10}\left ( 10.0-1\right ) \right ) }}\rightarrow $ $8389.\,\allowbreak 5$\\\hline $9$ & poles of H(S)$\ s_{i}=\Omega _{c}\ e^{j\left ( \frac{\pi \left ( 1+2i+N\right ) }{2N}\right ) }\rightarrow s_{i}=8389.\,\allowbreak 5\ e^{j\left ( \frac{\pi \left ( 3+2i\right ) }{4}\right ) }\ \ i=0\cdots 1$\\\hline & $s_{0}=-5932.\,\allowbreak 3+j5932.\,\allowbreak 3\allowbreak \allowbreak ,s_{1}=-5932.\,\allowbreak 3-j5932.\,\allowbreak 3\allowbreak $\\\hline & \\\hline $10$ & $k={\displaystyle \prod \limits _{i=0}^{N-1}} \left ( -s_{i}\right ) \rightarrow \left ( 5932.\,\allowbreak 3-j5932.\,\allowbreak 3\right ) \left ( 5932.\,\allowbreak 3+j5932.\,\allowbreak 3\allowbreak \right ) \rightarrow \allowbreak 7.\,\allowbreak 038\,4\times 10^{7}$\\\hline & \\\hline $11$ & $H_{a}\left ( s\right ) =\frac{K}{{\displaystyle \prod \limits _{i=0}^{N-1}} \left ( s-s_{i}\right ) }\rightarrow \frac{7.\,\allowbreak 038\,4\times 10^{7}}{\left ( s+5932.\,\allowbreak 3-i5932.\,\allowbreak 3\right ) \left ( s+5932.\,\allowbreak 3+i5932.\,\allowbreak 3\allowbreak \allowbreak \right ) }$\\\hline $12$ & $\rightarrow $ $\frac{7.\,\allowbreak 038\,4\times 10^{7}}{s^{2}+11865.s+7.\,\allowbreak 038\,4\times 10^{7}}$\\\hline $13$ & $H\left ( z\right ) =\left . H_{a}\left ( s\right ) \right \vert _{s=\frac{2}{T}\frac{1-z^{-1}}{1+z^{-1}}}\rightarrow \frac{\allowbreak 0.09945\,9z^{2}+0.198\,92z+0.09945\,9}{z^{2}-0.931\,56z+0.329\,38}$\\\hline & $\allowbreak $\\\hline \end{tabular} \ \ \ \ \ \]

Mathematica GUI program is written to implement the above. It can be downloaded from here

Also a Matlab script nma_filter.m.txt was written (no GUI) to implement this design.

This script (written on Matlab 2007a). This script does not handle the conversion from H(s) to H(z) well yet, need to work more on this... ofcourse, one can just use Matlab butter() function for this.

Example output of the above Matlab script is matlab_output.txt

4 IIR design for minmum order filter

This is another small note on IIR design for minmum order filter.

This document describes how to design an IIR digital filter given a specification in which the filter order is specified.

Given the following digram, the specifications for the design will be

1.
Digital filter order (N)
2.
\(f_{pass}\), the passband corner frequency (or the cutoff frequency) at \(-3db\). This means \(A_{pass}=-3db\)

pict

4.1 Impulse invariance method

We first convert analog specifications to digital specifications: \(\frac{F_{s}}{2\pi }=\frac{f_{pass}}{\omega _{p}}\), hence \(\omega _{p}=2\pi \frac{f_{pass}}{F_{s}}\)

Then the cutoff frequency \(\Omega _{c}=\frac{\omega _{p}}{T}\) for impulse invariance.

Next find the poles of \(H\left ( s\right ) .\) Since the butterworth magnitude square of the transfer function is \[ \left \vert H_{a}\left ( s\right ) \right \vert ^{2}=\frac{T^{2}}{1+\left ( \frac{s}{j\Omega _{c}}\right ) ^{2N}}\] Hence \(H\left ( s\right ) \) poles are found by setting the denominator of the above to zero

\[ 1+\left ( \frac{s}{j\Omega _{c}}\right ) ^{2N}=0 \]

And as I did in the earlier document, the poles of \(H\left ( s\right ) \,\) are found at

\[ s=\Omega _{c}\ e^{j\left ( \frac{\pi \left ( 1+2k+N\right ) }{2N}\right ) }\]

We only need to find the LHS poles, which are located at \(i=0\cdots N-1\), because these are the stable poles. Hence the \(i^{th}\) pole is \[ s_{i}=\Omega _{c}\ e^{j\left ( \frac{\pi \left ( 1+2i+N\right ) }{2N}\right ) }\]

Now we can write the analog filter generated based on the above selected poles, which is, for impulse invariance\begin{equation} H_{a}\left ( s\right ) =\frac{T\ K}{{\displaystyle \prod \limits _{i=0}^{N-1}} \left ( s-s_{i}\right ) }\tag{3} \end{equation} \(K\) is found by solving \(H_{a}\left ( 0\right ) =T\)  hence\[ k={\displaystyle \prod \limits _{i=0}^{N-1}} \left ( -s_{i}\right ) \]

Now we need to write poles in non-polar form and plug them into (3)\[ s_{i}=\Omega _{c}\ e^{j\left ( \frac{\pi \left ( 1+2i+N\right ) }{2N}\right ) }=\Omega _{c}\left ( \cos \frac{\pi \left ( 1+2i+N\right ) }{2N}+j\sin \frac{\pi \left ( 1+2i+N\right ) }{2N}\right ) \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ i=0\cdots N-1 \] Hence, \begin{equation} H_{a}\left ( s\right ) =\frac{T\ K}{{\displaystyle \prod \limits _{i=0}^{N-1}} \left ( s-\Omega _{c}\left ( \cos \frac{\pi \left ( 1+2i+N\right ) }{2N}+j\sin \frac{\pi \left ( 1+2i+N\right ) }{2N}\right ) \right ) }\tag{4} \end{equation} Now that we have found \(H\left ( s\right ) \) we need to convert it to \(H\left ( z\right ) \)

We need to make sure that we multiply poles of complex conjugates with each others to make the result simple to see.

Now that we have \(H_{a}\left ( s\right ) \), we do the \(A\rightarrow D\) conversion. I.e. obtain \(H\left ( z\right ) \) from the above \(H\left ( s\right ) \). When using impulse invariance, we need to perform partial fraction decomposition on (4) above in order to write \(H\left ( s\right ) \) in this form\[ H\left ( s\right ) ={\displaystyle \sum \limits _{i=0}^{N-1}} \frac{A_{i}}{s-s_{i}}\] For example, to obtain \(A_{j}\), we write\[ A_{j}=\lim _{s\rightarrow s_{j}}H_{a}\left ( s\right ) =\frac{T\ k}{{\displaystyle \prod \limits _{\substack{i=0\\i\neq j}}^{N-1}} \left ( s-s_{i}\right ) }\] Once we find all the \(A^{\prime }s\), we now write \(H\left ( z\right ) \) as follows\[ H\left ( z\right ) ={\displaystyle \sum \limits _{i=0}^{N-1}} \frac{A_{i}}{1-\exp \left ( s_{i}\ T\right ) z^{-1}}\] This completes the design. We can try to convert the above form of \(H\left ( z\right ) \) to a rational expression as \(H\left ( z\right ) =\frac{N\left ( z\right ) }{D\left ( z\right ) }\)

4.2 bilinear transformation method

We first convert analog specifications to digital specifications: \(\frac{F_{s}}{2\pi }=\frac{f_{pass}}{\omega _{p}}\), hence \(\omega _{p}=2\pi \frac{f_{pass}}{F_{s}}\)

Now \(\Omega _{c}\) \(=\frac{2}{T}\tan \left ( \frac{\omega _{p}}{2}\right ) \)

Now that we have \(N\) and \(\Omega _{c}\) we find the poles of \(H\left ( s\right ) \). Since for bilinear the magnitude square of the transfer function is\[ \left \vert H_{a}\left ( s\right ) \right \vert ^{2}=\frac{1}{1+\left ( \frac{s}{j\Omega _{c}}\right ) ^{2N}}\] Hence \(H\left ( s\right ) \) poles are found by setting the denominator of the above to zero \[ 1+\left ( \frac{s}{j\Omega _{c}}\right ) ^{2N}=0 \]

Which leads to poles at \(s_{i}=\Omega _{c}\ e^{j\left ( \frac{\pi \left ( 1+2i+N\right ) }{2N}\right ) }\). We only need to find the LHS poles, which are located at \(i=0\cdots N-1\), because these are the stable poles. For bilinear, \(H(s)\) is given by\begin{equation} H_{a}\left ( s\right ) =\frac{K}{{\displaystyle \prod \limits _{i=0}^{N-1}} \left ( s-s_{i}\right ) }\tag{3} \end{equation} \(K\) is found by solving \(H_{a}\left ( 0\right ) =1\), hence we obtain\[ k={\displaystyle \prod \limits _{i=0}^{N-1}} \left ( -s_{i}\right ) \] We see that the same expression results for \(k\) for both cases.

Now we need to write poles in non-polar form and plug them into (3)\[ s_{i}=\Omega _{c}\ e^{j\left ( \frac{\pi \left ( 1+2i+N\right ) }{2N}\right ) }=\Omega _{c}\left ( \cos \frac{\pi \left ( 1+2i+N\right ) }{2N}+j\sin \frac{\pi \left ( 1+2i+N\right ) }{2N}\right ) \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ i=0\cdots N-1 \] then\begin{equation} H_{a}\left ( s\right ) =\frac{\ K}{{\displaystyle \prod \limits _{i=0}^{N-1}} \left ( s-\Omega _{c}\left ( \cos \frac{\pi \left ( 1+2i+N\right ) }{2N}+j\sin \frac{\pi \left ( 1+2i+N\right ) }{2N}\right ) \right ) }\tag{4} \end{equation} Now that we have found \(H\left ( s\right ) \) we need to convert it to \(H\left ( z\right ) \). After finding \(H(s)\) as shown above, we simply replace \(s\) by \(\frac{2}{T}\frac{1-z^{-1}}{1+z^{-1}}\). This is much simpler than the impulse invariance method. Before doing this substitution, make sure to multiply poles which are complex conjugate of each others in the denominator of \(H(s)\). After this, then do the above substitution

5 References

1.
Alan Oppenheim, Ronald Schafer, Digital Signal Processing,  Prentice-Hall, inc. 1975, Chapter 5.
2.
Mostafa Shiva, Electrical engineering department, California state university, Fullerton, Lecture notes, handout H.
3.
John Proakis, Dimitris Manolakis, digital signal processing, 3rd edition, section 8.3.