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

📄 ctrseq.m

📁 非线性控制 Matlab编译
💻 M
字号:
function P=ctrseq(XX,U,xgoal, ugoal, m,mc,nd,case);% [StateTransitionVector]=CTRSEQ(X,U, XGOAL, UGOAL, m,mc,nd,case,);% Function CTRSEQ rearranges vectors of N applied perturbations U(:,1...N)% and vectors of the system responses X(:,1....N) into the vectors of% the StateTransitions to the nearest steady state.% XGOAL, UGOAL defines the goal dynamics% m-is the dimensionality of the state vector, mc-is the length% of the controlling sequence, nd-is the delay between perturbation% and its effect on the system. Usually mc=m.% case - is the goal dynamics type% Valery Petrov, CNLD 10-29-96% e-mail: Val.Petrov@chaos.ph.utexas.edu% Copyright (c) The University of Texas at Austin% Calculate indices for delayed observations and perturbations% m-length of the embedding sequence% mc-length of the controlling sequence% nd-delay between perturbation application and its effect on the system%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Direct specification of the x and uif (case==0)  indxp=(0:m-1); 	% X indeces for the present state     indup=(0:m+nd-2);	% U indeces for the present state  DX=XX;		        %Create differences  DDX=delsig2(DX,[indxp]);  GDX=delsig2(xgoal*ones(1,m+1),1:m);  XP=[GDX' DDX(:,size(DDX,2))'];  P=[XP'];  if(m + nd > 1)  DDU=delsig2(U,[indup]);  GDU=delsig2(ugoal*ones(1,m),1:(m-1));  UP=[GDU' DDU(:,size(DDU,2))'];    P=[XP';UP']; end end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% X-specified differentially, U -directlyif (case==1)  indxp=(0:m-1); 	% X indices for the past state     indup=(0:m+nd-1);% U indeces for the past state  DX=diff(XX')';		%Create differences  DDX=delsig2(DX,[indxp]);  DDU=delsig2(U,[indup]);  GDX=delsig2(0*ones(size(xgoal))*ones(1,m+1),1:m);  GDU=delsig2(ugoal*ones(1,m+1),1:m);  XP=[GDX' DDX(:,size(DDX,2))'];  UP=[GDU' DDU(:,size(DDU,2))'];    P=[XP';UP']; end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Direct specification of x, differential  uif (case==2)  indxp=(0:m); 	% X indices for the past state     indup=(0:m+nd-2);% U indices for the past state  DX=XX;		        %Create differences  DU=diff(U')';		        %Create differences  DDX=delsig2(DX,[indxp]);  GDX=delsig2(xgoal*ones(1,m+2),1:m+1);  XP=[GDX' DDX(:,size(DDX,2))'];  P=[XP']; if (m + nd > 1)  DDU=delsig2(DU,[indup]);  GDU=delsig2(0*ones(size(ugoal))*ones(1,m),1:(m-1));  UP=[GDU' DDU(:,size(DDU,2))'];    P=[P; UP']; endend

⌨️ 快捷键说明

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