How to find the Rate of change of a signal ?
If we want to generate the alarm for the rate of change of a signal like ((new PV value-Old PV Value)>.5) then it should generate the alarm
Here how to store this Old PV value(real) to get later for the calculation?
Voted best answer
This should be fairly trivial to do in any controller.
With AC800M I would create something similar and execute it as often as required (pseudo code)
Real lastvalue, rateofchange;
date_time lasttime;
rateofchange := ( thisvalue-lastvalue ) / ( thistime-lasttime );
if rateofchange > maxrate then
SimpleAlarmCond(...);
Some additional code is required to protect against zero division and to latch the alarm state between the executions.
/Stefan
Answers
RateOfChangeAlarmCond := gt(sub(NewPV, OldPV), 0.5);
SimpleAlarmCond(RateOfChangeAlarmCond);
OldPV := NewPV;
Where:
NewPV (real) is your signal.
OldPV (real)
RateOfChangeAlarmCond (bool)
Execute the code with the interval time matching your supervision conditions. I.e. if your looking for the rate of change per second, set interval time to 1000ms.
Add new comment