PID Controller Tuning

Automatic and interactive tuning of PID gains

Control System Toolbox™ software offers several tools and commands for tuning PID controllers. To select the best tool for your application, seeChoosing a PID Controller Design Tool.

For information about tuning PID controllers in Simulink®models, seeModel-Based PID Controller Tuning(Simulink Control Design).

Apps

PID Tuner Tune PID controllers

Live Editor Tasks

Tune PID Controller Tune PID Controller for LTI plant in the Live Editor

Functions

pidtune PID tuning algorithm for linear plant model
pidtuneOptions Define options for pidtune command
getPIDLoopResponse Closed-loop and open-loop responses of systems with PID controllers
pidTuner Open PID Tuner for PID tuning

Topics

PID Tuning Basics

Choosing a PID Controller Design Tool

控制系统工具箱软件provides several tools for designing PID controllers.

Designing PID Controllers with PID Tuner

PID Tuner lets you perform automatic, interactive tuning of PID controllers.

PID Controller Types for Tuning

Control System Toolbox PID tuning tools can generate and tune many PID and 2-DOF PID controller types.

Interactive PID Tuning

PID Controller Design for Fast Reference Tracking

Tune a PID Controller to meet rise-time and settling-time requirements.

Tune PID Controller to Favor Reference Tracking or Disturbance Rejection (PID Tuner)

PID tuning is a tradeoff between reference-tracking and disturbance-rejection performance. This example shows how to tune to favor one or the other when using PID Tuner.

PID Controller Design in the Live Editor

Use the Tune PID Controller task to generate code in the Live Editor for designing a PID controller for a linear plant model.

Analyze Design in PID Tuner

PID Tuner provides system response plots and other tools for tuning PID controllers.

Command-Line PID Tuning

在命令行中PID控制器设计

Programmatically tune a PID controller using thepidtunecommand.

Tune PID Controller to Favor Reference Tracking or Disturbance Rejection (Command Line)

Use the tuning options of thepidtunecommand to favor reference tracking or disturbance rejection at the command line.

Designing Cascade Control System with PI Controllers

Design two PI controllers for a cascade control system using thepidtunecommand.

PID Controller Design from Measured Response Data

Interactively Estimate Plant Parameters from Response Data

If you have System Identification Toolbox™ software, you can use PID Tuner to estimate a linear plant model based on response data measured from your system. PID Tuner then tunes a PID controller for the resulting model.

Tune PID Controller from Measured Plant Data Using Live Editor Tasks

Use Live Editor Tasks to generate code for tuning a PID controller based on measured plant response.

System Identification for PID Control

System identification is the process of estimating a dynamic representation of the system you want to control, based on the system response to a known excitation.

Two-Degree-of-Freedom PID Controllers

优化二维OF PID Controller (PID Tuner)

Design a two-degree-of-freedom (2-DOF) PID controller, and compare the controller performance with that of a 1-DOF PID controller.

优化二维OF PID Controller (Command Line)

Design a two-degree-of-freedom (2-DOF) PID controller, and compare the controller performance with that of a 1-DOF PID controller.

Tuning in金宝app

PID Controller Tuning in Simulink

You can tune the gains ofPID Controllerblocks to achieve a robust design with the desired response time using PID Tuner.

Design PID Controller Using Simulated I/O Data

This example shows how to tune a PID controller for plants that cannot be linearized.

Design PID Controller Using Estimated Frequency Response

When your plant cannot be linearized, you can estimate a plant model using frequency response estimation and import the plant model into PID Tuner.

PID Algorithm

PID Tuning Algorithm

MathWorks®algorithm for tuning PID controllers tunes the PID gains to achieve a good balance between performance and robustness.

Featured Examples