Workflow for Autotuning in Simulink
The following steps provide a general overview of the workflow for PID autotuning in Simulink using the Closed-Loop PID Autotuner or Open-Loop PID Autotuner blocks.
-
Incorporate a PID autotuner block into your model between the PID controller and the plant.
-
Configure the start/stop signal that controls when the tuning experiment begins and ends.
-
Specify controller parameters such as controller type and the target bandwidth for tuning.
-
Configure experiment parameters such as the amplitudes of the perturbations injected during the frequency-response experiment.
-
Run the model and initiate tuning. Use the start/stop signal to initiate the PID autotuning process. When you start the process, the autotuner block injects test signals and measures the response of the plant.
-
Stop the experiment with the start/stop signal. When the experiment stops, the autotuner block computes and returns tuned PID gains. You can examine the tuned gains for reasonableness.
-
Transfer the tuned gains from the autotuner block to your PID controller. You can then validate the performance of the tuned controller in Simulink.