FIR滤波器

FIR滤波
 
查看文章
 
FIR滤波器(滑动平均滤波,sinc窗函数滤波,最优滤波,匹配滤波,维纳滤波、相关滤波)
2010-01-15 18:31
151617章的内容,讲了FIR中的滑动平均滤波、sinc窗函数滤波和自定义滤波。
-----------------------------------------------
滑动平均(moving average)滤波器
滑动平均滤波器常用于时域滤波,尽管它很简单,但是对于抑制随机噪声并保留陡峭边沿来说是最优的。
In spite of its simplicity, the moving average filter is optimal for a common task: reducing random noise while retaining a sharp step response.  This makes it the premier filter for time domain encoded signals. 
lip
可以看出滑动平均滤波的冲击响应就是一个矩形脉冲,通过将输入信号和矩形脉冲进行卷积实现滤波,注意这里是卷积,不要和后面的递归混淆。

滑动平均滤波器的频响:

国旗与国家时域效果好,频域效果就差,所以如果用来分频的话,则不用滑动平均滤波器,滑动平均滤波器主要用于抑制噪声对信号的干扰。

为了使时域和频域的效果有个折中,这里对最原始的滑动平均滤波器做下改变,如下图所示,其中1 pass就是最原始的滑动平均滤波器。


下面讲了为什么滑动平均滤波实现起来很快的原因:

可以看到虽然滑动平均滤波属于FIR,并且通过卷积来运算,但是如果进行递归运算会加快速度,不过需要注意的是这和后面将的IIR的递归是两个方面的意思。

-----------------------------------------------
sinc窗函数滤波(windowed-sinc filter,书中翻译叫什么?)
与前面的滑动平均滤波不同(主要用于时域),sinc窗函数是用于滤除频率的(主要用于频域),就像前面所说,sinc窗函数虽然在频域用于良好的性能,但是在时域方面性能就差了,表现为ripple(波纹,书中翻译叫什么?)overshoot(书中翻译叫什么?)。而且sinc窗函数滤波不能像滑动平均滤波那样通过递归来计算卷积,这就增加了它的运算量。

sinc窗函数滤波的冲击响应:

它是从负无穷到正无穷的,使用时需要对它进行移位和截断处理,如下图所示:

截断时用的hamming窗和blackman


-----------------------------------------------
自定义滤波(custom filter


-----------------------------------------------
最优滤波

白噪声叠加在信号,如何分离出信号的方式并不明显,那么怎么分才是最优的呢?这并没有一个标准。

这里讨论了三种滤波器,分别是滑动平均滤波、匹配滤波和维纳滤波。
滑动平均滤波前面讲过。
匹配滤波是指相关运算,通过对已知信号翻转并卷积,会在某一点求得最大。
维纳滤波频域上每个点的增益都根据信噪比来获得:


三种滤波器输出波形为:

需注意的是,匹配滤波和维纳滤波都需要卷积来实现。

-----------------------------------------------
最后在重申下FIR的概念:
Why is the impulse response "finite"?
In the common case, the impulse response is finite because there is no feedback in the FIR. A lack of feedback guarantees that the impulse response will be finite. Therefore, the term "finite impulse response" is nearly synonymous with "no feedback".
However, if feedback is employed yet the impulse response is finite, the filter still is a FIR.  An example is the moving average filter, in which the Nth prior sample is subtracted (fed back) each time a new sample comes in. This filter has a finite impulse response even though it uses feedback: after N samples of an impulse, the output will always be zero.
What are the advantages of FIR Filters (compared to IIR filters)?
Compared to IIR filters, FIR filters offer the following advantages:
They can easily be designed to be "linear phase" (and usually are). Put simply, linear-phase filters delay the input signal but don’t distort its phase.
They are simple to implement. On most DSP microprocessors, the FIR calculation can be done by looping a single instruction.
They are suited to multi-rate applications. By multi-rate, we mean either "decimation" (reducing the sampling rate), "interpolation" (increasing the sampling rate), or both. Whether decimating or interpolating, the use of FIR filters allows some of the calculations to be omitted, thus providing an important computational efficiency. In contrast, if IIR filters are used, each output must be individually calculated, even if it that output will discarded (so the feedback will be incorporated into the filter).
They have desireable numeric properties. In practice, all DSP filters must be implemented using finite-precision arithmetic, that is, a limited number of bits. The use of finite-precision arithmetic in IIR filters can cause significant problems due to the use of feedback, but FIR filters without feedback can usually be implemented using fewer bits, and the designer has fewer practical problems to solve related to non-ideal arithmetic.
They can be implemented using fractional arithmetic. Unlike IIR filters, it is always possible to implement a FIR filter using coefficients with magnitude of less than 1.0. (The overall gain of the FIR filter can be adjusted at its output, if desired.) This is an important consideration when using fixed-point DSP's, because it makes the implementation much simpler.
What are the disadvantages of FIR Filters (compared to IIR filters)?
Compared to IIR filters, FIR filters sometimes have the disadvantage that they require more memory and/or calculation to achieve a given filter response characteristic. Also, certain responses are not practical to implement with FIR filters.调直机防护罩
What is the association between FIR filters and "linear-phase"?
Most FIRs are linear-phase filters; when a linear-phase filter is desired, a FIR is usually used.
What is a 38tttlinear phase filter?
"Linear Phase" refers to the condition where the phase response of the filter is a linear (straight-line) function of frequency (excluding phase wraps at +/- 180 degrees). This results in the delay电脑点菜 through the filter being the same at all frequencies. Therefore, the filter does not cause "phase distortion" or "delay distortion". The lack of phase/delay distortion can be a critical advantage of FIR filters over IIR and analog filters in certain systems, for example, in digital data modems.
What is the condition for linear phase?
FIR filters are usually designed to be linear-phase (but they don't have to be.) A FIR filter is linear-phase if (and only if) its coefficients are symmetrical around the center coefficient, that is, the first coefficient is the same as the last; the second is the same as the next-to-last, etc. (A linear-phase FIR filter having an odd number of coefficients will have a single coefficient in the center which has no mate.)
What is the Z transform of a FIR filter?
For an N-tap FIR filter with coefficients h(k), whose output is described by:
      y(n)=h(0)x(n) + h(1)x(n-1) + h(2)x(n-2) + ... h(N-1)x(n-N-1),
the filter's Z transform is:
      H(z)=h(0)z-0 + h(1)z-1 + h(2)z-2 + ... h(N-1)z-(N-1) , or
   
What is the frequency response formula for a FIR filter?
The variable z in H(z) is a continuous complex variable, and we can describe it as: z=r·ejw, where r is a magnitude and w is the angle of z. If we let r=1, then H(z) around the unit circle becomes the filter's frequency response H(jw). This means that substituting ejw for z in H(z) gives us an expression for the filter's frequency response H(w), which is:
     H(jw)=h(0)e-j0w + h(1)e-j1w + h(2)e-j2w + ... h(N-1)e-j(N-1)w , or
Using Euler's identity, e-ja=cos(a) - jsin(a), we can write H(w) in rectangular form as:
     H(jw)=h(0)[cos(0w) - jsin(0w)] + h(1)[cos(1w) - jsin(1w)] + ... h(N-1)[cos((N-1)w) - jsin((N-1)w)] , or
     
Can I calculate the frequency response of a FIR using the Discrete Fourier Transform (DFT)?
Yes. For an N-tap FIR, you can get N evenly-spaced points of the frequency response by doing a DFT on the filter coefficients. However, to get the frequency response of the filter at any arbitrary frequency (that is, at frequencies between the DFT outputs), you will need to use the formula above.

本文发布于:2024-09-24 04:23:06,感谢您对本站的认可!

本文链接:https://www.17tex.com/xueshu/297435.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:滤波   滑动   信号   卷积   进行   用于
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2024 Comsenz Inc.Powered by © 易纺专利技术学习网 豫ICP备2022007602号 豫公网安备41160202000603 站长QQ:729038198 关于我们 投诉建议