# Is a good practice to use one PID in rise time and another PID for steady time in order to eliminate oscillations during steady time?

I'm trying to control temperature with PID(Kp,Ki, Kd). During the rise time the system use one PID and when target is reached the system switch to another PID with other parameter in order to eliminate the oscillation. I know that I can remove oscillations increasing Kd but in this case it does not work.

## Results of real time system

Control temperature with constant PID:

Control temperature using PID1 during rise time (blue color) and when temperature reach the target, the controller is changed to PID2 (Steady state error: black color):

void setTarget(...)
{
mPid = pid1;
}

{
float e =  fabs( temperature - target);
if(e<=0)
mPID = pid2;
}


• How would you handle the transition? – A_A Jul 2 at 16:26
• If implemented correctly I think this would be equivalent to gain scheduling (this can also be used on linear systems to improve performance). – fibonatic Jul 2 at 17:19
• @A_A the question was updated. – sergio campo Jul 3 at 10:35
• @fibonatic could you please recommend me some article or book that show me how to implement correctly this implementation in real time? – sergio campo Jul 3 at 10:41
• If you're trying to control temperature, your biggest problem is usually wind-up. – Ben Jul 3 at 23:32