London LabVIEW User Group

cancel
Showing results for 
Search instead for 
Did you mean: 

Ever needed a rolling average filter for FPGA in LabVIEW?

The Problem

We needed to add some rolling average filters to some cRIO channels. Our first attempt was to add a 10 point rolling average filter to 24 channels using the LabVIEW rolling average VIs for FPGA, which fitted on to my FPGA with no problem. During testing we found that a 50 point average gave better results and also an additional 8 channels required filters.

However we still could not get 32×10 point average filters to fit, let alone 32×50 point filters! The filters would still not fit and were approximately 300% over. After making further adjustments we managed to reduced it to 150% but this was still no good.

The Solution

We discussed this with the wider Austin Consultants team and used a different approach. We started from scratch and had to re-think everything; all of the NI averaging, delay and bit shift VIs and feedback nodes use look up tables (LUT’s) and we didn’t have enough.

Our solution was to design and build our own Delay and Bit Shift functions using the FPGA RAM/Block Memory which gave us 32×256 point rolling average filters that only uses 35% of the available RAM on the FPGA and 61% of the available LUTs.

The amount of filtering is also selectable in powers of 2, so 0 (or no filtering), 2, 4, 8, 16, 32, 64, 128, 256.

The running speed of this is 10KHz so its still fairly fast. The graphic below shows it in action, switching between 0, 4point, 16 point, 64 point and the full 256 point.

A graph to show a rolling average filter for FPGA in LabVIEW

The post Ever needed a rolling average filter for FPGA in LabVIEW? appeared first on Austin Consultants.

0 Kudos
Message 1 of 1
(4,579 Views)