source: trunk/Block-Oriented EML/Control Systems/FirstOrderDynamics.mso @ 980

Last change on this file since 980 was 944, checked in by Argimiro Resende Secchi, 9 years ago

Adding Block-Oriented library by Jonathan Ospino Pinedo

File size: 1.9 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 is distributed under the terms of the ALSOC LICENSE as
9* available at http://www.enq.ufrgs.br/alsoc.
10*-----------------------------------------------------------------------
11* Author: Jonathan Ospino P.
12* $Id: FirstOrderDynamics.mso  2012$
13*---------------------------------------------------------------------*#
14
15using "types";
16 
17Model FOD
18       
19        ATTRIBUTES
20        Pallete=true;
21        Icon="icon/FOD";
22        Info="== First-Order Dynamics==
23             
24                  It takes an input variable and computes
25              the respective value of the output variable according
26              to a First-Order Dynamics (FOD).";
27       
28        PARAMETERS
29       
30        K as Real(Brief="Steady-state gain");
31        Tau as time_sec(Brief="Time constant");
32
33
34        VARIABLES
35        in In as Real(Brief="Input variable",Protected=true,PosX=0,PosY=0.5);
36        out Out as Real(Brief="Output variable",Protected=true,PosX=1,PosY=0.5);
37       
38        EQUATIONS
39        "First-Order Dynamics (FOD)"
40        Tau*diff(Out)+Out=K*In;
41       
42        INITIAL
43        Out=0;
44       
45end
46
47Model FOD2
48       
49        ATTRIBUTES
50        Pallete=true;
51        Icon="icon/FOD";
52        Info="== First-Order Dynamics==
53             
54                  It takes an input variable and computes
55              the respective value of the output variable according
56              to a First-Order Dynamics (FOD).";
57       
58        PARAMETERS
59       
60        K as Real(Brief="Steady-state gain");
61        Tau as time_sec(Brief="Time constant");
62
63
64        VARIABLES
65        in In as Real(Brief="Input variable",Protected=true,PosX=1,PosY=0.5);
66        out Out as Real(Brief="Output variable",Protected=true,PosX=0,PosY=0.5);
67       
68        EQUATIONS
69        "First-Order Dynamics (FOD)"
70        Tau*diff(Out)+Out=K*In;
71       
72        INITIAL
73        Out=0;
74       
75end
Note: See TracBrowser for help on using the repository browser.