source: branches/newlanguage/eml/controllers/lead_lag.mso @ 144

Last change on this file since 144 was 74, checked in by Paula Bettio Staudt, 16 years ago

Updated controllers files header

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.4 KB
Line 
1#*-------------------------------------------------------------------
2* EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC.
3*
4* This LIBRARY is free software; you can distribute it and/or modify
5* it under the therms of the ALSOC FREE LICENSE as available at
6* http://www.enq.ufrgs.br/alsoc.
7*
8* EMSO Copyright (C) 2004 - 2007 ALSOC, original code
9* from http://www.rps.eng.br Copyright (C) 2002-2004.
10* All rights reserved.
11*
12* EMSO is distributed under the therms of the ALSOC LICENSE as
13* available at http://www.enq.ufrgs.br/alsoc.
14*
15*----------------------------------------------------------------------
16* Model Lead Lag
17*-----------------------------------------------------------------------
18* - Inputs
19*               - a input signal
20*
21* - Outputs
22*               - a output signal
23*
24*
25*-----------------------------------------------------------------------
26* Author: Tiago Osório
27* $Id: lead_lag.mso 74 2006-12-08 18:43:02Z paula $
28*---------------------------------------------------------------------*#
29
30using "types";
31 
32 
33Model Lead_lag
34
35        PARAMETERS
36    gain  as positive (Brief="model gain");
37        beta  as positive (Brief="lead time constant", Unit="s");
38        alpha as positive (Brief="lag time constant", Unit="s");
39       
40        VARIABLES
41        input  as Real (Brief="input signal");
42        output as Real (Brief="output signal");
43        aux    as Real (Brief="internal variable");
44       
45        EQUATIONS
46       
47        "Calculate variable aux"
48        alpha*diff(aux)=gain*input-aux;
49       
50        "Calculate output"
51        output=beta*diff(aux) + aux;
52
53        INITIAL
54        diff(aux)= 0 * "1/s";
55       
56end
Note: See TracBrowser for help on using the repository browser.