Clear Filters
Clear Filters

Noisy data- Session vs Legacy Command

3 views (last 30 days)
pavithra padmanathan
pavithra padmanathan on 9 May 2022
Answered: Varun on 31 Jan 2024
Hi, I have a NI-DAQ USB-6225 in our application that we use to calculate the circularity of 6 rail sections with 6 gaps between them. We are using a Session based Matlab command to define 4 channels , set the ranges and begin data collection through a sesnor. What we are noticing is unwanted noise. , that is simply not there if a Legacy based command is used.
It does not look like electrical noise, but just noisier data at every step in comparison. Any reason why a session based command would add random noise in comparson to a Legacy based command . We verified our wiring ot the DAQ box, sensors and etc and we are down to wondering if this differnce in code is attributing to any such noise. How can I filter it out

Answers (1)

Varun
Varun on 31 Jan 2024
Hi Pavithra,
Looks like you are experiencing difference in noise between the Session-based and Legacy-based commands. It might be attributed to various factors, including differences in default settings, synchronization, or other internal configurations between the two methods.
Consider comparing the default settings used by the Session-based command and the Legacy-based command. Also, verify that the Session-based command is properly configured for synchronization. In some cases, differences in synchronization settings can result in additional noise.
You can apply digital filtering techniques to your data to remove unwanted noise. MATLAB provides various filter design and implementation functions, such as “designfilt” and “filter”. You can design a filter based on your application's requirements and apply it to your acquired data.
Please refer to the following example:
% Design a low-pass Butterworth filter
filterOrder = 4;
cutoffFrequency = 1000; % Adjust as needed
fs = yourSamplingRate; % Replace with your actual sampling rate
lowpassFilter = designfilt('lowpassfir', ...
'FilterOrder', filterOrder, ...
'CutoffFrequency', cutoffFrequency, ...
'SampleRate', fs);
% Apply the filter to your data
filteredData = filtfilt(lowpassFilter, yourRawData);
Please refer to the following documentations to learn more:
Hope it helps.

Tags

Products


Release

R2016b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!