What am I trying to control?
- I have a container with approximately
3*2*6
meters (width, height, length). - I am controlling through PID the
Temperature 2
(temperature inside a tubing system) to getTemperature 1 and 3
(temperatures near floor and celling of the container) to the desired values (see graphs below). Temperature 2
is coming from a sensor inside a tube system through which the air is circulating andTemperature E.
is coming from a wooden box inside the container.- Box and tubing is a closed system with some minimal temperature leaks.
- The PID’s output is connected to
PWM
of triacs which heat the air in the tubing system. - EO% is describing how much % of 1 second (the PWM period) the triacs will be set to
True
= therefor making heat. So if EO is 50, then the triacs will be making heat exactly 0.5 seconds
Sketch of my system:
Step response of the system (X axis format is HH:MM:SS
):
What have I tried so far?
- I am running the software on
PLC
from local distributor (not an Arduino board) where I have implemented this PID model from Arduino library.. But in the future I will be using Beckhoff PLC's. - I have tried implementing the basic PID controller with little accuracy.
- Then I have tried implementing PID controller with proportional on measurement and derivative on measurement and my accuracy went higher (link is to a blog talking about the two methods).
- Now I can control temperatures with precision to almost
0.5 °C
and little oscillation. - PWM frequency is 1 HZ and PID sample time is 2 seconds.
What is the problem?
- You can see on the pictures below that I slowly increment my PID
setpoint
through time (PID’ssetpoint
is the black line). - When my system has a temperature in a range from 20 to 55 °C my accuracy is quite good.
- But once I get above 55 °C, PID’s is not able to control the temperature accurately anymore and the PID output always result in a spike and therefor even larger inaccuracy.
What can I do to eliminate this problem? And what is causing this behavior? Are there any better methods then the simple PID controller?
Other observations:
- I think the problem lies in the
I
component of the PID controller. - When the temperature is low the
P
component manages to control the temperature just right. But when the error is getting bigger and bigger the I component is cumulating and then it overshoots. - When I am running the PID on all temperatures (25, 40 even 58 °C) the accuracy is as I said 0.5 °C and oscillation is minimum. The problem only occurs when I slowly increment the PID’s
setpoint
and therefore increase the temperature.
Pictures (X axis format is HH:MM:SS
):
Picture 1 and 2 (temperatures and the PID's output):
Picture 3 and 4 (temperatures and the PID's output):