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://www.automationdirect.com/VID-CL-0047
Configure part B: https://www.automationdirect.com/VID-CL-0048
AutoTune part A: https://www.automationdirect.com/VID-CL-0049
AutoTune part B: https://www.automationdirect.com/VID-CL-0050
Manual Tune part A: https://www.automationdirect.com/VID-CL-0051
Manual Tune part B : https://www.automationdirect.com/VID-CL-0052
Ramp Soak: https://www.automationdirect.com/VID-CL-0053
Loose Ends: https://www.automationdirect.com/VID-CL-0054
Bonus: Sizing Fans: https://www.automationdirect.com/VID-CL-0055
Bonus: Freeze Bias: https://www.automationdirect.com/VID-CL-0058
Bonus: C-more PID Template part A: https://www.automationdirect.com/VID-CL-0056
Bonus: C-more PID Template part B: https://www.automationdirect.com/VID-CL-0057
In this video, we’ll show you a quick and simple way to manually tune a PID loop in a CLICK PLC, just so you have a backup for those times when autotune isn’t appropriate or if you just want a way to validate your autotune results. One caveat – I am going to show you my favorite way to do this. AutomationDirect’s tech support is not familiar with this method, so PLEASE don’t call them asking for help. They won’t be able to help you. If you want to learn more about this method, visit this website. Ok, let’s do it. All we are going to do is manually bump the PID output a little bit around the level we want to be at and see how much the process variable changes. We’ll also measure the dead time and the time constant, plug them into some formulas and we are done. I already have our system at the 110 degrees we have been using in the previous videos, so I’ll switch to manual mode and bump the output up 5 percent. You want to keep the bump as small as reasonable. The smaller it is, the quicker you get your results. Just make sure it’s enough to see a decent amount of change in your system. I’ll fast forward and modify the scale so we can see it better. Now we just fill in the blanks. We measured the min and max process variable in the previous video when we did this linearity chart, so we just put those here. How much did we change the output? 5%. How much did the process variable change? It started here at 110 degrees and ended up at an average of about 118 degrees. The difference is 8 degrees, so we’ll put that here. This is an excellent example of a time when autotune won’t give us optimal results. These fluctuations are being caused by my office HVAC system cycling. It’s very predictable, so we can imagine the cycle continuing like this, which means this curve is being depressed by the office temperature fluctuation and the real curve is more like this. That’s obvious to us, but autotune can’t make those kinds of observations. Open loop autotunes look for the knee of the curve, and since both of these are wrong, it doesn’t matter which it chooses, it still won’t be right. Closed loop autotunes, like the CLICK PLC uses, look for the rate of change where you set the hysteresis. So, you will get very different tunings depending if you set the hysteresis here or here. Concave inflections like this in the process variable can drive autotune nuts. That’s why it’s a good thing to have a manual tuning method in your toolbox because it’s easy for you to make the judgement calls that autotune can’t. This manual tuning method normally calculates the time constant and the dead time, but the algorithms it uses don’t work really well for systems with short dead times, which we have here. That’s fine, we just need to measure the dead time and time constant instead of calculating them. Let’s zoom in to take a close look at the dead time, which is the time between when the output changed and when the oven temperature starts to respond. Again, we have to use our judgement here. Looks like the temperature was trending down here, then at about this point it started to change direction because of the output change. So, I’m going to say the dead time is around 5 seconds. A shorter dead time gives you more aggressive coefficients so if you want a more aggressive tuning, err on this side. If you want a more conservative tuning, err on this side. I’m happy with 5 seconds so we’ll add that to our chart. Let’s zoom back out and change our Y-Axis to the 118 degrees average we had for out max. The time constant is the time it takes the process variable to reach 63 percent of that max. Our process variable rose about 8 degrees. 63% of that is 5 degrees, so I’m going to change the top of the Y-Axis to 115 degrees to correspond to that 63%. We know our curve looks more like this, so our time constant is around here. The larger the time constant, the more aggressive the coefficients will be. So, if you want to be conservative, reduce the time constant. We are done measuring things! We do need to know which PID algorithm we have. The two most common ones are the Dependent or ISA version, and the Independent or parallel version. There is also a less common series version. In this one, the I and D coefficients depend on the value of P. Every time you change P, you have to adjust I and D. In the Independent version, you can adjust each coefficient independently because they don’t affect each other. Each coefficient just contributes to the overall result. CLICK PID uses the Dependent version. That’s the classic version that represents the old analog systems where when you change the gain of the system, it changes everything else too. And finally, we need to know what type of system we have. Do we have a self-regulating system - a system that when given a change in the PID output levels off after a while - or an integrating system – one that just keeps going up. We know from our testing that when we bump the output the process variable does go up and level off, so we have a self-regulating system. Great, we have fully characterized our system, so now we just plug those numbers into some magic formulas to calculate the final PID values. I put those formulas, which I got from the PID blueprint, into a spreadsheet to make it super easy for me to play with. I just entered the measured data here, and that automatically generated the PID coefficients we need. The cool thing about this method is it optimizes the coefficients depending on if you will be changing the setpoint or changing the load. We’re changing the setpoint, so we will use these guys. But if we wanted our system to be responsive to load changes – like maybe some of the vent holes get plugged or a filter got dirty, both of which would reduce airflow and change the load, then we would choose this one. And for each of those it produces coefficients for systems that only need P, PI or PI and D. Very comprehensive! This method also produces all the coefficients you need if you have a parallel or independent form of the PID equations and serial form of the equation. Again, our CLICK PLC uses the Dependent or ISA version, so we want these. So the bottom line is you take a few easy measurements, plug them into some equations – my spreadsheet does that automatically for me - and you’re done! But, these coefficients look different than the autotune coefficients we have been getting in the previous videos. Do they work? Join me in the next video where we put them to the test! Click here to see all of the videos in this series. Click here to learn more 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.