I was reading a thread about how to do some involved things with a PID and didn't want to hijack that thread, so here we go...
I control a lot of stuff without a PID. Using compute statements. The simplest example for controlling a temperature would be...
Compare temp to setpoint, if low, steam valve output gets incremented by 1. If temp is high, steam valve output gets decremented by 1. Do this every second or two.
Better control would be... valve output = valve output + (setpoint - actual temp) Thus a large offset in temperature results in a large change in the output. A small offset results in a small change.
Example - Setpoint is 200, actual temp is 190. Valve output would change by 10%. OR - Setpoint is 200, actual temp is 199. Valve output would change by 1.
Most common I use... valve output = valve output + ((setpoint - actual temp) * multiplier). Usually the multiplier is 0.1 or so. It depends on how you scale inputs and outputs. The multiplier makes up for that.
Example - If setpoint temp is 200, and actual temp is 150, I probably don't want to change my steam valve output by 50, from 25% open to 75% open. So I would use a multiplier of 0.1, to compute a change of 5 (from 25% to 30% open). or perhaps a multiplier of 0.01 to compute a change of 0.5 (from 25% open to 25.5% open.)
I find I can accurately control things with this in a lot of situations. I have examples where I have two compute statements, one for increasing temperature, another for lowering, each with different multipliers.
I'd enjoy hearing your thoughts on this.
I control a lot of stuff without a PID. Using compute statements. The simplest example for controlling a temperature would be...
Compare temp to setpoint, if low, steam valve output gets incremented by 1. If temp is high, steam valve output gets decremented by 1. Do this every second or two.
Better control would be... valve output = valve output + (setpoint - actual temp) Thus a large offset in temperature results in a large change in the output. A small offset results in a small change.
Example - Setpoint is 200, actual temp is 190. Valve output would change by 10%. OR - Setpoint is 200, actual temp is 199. Valve output would change by 1.
Most common I use... valve output = valve output + ((setpoint - actual temp) * multiplier). Usually the multiplier is 0.1 or so. It depends on how you scale inputs and outputs. The multiplier makes up for that.
Example - If setpoint temp is 200, and actual temp is 150, I probably don't want to change my steam valve output by 50, from 25% open to 75% open. So I would use a multiplier of 0.1, to compute a change of 5 (from 25% to 30% open). or perhaps a multiplier of 0.01 to compute a change of 0.5 (from 25% open to 25.5% open.)
I find I can accurately control things with this in a lot of situations. I have examples where I have two compute statements, one for increasing temperature, another for lowering, each with different multipliers.
I'd enjoy hearing your thoughts on this.