Any thoughts on how to calculate the standard deviation of loop error? Ideally I need to be able to subtract the loop setpoint from the loop process value as the setpoint will change over the day.

Both the loop setpoint and the process value have been set up to store history. I can create a table showing both of these values for the day in question but can’t figure out a way of subtracting the two columns to get the loop error.

I could set up a db/calculated tag and log this and calculate the standard deviation fairly easily using the built in standard deviation function, but logging the error seems redundant since I should be able to determine the error from looking at the setpoint and process value… I just can’t figure out how to do this elegantly without resorting to scripting.

All of this is to provide a means of evaluating how much variation there is in the process, I’d like to combine this with some other metrics such as error squared to score control loop performance on a day to day basis (provide some means of tracking the effects of control loop tuning changes etc).

Any thoughts on an elegant way of doing this?