语音信号处理2:数字滤波器 Digital Filters

本文深入探讨了数字滤波器的多种分类,包括时域、频域和自定义滤波器的应用场景,以及FIR和IIR滤波器的区别。从线性和非线性、时间不变和变化、自适应和非自适应等多个角度全面分析,同时介绍了滤波器的四种描述方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

参考:
The Scientist and Engineer’s Guide to Digital Signal Processing
Multimedia Signal Processing: Theory and Applications in Speech, Music and Communications

Classification

欲知细节,先识大体,看看数字滤波器都有哪些种类吧。
The Scientist and Engineer’s Guide to Digital Signal Processing 中是这样划分的:
filters classification
解释一下上面这张图:
首先,滤波器根据其用途被分为了三类:用在时域中、用在频域中和自定义。当信息被编码在信号的波形中时,使用时域的滤波器去进行诸如平滑、去偏置或整形等处理。而当信息被包含在信号的幅值、频率或者相位中时,使用频域的滤波器去提取某个频段以进行分析。自定义滤波器则用来做一些更加特殊而精巧的处理,比如反卷积(deconvolution)。
而根据滤波器的实现方式又有两种划分:通过卷积实现 或者 通过递归实现。通过卷积实现的滤波器就是FIR滤波器,通过递归实现的滤波器就是IIR滤波器。

The use of a digital filter can be broken into three categories: time domain, frequency domain and custom. As previously described, time domain filters are used when the information is encoded in the shape of the signal’s waveform. Time domain filtering is used for such actions as: smoothing, DC removal, waveform shaping, etc. In contrast, frequency domain filters are used when the information is contained in the amplitude, frequency, and phase of the component sinusoids. The goal of these filters is to separate one band of frequencies from another. Custom filters are used when a special action is required by the filter, something more elaborate than the four basic responses (high-pass, low-pass, band-pass and band-reject).
Digital filters can be implemented in two ways, by convolution (also called finite impulse response or FIR) and by recursion (also called infinite impulse response or IIR).

Multimedia Signal Processing: Theory and Applications in Speech, Music and Communications 中的划分方法则是这样的:

Depending on the form of the filter equation and the structure of implementation, filters may be broadly classified into the following classes:
(1)Linear filters versus nonlinear filters.
(2)Time-invariant filters versus time-varying filters.
(3)Adaptive filters versus non-adaptive filters.
(4)Recursive versus non-recursive filters.
(5)Direct-form, cascade-form, parallel-form and lattice structures.

前3点略去不表,第4点其实也就是根据实现方式来划分为FIR和IIR两种,第5点讲的是滤波器的结构,有直接型、级联型、并行型和lattice型。

最常用的分类还是分为FIR和IIR。

BTW,总结一下各种名称:
FIR滤波器,又名非递归滤波器(non-recursive filter)、全零点滤波器(all-zero filter)、前馈滤波器( feed-forward filter)或者滑动平均滤波器(moving average filter,MA filter,通常见于统计信号处理相关的文献中 )。
IIR滤波器,又名递归滤波器(recursive filter)、极点-零点滤波器(pole-zero filter)、反馈滤波器(feedback filter)或者自回归移动平均滤波器(auto-regressive-moving-average filter,ARMA filter,通常见于统计信号处理相关的文献中 )。还有一个比较常见的名词——双二阶滤波器(biquad filter)指的是二阶的IIR滤波器。

Alternative Methods for Description of Filters

要想学习某个东西,肯定要知道如何去描述它。那么如何描述一个滤波器?有四种方式:

1.时域,输入信号与输出信号的关系,差分方程
举个栗子:某个一阶滤波器
y ( m ) = a y ( m − 1 ) + x ( m ) y(m) = ay(m-1)+x(m) y(m)=ay(m1)+x(m)
其中,y(m)是滤波器输出,x(m)是滤波器输入,a是滤波器系数。

2.冲激响应形式,用滤波器对冲激信号的响应来描述
上面栗子中的滤波器 to a discrete-time impulse input at at m=0 又可以表示为
y ( m ) = a m y(m) = a^m y(m)=am

Impulse response is useful because: (i) any signal can be viewed as the sum of a number of shifted and scaled impulses, hence the response a linear filter to a signal is the sum of the responses to all the impulses that constitute the signal, (ii) an impulse input contains all frequencies with equal energy, and hence it excites a filter at all frequencies and (iii) impulse response and frequency response are Fourier transform pairs.

3.传递函数形式,零点和极点
还是上面的栗子:
H ( z ) = 1 / ( 1 − a z − 1 ) H(z)=1/(1-az^{-1}) H(z)=1/(1az1)

4.频率响应形式

The frequency response of a filter can be obtained by taking the Fourier transform of the impulse response of the filter, or by simple substitution of the frequency variable ejw for the z variable z=ejw in the z-transfer function as H(z=ejw) = Y(ejw)/X(ejw).

另外一些不错的资料:
Introduction to Digital Filters,Stanford的Julius Orion Smith写的online book
Introduction to Signal and System, University of Colorado Colorado Springs 的ECE2610课程,Lecture Notes写得不错

### IntelliJ IDEA 中通义 AI 功能介绍 IntelliJ IDEA 提供了一系列强大的工具来增强开发体验,其中包括与通义 AI 相关的功能。这些功能可以帮助开发者更高效地编写代并提高生产力。 #### 安装通义插件 为了使用通义的相关特性,在 IntelliJ IDEA 中需要先安装对应的插件: 1. 打开 **Settings/Preferences** 对话框 (Ctrl+Alt+S 或 Cmd+, on macOS)。 2. 导航到 `Plugins` 页面[^1]。 3. 在 Marketplace 中搜索 "通义" 并点击安装按钮。 4. 完成安装后重启 IDE 使更改生效。 #### 配置通义服务 成功安装插件之后,还需要配置通义的服务连接信息以便正常使用其提供的各项能力: - 进入设置中的 `Tools | Qwen Coding Assistant` 菜单项[^2]。 - 填写 API Key 和其他必要的认证参数。 - 测试连接以确认配置无误。 #### 使用通义辅助编程 一旦完成上述准备工作,就可以利用通义来进行智能编支持了。具体操作如下所示: ##### 自动补全代片段 当输入部分语句时,IDE 将自动提示可能的后续逻辑,并允许一键插入完整的实现方案[^3]。 ```java // 输入 while 循环条件前半部分... while (!list.isEmpty()) { // 激活建议列表选择合适的循环体内容 } ``` ##### 解释现有代含义 选中某段复杂的表达式或函数调用,右键菜单里会有选项可以请求通义解析这段代的作用以及优化意见。 ##### 生产测试案例 对于已有的业务逻辑模块,借助于通义能够快速生成单元测试框架及初始断言集,减少手动构建的成本。 ```python def test_addition(): result = add(2, 3) assert result == 5, f"Expected 5 but got {result}" ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值