Introduction to PID and a Simple Tutorial on PID Tuning

What is PID?

PID (Proportional-Integral-Derivative) controllers are a common type of feedback control algorithm widely used in industrial, instrumentation, and everyday applications.They adjust the controller's output by measuring the difference between the actual output (PV, Process Variable) and the desired setpoint (SP), aiming to minimize this difference.

The output of a PID controller consists of three components:

Proportional (P): Adjusts the output based on the current error, proportional to the error size.

Integral (I): Accumulates error over time to eliminate steady-state error, useful for long-term deviations from the setpoint.

Derivative (D): Predicts future error trends based on the rate of error change, improving system stability by reducing overshoot and speeding up response.

The three parameters of a PID controller (P, I, D) must be adjusted based on specific applications to ensure system stability and performance.

 

Function of PID Parameters

Proportional (P):

  • Controls response speed and magnitude.
  • Too small results in slow response and insufficient system reaction.
  • Too large may cause oscillations and instability.
  • Forms the foundational basis of the entire PID control.

Integral (I):

  • Eliminates steady-state error and enhances system accuracy.
  • Particularly effective in systems with persistent errors or external disturbances.
  • Too large increases response speed but can lead to overshoot and oscillations.

Derivative (D):

  • Suppresses overshoot and oscillations, improving system stability.
  • Suitable for fast-changing systems or those requiring rapid response.
  • Too large can slow down response speed or introduce noise. (Not commonly used in temperature control due to slow temperature changes.)

Assuming current parameter settings:

P = 10, error value e = 60, proportional output = P × e = 10 × 60 = 600

I = 1, error integral value ∑e = 8100, integral output = I × ∑e = 1 × 8100 = 8100

D = 100, error rate of change Δe = 5, derivative output = D × Δe = 100 × 5 = 500

Therefore, the total output signal of the PID controller is the sum of these three parts:

P × e + I × ∑e + D × Δe = 600 + 8100 + 500 = 9300

By adjusting P, I, and D parameters appropriately, the PID controller can accurately control the total output signal to ensure the desired system stability and response speed are achieved.

 

Methods for Tuning PID Parameters

Initial Setup:

Set the proportional coefficient (P), integral coefficient (I), and derivative coefficient (D) of the PID controller to 0.

Increasing the Proportional Coefficient P:

1.Gradually increase the value of the proportional coefficient P and observe the system's response.

2.When oscillations occur after increasing P, note the value of P at which oscillations happen.

3.Gradually decrease P until the system no longer oscillates, reaching a stable proportional coefficient value for the system.

Introducing the Integral Coefficient I:

1.Once a stable proportional coefficient P is found, gradually introduce the integral coefficient I.

2.Observe and adjust the value of I to eliminate static errors in the system.

Fine Adjustment:

1.After setting the proportional and integral coefficients, fine-tuning can be performed.

2.Adjust the values of P and I according to practical application requirements to achieve optimal temperature control effectiveness and stability.

Optional Derivative Coefficient D:

1.If the system requires faster response or better oscillation suppression, introduce the derivative coefficient D.

2.Gradually increase the value of D, observe the system's response, and avoid introducing excessive noise or slowing down the system's response speed.

By adjusting P, I, and D parameters appropriately, the PID controller can accurately control the total output signal to ensure the desired system stability and response speed are achieved.