03-13-2014 05:44 AM
Hello,
I am trying to configure a exponential smoothing filter to smooth my data. I used the signal analysis Express -- filter configure function (please see the attachment). When I run the filter, the filtered signal profile was moving to one direction. To solve this, a bi-directional exponential smoothing filer should be used in my case. But the Expresss function does not allow to select this (it has only one smoothing direction).
Could anyone can give me some advice how to obtain a bi-directional exponential smoothing filer in LV?
Many thanks.
Zeng
03-13-2014 06:07 AM
Is there some reason you couldn't just call it twice? Reverse your data for one call so it smooths in the opposite direction to prevent any signal shift.
03-13-2014 07:11 AM
Thanks for your kind support.
Actually I did try what you mean: single exponential smoothing the raw data in forward direction, and then reverse the filtered data, do a second single-exponential smoothing, and then reverse the filtered data to the original order. The problem is that the generated signal shift by the first smoothing processing could not be comprimised by the 2nd smoothing proccessing. This is becasue the first smoothing processing is with a 'rough' raw data while the 2nd smoothing processing is with a 'filtered' data, i.e. the signal shift caused by the 1st smoothing processing is larger than that by 2nd smoothing.
I also tried:
(1) single smoothing the RAW data to get A;
(2) single smoothing the reversed RAWw data to get B;
(3) [A+ reverse(B)] / 2
In the result of (3) the signal shift seems to be ok compared to the raw data profile BUT the smoothing effect is worse than that of a single smoothing. It seems this is still not the correct way to realize bi-directional exponential smoothing.
03-13-2014 08:49 AM
Sorry, i couldn't reproduce your problem.
Here is my quick try: White: org, red: filtered once and yellow: filtered twice (reverted)
If you look at the phase: no big differences (migth be also due to filter, window and FFT artifacts)
Maybe you should provide more information about your signal (sampledata) and what you want to look at.
03-13-2014 10:33 AM - edited 03-13-2014 10:49 AM
Thanks. please see the attachments
03-15-2014 02:05 PM
anyone can help?
03-15-2014 07:05 PM - edited 03-15-2014 07:12 PM
Without information what the dll exactly is doing, you will have a hard time to EXACTLY reproduce the output.
So the question is why do need to reproduce it exactly?
What is the physics behind it?
A 'magic' filter is nice if you want to have a 'nice' or 'magic' result. But if you can't explain the physics, it's worthless from the point of metrology.
But I have another tip for you:
To minimize filter artifacs sometimes people take the fist and the last value, substract that as a linear offset, filter and add the offset again.
Or the take the mean of 10 or <no. of smothing points> points from head and tail.. or ...
Ignore the first and last 40 points (twice the filter length) and 'result' locks pretty close to what you want so badly 😉
Too bad if there is no detailed documentation... never would pass my audit if qualitity relevant,