Learn an easy manual tuning method to help validate your auto tune or to do tuning when auto tune isn't appropriate. We'll walk through step by step exactly how to do it and then compare the results to the auto tunes we did in the previous videos. Can we do better than auto tune? Watch this video to find out!
Resources used in this series can be found here: https://library.automationdirect.com/click-plc-temperature-pid-tuning-resource-page/
Videos in this series:
Configure part A: https://youtu.be/Ak2eFFHkriM
Configure part B: https://youtu.be/f8X7prho8dU
AutoTune part A: https://youtu.be/8T1A0ryIGfo
AutoTune part B: https://youtu.be/bEpbia94W
Manual Tune part A
Manual Tune part B
Bonus: Sizing Fans:
Bonus: Freeze Bias:
Bonus: C-more PID Template part A
Bonus: C-more PID Template part B
In all of the previous videos, we have been manually setting the setpoint. Is there any reason we can’t tell PID to follow something else? Nope! I added a quick and dirty ramp/soak function to our code. I’m not going to get into that here, but I did include a link in the description below the video to that ladder code if you want to see how I did it. It’s just some brute force code I threw together for this demo. The ramp/soak code isn’t the point of this video so we’re not going to dig into that here. But, if you have something more elegant, please share it by posting a comment below! To use it, I just give the ramp/soak function a table of values like this: These are the temperature changes and these are the durations. So, over 5 minutes, go up 5 degrees. Over the next 5 minutes, don’t change the temperature. Over the next 10 minutes, go down 15 degrees. Over the next 5 minutes, stay at that temperature. And finally, over the next 5 minutes, ramp back up 10 degrees to get back to where we started from. These are the exact same temperature steps we have been using in all of our demos, so we can do a side by side comparison. I changed the setpoint color to make it easier to see and to remind us that it is being driven by the ramp/soak and not manually. I’m going to switch to manual mode and start the ramp/soak profile by enabling this bit. I’ll fast forward through the 30 minutes and we see the ramp/soak profile which will serve as our setpoint when we enable PID. The only difference between what we were doing before and what this does is before we were telling PID to get to the new temperature as fast as possible. Now we are telling it to follow this nice controlled ramp to get to each temperature. So, the question is, will PID be able to track that profile and if so, how well? These are the manual tuning PID coefficients. Those seemed to give us the best response for this system, so let’s see how they do. I’ll switch to auto mode so PID can control the oven temperature and I’ll kick off ramp/ soak by enabling this bit. And I’ll fast forward through the 30 minutes. Wow, look at that! PID tracked the ramp/soak profile perfectly! Nice! OK, let’s do it again, but this time let’s use the autotune PI coefficients. Those seemed to give us the least effective tuning for this demo hardware. Remember, different types of systems will react differently to the different types of tunings. I’ll enable the ramp/soak and fast forward. And it did a pretty good job of tracking with just a little overshoot. Pretty much what we would have expected. So, the bottom line is, you can have PID track anything, you don’t have to feed the setpoint manually. In the next video, we’ll back up and cover the features we didn’t have time to dig into in this series. There’s a lot of really good stuff in that video so be sure to check it out! Click here to see all the videos in this series. Click here to learn about AutomationDirect’s FREE support options and click here to subscribe to our YouTube channel so you will be notified when we publish new videos.