G = tf(1000,[1 0 0]); w = 2*pi*100/4.3;% require 2 zeroes to be a factor of ~4 below desired BW % to achieve desired PM. This factor becomes a tuning parameter. T = 1/6000; z = 1; % z = .707; Td = 1/w/w; Ti = Td*2*z*w; k = 120; % k = 70; kk = k*Td/Ti; D = tf(kk*[1 Ti/Td 1/Td],[1 0]); k*[(1+T/Ti+Td/T),-(1+2*Td/T),Td/T] % equation 3.17, page 66 figure(1) subplot(2,2,[1 3]) margin(G),grid on subplot(2,2,[2 4]) margin(G),grid on,hold on margin(D*G),grid on,hold off figure(2) [Gm,Pm,Wcg,Wcp] = margin(D*G); sysCL = feedback(D*G,1); % [mag,phase,w] = bode(sysCL); % loglog(w,mag(:)),grid on step(sysCL),grid on title(['step response PM = ',num2str(Pm-Wcp*180/pi*T/2)])

The step response with final PM is: step response PM = 52.1016 1.4

1.2

Amplitude

1

0.8

0.6

0.4

0.2

0

0

0.005

0.01

0.015

0.02 Time (sec)

0.025

0.03

0.035

0.04

Solution for Take Home Exam 1

, a) Design feedback assuming you have access to all the state elements. Place the closed- loop system poles at s = [-1 +- 1j, -0.5 +- 5j]....