FIR 滤波器的优化(2)系数填充 Coefficient Padding

 这一点参考了别人的博客也不太理解?参考链接:https://blog.csdn.net/Reborn_Lee/article/details/82898252

实现滤波器所需的乘法器数量是通过滤波计算过程所需的乘法次数(考虑对称和半带系数结构和采样率变化),通过除以可用时钟频率来处理输入采样。 可用的时钟周期值总是向下取整,乘数器的数量则要向上取整。 如果存在非零余数,则部分MAC引擎要针对较少的滤波器系数进行计算,并且用零填充系数以适应过量周期。

如果在系数矢量中补充一些零值,则影响输出采样,即在指定的冲激响应输出之前会有一定数目的零输出。FIR编译器IP核根据系统时钟速率,采样率,抽头和通道数以及速率变化自动生成满足用户定义的性能要求的实现。 FIR编译器IP核插入一个或多个乘法器以满足总体吞吐量要求。


当使用MAC架构去实现一个拥有对称系数的滤波器时,你必须注意到,如果要求利用对称性,则由IP核重新组织滤波器系数,而这可能会改变滤波器的响应,尤其是相位响应; 

 例如,在实现一个30个抽头的对称滤波器时,如果IP核用4个4位的MAC单元来处理每个采样,则会在滤波器系数矢量中填充部分零系数,如图3-18示。填充零的个数由滤波器抽头数和要求实现的采样速率决定。本例中用4个 MAC 单元并行处理,为实现每4个MAC周期输出一个采样,每个单元处理的系数个数为4个,则共可以处理的系数值为4*4*2=32个,而滤波器抽头数为30,因此需要填充2个零系数,考虑到滤波器系数是对称的,因此将第一个和最后一个系数置零。

在非零系数之后的附加零不影响滤波器响应,但是与理想系数相比,前置零系数会改变滤波器的相位响应。 有两种方法可以避免这个问题:

The appended zeroes after the non-zero coefficients do not affect the filter response, but the prepended zero coefficients do alter the phase response of the filter implementation when compared to the ideal coefficients. There are two ways to avoid this issue: First, and simplest, you can force the Coefficient Structure to be Non-Symmetric. This avoids the issue
of prepending zero coefficients to the coefficient vector, and only appended zeroes are used to pad out the filter response to the required number of cycles. Second, and more efficient, you can increase the number of taps implemented by the filter at little or no cost in resource usage. In the previous example, the filter could process 32 taps in the same time, with the same hardware resources, and with the same cycle latency as the 30-tap implementation, and the phase response of the 32-tap filter would be unaltered.
The Vivado IDE displays the actual number of coefficients calculated on the Implementation Details tab. You can use this information to determine if you can increase the number of coefficients used by your filter definition.

 (1)强制系数结构为非对称,这避免了将零系数预先设置到系数向量的问题,并且仅使用附加的零来将滤波器响应填充到所需的循环数

(2)增加滤波器的抽头数,如上例中可以在不改变响应的情况下将抽头系数由30变为32;Vivado IDE显示在“实施细节”选项卡上计算的实际系数数量,可以使用此信息来确定是否可以增加过滤器定义使用的系数数量。

  • 2
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值