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 — Thursday January 12, 2017 at 08:14 PM

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





Fs  The sampling frequency in Hz


fc  The passband cutoff frequency in Hz


fs  The stopband corner frequency in Hz


δ
 p  The attenuation in db at f
 c


δs  The attenuation in db at fs


This diagram below illustrates these specifications

pict

The frequency specifications are in Hz  and they must be first converted to digital frequencies ω  where 0 ≤ |ω | ≤ π  before using the attenuation specifications, The sampling frequency Fs  is used to do this conversion since Fs  corresponds to 2π  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 Ωc  and N  (the filter order)
  3. Using Ω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: F    fp
2sπ = ωp  , hence        fp
ωp = 2π Fs  and        f
ωs = 2πFss

Convert the criteria relative to the digital normalized scale:

pict

Therefore

pict

Notice that we added the T  scaling factor. Now, Butterworth analog filter squared magnitude Fourier transform is given by

        2   ----T2-----
|Ha (jΩ )|=     ( jΩ )2N
            1+  jΩc

hence equations (A) and (B) above are now written in terms of the analog Butterworth amplitude frequency response and become

pict

Therefore the above becomes

pict

Now, for impulse invariance, Ω  = ωp
  p   T   and Ω  = ωs
 s   T  .  

pict

Change inequalities to equalities and simplify

pict

Divide the above 2 equations

pict

We need to round the above to then nearest integer using the Ceiling function N =  ⌈N ⌉

Now for impulse invariance method, use equation (1) above to solve for Ωc

pict

Now that we found N  and Ωc  , next find the poles of H (s)  Since the butterworth magnitude square of the transfer function is

                2
|Ha(s)|2 = ---(T--)---
          1+   -s- 2N
               jΩc

Hence H (s)  poles are found by setting the denominator of the above to zero

pict

We only need to find the LHS poles, which are located at i = 0⋅⋅⋅N − 1  , because these are the stable poles. Hence the  th
i  pole is

       j(π(1+2i+N-))
si = Ωc e   2N

For example for i = 0  , N  = 6  we get

         (π(1+N))       (π7)
s0 = Ωc ej   2N    = Ωc ej 12

Now we can write the analog filter generated based on the above selected poles, which is, for impulse invariance

            T K
Ha (s) = N-−1-----
         ∏  (s− s )
         i=0      i
(3)

K  is found by solving Ha (0) = T   hence

   N∏−1
k =    (− si)
    i=0

Now we need to write poles in non-polar form and plug them into (3)

                       (                                  )
        j(π(1+22Ni+N))         π-(1+-2i+-N-)      π-(1-+-2i+N-)
si = Ωc e          = Ωc cos     2N      + jsin      2N                    i = 0⋅⋅⋅N − 1

Hence,

                          T K
Ha(s) = N−1-------------------------------------
        ∏  (s − Ω (cos π(1+2i+N-)+ jsin π(1+2i+N)))
        i=0      c       2N             2N
(4)

Where

    --------ωp∕T-------
Ωc =  ( 1-log (10− δ1p0−1))
    10  2N   10

and

    ⌊     [  − δp  ]     [  − δs-   ]⌋
    | 1log-10-10 −-1-−-log-10--10-−-1-|
N = || 2       log (ωp) − log(ωs)       ||

Now that we have found H (s)  we need to convert it to H (z)

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  (s)
 a  , we do the A → D  conversion. I.e. obtain H (z)  from the above H (s)  . When using impulse invariance, we need to perform partial fraction decomposition on (4) above in order to write H (s)  in this form

       N∑−1  A
H (s) =    ---i-
       i=0s − si

For example, to obtain Aj  , we write

                    T k
Aj = lsim→sjHa (s) = N−1-------
                 ∏  (s − si)
                 i=0
                 i⁄=j

Once we find all the   ′
A s  , we now write H (z)  as follows

       N−1
H (z) = ∑  -------Ai------
       i=01 − exp (si T)z−1

This completes the design. We can try to convert the above form of H (z)  to a rational expression as H (z) = N(z)-
        D(z)

2.2 bilinear transformation method

We first convert analog specifications to digital specifications: Fs   fp
2π = ωp  , hence        fp
ωp = 2π Fs  and        fs
ωs = 2πFs

Convert the criteria relative to the digital normalized scale:

pict

Hence

pict

Butterworth analog filter squared magnitude Fourier transform is given by

|Ha (jΩ )|2 = ---(-1-)---
            1+  -jΩ- 2N
                jΩc

hence equations (A) and (B) above are now written in terms of the analog Butterworth amplitude frequency response and become

pict

Now we assign values for Ωp  and Ωs  as follows,Ωp = 2T-tan (ω2p) , Ωs = 2T-tan (ω2s)

pict

Change inequalities to equalities and simplify

pict

Divide the above 2 equations

pict

We need to round the above to then nearest integer using the Ceiling function. i.e. N =  ⌈N ⌉

Now for bilinear transformation we used equation (2) above to find Ωc  Hence we now solve for Ωc

pict

Now that we found N  and Ωc  we find the poles of H (s)  . Since for bilinear the magnitude square of the transfer function is

|H (s)|2 = -----1-----
  a       1+ ( -s)2N
               jΩc

Hence H (s)  poles are found by setting the denominator of the above to zero

pict

We only need to find the LHS poles, which are located at i = 0⋅⋅⋅N − 1  , because these are the stable poles. Hence the  th
i  pole is

        (π(1+2i+N-))
si = Ωc ej   2N

For example for i = 0  , N  = 6  we get

         (π(1+N))       (π7)
s0 = Ωc ej   2N    = Ωc ej 12

For bilinear, H(s)  is given by

             K
Ha (s) = N-−1-----
         ∏  (s− s )
         i=0      i
(3)

K  is found by solving Ha (0) = 1  , hence we obtain

   N∏−1
k =    (− si)
    i=0

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)

        j(π(1+2i+N))     (    π(1 +2i+ N )       π(1+ 2i+ N ))
si = Ωc e   2N    = Ωc  cos-----2N----- +j sin ----2N------     i = 0 ⋅⋅⋅N − 1

then

                           K
Ha(s) = N−1-------------------------------------
        ∏  (s − Ω (cos π(1+2i+N-)+ jsin π(1+2i+N)))
        i=0      c       2N             2N
(4)

Where

              (  )
          2T tan ωs2
Ωc = --(-1----(--δs10--)-)
     10 2N log10 10 − 1

and

    ⌊       (  δp   )       (  δs   ) ⌋
    | 1log10-1010 −-1-−-log10-1010 −-1 |
N = || 2 log10(tan(ωp)) − log10(tan(ωs)) ||
                  2              2

Now that we have found H (s)  we need to convert it to H  (z)  . After finding H(s)  as shown above, we simply replace s  by 2-1−z−1
T 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.

|step--|Impulse-invariance-------|common--equation-------------------------|-bilinear----------------|
|-----|----------------------|-------fp-------------------------------|-----------------------|
|1----|----------------------|ωp-=-2πFfs-------------------------------|-----------------------|
|2----|----------------------|ωs-=-2πFss-------------------------------|-----------------------|
|3    |                      |αp = --1δp                               |                       |
|4----|----------------------|α--=-10110-------------------------------|-----------------------|
|-----|-----ωp---------------|--s--10δ1s0-------------------------------|-2----(ωp)-------------|
|5----|Ωp-=-Tωs---------------|----------------------------------------|-T2 tan-(2ωs)------------|
|6----|Ωs =-T----------------|-----⌈----------------⌉-----------------|-T tan-2---------------|
|7    |                      |N  =  12log[αlopg−(Ω1p])−−lologg[α(Ωss−)1]                  |                       |
|8----|Ω-=---(---Ωp[---])----|----------------------------------------|-Ω-=---(---Ωs----)-----|
|-----|-c---10-21N log10αp−1----|--------------------(-π(1+2i+N))----------|--c---10-12N log10[αs−1]----|
|9    |                      |poles of H (S) si = Ωc ej-2N-   i=0⋅⋅⋅N−1 |                       |
|-----|----------------------|----N∏−1---------------------------------|-----------------------|
|10   |                      |k =     (− si)                            |                       |
|-----|----------------------|----i=0---------------------------------|-----------------------|
|11   |Ha (s) = N−T1-K---      |                                        | Ha(s) = N−1K----      |
|     |        ∏  (s− si)      |                                        |         ∏  (s−si)      |
|-----|--------i=0-----------|----------------------------------------|---------i=0-----------|
|-----|do partial-fractions:----|----------------------------------------|-----------------------|
|     |       N∑−1           |                                        |                       |
|12   |Ha (s) =    sA−isi       |                                        |                       |
|-----|--------i=0------------|----------------------------------------|-----------------------|
|     |       N∑−1-----Ai---- |                                        |                       |
|13   |H (z) =   1−exp(Tsi)z−1 |                                        | H (z) = Ha (s)|s= 2T 11−+z−z−11|
--------------i=0------------------------------------------------------------------------------

3 Numerical design examples

3.1 Example 1

Sampling frequency Fs = 20khz  , passband frequency fp = 2khz  , stopband frequency fs = 3khz  , with δp ≥ − 1db  and δstop ≤ − 15db

3.1.1 using impulse invariance method (using T=1)
|step--|Impulse-invariance----------------------------------------------------------------------|
|-----|-------fp---2π(2000)-------------------------------------------------------------------|
|1----|ωp =-2π-Fs →-22π(03000000)-→-0.2π------------------------------------------------------------|
|2----|ωs =-2π-fsFs →-20000-→--0.3π-------------------------------------------------------------|
|3    |αp = -1δp-→  -1−1-→  1.2589                                                             |
|4----|α-=--10110-→--10110--→-31.623-------------------------------------------------------------|
|-----|-s---10ωδ1ps0--ω1p0−1105---------------------------------------------------------------------|
|5----|Ωp-=-T-→--1-→--0.2π-------------------------------------------------------------------|
|6----|Ωs =-⌈ωTs→-0.31π→--0.3π--⌉---------------------------------------------------------------|
|7    |N =  12log[loαgp(−Ω1)]−−llogog[(αΩs−)1]  → 12log10(1lo.g258(90.−21π)−)−lloog1g0(3(01..63π2)3−1) → ⌈5.8859⌉ → 6                     |
|-----|------(---Ωpp----)s---(----0.2π--10---)---10-------------------------------------------|
|8----|Ωc =-10-21N log10[αp−1]-→-(1021×6log10)(1.2589−1)-→-0.7032(1----)----------------------------------|
|9    |poles of H(S) s = Ω ej π(1+22Ni+N) → s = 0.70321 ej π(71+22i)  i = 0⋅⋅⋅5                       |
|-----|s-=-−-0.182+-ij0.679c25,s-=-−-0.49724-i+-j0.49724,s--=-− 0.67925+-j0.182----------------------|
|-----|s0=-−-0.67925−-j0.182,s1=-−-0.49724-−-j0.49724,s2-=-− 0.182−-j0.67925----------------------|
|-----|-3-N-−1--------------4---------------------5-----------------------------------------|
|10   |k = ∏  (− si) → (0.182− j0.67925)(0.49724− j0.49724) (0.67925− j0.182)                    |
|-----|----i=0-------------------------------------------------------------------------------|
|-----|(0.67925+-j0.182)(0.49724-+-j0.49724)(0.182+-j0.67925)-→-0.12092----------------------------|
|11   |Ha (s) = N−T1-K---→                                                                    |
|     |        ∏                                                                            |
|     |           (s− si)                                                                     |
|-----|--------i=0---------------------------1×0.12092---------------------------------------|
|-----|(s+0.182−j0.67925)(s+0.49724−j0.49724)(s+0.67925−j0.182)(s+0.67902.5+12j009.2182)(s+0.49724+j0.49724)(s+0.182+j0.67925)-|
|-----|→multiply complex-conjug0a.1t2e09s→2-(s2+0.364s+0.4945)(s2+0.99448s+0.49450)(s2+1.3585s+0.4945)-------------|
|-----|→-s6+2.7170s5+3.6910s4+3.1789s3+1.8252s2+0.66438s+0.12092----------------------------------------|
|     |                     N∑−1-Ai-   0.14354+j0.24861-  1.0714−j1.1668×10−5   0.92785−j1.6071-        |
|12   |partial fraction Ha (s) =   s−si → s+0.182−j0.67925 − s+0.49724+j0.49724 +  s+0.67925− j0.182         |
|-----|--0.92785+j1.6071----1.0714i+=j01.1668×10−5--0.14354−-j0.24861---------------------------------------|
|-----|+s+0.67925+j0.182 −-s+0.49724−j0.49724-+-s+0.182+j0.67925--------------------------------------|
|     |       N∑−1-----Ai----   ----0.14354+j0.24861----                                         |
|13   |H (z) =   1−exp(Tsi)z−1 → 1−exp(−0.182+j0.67925)z−1−                                        |
|-----|---1.071i4−=0j1.1668×10−5---------0.92785−j1.6071-----------------------------------------------|
|-----|1−exp(−0.49724−j0.49724)z−1-+-1−exp(−0.67925+j0.182)--------------------------------------------|
|-----|----------------------------------------−5-------------------------------------------|
|-----|+1−exp0.(−9270.86759+2j51.−6j007.1182)z−1-−-1−ex1p.0(7−140+.4j9172.146+6j8×01.409724)z−1-+-1−-exp0.(1−4305.148−2−j0j.024.68769125)z−1-----------------|
|     |H (z) =---0.14354+j0.24861-−1 −--1.0714−j1.1668×10−5−1 + -----0.92785−j1.6071−2-−1-               |
|-----|-------10.−9(270.86548+5j18.+60j07.152368)z----11−.0(7014.5+34j515.1−6j60.8×219001−25)z-----1−0.(01.443958462−+jj0.924.1876615×10--)z------------------|
-------+1−(0.49862−j9.1765×10−2)z−1 −-1−-(0.53455+j0.29012)z−1-+-1−(0.64858−j0.52368)z−1----------------------

3.1.2 bilinear method

Using the above design table, these are the numerical values: T = 1F-=  201000
     s

|-step-|Bilinear------------------------------------------------------------------------|
|-----|-------fp---2π(2000)------------------------------------------------------------|
|-1---|ωp-=-2πFs-→-2π20(0300000)→--0.2π------------------------------------------------------|
|-2---|ωs-=-2πfFss-→--20000--→-0.3π------------------------------------------------------|
| 3   |αp = --1δp→  --1−1 → 1.2589                                                       |
|-4---|α--=-10110→--10110-→--31.623------------------------------------------------------|
|-----|--s--102δ1s0-(ω1p0)−1150------------(0.2π-)---------------------------------------------|
|-5---|Ωp-=-T-tan(-2)-→-2×-20000tan(--2-)→--12997--------------------------------------|
|-6---|Ωs-=-2T⌈-tan-ωs2-→--2×-200⌉00tan-0.23π--→-20381--------------------------------------|
| 7   |N  =  12log[αlopg−(Ω1])−−lologg[α(Ωs−)1] →  12log1l0(o1g.25(1892−9197))−−lologg10((321.0368231−)1)→  ⌈5.3048⌉ → 6               |
|-8---|Ω--=---(---Ωps----)s→---(---2038110---) →-1150325.6---------------------------------|
|-----|--c--10-12N-log10[αs−1]--(10-12×6log1)0(31.623−1)--------(-----)----------------------------|
| 9   |poles of H (S ) si = Ωc ej π(1+22iN+N) → si = 15325 ej π(71+22i) i = 0⋅⋅⋅5               |
|-----|s0-=-− 3966.4-+-j14803,s1 =-−-10836+-j10836.,s2 =-−-14803+-j3966.4-----------------|
|-----|s--=-− 14803−-j3966.4,s-=-−-10836−-j10836.,s-=-−-3966.4-− j14803------------------|
|-----|-3--N∏−1--------------4-------------------5-------------------------------------|
| 10  |k =     (− si) → (3966.4− j14803)(10836− j10836)(14803 − j3966.4)                  |
|-----|----i=0------------------------------------------------------------------------|
|-----|(14803+-j3966.4)(10836+-j10836)(3966.4+-j14803)----------------------------------|
|-----|→--m(ultiply-comp)l(ex-conjugate) te(rms------)---------------------------------------|
|-----|→---2.3486×-108--2.3484-×-108--2.3486-×108--→-1.2954×-1025------------------------|
| 11  |Ha (s) = N-−K1--- →                                                             |
|     |         ∏                                                                     |
|     |            (s−si)                                                               |
|-----|---------i=0------------------------1.2954×1025-----------------------------------|
|-----|-(s+3966.4−j14803)(s+10836−j10836)(s+14803−-j3966.4)(s+14803+j3966.4)(s+10836+j10836)(s+3966.4+j14803)-|
|-----|→--multiply-complex-conjugate--25------------------------------------------------|
|-----|-(s2+7932.8s+2.3486×108)(s2+211.269725s4×+12034837792)(s2+29606.s+2.3486×108)--------------------------|
|-----|-------------------------------------------------------------------------------|
|     |=  s26+25779.432s.−8s1+.325.5348×8160×8108-− s42+6270126.s72+.5s+.026.03448×410×8108 + s420+429456.0s+6.8s.+7625.344×861×08108 →                  |
|-----|→----------------------------1.2954×1025-----------------------------------------|
|-----|---s6+59211.s5+1.7530×109s4+3.2902×1013s3+4.1169×1017s2+3.2658×1021s+1.2953×1025---------------|
|-----|-------------------------------------------------------------------------------|
|-12--|-------------------------------------------------------------------------------|
|-----|-------------------------------------------------------------------------------|
|-13--|H-(z) =-Ha(s)|s=T21−1+z−z−11-→-T-ODO--------------------------------------------------|
-------⋅⋅⋅----------------------------------------------------------------------------

3.2 Example 2

Sampling frequency Fs = 10khz  , passband corner frequency fp = 1khz  , stopband corner frequency fs = 2khz  , with criteria δp ≥ − 3db  and δstop ≤ − 10db

3.2.1 using impulse invariance method

T = 1

|step-|-Impulse-invariance-------------------------------------------------------|
|----|--------fp----2π(1000)----------------------------------------------------|
|1---|-ωp =-2π-Fs →-2π1(00200000)-→-0.2π---------------------------------------------|
|2---|-ωs =-2π-fsFs-→--10000-→--0.4π----------------------------------------------|
|3   | αp = -1δp-→ --1−3 → 1.9953                                              |
|4---|-α-=--10110-→-10110-→--10.0------------------------------------------------|
|----|--s--10ωδ1ps0--ω1p0−1100------------------------------------------------------|
|5---|-Ωp =-T-→--1-→--0.2π----------------------------------------------------|
|6---|-Ωs =-⌈ωTs→-0.41π→--0.4π--⌉------------------------------------------------|
|7   | N =  12log[loαgp(Ω−1)]−−llogog[(αΩs−1)] →  12log10lo(1g.99(503.2−π1))−−lloogg10(0(1.04π.0)−1)→  1.5884 → 2          |
|----|-------(---Ωpp----)s---(----0.2π-10---)---10-----------------------------|
|8---|-Ωc =-10-21N log10[αp−1]-→-(1021×2log10)(1.9953−1)-→-0.6290(6----)-------------------|
|9   | poles of H(S) s = Ω ej π(1+22iN+N) → s = 0.62906 ej π(3+24i)  i = 0⋅⋅⋅1        |
|----|-s-=-− 0.44481i+-j0.4c4481,s-=-−-0.4448i1−-j0.44481-------------------------|
|----|--0---------------------1----------------------------------------------|
|----|----N-−1---------------------------------------------------------------|
|10  | k = ∏  (− si) → (0.44481 − j0.44481)(0.44481+ j0.44481) → 0.39571          |
|----|-----i=0----------------------------------------------------------------|
|----|-----------------------------------------------------------------------|
|11  | Ha(s) = N−T1-K---→  (s+0.44481−j0.4404.3819)5(s71+0.44481+j0.44481) → s2+0.808.3969257s1+0.39571   |
|    |         ∏                                                             |
|    |            (s−si)                                                      |
|----|---------i=0-----------------------------------------------------------|
|----|----------------------N∑−1----------------------------------------------|
|12  | partial fraction Ha (s) =   sA−is-→  s+0.4044.484148+10j.44481j − s+0.404.444814−801j.44481j        |
|----|----------------------i=0---i------------------------------------------|
|----|-→-z2−10.1.524752z3+5z0.41081------------------------------------------------------|
|    |        N∑−1                                                            |
|13  | H (z) =    1−exp(ATisi)z−1 → 1−exp(−0.404.4448148−1ji0.44481)z−1-− 1−exp(−0.404.4448148+1ji0.44481)z−1-|
|----|--------i=0------------------------------------------------------------|
------------------------------------------------------------------------------

3.2.2 Using bilinear

T = 101000

|----|--------------------------------------------------------------|
|step-|-Impulse-infpvarian2cπ(e1000)-------------------------------------------|
|1---|-ωp =-2π-Fs →-10000-→--0.2π-------------------------------------|
|2---|-ωs =-2πFfss-→-2π(102000000)→--0.4π-------------------------------------|
|3   | αp =--1δp → --1−3 → 1.9953                                     |
|----|-----10110---10110----------------------------------------------|
|4---|-αs =-10δ1s0-→(-10)−1100→-10.0------(---)----------------------------|
|5---|-Ωp =-2T tan(ωp2)-→-2-×-10000-tan-(0.22π)→-6498.4--------------------|
|6---|-Ωs =-⌈2T tan-ωs2-→-2-×100⌉00tan-0.42π-→--14531.--------------------|
|7   | N =  1log[αp−1]−log[αs−1] →  1log10(1.9953−-1)−log10(10.0−1)→  1.3681 → 2 |
|----|------2(-log(ΩΩps)−log()Ωs)---(--214l5o3g110(6498.)4)−log10(14531.)--------------|
|8---|-Ωc =-10-12N log10[αs−1]-→-1(0-21×2log10)(10.0−1)-→-8389.5(-----)-----------|
|9   | poles of H(S) s = Ω ej π(1+22iN+N) → s = 8389.5 ejπ(3+42i)  i = 0⋅⋅⋅1|
|----|-------------i----c---------------i---------------------------|
|----|-s0-=-− 5932.3+-j5932.3,s1 =-−-5932.3-− j5932.3------------------|
|----|----N-−1------------------------------------------------------|
|10  | k = ∏  (− s ) → (5932.3 − j5932.3)(5932.3+ j5932.3) → 7.0384 × 107|
|----|-----i=0----i--------------------------------------------------|
---------------------------------------------------------------------
|11  | H (s) = ---K----→  ---------7.0384×107----------               |
|    |  a      N∏−1        (s+5932.3− i5932.3)(s+5932.3+i5932.3)               |
|    |            (s−si)                                             |
|----|--------7i.0=3804×107----------------------------------------------|
|12--|-→-s2+11865.s+7.0384×107-----------2------------------------------|
|13  | H (z) = Ha (s)|s= 21−z−−11 → 0.0994z529−z0+.9031.15968z9+2z0.+3029.03989459-               |
|----|----------------T1+z------------------------------------------|
---------------------------------------------------------------------

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    = − 3db
  pass

pict


4.1 Impulse invariance method

We first convert analog specifications to digital specifications: F2sπ = fpωass
       p  , hence ωp = 2π fpaFss
        s

Then the cutoff frequency Ωc = ωp
      T  for impulse invariance.

Next find the poles of H (s).  Since the butterworth magnitude square of the transfer function is

      2   ----T-2----
|Ha(s)| =    (  s)2N
          1+   jΩc-

Hence H (s)  poles are found by setting the denominator of the above to zero

   (    )2N
1+   -s--   = 0
     jΩc

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

       j(π(1+2k+N))
s = Ωc e   2N

We only need to find the LHS poles, which are located at i = 0⋅⋅⋅N − 1  , because these are the stable poles. Hence the  th
i  pole is

       j(π(1+2i+N-))
si = Ωc e   2N

Now we can write the analog filter generated based on the above selected poles, which is, for impulse invariance

            T K
Ha (s) = N-−1-----
         ∏  (s− s )
         i=0      i
(3)

K  is found by solving Ha (0) = T   hence

   N∏−1
k =    (− si)
    i=0

Now we need to write poles in non-polar form and plug them into (3)

        j(π(1+22Ni+N))     (   π-(1+-2i+-N-)      π-(1-+-2i+N-))
si = Ωc e          = Ωc cos     2N      + jsin      2N                    i = 0⋅⋅⋅N − 1

Hence,

        ------------------T-K-------------------
Ha(s) = N∏−1(      (                          ))
            s − Ωc cos π(1+22iN+N-)+ jsin π(1+22Ni+N)
        i=0
(4)

Now that we have found H (s)  we need to convert it to H (z)

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 Ha (s)  , we do the A → D  conversion. I.e. obtain H (z)  from the above H (s)  . When using impulse invariance, we need to perform partial fraction decomposition on (4) above in order to write H (s)  in this form

       N−1
H (s) = ∑  --Ai-
       i=0s − si

For example, to obtain Aj  , we write

Aj = lim  Ha (s) = ---T-k----
     s→sj        N∏−1
                    (s − si)
                 ii=⁄=0j

Once we find all the A ′s  , we now write H (z)  as follows

       N∑−1-------Ai------
H (z) =    1 − exp (si T)z−1
       i=0

This completes the design. We can try to convert the above form of H (z)  to a rational expression as H (z) = N(z)-
        D(z)

4.2 bilinear transformation method

We first convert analog specifications to digital specifications: Fs   fpass
2π =  ωp  , hence        fpass-
ωp = 2π Fs

Now Ωc         (  )
= 2T-tan ωp2

Now that we have N  and Ωc  we find the poles of H (s)  . Since for bilinear the magnitude square of the transfer function is

|Ha(s)|2 = ---(-1-)2N-
          1+   jΩs-
                c

Hence H (s)  poles are found by setting the denominator of the above to zero

   (  s )2N
1+   jΩ--   = 0
       c

Which leads to poles at          (       )
s = Ω  ej π(1+22Ni+N)
 i    c . We only need to find the LHS poles, which are located at i = 0 ⋅⋅⋅N − 1  , because these are the stable poles. For bilinear, H (s)  is given by

             K
Ha (s) = N-−1-----
         ∏  (s− s )
         i=0      i
(3)

K  is found by solving Ha (0) = 1  , hence we obtain

   N∏−1
k =    (− si)
    i=0

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)

        j(π(1+22Ni+N))     (   π-(1+-2i+-N-)      π-(1-+-2i+N-))
si = Ωc e          = Ωc cos     2N      + jsin      2N                    i = 0⋅⋅⋅N − 1

then

        -------------------K--------------------
Ha(s) = N∏−1(      (                          ))
            s − Ωc cos π(1+22iN+N-)+ jsin π(1+22Ni+N)
        i=0
(4)

Now that we have found H (s)  we need to convert it to H (z)  . After finding H (s)  as shown above, we simply replace s  by 2T-11−+zz−−11   . 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.