Your system of mass, heater and cooler is subjected to some delays. (imagine you are tuning temperature of the water shower with two water knob, that kind of delay!)
And, PID control strategy is not capable to compensate delays. That's why there are oscillations.
One of the best ways to control delayed systems is using the MPC controllers.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…