5.1 Fractional Filter Operations
Filtering the data sequence represented by fractional vector x[n] (0 ≤ n < N) is equivalent to solving the following difference equation for every nth sample, which results into the filtered data sequence y[n].
In this sense, the fractional filter is characterized by the fractional vectors a[p] (0 ≤ p < P) and b[m] (0 ≤ m < M), referred to as the set of filter coefficients, which are designed to induce some pre-specified changes in the signal represented by the input data sequence.
When filtering, it is important to know and manage the past history of the input and output data sequences (x[n], -M + 1 ≤ n < 0, and y[n], -P + 1 ≤ n < 0), which represent the initial conditions of the filtering operation. Also, when repeatedly applying the filter to contiguous sections of the input data sequence, it is necessary to remember the final state of the last filtering operation (x[n], N – M + 1 ≤ n < N – 1, and y[n], N – P + 1 ≤ n < N – 1). This final state is then taken into consideration for the calculations of the next filtering stage. Accounting for the past history and current state is required in order to perform a correct filtering operation.
The management of the past state and current state of a filtering operation is commonly implemented via additional sequences (also fractional vectors), referred to as the filter delay line. Prior to applying the filter operation, the delay describes the past state of the filter. After performing the filtering operation, the delay contains a set of the most recently filtered data samples and of the most recent output samples.
In the filter implementations provided with the DSP Library, the input data sequence is referred to as the sequence of source samples, while the resulting filtered sequence is called the destination samples. The filter coefficients (a,b) and delay are usually thought of as making up a filter structure. In all filter implementations, the input and output data samples may be allocated in default RAM memory space (X-Data or Y-Data). Filter coefficients may reside either in X-Data memory or program memory, and filter delay values must be accessed only from Y-Data.