
% This is function funiaeki.m
% Minimizes IAE
% Assumes taui=taud
% uses Ki during minimization


function funiae = f(x)
global Tid y ys Kc taui taud

Kc=x(1)*x(2)
taui=x(2)
taud=taui
    
  sim('tunepid');
  funiae = iae(Tid,y-ys)


