LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

bi-directional exponential smoothing filter ????

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

0 Kudos
Message 1 of 7
(3,145 Views)

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.

0 Kudos
Message 2 of 7
(3,135 Views)

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.

 

 

0 Kudos
Message 3 of 7
(3,118 Views)

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)

 

Filter_spielerei2.png

 

Maybe you should provide more information about your signal (sampledata)  and what you want to look at.

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 4 of 7
(3,110 Views)
0 Kudos
Message 5 of 7
(3,098 Views)

anyone can help?

0 Kudos
Message 6 of 7
(3,064 Views)

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,

Spoiler
but I'm no longer in IxO9000, incremented 8025 😉 😄

 

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 7 of 7
(3,048 Views)