Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

FIXED POINT DIGITAL FILTER Using integer math, a fixed-point digital filter is i

ID: 3863386 • Letter: F

Question


FIXED POINT DIGITAL FILTER

Using integer math, a fixed-point digital filter is implemented with the (pseudo/C) code: FilterOut = 2240*SensorVal[0] - 2240*SensorVal[2] + 25519*FilterOutput[1] - 11904*FilterOutput[2]; FilterOutput[0] = FilterOut >> 14; for (k=0; k=1; k++) {SensorVal[2-k]= SensorVal[1-k]; FilterOutput[2-k]= FilterOutput[1-k];} In the code, the variables SensorVal and FilterOutput are arrays of (unsigned) integers in which FilterOuputo[0] denotes the recent filter output, whereas FilterOuput[k] and SensorVal[k] with k>0 denote the "previous" values of filter output and filter input respectively. Using this pseudo/C code: Check the stability of the discrete-time filter via the numerical analysis of the filter coefficients. Verify the frequency response of the filter and comment whether this is a high/low or bandpass filter

Explanation / Answer

The Fixed-Point Designer software addresses the needs of the control system, signal processing, and other fields where algorithms are implemented on fixed-point hardware. In signal processing, a digital filter is a computational algorithm that converts a sequence of input numbers to a sequence of output numbers. The algorithm is designed such that the output signal meets frequency-domain or time-domain constraints (desirable frequency components are passed, undesirable components are rejected).

In general terms, a discrete transfer function controller is a form of a digital filter. However, a digital controller can contain nonlinear functions such as lookup tables in addition to a discrete transfer function. This guide uses the term digital filter when referring to discrete transfer functions.

Note:   To design and implement a wide variety of floating-point and fixed-point filters suitable for use in signal processing applications and for deployment on DSP chips, use the DSP System Toolbox™ software.

Realizations and Data Types

In an ideal world, where numbers, calculations, and storage of states have infinite precision and range, there are virtually an infinite number of realizations for the same system. In theory, these realizations are all identical.

In the more realistic world of double-precision numbers, calculations, and storage of states, small nonlinearities are introduced by the finite precision and range of floating-point data types. Therefore, each realization of a given system produces different results. In most cases however, these differences are small.

In the world of fixed-point numbers, where precision and range are limited, the differences in the realization results can be very large. Therefore, you must carefully select the data type, word size, and scaling for each realization element such that results are accurately represented. To assist you with this selection, design rules for modeling dynamic systems with fixed-point math are provided in Targeting an Embedded Processor.

Note:   To design and implement a wide variety of floating-point and fixed-point filters suitable for use in signal processing applications and for deployment on DSP chips, use the DSP System Toolbox™ software.