not a trivial task and usually we use one of Padé approximations. We will simulate Padé approximation of 2nd order and 4th order: Input signal is a unit step, communication interval equals 0.01s, length simulation run is 5s, results will be compared with output of built-in discrete function delay (it requires additional array (del in our case) of appropriate size). y1 is a result of simulation of Padé approximation of 2nd order, y2 is a result of simulation of Padé approximation of 4th order and y3 is result of the discrete function delay. When transfer functions of both Padé approximation are developed using one of simulation schemes, the model can be described with the following program: program pade constant tm=1.0 constant tfin=5 array del(101) variable t=0.0 u=step(t,0.) u11d=12/(tm*tm)*u-12/(tm*tm)*y1 u11=integ(u11d,0.) u21d=u11-u*6/tm-y1*6/tm u21=integ(u21d,0.) y1=u21+u u12d=u*1680/(tm*tm*tm*tm)-y2*1680/(tm*tm*tm*tm) u12=integ(u12d,0.) u22d=u12-u*840/(tm*tm*tm)-y2*840/(tm*tm*tm) u22=integ(u22d,0.) u32d=u22+u*180/(tm*tm)-y2*180/(tm*tm) u32=integ(u32d,0.) u42d=u32-u*20/tm-y2*20*tm u42=integ(u42d,0.) y2=u42+u y3=delay(u,tm,#del,ci) cinterval ci=0.01 hdr Pade approximation of dead time prepar y1,y2,y3 output 10,y1,y2,y3 termt(t.ge.tfin) end After the simulation run is finished the results can be displayed as plots. It is possible to trace values of plots, select which plots to display, turning on a grid, zoom etc. References In Slovene: Borut Zupančič (with contributions by Rihard Karba and Drago Matko), Simulacija dinamičnih sistemov, Založba FER, Ljubljana, 1995, Borut Zupančič, SIMCOS – jezik za simulacijo zveznih in diskretnih dinamičnih sistemov, Založba FER, Ljubljana, 1992, External links Borut Zupančič's homepage LMSC download page (the link to SIMCOS is at the bottom) Simulation programming languages