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;
}
void steadyStateError()
{
float e = fabs( temperature - target);
if(e<=0)
mPID = pid2;
}