Loading [MathJax]/jax/output/HTML-CSS/jax.js

Tuesday, 22 July 2014

Doing the Bilinear Transform for a 2nd order filter again

Well it was fun yesterday learning about MathJax and playing around describing the bilinear transform for a 2nd order filter. As I was looking at a couple of sites last night I noticed that a good bunch of descriptions also shown the same transformation done slightly differently so as I got pencil and paper out last night out of curiosity to see how they came to the same result I thought I'd put another post so that both can be seen:

Starting again with our 2nd-order low-pass transfer function in the s-domain:

H(s)=1s2+sQ+1

Yesterday we used the following bilinear transform with frequency warping:

s1tanω21z11+z1

What I'd like to do today is to use a slightly different writing of this and see how the math juggling comes out:

s1Kz1z+1

Where K=tanω2

This is the same transform, which can be seen by multiplying by z1z1. The maths just plays out a little differently.

Substituting this in to the transfer function:

H(s)=1s2+sQ+111K2(z1)2(z+1)2+1KQ(z1)(z+1)+1

Multiplying top and bottom by K2(z+1)2 gives something slightly easier:

H(z)=K2(z+1)2(z1)2+KQ(z1)(z+1)+K2(z+1)2

Expanding:

H(z)=K2(z2+2z+1)(z2+2z+1)+KQz2KQ+K2(z2+2z+1)

Collecting together the terms:

H(z)=K2z2+2K2z+K2z2(1+KQ+K2)+z(2+2K2)+(1KQ+K2)

All very easy, which gives us our coefficients:

  • b2=K2
  • b1=2K2
  • b0=K2
  • a2=K2+KQ+1
  • a1=2(1K2)
  • a0=K2KQ+1
What I wanted to see is how these then can be manipulated to get the same equations as in my previous post.

First step then is to get the top-half functions all looking similar, so we can take K2 and using the trig identity K2=tan2ω2=(1cosω)(1+cosω). We can use the numerator in the top and the denominator in the bottom. This makes the b coefficients:
  • b2=1cosω
  • b1=2(1cosω)
  • b0=1cosω
Now taking a0 first, with the bottom half (1+cosω) and substituting K:

a0=(1+cosω)(tan2ω21Qtanω2+1)

Using our favourite trig identities K=tanω2=sinω(1+cosω) and K2=tan2ω2=(1cosω)(1+cosω) and substituting 1=(1+cosω)(1+cosω) gives:

a0=(1+cosω)(tan2omega21Qtanω2+1)=(1+cosω)((1cosω)(1+cosω)1Qsinω(1+cosω)+(1+cosω)(1+cosω))

And crossing out terms gives:

a0=(1cosω)sinωQ+(1+cosω)=2sinωQ

and similarly for a2. Now taking a1:

a1=2(1+cosω)(1tan2ω2)=2(1+cosω)((1+cosω)(1+cosω)(1cosω)(1+cosω))=2((1+cosω)(1cosω))=2(2cosω)

and dividing all the terms by 2 gives:
  • b2=(1cosω)2
  • b1=(1cosω)
  • b0=(1cosω)22
  • a2=(1+sinω2)
  • a1=2cosω
  • a0=(1sinω2) 
Which looks just like the coefficients calculated by the previous method. QED



No comments:

Post a Comment