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

📄 mvss2tf.m

📁 包含大量遗传算法程序
💻 M
字号:
function [num, comden] = mvss2tf(a,b,c,d,iu)
%MVSS2TF Multivariable State-Space to Transfer Function conversion.
%
%       [NUM,Comden] = MVSS2TF(A,B,C,D)  
%
%       calculates the multivariable transfer function:
%
%                         NUM(s)          -1
%               H(s) = ---------- = C(sI-A) B + D
%                       Comden(s)
%       of the system:
%               .
%               x = Ax + Bu
%               y = Cx + Du
%
%       The vector Comden contains the coefficients of the common
%       denominator in descending powers of s.  NUM is the numerator transfer
%       function matrix with as many rows as there are system outputs. The
%       number of columns = length(Comden) * number of system inputs

%       Dr M.P. Ford 4th August 1987
% Copyright (c) 1987 by GEC Engineering Research Centre & Cambridge Control Ltd

nargs=nargin;
error(nargchk(4,5,nargs));
error(abcdchk(a,b,c,d));

comden = poly(a);
if nargs~=5    % loop through all inputs
   [m,n]=size(b);
   iu=1:n;
end
[mc,nc] = size(c);
nc1=nc+1;
[md,nd] = size(d);
k=1:nc1;
num= zeros(md, nc1*length(iu));
for ci=1:length(iu)  % for each column
    j=iu(ci);
    for i=1:mc
	num(i,k+(ci-1)*nc1) = poly(a-b(:,j)*c(i,:)) + (d(i,j) - 1) * comden;
    end
end

⌨️ 快捷键说明

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