Real-Time PID Autotuning
Real-time model-free tuning of PID gains using plant frequency responses
PID autotuning lets you tune a PID controller in real time against a physical plant. If you have a code-generation product such as Simulink® Coder™, you can generate code that implements the tuning algorithm on hardware, letting you tune with or without Simulink in the loop. To get started, see How PID Autotuning Works.
Blocks
Topics
PID Autotuning Basics
- When to Use PID Autotuning
PID autotuning lets you tune a PID controller without a parametric plant model or an initial controller design. Deploy the algorithm to tune a controller in real time for a physical plant. - How PID Autotuning Works
To use PID autotuning, configure and deploy a PID autotuner block. The block injects test signals into your plant and tunes PID gains based on an estimated frequency response. - PID Autotuning for a Plant Modeled in Simulink
Use the PID autotuning algorithm to tune against a plant modeled in Simulink while the model is running. - PID Autotuning in Real Time
Deploy the PID autotuning algorithm as a standalone application for real-time tuning against your physical system. - Control Real-Time PID Autotuning in Simulink
Run the PID algorithm against your physical plant while controlling the tuning process in Simulink. - Tune PID Controller in Real Time Using Closed-Loop PID Autotuner Block
Tune a single-loop PID controller in real time by injecting sinusoidal perturbation signals at the plant input and measuring the plant output during a closed-loop experiment. - Tune PID Controller in Real Time Using Open-Loop PID Autotuner Block
Tune a single-loop PID controller in real time by injecting sinusoidal perturbation signals at the plant input and measuring the plant output during an open-loop experiment.
Motor Control Applications
- BLDC Motor Speed Control with Cascade PI Controllers
Use Closed-Loop PID Autotuner blocks to tune two PI controllers in a cascade configuration. - Tune Field-Oriented Controllers Using Closed-Loop PID Autotuner Block
Tune a field-oriented controller for a permanent magnet synchronous machine in one simulation. - Tune Field-Oriented Controllers for an Asynchronous Machine Using Closed-Loop PID Autotuner Block
Tune a field-oriented controller for an asynchronous machine in one simulation. - Tune Field-Oriented Controllers for a PMSM Using Closed-Loop PID Autotuner Block
Tune a field-oriented controller for a PMSM-based electrical-traction drive in one simulation. - Tune Gain-Scheduled Controller for PMSM Model Using Closed-Loop PID Autotuner Block
Use Closed-Loop PID Autotuner block to tune gain-scheduled PI controller for a PMSM model in one simulation. - Gain-Scheduled PID Autotuning Torque Control for a Nonlinear PMSM
Tune gain-scheduled PID controllers for d-axis and q-axis current loops of a nonlinear PMSM model. (Since R2024a) - Tune PI Controllers Using Field Oriented Control Autotuner (Motor Control Blockset)
This example computes the gain values of PI controllers available in the speed and current control loops by using the Field Oriented Control Autotuner block. - Tune PI Controllers Using Field Oriented Control Autotuner Block on Real-Time Systems (Motor Control Blockset)
Compute the gain values of PI controllers within the speed and current controllers by using the Field Oriented Control Autotuner block. - Tune PI Controllers (in Field-Weakening Control Mode) Using FOC Autotuner Block (Motor Control Blockset)
This example uses the Field Oriented Control Autotuner block to compute the gain values of the PI controllers available in the speed, current, and flux control loops of a field-weakening control algorithm.