📄 itae.m
字号:
function [ISE,IAE,ITAE]=itae(tt,yy,sp)
% calculate the step response integral criteria: ise,iae,itae
% INPUT: tt the time vactor, yy the output response vector, sp the setpoint
% OUTPUT:ISE,IAE and ITAE
% Copyright 2001-2002 ECUST.
% $Revision: 1.2 $ $Date: 2001/04/18 07:01:28 $
if nargin < 3, sp=1;end;% unity step signal
if length(tt) ~= length(yy) & nargin == 2
error('The input and output must have the same length');
end;
if nargin < 2, erroe('The response data lost!');end;
tend=tt(length(tt));tsp=tt(2)-tt(1);yss=mean(yy(round(tend*0.9):tend));
if abs(yss-sp)<0.001*sp
err=sp-yy;ISE=sum(err.^2)*tsp;
IAE=sum(abs(err))*tsp;
ITAE=sum(tt*abs(err)')*tsp;
else
error('Not arrive the steady state');
end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -