ni / niveristand-scan-engine-ethercat-custom-device

Provides NI Scan Engine, EtherCAT and Remote IO support for NI VeriStand
MIT License
16 stars 22 forks source link

NI-9237 Bridge Signal Aliasing #179

Closed tarmanan closed 2 years ago

tarmanan commented 2 years ago

Please describe the problem you're facing. VeriStand workspace graph and data acquisition of channel[s] in NI-9237 experiencing aliasing ++Data acquisition of bridge input [gaged shaft for torque] with NI-9237 located in local chassis ++Target Rate & Data Acquisition Rate == 100 Hz

All 6 channels on NI-9237 modules, located in cRIO-9045 chassis are experiencing aliasing

Large signal variations in the Torque channel are caused by the signal alias image

Describe the expected behavior Cleaner signals without aliasing

Describe troubleshooting steps you've taken. 1] Review documentation:
++ Confirmed NI-9237 has anti-alias filter but it is unclear how to make any adjustments: https://www.ni.com/en-us/support/documentation/supplemental/18/c-series-modules-with-anti-aliasing-filters.html ++ Details of filtering in NI-9237: https://www.ni.com/pdf/manuals/374186a_02.pdf 2] Attempted a Low Pass Filter [33 Hz] in VeriStand - still aliased 3] Performed speed [RPM] sweep and confirmed aliasing in waterfall plot 4] Attempted different sampling frequencies and speeds to confirm aliasing of signal 5] Looked at module in MAX to see if any hardware settings of the NI-9237 are possible, regarding anti-aliasing filters image

Additional context VeriStand 2019 SP1 cRIO-9045 with Linux_x64 OS Scan Engine for EtherCAT v. 20.4.0

1] Are there any adjustments or enabling of the NI-9237 module required? The only change to be made in VeriStand EtherCAT custom device is ADC image 2] Does this Custom Device enable the anti-aliasing function of the NI-9237 and other cModules listed here: https://www.ni.com/en-us/support/documentation/supplemental/18/c-series-modules-with-anti-aliasing-filters.html

Karl-G1 commented 2 years ago

@tarmanan

  1. As @rtzoeller mentioned in his reply on #178, we confirmed that all available properties exposed by the 9237 module in Scan Mode on a cRIO are exposed via the Custom Device already. There are no settings exposed in the Custom Device (or in LabVIEW) for controlling filtering.
  2. It appears the filtering for the 9237 is in hardware and not exposed via software configuration. I would suggest working with NI support to investigate the filtering in depth, which can be done outside of VeriStand and the Custom Device.
tarmanan commented 2 years ago

Thank you very much for looking into this, @Karl-G1 . I'll reach out to NI support.

tarmanan commented 2 years ago

There may be an opportunity to clarify the impact of the "ADC Sampling Rate" setting: per NI support, the Master Timebase is from the module [12.8 MHz] so the ADC Sampling Rate impacts the anti-alias filter.

For example, as the Master Timebase is 12.8 MHz, if the ADC Sampling Rate is 50 kS/s, the anti alias filter cutoff = (50,000 Hz x 0.45) = 22,500 Hz. I modified the ADC Sampling rate for my 9237 and 9229 modules to 1.613 kS/s so that the anti-alias filter cutoff is 725 Hz and it significantly improved the signal.

NI 9227 9229 9237 Anti Alias Calculations.xlsx

image