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

📄 enorm_constr.m

📁 内模控制器(IMC)工具箱。包括参数整定、PID控制器参数转换等
💻 M
字号:
function [f,g]=enorm_constr(e,Xin,y,Mp,w,ps,ms,qs,order,input_delay,pds,qds)
% Complementary sensitivity function for the MIMO system
% Xwc_ub_w Xwc_lb_w are the upper and lower bound tables
% with a structure Xwc_ub_w{i,j}= matrix of many rows of [magnitude w x] 
% global Xwc_ub_w Xwc_lb_w
n=length(order);
for j=1:n
   x=Xin(j,:);
if w % Define s = jw
   s=sqrt(-1)*w;
else
   s=sqrt(-1)*x(end);
end
filter=zeros(1,n);
for i=1:n % compute the value of filter at a given s, filter time constant and order.
   filter(i)=1/(e(i)*s+1)^order(i);
end
filter=diag(filter); % Make the filter become diagonal matrix
q=inv(eval(qs))*filter; % Evaluate the IMC controller at a given s.
m=eval(ms); % Evaluate the model
p=eval(ps); % Evaluate the process at a given s and x.
if any(input_delay~=0) % Take care if the control effort is delayed.(Dtarray)
   delay=eye(n);
   for i=1:n
        delay(i,i)=exp(-input_delay(i)*s);
    end
    m=m*delay;
    p=p*delay;			
end
temp=abs(p*q*inv(eye(n)+(p-m)*q)); % The magnitude of the close loop frequency response matrix.
f(j)=temp(j,j)-Mp(j);				% Pick the i,j element as the output.
end
g=[];

⌨️ 快捷键说明

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