I am on my first DSP project where I want to implement lowpass/highpass filters for ECG application. I have started from MATLAB to give me orders and coefficients for my desired specs. I prefer to go with FIR filters but as you know they require much higher orders than IIR filters. Since this is my first project I have no clue what ballpark should I have in mind for a filter order that runs in a DSP.(Analog Devices BlackFin)
So I decided to frame this question as a general call for advice, that what filter orders are DSP engineers comfortable with choosing for implementation. Is 100's of order very high for a DSP? Do they go with less than order of 10? 50?
I understand this is very much dependent on filter specs and my application. But I still want to know if there is a range to have in mind.
I hope I have been able to convey my question.
For custom FIR filter designs, I like to start with a gigantic, overkilled, power-of-2-length design given simply by the IFFT of the uniformly sampled desired (complex) frequency response, and then window it down to what I can afford to implement, checking the quality of the result via a forward FFT.
A worked example appears here:
This may help. Fig. 17-2 shows what frequency response you can achieve with FIR filters of different lengths.
IIRs would usually be anything between second order and maybe 16th order. Any more than that and you would probably be better off considering FIR. It depends on what selectivity you need - in other words how sharply you need to differentiate between wanted and unwanted frequencies.
FIRs on the other hand are easier to design if you have specific requirements of the phase characteristics. Linear phase designs are much more readily achieved using FIRs. The down-side is a delay between the input signal and output signal.
As you increase the number of points you'll eventually run out of either RAM or processing power. 100s of points strikes me as a fairly middle of the road number. I just recently had a minimum phase filter using an FIR with just over a thousand points, and had tons of headroom to spare. My eyebrows would probably raise if I saw someone doing 100s of thousands of points. I'm under the impression that ECG is pretty low bandwidth stuff, so I imagine you could implement some pretty aggressive FIRs with a black fin