<< ModelingSystemDynamicTimeGrid computing_experiment SetDiagramParameters >>

computing_experiment >> computing_experiment > ModelingSystemIdentificationDynamic

ModelingSystemIdentificationDynamic

Implements a computational experiment of a user system specified in the form of an xcos diagram based on the identification of the parameters of this system from experimental data

Syntax

[SystemOutputChatacteristics,..
SystemIdentificationParametersValues..
]=ModelingSystemIdentificationDynamic(SystemIdentificateShema,..
SystemIdentificateOutputCharacteristicsNames,..
SystemIdentificateOutputCharacteristicsIndexes,..
SystemIdentificateOutputCharacteristicsCompressionFunctions,..
SystemIdentificateModesParametersNames,..
SystemIdentificateModesParametersValues,..
SystemIdentificationParametersNames,..
SystemIdentificationParametersMinValues,..
SystemIdentificationParametersMaxValues,..
IdentificationFunction,SystemShema,..
SystemOutputCharacteristicsNames,..
SystemOutputCharacteristicsIndexes,..
"Evidence",SystemOutputCharacteristicsCompressionFunctions,..
SystemModesParametersNames,SystemModesParametersValues,..
[SystemHyperParametrsNames,SystemHyperParametrsValues,..
[identificationAbsolutTolErr,[absolutTolErr,..
[identificationRelativeTolErr,[relativeTolErr,..
[identificationSimulationTime,[simulationTime,..
[identificationTimeStepMax,[timeStepMax,..
[identificationSolver,[Solver,..
[identificationToleranceTime,[toleranceTime]]]]]]]]]]]]])
[SystemOutputChatacteristics,..
SystemIdentificationParametersValues..
]=ModelingSystemIdentificationDynamic(SystemIdentificateShema,..
SystemIdentificateOutputCharacteristicsNames,..
SystemIdentificateOutputCharacteristicsIndexes,..
SystemIdentificateOutputCharacteristicsCompressionFunctions,..
SystemIdentificateModesParametersNames,..
SystemIdentificateModesParametersValues,..
SystemIdentificationParametersNames,..
SystemIdentificationParametersMinValues,..
SystemIdentificationParametersMaxValues,..
IdentificationFunction,SystemShema,..
SystemOutputCharacteristicsNames,..
SystemOutputCharacteristicsIndexes,..
"Evidence",SystemOutputCharacteristicsCompressionFunctions,..
SystemModesParametersNames,SystemModesParametersValues,..
[identificationAbsolutTolErr,[absolutTolErr,..
[identificationRelativeTolErr,[relativeTolErr,..
[identificationSimulationTime,[simulationTime,..
[identificationTimeStepMax,[timeStepMax,..
[identificationSolver,[Solver,..
[identificationToleranceTime,[toleranceTime]]]]]]]]]]]])
[SystemOutputChatacteristics,..
SystemIdentificationParametersValues,..
SystemModesParametersIndexes,..
SystemModesParametersValues,..
TimesMomemts..
]=ModelingSystemIdentificationDynamic(SystemIdentificateShema,..
SystemIdentificateOutputCharacteristicsNames,..
SystemIdentificateOutputCharacteristicsIndexes,..
SystemIdentificateOutputCharacteristicsCompressionFunctions,..
SystemIdentificateModesParametersNames,..
SystemIdentificateModesParametersValues,..
SystemIdentificationParametersNames,..
SystemIdentificationParametersMinValues,..
SystemIdentificationParametersMaxValues,..
IdentificationFunction,SystemShema,..
SystemOutputCharacteristicsNames,..
SystemOutputCharacteristicsIndexes,..
"TimeGrid",TimeMoments,..
SystemModesParametersNames,SystemModesParametersValues,..
[SystemHyperParametrsNames,SystemHyperParametrsValues,..
[identificationAbsolutTolErr,[absolutTolErr,..
[identificationRelativeTolErr,[relativeTolErr,..
[identificationSimulationTime,[simulationTime,..
[identificationTimeStepMax,[timeStepMax,..
[identificationSolver,[Solver,..
[identificationToleranceTime,[toleranceTime]]]]]]]]]]]]])
[SystemOutputChatacteristics,..
SystemIdentificationParametersValues,..
SystemModesParametersIndexes,..
SystemModesParametersValues..
]=ModelingSystemIdentificationDynamic(SystemIdentificateShema,..
SystemIdentificateOutputCharacteristicsNames,..
SystemIdentificateOutputCharacteristicsIndexes,..
SystemIdentificateOutputCharacteristicsCompressionFunctions,..
SystemIdentificateModesParametersNames,..
SystemIdentificateModesParametersValues,..
SystemIdentificationParametersNames,..
SystemIdentificationParametersMinValues,..
SystemIdentificationParametersMaxValues,..
IdentificationFunction,SystemShema,..
SystemOutputCharacteristicsNames,..
SystemOutputCharacteristicsIndexes,..
"TimeGrid",TimeMoments,..
SystemModesParametersNames,SystemModesParametersValues,..
[SystemHyperParametrsNames,SystemHyperParametrsValues,..
[identificationAbsolutTolErr,[absolutTolErr,..
[identificationRelativeTolErr,[relativeTolErr,..
[identificationSimulationTime,[simulationTime,..
[identificationTimeStepMax,[timeStepMax,..
[identificationSolver,[Solver,..
[identificationToleranceTime,[toleranceTime]]]]]]]]]]]]])
[SystemOutputChatacteristics,..
SystemIdentificationParametersValues,..
SystemModesParametersIndexes..
]=ModelingSystemIdentificationDynamic(SystemIdentificateShema,..
SystemIdentificateOutputCharacteristicsNames,..
SystemIdentificateOutputCharacteristicsIndexes,..
SystemIdentificateOutputCharacteristicsCompressionFunctions,..
SystemIdentificateModesParametersNames,..
SystemIdentificateModesParametersValues,..
SystemIdentificationParametersNames,..
SystemIdentificationParametersMinValues,..
SystemIdentificationParametersMaxValues,..
IdentificationFunction,SystemShema,..
SystemOutputCharacteristicsNames,..
SystemOutputCharacteristicsIndexes,..
"TimeGrid",TimeMoments,..
SystemModesParametersNames,SystemModesParametersValues,..
[SystemHyperParametrsNames,SystemHyperParametrsValues,..
[identificationAbsolutTolErr,[absolutTolErr,..
[identificationRelativeTolErr,[relativeTolErr,..
[identificationSimulationTime,[simulationTime,..
[identificationTimeStepMax,[timeStepMax,..
[identificationSolver,[Solver,..
[identificationToleranceTime,[toleranceTime]]]]]]]]]]]]])
[SystemOutputChatacteristics,..
SystemIdentificationParametersValues..
]=ModelingSystemIdentificationDynamic(SystemIdentificateShema,..
SystemIdentificateOutputCharacteristicsNames,..
SystemIdentificateOutputCharacteristicsIndexes,..
SystemIdentificateOutputCharacteristicsCompressionFunctions,..
SystemIdentificateModesParametersNames,..
SystemIdentificateModesParametersValues,..
SystemIdentificationParametersNames,..
SystemIdentificationParametersMinValues,..
SystemIdentificationParametersMaxValues,..
IdentificationFunction,SystemShema,..
SystemOutputCharacteristicsNames,..
SystemOutputCharacteristicsIndexes,..
"TimeGrid",TimeMoments,..
SystemModesParametersNames,SystemModesParametersValues,..
[SystemHyperParametrsNames,SystemHyperParametrsValues,..
[identificationAbsolutTolErr,[absolutTolErr,..
[identificationRelativeTolErr,[relativeTolErr,..
[identificationSimulationTime,[simulationTime,..
[identificationTimeStepMax,[timeStepMax,..
[identificationSolver,[Solver,..
[identificationToleranceTime,[toleranceTime]]]]]]]]]]]]])
[SystemOutputChatacteristics,..
SystemIdentificationParametersValues,..
SystemModesParametersIndexes,..
SystemModesParametersValues,..
TimesMomemts..
]=ModelingSystemIdentificationDynamic(SystemIdentificateShema,..
SystemIdentificateOutputCharacteristicsNames,..
SystemIdentificateOutputCharacteristicsIndexes,..
SystemIdentificateOutputCharacteristicsCompressionFunctions,..
SystemIdentificateModesParametersNames,..
SystemIdentificateModesParametersValues,..
SystemIdentificationParametersNames,..
SystemIdentificationParametersMinValues,..
SystemIdentificationParametersMaxValues,..
IdentificationFunction,SystemShema,..
SystemOutputCharacteristicsNames,..
SystemOutputCharacteristicsIndexes,..
"TimeGrid",TimeMoments,..
SystemModesParametersNames,SystemModesParametersValues,..
[identificationAbsolutTolErr,[absolutTolErr,..
[identificationRelativeTolErr,[relativeTolErr,..
[identificationSimulationTime,[simulationTime,..
[identificationTimeStepMax,[timeStepMax,..
[identificationSolver,[Solver,..
[identificationToleranceTime,[toleranceTime]]]]]]]]]]]])
[SystemOutputChatacteristics,..
SystemIdentificationParametersValues,..
SystemModesParametersIndexes,..
SystemModesParametersValues..
]=ModelingSystemIdentificationDynamic(SystemIdentificateShema,..
SystemIdentificateOutputCharacteristicsNames,..
SystemIdentificateOutputCharacteristicsIndexes,..
SystemIdentificateOutputCharacteristicsCompressionFunctions,..
SystemIdentificateModesParametersNames,..
SystemIdentificateModesParametersValues,..
SystemIdentificationParametersNames,..
SystemIdentificationParametersMinValues,..
SystemIdentificationParametersMaxValues,..
IdentificationFunction,SystemShema,..
SystemOutputCharacteristicsNames,..
SystemOutputCharacteristicsIndexes,..
"TimeGrid",TimeMoments,..
SystemModesParametersNames,SystemModesParametersValues,..
[identificationAbsolutTolErr,[absolutTolErr,..
[identificationRelativeTolErr,[relativeTolErr,..
[identificationSimulationTime,[simulationTime,..
[identificationTimeStepMax,[timeStepMax,..
[identificationSolver,[Solver,..
[identificationToleranceTime,[toleranceTime]]]]]]]]]]]])
[SystemOutputChatacteristics,..
SystemIdentificationParametersValues,..
SystemModesParametersIndexes..
]=ModelingSystemIdentificationDynamic(SystemIdentificateShema,..
SystemIdentificateOutputCharacteristicsNames,..
SystemIdentificateOutputCharacteristicsIndexes,..
SystemIdentificateOutputCharacteristicsCompressionFunctions,..
SystemIdentificateModesParametersNames,..
SystemIdentificateModesParametersValues,..
SystemIdentificationParametersNames,..
SystemIdentificationParametersMinValues,..
SystemIdentificationParametersMaxValues,..
IdentificationFunction,SystemShema,..
SystemOutputCharacteristicsNames,..
SystemOutputCharacteristicsIndexes,..
"TimeGrid",TimeMoments,..
SystemModesParametersNames,SystemModesParametersValues,..
[identificationAbsolutTolErr,[absolutTolErr,..
[identificationRelativeTolErr,[relativeTolErr,..
[identificationSimulationTime,[simulationTime,..
[identificationTimeStepMax,[timeStepMax,..
[identificationSolver,[Solver,..
[identificationToleranceTime,[toleranceTime]]]]]]]]]]]])
[SystemOutputChatacteristics,..
SystemIdentificationParametersValues..
]=ModelingSystemIdentificationDynamic(SystemIdentificateShema,..
SystemIdentificateOutputCharacteristicsNames,..
SystemIdentificateOutputCharacteristicsIndexes,..
SystemIdentificateOutputCharacteristicsCompressionFunctions,..
SystemIdentificateModesParametersNames,..
SystemIdentificateModesParametersValues,..
SystemIdentificationParametersNames,..
SystemIdentificationParametersMinValues,..
SystemIdentificationParametersMaxValues,..
IdentificationFunction,SystemShema,..
SystemOutputCharacteristicsNames,..
SystemOutputCharacteristicsIndexes,..
"TimeGrid",TimeMoments,..
SystemModesParametersNames,SystemModesParametersValues,..
[identificationAbsolutTolErr,[absolutTolErr,..
[identificationRelativeTolErr,[relativeTolErr,..
[identificationSimulationTime,[simulationTime,..
[identificationTimeStepMax,[timeStepMax,..
[identificationSolver,[Solver,..
[identificationToleranceTime,[toleranceTime]]]]]]]]]]]])

Arguments

SystemIdentificateShema

User system xcos-diagram (type Xcos diagram structure) or user system xcos-diagram file name (.zcos, .xcos extension) to identify parameters

SystemIdentificateOutputChatacteristicsNames

An array of names of the output characteristics of the system, by which the system is identified, in the xcos diagram (block TOWS_c). Array dimension 1xM

SystemIdentificateOutputCharacteristicsIndexes

An array of indexes of output characteristics dynamics in the names of the system output characteristics, by which the system is identified, in the xcos diagram (block TOWS_c). Array dimension 1xM

SystemIdentificateOutputCharacteristicsCompressionFunctions

Cell-array (see cell-arrays) of functions or an array of strings of names of functions for obtaining parameters of calculated dynamics, specified by SystemOutputCharacteristicsIndexes indexes, by which the system is identified

SystemIdentificateModesParametrsNames

The names of the system parameters in the xcos diagram (see the context property in Xcos diagram structure) that define the control modes of the system, in which its characteristics are identified. Array of 1xM strings

SystemIdentificateModesParametrsValues

Values of system parameters in the xcos diagram (see the context property in Xcos diagram structure) defined by the corresponding SystemIdentificateModesParametersNames, which define control modes of the system, in which its characteristics are identified. Array of real numbers, strings, logical values of dimension NxM (each n-th row of N rows in the matrix is the corresponding n-th dynamics).

SystemIdentificationParametersNames

Names of identifiable system parameters in the xcos diagram (see the context property in Xcos diagram structure). Array of 1xM strings

SystemIdentificationParametersMinValues

The minimum values of identifiable system parameters in an xcos diagram (see the context property in Xcos diagram structure), given by the corresponding SystemIdentificationParametersNames. Array of real numbers, strings, logical values of dimension NxM (each n-th row of N rows in the matrix is the corresponding n-th dynamics).

SystemIdentificationParametersMaxValues

The maximum values of identifiable system parameters in the xcos diagram (see the context property in Xcos diagram structure) given by the corresponding SystemIdentificationParametersNames. Array of real numbers, strings, logical values of dimension NxM (each n-th row of N rows in the matrix is the corresponding n-th dynamics).

IdentificationFunction

Function for identifying user system parameters specified by user system Xcos identification diagram (type Xcos diagram structure) or user system Xcos diagram file name (extension .zcos, .xcos)

SystemShema

Xcos diagram of the user system (type Xcos diagram structure) or file name of the Xcos diagram of the user system (extension .zcos, .xcos)

SystemOutputChatacteristicsNames

Array of names of system output characteristics in xcos-diagram (see block TOWS_c). Array dimension 1xM

SystemOutputCharacteristicsIndexes

An array of indices of the dynamics of the output characteristics in the names of the output characteristics of the system in the xcos diagram (block TOWS_c). Array dimension 1xM

SystemOutputCharacteristicsCompressionFunctions

Cell array (see cell arrays) functions or string array of names of functions for getting the parameters of computed dynamics, specified by SystemOutputCharacteristicsIndexes

TimeMoments

Cell-array (see cell-arrays) arrays (the dimension of each array is 1xN, N is different for each dynamics) discrete moments in time for each dynamics of the output characteristics specified by indices SystemOutputCharacteristicsIndexes

SystemModesParametrsNames

The names of the system's modes parameters in the xcos diagram (see the context property in Xcos diagram structure). Array of strings of dimension 1xM

SystemModesParametrsValues

System's modes parameter values in the xcos diagram (see the context property in Xcos diagram structure), specified by the corresponding SystemParametrsNames. NxM array of real numbers, strings, booleans (each n-th row of N rows in the matrix is the corresponding n-th dynamics)

SystemHyperParametrsNames

The names of the system hyperparameters in the xcos diagram (see the context property in Xcos diagram structure). Array of strings of dimension 1xM

SystemHyperParametrsValues

System hyperparameter values in the xcos diagram (see the context property in Xcos diagram structure), specified by the corresponding SystemParametrsNames. 1xM array of real numbers, strings, booleans

identificationAbsolutTolErr

Absolute integration errors in xcos (in the identification diagram) (see tol(1) atol property in Xcos diagram structure) of each dynamic. Array of positive real numbers of dimension 1xN

absolutTolErr

Absolute errors of integration in xcos (see the tol (1) atol property in Xcos diagram structure) of each dynamics. Array of positive real numbers of dimension 1xN

identificationRelativeTolErr

The relative integration errors in xcos (in the identification diagram) (see the tol(2) rtol property in Xcos diagram structure) of each dynamics. Array of positive real numbers of dimension 1xN

relativeTolErr

Relative errors of integration in xcos (see the tol (2) rtol property in Xcos diagram structure) of each dynamics. Array of positive real numbers of dimension 1xN

identificationSimulationTime

Simulation times in xcos (in id diagram) (see tf property in Xcos diagram structure) of each dynamic. Array of positive real numbers of dimension 1xN

simulationTime

Simulation times in xcos (see the tf property in Xcos diagram structure) of each dynamics. Array of positive real numbers of dimension 1xN

identificationTimeStepMax

The maximum time integration steps in xcos (in the identification diagram) (see tol(7) hmax property in Xcos diagram structure) of each dynamic. Array of positive real numbers of dimension 1xN

timeStepMax

Maximum time integration steps in xcos (see the tol (7) hmax property in Xcos diagram structure) of each dynamics. Array of positive real numbers of dimension 1xN

identificationSolver

The solver views in xcos (in the identification diagram) (see the tol(6) solver property in Xcos diagram structure) of each dynamic. An array of integers in the range from 0 to 100 - solver codes. Dimension of solver codes - 1xN

Solver

Solver views in xcos (see the tol (6) solver property in Xcos diagram structure) of each dynamics. An array of integers ranging from 0 to 100 - solver codes. The dimension of the solver codes is 1xN

identificationToleranceTime

The time errors in xcos (in the identification diagram) are the corresponding minimum time integration steps (see the tol(3) ttol property in the Xcos diagram structure) for each dynamic. Array of positive real numbers of dimension 1xN

toleranceTime

Time errors in xcos are the corresponding minimum steps of integration over time (see the tol (3) ttol property in Xcos diagram structure) for each dynamics. Array of positive real numbers of dimension 1xN

Return values

SystemOutputChatacteristics

Matrix of parameters of system output characteristics. Dimension of matrix PxN

SystemIdentificationParametersValues

Identified system system parameters

SystemModesParametersIndexes

Column vector of indices of values of the system parameters, the names of which are specified in the array SystemParametrsNames

SystemModesParametersValues

Matrix of system parameters, the names of which are specified in the SystemParametrsNames array and for which discrete values of the system's output characteristics are calculated at discrete times. Dimension of the MxQ matrix

TimesMomemts

Column vector of time instants corresponding to the parameters of the system's output characteristics SystemOutputChatacteristics

Description

Performs, based on the identification of parameters based on the results of observations, a simulation (computational experiment) of the user system, specified in the form of an xcos diagram, for its various parameters (specified in the context).

Returns a matrix of speaker parameters with user-defined output characteristics of the system (in the diagram, these are given as TOWS_c blocks)

All graphic windows open during the simulation are automatically deleted.

Examples

//Forming the path to the xcos-diagram Proba10.zcos
[a, pathlib] = libraryinfo("computing_experimentlib");
   clear a;
   pathlib = strncpy(pathlib, length(pathlib) - length('macros')) + 'xcos';

   //Filter identification functions
   function [parametrs]=IdentificationDynamicFilterFunction1(time, value)
       parametrs=3.3*max(abs(value));
   endfunction
   function [parametrs]=IdentificationDynamicFilterFunction2(time, value)
       parametrs=9.63*max(abs(value));
   endfunction

   //Array of filter identification functions
   IdentificationDynamicFiltersFunctions = cell(1, 2);
   IdentificationDynamicFiltersFunctions{1} = IdentificationDynamicFilterFunction1;
   IdentificationDynamicFiltersFunctions{2} = IdentificationDynamicFilterFunction2;

   //Filter function
   function [parametrs]=DynamicFilterFunction1(time, value)
       parametrs=[sum(time.*value) / length(time), sum((time.^2).*value) / (3*length(time))];
   endfunction
   function [parametr]=DynamicFilterFunction2(time, value)
       parametr=sum(time.*value) / (2*length(time));
   endfunction

   //Array of filter functions
   DynamicFiltersFunctions = cell(1, 3);
   DynamicFiltersFunctions{1} = DynamicFilterFunction1;
   DynamicFiltersFunctions{2} = DynamicFilterFunction2;
   DynamicFiltersFunctions{3} = DynamicFilterFunction1;

   //Diagram file path
   SystemShemaPath = fullfile(pathlib, 'Proba10.zcos');
   SystemIdentificationShemaPath = fullfile(pathlib, 'Proba10iden.zcos');

   //Chart hyperparameters
   Alpha1 = 1.05;
   SystemHyperParametrsNames = ['Alpha1'];//Names of hyperparameters that determine dynamics
   SystemHyperParametrsValues = [Alpha1];//Values of hyperparameters that determine the dynamics

   //Output characteristics of the system by which we identify the diagram
   SystemIdentificateOutputCharacteristicsNames = ['DY2','DY3'];
   SystemIdentificateOutputCharacteristicsIndexes = [1,1];

   //System output characteristics
   SystemOutputCharacteristicsNames = ['Y1','Y2','Y3'];
   SystemOutputCharacteristicsIndexes = [1,1,1];

   //Functions for calculating control dynamics
   function [sCurYs]=CurYsToString(CurYs)
       sCurYs = '[' + strcat(string(CurYs),',') + ']';
   endfunction
   function [CurY2s]=fCurY2s(A1, A2, B1, B2, C, Alpha1, Alpha2, CurTs)
       CurY2s = CurYsToString(C*(CurTs .^ 3) + B2*log(1 + Alpha1*CurTs) + A1);
   endfunction
   function [CurY3s]=fCurY3s(A1, A2, B1, B2, C, Alpha1, Alpha2, CurTs)
       CurY3s = CurYsToString(0.5*A1 + 10*A2*log(1 + Alpha2*CurTs) + B1*(CurTs .^ 2) + 10*B2);
   endfunction

   //Reference parameter values
   A1et = 5.7;
   A2et = 4.5;
   B1et = 0.3;
   B2et = 2.7;
   Cet = 0.63;

   //Parameter values by which we identify the system
   T = 10;//Simulation time
   CurTs = [0:(T/(10^2)):T];//The current moments of time at which we take the values
   CurY2_1s = fCurY2s(A1et,A2et,B1et,B2et,Cet,Alpha1,0.0,CurTs);
   CurY3_1s = fCurY3s(A1et,A2et,B1et,B2et,Cet,Alpha1,0.0,CurTs);
   CurY2_2s = fCurY2s(A1et,A2et,B1et,B2et,Cet,Alpha1,1.23,CurTs);
   CurY3_2s = fCurY3s(A1et,A2et,B1et,B2et,Cet,Alpha1,1.23,CurTs);

   //Parameters of control modes of the system
   SystemIdentificateModesParametersNames = ['CurY2s','CurY3s','Alpha2'];//Parameter names
   SystemIdentificateModesParametersValues = [CurY2_1s,CurY3_1s, '0.0';..
                                              CurY2_2s,CurY3_2s,'1.23'];//Parameter values

   //Parameters of system operation modes
   SystemModesParametersNames = ['Omega1','Lambda1','Omega2','Omega3','Lambda2','Alpha2','Beta'];//Parameter names
   SystemModesParametersValues = [ 1.29,0.21, 0.09, 1.5,0.369,1.83,6.123;..
                                  1.323,0.27, 0.15,1.83,0.339,1.23,6.153;..
                                   1.29,0.33,0.063,1.23,0.699, 1.5,3.183];//Parameter values

   //Identifiable system parameters
   SystemIdentificationParametersNames = ['A1','A2','B1','B2','C'];//Parameter names
   SystemIdentificationParametersMinValues = [5.1,4.23,0.15,2.43,0.57];//Minimum parameter values
   SystemIdentificationParametersMaxValues = [6.3,4.83,0.75,3.03,0.69];//Maximum parameter values

   //Identification function
   function [parameters]=IdentificationFunction(fSys, MinValues, MaxValues)
       //Generating random parameter values
       MinValues = repmat(MinValues,[10,1]);
       MaxValues = repmat(MaxValues,[10,1]);
       parameters = MinValues + (MaxValues - MinValues) .* rand(MinValues);
       
       //We get residuals
       errs = fSys(parameters);
       
       //Summarizing residuals
       errs = sum(errs,1);
       errs = sum(errs,2);
       errs = matrix(errs,1,-1);
       
       //Choose the minimum residual
       [MinErrs, indMinErrs] = min(errs);
       
       //We take the appropriate parameters
       parameters = parameters(indMinErrs,:);
   endfunction

   //Run the basic function
   [SystemOutputChatacteristics,..//System output characteristics
    SystemIdentificationParametersValues,..//Values of identified system parameters
    SystemModesParametersIndexes,..//Indices of system parameters that determine its modes
    SystemModesParametersValues,..//Values of system parameters that determine its modes
    TimesMomemts..//Moments in time
    ]=ModelingSystemIdentificationDynamic(SystemIdentificationShemaPath,..//System identification scheme or system identification scheme file name
                                          SystemIdentificateOutputCharacteristicsNames,..//Names of output characteristics of the system by which identification is carried out (by deviations of these values from the corresponding experimental values)
                                          SystemIdentificateOutputCharacteristicsIndexes,..//Indices of system output characteristics (in names), by which identification is carried out (by deviations of these values from the corresponding experimental values)
                                          IdentificationDynamicFiltersFunctions,..//The compression function of the dynamics of the output characteristics of the system, by which the identification is carried out (by deviations of these values from the corresponding experimental values)
                                          SystemIdentificateModesParametersNames,..//Names of system parameters that determine its control modes
                                          SystemIdentificateModesParametersValues,..//Values of system parameters that determine its control modes
                                          SystemIdentificationParametersNames,..//Names of identifiable system parameters
                                          SystemIdentificationParametersMinValues,..//Minimum values of identifiable system parameters
                                          SystemIdentificationParametersMaxValues,..//Maximum values of identifiable system parameters
                                          IdentificationFunction,..//Identification function
                                          SystemShemaPath,..//System schema or system schema filename
                                          SystemOutputCharacteristicsNames,..//System output characteristic names
                                          SystemOutputCharacteristicsIndexes,..//System output indexes (in names)
                                          "Evidence",DynamicFiltersFunctions,..//Speaker Compression Features
                                          SystemModesParametersNames,..//Names of system parameters that determine its modes
                                          SystemModesParametersValues,..//Values of system parameters that determine its modes
                                          SystemHyperParametrsNames,..//Names of hyperparameters that determine dynamics
                                          SystemHyperParametrsValues,..//Values of hyperparameters that determine the dynamics
                                          [0.5E-6,0.51E-6],..//Maximum Absolute Error Value for System Identification Modes
                                          [0.5E-6,0.51E-6,0.57E-6],..//Maximum value of absolute error
                                          [0.69E-6,0.57E-6],..//Minimum Relative Error Value for System Identification Modes
                                          [0.69E-6,0.57E-6,0.75E-6],..//Minimum Relative Error
                                          [10.0,11.1],..//Simulation time for system identification modes
                                          [10.0,11.1,15.3],..//Simulation time
                                          [0.93E-4,0.87E-4],..//Maximum time interval for system identification modes
                                          [0.93E-4,0.87E-4,0.81E-4],..//Maximum time step of integration
                                          [0,3],..//Solver for system identification modes
                                          [0,3,4],..//Solver
                                          [2.1E-10,1.5E-10],..//Maximum time error for system identification modes
                                          [2.1E-10,1.5E-10,1.23E-10]..//Maximum time error
                                          );

   //Result
   disp(SystemOutputChatacteristics);
   disp(SystemIdentificationParametersValues);
//Forming the path to the xcos-diagram Proba10.zcos
[a, pathlib] = libraryinfo("computing_experimentlib");
   clear a;
   pathlib = strncpy(pathlib, length(pathlib) - length('macros')) + 'xcos';

   //Filter identification functions
   function [parametrs]=IdentificationDynamicFilterFunction1(time, value)
       parametrs=3.3*max(abs(value));
   endfunction
   function [parametrs]=IdentificationDynamicFilterFunction2(time, value)
       parametrs=9.63*max(abs(value));
   endfunction

   //Array of filter identification functions
   IdentificationDynamicFiltersFunctions = cell(1, 2);
   IdentificationDynamicFiltersFunctions{1} = IdentificationDynamicFilterFunction1;
   IdentificationDynamicFiltersFunctions{2} = IdentificationDynamicFilterFunction2;

   //Filter function
   function [parametrs]=DynamicFilterFunction1(time, value)
       parametrs=[sum(time.*value) / length(time), sum((time.^2).*value) / (3*length(time))];
   endfunction
   function [parametr]=DynamicFilterFunction2(time, value)
       parametr=sum(time.*value) / (2*length(time));
   endfunction

   //Array of filter functions
   DynamicFiltersFunctions = cell(1, 3);
   DynamicFiltersFunctions{1} = DynamicFilterFunction1;
   DynamicFiltersFunctions{2} = DynamicFilterFunction2;
   DynamicFiltersFunctions{3} = DynamicFilterFunction1;

   //Diagram file path
   SystemShemaPath = fullfile(pathlib, 'Proba10.zcos');
   SystemIdentificationShemaPath = fullfile(pathlib, 'Proba10iden.zcos');

   //Output characteristics of the system by which we identify the diagram
   SystemIdentificateOutputCharacteristicsNames = ['DY2','DY3'];
   SystemIdentificateOutputCharacteristicsIndexes = [1,1];

   //System output characteristics
   SystemOutputCharacteristicsNames = ['Y1','Y2','Y3'];
   SystemOutputCharacteristicsIndexes = [1,1,1];

   //Functions for calculating control dynamics
   function [sCurYs]=CurYsToString(CurYs)
       sCurYs = '[' + strcat(string(CurYs),',') + ']';
   endfunction
   function [CurY2s]=fCurY2s(A1, A2, B1, B2, C, Alpha1, Alpha2, CurTs)
       CurY2s = CurYsToString(C*(CurTs .^ 3) + B2*log(1 + Alpha1*CurTs) + A1);
   endfunction
   function [CurY3s]=fCurY3s(A1, A2, B1, B2, C, Alpha1, Alpha2, CurTs)
       CurY3s = CurYsToString(0.5*A1 + 10*A2*log(1 + Alpha2*CurTs) + B1*(CurTs .^ 2) + 10*B2);
   endfunction

   //Reference parameter values
   A1et = 5.7;
   A2et = 4.5;
   B1et = 0.3;
   B2et = 2.7;
   Cet = 0.63;

   //Parameter values by which we identify the system
   T = 10;//Simulation time
   CurTs = [0:(T/(10^2)):T];//The current moments of time at which we take the values
   CurY2_1s = fCurY2s(A1et,A2et,B1et,B2et,Cet,1.05,0.0,CurTs);
   CurY3_1s = fCurY3s(A1et,A2et,B1et,B2et,Cet,1.05,0.0,CurTs);
   CurY2_2s = fCurY2s(A1et,A2et,B1et,B2et,Cet,1.05,1.23,CurTs);
   CurY3_2s = fCurY3s(A1et,A2et,B1et,B2et,Cet,1.05,1.23,CurTs);

   //Parameters of control modes of the system
   SystemIdentificateModesParametersNames = ['CurY2s','CurY3s','Alpha2'];//Parameter names
   SystemIdentificateModesParametersValues = [CurY2_1s,CurY3_1s, '0.0';..
                                              CurY2_2s,CurY3_2s,'1.23'];//Parameter values

   //Parameters of system operation modes
   SystemModesParametersNames = ['Omega1','Lambda1','Omega2','Omega3','Lambda2','Alpha2','Beta'];//Parameter names
   SystemModesParametersValues = [ 1.29,0.21, 0.09, 1.5,0.369,1.83,6.123;..
                                  1.323,0.27, 0.15,1.83,0.339,1.23,6.153;..
                                   1.29,0.33,0.063,1.23,0.699, 1.5,3.183];//Parameter values

   //Identifiable system parameters
   SystemIdentificationParametersNames = ['A1','A2','B1','B2','C'];//Parameter names
   SystemIdentificationParametersMinValues = [5.1,4.23,0.15,2.43,0.57];//Minimum parameter values
   SystemIdentificationParametersMaxValues = [6.3,4.83,0.75,3.03,0.69];//Maximum parameter values

   //Identification function
   function [parameters]=IdentificationFunction(fSys, MinValues, MaxValues)
       //Generating random parameter values
       MinValues = repmat(MinValues,[10,1]);
       MaxValues = repmat(MaxValues,[10,1]);
       parameters = MinValues + (MaxValues - MinValues) .* rand(MinValues);
       
       //We get residuals
       errs = fSys(parameters);
       
       //Summarizing residuals
       errs = sum(errs,1);
       errs = sum(errs,2);
       errs = matrix(errs,1,-1);
       
       //Choose the minimum residual
       [MinErrs, indMinErrs] = min(errs);
       
       //We take the appropriate parameters
       parameters = parameters(indMinErrs,:);
   endfunction

   //Run the basic function
   [SystemOutputChatacteristics,..//System output characteristics
    SystemIdentificationParametersValues,..//Values of identified system parameters
    SystemModesParametersIndexes,..//Indices of system parameters that determine its modes
    SystemModesParametersValues,..//Values of system parameters that determine its modes
    TimesMomemts..//Moments in time
    ]=ModelingSystemIdentificationDynamic(SystemIdentificationShemaPath,..//System identification scheme or system identification scheme file name
                                          SystemIdentificateOutputCharacteristicsNames,..//Names of output characteristics of the system by which identification is carried out (by deviations of these values from the corresponding experimental values)
                                          SystemIdentificateOutputCharacteristicsIndexes,..//Indices of system output characteristics (in names), by which identification is carried out (by deviations of these values from the corresponding experimental values)
                                          IdentificationDynamicFiltersFunctions,..//The compression function of the dynamics of the output characteristics of the system, by which the identification is carried out (by deviations of these values from the corresponding experimental values)
                                          SystemIdentificateModesParametersNames,..//Names of system parameters that determine its control modes
                                          SystemIdentificateModesParametersValues,..//Values of system parameters that determine its control modes
                                          SystemIdentificationParametersNames,..//Names of identifiable system parameters
                                          SystemIdentificationParametersMinValues,..//Minimum values of identifiable system parameters
                                          SystemIdentificationParametersMaxValues,..//Maximum values of identifiable system parameters
                                          IdentificationFunction,..//Identification function
                                          SystemShemaPath,..//System schema or system schema filename
                                          SystemOutputCharacteristicsNames,..//System output characteristic names
                                          SystemOutputCharacteristicsIndexes,..//System output indexes (in names)
                                          "Evidence",DynamicFiltersFunctions,..//Speaker Compression Features
                                          SystemModesParametersNames,..//Names of system parameters that determine its modes
                                          SystemModesParametersValues,..//Values of system parameters that determine its modes
                                          [0.5E-6,0.51E-6],..//Maximum Absolute Error Value for System Identification Modes
                                          [0.5E-6,0.51E-6,0.57E-6],..//Maximum value of absolute error
                                          [0.69E-6,0.57E-6],..//Minimum Relative Error Value for System Identification Modes
                                          [0.69E-6,0.57E-6,0.75E-6],..//Minimum Relative Error
                                          [10.0,11.1],..//Simulation time for system identification modes
                                          [10.0,11.1,15.3],..//Simulation time
                                          [0.93E-4,0.87E-4],..//Maximum time interval for system identification modes
                                          [0.93E-4,0.87E-4,0.81E-4],..//Maximum time step of integration
                                          [0,3],..//Solver for system identification modes
                                          [0,3,4],..//Solver
                                          [2.1E-10,1.5E-10],..//Maximum time error for system identification modes
                                          [2.1E-10,1.5E-10,1.23E-10]..//Maximum time error
                                          );

   //Result
   disp(SystemOutputChatacteristics);
   disp(SystemIdentificationParametersValues);
//Forming the path to the xcos-diagram Proba10.zcos
[a, pathlib] = libraryinfo("computing_experimentlib");
   clear a;
   pathlib = strncpy(pathlib, length(pathlib) - length('macros')) + 'xcos';

   //Filter identification functions
   function [parametrs]=IdentificationDynamicFilterFunction1(time, value)
       parametrs=3.3*max(abs(value));
   endfunction
   function [parametrs]=IdentificationDynamicFilterFunction2(time, value)
       parametrs=9.63*max(abs(value));
   endfunction

   //Array of filter identification functions
   IdentificationDynamicFiltersFunctions = cell(1, 2);
   IdentificationDynamicFiltersFunctions{1} = IdentificationDynamicFilterFunction1;
   IdentificationDynamicFiltersFunctions{2} = IdentificationDynamicFilterFunction2;

   //Filter function
   function [parametrs]=DynamicFilterFunction1(time, value)
       parametrs=[sum(time.*value) / length(time), sum((time.^2).*value) / (3*length(time))];
   endfunction
   function [parametr]=DynamicFilterFunction2(time, value)
       parametr=sum(time.*value) / (2*length(time));
   endfunction

   //Array of filter functions
   DynamicFiltersFunctions = cell(1, 3);
   DynamicFiltersFunctions{1} = DynamicFilterFunction1;
   DynamicFiltersFunctions{2} = DynamicFilterFunction2;
   DynamicFiltersFunctions{3} = DynamicFilterFunction1;

   //Diagram file path
   SystemShemaPath = fullfile(pathlib, 'Proba10.zcos');
   SystemIdentificationShemaPath = fullfile(pathlib, 'Proba10iden.zcos');

   //Chart hyperparameters
   Alpha1 = 1.05;
   SystemHyperParametrsNames = ['Alpha1'];//Names of hyperparameters that determine dynamics
   SystemHyperParametrsValues = [Alpha1];//Values of hyperparameters that determine the dynamics

   //Output characteristics of the system by which we identify the diagram
   SystemIdentificateOutputCharacteristicsNames = ['DY2','DY3'];
   SystemIdentificateOutputCharacteristicsIndexes = [1,1];

   //System output characteristics
   SystemOutputCharacteristicsNames = ['Y1','Y2','Y3'];
   SystemOutputCharacteristicsIndexes = [1,1,1];

   //Functions for calculating control dynamics
   function [sCurYs]=CurYsToString(CurYs)
       sCurYs = '[' + strcat(string(CurYs),',') + ']';
   endfunction
   function [CurY2s]=fCurY2s(A1, A2, B1, B2, C, Alpha1, Alpha2, CurTs)
       CurY2s = CurYsToString(C*(CurTs .^ 3) + B2*log(1 + Alpha1*CurTs) + A1);
   endfunction
   function [CurY3s]=fCurY3s(A1, A2, B1, B2, C, Alpha1, Alpha2, CurTs)
       CurY3s = CurYsToString(0.5*A1 + 10*A2*log(1 + Alpha2*CurTs) + B1*(CurTs .^ 2) + 10*B2);
   endfunction

   //Reference parameter values
   A1et = 5.7;
   A2et = 4.5;
   B1et = 0.3;
   B2et = 2.7;
   Cet = 0.63;

   //Parameter values by which we identify the system
   T = 10;//Simulation time
   CurTs = [0:(T/(10^2)):T];//The current moments of time at which we take the values
   CurY2_1s = fCurY2s(A1et,A2et,B1et,B2et,Cet,Alpha1,0.0,CurTs);
   CurY3_1s = fCurY3s(A1et,A2et,B1et,B2et,Cet,Alpha1,0.0,CurTs);
   CurY2_2s = fCurY2s(A1et,A2et,B1et,B2et,Cet,Alpha1,1.23,CurTs);
   CurY3_2s = fCurY3s(A1et,A2et,B1et,B2et,Cet,Alpha1,1.23,CurTs);

   //Parameters of control modes of the system
   SystemIdentificateModesParametersNames = ['CurY2s','CurY3s','Alpha2'];//Parameter names
   SystemIdentificateModesParametersValues = [CurY2_1s,CurY3_1s, '0.0';..
                                              CurY2_2s,CurY3_2s,'1.23'];//Parameter values

   //Parameters of system operation modes
   SystemModesParametersNames = ['Omega1','Lambda1','Omega2','Omega3','Lambda2','Alpha2','Beta'];//Parameter names
   SystemModesParametersValues = [ 1.29,0.21, 0.09, 1.5,0.369,1.83,6.123;..
                                  1.323,0.27, 0.15,1.83,0.339,1.23,6.153;..
                                   1.29,0.33,0.063,1.23,0.699, 1.5,3.183];//Parameter values

   //Identifiable system parameters
   SystemIdentificationParametersNames = ['A1','A2','B1','B2','C'];//Parameter names
   SystemIdentificationParametersMinValues = [5.1,4.23,0.15,2.43,0.57];//Minimum parameter values
   SystemIdentificationParametersMaxValues = [6.3,4.83,0.75,3.03,0.69];//Maximum parameter values

   //Identification function
   function [parameters]=IdentificationFunction(fSys, MinValues, MaxValues)
       //Generating random parameter values
       MinValues = repmat(MinValues,[10,1]);
       MaxValues = repmat(MaxValues,[10,1]);
       parameters = MinValues + (MaxValues - MinValues) .* rand(MinValues);
       
       //We get residuals
       errs = fSys(parameters);
       
       //Summarizing residuals
       errs = sum(errs,1);
       errs = sum(errs,2);
       errs = matrix(errs,1,-1);
       
       //Choose the minimum residual
       [MinErrs, indMinErrs] = min(errs);
       
       //We take the appropriate parameters
       parameters = parameters(indMinErrs,:);
   endfunction

   //Run the basic function
   [SystemOutputChatacteristics,..//System output characteristics
    SystemIdentificationParametersValues,..//Values of identified system parameters
    SystemModesParametersIndexes,..//Indices of system parameters that determine its modes
    SystemModesParametersValues,..//Values of system parameters that determine its modes
    TimesMomemts..//Moments in time
    ]=ModelingSystemIdentificationDynamic(SystemIdentificationShemaPath,..//System identification scheme or system identification scheme file name
                                          SystemIdentificateOutputCharacteristicsNames,..//Names of output characteristics of the system by which identification is carried out (by deviations of these values from the corresponding experimental values)
                                          SystemIdentificateOutputCharacteristicsIndexes,..//Indices of system output characteristics (in names), by which identification is carried out (by deviations of these values from the corresponding experimental values)
                                          IdentificationDynamicFiltersFunctions,..//The compression function of the dynamics of the output characteristics of the system, by which the identification is carried out (by deviations of these values from the corresponding experimental values)
                                          SystemIdentificateModesParametersNames,..//Names of system parameters that determine its control modes
                                          SystemIdentificateModesParametersValues,..//Values of system parameters that determine its control modes
                                          SystemIdentificationParametersNames,..//Names of identifiable system parameters
                                          SystemIdentificationParametersMinValues,..//Minimum values of identifiable system parameters
                                          SystemIdentificationParametersMaxValues,..//Maximum values of identifiable system parameters
                                          IdentificationFunction,..//Identification function
                                          SystemShemaPath,..//System schema or system schema filename
                                          SystemOutputCharacteristicsNames,..//System output characteristic names
                                          SystemOutputCharacteristicsIndexes,..//System output indexes (in names)
                                          "Evidence",DynamicFiltersFunctions,..//Speaker Compression Features
                                          SystemModesParametersNames,..//Names of system parameters that determine its modes
                                          SystemModesParametersValues,..//Values of system parameters that determine its modes
                                          SystemHyperParametrsNames,..//Names of hyperparameters that determine dynamics
                                          SystemHyperParametrsValues..//Values of hyperparameters that determine the dynamics
                                          );

   //Result
   disp(SystemOutputChatacteristics);
   disp(SystemIdentificationParametersValues);
//Forming the path to the xcos-diagram Proba10.zcos
[a, pathlib] = libraryinfo("computing_experimentlib");
   clear a;
   pathlib = strncpy(pathlib, length(pathlib) - length('macros')) + 'xcos';

   //Filter identification functions
   function [parametrs]=IdentificationDynamicFilterFunction1(time, value)
       parametrs=3.3*max(abs(value));
   endfunction
   function [parametrs]=IdentificationDynamicFilterFunction2(time, value)
       parametrs=9.63*max(abs(value));
   endfunction

   //Array of filter identification functions
   IdentificationDynamicFiltersFunctions = cell(1, 2);
   IdentificationDynamicFiltersFunctions{1} = IdentificationDynamicFilterFunction1;
   IdentificationDynamicFiltersFunctions{2} = IdentificationDynamicFilterFunction2;

   //Filter function
   function [parametrs]=DynamicFilterFunction1(time, value)
       parametrs=[sum(time.*value) / length(time), sum((time.^2).*value) / (3*length(time))];
   endfunction
   function [parametr]=DynamicFilterFunction2(time, value)
       parametr=sum(time.*value) / (2*length(time));
   endfunction

   //Array of filter functions
   DynamicFiltersFunctions = cell(1, 3);
   DynamicFiltersFunctions{1} = DynamicFilterFunction1;
   DynamicFiltersFunctions{2} = DynamicFilterFunction2;
   DynamicFiltersFunctions{3} = DynamicFilterFunction1;

   //Diagram file path
   SystemShemaPath = fullfile(pathlib, 'Proba10.zcos');
   SystemIdentificationShemaPath = fullfile(pathlib, 'Proba10iden.zcos');

   //Output characteristics of the system by which we identify the diagram
   SystemIdentificateOutputCharacteristicsNames = ['DY2','DY3'];
   SystemIdentificateOutputCharacteristicsIndexes = [1,1];

   //System output characteristics
   SystemOutputCharacteristicsNames = ['Y1','Y2','Y3'];
   SystemOutputCharacteristicsIndexes = [1,1,1];

   //Functions for calculating control dynamics
   function [sCurYs]=CurYsToString(CurYs)
       sCurYs = '[' + strcat(string(CurYs),',') + ']';
   endfunction
   function [CurY2s]=fCurY2s(A1, A2, B1, B2, C, Alpha1, Alpha2, CurTs)
       CurY2s = CurYsToString(C*(CurTs .^ 3) + B2*log(1 + Alpha1*CurTs) + A1);
   endfunction
   function [CurY3s]=fCurY3s(A1, A2, B1, B2, C, Alpha1, Alpha2, CurTs)
       CurY3s = CurYsToString(0.5*A1 + 10*A2*log(1 + Alpha2*CurTs) + B1*(CurTs .^ 2) + 10*B2);
   endfunction

   //Reference parameter values
   A1et = 5.7;
   A2et = 4.5;
   B1et = 0.3;
   B2et = 2.7;
   Cet = 0.63;

   //Parameter values by which we identify the system
   T = 10;//Simulation time
   CurTs = [0:(T/(10^2)):T];//The current moments of time at which we take the values
   CurY2_1s = fCurY2s(A1et,A2et,B1et,B2et,Cet,1.05,0.0,CurTs);
   CurY3_1s = fCurY3s(A1et,A2et,B1et,B2et,Cet,1.05,0.0,CurTs);
   CurY2_2s = fCurY2s(A1et,A2et,B1et,B2et,Cet,1.05,1.23,CurTs);
   CurY3_2s = fCurY3s(A1et,A2et,B1et,B2et,Cet,1.05,1.23,CurTs);

   //Parameters of control modes of the system
   SystemIdentificateModesParametersNames = ['CurY2s','CurY3s','Alpha2'];//Parameter names
   SystemIdentificateModesParametersValues = [CurY2_1s,CurY3_1s, '0.0';..
                                              CurY2_2s,CurY3_2s,'1.23'];//Parameter values

   //Parameters of system operation modes
   SystemModesParametersNames = ['Omega1','Lambda1','Omega2','Omega3','Lambda2','Alpha2','Beta'];//Parameter names
   SystemModesParametersValues = [ 1.29,0.21, 0.09, 1.5,0.369,1.83,6.123;..
                                  1.323,0.27, 0.15,1.83,0.339,1.23,6.153;..
                                   1.29,0.33,0.063,1.23,0.699, 1.5,3.183];//Parameter values

   //Identifiable system parameters
   SystemIdentificationParametersNames = ['A1','A2','B1','B2','C'];//Parameter names
   SystemIdentificationParametersMinValues = [5.1,4.23,0.15,2.43,0.57];//Minimum parameter values
   SystemIdentificationParametersMaxValues = [6.3,4.83,0.75,3.03,0.69];//Maximum parameter values

   //Identification function
   function [parameters]=IdentificationFunction(fSys, MinValues, MaxValues)
       //Generating random parameter values
       MinValues = repmat(MinValues,[10,1]);
       MaxValues = repmat(MaxValues,[10,1]);
       parameters = MinValues + (MaxValues - MinValues) .* rand(MinValues);
       
       //We get residuals
       errs = fSys(parameters);
       
       //Summarizing residuals
       errs = sum(errs,1);
       errs = sum(errs,2);
       errs = matrix(errs,1,-1);
       
       //Choose the minimum residual
       [MinErrs, indMinErrs] = min(errs);
       
       //We take the appropriate parameters
       parameters = parameters(indMinErrs,:);
   endfunction

   //Run the basic function
   [SystemOutputChatacteristics,..//System output characteristics
    SystemIdentificationParametersValues,..//Values of identified system parameters
    SystemModesParametersIndexes,..//Indices of system parameters that determine its modes
    SystemModesParametersValues,..//Values of system parameters that determine its modes
    TimesMomemts..//Moments in time
    ]=ModelingSystemIdentificationDynamic(SystemIdentificationShemaPath,..//System identification scheme or system identification scheme file name
                                          SystemIdentificateOutputCharacteristicsNames,..//Names of output characteristics of the system by which identification is carried out (by deviations of these values from the corresponding experimental values)
                                          SystemIdentificateOutputCharacteristicsIndexes,..//Indices of system output characteristics (in names), by which identification is carried out (by deviations of these values from the corresponding experimental values)
                                          IdentificationDynamicFiltersFunctions,..//The compression function of the dynamics of the output characteristics of the system, by which the identification is carried out (by deviations of these values from the corresponding experimental values)
                                          SystemIdentificateModesParametersNames,..//Names of system parameters that determine its control modes
                                          SystemIdentificateModesParametersValues,..//Values of system parameters that determine its control modes
                                          SystemIdentificationParametersNames,..//Names of identifiable system parameters
                                          SystemIdentificationParametersMinValues,..//Minimum values of identifiable system parameters
                                          SystemIdentificationParametersMaxValues,..//Maximum values of identifiable system parameters
                                          IdentificationFunction,..//Identification function
                                          SystemShemaPath,..//System schema or system schema filename
                                          SystemOutputCharacteristicsNames,..//System output characteristic names
                                          SystemOutputCharacteristicsIndexes,..//System output indexes (in names)
                                          "Evidence",DynamicFiltersFunctions,..//Speaker Compression Features
                                          SystemModesParametersNames,..//Names of system parameters that determine its modes
                                          SystemModesParametersValues..//Values of system parameters that determine its modes
                                          );

   //Result
   disp(SystemOutputChatacteristics);
   disp(SystemIdentificationParametersValues);

Examples

//Forming the path to the xcos-diagram Proba10.zcos
[a, pathlib] = libraryinfo("computing_experimentlib");
   clear a;
   pathlib = strncpy(pathlib, length(pathlib) - length('macros')) + 'xcos';

   //Filter identification functions
   function [parametrs]=IdentificationDynamicFilterFunction1(time, value)
       parametrs=3.3*max(abs(value));
   endfunction
   function [parametrs]=IdentificationDynamicFilterFunction2(time, value)
       parametrs=9.63*max(abs(value));
   endfunction

   //Array of filter identification functions
   IdentificationDynamicFiltersFunctions = cell(1, 2);
   IdentificationDynamicFiltersFunctions{1} = IdentificationDynamicFilterFunction1;
   IdentificationDynamicFiltersFunctions{2} = IdentificationDynamicFilterFunction2;

   //Moments in time
   TimeMoments = cell(1, 3);
TimeMoments{1} = [0.0:0.05:9.95]';
TimeMoments{2} = [0.0:0.1:9.9]';
TimeMoments{3} = [0.0:0.2:9.8]';

   //Diagram file path
   SystemShemaPath = fullfile(pathlib, 'Proba10.zcos');
   SystemIdentificationShemaPath = fullfile(pathlib, 'Proba10iden.zcos');

   //Chart hyperparameters
   Alpha1 = 1.05;
   SystemHyperParametrsNames = ['Alpha1'];//Names of hyperparameters that determine dynamics
   SystemHyperParametrsValues = [Alpha1];//Values of hyperparameters that determine the dynamics

   //Output characteristics of the system by which we identify the diagram
   SystemIdentificateOutputCharacteristicsNames = ['DY2','DY3'];
   SystemIdentificateOutputCharacteristicsIndexes = [1,1];

   //System output characteristics
   SystemOutputCharacteristicsNames = ['Y1','Y2','Y3'];
   SystemOutputCharacteristicsIndexes = [1,1,1];

   //Functions for calculating control dynamics
   function [sCurYs]=CurYsToString(CurYs)
       sCurYs = '[' + strcat(string(CurYs),',') + ']';
   endfunction
   function [CurY2s]=fCurY2s(A1, A2, B1, B2, C, Alpha1, Alpha2, CurTs)
       CurY2s = CurYsToString(C*(CurTs .^ 3) + B2*log(1 + Alpha1*CurTs) + A1);
   endfunction
   function [CurY3s]=fCurY3s(A1, A2, B1, B2, C, Alpha1, Alpha2, CurTs)
       CurY3s = CurYsToString(0.5*A1 + 10*A2*log(1 + Alpha2*CurTs) + B1*(CurTs .^ 2) + 10*B2);
   endfunction

   //Reference parameter values
   A1et = 5.7;
   A2et = 4.5;
   B1et = 0.3;
   B2et = 2.7;
   Cet = 0.63;

   //Parameter values by which we identify the system
   T = 10;//Simulation time
   CurTs = [0:(T/(10^2)):T];//The current moments of time at which we take the values
   CurY2_1s = fCurY2s(A1et,A2et,B1et,B2et,Cet,Alpha1,0.0,CurTs);
   CurY3_1s = fCurY3s(A1et,A2et,B1et,B2et,Cet,Alpha1,0.0,CurTs);
   CurY2_2s = fCurY2s(A1et,A2et,B1et,B2et,Cet,Alpha1,1.23,CurTs);
   CurY3_2s = fCurY3s(A1et,A2et,B1et,B2et,Cet,Alpha1,1.23,CurTs);

   //Parameters of control modes of the system
   SystemIdentificateModesParametersNames = ['CurY2s','CurY3s','Alpha2'];//Parameter names
   SystemIdentificateModesParametersValues = [CurY2_1s,CurY3_1s, '0.0';..
                                              CurY2_2s,CurY3_2s,'1.23'];//Parameter values

   //Parameters of system operation modes
   SystemModesParametersNames = ['Omega1','Lambda1','Omega2','Omega3','Lambda2','Alpha2','Beta'];//Parameter names
   SystemModesParametersValues = [ 1.29,0.21, 0.09, 1.5,0.369,1.83,6.123;..
                                  1.323,0.27, 0.15,1.83,0.339,1.23,6.153;..
                                   1.29,0.33,0.063,1.23,0.699, 1.5,3.183];//Parameter values

   //Identifiable system parameters
   SystemIdentificationParametersNames = ['A1','A2','B1','B2','C'];//Parameter names
   SystemIdentificationParametersMinValues = [5.1,4.23,0.15,2.43,0.57];//Minimum parameter values
   SystemIdentificationParametersMaxValues = [6.3,4.83,0.75,3.03,0.69];//Maximum parameter values

   //Identification function
   function [parameters]=IdentificationFunction(fSys, MinValues, MaxValues)
       //Generating random parameter values
       MinValues = repmat(MinValues,[10,1]);
       MaxValues = repmat(MaxValues,[10,1]);
       parameters = MinValues + (MaxValues - MinValues) .* rand(MinValues);
       
       //We get residuals
       errs = fSys(parameters);
       
       //Summarizing residuals
       errs = sum(errs,1);
       errs = sum(errs,2);
       errs = matrix(errs,1,-1);
       
       //Choose the minimum residual
       [MinErrs, indMinErrs] = min(errs);
       
       //We take the appropriate parameters
       parameters = parameters(indMinErrs,:);
   endfunction

   //Run the basic function
   [SystemOutputChatacteristics,..//System output characteristics
    SystemIdentificationParametersValues,..//Values of identified system parameters
    SystemModesParametersIndexes,..//Indices of system parameters that determine its modes
    SystemModesParametersValues,..//Values of system parameters that determine its modes
    TimesMomemts..//Moments in time
    ]=ModelingSystemIdentificationDynamic(SystemIdentificationShemaPath,..//System identification scheme or system identification scheme file name
                                          SystemIdentificateOutputCharacteristicsNames,..//Names of output characteristics of the system by which identification is carried out (by deviations of these values from the corresponding experimental values)
                                          SystemIdentificateOutputCharacteristicsIndexes,..//Indices of system output characteristics (in names), by which identification is carried out (by deviations of these values from the corresponding experimental values)
                                          IdentificationDynamicFiltersFunctions,..//The compression function of the dynamics of the output characteristics of the system, by which the identification is carried out (by deviations of these values from the corresponding experimental values)
                                          SystemIdentificateModesParametersNames,..//Names of system parameters that determine its control modes
                                          SystemIdentificateModesParametersValues,..//Values of system parameters that determine its control modes
                                          SystemIdentificationParametersNames,..//Names of identifiable system parameters
                                          SystemIdentificationParametersMinValues,..//Minimum values of identifiable system parameters
                                          SystemIdentificationParametersMaxValues,..//Maximum values of identifiable system parameters
                                          IdentificationFunction,..//Identification function
                                          SystemShemaPath,..//System schema or system schema filename
                                          SystemOutputCharacteristicsNames,..//System output characteristic names
                                          SystemOutputCharacteristicsIndexes,..//System output indexes (in names)
                                          "TimeGrid",TimeMoments,..//Moments in time
                                          SystemModesParametersNames,..//Names of system parameters that determine its modes
                                          SystemModesParametersValues,..//Values of system parameters that determine its modes
                                          SystemHyperParametrsNames,..//Names of hyperparameters that determine dynamics
                                          SystemHyperParametrsValues,..//Values of hyperparameters that determine the dynamics
                                          [0.5E-6,0.51E-6],..//Maximum Absolute Error Value for System Identification Modes
                                          [0.5E-6,0.51E-6,0.57E-6],..//Maximum value of absolute error
                                          [0.69E-6,0.57E-6],..//Minimum Relative Error Value for System Identification Modes
                                          [0.69E-6,0.57E-6,0.75E-6],..//Minimum Relative Error
                                          [10.0,11.1],..//Simulation time for system identification modes
                                          [10.0,11.1,15.3],..//Simulation time
                                          [0.93E-4,0.87E-4],..//Maximum time interval for system identification modes
                                          [0.93E-4,0.87E-4,0.81E-4],..//Maximum time step of integration
                                          [0,3],..//Solver for system identification modes
                                          [0,3,4],..//Solver
                                          [2.1E-10,1.5E-10],..//Maximum time error for system identification modes
                                          [2.1E-10,1.5E-10,1.23E-10]..//Maximum time error
                                          );

   //Result
   disp(SystemOutputChatacteristics);
   disp(SystemIdentificationParametersValues);
//Forming the path to the xcos-diagram Proba10.zcos
[a, pathlib] = libraryinfo("computing_experimentlib");
   clear a;
   pathlib = strncpy(pathlib, length(pathlib) - length('macros')) + 'xcos';

   //Filter identification functions
   function [parametrs]=IdentificationDynamicFilterFunction1(time, value)
       parametrs=3.3*max(abs(value));
   endfunction
   function [parametrs]=IdentificationDynamicFilterFunction2(time, value)
       parametrs=9.63*max(abs(value));
   endfunction

   //Array of filter identification functions
   IdentificationDynamicFiltersFunctions = cell(1, 2);
   IdentificationDynamicFiltersFunctions{1} = IdentificationDynamicFilterFunction1;
   IdentificationDynamicFiltersFunctions{2} = IdentificationDynamicFilterFunction2;

   //Moments in time
   TimeMoments = cell(1, 3);
TimeMoments{1} = [0.0:0.05:9.95]';
TimeMoments{2} = [0.0:0.1:9.9]';
TimeMoments{3} = [0.0:0.2:9.8]';

   //Diagram file path
   SystemShemaPath = fullfile(pathlib, 'Proba10.zcos');
   SystemIdentificationShemaPath = fullfile(pathlib, 'Proba10iden.zcos');

   //Output characteristics of the system by which we identify the diagram
   SystemIdentificateOutputCharacteristicsNames = ['DY2','DY3'];
   SystemIdentificateOutputCharacteristicsIndexes = [1,1];

   //System output characteristics
   SystemOutputCharacteristicsNames = ['Y1','Y2','Y3'];
   SystemOutputCharacteristicsIndexes = [1,1,1];

   //Functions for calculating control dynamics
   function [sCurYs]=CurYsToString(CurYs)
       sCurYs = '[' + strcat(string(CurYs),',') + ']';
   endfunction
   function [CurY2s]=fCurY2s(A1, A2, B1, B2, C, Alpha1, Alpha2, CurTs)
       CurY2s = CurYsToString(C*(CurTs .^ 3) + B2*log(1 + Alpha1*CurTs) + A1);
   endfunction
   function [CurY3s]=fCurY3s(A1, A2, B1, B2, C, Alpha1, Alpha2, CurTs)
       CurY3s = CurYsToString(0.5*A1 + 10*A2*log(1 + Alpha2*CurTs) + B1*(CurTs .^ 2) + 10*B2);
   endfunction

   //Reference parameter values
   A1et = 5.7;
   A2et = 4.5;
   B1et = 0.3;
   B2et = 2.7;
   Cet = 0.63;

   //Parameter values by which we identify the system
   T = 10;//Simulation time
   CurTs = [0:(T/(10^2)):T];//The current moments of time at which we take the values
   CurY2_1s = fCurY2s(A1et,A2et,B1et,B2et,Cet,1.05,0.0,CurTs);
   CurY3_1s = fCurY3s(A1et,A2et,B1et,B2et,Cet,1.05,0.0,CurTs);
   CurY2_2s = fCurY2s(A1et,A2et,B1et,B2et,Cet,1.05,1.23,CurTs);
   CurY3_2s = fCurY3s(A1et,A2et,B1et,B2et,Cet,1.05,1.23,CurTs);

   //Parameters of control modes of the system
   SystemIdentificateModesParametersNames = ['CurY2s','CurY3s','Alpha2'];//Parameter names
   SystemIdentificateModesParametersValues = [CurY2_1s,CurY3_1s, '0.0';..
                                              CurY2_2s,CurY3_2s,'1.23'];//Parameter values

   //Parameters of system operation modes
   SystemModesParametersNames = ['Omega1','Lambda1','Omega2','Omega3','Lambda2','Alpha2','Beta'];//Parameter names
   SystemModesParametersValues = [ 1.29,0.21, 0.09, 1.5,0.369,1.83,6.123;..
                                  1.323,0.27, 0.15,1.83,0.339,1.23,6.153;..
                                   1.29,0.33,0.063,1.23,0.699, 1.5,3.183];//Parameter values

   //Identifiable system parameters
   SystemIdentificationParametersNames = ['A1','A2','B1','B2','C'];//Parameter names
   SystemIdentificationParametersMinValues = [5.1,4.23,0.15,2.43,0.57];//Minimum parameter values
   SystemIdentificationParametersMaxValues = [6.3,4.83,0.75,3.03,0.69];//Maximum parameter values

   //Identification function
   function [parameters]=IdentificationFunction(fSys, MinValues, MaxValues)
       //Generating random parameter values
       MinValues = repmat(MinValues,[10,1]);
       MaxValues = repmat(MaxValues,[10,1]);
       parameters = MinValues + (MaxValues - MinValues) .* rand(MinValues);
       
       //We get residuals
       errs = fSys(parameters);
       
       //Summarizing residuals
       errs = sum(errs,1);
       errs = sum(errs,2);
       errs = matrix(errs,1,-1);
       
       //Choose the minimum residual
       [MinErrs, indMinErrs] = min(errs);
       
       //We take the appropriate parameters
       parameters = parameters(indMinErrs,:);
   endfunction

   //Run the basic function
   [SystemOutputChatacteristics,..//System output characteristics
    SystemIdentificationParametersValues,..//Values of identified system parameters
    SystemModesParametersIndexes,..//Indices of system parameters that determine its modes
    SystemModesParametersValues,..//Values of system parameters that determine its modes
    TimesMomemts..//Moments in time
    ]=ModelingSystemIdentificationDynamic(SystemIdentificationShemaPath,..//System identification scheme or system identification scheme file name
                                          SystemIdentificateOutputCharacteristicsNames,..//Names of output characteristics of the system by which identification is carried out (by deviations of these values from the corresponding experimental values)
                                          SystemIdentificateOutputCharacteristicsIndexes,..//Indices of system output characteristics (in names), by which identification is carried out (by deviations of these values from the corresponding experimental values)
                                          IdentificationDynamicFiltersFunctions,..//The compression function of the dynamics of the output characteristics of the system, by which the identification is carried out (by deviations of these values from the corresponding experimental values)
                                          SystemIdentificateModesParametersNames,..//Names of system parameters that determine its control modes
                                          SystemIdentificateModesParametersValues,..//Values of system parameters that determine its control modes
                                          SystemIdentificationParametersNames,..//Names of identifiable system parameters
                                          SystemIdentificationParametersMinValues,..//Minimum values of identifiable system parameters
                                          SystemIdentificationParametersMaxValues,..//Maximum values of identifiable system parameters
                                          IdentificationFunction,..//Identification function
                                          SystemShemaPath,..//System schema or system schema filename
                                          SystemOutputCharacteristicsNames,..//System output characteristic names
                                          SystemOutputCharacteristicsIndexes,..//System output indexes (in names)
                                          "TimeGrid",TimeMoments,..//Moments in time
                                          SystemModesParametersNames,..//Names of system parameters that determine its modes
                                          SystemModesParametersValues,..//Values of system parameters that determine its modes
                                          [0.5E-6,0.51E-6],..//Maximum Absolute Error Value for System Identification Modes
                                          [0.5E-6,0.51E-6,0.57E-6],..//Maximum value of absolute error
                                          [0.69E-6,0.57E-6],..//Minimum Relative Error Value for System Identification Modes
                                          [0.69E-6,0.57E-6,0.75E-6],..//Minimum Relative Error
                                          [10.0,11.1],..//Simulation time for system identification modes
                                          [10.0,11.1,15.3],..//Simulation time
                                          [0.93E-4,0.87E-4],..//Maximum time interval for system identification modes
                                          [0.93E-4,0.87E-4,0.81E-4],..//Maximum time step of integration
                                          [0,3],..//Solver for system identification modes
                                          [0,3,4],..//Solver
                                          [2.1E-10,1.5E-10],..//Maximum time error for system identification modes
                                          [2.1E-10,1.5E-10,1.23E-10]..//Maximum time error
                                          );

   //Result
   disp(SystemOutputChatacteristics);
   disp(SystemIdentificationParametersValues);
//Forming the path to the xcos-diagram Proba10.zcos
[a, pathlib] = libraryinfo("computing_experimentlib");
   clear a;
   pathlib = strncpy(pathlib, length(pathlib) - length('macros')) + 'xcos';

   //Filter identification functions
   function [parametrs]=IdentificationDynamicFilterFunction1(time, value)
       parametrs=3.3*max(abs(value));
   endfunction
   function [parametrs]=IdentificationDynamicFilterFunction2(time, value)
       parametrs=9.63*max(abs(value));
   endfunction

   //Array of filter identification functions
   IdentificationDynamicFiltersFunctions = cell(1, 2);
   IdentificationDynamicFiltersFunctions{1} = IdentificationDynamicFilterFunction1;
   IdentificationDynamicFiltersFunctions{2} = IdentificationDynamicFilterFunction2;

   //Moments in time
   TimeMoments = cell(1, 3);
TimeMoments{1} = [0.0:0.05:9.95]';
TimeMoments{2} = [0.0:0.1:9.9]';
TimeMoments{3} = [0.0:0.2:9.8]';

   //Diagram file path
   SystemShemaPath = fullfile(pathlib, 'Proba10.zcos');
   SystemIdentificationShemaPath = fullfile(pathlib, 'Proba10iden.zcos');

   //Chart hyperparameters
   Alpha1 = 1.05;
   SystemHyperParametrsNames = ['Alpha1'];//Names of hyperparameters that determine dynamics
   SystemHyperParametrsValues = [Alpha1];//Values of hyperparameters that determine the dynamics

   //Output characteristics of the system by which we identify the diagram
   SystemIdentificateOutputCharacteristicsNames = ['DY2','DY3'];
   SystemIdentificateOutputCharacteristicsIndexes = [1,1];

   //System output characteristics
   SystemOutputCharacteristicsNames = ['Y1','Y2','Y3'];
   SystemOutputCharacteristicsIndexes = [1,1,1];

   //Functions for calculating control dynamics
   function [sCurYs]=CurYsToString(CurYs)
       sCurYs = '[' + strcat(string(CurYs),',') + ']';
   endfunction
   function [CurY2s]=fCurY2s(A1, A2, B1, B2, C, Alpha1, Alpha2, CurTs)
       CurY2s = CurYsToString(C*(CurTs .^ 3) + B2*log(1 + Alpha1*CurTs) + A1);
   endfunction
   function [CurY3s]=fCurY3s(A1, A2, B1, B2, C, Alpha1, Alpha2, CurTs)
       CurY3s = CurYsToString(0.5*A1 + 10*A2*log(1 + Alpha2*CurTs) + B1*(CurTs .^ 2) + 10*B2);
   endfunction

   //Reference parameter values
   A1et = 5.7;
   A2et = 4.5;
   B1et = 0.3;
   B2et = 2.7;
   Cet = 0.63;

   //Parameter values by which we identify the system
   T = 10;//Simulation time
   CurTs = [0:(T/(10^2)):T];//The current moments of time at which we take the values
   CurY2_1s = fCurY2s(A1et,A2et,B1et,B2et,Cet,Alpha1,0.0,CurTs);
   CurY3_1s = fCurY3s(A1et,A2et,B1et,B2et,Cet,Alpha1,0.0,CurTs);
   CurY2_2s = fCurY2s(A1et,A2et,B1et,B2et,Cet,Alpha1,1.23,CurTs);
   CurY3_2s = fCurY3s(A1et,A2et,B1et,B2et,Cet,Alpha1,1.23,CurTs);

   //Parameters of control modes of the system
   SystemIdentificateModesParametersNames = ['CurY2s','CurY3s','Alpha2'];//Parameter names
   SystemIdentificateModesParametersValues = [CurY2_1s,CurY3_1s, '0.0';..
                                              CurY2_2s,CurY3_2s,'1.23'];//Parameter values

   //Parameters of system operation modes
   SystemModesParametersNames = ['Omega1','Lambda1','Omega2','Omega3','Lambda2','Alpha2','Beta'];//Parameter names
   SystemModesParametersValues = [ 1.29,0.21, 0.09, 1.5,0.369,1.83,6.123;..
                                  1.323,0.27, 0.15,1.83,0.339,1.23,6.153;..
                                   1.29,0.33,0.063,1.23,0.699, 1.5,3.183];//Parameter values

   //Identifiable system parameters
   SystemIdentificationParametersNames = ['A1','A2','B1','B2','C'];//Parameter names
   SystemIdentificationParametersMinValues = [5.1,4.23,0.15,2.43,0.57];//Minimum parameter values
   SystemIdentificationParametersMaxValues = [6.3,4.83,0.75,3.03,0.69];//Maximum parameter values

   //Identification function
   function [parameters]=IdentificationFunction(fSys, MinValues, MaxValues)
       //Generating random parameter values
       MinValues = repmat(MinValues,[10,1]);
       MaxValues = repmat(MaxValues,[10,1]);
       parameters = MinValues + (MaxValues - MinValues) .* rand(MinValues);
       
       //We get residuals
       errs = fSys(parameters);
       
       //Summarizing residuals
       errs = sum(errs,1);
       errs = sum(errs,2);
       errs = matrix(errs,1,-1);
       
       //Choose the minimum residual
       [MinErrs, indMinErrs] = min(errs);
       
       //We take the appropriate parameters
       parameters = parameters(indMinErrs,:);
   endfunction

   //Run the basic function
   [SystemOutputChatacteristics,..//System output characteristics
    SystemIdentificationParametersValues,..//Values of identified system parameters
    SystemModesParametersIndexes,..//Indices of system parameters that determine its modes
    SystemModesParametersValues,..//Values of system parameters that determine its modes
    TimesMomemts..//Moments in time
    ]=ModelingSystemIdentificationDynamic(SystemIdentificationShemaPath,..//System identification scheme or system identification scheme file name
                                          SystemIdentificateOutputCharacteristicsNames,..//Names of output characteristics of the system by which identification is carried out (by deviations of these values from the corresponding experimental values)
                                          SystemIdentificateOutputCharacteristicsIndexes,..//Indices of system output characteristics (in names), by which identification is carried out (by deviations of these values from the corresponding experimental values)
                                          IdentificationDynamicFiltersFunctions,..//The compression function of the dynamics of the output characteristics of the system, by which the identification is carried out (by deviations of these values from the corresponding experimental values)
                                          SystemIdentificateModesParametersNames,..//Names of system parameters that determine its control modes
                                          SystemIdentificateModesParametersValues,..//Values of system parameters that determine its control modes
                                          SystemIdentificationParametersNames,..//Names of identifiable system parameters
                                          SystemIdentificationParametersMinValues,..//Minimum values of identifiable system parameters
                                          SystemIdentificationParametersMaxValues,..//Maximum values of identifiable system parameters
                                          IdentificationFunction,..//Identification function
                                          SystemShemaPath,..//System schema or system schema filename
                                          SystemOutputCharacteristicsNames,..//System output characteristic names
                                          SystemOutputCharacteristicsIndexes,..//System output indexes (in names)
                                          "TimeGrid",TimeMoments,..//Moments in time
                                          SystemModesParametersNames,..//Names of system parameters that determine its modes
                                          SystemModesParametersValues,..//Values of system parameters that determine its modes
                                          SystemHyperParametrsNames,..//Names of hyperparameters that determine dynamics
                                          SystemHyperParametrsValues..//Values of hyperparameters that determine the dynamics
                                          );

   //Result
   disp(SystemOutputChatacteristics);
   disp(SystemIdentificationParametersValues);
//Forming the path to the xcos-diagram Proba10.zcos
[a, pathlib] = libraryinfo("computing_experimentlib");
   clear a;
   pathlib = strncpy(pathlib, length(pathlib) - length('macros')) + 'xcos';

   //Filter identification functions
   function [parametrs]=IdentificationDynamicFilterFunction1(time, value)
       parametrs=3.3*max(abs(value));
   endfunction
   function [parametrs]=IdentificationDynamicFilterFunction2(time, value)
       parametrs=9.63*max(abs(value));
   endfunction

   //Array of filter identification functions
   IdentificationDynamicFiltersFunctions = cell(1, 2);
   IdentificationDynamicFiltersFunctions{1} = IdentificationDynamicFilterFunction1;
   IdentificationDynamicFiltersFunctions{2} = IdentificationDynamicFilterFunction2;

   //Moments in time
   TimeMoments = cell(1, 3);
TimeMoments{1} = [0.0:0.05:9.95]';
TimeMoments{2} = [0.0:0.1:9.9]';
TimeMoments{3} = [0.0:0.2:9.8]';

   //Diagram file path
   SystemShemaPath = fullfile(pathlib, 'Proba10.zcos');
   SystemIdentificationShemaPath = fullfile(pathlib, 'Proba10iden.zcos');

   //Output characteristics of the system by which we identify the diagram
   SystemIdentificateOutputCharacteristicsNames = ['DY2','DY3'];
   SystemIdentificateOutputCharacteristicsIndexes = [1,1];

   //System output characteristics
   SystemOutputCharacteristicsNames = ['Y1','Y2','Y3'];
   SystemOutputCharacteristicsIndexes = [1,1,1];

   //Functions for calculating control dynamics
   function [sCurYs]=CurYsToString(CurYs)
       sCurYs = '[' + strcat(string(CurYs),',') + ']';
   endfunction
   function [CurY2s]=fCurY2s(A1, A2, B1, B2, C, Alpha1, Alpha2, CurTs)
       CurY2s = CurYsToString(C*(CurTs .^ 3) + B2*log(1 + Alpha1*CurTs) + A1);
   endfunction
   function [CurY3s]=fCurY3s(A1, A2, B1, B2, C, Alpha1, Alpha2, CurTs)
       CurY3s = CurYsToString(0.5*A1 + 10*A2*log(1 + Alpha2*CurTs) + B1*(CurTs .^ 2) + 10*B2);
   endfunction

   //Reference parameter values
   A1et = 5.7;
   A2et = 4.5;
   B1et = 0.3;
   B2et = 2.7;
   Cet = 0.63;

   //Parameter values by which we identify the system
   T = 10;//Simulation time
   CurTs = [0:(T/(10^2)):T];//The current moments of time at which we take the values
   CurY2_1s = fCurY2s(A1et,A2et,B1et,B2et,Cet,1.05,0.0,CurTs);
   CurY3_1s = fCurY3s(A1et,A2et,B1et,B2et,Cet,1.05,0.0,CurTs);
   CurY2_2s = fCurY2s(A1et,A2et,B1et,B2et,Cet,1.05,1.23,CurTs);
   CurY3_2s = fCurY3s(A1et,A2et,B1et,B2et,Cet,1.05,1.23,CurTs);

   //Parameters of control modes of the system
   SystemIdentificateModesParametersNames = ['CurY2s','CurY3s','Alpha2'];//Parameter names
   SystemIdentificateModesParametersValues = [CurY2_1s,CurY3_1s, '0.0';..
                                              CurY2_2s,CurY3_2s,'1.23'];//Parameter values

   //Parameters of system operation modes
   SystemModesParametersNames = ['Omega1','Lambda1','Omega2','Omega3','Lambda2','Alpha2','Beta'];//Parameter names
   SystemModesParametersValues = [ 1.29,0.21, 0.09, 1.5,0.369,1.83,6.123;..
                                  1.323,0.27, 0.15,1.83,0.339,1.23,6.153;..
                                   1.29,0.33,0.063,1.23,0.699, 1.5,3.183];//Parameter values

   //Identifiable system parameters
   SystemIdentificationParametersNames = ['A1','A2','B1','B2','C'];//Parameter names
   SystemIdentificationParametersMinValues = [5.1,4.23,0.15,2.43,0.57];//Minimum parameter values
   SystemIdentificationParametersMaxValues = [6.3,4.83,0.75,3.03,0.69];//Maximum parameter values

   //Identification function
   function [parameters]=IdentificationFunction(fSys, MinValues, MaxValues)
       //Generating random parameter values
       MinValues = repmat(MinValues,[10,1]);
       MaxValues = repmat(MaxValues,[10,1]);
       parameters = MinValues + (MaxValues - MinValues) .* rand(MinValues);
       
       //We get residuals
       errs = fSys(parameters);
       
       //Summarizing residuals
       errs = sum(errs,1);
       errs = sum(errs,2);
       errs = matrix(errs,1,-1);
       
       //Choose the minimum residual
       [MinErrs, indMinErrs] = min(errs);
       
       //We take the appropriate parameters
       parameters = parameters(indMinErrs,:);
   endfunction

   //Run the basic function
   [SystemOutputChatacteristics,..//System output characteristics
    SystemIdentificationParametersValues,..//Values of identified system parameters
    SystemModesParametersIndexes,..//Indices of system parameters that determine its modes
    SystemModesParametersValues,..//Values of system parameters that determine its modes
    TimesMomemts..//Moments in time
    ]=ModelingSystemIdentificationDynamic(SystemIdentificationShemaPath,..//System identification scheme or system identification scheme file name
                                          SystemIdentificateOutputCharacteristicsNames,..//Names of output characteristics of the system by which identification is carried out (by deviations of these values from the corresponding experimental values)
                                          SystemIdentificateOutputCharacteristicsIndexes,..//Indices of system output characteristics (in names), by which identification is carried out (by deviations of these values from the corresponding experimental values)
                                          IdentificationDynamicFiltersFunctions,..//The compression function of the dynamics of the output characteristics of the system, by which the identification is carried out (by deviations of these values from the corresponding experimental values)
                                          SystemIdentificateModesParametersNames,..//Names of system parameters that determine its control modes
                                          SystemIdentificateModesParametersValues,..//Values of system parameters that determine its control modes
                                          SystemIdentificationParametersNames,..//Names of identifiable system parameters
                                          SystemIdentificationParametersMinValues,..//Minimum values of identifiable system parameters
                                          SystemIdentificationParametersMaxValues,..//Maximum values of identifiable system parameters
                                          IdentificationFunction,..//Identification function
                                          SystemShemaPath,..//System schema or system schema filename
                                          SystemOutputCharacteristicsNames,..//System output characteristic names
                                          SystemOutputCharacteristicsIndexes,..//System output indexes (in names)
                                          "TimeGrid",TimeMoments,..//Moments in time
                                          SystemModesParametersNames,..//Names of system parameters that determine its modes
                                          SystemModesParametersValues..//Values of system parameters that determine its modes
                                          );

   //Result
   disp(SystemOutputChatacteristics);
   disp(SystemIdentificationParametersValues);

See also


Report an issue
<< ModelingSystemDynamicTimeGrid computing_experiment SetDiagramParameters >>