From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

What Enterprise filtering capability would one use to reduce noise in a DC steady state voltage reading?

Like the title says, What Enterprise filtering capability would one use to reduce noise in a DC steady state voltage reading?

I use a 4 Hz filter when using SCXI, but our CompactDAQ systems do not have this feature.  How can I clean up their noise?

Thanks!
Programming Data Acquisition and Control in Measurement Studio and Labwindows/CVI
0 Kudos
Message 1 of 5
(3,294 Views)
The filter methods you are looking for are located in the namespace NationalInstruments.Analysis.Dsp.Filters. The SCXI filter is just a very simple lowpass filter and the Measurement Studio filters use different algorithms for filtering. You can choose to use any of the low pass filters and should be able to get the same type of results, it would then just be preference to which lowpass filter you'd like to use. You may consider trying out a few of them, if you're not sure which you would like to use, and see if one gives better results for your specific data and noise.

Brandon Vasquez | Software Engineer | Integration Services | National Instruments
0 Kudos
Message 2 of 5
(3,284 Views)
So I should instantiate a filter and set it to the sample rate that I am using to read data and set a 4 Hz filter....  I get that, but if I have a 2D array where the first index is the channel and the second index stores 100 readings for each channel, how will I implement the filter on that data without making individual arrays for each channel?

I need to do something like this...  For each channel ('w'), I need to filter data (y,0-99).

        Dim filter As New NationalInstruments.Analysis.Dsp.Filters.BesselLowpassFilter(1, 100, 4)
        DataArray(w, ) = filter.FilterData(Task1Data(y, ))

But this is not acceptable VB syntax.

Any ideas?

Thanks!
Programming Data Acquisition and Control in Measurement Studio and Labwindows/CVI
0 Kudos
Message 3 of 5
(3,283 Views)
One way you could do this is by creating a temporary 1-D array and going through a For loop to get the 100 values to that array and possibly have this inside another for loop which will take that 1-D array, run the filter and then place the new values in the correct index of the original array. So (psuedo code) for example


2DArray, 1DArray
i = 0
x = 0

For each 2DArray[i][x] incrementing i
     For each 1DArray[x] incrementing x
          1DArray[x] = 2DArray[i][x]
     filter.FilterData(1DArray)
     x = 0
     For each 1DArray[x] incrementing x
          2DArray[i][x] = 1DArray[x]


This is not correct syntax but you should be able to see where I'm going with this. This would be the approach I would try for this.

Brandon Vasquez | Software Engineer | Integration Services | National Instruments
0 Kudos
Message 4 of 5
(3,269 Views)
I thought of that, but wanted to avoid the overhead.  I will try it and report back with my findings.
Programming Data Acquisition and Control in Measurement Studio and Labwindows/CVI
0 Kudos
Message 5 of 5
(3,266 Views)