Model-Based PID Controller Tuning
Simulink Control Design™ PID tuning tools let you tune single-loop control systems containing continuous or discrete PID Controller or PID Controller (2DOF) Simulink blocks. To decide which PID tuning tool is right for your application, see Choose a Control Design Approach.
|PID Tuner||Tune PID controllers|
|PID Controller||Continuous-time or discrete-time PID controller|
|PID Controller (2DOF)||Continuous-time or discrete-time two-degree-of-freedom PID controller|
|Discrete PID Controller||Discrete-time or continuous-time PID controller|
|Discrete PID Controller (2DOF)||Discrete-time or continuous-time two-degree-of-freedom PID controller|
|Control Design Onramp with Simulink||Self-paced, interactive tutorial included with Simulink Control Design license|
PID Tuning Basics
- Choose a Control Design Approach
Simulink Control Design provides several approaches to tuning Simulink blocks, such as Transfer Fcn and PID Controller blocks.
- Introduction to Model-Based PID Tuning in Simulink
Use PID Tuner for interactive tuning of PID gains in a Simulink model containing a PID Controller or PID Controller (2DOF) block.
- Tune PID Controller to Favor Reference Tracking or Disturbance Rejection
Tune a PID controller to reduce overshoot in reference tracking or to improve rejection of a disturbance at the plant input.
- Tune PID Controller Within Model Reference
When you open a PID Tuner from a controller block in a model that is referenced in one or more open models, specify the top-level model for linearization and tuning.
Alternative Plant Models
- Tune at a Different Operating Point
By default, PID Tuner linearizes your plant and designs a controller at the operating point specified by the initial conditions in your Simulink model. Sometimes, this operating point differs from the operating point for which you want to design a controller.
- Design PID Controller from Plant Frequency-Response Data
When your plant model does not linearize, one option is to design a PID controller based on simulated frequency-response data. Simulink Control Design gives you several ways to do so.
- Interactively Estimate Plant from Measured or Simulated Response Data
For plants that do not linearize, if you have System Identification Toolbox™ software, PID Tuner lets you estimate the parameters of a linear plant model based on time-domain response data. You can then tune a PID controller for the resulting estimated model.
Gain-Scheduled PID Control
- Design Family of PID Controllers for Multiple Operating Points
If your nonlinear Simulink model operates over a wide range of operating conditions, you can design an array of PID controllers for multiple model operating points.
- Implement Gain-Scheduled PID Controllers
To implement gain-scheduled control using a family of PID controllers, create a lookup table that associates each plant operating point with the corresponding PID gains.
Two-Degree-of-Freedom PID Controllers
- Design Two-Degree-of-Freedom PID Controllers
Tune PID Controller (2DOF) blocks to achieve both good setpoint tracking and good disturbance rejection.
- Specify PI-D and I-PD Controllers
PI-D and I-PD controllers are used to mitigate the influence of changes in the reference signal on the control signal. These controllers are variants of the 2DOF PID controller.
Some Simulink blocks, such as those with sharp discontinuities, can produce poor linearization results. For example, when your model operates in a region away from the point of discontinuity, the linearization of the block is zero.
If you cannot find a good design using PID Tuner, try a different PID controller type. If no PID controller is satisfactory, consider designing a more complex controller.
When you run your Simulink model using the PID gains computed by PID Tuner, the simulation output can differ from the PID Tuner response plot.
When you run your Simulink model using the PID gains computed by PID Tuner, the simulation output may not meet your design requirements.
If controller performance deteriorates when you discretize a tuned continuous-time PID controller, consider tuning a discrete-time controller directly.
When you use PID Tuner to design a controller, the resulting derivative gain can have a different sign from the integral gain. PID Tuner always returns a stable controller, even if one or more gains are negative.