二阶巴特沃兹滤波器的数字推导
- 原型
- 双线性变换+no warpper
- 双线性变换+warpper
- 或者
- 参考
原型
H ( s ) = Ω c 2 s 2 + 2 ∗ Ω ∗ s + Ω c 2 H(s)=\frac{\Omega_c^2}{s^2+\sqrt{2}*\Omega * s+\Omega_c^2} H(s)=s2+2∗Ω∗s+Ωc2Ωc2
双线性变换+no warpper
Ω
c
=
ω
c
T
\Omega_c = \frac{\omega_c}{T}
Ωc=Tωc
带入传递函数得到:
H
(
s
)
=
(
ω
c
T
)
2
s
2
+
2
∗
ω
c
T
∗
s
+
(
ω
c
T
)
2
H(s)=\frac{(\frac{\omega_c}{T})^2}{s^2+\sqrt{2}*\frac{\omega_c}{T} * s+(\frac{\omega_c}{T})^2}
H(s)=s2+2∗Tωc∗s+(Tωc)2(Tωc)2
带入双线性变换公式:
s
=
2
T
1
−
z
−
1
1
+
z
−
1
和
ω
c
=
2
π
f
c
f
s
s =\frac{2}{T} \frac{1-z^{-1}}{1+z^{-1}} 和 \omega_c =\frac{2\pi f_c}{f_s}
s=T21+z−11−z−1和ωc=fs2πfc
得到
H
(
s
)
=
(
2
π
f
c
f
s
T
)
2
(
2
T
1
−
z
−
1
1
+
z
−
1
)
2
+
2
∗
(
2
π
f
c
f
s
)
T
∗
2
T
1
−
z
−
1
1
+
z
−
1
+
(
2
π
f
c
f
s
T
)
2
H(s)=\frac{(\frac{\frac{2\pi f_c}{f_s}}{T})^2}{(\frac{2}{T} \frac{1-z^{-1}}{1+z^{-1}})^2+\sqrt{2}*\frac{(\frac{2\pi f_c}{f_s})}{T} * \frac{2}{T} \frac{1-z^{-1}}{1+z^{-1}}+(\frac{\frac{2\pi f_c}{f_s}}{T})^2}
H(s)=(T21+z−11−z−1)2+2∗T(fs2πfc)∗T21+z−11−z−1+(Tfs2πfc)2(Tfs2πfc)2
化简后得到
H
(
s
)
=
(
(
π
f
c
f
s
)
2
1
+
2
∗
π
∗
f
c
f
s
+
(
π
∗
f
c
f
s
)
2
)
(
1
+
2
∗
z
−
1
+
z
−
2
)
1
+
(
π
f
c
f
s
)
2
−
2
1
+
2
∗
π
∗
f
c
f
s
+
(
π
∗
f
c
f
s
)
2
∗
z
−
1
+
1
−
2
∗
π
∗
f
c
f
s
+
(
π
∗
f
c
f
s
)
2
1
+
2
∗
π
∗
f
c
f
s
+
(
π
∗
f
c
f
s
)
2
∗
z
−
2
H(s)=\frac{(\frac{(\frac{\pi f_c}{f_s})^2}{1+\frac{\sqrt{2}* \pi *f_c}{f_s}+(\frac{\pi*f_c}{f_s})^2})(1+2*z^{-1}+z^{-2})}{1+\frac{(\frac{\pi f_c}{f_s})^2-2}{1+\frac{\sqrt{2}* \pi *f_c}{f_s}+(\frac{\pi*f_c}{f_s})^2} * z^{-1}+\frac{1-\frac{\sqrt{2}* \pi *f_c}{f_s}+(\frac{\pi*f_c}{f_s})^2}{1+\frac{\sqrt{2}* \pi *f_c}{f_s}+(\frac{\pi*f_c}{f_s})^2}*z^{-2}}
H(s)=1+1+fs2∗π∗fc+(fsπ∗fc)2(fsπfc)2−2∗z−1+1+fs2∗π∗fc+(fsπ∗fc)21−fs2∗π∗fc+(fsπ∗fc)2∗z−2(1+fs2∗π∗fc+(fsπ∗fc)2(fsπfc)2)(1+2∗z−1+z−2)
双线性变换+warpper
Ω
c
=
2
T
tan
ω
c
2
\Omega_c = \frac{2}{T}\tan{\frac{\omega_c}{2}}
Ωc=T2tan2ωc
带入传递函数得到:
H
(
s
)
=
(
2
T
tan
ω
c
2
)
2
s
2
+
2
∗
(
2
T
tan
ω
c
2
)
∗
s
+
(
2
T
tan
ω
c
2
)
2
H(s)=\frac{( \frac{2}{T}\tan{\frac{\omega_c}{2}})^2}{s^2+\sqrt{2}*( \frac{2}{T}\tan{\frac{\omega_c}{2}})* s+( \frac{2}{T}\tan{\frac{\omega_c}{2}})^2}
H(s)=s2+2∗(T2tan2ωc)∗s+(T2tan2ωc)2(T2tan2ωc)2
带入双线性变换公式:
s
=
2
T
1
−
z
−
1
1
+
z
−
1
和
ω
c
=
2
π
f
c
f
s
s =\frac{2}{T} \frac{1-z^{-1}}{1+z^{-1}} 和 \omega_c =\frac{2\pi f_c}{f_s}
s=T21+z−11−z−1和ωc=fs2πfc
得到
H
(
s
)
=
(
2
T
tan
π
f
c
f
s
)
2
(
2
T
1
−
z
−
1
1
+
z
−
1
)
2
+
2
∗
(
2
T
tan
π
f
c
f
s
)
∗
2
T
1
−
z
−
1
1
+
z
−
1
+
(
2
T
tan
π
f
c
f
s
)
2
H(s)=\frac{(\frac{2}{T}\tan{\frac{\pi f_c}{f_s}} )^2}{(\frac{2}{T} \frac{1-z^{-1}}{1+z^{-1}})^2+\sqrt{2}*(\frac{2}{T}\tan{\frac{\pi f_c}{f_s}} )* \frac{2}{T} \frac{1-z^{-1}}{1+z^{-1}}+(\frac{2}{T}\tan{\frac{\pi f_c}{f_s}} )^2}
H(s)=(T21+z−11−z−1)2+2∗(T2tanfsπfc)∗T21+z−11−z−1+(T2tanfsπfc)2(T2tanfsπfc)2
化简后得到
H
(
s
)
=
(
(
tan
π
f
c
f
s
)
2
1
+
2
tan
π
∗
f
c
f
s
+
(
tan
π
∗
f
c
f
s
)
2
)
(
1
+
2
∗
z
−
1
+
z
−
2
)
1
+
2
(
tan
π
f
c
f
s
)
2
−
2
1
+
2
tan
π
∗
f
c
f
s
+
(
tan
π
∗
f
c
f
s
)
2
∗
z
−
1
+
1
−
2
tan
π
∗
f
c
f
s
+
(
tan
π
∗
f
c
f
s
)
2
1
+
2
tan
π
∗
f
c
f
s
+
(
tan
π
∗
f
c
f
s
)
2
∗
z
−
2
H(s)=\frac{(\frac{(\tan{\frac{\pi f_c}{f_s}})^2}{1+\sqrt{2}\tan{\frac{ \pi *f_c}{f_s}}+(\tan{\frac{\pi*f_c}{f_s}})^2})(1+2*z^{-1}+z^{-2})}{1+\frac{2(\tan{\frac{\pi f_c}{f_s}})^2-2}{1+\sqrt{2}\tan{\frac{ \pi *f_c}{f_s}}+(\tan{\frac{\pi*f_c}{f_s}})^2} * z^{-1}+\frac{1-\sqrt{2}\tan{\frac{ \pi *f_c}{f_s}}+(\tan{\frac{\pi*f_c}{f_s}})^2}{1+\sqrt{2}\tan{\frac{ \pi *f_c}{f_s}}+(\tan{\frac{\pi*f_c}{f_s}})^2}*z^{-2}}
H(s)=1+1+2tanfsπ∗fc+(tanfsπ∗fc)22(tanfsπfc)2−2∗z−1+1+2tanfsπ∗fc+(tanfsπ∗fc)21−2tanfsπ∗fc+(tanfsπ∗fc)2∗z−2(1+2tanfsπ∗fc+(tanfsπ∗fc)2(tanfsπfc)2)(1+2∗z−1+z−2)
或者
H
(
s
)
=
1
s
2
+
1.414
∗
s
+
1
H(s)=\frac{1}{s^2+1.414* s+1}
H(s)=s2+1.414∗s+11
这个连接\二阶巴特沃斯双极点低通滤波器设计详细总结有个推导,结果应该是一样的,那就这样吧。为了验证这个算法的准确性,从scipy中生成同样采样率、截止频率的参数,发现除了a1都一样(a/b本文推导,aa/bb是二阶巴特沃斯双极点低通滤波器设计详细总结结果,aaa/bbb是scipy的结果),不知道scipy是怎么算的a1。
参考
二阶巴特沃斯双极点低通滤波器设计详细总结
巴特沃斯滤波器详解