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. When the temperature is below the set value (SV) the output switches on. The output will remain on heating the house until the present value (PV) is above the set value. At this point, the output will then go off. The house will constantly be doing this in a cyclic way. 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. By the time 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 then start to heat up again. This is called hunting. We can not get exactly on the setpoint value and stay there.

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 a full brake. 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 full stop. Putting the car in reverse, you again use full gas back 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

If we wanted to control the method a little closer then we could program in a hysteresis. (Dead band) This is just a range in which nothing would happen. It would take into consideration the amount that 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 a little more accurately then 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 of the control methods in the PID with respect to our car analogy.

Proportional Control (P)

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

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. If we used just proportional control we would find ourselves riding in the ditch. 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 a very basic analogy of control logic without all of the details of math. This can aid in understanding what your process is doing and methods to correct it. Further information can be obtained by the following references:

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

Nice 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 contact me.
Thank you,

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

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