FIR定点提高精度的trick_02
作者:桂。
時(shí)間:2018-02-05??19:36:08
鏈接:http://www.cnblogs.com/xingshansi/p/8419182.html?
一、概述
本文簡(jiǎn)要記錄FIR的小trick,主要參考:
Shen, Zhi. “Improving FIR Filter Coefficient Precision [DSP Tips & Tricks].”?IEEE Signal Processing Magazine?27 (2010): 120-124.
全文主要分兩種實(shí)現(xiàn)結(jié)構(gòu):
1)serial method.主要借助標(biāo)志位flag,結(jié)合依次遞減的無(wú)效位,利用移位寄存器實(shí)現(xiàn)。
2)parallel method. serial method需要借助額外的標(biāo)志位flag,增加了開(kāi)銷(xiāo),parallel 則僅借助輸出的幅度范圍進(jìn)行移位,一方面無(wú)需標(biāo)志位,另一方面也不必逐一遞減,增大了無(wú)效位寬,進(jìn)一步提高濾波器精度。
?
二、算法簡(jiǎn)述
A-serial method
?傳統(tǒng)FIR濾波器:
可以看到越到兩邊,濾波器的幅值越小,從而無(wú)效位越多。剔除一部分無(wú)效位,結(jié)合FLAG:
具體實(shí)現(xiàn)結(jié)構(gòu):
不增加位寬、不增加濾波器階數(shù),性能還不錯(cuò),idea不錯(cuò)!
B-parallel method
?濾波器系數(shù)壓縮:
可以看出系數(shù)是越來(lái)越小,利用這個(gè)特性:
具體操作流程:
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.
?符合預(yù)期,效果進(jìn)一步提升:
?
對(duì)于傳統(tǒng)FPGA,25x15的DSP48精度足夠,該算法對(duì)于微芯片可能起一定作用,對(duì)于快速處理的FPGA平臺(tái)個(gè)人認(rèn)為意義不大。
總結(jié)
以上是生活随笔為你收集整理的FIR定点提高精度的trick_02的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 数字人民币怎么抽奖
- 下一篇: FIR基本型仿真_03