What am I trying to control?
- I have a container with approximately
3*2*6meters (width, height, length).
- I am controlling through PID the
Temperature 2(temperature inside a tubing system) to get
Temperature 1 and 3(temperatures near floor and celling of the container) to the desired values (see graphs below).
Temperature 2is coming from a sensor inside a tube system through which the air is circulating and
Temperature 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
PWMof 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
What have I tried so far?
- I am running the software on
PLCfrom 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 °Cand 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
setpointthrough time (PID’s
setpointis 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?
- I think the problem lies in the
Icomponent of the PID controller.
- When the temperature is low the
Pcomponent 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
setpointand therefore increase the temperature.
Pictures (X axis format is
Picture 1 and 2 (temperatures and the PID's output):
Picture 3 and 4 (temperatures and the PID's output):