#*------------------------------------------------------------------- * 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 Copyright (C) 2004 - 2007 ALSOC, original code * from http://www.rps.eng.br Copyright (C) 2002-2004. * All rights reserved. * * EMSO is distributed under the therms of the ALSOC LICENSE as * available at http://www.enq.ufrgs.br/alsoc. *----------------------------------------------------------------------- * Author: Tiago Osório * $Id: lead_lag.mso 354 2007-08-30 17:17:16Z arge $ *---------------------------------------------------------------------*# using "types"; Model Lead_lag ATTRIBUTES Pallete = true; Icon = "icon/Lead_Lag"; Brief = "Model Lead lag."; Info = "== Inputs == * One input signal. == Outputs == * One output signal. "; PARAMETERS gain as positive (Brief="model gain"); beta as positive (Brief="lead time constant", Unit='s'); alpha as positive (Brief="lag time constant", Unit='s'); VARIABLES input as Real (Brief="input signal"); output as Real (Brief="output signal"); aux as Real (Brief="internal variable"); EQUATIONS "Calculate variable aux" alpha*diff(aux)=gain*input-aux; "Calculate output" output=beta*diff(aux) + aux; INITIAL diff(aux)= 0/'s'; end