model test ! Simple process model with PI controller parameter ! These are quantities which are known, but which ! the user may wish to change to see their effect mu=1 ; s = 0.5 ; ti = 10 t1=1 ; t2 = 1.3 ! They will normally be given initial values end parameter variable ! These are the variables or unknowns of the problem u, e, ei=0 x, y end variable Equation ! These are the equations e = s-y u = mu*(e + ei/ti) ! This is the controller algebraic equation .ei = e ! integral action ! These are differential equations representing the process... .x = (u-x) / T1 .y = (x-y) / T2 end equation initial x = 1 y = 0 end initial schedule ! This section defines how the model will be run deltat=0.2 ! Timestep steps=50 ! number of timesteps end end model