Given a sampled signal s [n], the output of an FIR filter would be given by the following code : |
output [n] = b0 * s [n] + b1 * s [n-1] + ... + b9 * s [n - 9] ;
In order to filter the signal s, the above relationship is calculated for each sample s [n], resulting in a filtered output with the same number of samples as the input signal. For values of n where the signals is not defined, the value of s[n] can be assumed to be zero. |
The filter above has 10 coefficients (b0..b9) and operates on only 10 samples of the input at any one time. Hence Finite Impulse Response. |
The coefficients are usually constants but they don't have to be. Time varying filters are possible. |
DSP people often refer to the 'order' of an FIR filters. An FIR filter with N+1 coefficients is an Nth order filter. |