Sam (r�p. sans -no-sp-am) wrote:> Thank you for all these answers ! > > The only thing I would know is how many bits wide should I take for the > intermediate results when I use an IIR filter. The input data is 24 bit. > Should I use more than 24 bits to calculate the partial products, or not ? > > Thank you ! > > SamYes -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Bus width between registers in IIR
Started by ●March 23, 2004
Reply by ●March 24, 20042004-03-24
Reply by ●March 24, 20042004-03-24
"Sam (r�p. sans -no-sp-am)" <totalsam-no-sp-am@hotmail.com> wrote in message news:4061ec72$0$702$5402220f@news.sunrise.ch...> Thank you for all these answers ! > > The only thing I would know is how many bits wide should I take for the > intermediate results when I use an IIR filter. The input data is 24 bit. > Should I use more than 24 bits to calculate the partial products, or not ? > > Thank you ! > > SamThere is no one answer for all IIR filters. You need to figure out what the maximum value *your system* can produce relative to the input scale for *your* desired IIR structure and how many bits you need for *your* desired IIR structure to get the stability and noise to acceptable levels.
Reply by ●March 25, 20042004-03-25
> The only thing I would know is how many bits wide should I take for the > intermediate results when I use an IIR filter. The input data is 24 bit. > Should I use more than 24 bits to calculate the partial products, or not ?You need to add some MSBs. The number of them depends on the filter sharpness. If the filter is rather selectable you have to add even 8-12 MSBs. Therefore the best solution is to simulate the filter with real signals, investigate the overflows, and select the minimum bit number which does not make the overflow. A.Ser.
Reply by ●March 25, 20042004-03-25
If the overflows are internal only, ie. if the added MSBs are not propagated all the way to the output, then you don't need to add them provided your number system is modular (2's complement is). The arithmetic operations in the filter are such that if you change one bit of an operand, only that bit and bits to the left of it are affected. Therefore, overflow bits internally do not affect output bits with less significance. Anatoli Sergienko wrote:> > The only thing I would know is how many bits wide should I take for the > > intermediate results when I use an IIR filter. The input data is 24 bit. > > Should I use more than 24 bits to calculate the partial products, or not ? > > You need to add some MSBs. > The number of them depends on the filter sharpness. > If the filter is rather selectable you have to add even 8-12 MSBs. > Therefore the best solution is to simulate the filter with real signals, > investigate the overflows, > and select the minimum bit number which does not make the overflow. > > A.Ser.-- --Ray Andraka, P.E. President, the Andraka Consulting Group, Inc. 401/884-7930 Fax 401/884-7950 email ray@andraka.com http://www.andraka.com "They that give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin, 1759