Knowledge · Engine management

PID control

Also: PID controller, PID loop

PID control compares a target with a measured value and calculates a correction from three terms: proportional, integral and derivative. In an ECU it controls idle, boost, throttle and lambda, among other things.

How the three terms work

The proportional term responds to the size of the current error. The further the measured value is from the target, the harder it corrects. HP Academy points out that on its own it never brings the error fully to zero, because its effect shrinks as the error shrinks.

The integral term works more slowly. It accumulates the error over time and keeps building correction until no error remains. The derivative term responds to how fast the error is changing and, according to HP Academy, acts as a damper. Haltech describes it as pushing the correction in the opposite direction as the target is approached, to help prevent overshoot.

There is almost always a base value underneath, which HP Academy also calls feed-forward. It brings the output close to the target from a table before the controller acts at all. The output is the sum of the base value and the three terms.

Tuning a controller

HP Academy recommends a fixed order. First check that the hardware works properly without closed-loop control. Then set the base value so the controller has little to do. Then come the proportional term, the derivative term and finally the integral term for the remaining error. Test with step changes in target that the system can actually reach.

Typical symptoms

Wrong gains can usually be identified in a datalog:

  • Too little proportional gain: sluggish response, the target is reached late.
  • Too much proportional gain: according to HP Academy, control overshoots the target and becomes unstable.
  • Unreachable target: the integral term keeps growing. HP Academy calls this integral windup. Afterwards control is sluggish, even once an achievable target is set again.
FAQ

FAQ: PID control

Can a PID controller make up for a poor base table?

Only to a limited extent. HP Academy calls the base table critical for stable control: the less work the controller has to do, the better the result.

Want this on your car?

Calibration remotely via datalogs or on the dyno, with Link, Haltech, MaxxECU, Ecumaster or EcuTek. Send me vehicle, ECU and goal.

Get in touch

Last updated:

Kronshorst (Brunsbek) · near Hamburg, Germany

Contact

Project, datalog or question: get in touch directly by phone, WhatsApp or email.

What I need for a quote

  • Car, engine and year
  • ECU: make, model, firmware (or factory ECU)
  • Modifications: turbo, injectors, fuel pump, sensors, intercooler
  • Fuel, e.g. 98 RON or E85
  • Use: road, track days or motorsport
  • Existing calibrations and datalogs; has another tuner worked on it?
  • Preferred: dyno or remote

Enquiry by emailEnquiry via WhatsApp

The buttons open a pre-filled message with these points.