... generalized plant is described by hand
... function sysic() is used to obtain generalized plant
simulink model
simulink model for noise problem
execution example for Matlab
rub2 size(Ap) size(Ap,1) size(Ap,2) M = zeros(3,2) size(M,1) size(M,2) gopt simulink simout plot(t, y) plot(t, y, 'r', t, r, 'b') figure(3); bodemag(S, 'r', gopt/WS, 'r--', T, 'b', gopt/WT, 'b--'); ctrlpref bodemag(S, 'r', gopt/WS, 'r--', T, 'b', gopt/WT, 'b--'); grid on ctrlpref figure(6); plot(t, y, 'r', t, r, 'b') grid on figure(7); bodemag(P0, 'r', K, 'b') grid on rub2 grid on gopt plot(t, y, 'r', t, r, 'b') grid on simulink plot(t, y, 'r', t, r, 'b') plot(t, y, 'r', t, n, 'b') plot(t, y*10, 'r', t, n, 'b') plot(t, y, 'r', t, n, 'b') bodemag(P0, 'r', K, 'b') grid on bode(P0, 'r', K, 'b') grid on bode(P0, 'r', K, 'b', P0*K, 'm') grid on bode(P0, 'r', K, 'b', -P0*K, 'm') grid on size(K.a) size(WS.a) size(WT.a) size(P0.a)