%
% Function that returns a FOPTD model pluss SIMC tuning for the given lag
% constant.
%                                               writen by: Chriss Girmholt


function [gp, kc, ti]=model(T)

s = tf('s');

kp = 1;                         % process gain k_c
gp = kp/(T*s+1);                % 1 order process model
gp.outputd = 1;                 % delay time

kc = T/(2*gp.outputd)/kp;       % SIMC Kc setting for a FOPDT model
ti = min([T,8*gp.outputd]);     % SIMC tau_i setting for a FOPDT model

end
