Something like the code you wrote could work as a "pseudo" rate limiter
if (output-prev_output)>output_rate_limit{
output=prev_output+output_rate_limit;}
However, not sure what "driver_flood_run" is. And i still don't really know what the error is. Still my opinion is that PID is wrong in this case.
/*Define the error
Error = Setpoint_Temp - corrected_temp;
What is this? Is the setpoint 85 celsius? Is corrected_temp the measured temperature?
Anyway, i think for a first order filter with step input, the maximum derivative is something like, input/Tr, which gives a Tr=300second to keep below 0.33%/second. This is way to slow.
2 pictures from simulation to show the problem with a low rate limit and a high Tr output filter.

With the rate limiter the temp goes all the way to 91C, even though the upper limit was 85C in the controller, as i suspected in my previous post.
And again, if the absolute temperature limit is 85C, then the lamp must be turned down one way or another when that temp is reached. Turning it down too slow will allow the temperature to rise boyond 85C.
if (output-prev_output)>output_rate_limit{
output=prev_output+output_rate_limit;}
However, not sure what "driver_flood_run" is. And i still don't really know what the error is. Still my opinion is that PID is wrong in this case.
/*Define the error
Error = Setpoint_Temp - corrected_temp;
What is this? Is the setpoint 85 celsius? Is corrected_temp the measured temperature?
Anyway, i think for a first order filter with step input, the maximum derivative is something like, input/Tr, which gives a Tr=300second to keep below 0.33%/second. This is way to slow.
2 pictures from simulation to show the problem with a low rate limit and a high Tr output filter.

With the rate limiter the temp goes all the way to 91C, even though the upper limit was 85C in the controller, as i suspected in my previous post.
And again, if the absolute temperature limit is 85C, then the lamp must be turned down one way or another when that temp is reached. Turning it down too slow will allow the temperature to rise boyond 85C.




