MATLAB程序可分别作出系统的相轨迹和输出曲线如图8-32所示。而当速度反馈系数\(\tau=0.5\)时,系统的相轨迹和输出曲线如图8-33所示。比较可知,该非线性系统采用速度反馈时,超调量减小,响应平稳。

图8-32 无速度反馈时系统的相轨迹和输出曲线(MATLAB)

图8-33 速度反馈系数\(\tau=0.5\)时系统的相轨迹和输出曲线(MATLAB)
MATLAB程序:exe812.m
clc;clear
t=0:0.01:20;e0=[5 0]';[t,e]=ode45('sys812',t,e0);
figure(1);plot(e(:,1),e(:,2));grid
figure(2);plot(t,e(:,1));grid
调用函数:sys812.m
function de=sys812(t,e)
M=1;h=0.5;K=1;tao=0;
de1=e(2);
if ((e(1)+tao*e(2))<h)
u=-M;
elseif (abs(e(1)+tao*e(2))<h)
u=0;
else u=M;
end
de2=-e(2)-K*u;
de=[de1 de2]';
· 438 ·