LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Voltage Boxcar/Moving Average Filter

Solved!
Go to solution

Hello everyone!

I'm currently working with a USB-6009 that sends voltage data to LabVIEW, and I'm struggling with a large amount of noise in the signal.  Unfortunately, I'm new to LabVIEW and am thus struggling with filtering the signal.  I've attached my VI file, and I was just wondering if anyone knew how I could install a boxcar filter (aka a moving average filter or a rolling average filter) within this file.

 

Thank you in advance for your help!
Katie

0 Kudos
Message 1 of 7
(4,308 Views)

Is it possible for you to do any physical filtering on the signal?  Unless you've got a single that is out of your control lots of time you can fix noise by checking for ground loops or applying a simple hi/low pass filter with a capacitor.  I'd recommend that over attempting it in software if at all possible.  It's not wrong to do it in software per say, but if you can get a better physical signal it would be a good place to start.  Is that possible?

0 Kudos
Message 2 of 7
(4,286 Views)
Solution
Accepted by topic author katieh412

Something like this?

rolling average.png

Message 3 of 7
(4,277 Views)

Nevermind what I said ^this is perfect^.  Do this^^^^ Smiley Very Happy

0 Kudos
Message 4 of 7
(4,271 Views)

Thank you all so much for your help with this, I'll work to create a boxcar filter with this guidance and keep you posted!

0 Kudos
Message 5 of 7
(4,210 Views)

Of course, you'll probably want to rotate the array to get values before and after.

Or a conditional output on the index to delay for half the number of samples

0 Kudos
Message 6 of 7
(4,203 Views)

Thank you all for your help!  Unfortunately, once I realized how complicated this would be in LabVIEW, I decided to use MATLAB as I have additional experience with this software.  I hope that these responses will be helpful for others with more experience that are wishing to use LabVIEW!

0 Kudos
Message 7 of 7
(4,189 Views)