Configure the model to use a two-sided speed command signal and simulate the model.
Show the speed response of the model to the two-sided speed command that rises from 0
rad/s to 150 rad/s at 0.05 sec, reverses direction at 0.5 sec and then back to 0 rad/s at
0.8 sec. Save the simulation result to logsout_tuned_twoside in the MAT-file,
SystunedSpeed.mat.
signalbuilder(SignalBuilderPath, 'activegroup', 3);
sim(mdl);
logsout_tuned_twoside = logsout;
save('SystunedSpeed','logsout_tuned_twoside','-append')
Compare the motor speed responses between the existing controller gains and the tuned
result. The speed responses are shown side-by-side over the one-second simulation. The
speed response follows more closely to the step command. The steady-state error also
decreases after the PI controllers are tuned with systune.
13 Control System Tuning Examples