Wow!!! That shed some light on the problem, but stop being vague
I thought you needed the rate of change for a control loop or something. You don't need anything very accurate but I do have a question now.
How fast did the high temperature problem occur? What is pretty fast? Seconds, minutes?
Do you ramp up your furnace SP temperature slowly and always know what it should be?
What if the ErrorRate is converging on the SP. Is that a problem?
I would simply do this:
Error
=SP
-PV
What you don't want is for the error to be very negative. Lets say you can't let the Error go below -50 degrees with out an alarm.
Next you need to look at the error rate. The error rate shouldn't be a problem IF the PV is much less than the SP. So if the Error is getting more negative then the ErrorRate is negative. Positive Error rates shouldn't be a problem. Are they?
dError
/dt or ErrorRate
=(Error
-Error(n-1))/Δt
The basic error rate calculation is that simple and probably doesn't need to be that accurate if you are looking for gross temperature changes. Δt should be on the order of a few seconds if you need to error events that happen in a minute. It should be much shorter than the time it takes to burn a hole in your furnace. This formula will provide an error rate but it doesn't take into account the current temperature. When near a limit it is best if the error rate is kept small or converging.
A quick trick.
Code:
if Error(n)*ErrorRate(n)<0 then
converging Error // good
else
diverging Error // bad
endif
Combine the Error and Error rate calculation
Code:
s=τ*ErrorRate(n)+Error(n) // τ is a time constant
If s < -50 degrees then
Alarm
endif
Note s= (1+τ)*Error
-τ*Error(n-1)
This formula uses the ErrorRate to predict what the temperature will be some time in the future assuming a time constant τ. Notice that the units work out. ErrorRate*τ has resulting units of Error. The two terms, the Error and ErrorRate terms are summed together to predict a future error. You can then compare this with your ErrorLimit of -50. If the error is more negative than -50 or the predicted error is anticipated to go below -50 or the sum of the two is less than -50 then sound the alarm.
τ is different from Δt. Δt is the sample time and τ is the time constant that adjusts the sensitivity of the error rate detection. As τ get bigger it is assuming that the thermal mass is larger and if the rate of change better be smaller to keep the alarm from sounding.
You haven't made if clear if the goal is to measure error rates or just detect when the error rate is going to be a problem. I normally don't think of converging error rates as being a problem but it could be in your case if there are limits to how fast the furnace can be heated up or cooled down.
I hope you can see what I am getting at. A converging Error rate is usually not a problem. A diverging error rate gets more severe as the Error itself gets larger.