The leader in industrial automation and control solutions

PID Control Basics

Proportional-Integral-Derivative, PID, control is a control loop feedback mechanism in which the controller continuously calculates an error value as the difference between a measured process value (PV) and a desired set value (SV).

The PID controller attempts to minimize the error over time by adjusting a control variable to a new value.

  • In this control:
    • P accounts for the present values of the error.
    • I accounts for the past value of the error.
    • D accounts for the predicted future values of the error based on the current rate of change.
PID Control Basics Diagram in MapleLogic

PID Basics

Direct/Forward Action & Reverse Action

Direct/Forward Action

  • The manipulation value (MV) will increase when the process value (PV) is greater than the set value (SV).
  • Works with heating systems.

Reverse Action

  • The manipulation value (MV) will decrease when the process value (PV) is greater than the set value (SV).
  • Works with cooling systems.

Change of MV according to PV

PID Control Basics Change of MV According to PV in MapleLogic

Control Graph by Forward and Reverse Action

PID Control Basics Control Graph by Forward and Reverse Action in MapleLogic

Proportional (P) Control Action

Proportional (P) control generates the manipulation value (MV) in proportion to the error (E).

  • E: Difference between the set value (SV) and process value (PV).
  • The manipulation value (MV) is calculated as follows:
    • MV = Kp + E
      • Kp: proportional gain
        • If the Kp value is too large, the control process is getting fast but the system will be in danger for oscillation.
        • If the Kp value is too small, the control process is getting slow to make it stable.
  • Under proportional (P) control, the offset, or residual error, will remain until the bias on the controller’s output is manually changed to remove the offset.
PID Control Basics Proportional Control Diagram in MapleLogic
PID Control Basics Manipulated Value Due to Proportion Diagram in MapleLogic

Internal (I) Control Action

  • Integral (I) control will generate the manipulation value (MV) in proportion to the time-integral of the error (E).
  • Integral action eliminates the offset.
  • If the integral time is set too long, the controller will be sluggish.
  • If the integral time is set too short, the control loop will oscillate and become unstable.
  • The integral (I) action is used with the PI control or PID control.
    • It is not used by itself.
PID Control Basics Integral Control Action in MapleLogic

Derivative (D) Control Action

  • Derivative (D) control will generate the manipulation value (MV) in proportion to the rate of change in the error (E).
  • By adding the D control, quick corrective action can be obtained at the beginning of the upset condition.
  • If the derivative time is set too long, oscillations will occur and the control loop will run unstable.
  • If the derivative time is set to 0, the derivative control does NOT function.
  • The derivative (D) control is used with PI and PID control.
    • It is not used by itself.
PID Control Basics Derivative Control Action in MapleLogic

PID Control Formula

  • The direct/forward action, reverse action, and filtered present value are calculated in the following:

Direct/Forward Action

MVn = MVn-1 + Kp{(En – En-1) + (Ts / Ki) × En + (Kd / Ts) × (2PVnf-1 – PVnf – PVnf-2)}

En = SV – PVnf

Reverse Action

MVn = MVn-1 + Kp{(En – En-1) + (Ts / Ki) × En – (Kd / Ts) × (2PVnf-1 – PVnf – PVnf-2)}

En = PVnf – SV

Filtered Present Value

PVnf = PVn + α(PVnf-1 – PVn)

Variables

  • En: Currently sampling deviation
  • En-1: Deviation at an interval before
  • Kp: Proportional integer
  • Ki: Integral integer
  • Kd: Differential integer
  • Ts: Sampling interval
  • α: Filter coefficient
  • MVn: Present manipulation value
  • SV: Set value
  • PVn: Process value of the present sampling cycle
  • PVnf: Process value of the present sampling cycle after filtering
  • PVnf-1: Process value of the preceding sampling cycle after filtering
  • PVnf-2: Process value of the sampling cycle two cycles before after filtering