The results are similar to those obtained when tuning the controller in continuous time.
Now validate the digital controller against the continuous-time plant in Simulink.
writeBlockValue(ST2)
sim('rct_dmcNotch');
t = yout.time;
y = yout.signals.values;
step(T2), hold, plot(t,y,'r--')
legend('Discrete','Hybrid (Simulink)')
Current plot held
Tuning of a Digital Motion Control System