- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Hello,

I'm trying to implement a band pass filter using FIR Compiler IP Core (ver. 9.0). My input is a 24 bit signal. My output should also be 24 bit. I'm getting 36 bits output from the wizard. I dont want to distort the signal and I understand that some of the MSB \LSB should be cut with the wizard in order to create 24 bit output. During simulations I found out that some of the MSB bits are changing simultaneously i.e. the signal is attanuated. I can restore the signal by truncating this "problematic" MSBs (which is equals to amplifying the output signal). However, if I change the coefficients set, the number of "problematic" MSBs changes, so that different truncation should be applicated. I need to know how the coefficients sets affect on the output bits so I could find out what should be the correct truncation for every coefficients sets I use. Can somebody help me plz? 10x!Link Copied

3 Replies

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

For any filter you need to target unity gain at some ref point. For LPF this ref point is the dc. For HPF it is the .5(Nyquist). For bandpass filter, the best way is to compute the mean power(rms) of filter response within the band then inverse of that should be your filter gain. e.g. if this mean power turns out to be .9 then 1/.9 should be your gain. i.e. multiply coeffs by 1/.9 Whats left is how to scale it for hardware. If your coeffs are 16 bits signed then scale up as follows:

coeff = round(2^15*coeff); then truncate 15 LSBs and hence any remaining MSBs plus saturation logic. To get mean power you need to do fft on coeffs or use freqz.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Hi,

thank you. I didn't quite understand how this formula can help me decide how many MSBs and LSBs I need to cut... and I tried your method and my FIR still attenuates the signal. Can I please get an example of a Band Pass Filter settings? thank you very much! asaf- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page