Overview
Comment:Uses new 2-port sR and sC
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 5a85cde5cc607ebe66b4cf81717e10affd986acc14ba90f88095f212b94a7287
User & Date: gawthrop@users.sourceforge.net on 2001-04-24 16:39:36
Other Links: branch diff | manifest | tags
Context
2001-04-24
16:41:54
New 2-port sensitivity components check-in: 46e86cda2d user: gawthrop@users.sourceforge.net tags: origin/master, trunk
16:39:36
Uses new 2-port sR and sC check-in: 5a85cde5cc user: gawthrop@users.sourceforge.net tags: origin/master, trunk
2001-04-23
22:28:06
Templates allow return types to differ from arguments. check-in: 75fb277a47 user: geraint@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/lib/examples/Identification/idInvertedPendulumOnCart/Cart_abg.fig from [451fec60c3] to [6ec024965a].

27
28
29
30
31
32
33


34
35
36
37
38
39
40
	 6525 3150 7875 3150 7650 3375
2 4 0 2 31 7 101 0 -1 0.000 0 0 7 0 0 5
	 9900 5850 225 5850 225 900 9900 900 9900 5850
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 2475 4050 3825 4050 3600 4275
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 4275 4050 5625 4050 5400 4275


4 1 1 101 0 3 20 0.0000 4 270 1155 4140 3600 x-velocity\001
4 1 0 100 0 18 20 0.0000 4 195 150 4050 3240 1\001
4 1 4 100 0 18 20 0.0000 4 270 1320 1710 3240 SS:[drive]\001
4 1 1 101 0 3 20 0.0000 4 270 1125 4185 4500 y-velocity\001
4 1 1 101 0 3 20 0.0000 4 270 1905 4050 5490 angular-velocity\001
4 1 0 100 0 18 20 0.0000 4 195 150 4050 5040 1\001
4 1 4 100 0 18 20 0.0000 4 270 825 6165 5040 SS:[a]\001







>
>







27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
	 6525 3150 7875 3150 7650 3375
2 4 0 2 31 7 101 0 -1 0.000 0 0 7 0 0 5
	 9900 5850 225 5850 225 900 9900 900 9900 5850
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 2475 4050 3825 4050 3600 4275
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 3
	 4275 4050 5625 4050 5400 4275
2 1 0 2 0 7 100 0 -1 0.000 0 0 -1 0 0 2
	 5625 4725 5625 5175
4 1 1 101 0 3 20 0.0000 4 270 1155 4140 3600 x-velocity\001
4 1 0 100 0 18 20 0.0000 4 195 150 4050 3240 1\001
4 1 4 100 0 18 20 0.0000 4 270 1320 1710 3240 SS:[drive]\001
4 1 1 101 0 3 20 0.0000 4 270 1125 4185 4500 y-velocity\001
4 1 1 101 0 3 20 0.0000 4 270 1905 4050 5490 angular-velocity\001
4 1 0 100 0 18 20 0.0000 4 195 150 4050 5040 1\001
4 1 4 100 0 18 20 0.0000 4 270 825 6165 5040 SS:[a]\001

Modified mttroot/mtt/lib/examples/Identification/idInvertedPendulumOnCart/idInvertedPendulumOnCart_desc.tex from [d9a35eec71] to [aff84db7a3].

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
% -*-latex-*- Put EMACS into LaTeX-mode
% Verbal description for system idInvertedPendulumOnCart (InvertedPendulumOnCart_desc.tex)
% Generated by MTT on Thu Aug 5 10:38:16 BST 1999.

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



% %% Revision 1.1  2000/12/28 18:00:45  peterg
% %% To RCS
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

   The acausal bond graph of system \textbf{idInvertedPendulumOnCart} is
   displayed in Figure \Ref{fig:InvertedPendulumOnCart_abg.ps} and its label
   file is listed in Section \Ref{sec:InvertedPendulumOnCart_lbl}.
   The subsystems are listed in Section \Ref{sec:InvertedPendulumOnCart_sub}.

This is a one input, two output nonlinear system comprising an
inverted pendulum attached by a hinge to a cart constrained to move in
the horizontal direction. The input is the horizontal force acting on
the cart, and the two outputs are the horizontal position and the
pendulum angle respectively.

The identification procedure estimates the two friction parameters
$r_c$ and $r_c$









>
>
>

















|
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
% -*-latex-*- Put EMACS into LaTeX-mode
% Verbal description for system idInvertedPendulumOnCart (InvertedPendulumOnCart_desc.tex)
% Generated by MTT on Thu Aug 5 10:38:16 BST 1999.

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.1  2001/04/11 15:41:45  gawthrop
% %% New identification example - friction components only
% %%
% %% Revision 1.1  2000/12/28 18:00:45  peterg
% %% To RCS
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

   The acausal bond graph of system \textbf{idInvertedPendulumOnCart} is
   displayed in Figure \Ref{fig:InvertedPendulumOnCart_abg.ps} and its label
   file is listed in Section \Ref{sec:InvertedPendulumOnCart_lbl}.
   The subsystems are listed in Section \Ref{sec:InvertedPendulumOnCart_sub}.

This is a one input, two output nonlinear system comprising an
inverted pendulum attached by a hinge to a cart constrained to move in
the horizontal direction. The input is the horizontal force acting on
the cart, and the two outputs are the horizontal position and the
pendulum angle respectively.

The identification procedure estimates the two friction parameters
$r_c$ and $r_c$ together with the cart mass $m_c$.

Modified mttroot/mtt/lib/examples/Identification/idInvertedPendulumOnCart/idInvertedPendulumOnCart_ippp.m from [030265f188] to [b74e24514e].

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
t = [0:sim.dt:sim.last]';
one = ones(size(t));
u = 1.0*(t<one);
y_0 = sidInvertedPendulumOnCart_ssim(x0,par,sim,u);

## Initial parameter
par_0 = par;
par_0(sym.r_c) = 0.0;
par_0(sym.r_p) = 0.0;

## 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_c";"r_p"],par_0,extras);

par = par

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

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

xlabel("Iteration")
title("Estimated Parameters");
plot(Par([sym.r_c,sym.r_p],:)');
figfig("idInvertedPendulumOnCart_parameters","pdf");
figfig("idInvertedPendulumOnCart_parameters","ps");












|
|
|



|

|


















|







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
t = [0:sim.dt:sim.last]';
one = ones(size(t));
u = 1.0*(t<one);
y_0 = sidInvertedPendulumOnCart_ssim(x0,par,sim,u);

## Initial parameter
par_0 = par;
par_0(sym.r_c) = 0.1;
par_0(sym.r_p) = 0.1;
par_0(sym.m_c) = 1.0;
## Identify
extras.criterion = 1e-5;
extras.max_iterations = 10;
extras.v = 1e-1;		#Cautious initial step
extras.verbose = 1;		# Show what is going on
[par,Par,Error,Y] = ppp_identify (name,u,y_0,["r_c";"r_p";"m_c"],par_0,extras);

par = par

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

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

xlabel("Iteration")
title("Estimated Parameters");
plot(Par([sym.r_c,sym.r_p,sym.m_c],:)');
figfig("idInvertedPendulumOnCart_parameters","pdf");
figfig("idInvertedPendulumOnCart_parameters","ps");





Modified mttroot/mtt/lib/examples/Identification/idInvertedPendulumOnCart/sCart_lbl.txt from [628f0a2179] to [b98ca95cf1].

1
2
3
4
5
6
7
8
9



10
11
12
13
14
15
16
%% Label file for system sCart (sCart_lbl.txt)
%SUMMARY sCart
%DESCRIPTION 

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



% %% Revision 1.1  2000/12/28 09:13:38  peterg
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


% Port aliases









>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
%% Label file for system sCart (sCart_lbl.txt)
%SUMMARY sCart
%DESCRIPTION 

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.1  2001/04/11 15:41:45  gawthrop
% %% New identification example - friction components only
% %%
% %% Revision 1.1  2000/12/28 09:13:38  peterg
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


% Port aliases
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
	[x]	SS		external,external
	[y]	SS		external,external

% Component type De
	Position	SS		external

% Component type I
	m_c	lin		flow,m_c;m_cs

% Component type R
	r_c	lin		flow,r_c;r_cs
	r_p	lin		flow,r_p;r_ps

% Component type Sf
	zero_velocity	SS		0;0











|


|
|







39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
	[x]	SS		external,external
	[y]	SS		external,external

% Component type De
	Position	SS		external

% Component type I
	m_c	slin		flow,m_c;m_cs

% Component type R
	r_c	slin		flow,r_c;r_cs
	r_p	slin		flow,r_p;r_ps

% Component type Sf
	zero_velocity	SS		0;0




Modified mttroot/mtt/lib/examples/Identification/idInvertedPendulumOnCart/sInvertedPendulum_lbl.txt from [3c3f92fdc0] to [7522cf1bad].

1
2
3
4
5
6
7
8
9



10
11
12
13
14
15
16
%% Label file for system sInvertedPendulum (sInvertedPendulum_lbl.txt)
%SUMMARY sInvertedPendulum
%DESCRIPTION 

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



% %% Revision 1.1  2000/12/28 09:13:38  peterg
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


% Port aliases









>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
%% Label file for system sInvertedPendulum (sInvertedPendulum_lbl.txt)
%SUMMARY sInvertedPendulum
%DESCRIPTION 

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.1  2001/04/11 15:41:45  gawthrop
% %% New identification example - friction components only
% %%
% %% Revision 1.1  2000/12/28 09:13:38  peterg
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


% Port aliases
39
40
41
42
43
44
45
46

% Component type Se
	a_0	SS		0;0
	x_0	SS		0;0
	y_0	SS		0;0

% Component type gRODa
	rod     none		m_p*l_p*l_p/12;m_ps*l_p*l_p/12;m_p;m_ps;l_p/2;l_p/2;g			







|
42
43
44
45
46
47
48
49

% Component type Se
	a_0	SS		0;0
	x_0	SS		0;0
	y_0	SS		0;0

% Component type gRODa
	rod     none		j_p;j_ps;m_p;m_ps;l_p/2;l_p/2;g			

Modified mttroot/mtt/lib/examples/Identification/idInvertedPendulumOnCart/sgRODa_lbl.txt from [b866d247dc] to [7b7643021b].

1
2
3
4
5
6
7
8
9



10
11
12
13
14
15
16
%% Label file for system sgRODa (sgRODa_lbl.txt)
%SUMMARY sgRODa
%DESCRIPTION 

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



% %% Revision 1.1  2000/12/28 09:13:38  peterg
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


% Port aliases









>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
%% Label file for system sgRODa (sgRODa_lbl.txt)
%SUMMARY sgRODa
%DESCRIPTION 

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.1  2001/04/11 15:41:45  gawthrop
% %% New identification example - friction components only
% %%
% %% Revision 1.1  2000/12/28 09:13:38  peterg
% %% Initial revision
% %%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


% Port aliases
50
51
52
53
54
55
56
57
58
59
60
61
62
63


% Component type EMTF
s1	lsin;slsin	l_a
s2	lsin;slsin	l_b
c1	lcos;slcos	l_a
c2	lcos;slcos	l_b

% Component type I
	J	lin		flow,J;Js
	m_x	lin		flow,m;ms
	m_y	lin		flow,m;ms
	th			

% Component type Se
	mg	SS		m*g;0









|
|
|




>
>
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
% Component type EMTF
s1	lsin;slsin	l_a
s2	lsin;slsin	l_b
c1	lcos;slcos	l_a
c2	lcos;slcos	l_b

% Component type I
	J	slin		flow,J;Js
	m_x	slin		flow,m;ms
	m_y	slin		flow,m;ms
	th			

% Component type Se
	mg	SS		m*g;0


Modified mttroot/mtt/lib/examples/Identification/idInvertedPendulumOnCart/sidInvertedPendulumOnCart_numpar.txt from [bbbf09e198] to [fd11647209].

10
11
12
13
14
15
16

17
18
19
20
21
22
23
m_c = 	0.455;			# Cart mass
r_c = 	1.5;			# Cart friction

l_p =   0.61;			# Pendulum length
m_p =   0.210;			# Pendulum mass
r_p = 	0.5;			# Pendulum friction


g = 9.81;			# Gravity


## Sensitivity paramenters - all zero
m_cs	= 0.0;
m_ps	= 0.0;
r_cs	= 0.0;







>







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
m_c = 	0.455;			# Cart mass
r_c = 	1.5;			# Cart friction

l_p =   0.61;			# Pendulum length
m_p =   0.210;			# Pendulum mass
r_p = 	0.5;			# Pendulum friction

j_p = l_p*l_p*m_p/12;
g = 9.81;			# Gravity


## Sensitivity paramenters - all zero
m_cs	= 0.0;
m_ps	= 0.0;
r_cs	= 0.0;

Modified mttroot/mtt/lib/examples/Identification/idInvertedPendulumOnCart/sidInvertedPendulumOnCart_simpar.txt from [f8264c56f3] to [be28d724c2].

1
2
3
4
5
6
7
8



9
10
11
12
13
14

15
16
17
18
19
20
21
# -*-octave-*- Put Emacs into octave-mode
# Simulation parameters for system sidInvertedPendulumOnCart (InvertedPendulumOnCart_simpar.txt)
# Generated by MTT on Thu Aug 5 09:17:05 BST 1999.
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$



## Revision 1.1  2000/12/28 18:00:45  peterg
## To RCS
##
###############################################################



LAST        = 10.0;      # Last time in simulation
DT          = 0.1;        # Print interval
STEPFACTOR  = 1;          # 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








>
>
>






>







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
# -*-octave-*- Put Emacs into octave-mode
# Simulation parameters for system sidInvertedPendulumOnCart (InvertedPendulumOnCart_simpar.txt)
# Generated by MTT on Thu Aug 5 09:17:05 BST 1999.
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.1  2001/04/11 15:41:45  gawthrop
## New identification example - friction components only
##
## Revision 1.1  2000/12/28 18:00:45  peterg
## To RCS
##
###############################################################


FIRST        = 0.0;      # Last time in simulation
LAST        = 10.0;      # Last time in simulation
DT          = 0.1;        # Print interval
STEPFACTOR  = 1;          # 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


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