Hello,
I have just coded a microcontroller (PIC) based PI controller for a constant temperature water bath. The Kp and Kd values will be written into the code. So there is no way of feeding it in real-time (as of now... later on I shall incorporate a calibration module into the controller).
The bath holds around 15 litres of water (50x30x10cm) and is adequately insulated. It has an 'immersion type' 1500W heater (220VAC). I need to tune the controller to optimum settings. The scheme for the PI is at the end of this post.
Lets say, I put in 15L water in it stable 30C. Without any controls, switch on the power to the heater at 20% power, so I feed in 300W of power. Start recording the water temperature rise at every minute till it stabilises at some value. Now from the plot how do I calculate the Kp, Kd values? I have loads of material and mathematics on PID, but how to actually do so... Please suggest a method for Kp, Kd considering this scheme... _________________________________________________________________
ProH:Pro = Error_Hi:Error_Lo * Kp DifH:Dif = (Error_P_Hi:Error_P_Lo - Error_Hi:Error_Lo) * Kd IntH:Int = IntH:Int + Error_Hi:Error_Lo * Ki TotH:Tot = IntH:Int + ProH:Pro + DifH:Dif
Duty Cyle = TotH:Tot * Constant
Duty Cyle Heater ON = ------------- Time Period _________________________________________________________________
(I've shown the DifH:Dif here although I force it to zero in my actual code.)
Also, suggest how to come up with a constant for the duty cycle and the time period.
Thanks, Mohit.