Who Wants to Learn About On Off and PID Control?

Process control can be a bit intimidating. We will try and break down both On/Off and PID control in a fun way. This is a simple analogy without any math.


On-Off Control Explained

On/Off control can be used effectively with temperature control. Everyone’s house usually has a temperature controller that uses an On/Off control. The output switches on when the temperature is below the set value (SV). The output will remain on heating the house until the present value (PV) exceeds the set value. At this point, the output will then go off. The house will constantly be cyclically doing this. This means that the temperature of the house will vary a few degrees.
On Off controlling

We can plot this out like the sign wave above. The setpoint is in the middle. We can not get precisely the setpoint value and stay there. Then the output is turned off, the thermal mass continues to heat the house before starting to cool down. The same is true when the output is turned back on. It will cool down a little more and then heat up again. This is called hunting.

Observing Hunting

Let’s look at another way to explain:
On Off controlling

You are in a car and can only use full gas or brakes. Racing toward the stop sign at full gas, you use the full brake at the stop sign line. Naturally, you go past the stop sign and eventually come to a complete stop. Putting the car in reverse, you again use full gas toward the stop sign line. When you hit the line, you apply the full brake—missing the mark again. This is like an On/Off control action.

Hysteresis (Dead Band) Explained

We could program in a hysteresis if we wanted to control the method a little closer. (Dead band) This is just a range in which nothing would happen. It would consider the amount we went over the line in both directions.
Who Wants to Learn About On Off and PID Control?

If we need to hit the stop sign target more accurately, we can now introduce another control method.

Learn PID Control

PID is a time-based control logic. It will look at a control period (CP) and determine what to do for the next. In a temperature control application, the control period would be 20 seconds. In a servo valve application, it can be 1 second. Let’s look at each control method in the PID concerning our car analogy.

Proportional Control (P)

The closer we get to the setpoint, the longer the control period will be on. (Reference to the output percentage  of control period time.) This will increase the amount based on the error.

Who Wants to Learn About On Off and PID Control?

In our example, the car can be seen applying the brakes proportionally longer and longer times before the stop sign line is reached. If it goes over the stop sign line, the car will apply the brakes even longer, depending on the amount over the line. This is proportional control.

Integral (I)

Using just proportional control would always leave us below the set point. We need a method to reset us to the actual setpoint. This is where integration comes into play. It is interesting to note that PI control is one of the most commonly used in the industry.

Who Wants to Learn About On Off and PID Control?

The car above is traveling along the road, following the dashed lines. We would find ourselves riding in the ditch if we used just proportional control. The integral control will move us into our lane and keep us close to the dashed line.

Derivative (D)

This mode of control will look at the rate of change and adapt our control to get us back to the set point. Remember that everything is based upon a control period which is time. PI relies on the fact that everything remains constant in your control. D will take into account the differences over time.

Who Wants to Learn About On Off and PID Control?

In our car analogy, the derivative function of the control will continually adjust as we move up the hill and down the other side. It will not do much as we drive along the straight roadway.

We have looked at an accurate analogy of control logic without all the math details. This can aid in understanding what your process is doing and methods to correct it. The following references can obtain further information:

PID without a Ph.D. By Tim Wescott
Understanding PID in 4 minutes
PID Control – A brief introduction
PID Controllers Explained

Excellent project using PID:
Desktop Line Following Robot

Watch on YouTube: Who Else Wants to Learn About On / Off and PID Control?


If you have any questions or need further information, please get in touch with me.
Thank you,
Garry



If you’re like most of my readers, you’re committed to learning about technology. Numbering systems used in PLCs are not challenging to learn and understand. We will walk through the numbering systems used in PLCs. This includes Bits, Decimals, Hexadecimal, ASCII, and Floating Points.

To get this free article, subscribe to my free email newsletter.


Use the information to inform other people how numbering systems work. Sign up now.

The ‘Robust Data Logging for Free’ eBook is also available as a free download. The link is included when you subscribe to ACC Automation.


Leave a Comment