编辑: JZS133 | 2019-07-17 |
程序如下: clear all;
num=[1 2];
den=conv([1
4 3],[1
4 3]);
sys=tf(num,den);
rlocus(sys);
[k,poles]=rlocfind(sys) selected_point = 0.0237 + 3.1056i k = 54.1949 poles = -5.9547 -0.0134 + 3.1252i -0.0134 - 3.1252i -2.0184 由上图可知,利用rlocfind函数找出根轨迹与虚轴的交点处的增益k= 51.8211,说明当k< 51.8211时系统稳定. 下面借助于Impulse函数来验证,分别取k=54, k=55, k=56 求出闭环系统的冲激响应,程序如下: %K=54时: num1=conv(54,[1 2]);
den1=conv([1
4 3],[1
4 3]);
[num, den]=feedback (num1, den1, 1, 1);
figure (1) impulse (num, den, 800) %K=55时: num2=conv(55,[1 2]);
den2=conv([1
4 3],[1
4 3]);
[num, den]=feedback (num2, den2, 1, 1);
figure (2) impulse (num, den, 20) %K=56时: num3=conv(56,[1 2]);
den3=conv([1
4 3],[1
4 3]);
[num, den]=feedback (num3, den3, 1, 1);
figure (3) impulse (num, den, 1200) 对运行结果分析:当k=54时,闭环系统稳定;
当k=55时,闭环系统临界稳定;
当k=56时,闭环系统发散.