\newpage \noindent {\bf \huge internal}\\  \rule[3pt]{\textwidth}{1pt}\\
\begin{description}
 \item[Purpose]\ \newline \newline 
Constructor for the internal class

\end{description}

\begin{description}
 \item[Synopsis]\ \newline \newline 
{\tt m=internal}\\ 
{\tt m=internal(name,n\_in,n\_out)}\\ 
{\tt m=internal(name,n\_in,n\_out,n\_state)}\\ 
\end{description}

\begin{description}
 \item[Description]\ \newline \newline 
{\tt m=internal} 
creates a new general system skeleton
\vspace{4mm}\\ 
\hspace{2mm}
{\tt m=internal(name,n\_in,n\_out)} 
creates a new general system with {\tt n\_in} inputs
and {\tt n\_out} outputs. The name {\tt name} is associated to it.
\vspace{4mm}\\ 
\hspace{2mm}
{\tt m=internal(name,n\_in,n\_out,n\_state)} 
creates a new general system with {\tt n\_in} inputs, 
{\tt n\_out} outputs and {\tt n\_state} states. The name {\tt name} is associated to it.
\end{description}

\begin{description}
 \item[Methods]\ \\ 
\begin{itemize}
\item {\tt add\_statemapping}   add a mapping for describing the state of an internal object
\item {\tt conicity}   compute the conicity stabity criterium
\item {\tt display}   Display an object of class internal

\item {\tt eval\_state}   computes the value of the state of a system for some regressor
\item {\tt get}   gets the value of the attribute of an object
\item {\tt glob\_indice}   Compute the third stability indice for a closed loop

\item {\tt identify}   Identify the system from data (abstact method)

\item {\tt jacob\_cloop}   Compute the jacobian with respect to the state for a closed loop

\item {\tt jacob\_inputs}   computes the jacobian of the model
\item {\tt jacob\_params}   computes the jacobian of the model
\item {\tt loc\_indices}   Compute the first and the second stability indices for a closed loop

\item {\tt regress}   

\item {\tt seek\_eq}   Use the optimisation toolbox to find a cl
\item {\tt set}   Set object properties
\item {\tt stateregress}   Compute the regressor for the state mapping
\end{itemize}
\end{description}

\begin{description}
 \item[See also]\ \newline \newline 
also 

\end{description}
\newpage \noindent {\bf \huge add\_statemapping}\\  \rule[3pt]{\textwidth}{1pt}\\
\begin{description}
 \item[Purpose]\ \newline \newline 
add a mapping for describing the state of an internal object
\end{description}

\begin{description}
 \item[Synopsis]\ \newline \newline 
{\tt m=add\_statemapping(m)}\\ 
{\tt m=add\_statemapping(m,{mapping})}\\ 
\end{description}

\begin{description}
 \item[Description]\ \newline \newline 
{\tt m=add\_statemapping(m)} 
clears the statemapping field of the object
\vspace{4mm}\\ 
\hspace{2mm}
{\tt m=add\_statemapping(m,\{mapping\})} 
\end{description}

\begin{description}
 \item[Remarks]\ \newline \newline 
This method adds a mapping to
the list of the current mappings attached to the state of the internal object. The links
field, which connects the mapping with the state output, must be set using
the {\tt set} method. 

\end{description}
\newpage \noindent {\bf \huge conicity}\\  \rule[3pt]{\textwidth}{1pt}\\
\begin{description}
 \item[Purpose]\ \newline \newline 
compute the conicity stabity criterium
\end{description}

\begin{description}
 \item[Synopsis]\ \newline \newline 
{\tt conicity(plant,range,params,controller)}\\ 
{\tt conicity(plant,range,controller)}\\ 
\end{description}

\begin{description}
 \item[Description]\ \newline \newline 
{\tt conicity(plant,range,params,controller)} 
coputes the conicity stability criterium
for the plant {\tt plant} in the range specified 
by the array {\tt range} with the static controller 
{\tt controller}.
\end{description}

\begin{description}
 \item[Remarks]\ \newline \newline 
This method is 
applicable only if the plant system is has single takagi sugeno 
mapping for all the outputs or it is a linear one. 
In addition the controller must be a static one. The outputs of 
the function are:
CONICITY INDEX = CONIC DESVIATION / CONIC ROBUSTNESS 
CONIC DEVIATION = GAIN(CONTROLLER - CENTRE)
CONIC ROBUSTNESS = 1 / GAIN(FEEDB((A,B,C,D),CENTRE)
where {\tt centre} is the center of the cone which 
is calculated with the method specified in the field 
{\tt search\_method} of the {\tt params} structure.
Possible values for this field are:
\\  
\begin{tabular}{lp{12cm}}
{\tt linearization}: & which uses a linarization technique for finding 
the center of the cone \\ 
\end{tabular} \\ 

if no {\tt search\_method} is specified the linearization
techique is used.

\end{description}
\newpage \noindent {\bf \huge display}\\  \rule[3pt]{\textwidth}{1pt}\\
\begin{description}
 \item[Purpose]\ \newline \newline 
Display an object of class internal

\end{description}

\begin{description}
 \item[Synopsis]\ \newline \newline 
{\tt display(m)}\\ 
\end{description}

\begin{description}
 \item[Description]\ \newline \newline 
{\tt display(m)} 
Display the object m of class internal
%
\end{description}

\begin{description}
 \item[See also]\ \newline \newline 


\end{description}
\newpage \noindent {\bf \huge eval\_state}\\  \rule[3pt]{\textwidth}{1pt}\\
\begin{description}
 \item[Purpose]\ \newline \newline 
computes the value of the state of a system for some regressor
\end{description}

\begin{description}
 \item[Synopsis]\ \newline \newline 
{\tt out=eval\_state(m,r,j)}\\ 
\end{description}

\begin{description}
 \item[Description]\ \newline \newline 
{\tt out=eval\_state(m,r,j)} 
returns the value {\tt out} of the state(s) {\tt j} of
mapping {\tt m} given the input regressor {\tt r}.
\end{description}
\newpage \noindent {\bf \huge get}\\  \rule[3pt]{\textwidth}{1pt}\\
\begin{description}
 \item[Purpose]\ \newline \newline 
gets the value of the attribute of an object
\end{description}

\begin{description}
 \item[Synopsis]\ \newline \newline 
{\tt d = get(m,label,opt)}\\ 
\end{description}

\begin{description}
 \item[Description]\ \newline \newline 
{\tt d = get(m,label,opt)} 
gets the value of the attribute {\tt label}
associated to the object {\tt m} and return it inside {\tt d}.
The following codes are recognised:
\\  
\begin{tabular}{lp{12cm}}
{\tt name}: & returns the name of the object \\ 
{\tt n\_in}: & returns the number of inputs of the system \\ 
{\tt n\_out}: & returns the number of outputs of the system \\ 
{\tt data}: & returns the data set linked to the system \\ 
{\tt T}: & returns the sampling period of the discrete system, 0 if continuous \\ 
{\tt mapping}: & returns the array of mappings \\ 
{\tt links}: & returns the links array which defines which output is computed by which mapping \\ 
{\tt limits}: & returns the bounds of the inputs and outputs \\ 
{\tt userData}: & returns the 'userData' field \\ 
{\tt opt}: & returns the 'opt' field \\ 
{\tt date}: & returns the date of creation of the object \\ 
{\tt mapfield}: & let the user access directly property of the mappings. When used, opt
must contain a 2 elements cell array {{\tt n} 'property'}. {\tt n} is the index of the 
mapping and 'property' is the name of the property which has to be accessed. An even more convenient
way to access mappings' fields is a achieved through the syntax s{n}.property. In both syntax,
if {\tt n} is negative, the <CODE>abs(n)</CODE> mapping describing the state is accessed. \\ 
{\tt numparams}: & returns the number of parameters to be optimised \\ 
{\tt params}: & returns the parameters to be optimised \\ 
{\tt n\_state}: & returns the number of states \\ 
{\tt state}: & returns the state vector of the system \\ 
{\tt statemapping}: & returns the mappings used to describe the state \\ 
{\tt statelinks}: & returns the links array which defines which state is computed using which statemapping \\ 
{\tt statelimits}: & returns the bounds of the states \\ 
{\tt statemapfield}: & let the user access directly property of the statemappings. When used, opt
must contain a 2 elements cell array {{\tt n} 'property'}. {\tt n} is the index of the 
mapping and 'property' is the name of the property which has to be accessed. \\ 
\end{tabular} \\ 

\end{description}

\begin{description}
 \item[See also]\ \newline \newline 
set

\end{description}
\newpage \noindent {\bf \huge glob\_indice}\\  \rule[3pt]{\textwidth}{1pt}\\
\begin{description}
 \item[Purpose]\ \newline \newline 
Compute the third stability indice for a closed loop

\end{description}

\begin{description}
 \item[Synopsis]\ \newline \newline 
{\tt [i1,i2] = glob\_indice(m, c, y\_d, v, limits)}\\ 
\end{description}

\begin{description}
 \item[Description]\ \newline \newline 
{\tt [i1,i2] = glob\_indice(m, c, y\_d, v, limits)} 
{\tt m} is the model (external) and {\tt c} is
the controller. {\tt y\_d} is the desired output and {\tt v} are
the perturbations.
\end{description}

\begin{description}
 \item[See also]\ \newline \newline 
local\_indice

\end{description}
\newpage \noindent {\bf \huge identify}\\  \rule[3pt]{\textwidth}{1pt}\\
\begin{description}
 \item[Purpose]\ \newline \newline 
Identify the system from data (abstact method)

\end{description}

\begin{description}
 \item[Synopsis]\ \newline \newline 
{\tt m = identify(m,in,out,options)}\\ 
\end{description}

\begin{description}
 \item[Description]\ \newline \newline 
{\tt m = identify(m,in,out,options)} 
performs the identification of the model {\tt m} using
the data embeded inside the object. Use {\tt options} in order
to specify the identification method and options.
\end{description}
\newpage \noindent {\bf \huge jacob\_cloop}\\  \rule[3pt]{\textwidth}{1pt}\\
\begin{description}
 \item[Purpose]\ \newline \newline 
Compute the jacobian with respect to the state for a closed loop

\end{description}

\begin{description}
 \item[Synopsis]\ \newline \newline 
{\tt out = jacob\_cloop(m,c,yd,v)}\\ 
\end{description}

\begin{description}
 \item[Description]\ \newline \newline 
{\tt out = jacob\_cloop(m,c,yd,v)} 

\end{description}

\begin{description}
 \item[See also]\ \newline \newline 
also 

\end{description}
\newpage \noindent {\bf \huge jacob\_inputs}\\  \rule[3pt]{\textwidth}{1pt}\\
\begin{description}
 \item[Purpose]\ \newline \newline 
computes the jacobian of the model
\end{description}

\begin{description}
 \item[Synopsis]\ \newline \newline 
{\tt jacob\_inputs(m,r,j)}\\ 
\end{description}

\begin{description}
 \item[Description]\ \newline \newline 
{\tt jacob\_inputs(m,r,j)} 
computes for output {\tt j} the jacobian of
the model {\tt m} with respect to the regressor of the
system at point {\tt r}.
\end{description}

\begin{description}
 \item[Remarks]\ \newline \newline 
The procedure for computing the jacobian depends on the underlying representation 
of the model. The result {\tt out} is an array of size number of outputs * number of inputs
containing the derivatives of the outputs with respect to the inputs.

\end{description}
\newpage \noindent {\bf \huge jacob\_params}\\  \rule[3pt]{\textwidth}{1pt}\\
\begin{description}
 \item[Purpose]\ \newline \newline 
computes the jacobian of the model
\end{description}

\begin{description}
 \item[Synopsis]\ \newline \newline 
{\tt jacob\_params(m,r)  }\\ 
{\tt jacob\_params(m,r,j)  }\\ 
\end{description}

\begin{description}
 \item[Description]\ \newline \newline 
{\tt jacob\_params(m,r)  } 
computes for each output the jacobian of
the model with respect to the parameters at regressor {\tt r}.
\vspace{4mm}\\ 
\hspace{2mm}
{\tt jacob\_params(m,r,j)  } 
computes for output(s) {\tt j} the jacobian of
the model with respect to the parameters at regressor {\tt regressor}.
\end{description}
\newpage \noindent {\bf \huge loc\_indices}\\  \rule[3pt]{\textwidth}{1pt}\\
\begin{description}
 \item[Purpose]\ \newline \newline 
Compute the first and the second stability indices for a closed loop

\end{description}

\begin{description}
 \item[Synopsis]\ \newline \newline 
{\tt [i1,i2] = loc\_indices(m,c,yd,v,eq\_m,eq\_c)}\\ 
\end{description}

\begin{description}
 \item[Description]\ \newline \newline 
{\tt [i1,i2] = loc\_indices(m,c,yd,v,eq\_m,eq\_c)} 
{\tt m} is the model (external) and {\tt c} is
the controller. {\tt y\_d} is the desired output and {\tt v} are
the perturbations.
\end{description}

\begin{description}
 \item[See also]\ \newline \newline 
glob\_indice

\end{description}
\newpage \noindent {\bf \huge regress}\\  \rule[3pt]{\textwidth}{1pt}\\
\begin{description}
 \item[Purpose]\ \newline \newline 


\end{description}

\begin{description}
 \item[Synopsis]\ \newline \newline 
{\tt [ir, or] = regress(m,j)}\\ 
\end{description}

\begin{description}
 \item[Description]\ \newline \newline 
{\tt [ir, or] = regress(m,j)} 
%
\end{description}

\begin{description}
 \item[See also]\ \newline \newline 


\end{description}
\newpage \noindent {\bf \huge seek\_eq}\\  \rule[3pt]{\textwidth}{1pt}\\
\begin{description}
 \item[Purpose]\ \newline \newline 
Use the optimisation toolbox to find a cl
\end{description}

\begin{description}
 \item[Synopsis]\ \newline \newline 
{\tt seek\_eq(m,c,yd,options)}\\ 
\end{description}

\begin{description}
 \item[Description]\ \newline \newline 
{\tt seek\_eq(m,c,yd,options)} 
Finds the equilibrium of the closed loop formed by the model {\tt m}
and the controller {\tt c} for a set point of {\tt yd} and a perturbation of {\tt v}.
{\tt options} contains all the options of the algorithm.
\end{description}

\begin{description}
 \item[Remarks]\ \newline \newline 
-loop equil.

\end{description}

\begin{description}
 \item[See also]\ \newline \newline 


\end{description}
\newpage \noindent {\bf \huge set}\\  \rule[3pt]{\textwidth}{1pt}\\
\begin{description}
 \item[Purpose]\ \newline \newline 
Set object properties
\end{description}

\begin{description}
 \item[Synopsis]\ \newline \newline 
{\tt set(m,'AttrName1',AttrValue1,'AttrName2',AttrValue2,...)}\\ 
{\tt m\_out = set(m,'AttrName1',AttrValue1,'AttrName2',AttrValue2,...)}\\ 
\end{description}

\begin{description}
 \item[Description]\ \newline \newline 
{\tt set(m,'AttrName1',AttrValue1,'AttrName2',AttrValue2,...)} 
sets the value of the attribute {\tt AttrName1}, {\tt AttrName2}, ...
associated to the object {\tt m}.
\vspace{4mm}\\ 
\hspace{2mm}
{\tt m\_out = set(m,'AttrName1',AttrValue1,'AttrName2',AttrValue2,...)} 
sets the value of the attribute {\tt AttrName1}, {\tt AttrName2}, ...
associated to the object {\tt m} and return the modified model inside m\_out. The original
model is not modified.
The following {\tt AttrName} are recognised:
\\  
\begin{tabular}{lp{12cm}}
{\tt name}: & sets the name of the system \\ 
{\tt n\_in}: & sets the number of inputs of the system \\ 
{\tt n\_out}: & sets the number of outputs of the system \\ 
{\tt data}: & sets the data set linked to the system \\ 
{\tt T}: & sets the sampling period of the discrete system, 0 if continuous \\ 
{\tt mapping}: & sets the array of mappings \\ 
{\tt links}: & sets the links array which defines which output is computed by which mapping \\ 
{\tt limits}: & sets the limits of the domain of definition
of the mapping. The value must be a {\tt 2*n\_in} matrix where
the upper and lever saturation level are \\ 
{\tt userData}: & sets the 'userData' field \\ 
{\tt opt}: & sets the 'opt' field \\ 
{\tt date}: & sets the date of creation of the object \\ 
{\tt mapfield}: & let the user access directly property of the mappings. When used, {\tt value}
must contain a 3 elements cell array {{\tt n} 'property' {\tt mapvalue}}. {\tt n} is the index of the 
mapping, 'property' is the name of the property which has to be changet and {\tt mapvalue} is the new value. An even more convenient
way to change mappings' fields is a achieved through the syntax s{n}.property = mapvalue. In both syntax,
if {\tt n} is negative, the <CODE>abs(n)</CODE> mapping describing the state is accessed. \\ 
{\tt params}: & sets the parameters to be optimised \\ 
{\tt n\_state}: & sets the number of states \\ 
{\tt state}: & sets the state vector of the system \\ 
{\tt statemapping}: & sets the mappings used to describe the state \\ 
{\tt statelinks}: & sets the links array which defines which state is computed using which statemapping \\ 
{\tt statelimits}: & sets the bounds of the states \\ 
\end{tabular} \\ 

\end{description}

\begin{description}
 \item[See also]\ \newline \newline 
get

\end{description}
\newpage \noindent {\bf \huge stateregress}\\  \rule[3pt]{\textwidth}{1pt}\\
\begin{description}
 \item[Purpose]\ \newline \newline 
Compute the regressor for the state mapping
\end{description}

\begin{description}
 \item[Synopsis]\ \newline \newline 
{\tt [ir, or] = stateregress(m,j)}\\ 
\end{description}

\begin{description}
 \item[Description]\ \newline \newline 
{\tt [ir, or] = stateregress(m,j)} 
does exactly the same as regress for the state mapping
\end{description}

\begin{description}
 \item[See also]\ \newline \newline 
regress

\end{description}
