% problem: Example 2.6 (page 126 B.Wie's book) % G = K(t_1 s+1)/(s^2*(t_2 s +1)); % construct transfer function,% T_1 = 0.75; T_2 = 1/8; K = 4; G = tf(K*[T_1 1], [T_2 1 0 0]) % % compute root locus, figure(1); axis equal; rlocus(G) grid on;% % plot open-loop bode plot, % figure(2); bode(G) grid on; % Nyquist plot figure(3) nyquist(G) figure(4); nichols(G) % gain and phase margin; figure(5); margin(G) % form closed-loop transfer function H =tf([1],[1]) Cloop = feedback(G,H) figure(6); bode(Cloop); grid on; % step input response figure(7); sys = ss(Cloop); step(sys);