First Order Model Identification 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.5,1,1.5,2,2.5,3,3.5,4,4.5,5,5.5,6,6.5,7};

ImpulseResponse={3.03,1.84,1.12,0.68,0.41,0.25,0.15,0.09,0.06,0.03,0.02,0.01,0.008,0.005};

tt=Transpose[{time,ImpulseResponse}]

IR=Interpolation[tt,InterpolationOrder->1]

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

Computing moments and normalized moments

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

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

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

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

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

Computing time constant (τ) and gain (K)

τ = (Sqrt[(Subscript[μ, 2])/2])

K = (Subscript[M, 0])

Obtaining the impulse response of the first order system with τ=1.002 and K=4.905

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

ϵ = 10000;

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

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

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

Comparing experimental data and data obtained from process identification

Show[plt1,plt2]