📄 mimo1com.m
字号:
function f=mimo1com(x,y,e,signo,w,ps,ms,qs,order,row,col,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
if iscell(e)
e=e{1};
end
if w % Define s = jw
s=sqrt(-1)*w;
else
s=sqrt(-1)*x(end);
end
n=length(order);
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=signo*temp(row,col); % Pick the i,j element as the output.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -