
% This is function funiaepidideal.m
% Minimizes IAE for ideal (parrallell) PID


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

Kc=x(1)
taui=x(2)
taud=x(3)
    
  sim('tunepidideal');
  funiaepidideal = iae(Tid,y-ys)


