I am using a DSP processor to sample signals at 108kHz and I only want to get the DC part out of it. Such a high sampling rate is used because I want to use oversampling to reduce quantization noises.
Two filters are to be designed:
- One has 10Hz stop-band frequency; new data are read every 0.1 second;
- One has 0.1Hz stop-band frequency; new data are read every 10 second;
What I did
I used several stages of decimation and downsample the signals to 300Hz. Then I use FIRs to filter the signal:
- For the 10Hz bandwidth: 128 stage filters are used
- For the 0.1Hz bandwidth: 768 stage filters are used.
Performance is the most important to me: The sharper low-pass filters are, the better.
- Could I ask for suggestions in implementing such a filter?
- Is it possible to design a 0.01Hz low pass filter? If so, the new data can be read every 100 seconds?
- I heard that using IIRs could be a solution, is it?
Thank you very much!
Is averaging the best DC filter?
I tried to compare with matlab:
Setting 1: %Use Matlab fir1 function
size = 1080000; h = fir1(size, 0.00000000001); fvtool(h)
Setting 2: %Build an averaging FIR
size = 1080000; h = ones(1,size); h = h *1/size; fvtool(h)
The theory should be both two settings have similar performance. However, it seems that fir1 has narrower stopband than the simple average filter. It seems that the average DC filter will include more noises.