Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
14 years ago

Round or truncate? 截取和舍入对滤波器输出精度影响?

turncat and rounding on the accuracy of the filter output?

designing filter with Fpga, there are two output modes, turncut and rounding. What effect on accuracy on Both methods have? Is there any way to minimize errors in the output? ? In addition, the Internet, said the biggest interception of errors, will bring the DC noise, does is correct? and which book has detailed studies about this?

Thank you! ! !

截取和舍入对滤波器输出精度影响?

fpga 设计滤波器,输出方式一般有两种, 截取和舍入。这两种方式对精度有什么影响?有什么方法可以使 输出的误差最小?? 另外,网上说 截取误差最大,会带来直流噪声,请问 是否正确,那本书上有详细论证,

谢谢大家!!!

14 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    If you look at Dave's posts after mine, you will see very good description of both noise and dc bias for various truncation algorithms. The case of direct truncation leads to truncation error of up to 1 LSB. Other cases lead to 0.5 LSB error. The actual error power will then depend on probaility issues and can be modelled same as quantisation noise of ADC sampling.

    --- Quote Start ---

    http://www.ovro.caltech.edu/~dwh/correlator/pdf/esc-100paper_hawkins.pdf (http://www.ovro.caltech.edu/%7edwh/correlator/pdf/esc-100paper_hawkins.pdf)

    http://www.ovro.caltech.edu/~dwh/correlator/pdf/esc-100slides_hawkins.pdf (http://www.ovro.caltech.edu/%7edwh/correlator/pdf/esc-100slides_hawkins.pdf)

    Look at p40 and p41 of the slides for examples of truncation noise and the different rounding methods available in MATLAB. The figures show the bias involved in all methods; and that convergent is the rounding method to select.

    --- Quote End ---

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi Dave,

    thanks for your disguise!!!

    In my project, the case is that I use the FIR compilier v9.0 to build a filter ,whic output width is 30 bits, but only 10 bits to need。So I choose the “round” output mode, and what different between this mode and the example of convergence you have given? ? ?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi Dave,

    thanks for your disguise!!!

    In my project, the case is that I use the FIR compilier v9.0 to build a filter ,whic output width is 30 bits, but only 10 bits to need。So I choose the “round” output mode, and what different between this mode and the example of convergence you have given? ? ?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    In my project, the case is that I use the FIR compilier v9.0 to build a filter ,whic output width is 30 bits, but only 10 bits to need。So I choose the “round” output mode, and what different between this mode and the example of convergence you have given?

    --- Quote End ---

    Re-read the discussion I had with Kaz. If the FIR compiler 'round' option uses the same method as the MATLAB round() function, and you then process the FIR filter output to measure the magnitude or power, then you will get a slight error in your estimate.

    However, Altera may just generically refer to the operation as 'rounding', but actually implement convergent rounding, or round-to-even. You will need to read the FIR compiler guide to see what it implements.

    Cheers,

    Dave