Fixed-Point FIR Filter

The fixed-point FIR filter model can be created in the Ptolemy II schematic editor called Vergil, as shown below:

An impulse is sent through three version of the FIR filter. The middle filter uses only double-precision floating point. The bottom filter operates on a stream of doubles but uses taps that have been quantized using the quantize() function in the expression language. This quantize function fits the coefficients of the FIR filter into an 8 bit representation, of which 2 bits are used for the integer part. The upper filter operates on fix point tokens. This instance of the FIR filter uses fixed-point versions of the coefficients using the fix() function in the expression language. This function converts each tap value into a fix point representation using 6 bits of which 2 bits are used to represent the integer part.