
% This is function funiaepi.m
% Minimizes IAE


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

Kc=x(1)
taui=x(2)

    
  sim('tunepid');
  funiaepi = iae(Tid,y-ys)


