Trunction in Low Pass Filter

Status
Not open for further replies.

Mina Magdy

Member level 3
Joined
Jun 19, 2012
Messages
67
Helped
6
Reputation
12
Reaction score
5
Trophy points
1,288
Location
Cairo, Egypt
Visit site
Activity points
1,742
hi
i am trying to design FIR Low Pass Filter with i/p 8 bits
i know that when i multiply i increase the double the bits width ex: 1111 * 1111 = 1110 0001
and when i add two numbers i increase the bits width by 1 ex: 1111+0011= 10010

my problem is : the input bits is 8 bit and the output after adding and multiplying becomes 20 bit but the next block needs only 8 bit so i want to know which 12 bit i should truncate.


- - - Updated - - -

**broken link removed**
 

Usually, you truncate the LSBs. But for your filter, it looks like you have an overall gain of 0.38 before the sum. So the 2 MSBs are never going to be set. So you can probably discard the 2 MSBs and 10 LSBs. But I would run tests first to make sure.
 
The question is why you scaled the coefficients as they are? With all positive coefficients, it's quite easy to go for a DC gain of 1.
 
For a 1x5 FIR, the easiest coefficient set to implement is [1 4 6 4 1]/16, as it requires 0 multiplers - it is all accomplished with bitshifts. Your coefficients are very close to this setup - any reason you cannot use them?
 

i think iwill try to choose coefficents to make the total gain 1 and using a multiple of two coefficent
thanks

- - - Updated - - -

but this will affect the cut off frequency
 

This is where experimentation comes in. Is the change in cut off frequency acceptible when you can have coefficients that use very little logic? otherwise you can just scale your origional co-efficients and take the resource hit.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…