MATLAB滤波器工具

原文连接:http://www.lifeorange.com/MATLAB/MATLAB_FD.htm

相关资料打包:http://download.csdn.net/detail/fzxy002763/4118721,相应的使用方法如下解释

RUNNING THE PROGRAM

Copy the file, FD.m into your work directory in MATLAB.Type FD and press enter to begin.

运行程序

拷贝文件, FD.m到你的matlab工作目录下.输入FD并确定运行.


SELECTING AND CREATING A FILTER

Once the program is running a list appears of the 5 available filters.

选择并创建一个滤波器

一运行程序将会列出5个可用的选项.


Choose the filter you would like by entering its corresponding number from the listand pressing enter.
In this example we have chosen an FIR Notch Filter by entering 1. Next, enter the filter parameters as the program prompts you for them. I have chosen a sampling frequency of 360Hz, notch frequency of 60Hz, and a DC gain of 0dB.Note that all frequencies are in Hz!

选择你所需要的滤波器,并键入相应的序号。

这里有个例子,选择FIR陷波滤波器,键入1。然后,确定滤波器的参数。选择作为例子的是采样频率为360HZ,陷波频率为60HZ,并且直流增益为0db。注意这里所有的单位都是HZ!


We see that the program calculates the corresponding linear constant coefficient difference equation (LCCDE) for our filter and generates a graph of its response (Figure 1).

我们可以看到程序计算出了对于我们所需要滤波器的常系数线性差分方程,并且产生了一个图表反映其的响应(图1)。

The program will repeat itself, allowing the user to keep creating filters until 999 is entered to quit.

程序将会重复演算,允许使用者最高设计999次才退出。

Figure 1. 图1

FILTER RESTRICTIONS AND PARAMETER INFORMATION

AllFilters: To satisfy the Nyquist theorem and produce accurate results the sampling frequency must be at least twice the notch, resonating, or oscillating frequency.

FIRNotch: The user can not choose to set the gain at the frequency to be notched, for by design the gain at the notch frequency is extremely low (I.E. the gain at the notch frequency is -∞dB).

IIRNotch: Just like the FIR notch filter, the users should not set the gain of the notch frequency.

The parameter,r, must be a positive value such that 0 ≤ r < 1. The closer r is to 1, the narrower the notch will be, thus achieving a better filter.The following example illustrates the results of different r values.

滤波器的限制以及参数信息

全通型滤波器:为了满足奈奎斯特抽样定理并且精确计算采样频率(其至少两倍于陷波,共振,或者振荡频率),

FIR陷波滤波器:使用者不能够选择性设定陷波频率处的增益,陷波点的增益会是一个特别低的值。(陷波点的增益近似于-∞dB)

IIR陷波滤波器:如同FIR陷波滤波器一样,使用者不需要设定陷波点的增益。

参数相关设置,r设置值需要在0~1之间。如果设置接近1,陷波点将会非常的窄,即获得一个更好的滤波器。接下来的例子将会图示不同的r值得出的不同的结果。


All-PoleResonator: The value for r follows the same rules as in the IIR notch filter: 0 ≤ r < 1. A larger r will produce a narrower range of frequencies to resonate around the resonating frequency.

Pole-ZeroResonator: In addition to following the same rules for r as the all-pole resonator, the DC gain of the pole-zero resonator should not be set by the user.

Oscillator:Higher oscillating frequencies (roughly over 50Hz) will require the user to zoom in on the wave form to easily see results.

全极点谐振器:r值如同在IIR陷波滤波器中一样:0 ≤ r < 1。更大的r值将会产生更窄范围的频率在共振频率周围。

零极点谐振器:为了使用在全极点谐振器中同样的r值,零极点谐振器的直流增益不应该被使用者设置。

振荡器:更高的谐振频率(大致高于50Hz)将需要使用者对纹波进行放大以便观察结果。

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值