I'm working through the (excellent!) Process Dynamics and Control course at apmonitor.com and have a question about using GEKKO for simulating (and optimizing) PID control parameters.
Starting with Example 14. PID_Control_Tuning I am wondering how to deal with processes that have a physically limited output (OP) range. (The TCLab heater for example, which is limited to 0-100% of full-scale output.)
If the "step" variable in the example is changed to:
step[40:] = 15.0 # Increase Step Size from 5.0 to 15.0
then the (dimensionless) output (OP) value at time=40 is 150.
GEKKO Python PID Process Control Plot
If I add LOWER and UPPER boundaries to the OP Variable using:
#OP = m.Var(value=0.0) # Original
OP = m.Var(value=0.0, lb=0.0, ub=100.0)
the model fails to solve and results in Exception: @error: Solution Not Found
What is the correct way to simulate a process in GEKKO that is bounded by hard limits (like 0%-100%)?