#*------------------------------------------------------------------- * EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC. * * This LIBRARY is free software; you can distribute it and/or modify * it under the therms of the ALSOC FREE LICENSE as available at * http://www.enq.ufrgs.br/alsoc. * * EMSO is distributed under the terms of the ALSOC LICENSE as * available at http://www.enq.ufrgs.br/alsoc. *----------------------------------------------------------------------- * Author: Jonathan Ospino P. * $Id: FirstOrderDynamics.mso 2012$ *---------------------------------------------------------------------*# using "types"; Model FOD ATTRIBUTES Pallete=true; Icon="icon/FOD"; Info="== First-Order Dynamics== It takes an input variable and computes the respective value of the output variable according to a First-Order Dynamics (FOD)."; PARAMETERS K as Real(Brief="Steady-state gain"); Tau as time_sec(Brief="Time constant"); VARIABLES in In as Real(Brief="Input variable",Protected=true,PosX=0,PosY=0.5); out Out as Real(Brief="Output variable",Protected=true,PosX=1,PosY=0.5); EQUATIONS "First-Order Dynamics (FOD)" Tau*diff(Out)+Out=K*In; INITIAL Out=0; end Model FOD2 ATTRIBUTES Pallete=true; Icon="icon/FOD"; Info="== First-Order Dynamics== It takes an input variable and computes the respective value of the output variable according to a First-Order Dynamics (FOD)."; PARAMETERS K as Real(Brief="Steady-state gain"); Tau as time_sec(Brief="Time constant"); VARIABLES in In as Real(Brief="Input variable",Protected=true,PosX=1,PosY=0.5); out Out as Real(Brief="Output variable",Protected=true,PosX=0,PosY=0.5); EQUATIONS "First-Order Dynamics (FOD)" Tau*diff(Out)+Out=K*In; INITIAL Out=0; end