PID Control Advice

Hello,

I have a situation where I am trying to produced a controlled temperature ramp of an aluminum plate with a flat heater secured to the bottom of the plate and a sensor mounted to the top. In the initial prototype I had the a PID controller accurately producing this ramp when I simply taped the temperature sensor to the plate. Now, however, I am moving to a more robust version with the same sensor waterproofed. This has changed the lag signal and has messed up my previously nicely tuned PID. The temperatures still ramp, but there are rather dramatic oscillations (see the attached figure). My understanding is that this suggests that either the proportional control is too high or I need more differential control to damp the oscillations. I have been tuning this system manually, because I am not clear on how to incorporate my thermal ramping code into the Autotune Library (which might help to get me in the right ballpark).

So I am left fiddling with the values and given the slow rate of the temperature ramp, this is taking a bit of time. I have attached a plot showing the current behavior with P = 120, I = 60, D = 10. Can anyone make an educated guess about how I should adjust these values given the current behavior (e.g. halve the P and double the D, or remove the I)?

Note the initial decline in temperature (prior to ~9:00) is an artifact of me cooling the block so it was near the initial set temperature. Obviously I went too low and the PID then overcompensated and drove the temperature well above the set temperature even before the temperature ramp begins (potentially a sign that the P is too high?).

Thanks for your help,

Nate

I could also provide my code and maybe someone could assist me applying the Autotune library. I would like to learn to make that work, if only to understand it and potentially use it to get in the right ballpark with my PID values.

ForumTempPlot.pdf (41.1 KB)

Could you have accidentally switch to a non-PWM output pin? It looks like the heater is going full-on and full-off.

You will probably have to start tuning again from the beginning. :frowning: