码迷,mamicode.com
首页 > 其他好文 > 详细

FIR定点提高精度的trick02

时间:2018-02-05 23:14:12      阅读:170      评论:0      收藏:0      [点我收藏+]

标签:post   传统   ips   resid   image   trick   and   nal   sid   

作者:桂。

时间:2018-02-05  19:36:08

链接:http://www.cnblogs.com/xingshansi/p/8419182.html 


一、概述

  本文简要记录FIR的小trick,主要参考:

Shen, Zhi. “Improving FIR Filter Coefficient Precision [DSP Tips & Tricks].” IEEE Signal Processing Magazine 27 (2010): 120-124.

全文主要分两种实现结构:

  1)serial method.主要借助标志位flag,结合依次递减的无效位,利用移位寄存器实现。

  2)parallel method. serial method需要借助额外的标志位flag,增加了开销,parallel 则仅借助输出的幅度范围进行移位,一方面无需标志位,另一方面也不必逐一递减,增大了无效位宽,进一步提高滤波器精度。

 

二、算法简述

  A-serial method

 传统FIR滤波器:

技术分享图片

可以看到越到两边,滤波器的幅值越小,从而无效位越多。剔除一部分无效位,结合FLAG:

技术分享图片

具体实现结构:

技术分享图片

不增加位宽、不增加滤波器阶数,性能还不错,idea不错!

技术分享图片

  B-parallel method

 滤波器系数压缩:

技术分享图片

可以看出系数是越来越小,利用这个特性:

技术分享图片

具体操作流程:

Step 1 ■ : Repeatedly multiply an original b k floating-point coefficient (the upper left side of Figure 5) by two until the magnitude of the result resides in the optimum magnitude range R. Denote the number of necessary multiply-by-two operations as Q.
Step 2 ■ : Multiply the original bfloating-point coefficient by 2 B+Q-1 (the minus one in the exponent accounts for the final coefficient’s sign bit) and round the result to the nearest integer. That integer is our final value saved in ROM.
Step 3 ■ : Repeat Steps 1 and 2 for all the remaining original bk floating-point coefficients.

 符合预期,效果进一步提升:

 技术分享图片

对于传统FPGA,25x15的DSP48精度足够,该算法对于微芯片可能起一定作用,对于快速处理的FPGA平台个人认为意义不大。

FIR定点提高精度的trick02

标签:post   传统   ips   resid   image   trick   and   nal   sid   

原文地址:https://www.cnblogs.com/xingshansi/p/8419182.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!