Eugen_E
Full Member level 6
- Joined
- Nov 29, 2004
- Messages
- 387
- Helped
- 44
- Reputation
- 86
- Reaction score
- 11
- Trophy points
- 1,298
- Location
- Romania
- Activity points
- 2,878
Hello,
I'm working on a Python script to obtain the poles and zeros for classical analog filters and ultimately transform them to digital filters using the bilinear transform.
Everything works, except the Band Stop Filter code.
For BSF I used this frequency transformation: S -> Ω0s/(Q(s2 + Ω02))
I transform each normalized pole to two poles and two zeros at ±jΩ0
This is the result: , and it's wrong because it looks like a single frequency notch.
For bandpass filter, using the transfomation: S -> (Q(s2 + Ω02)) / (Ω0s), the result is correct:
Both filters were Butterworth, 6th order, with Ω1 = 40, Ω2 = 50, Q=√Ω1Ω2/(Ω2 - Ω1).
Probably it would be easier to group the poles of the normalized low pass filter into 1st or 2nd order sections from the begining, and denormalize those according to the formulas, but I think in software is easier keeping the poles separate and grouping them at the end.
Do you know if a BSF needs a special procedure for frequency transformation?
Thanks for your help
I'm working on a Python script to obtain the poles and zeros for classical analog filters and ultimately transform them to digital filters using the bilinear transform.
Everything works, except the Band Stop Filter code.
For BSF I used this frequency transformation: S -> Ω0s/(Q(s2 + Ω02))
I transform each normalized pole to two poles and two zeros at ±jΩ0
This is the result: , and it's wrong because it looks like a single frequency notch.
For bandpass filter, using the transfomation: S -> (Q(s2 + Ω02)) / (Ω0s), the result is correct:
Both filters were Butterworth, 6th order, with Ω1 = 40, Ω2 = 50, Q=√Ω1Ω2/(Ω2 - Ω1).
Probably it would be easier to group the poles of the normalized low pass filter into 1st or 2nd order sections from the begining, and denormalize those according to the formulas, but I think in software is easier keeping the poles separate and grouping them at the end.
Do you know if a BSF needs a special procedure for frequency transformation?
Thanks for your help
Last edited: