编辑: 夸张的诗人 2019-10-16
g11=poly2tfd(12.

8,[16.7,1],0,1);

%POLY2TFD Create transfer functions in

3 row representation将通用的传递函数模型转换为MPC传递函数模型 % g = poly2tfd(num,den,delt,delay) % POLY2TFD creates a MPC toolbox transfer function in following format: %g为对象MPC传递函数模型 % g = [ b0 b1 b2 numerator coefficients) a0 a1 a2 denominator coefficients) % [ delt delay

0 only first

2 elements used in this row) % % Inputs: % num : Coefficients of the transfer function numerator. % den : Coefficients of the transfer function denominator. % delt : Sampling time. Can be

0 (for continuous-time system) or >

0 (for discrete-time system). Default is 0. % delay : Pure time delay (dead time). Can be >= 0. If omitted or empty, set to zero. For discrete-time systems, enter as PERIODS of pure delay (an integer). Otherwise enter in time units. g21=poly2tfd(6.6,[10.9,1],0,7);

g12=poly2tfd(-18.9,[21.0,1],0,3);

g22=poly2tfd(-19.4,[14.4,1],0,3);

delt=3;

ny=2;

tfinal=90;

model=tfd2step(tfinal,delt,ny,g11,g21,g12,g22)%对于这个例子,N=90/3=30 figure(3) plot(model) %TFD2STEP Determines the step response model of a transfer function model.传递函数模型转换成阶跃响应模型 % plant = tfd2step(tfinal, delt2, nout, g1) % plant = tfd2step(tfinal, delt2, nout, g1, ..., g25) % The transfer function model can be continuous or discrete. % % Inputs: % tfinal:truncation time for step response model. % delt2:desired sampling interval for step response model. % nout:output stability indicator. For stable systems, this argument is set equal to number of outputs, ny. For systems with one or more integrating outputs, this argument is a column vector of length ny with nout(i)=0 indicating an integrating output and nout(i)=1 indicating a stable output. % g1, g2,SISO transfer function described above ordered to be read in columnwise (by input). The number of transfer functions required is ny*nu. (nu=number of inputs). Limited to ny*nu

下载(注:源文件不在本站服务器,都将跳转到源网站下载)
备用下载
发帖评论
相关话题
发布一个新话题