Last change
on this file since 291 was
176,
checked in by Argimiro Resende Secchi, 16 years ago
|
Fix some new language syntax.
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Id
|
File size:
1.3 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 IAE |
---|
17 | *----------------------------------------------------------------------- |
---|
18 | * - Inputs |
---|
19 | * - One input signal |
---|
20 | * - a setpoint signal |
---|
21 | * |
---|
22 | * - Outputs |
---|
23 | * - One output signal |
---|
24 | * |
---|
25 | * |
---|
26 | *----------------------------------------------------------------------- |
---|
27 | * Author: Tiago Osório |
---|
28 | * $Id: iae.mso 176 2007-03-04 04:56:54Z arge $ |
---|
29 | *---------------------------------------------------------------------*# |
---|
30 | |
---|
31 | using "types"; |
---|
32 | |
---|
33 | |
---|
34 | Model IAE |
---|
35 | |
---|
36 | VARIABLES |
---|
37 | input as Real (Brief="input signal"); |
---|
38 | output as Real (Brief="output signal", Unit='s'); |
---|
39 | setPoint as Real (Brief="setpoint"); |
---|
40 | absError as Real (Brief="absolute error"); |
---|
41 | |
---|
42 | EQUATIONS |
---|
43 | |
---|
44 | "Absolute error definition" |
---|
45 | absError = abs(setPoint-input); |
---|
46 | |
---|
47 | "Calculate output" |
---|
48 | diff(output)=absError; |
---|
49 | |
---|
50 | INITIAL |
---|
51 | output=0*'s'; |
---|
52 | |
---|
53 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.