source: mso/eml/controllers/lead_lag.mso @ 37

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

Fixed warning and error messages

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 939 bytes
Line 
1#*----------------------------------------------------------------------
2* Model Lead Lag
3*-----------------------------------------------------------------------
4* - Inputs
5*               - a input signal
6*
7* - Outputs
8*               - a output signal
9*
10* - Assumptions
11*
12*-----------------------------------------------------------------------
13* Author: Tiago Osório
14* $Id: lead_lag.mso 37 2006-10-23 16:47:17Z paula $
15*---------------------------------------------------------------------*#
16
17using "types";
18 
19 
20Model Lead_lag
21
22        PARAMETERS
23    gain  as positive (Brief="model gain");
24        beta  as positive (Brief="lead time constant", Unit="s");
25        alpha as positive (Brief="lag time constant", Unit="s");
26       
27        VARIABLES
28        input  as Real (Brief="input signal");
29        output as Real (Brief="output signal");
30        aux    as Real (Brief="internal variable");
31       
32        EQUATIONS
33       
34        "Calculate variable aux"
35        alpha*diff(aux)=gain*input-aux;
36       
37        "Calculate output"
38        output=beta*diff(aux) + aux;
39
40        INITIAL
41        diff(aux)= 0 * "1/s";
42       
43end
Note: See TracBrowser for help on using the repository browser.