Main Content

PID Controller Types for Tuning

Control System Toolbox™ PID tuning tools can tune many PID and 2-DOF PID controller types. The term controller type refers to which terms are present in the controller action. For example, a PI controller has only a proportional and an integral term, while a PIDF controller contains proportional, integrator, and filtered derivative terms. This topic summarizes the types of PID controllers available for tuning in the following tools:

Specifying PID Controller Type

The PID tuning tools let you design numerous controller types. How you specify controller type depends on which tool you are using.

Command-Line Tuning

For command-line tuning, provide the type argument to the pidtune command. For example, C = pidtune(G,'PI') tunes a PI controller for plant G.

Alternatively, if you provide an existing controller object as the input argument C0, pidtune tunes a new controller of the same type and form. For example, suppose C0 is a pid controller object that has proportional and derivative action only (PD controller). Then, pidtune(G,C0) generates a new pid controller object that also has only proportional and derivative action. See pidtune.

For more about the specific controller types available with command-line tuning, see:

PID Tuner App

In the PID Tuner app, you can specify a controller type when you open the app or change controller type within the app.

  • Specify type when opening the app — Provide the type argument to the pidTuner command when you open PID Tuner. For example, pidTuner(G,'PIDF2') opens PID Tuner with an initial design that is a 2-DOF PID controller with a filter on the derivative term.

  • Specify type with an existing controller object — Provide the baseline-controller Cbase argument to the pidTuner command when you open PID Tuner. PID Tuner designs a controller of the same type as Cbase. For example, suppose C0 is a pid controller object that has proportional and derivative action only (PD controller). Then, pidTuner(G,C0) opens PID Tuner with an initial design that is a PD controller.

  • Specify controller type within the app — In PID Tuner, use the Type menu to change controller types.

For more about the specific controller types available in the PID Tuner app:

Tune PID Controller Live Editor Task

In the Tune PID Controller task in the Live Editor, you specify controller type using the Degrees of Freedom and Controller Type menus.

For more about the specific controller types available in the Tune PID Controller task, see:

1-DOF Controllers

The following table summarizes the 1-DOF PID controller types available with all tools and provides representative controller formulas for parallel form. The standard-form and discrete-time formulas are analogous.

TypeController ActionsContinuous-Time Controller Formula (parallel form)Discrete-Time Controller Formula (parallel form, ForwardEuler integration method)
PProportional onlyKpKp
IIntegral only

Kis

KiTsz1

PIProportional and integral

Kp+Kis

Kp+KiTsz1

PDProportional and derivative

Kp+Kds

Kp+Kdz1Ts

PDFProportional and derivative with first-order filter on derivative term

Kp+KdsTfs+1

Kp+Kd1Tf+Tsz1

PIDProportional, integral, and derivative

Kp+Kis+Kds

Kp+KiTsz1+Kdz1Ts

PIDFProportional, integral, and derivative with first-order filter on derivative term

Kp+Kis+KdsTfs+1

Kp+KiTsz1+Kd1Tf+Tsz1

2-DOF Controllers

The tuning tools can automatically design 2-DOF PID controller types with free setpoint weights. The following table summarizes the 2-DOF controller types available in all tools and provides representative controller formulas for parallel form. The standard-form formulas are analogous. For more information about 2-DOF PID controllers generally, see Two-Degree-of-Freedom PID Controllers.

TypeController ActionsContinuous-Time Controller Formula (parallel form)Discrete-Time Controller Formula (parallel form, ForwardEuler integration method)
PI22-DOF proportional and integral

u=Kp(bry)+Kis(ry)

u=Kp(bry)+KiTsz1(ry)

PD22-DOF proportional and derivative

u=Kp(bry)+Kds(cry)

u=Kp(bry)+Kdz1Ts(cry)

PDF22-DOF proportional and derivative with first-order filter on derivative term

u=Kp(bry)+KdsTfs+1(cry)

u=Kp(bry)+Kd1Tf+Tsz1(cry)

PID22-DOF proportional, integral, and derivative

u=Kp(bry)+Kis(ry)+Kds(cry)

u=Kp(bry)+KiTsz1(ry)+Kdz1Ts(cry)

PIDF22-DOF proportional, integral, and derivative with first-order filter on derivative term

u=Kp(bry)+Kis(ry)+KdsTfs+1(cry)

u=Kp(bry)+KiTsz1(ry)+Kd1Tf+Tsz1(cry)

2-DOF Controllers with Fixed Setpoint Weights

With PID control, step changes in the reference signal can cause spikes in the control signal contributed by the proportional and derivative terms. By fixing the setpoint weights of a 2-DOF controller, you can mitigate the influence on the control signal exerted by changes in the reference signal. For example, consider the relationship between the inputs r (setpoint) and y (feedback) and the output u (control signal) of a continuous-time 2-DOF PID controller.

u=Kp(bry)+Kis(ry)+Kds(cry)

If you set b = 0 and c = 0, then changes in the setpoint r do not feed through directly to either the proportional or the derivative terms in u. The b = 0, c = 0 controller is called an I-PD type controller. I-PD controllers are also useful for improving disturbance rejection.

PID Tuner and pidtune can design the fixed-setpoint-weight controller types summarized in the following table. The standard-form and discrete-time formulas are analogous.

TypeController ActionsContinuous-Time Controller Formula (parallel form)Discrete-Time Controller Formula (parallel form, ForwardEuler integration method)
I-PD2-DOF PID with b = 0, c = 0

u=Kpy+Kis(ry)Kdsy

u=Kpy+KiTsz1(ry)Kdz1Tsy

I-PDF2-DOF PIDF with b = 0, c = 0

u=Kpy+Kis(ry)KdsTfs+1y

u=Kpy+KiTsz1(ry)Kd1Tf+Tsz1y

ID-P2-DOF PID with b = 0, c = 1

u=Kpy+Kis(ry)+Kds(ry)

u=Kpy+KiTsz1(ry)+Kdz1Ts(ry)

IDF-P2-DOF PIDF with b = 0, c = 1

u=Kpy+Kis(ry)+KdsTfs+1(ry)

u=Kpy+KiTsz1(ry)+Kd1Tf+Tsz1(ry)

PI-D2-DOF PID with b = 1, c = 0

u=Kp(ry)+Kis(ry)Kdsy

u=Kp(ry)+KiTsz1(ry)Kdz1Tsy

PI-DF2-DOF PIDF with b = 1, c = 0

u=Kp(ry)+Kis(ry)KdsTfs+1y

u=Kp(ry)+KiTsz1(ry)Kd1Tf+Tsz1y

See Also

Functions

Live Editor Tasks

Related Topics