Overview
Comment:Identification example
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 5ad84ea3e265c7d40573562d1d205506f8da9f7bbbdfcd593f8e8f256fc49958
User & Date: gawthrop@users.sourceforge.net on 2001-04-05 12:00:18
Other Links: branch diff | manifest | tags
Context
2001-04-06
05:24:31
-stdin for .cc reps. check-in: 22bdf1e9f5 user: geraint@users.sourceforge.net tags: origin/master, trunk
2001-04-05
12:00:18
Identification example check-in: 5ad84ea3e2 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
11:51:42
Model-based identification for PPP check-in: 5c2f55298a user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Added mttroot/mtt/lib/examples/Identification/idNonlinearTanks/README version [64f32ec93d].











1
2
3
4
5
6
7
8
9
10
+
+
+
+
+
+
+
+
+
+
This is the example from:
@Article{Gaw00c,
  author =       {Peter J Gawthrop},
  title =        {Sensitivity Bond Graphs},
  journal =      JFI,
  year =         {2000}
}


NB Compile with -i euler

Added mttroot/mtt/lib/examples/Identification/idNonlinearTanks/conical.cr version [7eab0220f3].










1
2
3
4
5
6
7
8
9
+
+
+
+
+
+
+
+
+
%% CR for conical tank example

OPERATOR conical;
%% State input.
FOR ALL rho,g,V_0,V LET
    conical(rho,g,V_0,effort,1,V,state,1) = rho*g*(12*(V+V_0)/pi)^(1/3);


END;;

Added mttroot/mtt/lib/examples/Identification/idNonlinearTanks/discharge.cr version [28f3427960].














1
2
3
4
5
6
7
8
9
10
11
12
13
+
+
+
+
+
+
+
+
+
+
+
+
+
%% CR for pipe discharge


OPERATOR discharge;
%% Flow input
FOR ALL alpha,beta,F LET
    discharge(alpha,beta,effort,1,F,flow,1) = beta*F^alpha;

%% Effort input
FOR ALL alpha,beta,P LET
    discharge(alpha,beta,flow,1,P,effort,1) = (P/beta)^(1/alpha);

END;;

Added mttroot/mtt/lib/examples/Identification/idNonlinearTanks/idNonlinearTanks_abg.fig version [62dde3975f].








































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#FIG 3.2
Portrait
Center
Metric
A4      
100.00
Single
-2
1200 2
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 1575 2925 2745 2925 2520 3150
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 3150 2925 4320 2925 4095 3150
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 4725 2925 5895 2925 5670 3150
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 6300 2925 7470 2925 7245 3150
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 2925 2700 2925 1530 3150 1755
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 4500 2700 4500 1530 4725 1755
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 6075 2700 6075 1530 6300 1755
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 7650 2700 7650 1530 7875 1755
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 6075 3150 6075 4320 6300 4095
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 2
	 1575 2700 1575 3150
4 1 0 100 0 18 20 0.0000 4 270 195 2925 3015 0\001
4 1 0 100 0 18 20 0.0000 4 270 195 4500 3015 1\001
4 1 0 100 0 18 20 0.0000 4 270 195 7650 3015 1\001
4 1 0 100 0 18 20 0.0000 4 285 705 2925 1440 C:t1\001
4 1 0 100 0 18 20 0.0000 4 360 780 4545 1440 R:p1\001
4 1 0 100 0 18 20 0.0000 4 360 780 7695 1440 R:p2\001
4 1 0 100 0 18 20 0.0000 4 285 705 6075 1440 C:t2\001
4 1 0 100 0 18 20 0.0000 4 270 195 6075 3015 0\001
4 1 0 100 0 18 20 0.0000 4 360 825 6075 4680 De:y\001
4 1 0 100 0 18 20 0.0000 4 285 720 1125 3060 Sf:u\001

Added mttroot/mtt/lib/examples/Identification/idNonlinearTanks/idNonlinearTanks_desc.tex version [3e4f2fb3e7].



































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
% -*-latex-*- Put EMACS into LaTeX-mode
% Verbal description for system idNonlinearTanks (idRC_desc.tex)
% Generated by MTT on Thu Apr 5 11:04:33 BST 2001.

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.1  2000/12/28 09:13:38  peterg
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

   The acausal bond graph of system \textbf{idNonlinearTanks} is
   displayed in Figure \Ref{fig:idRC_abg.ps} and its label
   file is listed in Section \Ref{sec:idRC_lbl}.
   The subsystems are listed in Section \Ref{sec:idRC_sub}.

   
   This example illustrates the sensitivity approach to model-based
   system identification\footnote{Peter J Gawthrop, \emph{Sensitivity
       Bond Graphs}, Journal Franklin Institute, \textbf{337}, 2000,
     pp 907--922}.

   The system compprises two non-linear tanks (see the paper for details).
   The method identifies four parameters: the two initial states ans
   the two parameters of the non-linear flow resistance.

   To see the results, type: 
\begin{verbatim}
mtt -oct -i euler -pdf idNonlinearTanks ippp view
\end{verbatim}

Added mttroot/mtt/lib/examples/Identification/idNonlinearTanks/idNonlinearTanks_ippp.m version [3864de3022].


























































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

## Set up parameters
name = "idNonlinearTanks";
sim = sidNonlinearTanks_simpar;	# Simulation parameter
sym = sidNonlinearTanks_sympar;	# Parameter names
par = sidNonlinearTanks_numpar;	# Parameter values
x0  = sidNonlinearTanks_state(par); # Initial state

## Simulation of "actual" system
t = [0:sim.dt:sim.last]';
T = 5;				# Period
u = ones(size(t));
y_0 = sidNonlinearTanks_ssim(x0,par,sim,u,2);

plot(t,y_0);

## The initial parameters
par_0 = par;
par_0(sym.V_1) = 2.0;
par_0(sym.V_2) = 1.0;
par_0(sym.alpha) = 1.0;
par_0(sym.beta) = 2.0;

## Identify
extras.criterion = 1e-5;
extras.max_iterations = 10;
extras.v = 10;			# Use a really big initial value
extras.verbose = 1;		# Show what is going on
[par,Par,Error,Y] = ppp_identify (name,u,y_0,["V_1  ";"V_2  ";"alpha";"beta "],par_0,extras);

par = par

grid;
xlabel("Time")
title("Output");
plot(t,y_0);
figfig("idNonlinearTanks_output","pdf");
figfig("idNonlinearTanks_output","ps");
grid;

xlabel("Time")
title("Estimated output");
plot(t,y_0,t,Y);
figfig("idNonlinearTanks_outputs","pdf");
figfig("idNonlinearTanks_outputs","ps");

xlabel("Iteration")
title("Estimation error");
plot(Error);
figfig("idNonlinearTanks_error","pdf");
figfig("idNonlinearTanks_error","ps");

xlabel("Iteration")
title("Estimated Parameter");
plot(Par');
figfig("idNonlinearTanks_parameters","pdf");
figfig("idNonlinearTanks_parameters","ps");

Added mttroot/mtt/lib/examples/Identification/idNonlinearTanks/idNonlinearTanks_lbl.txt version [833116b223].



























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
%% Label file for system idNonlinearTanks (NonlinearTanks_lbl.txt)
%SUMMARY NonlinearTanks
%DESCRIPTION <Detailed description here>

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


% Component type C
	t1		conical		rho,g,V_1
	t2		conical		rho,g,V_2

% Component type R
	p1		discharge	alpha,beta
	p2		discharge	alpha,beta

% Component type Sf
        u		SS		external

% Component type De
        y		SS		external

Added mttroot/mtt/lib/examples/Identification/idNonlinearTanks/idNonlinearTanks_numpar.txt version [01084da6b8].



























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# -*-octave-*- Put Emacs into octave-mode
# Numerical parameter file (sNonlinearTanks_numpar.txt)
# Generated by MTT at Mon Nov 29 17:36:54 EST 1999

# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# %% Version control history
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# %% $Id$
# %% $Log$
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

## Parameters

## States 
v_1 = 	0.5;			# Tank 1
v_2 = 	0.25;			# Tank 2

## Tank parameters
g = 	1;			#Gravity
rho = 	1;			# sC,sNonlinearTanks
alpha = 	1.5;

## Pipe parameters
beta = 	1; 


Added mttroot/mtt/lib/examples/Identification/idNonlinearTanks/idNonlinearTanks_rep.tex version [d07140a9ae].






































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+


\section{\textbf{abg.tex}: System idNonlinearTanks, representation \textbf{abg}, language \textbf{tex}}
\label{sec:idNonlinearTanks_abg.tex}
\index{\textbf{idNonlinearTanks} -- abg}


MTT command:
\begin{verbatim}
mtt idNonlinearTanks abg tex 
\end{verbatim}
  \input{/home/peterg/Research/Identification/MTT/idNonlinearTanks/MTT_work/idNonlinearTanks_abg.tex}


\section{\textbf{cbg.ps}: System idNonlinearTanks, representation \textbf{cbg}, language \textbf{ps}}
\label{sec:idNonlinearTanks_cbg.ps}
\index{\textbf{idNonlinearTanks} -- cbg}


MTT command:
\begin{verbatim}
mtt idNonlinearTanks cbg ps 
\end{verbatim}
This representation is given as Figure \Ref{fig:idNonlinearTanks_cbg.ps}.
\fig{/home/peterg/Research/Identification/MTT/idNonlinearTanks/MTT_work/idNonlinearTanks_cbg}
    {idNonlinearTanks_cbg.ps}
    {0.9}
    {System \textbf{idNonlinearTanks}, representation cbg}


\section{\textbf{struc.tex}: System idNonlinearTanks, representation \textbf{struc}, language \textbf{tex}}
\label{sec:idNonlinearTanks_struc.tex}
\index{\textbf{idNonlinearTanks} -- struc}


MTT command:
\begin{verbatim}
mtt idNonlinearTanks struc tex 
\end{verbatim}
  \input{/home/peterg/Research/Identification/MTT/idNonlinearTanks/MTT_work/idNonlinearTanks_struc.tex}


\section{\textbf{sympar.tex}: System idNonlinearTanks, representation \textbf{sympar}, language \textbf{tex}}
\label{sec:idNonlinearTanks_sympar.tex}
\index{\textbf{idNonlinearTanks} -- sympar}


MTT command:
\begin{verbatim}
mtt idNonlinearTanks sympar tex 
\end{verbatim}
  \input{/home/peterg/Research/Identification/MTT/idNonlinearTanks/MTT_work/idNonlinearTanks_sympar.tex}


\section{\textbf{odeso.ps}: System sidNonlinearTanks, representation \textbf{odeso}, language \textbf{ps}}
\label{sec:sidNonlinearTanks_odeso.ps}
\index{\textbf{sidNonlinearTanks} -- odeso}


MTT command:
\begin{verbatim}
mtt -oct -s sidNonlinearTanks odeso ps 
\end{verbatim}
This representation is given as Figure \Ref{fig:sidNonlinearTanks_odeso.ps}.
\fig{/home/peterg/Research/Identification/MTT/idNonlinearTanks/MTT_work/sidNonlinearTanks_odeso}
    {sidNonlinearTanks_odeso.ps}
    {0.9}
    {System \textbf{sidNonlinearTanks}, representation odeso}


\section{\textbf{ippp.ps}: System idNonlinearTanks, representation \textbf{ippp}, language \textbf{ps}}
\label{sec:idNonlinearTanks_ippp.ps}
\index{\textbf{idNonlinearTanks} -- ippp}


MTT command:
\begin{verbatim}
mtt -oct -i euler idNonlinearTanks ippp ps 
\end{verbatim}
This representation is given as Figure \Ref{fig:idNonlinearTanks_ippp.ps}.
\fig{/home/peterg/Research/Identification/MTT/idNonlinearTanks/MTT_work/idNonlinearTanks_ippp}
    {idNonlinearTanks_ippp.ps}
    {0.9}
    {System \textbf{idNonlinearTanks}, representation ippp}


\section{\textbf{rep.txt}: System idNonlinearTanks, representation \textbf{rep}, language \textbf{txt}}
\label{sec:idNonlinearTanks_rep.txt}
\index{\textbf{idNonlinearTanks} -- rep}


MTT command:
\begin{verbatim}
mtt idNonlinearTanks rep txt 
\end{verbatim}
  \begin{verbatim}
## -*-octave-*- Put Emacs into octave-mode
## Outline report file for system idNonlinearTanks (idRC_rep.txt)
## Generated by MTT on" Thu Apr  5 11:17:27 BST 2001.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.1  2000/12/28 11:58:07  peterg
## Put under RCS
##
###############################################################

mtt idNonlinearTanks abg tex			# The system description
mtt idNonlinearTanks cbg ps 		        # The causal bond graph
mtt idNonlinearTanks struc tex	        # The system structure
mtt idNonlinearTanks sympar tex	        # The system parameters
## Uncomment the following lines or add others
## mtt idNonlinearTanks dae tex	        # The system dae
## mtt idNonlinearTanks ode tex	        # The system ode 
## mtt idNonlinearTanks sspar tex		# Steady-state parameters
## mtt idNonlinearTanks ss tex 		# Steady state
## mtt idNonlinearTanks dm tex		# Descriptor matrices (of linearised system)
## mtt idNonlinearTanks sm tex		# State matrices (of linearised system)
## mtt idNonlinearTanks tf tex		# Transfer function (of linearised system)
## mtt idNonlinearTanks lmfr ps		# log modulus of frequency response (of linearised system)
## mtt idNonlinearTanks simpar tex		# Simulation parameters
## mtt idNonlinearTanks numpar tex		# Numerical simulation parameters
## mtt idNonlinearTanks state tex		# Simulation initial state
## mtt idNonlinearTanks input tex		# Simulation input
## mtt idNonlinearTanks logic tex		# Logic control
 mtt -oct -s sidNonlinearTanks odeso ps		# Simulation output
 mtt -oct -i euler idNonlinearTanks ippp ps

mtt idNonlinearTanks rep txt		# This file
  \end{verbatim}

Added mttroot/mtt/lib/examples/Identification/idNonlinearTanks/idNonlinearTanks_rep.txt version [cf637754a5].





































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
## -*-octave-*- Put Emacs into octave-mode
## Outline report file for system idNonlinearTanks (idRC_rep.txt)
## Generated by MTT on" Thu Apr  5 11:17:27 BST 2001.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.1  2000/12/28 11:58:07  peterg
## Put under RCS
##
###############################################################

mtt idNonlinearTanks abg tex			# The system description
mtt idNonlinearTanks cbg ps 		        # The causal bond graph
mtt idNonlinearTanks struc tex	        # The system structure
mtt idNonlinearTanks sympar tex	        # The system parameters
## Uncomment the following lines or add others
## mtt idNonlinearTanks dae tex	        # The system dae
## mtt idNonlinearTanks ode tex	        # The system ode 
## mtt idNonlinearTanks sspar tex		# Steady-state parameters
## mtt idNonlinearTanks ss tex 		# Steady state
## mtt idNonlinearTanks dm tex		# Descriptor matrices (of linearised system)
## mtt idNonlinearTanks sm tex		# State matrices (of linearised system)
## mtt idNonlinearTanks tf tex		# Transfer function (of linearised system)
## mtt idNonlinearTanks lmfr ps		# log modulus of frequency response (of linearised system)
## mtt idNonlinearTanks simpar tex		# Simulation parameters
## mtt idNonlinearTanks numpar tex		# Numerical simulation parameters
## mtt idNonlinearTanks state tex		# Simulation initial state
## mtt idNonlinearTanks input tex		# Simulation input
## mtt idNonlinearTanks logic tex		# Logic control
 mtt -oct -s sidNonlinearTanks odeso ps		# Simulation output
 mtt -oct -i euler idNonlinearTanks ippp ps

mtt idNonlinearTanks rep txt		# This file

Added mttroot/mtt/lib/examples/Identification/idNonlinearTanks/idNonlinearTanks_simpar.txt version [1629ef8da3].























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# -*-octave-*- Put Emacs into octave-mode
# Simulation parameters for system idNonlinearTanks (sidNonlinearTanks_simpar.txt)
# Generated by MTT on Wed Apr 4 15:25:33 BST 2001.
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.1  2000/12/28 11:58:07  peterg
## Put under RCS
##
###############################################################


FIRST        = 0.0;       # First time in simulation output
DT          = 0.1;        # Print interval
LAST        = 10.0;       # Last time in simulation
STEPFACTOR  = 10;          # Integration steps per print interval
WMIN        = -1;         # Minimum frequency = 10^WMIN
WMAX        = 2;          # Maximum frequency = 10^WMAX
WSTEPS      = 100;        # Number of frequency steps
INPUT       = 1;          # Index of the input

Added mttroot/mtt/lib/examples/Identification/idNonlinearTanks/idNonlinearTanks_subs.r version [2fa7735088].




















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
% Default SUBS file
% File idRC_subs.r
% Generated by MTT on Tue Apr  3 09:43:38 BST 2001.


% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.1  2000/12/28 09:13:38  peterg
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Put algebraic substitution commands here

FOR ALL x,y LET x^y = pow(x,y);
END;

Added mttroot/mtt/lib/examples/Identification/idNonlinearTanks/sC_abg.fig version [28ce05ebfc].



























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#FIG 3.2
Portrait
Center
Metric
A4      
100.00
Single
-2
1200 2
6 3105 3105 3195 3645
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 2
	 3150 3150 3150 3600
-6
6 6705 3105 6795 3645
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 2
	 6750 3150 6750 3600
-6
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 6750 3375 5400 3375 5625 3600
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 3150 3375 4500 3375 4275 3600
4 1 4 100 0 18 14 0.0000 4 210 270 4410 3105 [1]\001
4 1 4 100 0 18 14 0.0000 4 210 270 5535 3105 [2]\001
4 0 4 100 0 18 18 0.0000 4 270 1935 6840 3465 SS:[sensitivity]\001
4 2 4 100 0 18 18 0.0000 4 270 1410 3060 3465 SS:[actual]\001
4 1 0 100 0 18 18 0.0000 4 210 450 4950 3465 C:c\001

Added mttroot/mtt/lib/examples/Identification/idNonlinearTanks/sC_lbl.txt version [d300c10d36].






























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
%% Label file for system sC (sC_lbl.txt)
%SUMMARY sC
%DESCRIPTION 

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


% Port aliases
%ALIAS	in	actual,sensitivity

% Argument aliases
%ALIAS	$1	rho,g,V_0,V_0s

%% Each line should be of one of the following forms:
%	     a comment (ie starting with %)
%	     component-name	cr_name	arg1,arg2,..argn
%	     blank

% ---- Component labels ----
	c	sconical 	rho,g,V_0,V_0s

% Component type SS
	[actual]	SS		external,external
	[sensitivity]	SS		external,external

Added mttroot/mtt/lib/examples/Identification/idNonlinearTanks/sR_abg.fig version [7ee767975f].



























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#FIG 3.2
Portrait
Center
Metric
A4      
100.00
Single
-2
1200 2
6 4455 3105 4545 3645
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 2
	 4500 3150 4500 3600
-6
6 5355 3105 5445 3645
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 2
	 5400 3150 5400 3600
-6
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 6750 3375 5400 3375 5625 3600
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 3150 3375 4500 3375 4275 3600
4 1 4 100 0 18 14 0.0000 4 210 270 4410 3105 [1]\001
4 1 4 100 0 18 14 0.0000 4 210 270 5535 3105 [2]\001
4 0 4 100 0 18 18 0.0000 4 270 1935 6840 3465 SS:[sensitivity]\001
4 2 4 100 0 18 18 0.0000 4 270 1410 3060 3465 SS:[actual]\001
4 1 0 100 0 18 18 0.0000 4 210 390 4950 3465 R:r\001

Added mttroot/mtt/lib/examples/Identification/idNonlinearTanks/sR_lbl.txt version [663f556b3d].






























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
%% Label file for system sR (sR_lbl.txt)
%SUMMARY sR
%DESCRIPTION 

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


% Port aliases
%ALIAS	in	actual,sensitivity

% Argument aliases
%ALIAS	$1	alpha,beta,alpha_s,beta_s

%% Each line should be of one of the following forms:
%	     a comment (ie starting with %)
%	     component-name	cr_name	arg1,arg2,..argn
%	     blank

% ---- Component labels ----
	r	sdischarge 	alpha,beta,alpha_s,beta_s

% Component type SS
	[actual]	SS		external,external
	[sensitivity]	SS		external,external

Added mttroot/mtt/lib/examples/Identification/idNonlinearTanks/sconical.cr version [6e21d13445].






















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
%% CR for conical tank example - sensitivity

in "conical.cr";

OPERATOR sconical;
%% The actual port (1) 
FOR ALL rho,g,V_0,V_0s,V,sV LET
    sconical(rho,g,V_0,V_0s,effort,1,
               V,state,1,
               sV,state,2)
    = conical(rho,g,V_0,effort,1,V,state,1);

%% The sensitivity port (2) 
FOR ALL rho,g,V_0,V_0s,V,sV LET
    sconical(rho,g,V_0,V_0s,effort,2,
               V,state,1,
               sV,state,2)
    = df(conical(rho,g,V_0,effort,1,V,state,1),V) * sV
    + df(conical(rho,g,V_0,effort,1,V,state,1),V_0)* V_0s;

END;;

Added mttroot/mtt/lib/examples/Identification/idNonlinearTanks/sdischarge.cr version [8d882eb23f].
































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
%% CR file for the sR component. - 2 port.
%% Special version just for this example.

%% CR for non-linear pipe discharge
%% Just do for flow input causality.

in "discharge.cr";

PROCEDURE l_discharge(alpha,beta,P);
BEGIN
  result := sub({x=P},df(discharge(alpha,beta,flow,1,x,effort,1), x));
  return result;
END;

OPERATOR sdischarge;
%% The actual port (1) -- Pressure input
FOR ALL alpha,beta,alpha_s,beta_s,P,sP LET
    sdischarge(alpha,beta,alpha_s,beta_s,flow,1,
               P,effort,1,
               sP,effort,2)
    = discharge(alpha,beta,flow,1,P,effort,1);

%% The sensitivity port (2) -- Pressure input
FOR ALL alpha,beta,alpha_s,beta_s,P,sP LET
    sdischarge(alpha,beta,alpha_s,beta_s,flow,2,
               P,effort,1,
               sP,effort,2)
    =  l_discharge(alpha,beta,P) * sP
    + df(discharge(alpha,beta,flow,1,P,effort,1), alpha)* alpha_s
    + df(discharge(alpha,beta,flow,1,P,effort,1), beta) * beta_s;
END;;

Added mttroot/mtt/lib/examples/Identification/idNonlinearTanks/sidNonlinearTanks_lbl.txt version [fe01918d62].

































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
%% Label file for system NonlinearTanks (NonlinearTanks_lbl.txt)
%SUMMARY NonlinearTanks
%DESCRIPTION <Detailed description here>

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%% Each line should be of one of the following forms:
%	     a comment (ie starting with %)
%	     component-name	cr_name	arg1,arg2,..argn
%	     blank

% ---- Component labels ----

% Component type C
	t1		sconical	rho,g,V_1,V_1s
	t2		sconical	rho,g,V_2,V_2s

% Component type R
	p1		sdischarge	alpha,beta,alphas,betas
	p2		sdischarge	alpha,beta,alphas,betas

% Component type Sf
        u		SS		external;0

% Component type De
        y		SS		external;external

Added mttroot/mtt/lib/examples/Identification/idNonlinearTanks/sidNonlinearTanks_numpar.txt version [e78bd62c33].

































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# -*-octave-*- Put Emacs into octave-mode
# Numerical parameter file (sNonlinearTanks_numpar.txt)
# Generated by MTT at Mon Nov 29 17:36:54 EST 1999

# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# %% Version control history
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# %% $Id$
# %% $Log$
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

## Parameters

## States 
v_1 = 	0.5;			# Tank 1
v_2 = 	0.25;			# Tank 2

## Tank parameters
g = 	1;			#Gravity
rho = 	1;			# sC,sNonlinearTanks
alpha = 	1.5;

## Pipe parameters
beta = 	1; 

## Sensitivity.
v_1s = 	0;			# Tank 1
v_2s = 	0;			# Tank 2

alphas = 	0;
betas  = 	0;

Added mttroot/mtt/lib/examples/Identification/idNonlinearTanks/sidNonlinearTanks_simpar.txt version [a95d2a72de].























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# -*-octave-*- Put Emacs into octave-mode
# Simulation parameters for system sidNonlinearTanks (sidNonlinearTanks_simpar.txt)
# Generated by MTT on Wed Apr 4 15:25:33 BST 2001.
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.1  2000/12/28 11:58:07  peterg
## Put under RCS
##
###############################################################


FIRST        = 0.0;       # First time in simulation output
DT          = 0.1;        # Print interval
LAST        = 10.0;       # Last time in simulation
STEPFACTOR  = 10;          # Integration steps per print interval
WMIN        = -1;         # Minimum frequency = 10^WMIN
WMAX        = 2;          # Maximum frequency = 10^WMAX
WSTEPS      = 100;        # Number of frequency steps
INPUT       = 1;          # Index of the input

Added mttroot/mtt/lib/examples/Identification/idNonlinearTanks/sidNonlinearTanks_subs.r version [2949fe13a0].























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
% Default SUBS file
% File idRC_subs.r
% Generated by MTT on Tue Apr  3 09:43:38 BST 2001.


% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.1  2000/12/28 09:13:38  peterg
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Put algebraic substitution commands here

FOR ALL x,y LET x^y = pow(x,y); % Use the pow function

ON ROUNDED; % No integer output

END;

Added mttroot/mtt/lib/examples/Identification/idRC/idRC_abg.fig version [d7e806eb37].



















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#FIG 3.2
Portrait
Center
Metric
A4      
100.00
Single
-2
1200 2
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 2250 2475 3600 2475 3375 2700
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 4500 2475 5850 2475 5625 2700
2 4 0 2 31 7 101 0 -1 0.000 0 0 7 0 0 5
	 6975 3600 1125 3600 1125 1800 6975 1800 6975 3600
4 1 0 100 0 18 18 0.0000 4 210 600 1800 2565 Se:u\001
4 1 0 100 0 18 18 0.0000 4 210 750 4050 2565 RC:rc\001
4 1 0 100 0 18 18 0.0000 4 270 600 6345 2565 De:y\001

Added mttroot/mtt/lib/examples/Identification/idRC/idRC_desc.tex version [a29ed1a75e].


































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
% -*-latex-*- Put EMACS into LaTeX-mode
% Verbal description for system idRC (idRC_desc.tex)
% Generated by MTT on Thu Apr 5 11:04:33 BST 2001.

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.1  2000/12/28 09:13:38  peterg
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

   The acausal bond graph of system \textbf{idRC} is
   displayed in Figure \Ref{fig:idRC_abg.ps} and its label
   file is listed in Section \Ref{sec:idRC_lbl}.
   The subsystems are listed in Section \Ref{sec:idRC_sub}.

   
   This example illustrates the sensitivity approach to model-based
   system identification\footnote{Peter J Gawthrop, \emph{Sensitivity
       Bond Graphs}, Journal Franklin Institute, \textbf{337}, 2000,
     pp 907--922}.

   The system is a simple RC circuit with zero initial condition; the
   method identifies the resitance $r$.

   To see the results, type: 
\begin{verbatim}
mtt -oct -i euler -pdf idRC ippp view
\end{verbatim}

Added mttroot/mtt/lib/examples/Identification/idRC/idRC_ippp.m version [4d16198bcb].















































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

## Set up parameters
name = "idRC";
sim = sidRC_simpar;		# Simulation parameter
sym = sidRC_sympar;		# Parameter names
par = sidRC_numpar;		# Parameter values
par([sym.us,sym.rs,sym.cs])=0;	# Reset sensitivity params
x0  = sidRC_state(par);         # Initial state

## Simulation of "actual" system
t = [0:sim.dt:sim.last]';
T = 5;				# Period
u = sin((2*pi/T)*t);
y_0 = sidRC_ssim(x0,par,sim,u,1);

## Initial parameter
par_0 = par;
par_0(sym.r) = 0.1;

## Identify
extras.criterion = 1e-5;
extras.max_iterations = 10;
extras.v = 1e-5;
extras.verbose = 1;		# Show what is going on
[par,Par,Error,Y] = ppp_identify (name,u,y_0,["r"],par_0,extras);

par = par

grid;
xlabel("Time")
title("Estimated output");
plot(t,y_0,t,Y);
figfig("idRC_outputs","pdf");
figfig("idRC_outputs","ps");

xlabel("Iteration")
title("Estimation error");
plot(Error);
figfig("idRC_error","pdf");
figfig("idRC_error","ps");

xlabel("Iteration")
title("Estimated Parameter");
plot(Par');
figfig("idRC_parameters","pdf");
figfig("idRC_parameters","ps");

Added mttroot/mtt/lib/examples/Identification/idRC/idRC_rep.tex version [85839553dd].






































































































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+


\section{\textbf{abg.tex}: System idRC, representation \textbf{abg}, language \textbf{tex}}
\label{sec:idRC_abg.tex}
\index{\textbf{idRC} -- abg}


MTT command:
\begin{verbatim}
mtt idRC abg tex 
\end{verbatim}
  \input{/home/peterg/Research/Identification/MTT/idRC/MTT_work/idRC_abg.tex}


\section{\textbf{cbg.ps}: System idRC, representation \textbf{cbg}, language \textbf{ps}}
\label{sec:idRC_cbg.ps}
\index{\textbf{idRC} -- cbg}


MTT command:
\begin{verbatim}
mtt idRC cbg ps 
\end{verbatim}
This representation is given as Figure \Ref{fig:idRC_cbg.ps}.
\fig{/home/peterg/Research/Identification/MTT/idRC/MTT_work/idRC_cbg}
    {idRC_cbg.ps}
    {0.9}
    {System \textbf{idRC}, representation cbg}


\section{\textbf{struc.tex}: System idRC, representation \textbf{struc}, language \textbf{tex}}
\label{sec:idRC_struc.tex}
\index{\textbf{idRC} -- struc}


MTT command:
\begin{verbatim}
mtt idRC struc tex 
\end{verbatim}
  \input{/home/peterg/Research/Identification/MTT/idRC/MTT_work/idRC_struc.tex}


\section{\textbf{sympar.tex}: System idRC, representation \textbf{sympar}, language \textbf{tex}}
\label{sec:idRC_sympar.tex}
\index{\textbf{idRC} -- sympar}


MTT command:
\begin{verbatim}
mtt idRC sympar tex 
\end{verbatim}
  \input{/home/peterg/Research/Identification/MTT/idRC/MTT_work/idRC_sympar.tex}


\section{\textbf{odeso.ps}: System idRC, representation \textbf{odeso}, language \textbf{ps}}
\label{sec:idRC_odeso.ps}
\index{\textbf{idRC} -- odeso}


MTT command:
\begin{verbatim}
mtt -oct idRC odeso ps 
\end{verbatim}
This representation is given as Figure \Ref{fig:idRC_odeso.ps}.
\fig{/home/peterg/Research/Identification/MTT/idRC/MTT_work/idRC_odeso}
    {idRC_odeso.ps}
    {0.9}
    {System \textbf{idRC}, representation odeso}


\section{\textbf{ippp.ps}: System idRC, representation \textbf{ippp}, language \textbf{ps}}
\label{sec:idRC_ippp.ps}
\index{\textbf{idRC} -- ippp}


MTT command:
\begin{verbatim}
mtt -oct -i euler idRC ippp ps 
\end{verbatim}
This representation is given as Figure \Ref{fig:idRC_ippp.ps}.
\fig{/home/peterg/Research/Identification/MTT/idRC/MTT_work/idRC_ippp}
    {idRC_ippp.ps}
    {0.9}
    {System \textbf{idRC}, representation ippp}


\section{\textbf{rep.txt}: System idRC, representation \textbf{rep}, language \textbf{txt}}
\label{sec:idRC_rep.txt}
\index{\textbf{idRC} -- rep}


MTT command:
\begin{verbatim}
mtt idRC rep txt 
\end{verbatim}
  \begin{verbatim}
## -*-octave-*- Put Emacs into octave-mode
## Outline report file for system idRC (idRC_rep.txt)
## Generated by MTT on" Thu Apr  5 11:17:27 BST 2001.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.1  2000/12/28 11:58:07  peterg
## Put under RCS
##
###############################################################

mtt idRC abg tex			# The system description
mtt idRC cbg ps 		        # The causal bond graph
mtt idRC struc tex	        # The system structure
mtt idRC sympar tex	        # The system parameters
## Uncomment the following lines or add others
## mtt idRC dae tex	        # The system dae
## mtt idRC ode tex	        # The system ode 
## mtt idRC sspar tex		# Steady-state parameters
## mtt idRC ss tex 		# Steady state
## mtt idRC dm tex		# Descriptor matrices (of linearised system)
## mtt idRC sm tex		# State matrices (of linearised system)
## mtt idRC tf tex		# Transfer function (of linearised system)
## mtt idRC lmfr ps		# log modulus of frequency response (of linearised system)
## mtt idRC simpar tex		# Simulation parameters
## mtt idRC numpar tex		# Numerical simulation parameters
## mtt idRC state tex		# Simulation initial state
## mtt idRC input tex		# Simulation input
## mtt idRC logic tex		# Logic control
 mtt -oct idRC odeso ps		# Simulation output
 mtt -oct -i euler idRC ippp ps

mtt idRC rep txt		# This file
  \end{verbatim}

Added mttroot/mtt/lib/examples/Identification/idRC/idRC_rep.txt version [2d54c35474].





































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
## -*-octave-*- Put Emacs into octave-mode
## Outline report file for system idRC (idRC_rep.txt)
## Generated by MTT on" Thu Apr  5 11:17:27 BST 2001.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.1  2000/12/28 11:58:07  peterg
## Put under RCS
##
###############################################################

mtt idRC abg tex			# The system description
mtt idRC cbg ps 		        # The causal bond graph
mtt idRC struc tex	        # The system structure
mtt idRC sympar tex	        # The system parameters
## Uncomment the following lines or add others
## mtt idRC dae tex	        # The system dae
## mtt idRC ode tex	        # The system ode 
## mtt idRC sspar tex		# Steady-state parameters
## mtt idRC ss tex 		# Steady state
## mtt idRC dm tex		# Descriptor matrices (of linearised system)
## mtt idRC sm tex		# State matrices (of linearised system)
## mtt idRC tf tex		# Transfer function (of linearised system)
## mtt idRC lmfr ps		# log modulus of frequency response (of linearised system)
## mtt idRC simpar tex		# Simulation parameters
## mtt idRC numpar tex		# Numerical simulation parameters
## mtt idRC state tex		# Simulation initial state
## mtt idRC input tex		# Simulation input
## mtt idRC logic tex		# Logic control
 mtt -oct idRC odeso ps		# Simulation output
 mtt -oct -i euler idRC ippp ps

mtt idRC rep txt		# This file

Added mttroot/mtt/lib/examples/Identification/idRC/sRC_lbl.txt version [2c3b1d134e].










































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
%% Label file for system sRC (sRC_lbl.txt)
%SUMMARY sRC
%DESCRIPTION 

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.1  2000/12/28 09:13:38  peterg
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


% Port aliases
%ALIAS	in	Electrical_in_1,Electrical_in_2
%ALIAS	out	Electrical_out_1,Electrical_out_2

% Argument aliases
%ALIAS	$1	c
%ALIAS	$2	cs
%ALIAS	$3	r
%ALIAS	$4	rs

%% Each line should be of one of the following forms:
%	     a comment (ie starting with %)
%	     component-name	cr_name	arg1,arg2,..argn
%	     blank

% ---- Component labels ----

% Component type SS
	[Electrical_in]	SS		external,external
	[Electrical_out]	SS		external,external

% Component type C
	c	lin		effort,c;cs

% Component type R
	r	lin		flow,r;rs

Added mttroot/mtt/lib/examples/Identification/idRC/sidRC.h version [a7ffc6f8bf].

Added mttroot/mtt/lib/examples/Identification/idRC/sidRC_input.txt version [317dc5b945].











1
2
3
4
5
6
7
8
9
10
+
+
+
+
+
+
+
+
+
+
## -*-octave-*- Put Emacs into octave-mode ##
 
## 
## System sidRC, representation input, language txt; 
## File sidRC_input.txt; 
## Generated by MTT on Tue Apr  3 10:17:44 BST 2001; 



sidRC_u_1_se_1_1_u	= 1.0; # Default

Added mttroot/mtt/lib/examples/Identification/idRC/sidRC_numpar.txt version [d96030ec99].















1
2
3
4
5
6
7
8
9
10
11
12
13
14
+
+
+
+
+
+
+
+
+
+
+
+
+
+
## -*-octave-*- Put Emacs into octave-mode ##
 
## 
## System sidRC, representation numpar, language txt; 
## File sidRC_numpar.txt; 
## Generated by MTT on Wed Apr  4 12:11:21 BST 2001; 



c	= 1.0;			# Capacitance
cs	= 0.0;			# Sensitivity
r	= 1.0;			# Resistance
rs	= 0.0;			# Sensitivity
us	= 0.0;			# Sensitivity

Added mttroot/mtt/lib/examples/Identification/idRC/sidRC_subs.r version [84a767b42e].























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
% Default SUBS file
% File sidRC_subs.r
% Generated by MTT on Tue Apr  3 09:43:38 BST 2001.


% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.1  2000/12/28 09:13:38  peterg
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Put algebraic substitution commands here

FOR ALL x,y LET x^y = pow(x,y); % Use the pow function

ON ROUNDED; % No integer output

END;


MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]