What is PID control?

Feedback control that sets the manipulated variable by adding a term proportional to the error e (P), a term proportional to the integral of the error (I) and a term proportional to the derivative of the error (D). It is written u = Kp(e + (1/Ti)∫e dt + Td·de/dt), where Kp is the proportional gain, Ti the integral time and Td the derivative time. The proportional term provides speed, the integral term removes the steady-state error and the derivative term suppresses oscillation. Its structure is simple, and it is used in most industrial control loops, for temperature, motors, power supplies, chemical processes and more.

Japanese name: PID制御

PID control appears in 9 practice questions across 2 topics, including Control Engineering Basics, Analog and electronic circuits.

Field: Control Engineering Basics

Roles of the three actions

Proportional action becomes faster as the gain is raised, but on its own it leaves a steady-state error (offset), and too much gain causes oscillation. Integral action accumulates the remaining error and brings the steady-state error to zero, but it adds phase lag and makes oscillation more likely. Derivative action anticipates changes in the error and suppresses oscillation, but it amplifies noise, so it is used as a filtered derivative combined with a low-pass filter.

Choosing the gains

With a model of the plant, the gains can be chosen while checking the phase margin on a Bode plot. Without a model, initial values are set with rules of thumb such as the Ziegler–Nichols ultimate sensitivity method or step response method, then adjusted while watching the overshoot and settling time. The Ziegler–Nichols values give a rather oscillatory response, so in many cases the gain is lowered from there.

Points for digital implementation

On a microcontroller, the integral is calculated as Σe·Ts and the derivative as a difference such as (e[k] − e[k − 1])/Ts at a fixed sampling period Ts. Integral windup due to saturation of the manipulated variable is guarded against with methods such as conditional integration, and derivative kick from sudden setpoint changes is prevented by applying the derivative only to the measured value. Sampling and computation delays add phase lag, so the sampling frequency is chosen well above the gain crossover frequency.

Try it: questions about PID control

Which of the following is the correct pair of the main purpose of adding integral (I) action in PI control and its side effect?

  1. AThe purpose is to remove high-frequency noise, and the side effect is a larger steady-state error
  2. BThe purpose is to remove the steady-state error to a constant setpoint or disturbance, and the side effect is a phase lag that makes the loop more prone to oscillation
  3. CThe purpose is to anticipate changes in the error, speeding up the response and suppressing overshoot, and the side effect is strong amplification of high-frequency noise
Show answer and explanation

Answer: B. The purpose is to remove the steady-state error to a constant setpoint or disturbance, and the side effect is a phase lag that makes the loop more prone to oscillation

Integral action accumulates the error over time into the manipulated variable, so it keeps changing the manipulated variable as long as any error remains and finally brings the steady-state error to zero. On the other hand, an integrator delays the phase by 90°, which reduces the phase margin and makes overshoot and oscillation more likely. The integral time Ti is therefore tuned so that it is not too short. Speeding up the response, suppressing overshoot and tending to amplify noise are features of derivative action.

Which of the following is the correct pair of a property of derivative (D) action in PID control and a measure taken when implementing it?

  1. AIt accumulates the error over time to remove the steady-state error, and to prevent integral windup the upper and lower limits on the manipulated variable are removed
  2. BIts gain becomes smaller at higher frequencies, so it is robust to noise, and no low-pass filter is used because a filter would add phase lag and cause instability, so it is used as it is
  3. CIt suppresses oscillation with a manipulated variable that follows the rate of change of the error, but it strongly amplifies high-frequency noise, so it is combined with a low-pass filter as a filtered derivative
Show answer and explanation

Answer: C. It suppresses oscillation with a manipulated variable that follows the rate of change of the error, but it strongly amplifies high-frequency noise, so it is combined with a low-pass filter as a filtered derivative

Derivative action produces a manipulated variable proportional to the rate of change of the error and responds in advance, before the error grows, so it suppresses oscillation and increases damping. The gain of a differentiator s grows in proportion to frequency, so it strongly amplifies high-frequency components such as sensor noise. A first-order low-pass filter is therefore combined with it, as in Td·s/(1 + Td·s/N) (a filtered derivative), limiting the gain at high frequencies to about N times. N is often chosen around 8 to 20.

FAQ

When should PI control be used instead of PID control?

For many loops such as flow, pressure and temperature, PI control is enough, and the derivative is often left out because it is sensitive to noise. For plants with large inertia that tend to oscillate, or for motor position control that needs a fast response, the derivative is added to increase damping.

What is the difference between the parallel form and the standard form?

The parallel form writes the three gains independently, u = Kp·e + Ki∫e dt + Kd·de/dt. The standard form writes Kp(e + (1/Ti)∫e dt + Td·de/dt), with Ki = Kp/Ti and Kd = Kp·Td. Products and libraries use different forms, so the parameters must be converted when moving them between them.

PID control in the explanations

Questions that mention PID control (9)

  1. Which of the following is the correct pair of the main purpose of adding integral (I) action in PI control and its side effect?
  2. Which of the following is the correct pair of a property of derivative (D) action in PID control and a measure taken when implementing it?
  3. In PID control, which of the following prevents the manipulated variable from jumping sharply at the instant the setpoint is changed as a step (derivative kick)?
  4. In the Ziegler–Nichols ultimate sensitivity method, the gain is raised under proportional control alone until a sustained oscillation appears, and from that gain Ku and the period of oscillation Tu the PID parameters are set to Kp = 0.6Ku, Ti = 0.5Tu and Td = 0.125Tu. Which of the following are the values for Ku = 8 and Tu = 2 s?
  5. Positional PI control is implemented on a microcontroller, with the duty cycle of a PWM signal (0 to 100%) as the manipulated variable. Which of the following is a correct countermeasure against integral windup?
  6. A digital PI controller with a sampling period Ts = 1 ms calculates the integral with the rectangular approximation Σe·Ts. With an integral gain Ki = 10 s⁻¹, which of the following is the increase in the integral term when an error e = 0.2 lasts for 50 samples?
  7. What is the circuit called in which the feedback resistor of an op-amp inverting amplifier is replaced by a capacitor?
  8. What is the circuit called in which the input resistor of an op-amp inverting amplifier is replaced by a capacitor?
  9. In a unity-feedback system the forward transfer function is G(s) = 9/(1 + 2s). Which of the following is the steady-state error for a step setpoint of size 1?

Books on Control Engineering Basics Ad

As an Amazon Associate I earn from qualifying purchases.

Comparisons that include this term

Semiconductor, Electronics and Computing Calculators

Related terms

Steady-state error Overshoot Operational amplifier (op-amp) Phase margin Microcontroller (MCU) Duty cycle Pulse-width modulation (PWM) Integral windup Fixed point Saturating arithmetic

Back to the glossary