当前位置:   article > 正文

巴特沃斯滤波器,原理与Matlab实现

巴特沃斯滤波器

  巴特沃斯滤波器(英语:Butterworth Filter),也被称作最大平坦滤波器,是一种通频带之频率响应曲线平坦无纹波的信号处理滤波器,最先由英国工程师、物理学家史蒂芬·巴特沃斯提出。

传递函数求解

  巴特沃斯滤波器对不同频率下的增益进行了设计, n n n阶巴特沃斯滤波器的增益可以表示为(截止频率 ω c \omega_c ωc):
∣ H n ( j ω ) ∣ = 1 1 + ( ω ω c ) 2 n ⇔ ∣ H n ( j ω ) ∣ 2 = 1 1 + ( ω ω c ) 2 n \left| {{H_n}\left( {j\omega } \right)} \right| = \frac{1}{{\sqrt {1 + {{\left( {\frac{\omega }{{{\omega _c}}}} \right)}^{2n}}} }}\Leftrightarrow {\left| {{H_n}\left( {j\omega } \right)} \right|^2} = \frac{1}{{1 + {{\left( {\frac{\omega }{{{\omega _c}}}} \right)}^{2n}}}} Hn()=1+(ωcω)2n 1Hn()2=1+(ωcω)2n1
  上述表达式仅对幅频特性进行了描述,我们更希望得到传递函数形式的表达式,从而兼具幅频特性和相频特性,考虑到 H n ( j ω ) ‾ = H n ( − j ω ) \overline {{H_n}\left( {j\omega } \right)} = {H_n}\left( { - j\omega } \right) Hn()=Hn(),于是有:
{ H n ( s ) H n ( − s ) = H n ( j ω ) H n ( − j ω ) = H n ( j ω ) H n ( j ω ) ‾ = ∣ H n ( j ω ) ∣ 2 = 1 1 + ( ω ω c ) 2 n = 1 1 + ( j ω j ω c ) 2 n = 1 1 + ( s j ω c ) 2 n = 1 1 + ( − s 2 ω c 2 ) n \left\{

Hn(s)Hn(s)=Hn(jω)Hn(jω)=Hn(jω)Hn(jω)¯=|Hn(jω)|2=11+(ωωc)2n=11+(jωjωc)2n=11+(sjωc)2n=11+(s2ωc2)n
\right. Hn(s)Hn(s)=Hn()Hn()=Hn()Hn()=Hn()2=1+(ωcω)2n1=1+(jωc)2n1=1+(jωcs)2n1=1+(ωc2s2)n1
  进一步求解 H n ( s ) H_n(s) Hn(s)的具体表达式,假设 H n ( s ) H_n(s) Hn(s) n n n个极点分别为 s 1 , s 2 , . . . , s n s_1,s_2,...,s_n s1,s2,...,sn,则 H n ( − s ) H_n(-s) Hn(s) n n n个极点为相应的负对称点, − s 1 = s 1 e j π , − s 2 = s 2 e j π , . . . , − s n = s n e j π - {s_1} = {s_1}{e^{j\pi }}, - {s_2} = {s_2}{e^{j\pi }},..., - {s_n} = {s_n}{e^{j\pi }} s1=s1e,s2=s2e,...,sn=sne。一般地, H n ( s ) H_n(s) Hn(s) H n ( − s ) H_n(-s) Hn(s)可以写作:
{ H n ( s ) = 1 ( 1 − s s 1 ) ( 1 − s s 2 ) ⋅ ⋅ ⋅ ( 1 − s s n ) H n ( − s ) = 1 ( 1 − s s 1 e j π ) ( 1 − s s 2 e j π ) ⋅ ⋅ ⋅ ( 1 − s s n e j π ) \left\{
Hn(s)=1(1ss1)(1ss2)(1ssn)Hn(s)=1(1ss1ejπ)(1ss2ejπ)(1ssnejπ)
\right.
Hn(s)Hn(s)=(1s1s)(1s2s)(1sns)1=(1s1es)(1s2es)(1snes)1

  显然, s 1 , s 2 , . . . , s n s_1,s_2,...,s_n s1,s2,...,sn s 1 e j π , s 2 e j π , . . . , s n e j π {s_1}{e^{j\pi }},{s_2}{e^{j\pi }},...,{s_n}{e^{j\pi }} s1e,s2e,...,sne也构成 H n ( s ) H n ( − s ) H_n\left( s \right)H_n\left( { - s} \right) Hn(s)Hn(s) 2 n 2n 2n个极点。因此,可以通过求解 H n ( s ) H n ( − s ) H_n\left( s \right)H_n\left( { - s} \right) Hn(s)Hn(s)的全部极值点,选择其中 n n n个左半平面极值点,构成 H n ( s ) H_n\left( s \right) Hn(s)。选左半平面极值点可以保证 H n ( s ) H_n(s) Hn(s)的稳定性,剩余的 n n n个右半平面的极值点对应 H n ( − s ) H_n(-s) Hn(s)函数。

  以下对 H n ( s ) H n ( − s ) H_n\left( s \right)H_n\left( { - s} \right) Hn(s)Hn(s)的极值点进行求解:
{ ( − s 2 ω c 2 ) n = − 1 = e j ( 2 k − 1 ) π → − s 2 ω c 2 = e j ( 2 k − 1 ) π n → s 2 ω c 2 = e j ( 2 k + n − 1 ) π n → s = ± ω c e j ( 2 k + n − 1 ) π 2 n , k = 1 , 2 , . . . , n \left\{

(s2ωc2)n=1=ej(2k1)πs2ωc2=ej(2k1)πns2ωc2=ej(2k+n1)πns=±ωcej(2k+n1)π2nk=1,2,...,n
\right. (ωc2s2)n=1=ej(2k1)πωc2s2=enj(2k1)πωc2s2=enj(2k+n1)πs=±ωce2nj(2k+n1)πk=1,2,...,n

传递函数表达式

  求解1~8阶巴特沃斯滤波器的传递函数,列于下表。如有离散化需求,请参考:传递函数离散化方法

阶数极值点传递函数
n = 1 n = 1 n=1 s 1 = ω c e j π s_1 = {\omega_c e^{j\pi }} s1=ωce H 1 ( s ) = 1 1 − s ω c e j π = 1 1 + s ω c {H_1}\left( s \right) = \frac{1}{{1 - \frac{s}{{{\omega _c}{e^{j\pi }}}}}} = \frac{1}{{1 + \frac{s}{{{\omega _c}}}}} H1(s)=1ωces1=1+ωcs1
n = 2 n = 2 n=2 s 1 = ω c e j 3 π 4 , s 2 = ω c e j 5 π 4 s_1 = {\omega_ce^{\frac{{j3\pi }}{4}}},s_2 = {\omega_c e^{\frac{{j5\pi }}{4}}} s1=ωce4j3π,s2=ωce4j5π H 2 ( s ) = 1 1 − s ω c e j 3 π 4 1 1 − s ω c e j 5 π 4 = 1 1 + 2 s ω c + ( s ω c ) 2 {H_2}\left( s \right) = \frac{1}{{1 - \frac{s}{{{\omega _c}{e^{\frac{{j3\pi }}{4}}}}}}}\frac{1}{{1 - \frac{s}{{{\omega _c}{e^{\frac{{j5\pi }}{4}}}}}}} = \frac{1}{{1 + \sqrt 2 \frac{s}{{{\omega _c}}} + {{\left( {\frac{s}{{{\omega _c}}}} \right)}^2}}} H2(s)=1ωce4j3πs11ωce4j5πs1=1+2 ωcs+(ωcs)21
n = 3 n = 3 n=3 s 1 = ω c e j 2 π 3 , s 2 = ω c e j π , s 3 = ω c e j 4 π 3 s_1 = {\omega_ce^{\frac{{j2\pi }}{3}}},s_2 = {\omega_c e^{j\pi }},s_3 = {\omega_c e^{\frac{{j4\pi }}{3}}} s1=ωce3j2π,s2=ωce,s3=ωce3j4π H 3 ( s ) = 1 ( 1 + s ω c ) ( 1 + s ω c + ( s ω c ) 2 ) {H_3}\left( s \right) = \frac{1}{{\left( {1 + \frac{s}{{{\omega _c}}}} \right)\left( {1 + \frac{s}{{{\omega _c}}} + {{\left( {\frac{s}{{{\omega _c}}}} \right)}^2}} \right)}} H3(s)=(1+ωcs)(1+ωcs+(ωcs)2)1
n = 4 n = 4 n=4 s 1 = ω c e j 5 π 8 , s 2 = ω c e j 7 π 8 , s 3 = ω c e j 9 π 8 , s 4 = ω c e j 11 π 8 s_1 = {\omega_ce^{\frac{{j5\pi }}{8}}},s_2 = {\omega_c e^{\frac{{j7\pi }}{8}}},s_3 = {\omega_c e^{\frac{{j9\pi }}{8}}},s_4 = {\omega_c e^{\frac{{j11\pi }}{8}}} s1=ωce8j5π,s2=ωce8j7π,s3=ωce8j9π,s4=ωce8j11π H 4 ( s ) = 1 ( ( s ω c ) 2 + 0.7654 s ω c + 1 ) ( ( s ω c ) 2 + 1.8478 s ω c + 1 ) {H_4}\left( s \right) = \frac{1}{{\left( {{{\left( {\frac{s}{{{\omega _c}}}} \right)}^2} + 0.7654\frac{s}{{{\omega _c}}} + 1} \right)\left( {{{\left( {\frac{s}{{{\omega _c}}}} \right)}^2} + 1.8478\frac{s}{{{\omega _c}}} + 1} \right)}} H4(s)=((ωcs)2+0.7654ωcs+1)((ωcs)2+1.8478ωcs+1)1
n = 5 n = 5 n=5 ω c e j 6 π 10 , ω c e j 8 π 10 , ω c e j 10 π 10 , ω c e j 12 π 10 , ω c e j 14 π 10 {\omega _c}{e^{\frac{{j6\pi }}{{10}}}},{\omega _c}{e^{\frac{{j8\pi }}{{10}}}},{\omega _c}{e^{\frac{{j10\pi }}{{10}}}},{\omega _c}{e^{\frac{{j12\pi }}{{10}}}},{\omega _c}{e^{\frac{{j14\pi }}{{10}}}} ωce10j6π,ωce10j8π,ωce10j10π,ωce10j12π,ωce10j14π H 5 ( s ) = 1 ( s ω c + 1 ) ( ( s ω c ) 2 + 0.6180 s ω c + 1 ) ( ( s ω c ) 2 + 1.6180 s ω c + 1 ) {H_5}\left( s \right) = \frac{1}{{\left( {\frac{s}{{{\omega _c}}} + 1} \right)\left( {{{\left( {\frac{s}{{{\omega _c}}}} \right)}^2} + 0.6180\frac{s}{{{\omega _c}}} + 1} \right)\left( {{{\left( {\frac{s}{{{\omega _c}}}} \right)}^2} + 1.6180\frac{s}{{{\omega _c}}} + 1} \right)}} H5(s)=(ωcs+1)((ωcs)2+0.6180ωcs+1)((ωcs)2+1.6180ωcs+1)1
n = 6 n = 6 n=6 ω c e j 7 π 12 , ω c e j 9 π 12 , ω c e j 11 π 12 , ω c e j 13 π 12 , ω c e j 15 π 12 , ω c e j 17 π 12 {\omega _c}{e^{\frac{{j7\pi }}{{12}}}},{\omega _c}{e^{\frac{{j9\pi }}{{12}}}},{\omega _c}{e^{\frac{{j11\pi }}{{12}}}},{\omega _c}{e^{\frac{{j13\pi }}{{12}}}},{\omega _c}{e^{\frac{{j15\pi }}{{12}}}},{\omega _c}{e^{\frac{{j17\pi }}{{12}}}} ωce12j7π,ωce12j9π,ωce12j11π,ωce12j13π,ωce12j15π,ωce12j17π H 6 ( s ) = 1 ( ( s ω c ) 2 + 0.5176 s ω c + 1 ) ( ( s ω c ) 2 + 1.414 s ω c + 1 ) ( ( s ω c ) 2 + 1.9318 s ω c + 1 ) {H_6}\left( s \right) = \frac{1}{{\left( {{{\left( {\frac{s}{{{\omega _c}}}} \right)}^2} + 0.5176\frac{s}{{{\omega _c}}} + 1} \right)\left( {{{\left( {\frac{s}{{{\omega _c}}}} \right)}^2} + 1.414\frac{s}{{{\omega _c}}} + 1} \right)\left( {{{\left( {\frac{s}{{{\omega _c}}}} \right)}^2} + 1.9318\frac{s}{{{\omega _c}}} + 1} \right)}} H6(s)=((ωcs)2+0.5176ωcs+1)((ωcs)2+1.414ωcs+1)((ωcs)2+1.9318ωcs+1)1
n = 7 n = 7 n=7 ω c e j 8 π 14 , ω c e j 10 π 14 , ω c e j 12 π 14 , ω c e j 14 π 14 , ω c e j 16 π 14 , ω c e j 18 π 14 , ω c e j 20 π 14 {\omega _c}{e^{\frac{{j8\pi }}{{14}}}},{\omega _c}{e^{\frac{{j10\pi }}{{14}}}},{\omega _c}{e^{\frac{{j12\pi }}{{14}}}},{\omega _c}{e^{\frac{{j14\pi }}{{14}}}},{\omega _c}{e^{\frac{{j16\pi }}{{14}}}},{\omega _c}{e^{\frac{{j18\pi }}{{14}}}},{\omega _c}{e^{\frac{{j20\pi }}{{14}}}} ωce14j8π,ωce14j10π,ωce14j12π,ωce14j14π,ωce14j16π,ωce14j18π,ωce14j20π H 7 ( s ) = 1 ( s ω c + 1 ) ( ( s ω c ) 2 + 0.4450 s ω c + 1 ) ( ( s ω c ) 2 + 1.247 s ω c + 1 ) ( ( s ω c ) 2 + 1.8022 s ω c + 1 ) {H_7}\left( s \right) = \frac{1}{{\left( {\frac{s}{{{\omega _c}}} + 1} \right)\left( {{{\left( {\frac{s}{{{\omega _c}}}} \right)}^2} + 0.4450\frac{s}{{{\omega _c}}} + 1} \right)\left( {{{\left( {\frac{s}{{{\omega _c}}}} \right)}^2} + 1.247\frac{s}{{{\omega _c}}} + 1} \right)\left( {{{\left( {\frac{s}{{{\omega _c}}}} \right)}^2} + 1.8022\frac{s}{{{\omega _c}}} + 1} \right)}} H7(s)=(ωcs+1)((ωcs)2+0.4450ωcs+1)((ωcs)2+1.247ωcs+1)((ωcs)2+1.8022ωcs+1)1
n = 8 n = 8 n=8 ω c e j 9 π 16 , ω c e j 11 π 16 , ω c e j 13 π 16 , ω c e j 15 π 16 , ω c e j 17 π 16 , ω c e j 19 π 16 , ω c e j 21 π 16 , ω c e j 23 π 16 {\omega _c}{e^{\frac{{j9\pi }}{{16}}}},{\omega _c}{e^{\frac{{j11\pi }}{{16}}}},{\omega _c}{e^{\frac{{j13\pi }}{{16}}}},{\omega _c}{e^{\frac{{j15\pi }}{{16}}}},{\omega _c}{e^{\frac{{j17\pi }}{{16}}}},{\omega _c}{e^{\frac{{j19\pi }}{{16}}}},{\omega _c}{e^{\frac{{j21\pi }}{{16}}}},{\omega _c}{e^{\frac{{j23\pi }}{{16}}}} ωce16j9π,ωce16j11π,ωce16j13π,ωce16j15π,ωce16j17π,ωce16j19π,ωce16j21π,ωce16j23π H 8 ( s ) = 1 ( ( s ω c ) 2 + 0.3986 s ω c + 1 ) ( ( s ω c ) 2 + 1.111 s ω c + 1 ) ( ( s ω c ) 2 + 1.6630 s ω c + 1 ) ( ( s ω c ) 2 + 1.9622 s ω c + 1 ) {H_8}\left( s \right) = \frac{1}{{\left( {{{\left( {\frac{s}{{{\omega _c}}}} \right)}^2} + 0.3986\frac{s}{{{\omega _c}}} + 1} \right)\left( {{{\left( {\frac{s}{{{\omega _c}}}} \right)}^2} + 1.111\frac{s}{{{\omega _c}}} + 1} \right)\left( {{{\left( {\frac{s}{{{\omega _c}}}} \right)}^2} + 1.6630\frac{s}{{{\omega _c}}} + 1} \right)\left( {{{\left( {\frac{s}{{{\omega _c}}}} \right)}^2} + 1.9622\frac{s}{{{\omega _c}}} + 1} \right)}} H8(s)=((ωcs)2+0.3986ωcs+1)((ωcs)2+1.111ωcs+1)((ωcs)2+1.6630ωcs+1)((ωcs)2+1.9622ωcs+1)1

Matlab波特图

% 设置频率范围
w = logspace(-1, 1, 1000);

% 设置截止频率
wc = 1;

% 定义各阶巴特沃斯滤波器的传递函数
H1 = 1 ./ (1 + 1j*w/wc);
H2 = 1 ./ (1 + sqrt(2)*1j*w/wc + (1j*w/wc).^2);
H3 = 1 ./ ((1 + 1j*w/wc) .* (1 + 1j*w/wc + (1j*w/wc).^2));
H4 = 1 ./ ((1 + 0.7654*1j*w/wc + (1j*w/wc).^2) .* (1 + 1.8478*1j*w/wc + (1j*w/wc).^2));
H5 = 1 ./ ((1 + 1j*w/wc) .* (1 + 0.6180*1j*w/wc + (1j*w/wc).^2) .* (1 + 1.6180*1j*w/wc + (1j*w/wc).^2));
H6 = 1 ./ ((1 + 0.5176*1j*w/wc + (1j*w/wc).^2) .* (1 + 1.414*1j*w/wc + (1j*w/wc).^2) .* (1 + 1.9318*1j*w/wc + (1j*w/wc).^2));
H7 = 1 ./ ((1 + 1j*w/wc) .* (1 + 0.4450*1j*w/wc + (1j*w/wc).^2) .* (1 + 1.247*1j*w/wc + (1j*w/wc).^2) .* (1 + 1.8022*1j*w/wc + (1j*w/wc).^2));
H8 = 1 ./ ((1 + 0.3986*1j*w/wc + (1j*w/wc).^2) .* (1 + 1.111*1j*w/wc + (1j*w/wc).^2) .* (1 + 1.6630*1j*w/wc + (1j*w/wc).^2) .* (1 + 1.9622*1j*w/wc + (1j*w/wc).^2));

% 绘制波特图
figure;
subplot(2, 1, 1);
semilogx(w, 20*log10(abs(H1)), 'DisplayName', '1st Order');
hold on;
semilogx(w, 20*log10(abs(H2)), 'DisplayName', '2nd Order', 'LineWidth', 2);
semilogx(w, 20*log10(abs(H3)), 'DisplayName', '3rd Order');
semilogx(w, 20*log10(abs(H4)), 'DisplayName', '4th Order', 'LineWidth', 2);
semilogx(w, 20*log10(abs(H5)), 'DisplayName', '5th Order');
semilogx(w, 20*log10(abs(H6)), 'DisplayName', '6th Order', 'LineWidth', 3);
semilogx(w, 20*log10(abs(H7)), 'DisplayName', '7th Order');
semilogx(w, 20*log10(abs(H8)), 'DisplayName', '8th Order', 'LineWidth', 3);
hold off;
title('Magnitude Response');
xlabel('Frequency (rad/s)');
ylabel('Magnitude (dB)');
legend;
grid on;
ylim([-160, 20]); % 设置幅值 y 轴的限制

subplot(2, 1, 2);
semilogx(w, angle(H1), 'DisplayName', '1st Order');
hold on;
semilogx(w, angle(H2), 'DisplayName', '2nd Order', 'LineWidth', 2);
semilogx(w, angle(H3), 'DisplayName', '3rd Order');
semilogx(w, angle(H4), 'DisplayName', '4th Order', 'LineWidth', 2);
semilogx(w, angle(H5), 'DisplayName', '5th Order');
semilogx(w, angle(H6), 'DisplayName', '6th Order', 'LineWidth', 3);
semilogx(w, angle(H7), 'DisplayName', '7th Order');
semilogx(w, angle(H8), 'DisplayName', '8th Order', 'LineWidth', 3);
hold off;
title('Phase Response');
xlabel('Frequency (rad/s)');
ylabel('Phase (radians)');
legend;
grid on;
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52

在这里插入图片描述

基本性质小结

  1. 不同阶次巴特沃斯滤波器,在截止频率处的增益都是 − 3 -3 3dB,这也是截止频率的定义;
  2. 巴特沃斯滤波器的幅度特性是 ω \omega ω 的单调函数,滤波器阶数越高,衰减速度越快;
  3. 截止频率以上,每十倍频增益衰减 20 n 20n 20n dB, 20 log ⁡ 10 ∣ H n ( j ω ) ∣ = 20 log ⁡ 10 1 1 + ( ω ω c ) 2 n ≈ − 20 n log ⁡ 10 ( ω ω c ) 20{\log _{10}}\left| {{H_n}\left( {j\omega } \right)} \right| = 20{\log _{10}}\frac{1}{{\sqrt {1 + {{\left( {\frac{\omega }{{{\omega _c}}}} \right)}^{2n}}} }} \approx - 20n{\log _{10}}\left( {\frac{\omega }{{{\omega _c}}}} \right) 20log10Hn()=20log101+(ωcω)2n 120nlog10(ωcω)
  4. 对于 n n n阶巴特沃斯低通滤波器,幅频特性 ∣ H n ( j ω ) ∣ \left| {{H_n}\left( {j\omega } \right)} \right| Hn(),及其一阶导数、二阶导数、…、 2 n − 1 2n-1 2n1阶导数,在 ω = 0 \omega = 0 ω=0时取值为零,也因此被称为最大平坦的滤波器
  5. 相比较于理想滤波器,巴特沃斯滤波器(特别是高阶型)对其幅频特性进行了很好的模拟,但忽略了相频特性。若更追求相频特性,可参考贝塞尔滤波器

参考文献

参考1:巴特沃斯,维基百科
参考2:传递函数离散化方法
参考3:信号无失真传输,理想滤波器
参考4:巴特沃斯,CSDN
参考5:巴特沃斯,CSDN

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小蓝xlanll/article/detail/579829
推荐阅读
相关标签
  

闽ICP备14008679号