#*------------------------------------------------------------------- * 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 * $Id: SecondOrderDynamics.mso 2012$ *---------------------------------------------------------------------*# using "types"; Model SOD ATTRIBUTES Pallete=true; Icon="icon/SOD"; Info="== Second-Order Dynamics== It takes an input variable and computes the respective value of the output variable according to a Second-Order Dynamics (SOD)."; PARAMETERS K as Real(Brief="Steady-state gain"); Tau as time_sec(Brief="Characteristic time"); Dseda as Real(Brief="Damping ratio"); VARIABLES in In as Real(Brief="Input variable",Protected=true,PosX=0,PosY=0.5); W as Real(Brief="First derivative of Y",Hidden=true); out Out as Real(Brief="Output variable",Protected=true,PosX=1,PosY=0.5); EQUATIONS "First-Order Dynamics (FOD)" (Tau^2)*diff(W)/'s'+(2*Tau*Dseda)*diff(Out)+Out=K*In; "First derivative of Ydev" W=diff(Out)*'s'; INITIAL Out=0; W=0; end