Q10039 Selecting data types for FIR filters
DAPstudio allows me to design finite impulse response (FIR) filters with the filter kernel in any data type I want. Which data type is best?
If dynamic range is an issue, pick a floating point data type because the filtering works well over very wide scaling ranges.
If you have highly precise data, or need an exceptionally long filter kernel, select a float, double, or long integer data type. These do a better job of preserving your significant bits.
If data are already in a special data type for some specific reason, filter using that data type.
Otherwise, the word
(short) integer data type is typically the
best match for sampled data and works fine. This might not be obvious, because
selecting the word
data type (right click on the plot) seems to
produce erratic differences in the frequency response curve. These effects are
not as significant as they might appear.
The following three plots show the same filter design, but with different precision options.
With The three blue lines show the noise levels expected because of digitization, regardless of filtering, for rounding to 12, 14, and 16 bits.

With the fixedpoint design, rounding filter coefficients to integers results in small, unpredictable variations. Where these happen to match apparent patterns from digitizing certain frequencies, this produced an elevated response. With response peaks near the second blue line, this means an absolute maximum signal in the stopband could produce an observable effect on the 14th bit. As a practical matter, this cannot happen, or there could be no energy in the signal band you care about. For a more plausible case that the interfering high frequency is 10% of the main band (20 dB), not even the last bit is affected.

The

L