首页 > 编程知识 正文

matlab中劳斯稳定判据,利用劳斯判据判断系统稳定性

时间:2023-05-04 12:43:19 阅读:259188 作者:753

function [routh_list,conclusion] = Routh(chara_equ)

n=length(chara_equ);

chara_equ=reshape(chara_equ,1,n);

if mod(n,2)==0

else

chara_equ=[chara_equ,0];

end

routh=reshape(chara_equ,2,n1);

routh_list=zeros(n,n1);

routh_list(1:2,:)=routh;

i=3;

while 1;

if routh_list(i-1,1)==0 & sum(routh_list(i-1,2:n1))~=0

chara_equ = conv(chara_equ,[1 3]);

n=length(chara_equ);

if mod(n,2)==0

else

chara_equ=[chara_equ,0];

end

routh=reshape(chara_equ,2,n1);

routh_list=zeros(n,n1);

routh_list(1:2,:)=routh;

i=3;

end

ai=routh_list(i-2,1)/routh_list(i-1,1);

for j=1:n1-1

routh_list(i,j)=routh_list(i-2,j+1)-ai*routh_list(i-1,j+1);

end

if sum(routh_list(i,:))==0

k=0;

l=1;

while n-i-k>=0

k=k+2;

l=l+1;

end

routh_list(i,:)=routh_list(i-1,:).*F(1,:);

end

i=i+1;

if i>n

break;

end

end

r=find(routh_list(:,1)<0);

if isempty(r)==1

else

m=n2;

for i=1:n2-1

if r(i+1)-r(i)==1

m=m-1;

end

end

str1='There is ';

if r(n2)==n

str2=num2str(m*2-1);

else

str2=num2str(m*2);

end

str3=' unstable roots!';

end

有点错误     很急  高手帮个忙吧     谢谢   真心感谢

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。