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.

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:

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*) − *a*_{1}*t*(*n* − 1) − … − *a*_{p}*t*(*n* − *p*)

then the calculation of:

*o*(*n*) = *b*_{0}*t*(*n*) + *b*_{1}*t*(*n* − 1) + … + *b*_{p}*t*(*n* − *p*)

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

Start Free Trial

No credit card required