Hello! I'm trying to implement a 16 bit fixed point IIR filter on my board, but i'm not getting the expected response. For example, I'm trying to generate a 200Hz wide bandpass filter centered around 1500Hz. All my inputs should be listed in the code below along with my coefficients that i'm generating from the matlab program. I then copy past the coeficients into my code so that I can use the IIR filter, however the magnitude of my signal is not coming out as expected.
#define IIR16_LPF_COEFF {\
-915,1642,-35,0,35,\
-971,1636,280,-416,280,\
-978,1741,14475,-26374,14475,}
#define IIR16_LPF_ISF 45
#define IIR16_LPF_NBIQ 3
#define IIR16_LPF_QFMAT 10
\\Below are the inputs used to create the filter coefficients in matlab
\\Filter Type: Chebyshev(Type 2)
\\Filter Type: Band Pass
\\Sampling Freqency (Hz): 16384
\\Pass band Ripples (dB): 1
\\Stop band Ripples (dB): 36
\\Lower Stop Band Corner Frequency (Hz): 1150
\\Lower Pass Band Corner Frequency (Hz): 1400
\\Upper Pass Band Corner Frequency (Hz): 1600
\\Upper Stop Band Corner Frequency (Hz): 1850
I'm inputing into my ADC a 1500Hz signal with an amplitude of 2.16V. I'm then taking this signal, putting it through my filter, and then outputting the result to the DAC. When using the filter, my output comes out at 1.24V. If I skip over the filter and just output what comes into my ADC, I get the exact same signal out as expected. Does anyone know why i'm only getting a 57% amplitude on this filter when I should be getting 100%? Thanks for any input!
-Greg