FIR定点提高精度的trick_02
作者:桂。
時間: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 bk?floating-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定点提高精度的trick_02的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 数字人民币怎么抽奖
- 下一篇: FIR基本型仿真_03