2020-01-09 05:24 PM
I did this a fair while ago, so even I have struggled to remember how it works exactly (I wish I added more comments back then). The attached files test/demonstrate an FIR routine that takes less than one cycle per tap. But it is only an 8 tap filter (with 8 taps I can fit all the delays and coefficients in registers). I'm not sure how useful it is. If someone knows the maths of how to string them together to create a more powerful filter then it would be of use. After all, simple analog filters are cascaded to create more powerful filters - why can't it be done for simple FIR filters? DSP guru(s) required. The filter has low start and end overhead and can be easily cascaded.
Please ensure you verify that it works properly before using with anything critical...
2020-01-12 07:40 PM
Hi
Smart thinking!
Of course you can cascade digital filters just like analog ones. And just like analog ones noise goes up with more stages. With analogues it is thermal noise, with digitals is is quantization noise caused by rounding or truncation of the computers variables. With clever filter architecture and scaling, rounding noise can be minimized.
I don't use fixed-point for my filters as I use processors which have floating point.. I tried fixed-point once and it didn't end well. Problem is I don't understand it fixed-point that well and I haven't had the need for really fast filters that would require fixed point. In a lot of situations fixed point filters when properly scaled will have smaller rounding errors and therefore noise that their floating point counterparts. This is because you can use more digits of precision to represent the values of the coefficients and signals. Of course if you get the scaling wrong and intermediate results get truncated or zero'd then the filter is rendered somewhat problematic.
Best regards
Rob
2020-01-13 01:22 AM
For ages I have been using fixed point arithmetic, and thought that I didn't really need a floating point processor - but now that I have been using a floating point processor I am totally addicted - it is so relaxing compared to my past fixed point methods. But with fixed point you can do two multiplies in one cycle (with the M4 core), so in time/power critical applications where the dynamic range is predictable, fixed point may still win - although those situations are diminishing because of the low power nature of all these modern ARM chips.