I was wondering if anyone of you are familiar with a C/C++ library or header that does a bilinear transformation, ideally converting up to a 4th-order transfer function? Any help would be greatly appreciated
THANKS!
Code: Select all
1 z - 1
- * -----
k z + 1
as² + bs + c
a z² - 2z + 1 b z - 1
--- * ----------- + --- * ----- + c
k² z² + 2z + 1 k z + 1
a z² - 2z + 1 bk z² - 1 ck² z² + 2z + 1
--- * ----------- + -- * ----------- + --- * -----------
k² z² + 2z + 1 k² z² + 2z + 1 k² z² + 2z + 1
az² - 2az + a + bkz² - bk + ck²z² + 2ck²z + ck²
z²(a0 + a1*k + a2*k²) + z(2*a2*k² - 2*a0) + (a0 - a1*k + a2*k²)
---------------------------------------------------------------
z²(b0 + b1*k + b2*k²) + z(2*b2*k² - 2*b0) + (b0 - b1*k + b2*k²)
1
LP: -----------
s² + 2s + 1
s²
HP: -----------
s² + 2s + 1
s
BP: -----------
s² + 2s + 1
s² + 1
BR: -----------
s² + 2s + 1
k = tan(PI * FC/FS)
Common:
B0 = 1 + 2 / Q * k + k²
B1 = 2 * k² - 2
B2 = 1 - 2 / Q * k + k²
LP:
A0 = k²
A1 = 2 * k²
A2 = k²
HP:
A0 = 1
A1 = -2
A2 = 1
BP:
A0 = k
A1 = 0
A2 = -k
BR:
A0 = 1 + k²
A1 = 2*k² - 2
A2 = 1 + k²
as a new member, he probably did not expect someone being so kind to elaborately derive all these equations. for fourth order, i'd certainly prefer to let the algebra be done by some computer algebra system such as maxima. i think, it's going to be messy and error-prone to do by hand.neotec wrote:Copy'n'paste from the internet? Huh? Well ... if you think so ... nevermind.
Yeah, you're possibly right.Robin from www.rs-met.com wrote:as a new member, he probably did not expect someone being so kind to elaborately derive all these equations. for fourth order, i'd certainly prefer to let the algebra be done by some computer algebra system such as maxima. i think, it's going to be messy and error-prone to do by hand.neotec wrote:Copy'n'paste from the internet? Huh? Well ... if you think so ... nevermind.
Having recently derived (and then debugged after it behaved a bit weird) some fancy filters, I'd say the that sort of stuff tends to be messy and error prone even when done in a CAS. Doing it without a CAS tends to be twice as messy and error prone, so definitely +1 on your suggestion.Robin from www.rs-met.com wrote:as a new member, he probably did not expect someone being so kind to elaborately derive all these equations. for fourth order, i'd certainly prefer to let the algebra be done by some computer algebra system such as maxima. i think, it's going to be messy and error-prone to do by hand.neotec wrote:Copy'n'paste from the internet? Huh? Well ... if you think so ... nevermind.
Submit: News, Plugins, Hosts & Apps | Advertise @ KVR | Developer Account | About KVR / Contact Us | Privacy Statement
© KVR Audio, Inc. 2000-2026