Chapter 5

Filter Implementation

Mathematically speaking, using the filter with the transfer function H(z) for filtering the sequence x(n) leads to a perfectly determined result. However, depending on the practical implementation of the filter, the results can vary in terms of precision, speed, etc. This chapter deals with the technical aspects of filtering. If you restrict yourself to a “simulation” approach, as we have up until now, the filter function is everything you will ever need. However, if this filtering operation has to be implemented, its effectiveness requires some additional knowledge that will be detailed in this chapter.

5.1    Filter implementation

5.1.1    Examples of filter structures

In this paragraph, we will study the implementation of the filtering function, in other words its programming. Figure 5.1 shows a particular implementation called the canonical direct form of a general recursive filter with the transfer function:

Image

Choosing the same degree for both the numerator and the denominator does not restrict us in any way; you need only consider that some of the coefficients can be equal to zero.

This “implementation” first performs the calculation of:

t(n) = i(n) − a1t(n − 1) − … − apt(np)

then the calculation of:

o(n) = b0t(n) + b1t(n − 1) + … + bpt(np)

Figure 5.1Processing architecture

where {i(n)} and {o(n)} are the input and output sequences ...

Get Digital Signal and Image Processing Using MATLAB now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.