⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 torlocus.m

📁 华东理工大学自动化系《控制系统分析、设计和应用》教材配套程序实例,有关说明: 1. 安装MATLAB软件。安装时
💻 M
字号:
% torlocus
function torlocus(G)
% 计算并绘制带时滞的系统根轨迹(主根轨迹)

% Copyright 2001-2002 ECUST. 
%   $Revision: 1.2 $  $Date: 2002/02/22 17:35:38 $

G=tf(G);dt=get(G,'inputdelay');[k,s]=dkds(G);[K,Wcg]=critif(G);i=0;
for zeta=[0.99:-0.04:0.85,0.8:-0.1:0],i=i+1;m(1,i)=zeta/sqrt(1-zeta^2);
    [Gmm,Pmm,Wcgm,Wcpm]=freqm(G,m(1,i),'margin');
    w(1,i)=Wcgm(1,1);end;
n=length(w);Gz=zpk(G);p=real(Gz.p{1});z=real(Gz.z{1});
x(1,1:n)=-w(1,1:n).*m(1,1:n);ww=Wcg(1,1);max=-5;
if isempty(s),xx=[x 0];yy=[w ww];else xx=[s x 0];yy=[0 w ww];end;
plot(xx,yy,xx,-yy);hold on;
if length(p)>=1,pp=sortrows([p' z']);pl=length(pp);
if pl/2==floor(pl/2),for i=pl:-2:1,plot([pp(i) pp(i-1)],[0 0]);end;
else pp=[max pp];for i=length(pp):-2:1,plot([pp(i) pp(i-1)],[0 0]);end;end;end;
axis([max 0 -pi/dt pi/dt]);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -