2 Replies Latest reply on Aug 1, 2018 9:23 PM by MitchGarside

# AF analysis using standard deviation and filtered values

I currently create daily filtered averages for many process parameters by having an AF attribute which creates a filtered version of the parameter (using an AF formula, and everything outside of limits =0), followed by a daily analysis which creates a daily average of this filtered value when it is >0. I would also like to create a daily standard deviation using the same filtered value, however, because the attribute used in the standard deviation formula has to be an AF attribute, I cannot figure out a way to remove these zero value from the analysis. on days where the parameters are outside of these limits, I end up with a large standard deviation as the filtered values contains several 0 values.

Is there anyway to filter properly for data going into a standard deviation analysis?

• ###### Re: AF analysis using standard deviation and filtered values

Hi Mitchell,

You can use IF condition to ignore the zero values from that Attribute and perform the standard deviation calculation. Below is the sample expression,

If 'Attribute1' <> 0 then StDev('Attribute1','*','*-1h') else "Bad Input"

-Vasanth.

• ###### Re: AF analysis using standard deviation and filtered values

Hi Vasanth,

The method you described above did not work for this case, but, I did figure out a way around it. With the filtered expressions, instead of setting a filtered value to zero, I set the value to 'BAD', which seems to be similar to the 'nooutput()' expression in analyses. Then in the analysis, I can simply do StDev('Attribute1','*','*-1d').

The formula is something along these lines

A=Power;B=|Power|Min;C=|Power|Max;D=SAG Mill Feed Rate Filter;[if (A>B and A<C and D>100) then A else BAD]

1 of 1 people found this helpful