Identification of a First Order Model 
with Time Delay using Moments 
Author's Data: Housam BINOUS
Department of Chemical Engineering
National Institute of Applied Sciences and Technology
Tunis, TUNISIA
Email: binoushousam@yahoo.com

Acknowledgement :
Experimental data were obtained from Process Dynamics, Modeling and Control, Ogunnaike and Ray, Oxford University Press, 1994.

Interpolation of experimental data

time={0,0.5,1,1.5,2,2.5,3,3.5,4,4.5,5,5.5,6,6.5,7,7.5,8,8.5,9,9.5,10};

ImpulseResponse={0,0,0,0,10.10,6.36,3.86,2.36,1.43,0.86,0.53,0.31,0.19,0.13,0.06,0.042,0.021,0.017,0.011,0.006,0.003};

tt=Transpose[{time,ImpulseResponse}];

IR=Interpolation[tt,InterpolationOrder->1]

Off[InterpolatingFunction::dmval]

plt1=ListPlot[tt,PlotRange->All,PlotStyle->PointSize[0.02]]

Computing moments and normalized moments

Off[NIntegrate::slwcon]

Off[NIntegrate::ncvb]

(Subscript[M, 0]) = NIntegrate[IR[t], {t, 0, 10}]

(Subscript[M, 1]) = NIntegrate[t IR[t], {t, 0, 10}]

(Subscript[M, 2]) = NIntegrate[t^2 IR[t], {t, 0, 10}]

(Subscript[μ, 1]) = ((Subscript[M, 1])/(Subscript[M, 0]))

(Subscript[μ, 2]) = ((Subscript[M, 2])/(Subscript[M, 0]))

Computing time constant (τ) gain (K) and delay (α)

sol = 
      Solve[{-α == τ - (Subscript[μ, 1]), (α^2)/
              2 == -τ (Subscript[μ, 1]) + (Subscript[μ, 2])/
                2}, {α, τ}]

K = (Subscript[M, 0])

τ = τ /. sol[[2]]

α = α /. sol[[2]]

Obtaining the impulse response of the first order system with τ=1.002, α=1.778 and K=13.144

u[t_]:=ϵ (UnitStep[t]-UnitStep[t-1/ϵ])

ϵ = 10000;

Plot[u[t],{t,0,5/ϵ},PlotStyle->RGBColor[0,0,1]]

sol2=NDSolve[{τ f'[t]+f[t]==K u[t-α],f[α]==0},f[t],{t,α,10}]

plt2=Plot[f[t]/.sol2,{t,α,10},PlotStyle->RGBColor[1,0,0],PlotRange->All]

Show[plt1,plt2]