Overview
Comment:Example uses simulated data from idRC_ident_data
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 53e4d8adaf604c95e403cdaf869dd06b0996332775545241d388ebef595de1cc
User & Date: gawthrop@users.sourceforge.net on 2002-09-23 11:42:14
Other Links: branch diff | manifest | tags
Context
2002-09-24
11:56:06
_ident_comparison rep now shows multiple outputs correctly check-in: c3812a51af user: gawthrop@users.sourceforge.net tags: origin/master, trunk
2002-09-23
11:42:14
Example uses simulated data from idRC_ident_data check-in: 53e4d8adaf user: gawthrop@users.sourceforge.net tags: origin/master, trunk
11:16:27
New example for ident representation check-in: d2a6e75b56 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Added mttroot/mtt/lib/examples/Identification/idRC/idRC_ident_numpar.m version [1e49a50185].















































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
function [y,u,t,par_names,Q,extras] = idRC_ident_numpar;

  ## usage: [y,u,t,par_names,Q,extras] = idRC_ident_numpar;
  ## Edit for your own requirements
  ## Created by MTT on 

    
  ## This section sets up the data source
  ## simulate = 0  Real data (you supply idRC_ident_data.dat)
  ## simulate = 1  Real data input, simulated output
  ## simulate = 2  Unit step input, simulated output
  simulate = 0;
  

  ## System info
  [n_x,n_y,n_u,n_z,n_yz] = idRC_def;
  simpars = sidRC_simpar;

  ## Access or create data
  if (simulate<2)		# Get the real data
    if (exist("idRC_ident_data.dat")==2)
      printf("Loading idRC_ident_data.dat\n");
      load idRC_ident_data.dat
    else
      printf("Please create a loadable file idRC_ident_data.dat containing y,u and t\n");
      return
    endif
  else 
    switch simulate
      case 2			# Step simulation
	t = [0:simpars.dt:simpars.last]';
	u = ones(size(t));
      otherwise
	error(sprintf("simulate = %i not implemented", simulate));
    endswitch
  endif
  
  if (simulate>0)
    par = idRC_numpar();
    x_0 = idRC_state(par);
    dt = t(2)-t(1);
    simpars.dt = dt;
    simpars.last = t(length(t));
    y =  idRC_sim(zeros(n_x,1), par, simpars, u);
  endif

  ## Default parameter names - Put in your own here
  sympar = idRC_sympar;	# Symbolic params as structure
  par_names = struct_elements (sympar);	# Symbolic params as strings
  [n,m] = size(par_names);	# Size the string list

  ## Sort by index
  for [i,name] = sympar
    par_names(i,:) = sprintf("%s%s",name, blanks(m-length(name)));
  endfor
  
  par_names = "r";		# Estimate r only

  ## Output weighting vector
  Q = ones(n_y,1);
  
  ## Extra parameters
  extras.criterion = 1e-5;
  extras.emulate_timing = 0;
  extras.max_iterations = 10;
  extras.simulate = simulate;
  extras.v =  1e-2;
  extras.verbose = 1;
  extras.visual = 1;

endfunction

Modified mttroot/mtt/lib/examples/Identification/idRC/idRC_rep.txt from [2d54c35474] to [c48cce7cf9].

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


|












|


>
>









|
|
|
|
|
|
|
>
>
>
>


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
## -*-octave-*- Put Emacs into octave-mode
## Outline report file for system idRC (idRC_rep.txt)
## Generated by MTT on" Thu Jun 27 17:03:00 BST 2002.

###############################################################
## 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
mtt idRC subs r
mtt sidMuscle subs r
## 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 txt		# Simulation parameters
## mtt idRC numpar txt		# Numerical simulation parameters
## mtt idRC state txt		# Simulation initial state
## mtt idRC input txt		# Simulation input
## mtt idRC logic txt		# Logic control
## mtt idRC odeso ps		# Simulation output

## Linear identificationm
mtt idRC ident ps
mtt idRC ident_comparison ps
mtt idRC ident_par tex

mtt idRC rep txt		# This file


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