FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > FPGA

FPGA comp.arch.fpga newsgroup (usenet)

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-20-2008, 08:04 PM
From Sweden
Guest
 
Posts: n/a
Default How do I optimize filter coefficient bit length and signal bit length?

Hello all

I have made an 8 channel 500kHz low pass IIR-filter in VHDL. The filter uses
32 bits for it's coefficients and 32 bits for it's internal signals.

The filter doesn't give the same DC-gain for small vs. large input signals.
I suspect the internal truncation of the intermediate sums and states
effects this.

But today I thought about increasing the bits for the signal and decreasing
the bits for the coefficients. I tried it out and the filter gave better
gain over different input signal levels.

Now I wonder how I should optimize the coefficient and signal bit lengths to
get the best result?

Reply With Quote
  #2 (permalink)  
Old 05-20-2008, 08:55 PM
robert bristow-johnson
Guest
 
Posts: n/a
Default Re: How do I optimize filter coefficient bit length and signal bitlength?

On May 20, 3:04 pm, "From Sweden" <s...@sw.se> wrote:
> Hello all
>
> I have made an 8 channel 500kHz low pass IIR-filter in VHDL. The filter uses
> 32 bits for it's coefficients and 32 bits for it's internal signals.
>
> The filter doesn't give the same DC-gain for small vs. large input signals.
> I suspect the internal truncation of the intermediate sums and states
> effects this.
>
> But today I thought about increasing the bits for the signal and decreasing
> the bits for the coefficients. I tried it out and the filter gave better
> gain over different input signal levels.
>
> Now I wonder how I should optimize the coefficient and signal bit lengths to
> get the best result?


32 bits oughta be enough for nearly any application. a quantization
error of 1 part outa 4 bizillion? i mean, holy crap!!!

the consequences of quantizing coefficients is different from
quantizing the signal (or some internal intermediate signal).

quantizing coefficients means that the filter you get is not precisely
the one that you designed. the poles and zeros didn't go exactly to
where you wanted them to go. but with 32-bits it should easily be
close enough. how the coefs map to the poles and zeros depends on the
filter topology. what topology are you using? Direct Form 1 or
Direct Form 2 or Lattice or Normalized Ladder or some other? (i think
there is a Gold-Rader form, there's a bunch of them, some of which
have an internal All-pass filter that the rest of the thing is built
around. i am a partisan for the Direct Form 1 in fixed-point
applications.) what you do, is solve for the pole and zero loci as a
function of the coefs (that get quantized) and see what effect the
coef quantization has on the pole/zero locus. but dividing each of
two dimensions of the unit circle up into 4 bizillion slices should be
more than good enough.

consequences of quantizing the signal can range from a additive noise
model (if the signal amplitude is much, much larger than the
quantization level) to all sorts of nasties (harmonic distortion,
limit cycles). triangular PDF additive dither of 2 LSB amplitude is
sufficient to get rid of that stuff. i would think that at 32 bits,
simple 1st-order noise shaping (with a zero at DC) would suffice if
you got 32 bit words (no dither necessary). this particular error or
noise shaping requires one extra state in the DF1 and has been called
"fraction saving" and Randy Yates has written about it recently in the
IEEE Sig Proc magazine.

really, 32 bit words oughta be good enough.

r b-j
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change coefficient word length YFLuo FPGA 0 09-19-2006 04:21 AM
Trace length from FPGA to USB PHY praveen FPGA 1 04-30-2005 11:16 PM
FIR filter coefficient (with COE file) Yttrium FPGA 6 02-17-2004 06:20 PM
Re: verilog instance name length DSLuser Verilog 0 06-28-2003 05:21 AM


All times are GMT +1. The time now is 12:55 PM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved