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.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Analog Lowpass Filter in NI 9237 DSUB

Hello everybody!

 

I'm trying to acquire data from a force sensor with NI cDAQ-9174 and the module NI 9237 with DSUB.
Due to my measurment setup I receive a 50Hz noise. The setup cannot be changed, so I'd like to use an analog lowpass filter to get the low-frequency force signal.


Is there an analog lowpass filter inside the NI 9237? And if so, how can I turn it on?

 

Best regards!

 

0 Kudos
Message 1 of 2
(630 Views)

The 9237 will *always* engage its internal filter so the good news is that there's nothing for you to "turn on."   But wait, there's bad news too.

 

The minimum sample rate for the 9237 is about 1.6 kHz and the way the 9237 is designed, that'd put the lowpass filter cutoff at about 700 Hz.  So that isn't gonna do anything to help suppress 50 Hz.  Hold on though, there's more good news coming.

 

What you still *can* do is apply further filtering in software.  In a somewhat similar situation, I combined a Butterworth filter (chosen for its flat smooth pretty much unity gain in the passband) followed by a decimate-by-averaging process.

    You could maybe use a similar 2nd order Butterworth lowpass filter with a 5 Hz low cutoff freq -- that would attenuate any 50 Hz content by -40 db which works out to about 99% voltage attenuation.

    After filtering the original data, you can then pass it through a function like "Decimate (continuous)" with averaging set to True.  Let's suppose you capture at 2500 Hz and then read & filter 250 samples at a time, followed by decimating by a factor of 250.  You'll end up with data sampled at 10 Hz.    And now things get even better.

 

The 250 samples you average should contain pretty much exactly 5 cycles of the 50 Hz noise.  Averaging across an integer # of cycles will further drastically attenuate 50 Hz (and other multiples of 10 Hz) even more.

 

Give it a try and let us know how it worked out.  When it comes time to post back, do the following:

- run the code and show some results on the front panel

- from the menu, choose Edit->Make Current Values Default

- also from the menu, choose File->Save for Previous Version and then save back several years.  I usually go back to 2016.  (The reason is that most new posters tend to be using the latest LV version which many of the experienced people here offering help won't be using yet, so they won't be able to open and inspect an LV 2021 vi.)

 

 

-Kevin P

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
Message 2 of 2
(611 Views)