LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

An averaging filter that tightens depending on slope??

Hello all,

I have an application where a variable (DBL scalar) is shown in a graph to be bouncing above and below the target setpoint @ approx 1-5sec intervals.  In other words, if the setpoint is 1500lbs, the variable bounces between 1250 and 1750lbs, which is +/-250lbs and it does this bouncing @ approx 0.2 to 1 Hz.  The customer wants me to show the average instead of the real-time.... so the graph would show a horizontal line @ 1500lbs in the above example.  They dont want to see the ripple.  So, I pulled out the "Mean PtbyPt.vi" function and as long as I increase the sample length adequately it does exactly what my customer wants.  Heres my problem...  When the process starts or ends and the weight returns to zero lbs, the mean is very, very slow to respond.

 

Is there a way to make it "come into" and "out of" the target zone quickly, but filter the heck out of it when it is in the zone?  I am thinking of making my own function that would look @ the slope.  If the slope is less than a certain threshold, then the "Mean PtbyPt" sample length is long, but if the slope is greater than a certain threshold, then the "Mean PtbyPt" sample length is short.  Since I am just learning labview now and I have never used any of the filters or signal processing functions before, I feel like I might be recreating something that already exists?  Would any of these help me?  FIR, IIR, Chebyshev, Butterworth?  I am glad to learn all of these things, but to accomplish my task efficiently without chasing my tail, can anyone point me in a helpful direction?

 

Thank you very much for any input.

respectfully,

frenchy

0 Kudos
Message 1 of 2
(2,598 Views)

Hai,

 

For the task like reducing jitter moving average serves good.  It's takes "number of points" to average.  A simple example is if you had a data set with 100 data points, the first value of the moving average might be the arithmetic mean (one simple type of average) of data points 1 through 25. The next value would be this simple average of data points 2 through 26, and so forth, until the final value, which would be the same simple average of data points 76 through 100.

The VI can be found in the following link: http://zone.ni.com/devzone/cda/epd/p/id/82

Hope this helps.

With regards,
JK
(Certified LabVIEW Developer)
Give Kudos for Good Answers, and Mark it a solution if your problem is solved.
Message 2 of 2
(2,584 Views)