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:
PID Tuner app
Tune PID Controller task in the Live Editor
pidtune
command
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 thepidTuner
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 thepidTuner
command when you open PID Tuner. PID Tuner designs a controller of the same type asCbase
. For example, supposeC0
is apid
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.
Type | Controller Actions | Continuous-Time Controller Formula (parallel form) | Discrete-Time Controller Formula (parallel form, ForwardEuler integration method) |
---|---|---|---|
P | Proportional only | Kp | Kp |
I | Integral only |
|
|
PI | Proportional and integral |
|
|
PD | Proportional and derivative |
|
|
PDF | Proportional and derivative with first-order filter on derivative term |
|
|
PID | Proportional, integral, and derivative |
|
|
PIDF | Proportional, integral, and derivative with first-order filter on derivative term |
|
|
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.
Type | Controller Actions | Continuous-Time Controller Formula (parallel form) | Discrete-Time Controller Formula (parallel form, ForwardEuler integration method) |
---|---|---|---|
PI2 | 2-DOF proportional and integral |
|
|
PD2 | 2-DOF proportional and derivative |
|
|
PDF2 | 2-DOF proportional and derivative with first-order filter on derivative term |
|
|
PID2 | 2-DOF proportional, integral, and derivative |
|
|
PIDF2 | 2-DOF proportional, integral, and derivative with first-order filter on derivative term |
|
|
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.
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.
Type | Controller Actions | Continuous-Time Controller Formula (parallel form) | Discrete-Time Controller Formula (parallel form, ForwardEuler integration method) |
---|---|---|---|
I-PD | 2-DOF PID with b = 0, c = 0 |
|
|
I-PDF | 2-DOF PIDF with b = 0, c = 0 |
|
|
ID-P | 2-DOF PID with b = 0, c = 1 |
|
|
IDF-P | 2-DOF PIDF with b = 0, c = 1 |
|
|
PI-D | 2-DOF PID with b = 1, c = 0 |
|
|
PI-DF | 2-DOF PIDF with b = 1, c = 0 |
|
|