%题一见上贴
%题二
s=tf('s')
sys=80*(0.01*s+1)/(((1/40)*s+1)*((s/200)^2+(0.6/200)*s+1))
bode(sys)
grid on
s=tf('s')
sys=10/(s*(s+1)*(s+5))
[Gm,Pm,Wg,Wp]=margin(sys) %Gm 幅值裕度 Pm 相位裕度 Wg 频率 Wp 剪切频率
bode(sys)
grid on
%K=1时
s=tf('s')
sys=2/(s*(s^4+5.5*s^3+21.5*s^2+21*s+23))
Gc=(1+0.1*s)/(1+s)
H=1
Wb=(sys*Gc)/(sys*Gc+1)
nyquist(Wb)
rlocus(Wb)
bode(Wb)
grid
%K=0.1时
s=tf('s')
sys=2/(s*(s^4+5.5*s^3+21.5*s^2+21*s+23))
Gc=(0.1+0.01*s)/(1+s)
H=1
Wb=(sys*Gc)/(sys*Gc+1)
nyquist(Wb)
rlocus(Wb)
bode(Wb)
grid
%K=10时
s=tf('s')
sys=2/(s*(s^4+5.5*s^3+21.5*s^2+21*s+23))
Gc=(10+1*s)/(1+s)
H=1
Wb=(sys*Gc)/(sys*Gc+1)
nyquist(Wb)
rlocus(Wb)
bode(Wb)
grid