This Bode plot confirms that the plant resonance has been correctly "notched out."
Discretizing the Notch Filter
Again use writeBlockValue to discretize the tuned lead/lag and notch filters and write
their values back to Simulink. Compare the MATLAB and Simulink responses:
writeBlockValue(ST2)
sim('rct_dmcNotch');
t = yout.time;
y = yout.signals.values;
step(T2), hold, plot(t,y,'r--')
legend('Continuous','Hybrid (Simulink)')
Tuning of a Digital Motion Control System