Compute the minimum order that an FIR filter
must have to meet the specifications. If the
signal is at least twice as long as the required
filter order, design and use that filter.
If the signal is not long enough, compute
the minimum order that an IIR filter must have to
meet the specifications. If the signal is at least
three times as long as the required filter order,
design and use that filter.
If the signal is not long enough, truncate the order to
one-third the signal length and design an IIR filter of that
order. The reduction in order comes at the expense of transition
band steepness.
Filter the signal and compensate for the
delay.