If you specify multiple runs using the RandomStarts property of opt, looptune
performs only as many runs required to achieve the target objective value of 1. Note that
all tuning goals should be normalized so that a maximum value of 1 means that all design
goals are met.
Examples
Tune Controller to Achieve Specified Bandwidth
Tune the PID Controller in the rct_engine_speed model to achieve the specified
bandwidth.
Open the Simulink model.
mdl = 'rct_engine_speed';
open_system(mdl);
Create an slTuner interface for the model.
st0 = slTuner(mdl,'PID Controller');
Add the PID Controller output, u, as an analysis point to st0.
addPoint(st0,'u');
Based on first-order characteristics, the crossover frequency should exceed 1 rad/s for the
closed-loop response to settle in less than 5 seconds. So, tune the PID loop using 1 rad/s
as the target 0 dB crossover frequency.
looptune