PID math demystified, part 4

You’ve seen the equations, but have you thought about how those elements work together? Part 4: Feed forward

06/10/2014

In the first three blog posts (see Part 1, Part 2, and Part 3) we covered the basics of PID math. We started with the basic proportional-only controller and worked in the integral and derivative components. Well before get too far, let’s review the proportional-only controller:

u(t) = Kpe(t)

u(t)
is the output of the controller at the end of the scan. If the output of the controller is a valve, then the output is the valve position that the controller is requesting after it has seen the inputs.

Kpe(t) is the proportional component, the P in PID. e(t), usually called “error,” is simply the difference between the setpoint and the process variable. Kp gain is a factor that is multiplied by the error to give you the new output—the new valve position. It’s that simple. The error at that instant of the scan is calculated and the new output is calculated.

The pseudo code that we discussed was:

Error = Setpoint – ProcessValue
Output = K * Error

With this code the output changes immediately after the error changes. I like to use a cruise control on a car as an example. As soon as the car starts to slow down as it starts to climb a hill, the change in error (speed) immediately causes the output to change.

But what if you know that the speed is about to slow down? What if you can see the hill coming? That’s where feed forward comes in. The first step is detecting a condition that will affect the process value. This can be an upstream flow rate that affects a level controller, a pressure change that affects a flow controller or any number of variables. The important thing is that the feed forward signal has to have a predictable affect on the controlled variable.

The math behind it is conceptually pretty simple. The feed forward signal is multiplied by a gain and then added directly to the output:

Error = Setpoint – ProcessValue
Output = K * Error + FeedForward * Kf

That way as long as the feed forward signal doesn’t change, the controller is not affected. But, a change in the feed forward signal immediately makes a proportional type shift in the output.

The math does get more complicated when the time that it takes for the signal to affect the process value has to be considered. In that case a lead or lag calculation must be done to slow down or speed up the feed forward signal. But that’s a topic for the next post.

This post was written by Scott Hayes. Scott is a senior engineer at MAVERICK Technologies, a leading automation solutions provider offering industrial automation, strategic manufacturing, and enterprise integration services for the process industries. MAVERICK delivers expertise and consulting in a wide variety of areas including industrial automation controls, distributed control systems, manufacturing execution systems, operational strategy, business process optimization and more.

The Engineers' Choice Awards highlight some of the best new control, instrumentation and automation products as chosen by Control Engineering subscribers.
The System Integrator Giants program lists the top 100 system integrators among companies listed in CFE Media's Global System Integrator Database.
Each year, a panel of Control Engineering and Plant Engineering editors and industry expert judges select the System Integrator of the Year Award winners in three categories.
This eGuide explains how the operation of hydraulic systems for subsea applications requires the user to consider additional aspects because of the unique conditions that apply to the setting
This eGuide illustrates solutions, applications and benefits of machine vision systems.
Learn how to increase device reliability in harsh environments and decrease unplanned system downtime.
HMI hardware evolution, Data acquisition strategies, Matching motors and drives, Machine vision advice
Optimize controls via cloud software, ladder logic simulation, industrial wireless best practices
Augmented reality and virtual reality education, autotuning PID control, cybersecurity advice, educating engineers
This article collection contains several articles on how today's technologies heap benefits onto an edge-computing architecture such as faster computing, better networking, more memory, smarter analytics, cloud-based intelligence, and lower costs.
Data centers, data closets, edge and cloud computing, co-location facilities, and similar topics are among the fastest-changing in the industry.
Articles in this digital report highlight technologies that enable Industrial Internet of Things, IIoT-related products and strategies.
2018 Product of the Year; Subsurface data methodologies; Digital twins; Well lifecycle data
SCADA standardization, capital expenditures, data-driven drilling and execution
Machine learning, produced water benefits, progressive cavity pumps
Automation Engineer; Wood Group
System Integrator; Cross Integrated Systems Group
Jose S. Vasquez, Jr.
Fire & Life Safety Engineer; Technip USA Inc.
This course focuses on climate analysis, appropriateness of cooling system selection, and combining cooling systems.
This course will help identify and reveal electrical hazards and identify the solutions to implementing and maintaining a safe work environment.
This course explains how maintaining power and communication systems through emergency power-generation systems is critical.
The Engineers' Choice Awards highlight some of the best new control, instrumentation and automation products as chosen by Control Engineering subscribers.
The System Integrator Giants program lists the top 100 system integrators among companies listed in CFE Media's Global System Integrator Database.
Each year, a panel of Control Engineering and Plant Engineering editors and industry expert judges select the System Integrator of the Year Award winners in three categories.
This eGuide explains how the operation of hydraulic systems for subsea applications requires the user to consider additional aspects because of the unique conditions that apply to the setting
This eGuide illustrates solutions, applications and benefits of machine vision systems.
Learn how to increase device reliability in harsh environments and decrease unplanned system downtime.
HMI hardware evolution, Data acquisition strategies, Matching motors and drives, Machine vision advice
Optimize controls via cloud software, ladder logic simulation, industrial wireless best practices
Augmented reality and virtual reality education, autotuning PID control, cybersecurity advice, educating engineers
This article collection contains several articles on how today's technologies heap benefits onto an edge-computing architecture such as faster computing, better networking, more memory, smarter analytics, cloud-based intelligence, and lower costs.
Data centers, data closets, edge and cloud computing, co-location facilities, and similar topics are among the fastest-changing in the industry.
Articles in this digital report highlight technologies that enable Industrial Internet of Things, IIoT-related products and strategies.
2018 Product of the Year; Subsurface data methodologies; Digital twins; Well lifecycle data
SCADA standardization, capital expenditures, data-driven drilling and execution
Machine learning, produced water benefits, progressive cavity pumps
Automation Engineer; Wood Group
System Integrator; Cross Integrated Systems Group
Jose S. Vasquez, Jr.
Fire & Life Safety Engineer; Technip USA Inc.
This course focuses on climate analysis, appropriateness of cooling system selection, and combining cooling systems.
This course will help identify and reveal electrical hazards and identify the solutions to implementing and maintaining a safe work environment.
This course explains how maintaining power and communication systems through emergency power-generation systems is critical.
The Engineers' Choice Awards highlight some of the best new control, instrumentation and automation products as chosen by Control Engineering subscribers.
The System Integrator Giants program lists the top 100 system integrators among companies listed in CFE Media's Global System Integrator Database.
Each year, a panel of Control Engineering and Plant Engineering editors and industry expert judges select the System Integrator of the Year Award winners in three categories.
This eGuide explains how the operation of hydraulic systems for subsea applications requires the user to consider additional aspects because of the unique conditions that apply to the setting
This eGuide illustrates solutions, applications and benefits of machine vision systems.
Learn how to increase device reliability in harsh environments and decrease unplanned system downtime.
HMI hardware evolution, Data acquisition strategies, Matching motors and drives, Machine vision advice
Optimize controls via cloud software, ladder logic simulation, industrial wireless best practices
Augmented reality and virtual reality education, autotuning PID control, cybersecurity advice, educating engineers
This article collection contains several articles on how today's technologies heap benefits onto an edge-computing architecture such as faster computing, better networking, more memory, smarter analytics, cloud-based intelligence, and lower costs.
Data centers, data closets, edge and cloud computing, co-location facilities, and similar topics are among the fastest-changing in the industry.
Articles in this digital report highlight technologies that enable Industrial Internet of Things, IIoT-related products and strategies.
2018 Product of the Year; Subsurface data methodologies; Digital twins; Well lifecycle data
SCADA standardization, capital expenditures, data-driven drilling and execution
Machine learning, produced water benefits, progressive cavity pumps
Automation Engineer; Wood Group
System Integrator; Cross Integrated Systems Group
Jose S. Vasquez, Jr.
Fire & Life Safety Engineer; Technip USA Inc.
This course focuses on climate analysis, appropriateness of cooling system selection, and combining cooling systems.
This course will help identify and reveal electrical hazards and identify the solutions to implementing and maintaining a safe work environment.
This course explains how maintaining power and communication systems through emergency power-generation systems is critical.