Common PID Setup Mistakes


Introduction to Common PID Setup Mistakes

In this section, I’ll discuss some common Common PID Setup Mistakes in ControlLogix. Obviously, an incorrect PID setup can be frustrating. The PID instruction will not calculate the results you expect for the output. Furthermore, your loop will be unstable, and inconsistent. Common mistakes include timing, scaling, or using the incorrect units for your tuning variables. Furthermore, if you set the control action incorrectly, the PID will provide output in the wrong direction. Another common mistake is setting the deadband too high, or using derivative when you have a noisy process variable.

This document is simply a suggestion based on my experience. Find someone experienced in PID, and with your own processes to help you if there is a chance of damage to machinery or injury to personnel.

PID Instruction Timing

The PID instruction needs a stable time base. The update time should be at least 5 to 10 times faster than the natural period of the process. The natural period is the amount of time that a complete oscillation takes place when the loop is unstable. Generally, you will have the PID instruction in a periodic task. Be sure the period of the task equals the instruction’s configuration. Although there are other ways to time a PID, this is the most common setup that I’ve seen. It’s important to realize that if you change the timing on an existing PID, this could drastically affect the tuning variables. I’ve seen timing of PIDs that are set incorrectly, however, the programmer compensated for this in the tuning values.

Go to the properties of the Periodic Task, or create a new Periodic Task to place your PID instruction.

To ensure the PID calculates the timing correctly, check the configuration of your PID Instruction in Ladder Logic. In this case, this should be 20ms (.02 Seconds). For function block, you can typically leaving the timing at the default settings. The PIDE instruction (Enhanced PID) will handle this automatically.

Scaling — Common PID Setup Mistakes

Check your scaling. Obviously, the PID instruction needs to know what values to expect for the process variable. Furthermore, it needs to know what values to send as the control variable. For simplicity, you can set all of the scaling from 0 to 100 percent if you like. Just be sure to scale the process variable to 0 to 100% before sending it into the PID. On the other hand, be sure to scale your control variable from 0 to 100% to whatever value your analog module expects. There is nothing wrong with just letting the PID do the scaling though. Just be sure to have it set up properly.

Similarly, you will have a scaling tab on the PIDE instruction for function blocks.

Check your Units

Another common mistake is using the incorrect units for integral and derivative. Your tuning methods will have a formula for calculating the tuning variables. Just be sure to convert minutes to seconds, or vice-versa. As you can see, this example requires the values in seconds.

Use the Correct Formula

You will have different formulas for Dependent and Independent mode. Be sure to use the correct formula, or change the PID setting to match the formula that you are using.

Set the Correct Control Action

If you set the control action incorrectly, the PID will change the output in the wrong direction for your process. For example, a heating process is reverse acting (SP-PV). On the other hand, some valves might be forward acting (PV-SP). If you set this incorrectly, you will have no control over your process in automatic mode.

Too Much Deadband

In some processes, you will use deadband. This is a region near the process variable where no control action occurs. This can minimize the amount of control action to prevent excessive maintenance on your valve. The problem with too much deadband, is that your process variable might build up some momentum by the time it exits the deadband into the control band. Furthermore, this will create the need for more output to compensate. Indeed, this can make your loop unstable.

Using Derivative with a Noisy Process Variable

Derivative uses the rate of change in the process variable or error. If you have a noisy process variable, derivative will interpret this as a high rate of change. Although derivative smoothing helps, you might be better off with no derivative at all in this case.

Summary of Common PID Setup Mistakes

In summary, just be sure to go through all of your setup tabs to be sure your configuration makes sense. Pay close attention to your timing, units of time, and scaling. Familiarize with PID tuning to get a good feel for how a change in proportional, integral, or derivative affects a process. To get some practice with PID, you can build an Arduino PID Simulator.

For more information, visit the ControlLogix Category Page!

— Ricky Bryce

Leave a comment

Your email address will not be published. Required fields are marked *