This post will not go into any of the explanation, I'll leave that for another (possibly more useful) one.
Firstly, let's define the Laplacian s-plane (analog) transfer function that we're looking to design (a resonant low-pass filter):
H(s)=1s2+sQ+1
We then need to use the bilinear transformation with frequency warping:
s←1tanω21−z−11+z−1
Substituting this into the transfer function:
H(z)=11tan2ω2(1−z−1)2(1+z−1)2+1Qtanω21−z−11+z−1+1
This can be simplified by brining tan2ω2(1+z−1)2 to the top by multiplying top and bottom by the same amount giving:
H(z)=tan2ω2(1+z−1)2(1+z−1)2+1Qtanω2(1−z−1)(1+z−1)+tan2ω2(1+z−1)2
We can now make the following simplifications:
- expand (1−z−1)2=(1−2z−1+z−2) on the top and bottom
- use the trig identity tan2ω2=(1−cosω)(1+cosω)
- simplify (1−z−1)(1+z−1)=(1−z−2)
H(z)=(1−cosω)(1−2z−1+z−2)(1+cosω)(1−2z−1+z−2)+(1+cosω)Qtanω2(1−z−2)+(1+cosω)tan2ω2(1−2z−1+z−2)
Collecting together the terms for z−2,z−1,1 terms to coefficients a2,a1,a0 on the bottom and b2,b1,b0 on the top:
- b2=(1−cosω)
- b1=−2(1−cosω)
- b0=(1−cosω)
- a2=(1+cosω)−(1+cosω)Qtanω2+(1+cosω)tan2ω2
- a1=−2(1+cosω)+2(1+cosω)tan2ω2
- a0=(1+cosω)+(1+cosω)Qtanω2+(1+cosω)tan2ω2
a0 can then be simplified by the following two steps:
- using the trig identity tanω2=sinω1+cosω
- using the trig identity tan2ω2=(1−cosω)(1+cosω) again
a0=(1+cosω)+(1+cosω)Qsinω1+cosω+(1+cosω)1−cosω1+cosω
tidying up:
a0=(1+cosω)+sinωQ+(1+cosω)=2+sinωQ=2(1+α)
where α=sinω2Q
and similarly using the same simplifications for a2 gives a2=2(1−α)
Lastly for a1 using the trig identity for tan2ω2 one last time:
a1=−2(1+cosω)+2(1+cosω)(1−cosω)(1+cosω)=−2(1+cosω)+2(1−cosω)=2(−2cosω)
Lining up all of the coefficients and collecting the common factors:
H(z)=(1−cosω)2b2z−2+b1z−1+b0a2z−2+a1z−1+a0
- b2=1
- b1=−2
- b0=1
- a2=1+α
- a1=−2cosω
- a0=1−α
With the bn values multiplied by (1−cosω)2. Which can then be normalised to set a0=1 if required.
Which gives us the same coefficients in the RBJ functions for a low-pass filter.
No comments:
Post a Comment