BrewPi / firmware

Brewing temperature control firmware for the BrewPi Spark (Particle Photon inside)
http://www.brewpi.com
GNU Affero General Public License v3.0
97 stars 55 forks source link

With very low Kp, integrator can get stuck below setpoint when antiwindup equals p #74

Closed elcojacobs closed 7 years ago

elcojacobs commented 7 years ago

When the proportional gain is very low (which could be used with a PID driving another setpoint), it is possible to not reach setpoint in steady state.

This is due to a combination of events. This can only happen if the actuator is not reaching setpoint, by margin a. This margin is multiplied by the anti-windup gain of 3. If p equals 3a, we are stuck.

The integrator is increased with p every cycle. The antiwindup is (pid result - achieved output) * 3. When these two cancel each other out, the integrator is stuck in a steady state value, without the error being zero.

elcojacobs commented 7 years ago

Should be fixed in develop