source: trunk/Block-Oriented EML/Control Systems/SecondOrderDynamics.mso @ 986

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

Adding Block-Oriented library by Jonathan Ospino Pinedo

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 is distributed under the terms of the ALSOC LICENSE as
9* available at http://www.enq.ufrgs.br/alsoc.
10*-----------------------------------------------------------------------
11* Author: Jonathan Ospino
12* $Id: SecondOrderDynamics.mso  2012$
13*---------------------------------------------------------------------*#
14
15using "types";
16 
17Model SOD
18       
19        ATTRIBUTES
20        Pallete=true;
21        Icon="icon/SOD";
22        Info="== Second-Order Dynamics==
23             
24                  It takes an input variable and computes
25              the respective value of the output variable according
26              to a Second-Order Dynamics (SOD).";
27       
28        PARAMETERS
29       
30        K as Real(Brief="Steady-state gain");
31        Tau as time_sec(Brief="Characteristic time");
32        Dseda as Real(Brief="Damping ratio");
33
34
35        VARIABLES
36        in In as Real(Brief="Input variable",Protected=true,PosX=0,PosY=0.5);
37        W as Real(Brief="First derivative of Y",Hidden=true);
38        out Out as Real(Brief="Output variable",Protected=true,PosX=1,PosY=0.5);
39       
40        EQUATIONS
41
42        "First-Order Dynamics (FOD)"
43        (Tau^2)*diff(W)/'s'+(2*Tau*Dseda)*diff(Out)+Out=K*In;
44       
45        "First derivative of Ydev"
46        W=diff(Out)*'s';
47       
48        INITIAL
49        Out=0;
50        W=0;
51       
52end
Note: See TracBrowser for help on using the repository browser.