You also configure controller parameters, tuning goals, and experiment parameters as
described in “PID Autotuning for a Plant Modeled in Simulink” on page 8-9.
Run the Model and Tune the Controller Gains
After configuring the block parameters for the experiment, in the model, select external
mode, set the simulation time to infinite, and run the model.
Simulink compiles the model and deploys it to your connected hardware.
- If you have configured the start/stop signal to begin and end the tuning process at
specific times, allow the simulation to run through the end of the experiment. - If you have configured a manual start/stop signal, begin the experiment when your
plant has reached steady-state. Observe the signal at the % conv output, and stop the
experiment when the signal stabilizes near 100%.
When tuning is complete, examine and validate the tuned gains as described in “PID
Autotuning for a Plant Modeled in Simulink” on page 8-9.
For a more detailed example that illustrates the use of external mode to control the
autotuning process via Simulink, see “Tune PID Controller in Real Time Using Open-Loop
PID Autotuner Block” on page 8-31.
Reduce Memory Footprint When Using External Mode
The autotuner blocks contain two modules, one that performs the real-time frequency-
response estimation, and one that uses the resulting estimated response to tune the PID
gains. When you run a Simulink model containing the block in the external simulation
Control Real-Time PID Autotuning in Simulink