tuning pid in systems with delay

Mark picture Mark · Oct 22, 2014 · Viewed 12.1k times · Source

I need to tune PI(D) gains in a system which has a quite large delay. It's a common temperature controller, but the temperature probe is far away from the heater. Some further info:

  • the response of the probe is delayed about 10 seconds from any change on the heater

  • the temperature is sampled @ 1 Hz, with a resolution of 0.01 °C

  • the heater is controller in PWM with a period of 1 Hz, with a 10-bit PWM

  • the goal is to maintain the oscillation below ±0.05 °C

Currently I'm using the controller as PI. I can't avoid oscillations. The higher the gain, the smaller and faster the oscillations. Still too high (about ±0.15 °C). Reducing the P and I gains leads to very long and deep oscillations.

I think this is due to the delay. The settling time is not a problem, it may take all the time it needs.

I'm puzzling over how get the system to work. Let's think to use only I. When the probe reaches the target value and the I output starts to decrease, the temperature will rise for some other time. I cannot use the derivative term because the variations are too slow and the dError is very close to zero (if I set the dGain to a huge value there is too much noise).

Any idea?

Answer

SuperGeo picture SuperGeo · Jul 1, 2015

Normally for large delays you have two options: Lower the gains of the system or, if you have a model of the plant you are controlling, use a Smith Predictior.

I would start by modelling your system (using open-loop steps in the input) to quantify the delay and the time constant of your plant, then check if the sampling of the temperature and the PWM rate are OK.

Notice that if your PWM frequency is too small in comparison to the plant dynamics, you will have sustained oscillations because of the slow PWM. You can check it using just an constant input to your PWM (with no controllers, open loop).

EDIT: Didn't see that the problem was already solved, but I'll leave this here for reference.