LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Filter to Extract and Smooth DC Level

I am trying to filter and smooth the peak DC level of 100kHz sampled data. I can't seem to find a suitable filter that filters and smooths the data without rounding off the leading edge of the signal and/or creating new artifacts like undershoot, overshoot, extended rise time, etc. I have attached a VI with sample data. I have included some of the more promising filters I have tried. In the end I am looking for as flat of a DC level as I can achieve with minimal rise time at the 100ms mark without adding additional artifacts.   

0 Kudos
Message 1 of 6
(3,448 Views)

Hi Aaron,

 

can you attach your "SmartSmoothingFilter" subVI too?

 

Btw. when comparing your original data with any of the filtered ones all of them are quite nice… 😄

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(3,438 Views)

Sorry forgot about that one. Here are both files...

Download All
0 Kudos
Message 3 of 6
(3,425 Views)

Hi Aaron,

 

you should use the original and the Median-Savitzky-Golay-w-Butterworth:

Use the original filter for the parts of your signal with big changes and the Median for parts with low changes.

 

Then again: keep in mind the comparison of the filtered result with your original data - it has be senseful in the end…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(3,422 Views)

Yea I liked that one as well however I am not thrilled with the ~75ms hit I get on the rise time. If I could figure out a way to reliability grab the unfiltered data at the beginning power on rise and then just apply the filter to the data after that would probably work.   

0 Kudos
Message 5 of 6
(3,416 Views)

Hi Aaron,

 

calculate the running stdev of your data. When your "data rise to noise" this stdev will get bigger. Use this to decide for unfiltered or filtered output…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 6
(3,383 Views)