Last change
on this file since 1 was
1,
checked in by Rafael de Pelegrini Soares, 17 years ago

Initial import of the library


Property svn:eolstyle set to
native

Property svn:keywords set to
Id

File size:
930 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 1 20060620 17:33:53Z rafael $ 

15  **# 

16  

17  using "types"; 

18  

19  

20  Model 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*inputaux; 

36  

37  "Calculate output" 

38  output=beta*diff(aux) + aux; 

39  

40  INITIAL 

41  diff(aux)=0; 

42  

43  end 

Note: See
TracBrowser
for help on using the repository browser.