LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Correct start/end offset of the Butterworth filter

Solved!
Go to solution

Hello,

I am trying to use a phaseless Butterworth filter for a non-periodical signal but it does not fit the signal close to the beginning and end of the data sequence. I need to apply exactly the same functionality as in Diadem does the checkbox "correct start/end offset" but I could not find a way how to do this in Labview.

Could anybody help me with this?

Thank you

Miroslav

0 Kudos
Message 1 of 3
(2,090 Views)
Solution
Accepted by topic author cugnot

When you implement a phase-less filter, you replace each point with a function that involves points at some interval on both sides of the given point.  What points does your algorithm use that are to the left of the first point (i.e. that are acquired before you start acquiring data)?  What points does your algorithm use that are to the right of the last point (i.e. that would have been acquired after you stopped acquiring data)?

 

In the absence of these data points, one "reasonable" assumption is that the "missing points" are all 0.  Sometimes, however, this is obviously not true, as when you have a significant offset.  One way to remove the offset is to zero-mean your data (compute the mean and subtract it from all the points) -- this tends to diminish the offsets at both ends.  Another worry is that your data may have a persistent "drift", i.e. always growing (or shrinking) -- if this is true, you can fit a straight line through the data and get rid of both "drift" and "offset".

 

Finally, the "best" way to handle this is to figure out the half-width of your filter (say it works with data 1 second before and after the chosen data point) and take an extra half-width of data at the beginning and end that you "throw away", or, alternatively, discard the first half-width of points at the beginning and end of your filtered data.

 

It's a difficult lesson to learn, but you can't compute with data that you don't have, and we have not yet perfected VIs that can look into the past nor predict the future.

 

Bob Schor

Message 2 of 3
(2,053 Views)

Hello Bob,

thank you very much. Yes, the data I need to filter have significant trend. I am dealing with dynamic vehicle manoeuvres (like e.g. braking). Substracting a linear function so that the data start and end with zero and adding some zero points before and after seems to be the best solution.

Miroslav

0 Kudos
Message 3 of 3
(2,025 Views)