资 源 简 介
%IIR数字滤波器的设计
%设计一个低通数字滤波器,设计指标:通带截止角频率为ωp,阻带截止频率为ωs,通带最大衰减为δp,阻带最小衰减为δs
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%冲激响应不变法%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clc; clear all;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%利用巴特沃斯设计低通模拟滤波器%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
wp = 0.2*pi; ws = 0.3*pi; Deltap = -1; Deltas = -15;%低通数字滤波器设计指标
TS = 1;%采样时间TS
Wp = wp/TS; Ws = ws/TS; DeltaP = Deltap; DeltaS = Deltas; %求取模拟滤波器的设计指标
%确定巴特沃斯的阶数N和截止频率Ωc
N = log((10^(-DeltaP/10)-1)/(10^(-DeltaS/10)-1))/(2*log(Wp/Ws));
N = ceil(N); %模拟滤波器的阶数N
Wc = vpa( Ws/( ( 10^( -DeltaS/10 )-1 )^( 1/( 2*N ) ) ),5 )%模拟滤波器的截止频率Wc
%%获得模拟滤波器的系统函数H(s)
&n