# The velocity of PID

## Inside Process: Proportional-integral-derivative (PID) theory is best introduced as the familiar second order differential equation via the velocity form instead of the more traditional positional form.

Despite being ubiquitous in industrial control system (ICS) usage, the proportional-integral-derivative (PID) algorithm is a mystery to many. Ask an engineer to describe the behavior of the D (derivate) term, for instance, and some may respond with a blank stare.

Textbooks, seminars, and articles often explain the PID control algorithm in a form resembling the following equation:

The terms are:

E = Error, difference between setpoint and measurement

OP = Output to the final control element, typically in percent of scale

P = Proportional term

I = Integral term

D = Derivative term

Kp = Proportional gain

Ki = Integral gain

Kd = Derivative gain.

**A different view **

Why is it presented this way? Well, it does match the name of the algorithm and shows the proportional, integral, and derivative terms in a simple manner. However, this article suggests a different approach using velocity instead of position.

A core foundation of an engineering curriculum is differential equations. Once engineering students grasp differential equations, they see them used to explain the classic spring-mass system in physics and LRC circuits in electrical studies. [Of course, L stands for inductance, R is resistance, and C is capacitance.] Engineering graduates are very familiar with the spring-mass system and LRC circuits. That’s because they are the same mathematically. They are second-order differential equations. A lot of real world applications are second order differential equations, so the ability to comprehend the common mathematical foundations makes it easy to understand and remember.

Textbooks describing the PID algorithm present it as a differential equation, but not in the same way as the spring-mass or LRC circuit. Even though it is the same second-order differential equation, its presentation and explanation differ. To match the more familiar presentation, it would be shown as:

The only change made was to take the derivative of the prior equation. The original form of the equation is the positional form. Taking the derivative of a position over time creates velocity. Therefore, the latter presentation is the velocity form. When doing so, the proportional (P) term becomes a velocity (V) term; the integral (I) term becomes a positional (P) term; and the derivative (D) term becomes an acceleration (A) term. Position, velocity, and acceleration (PVA) are very familiar terms. To make it more familiar, the order has been rearranged:

Note: the PVA equation looks like the very familiar second order differential equations. It makes the contribution of each term much easier to understand. Explaining it with the PVA approach can help engineers with a rudimentary or even no knowledge of PID to better grasp the concepts. (See sidebar: "First real understanding of PID.")

**Velocity form comments**

However, there are obvious caveats to explaining the algorithm with the velocity form:

- Historical momentum perpetuates the traditional presentation. Textbooks using the positional form are abundant, and the few that mention the velocity form do so in passing.
- The way the algorithm is implemented in control systems is the positional form. In addition, the implementation is more complex than a simple addition of three terms. Filtering of the derivate term, interacting versus standard forms, and differing actions on setpoint versus measurement change are common features of the control system implementation that add to the complexity.

Despite historical and implementation support of the positional form, the velocity (PVA) form offers a way to introduce the algorithm in a more familiar way to engineering students and a more understandable way to help practicing engineers advance their engineering prowess, without any blank stares.

Patrick Dixon, PE, is a consultant at DPAS Inc. Edited by Chris Vavra, production editor, *Control Engineering*, CFE Media, cvavra@cfemedia.com.

** MORE ADVICE**

** Key Concepts **

**The proportional-integral-derivative** (PID) algorithm is well-known but can be confusing to engineers.

**Using velocity** instead of position in the PID equation can help clarify the concept for engineers.

**While useful**, not many use velocity to explain PID in textbooks or in the field.

**Consider this **

**What other methods** can be used to help explain and simplify PID to engineers?

First real understanding of PID

"A couple of years ago I had 15 minutes to explain the PID algorithm to a small group of engineers. Some had rudimentary knowledge of it and others virtually no experience with it. After 15 minutes using the PVA approach, they got it! One of them said this was the first time he felt he really understood how PID worked."

*Patrick Dixon, PE, consultant, DPAS Inc. *

**Velocity and positional forms **

**Other sources explain related topics differently, including: **

Chapter 8.6.1 of "Process Dynamics and Control" by Seborg/Edgar/Millichamp/Doyle, 2010, Wiley, discusses velocity and positional forms

Chapter 6.7 of "Control System Design" by K.J. Astrom, 2002, University of California, Santa Barbara, discusses "Velocity Algorithms."

** ONLINE extra **

**Author bio **

Patrick Dixon has worked in the control engineering field since 1984. He is a graduate of Miami University majoring in Paper Science and Engineering with a minor in Math. He has continued his involvement with the university’s engineering department with his service on the academic committee and board of trustees since 1998, earning a Pioneer Award for distinguished service. In his professional service he has worked as a process control engineer and project manager in a variety of work environments at industrial facilities, large control system vendors, start-up advanced control technology developers, and small system integrators. Dixon established the process control contracting/consulting practice DPAS-INC in 1998 and is a registered professional engineer. He has also led several nonprofit and volunteer organizations.

See related stories about PID linked below, including a spring-mass drawing PID example.