Current plot held
The Simulink response exhibits small residual oscillations. The notch filter discretization
is the likely culprit because the notch frequency is close to the Nyquist frequency pi/
0.002=1570 rad/s. By default the notch is discretized using the ZOH method. Compare
this with the Tustin method prewarped at the notch frequency:
wn = damp(N); % natural frequency of the notch filter
Ts = 0.002; % sample time of discrete notch filter
Nd1 = c2d(N,Ts,'zoh');
Nd2 = c2d(N,Ts,'tustin',c2dOptions('PrewarpFrequency',wn(1)));
clf, bode(N,Nd1,Nd2)
12 Loop-Shaping Design