Temperature control
Hello,
I am trying to control temperature within a system and need some guidance.
I need to basically tell the system a series of commands like:
In 30 seconds get to 80c For 60 seconds maintain 80c In 120 seconds get to 180c Etc...
I can quite easily take a note of the current temp "flip a switch" on the heat source if I'm below the target, but in reality doing this I'm going to get pretty sharp jumps and I want a smoother transition to the target temp with the target temp only being achieved by the end of the "step"
I know the PID library exists and may possibly help achieve this but I'm not entirely sure. Any guidance would be appreciated
Posted Apr 15, 2019, 1:10 PM UTC
Yes, PID is intended to do just this. You may find it hard to jump large amounts quickly, will have to tune your algorithm and eliminate heat losses to as high degree as possible.
It's such a small system that heat is typically gained/lost very quickly without control (on/off). I'll take a better look in to the tuning values of PID and see how it looks and affects temperature - I think I've just not really understood it properly.
Thanks.
It’s all based on calculus, so forgivable to not fully understand. It calculates related rates- the farther away from your setpoint you are, the faster it tries to close that gap; as you approach, it starts to slow down, with the goal of sliding in and not going over your programmed hysteresis. There are a number of variables you can modify to get the profile you want. There are also relatively cheap PID controllers out there that will make this easier if it’s a critical application, but then you don’t get the fun of building your own.
Yea. It's looking like I misunderstood one key component of how PID functions.
It looks like this will be perfect.
I'll give it a go and see what my results are like.
Thanks.