当前位置:网站首页>Impulse response invariant method and bilinear transformation method for IIR filter design
Impulse response invariant method and bilinear transformation method for IIR filter design
2022-08-02 16:45:00 【Zhi Zhao】
前言
IIR(Infinite Impulse Response)Digital filter refers to an infinite impulse response digital filter,Because of its good amplitude-frequency response characteristics,are widely used in communication、控制、生物医学、振动分析、radar and sonar.
IIRThe filter can be designed by designing an analog filter,And then use the impulse response invariant method or the bilinear transformation method to design the digital filter.
注意:Some of the pictures in this blog post are from screenshots of the MOOC video,The course is Digital Signal Processing at Beihang University.
一、冲激响应不变法
h[n]与h(t)The relationship between can be derived from the sampling process,如图1所示:
对式(1)Do the Laplace transform:
h[n]的Z变换为:
对比式(2)和式(3)可知,H(s)与H(z)的转换关系为:
w与Ω的转换关系为:
二、双线性变换法
Bilinear transformation means that it has undergone two linear transformations,第一次是将ΩTransform from positive infinity to π/T,Negative infinity transforms to -π/T;第二次是将SThe left half-plane of the domain maps to Zwithin the unit circle of the domain. The bilinear transformation process is shown in Fig2所示.
H(s)与H(z)的转换关系为:
w与Ω的转换关系为:
三、MATLAB代码
%% Impulse response invariant method to design Butterworth digital low-pass filter
T = 2; % 设置采样周期
fs = 1/T; % 采样频率
Wp = 0.30 * pi/T; % 设置归一化通带和阻带截止频率
Ws = 0.35 * pi/T;
Ap = 20 * log10(1/0.8); % Sets the passband maximum attenuation and stopband minimum attenuation
As = 20 * log10(1/0.18);
% 调用buttord函数确定巴特沃斯滤波器阶数
[N ,Wc] = buttord(Wp,Ws,Ap,As,'s');
% 调用butter函数设计巴特沃斯滤波器
[B ,A] = butter(N,Wc,'s');
W = linspace(0,pi,400*pi); % 指定一段频率值
% Calculate the magnitude-frequency response of the analog filter
Hs = freqs(B,A,W);
% Invoke the shock response invariant method
[Bz,Az] = impinvar(B,A,fs);
% Return frequency response
Hz = freqz(Bz,Az,W);
%% 画图
figure;
subplot(1,2,1);
plot(W/pi,abs(Hs)/abs(Hs(1))); % Plot the amplitude-frequency characteristic of the Butterworth analog filter
xlabel('频率/Hz');ylabel('幅值');title('巴特沃斯模拟滤波器');grid on;
subplot(1,2,2);
plot(W/pi,abs(Hz)/abs(Hz(1))); % Plot the amplitude-frequency characteristic curve of the Butterworth digital low-pass filter
xlabel('频率/Hz');ylabel('幅值');title('巴特沃斯数字滤波器');grid on;
%% Bilinear transformation method to design Butterworth digital band-stop filter
T = 2; % 设置采样周期
fs = 1/T; % 采样频率
wp = [0.30*pi,0.75*pi];
ws = [0.35*pi,0.65*pi];
Wp = (2/T)*tan(wp/2); % 设置归一化通带和阻带截止频率
Ws = (2/T)*tan(ws/2);
Ap = 20 * log10(1/0.8); % Sets the passband maximum attenuation and stopband minimum attenuation
As = 20 * log10(1/0.18);
% 调用buttord函数确定巴特沃斯滤波器阶数
[N ,Wc] = buttord(Wp,Ws,Ap,As,'s');
% 调用butter函数设计巴特沃斯滤波器
[B ,A] = butter(N,Wc,'stop','s');
W = linspace(0,pi,400*pi); % 指定一段频率值
% Calculate the magnitude-frequency response of the analog filter
Hs = freqs(B,A,W);
% Invoke the bilinear transformation method
[Bz,Az] = bilinear(B,A,fs);
% Return frequency response
Hz = freqz(Bz,Az,W);
%% 画图
figure;
subplot(1,2,1);
plot(W/pi,abs(Hs)); % Plot the amplitude-frequency characteristic of the Butterworth analog filter
xlabel('频率/Hz');ylabel('幅值');title('巴特沃斯模拟滤波器');grid on;
subplot(1,2,2);
plot(W/pi,abs(Hz)); % Plot the amplitude-frequency characteristic curve of the Butterworth digital bandstop filter
xlabel('频率/Hz');ylabel('幅值');title('巴特沃斯数字滤波器');grid on;
总结
冲激响应不变法的优缺点
优点:1)Fully mimics the unity impulse response of an analog filter,The instant domain approximation is good;2)The linear phase analog filter is still a linear phase digital filter obtained by the impulse response invariant method.
缺点:Aliasing effects of frequency response.
双线性变换法的优缺点
优点:Aliasing effects of the frequency response are avoided.
缺点:1)The original linear phase is no longer maintained,It is piecewise constant;2)Distortion occurs at the critical frequency points of each segment edge.
首先,According to the amplitude-frequency response of the digital filter to be designed,Converted to the magnitude-frequency response of an analog filter,Then find the frequency response of a continuous system filterH(jΩ)Satisfy the amplitude-frequency response of the digital filter to be designed,Then find the system function of the continuous system that satisfies the amplitude-frequency responseH(s),obtained by derivationH(s)与H(z)conversion expression,得到H(z),That is, the system function of the discrete system.
边栏推荐
- static关键字的三种重要作用详解
- 初识art-template模板引擎
- BOM(Browser Object Model)浏览器对象模型相关概念
- CUDA programming based on Visual Studio 2015 (1): basic configuration
- VLAN原理
- 【网络设备远程登陆配置SSH/Telnet 】
- 集成电路实践----D触发器
- 【路由器与交换机的作用与特点 】
- 为什么四个字节的float表示的范围比八个字节的long表示的范围要广
- [Fault Diagnosis] Weak Fault Diagnosis of Fan Bearing Based on PSO_VMD_MCKD Method
猜你喜欢
随机推荐
2021年度总结——收获圆满的一年
nodemon : 无法加载文件 D:\Program Files\nodejs\node_global\nodemon.ps1
2022-07-21 第六小组 瞒春 学习笔记
XML和注解(Annotation)
2022-07-27 第六小组 瞒春 学习笔记
[Fault Diagnosis] Weak Fault Diagnosis of Fan Bearing Based on PSO_VMD_MCKD Method
The difference and connection between dist, pdist and pdist2 in MATLAB
idea使用jdbc对数据库进行增删改查,以及使用懒汉方式实现单例模式
lammps学习(一)单晶硅纳米磨削
ADB常用命令--测试人员必备
DOM —— 元素盒子模型
MATLAB file operations
DOM —— 事件对象
静态方法的缺失
Golang基础教程
2022-07-28 第六小组 瞒春 学习笔记
DOM —— 页面的渲染流程
DOM — 元素的增删改查
DOM —— 事件机制及事件链
filebeat的配置