Learn about all the PID tuning options, features and tools that we didn't have time to cover in the other videos in this series. We'll also take a closer look at some of the features we used but didn't have time to explain.
Download support materials mentioned in the video here: https://library.automationdirect.com/?p=11129
To see the other videos in this series:
PID Overview Part 1:
PID Overview PArt 2: Hardware
PID AutoTune Part A
PID Autotune Part B
Do-more PID Tuning Simulator Part A
Do-more PID Tuning Simulator Part B
PID Manual Tuning Part A
PID Manual Tuning Part B
PID With Ramp Soak
PID Loose Ends
This video is a random assortment of items that we either glossed over or didn’t have time to cover in the other videos. I’ll cover them in this order, so you can easily find individual items in the future without having to scroll through the entire video. Don’t forget to store your final PID coefficients. You can either do that by storing them individually in the PID structure one element at a time, or use the PID INIT instruction – it puts the coefficients into the structure for you. I really like the PID INIT instruction because I can see by looking at it that I didn’t forget anything. If you need a little more room in your PID view trace window, click here to hide the PID form. Click again to bring it back. Sometimes I like to bring up a separate trend view up to see other things. Clicking the SYNC button will synchronize all the trend views to the PID view – that aligns the time axis so you can do one to one comparisons when you flip back and forth. When you are tweaking tuning, it can be hard to remember what all you have tried. For a quick snapshot of recent tuning activity, bring up the Auto-Tune dialog, and then click here to see the most recent tunings. If you want to see all tuning history, then click this button which takes you to a log file you can open in a spreadsheet that contains all tuning activity that has ever occurred for this project. I love being able to see exactly what I have tried and when. And this is cool. If you want to go back and try a previous tuning, just highlight it, and click here. That puts these coefficients into the PiD Structure and it even tells you it reverted to those values. But, it doesn’t update the PID view. Just click the read button to retrieve the new values from the PLC so you can see them. Make sure you have the correct process selected. Forward acting is when the process variable rises when you increase the PID output, like we did in our oven temperature demos. Reverse acting is when the process variable decreases when you increase the PID output. That would be for a cooling system for example. The temperature gets cooler as the PID output goes higher. This will make your PID loop less responsive over all, but more responsive to large errors and less responsive to small errors. So, if you have a system where you expect a lot of large changes instead of just small corrections, then try this. It might help. The error dead band is another way to deal with a noisy process variables. Normally, we take our setpoint, subtract the process variable and create a raw error. That error goes into the PID function as the last error structure member and the PID output drives the process. The error dead band is right here and is normally disabled so the raw error passes straight into the PID function. If we enable the error dead band, and provide a non-zero error dead band value, this last error becomes a smoothed version of the raw error. It works like this. Suppose you have a noisy raw error. And you tie a string to this line like this. As long as that string stays slack, the blue line doesn’t move. But, as the slack is removed, and we go past that point, the string starts to pull the blue line with it. And it does the same thing in the other direction too. The length of the string is the error dead band you specify in the errorDB structure member. And the blue line is the Last Error structure member that goes into the PID Function. Here’s a trend view where the red trace is the raw error – I just subtracted the process variable from the setpoint and plotted it – and the green trace is the last error that goes into the PID function. The green last error signal is only updated each PID sample period, so the width of each stair step is our PID sample time. The key point is at each sample time the last error and the raw error are the same value. I already enabled the error dead band in the PID instruction and I set the dead band to zero. If I increase the dead band, we see that at each sample interval the raw error and last error differ. And when the difference exceeds the dead band error value, the last error gets pulled towards the raw error. Again, picture that slack string getting taught. If I double the error dead band, the string gets longer and it takes more difference for the last error to get pulled towards the raw error. The end result being a smoother error signal going into the PID function. In some situations, the integral term can get large and it will take the system a long time to recover from that, which makes your PID system slow to react. With Bias Freeze enabled, the bias is only integrated while the PID output is between 0 and 100%. It is normally enabled – and most of the time that is what you will want - but you can turn it off by clicking this box. Clamping the bias limits the bias to +/100. This is normally not enabled, but if you expect large variations in your integral term, then this is another way to limit its impact on PID performance. How do you know if the bias term is getting too big? You can see it right here! In this video series, I did a lot of right clicking to bring up the PID options menu. You can also just click this button to quickly get those options. You can click at any point in time in the PID view and it will show you a snapshot of all the items at that time. I love that I can copy that to the clipboard and drop it in other apps for quick analysis. You may have noticed that traces can disappear. This blue process variable trace seems to be missing some data, for example. That’s because the display buffer for that trace got full. You can increase the size of those display buffers by right clicking and going to the options for all PID views and changing the size of the buffer. You can change the time scale in the PID view options, or here using this slide, but my favorite way to do it is to simply hold down the control key and scroll the mouse wheel. Just beware that this method puts the display in historical mode, so you will want to exit that when you are done scrolling. This PID view window is an awesome way to monitor what’s going on with your PID process, but you can’t see it while you are doing other things like looking at ladder code, for example. That’s where this PID overview dialog comes in handy. You can see everything you need to know about a PID process at a glance in one concise little window You can see the full range of your sensor and where the process variable is relative to that. You can see what the PID output is doing and all the pertinent process numbers you care about. The banner even shows what step in the Ramp/Soak process you are in and it changes color depending on if the process is in auto mode, manual mode, tuning mode or if there are any alarms. Very handy. Click here to see the other videos in this playlist. Click here to learn about our Free tech support options, and click here to subscribe to our YouTube channel so you'll be notified when we publish new videos.