ADDED mttroot/mtt/lib/examples/Identification/idNonlinearTanks/README Index: mttroot/mtt/lib/examples/Identification/idNonlinearTanks/README ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Identification/idNonlinearTanks/README @@ -0,0 +1,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 Index: mttroot/mtt/lib/examples/Identification/idNonlinearTanks/conical.cr ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Identification/idNonlinearTanks/conical.cr @@ -0,0 +1,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 Index: mttroot/mtt/lib/examples/Identification/idNonlinearTanks/discharge.cr ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Identification/idNonlinearTanks/discharge.cr @@ -0,0 +1,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 Index: mttroot/mtt/lib/examples/Identification/idNonlinearTanks/idNonlinearTanks_abg.fig ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Identification/idNonlinearTanks/idNonlinearTanks_abg.fig @@ -0,0 +1,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 Index: mttroot/mtt/lib/examples/Identification/idNonlinearTanks/idNonlinearTanks_desc.tex ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Identification/idNonlinearTanks/idNonlinearTanks_desc.tex @@ -0,0 +1,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 Index: mttroot/mtt/lib/examples/Identification/idNonlinearTanks/idNonlinearTanks_ippp.m ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Identification/idNonlinearTanks/idNonlinearTanks_ippp.m @@ -0,0 +1,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 Index: mttroot/mtt/lib/examples/Identification/idNonlinearTanks/idNonlinearTanks_lbl.txt ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Identification/idNonlinearTanks/idNonlinearTanks_lbl.txt @@ -0,0 +1,26 @@ +%% Label file for system idNonlinearTanks (NonlinearTanks_lbl.txt) +%SUMMARY NonlinearTanks +%DESCRIPTION + +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% %% 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 Index: mttroot/mtt/lib/examples/Identification/idNonlinearTanks/idNonlinearTanks_numpar.txt ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Identification/idNonlinearTanks/idNonlinearTanks_numpar.txt @@ -0,0 +1,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 Index: mttroot/mtt/lib/examples/Identification/idNonlinearTanks/idNonlinearTanks_rep.tex ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Identification/idNonlinearTanks/idNonlinearTanks_rep.tex @@ -0,0 +1,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 Index: mttroot/mtt/lib/examples/Identification/idNonlinearTanks/idNonlinearTanks_rep.txt ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Identification/idNonlinearTanks/idNonlinearTanks_rep.txt @@ -0,0 +1,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 Index: mttroot/mtt/lib/examples/Identification/idNonlinearTanks/idNonlinearTanks_simpar.txt ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Identification/idNonlinearTanks/idNonlinearTanks_simpar.txt @@ -0,0 +1,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 Index: mttroot/mtt/lib/examples/Identification/idNonlinearTanks/idNonlinearTanks_subs.r ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Identification/idNonlinearTanks/idNonlinearTanks_subs.r @@ -0,0 +1,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 Index: mttroot/mtt/lib/examples/Identification/idNonlinearTanks/sC_abg.fig ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Identification/idNonlinearTanks/sC_abg.fig @@ -0,0 +1,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 Index: mttroot/mtt/lib/examples/Identification/idNonlinearTanks/sC_lbl.txt ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Identification/idNonlinearTanks/sC_lbl.txt @@ -0,0 +1,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 Index: mttroot/mtt/lib/examples/Identification/idNonlinearTanks/sR_abg.fig ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Identification/idNonlinearTanks/sR_abg.fig @@ -0,0 +1,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 Index: mttroot/mtt/lib/examples/Identification/idNonlinearTanks/sR_lbl.txt ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Identification/idNonlinearTanks/sR_lbl.txt @@ -0,0 +1,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 Index: mttroot/mtt/lib/examples/Identification/idNonlinearTanks/sconical.cr ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Identification/idNonlinearTanks/sconical.cr @@ -0,0 +1,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 Index: mttroot/mtt/lib/examples/Identification/idNonlinearTanks/sdischarge.cr ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Identification/idNonlinearTanks/sdischarge.cr @@ -0,0 +1,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 Index: mttroot/mtt/lib/examples/Identification/idNonlinearTanks/sidNonlinearTanks_lbl.txt ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Identification/idNonlinearTanks/sidNonlinearTanks_lbl.txt @@ -0,0 +1,32 @@ +%% Label file for system NonlinearTanks (NonlinearTanks_lbl.txt) +%SUMMARY NonlinearTanks +%DESCRIPTION + +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% %% 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 Index: mttroot/mtt/lib/examples/Identification/idNonlinearTanks/sidNonlinearTanks_numpar.txt ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Identification/idNonlinearTanks/sidNonlinearTanks_numpar.txt @@ -0,0 +1,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 Index: mttroot/mtt/lib/examples/Identification/idNonlinearTanks/sidNonlinearTanks_simpar.txt ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Identification/idNonlinearTanks/sidNonlinearTanks_simpar.txt @@ -0,0 +1,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 Index: mttroot/mtt/lib/examples/Identification/idNonlinearTanks/sidNonlinearTanks_subs.r ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Identification/idNonlinearTanks/sidNonlinearTanks_subs.r @@ -0,0 +1,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 Index: mttroot/mtt/lib/examples/Identification/idRC/idRC_abg.fig ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Identification/idRC/idRC_abg.fig @@ -0,0 +1,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 Index: mttroot/mtt/lib/examples/Identification/idRC/idRC_desc.tex ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Identification/idRC/idRC_desc.tex @@ -0,0 +1,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 Index: mttroot/mtt/lib/examples/Identification/idRC/idRC_ippp.m ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Identification/idRC/idRC_ippp.m @@ -0,0 +1,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 Index: mttroot/mtt/lib/examples/Identification/idRC/idRC_rep.tex ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Identification/idRC/idRC_rep.tex @@ -0,0 +1,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 Index: mttroot/mtt/lib/examples/Identification/idRC/idRC_rep.txt ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Identification/idRC/idRC_rep.txt @@ -0,0 +1,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 Index: mttroot/mtt/lib/examples/Identification/idRC/sRC_lbl.txt ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Identification/idRC/sRC_lbl.txt @@ -0,0 +1,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 Index: mttroot/mtt/lib/examples/Identification/idRC/sidRC.h ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Identification/idRC/sidRC.h ADDED mttroot/mtt/lib/examples/Identification/idRC/sidRC_input.txt Index: mttroot/mtt/lib/examples/Identification/idRC/sidRC_input.txt ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Identification/idRC/sidRC_input.txt @@ -0,0 +1,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 Index: mttroot/mtt/lib/examples/Identification/idRC/sidRC_numpar.txt ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Identification/idRC/sidRC_numpar.txt @@ -0,0 +1,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 Index: mttroot/mtt/lib/examples/Identification/idRC/sidRC_subs.r ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Identification/idRC/sidRC_subs.r @@ -0,0 +1,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;