Linear ODE (greybox model) with identifiable parameters
sys = idgrey(odefun,parameters,fcn_type)
sys = idgrey(odefun,parameters,fcn_type,optional_args)
sys = idgrey(odefun,parameters,fcn_type,optional_args,Ts)
sys = idgrey(odefun,parameters,fcn_type,optional_args,Ts,Name,Value)
creates
a linear greybox model with identifiable parameters, sys
= idgrey(odefun
,parameters
,fcn_type
)sys
. odefun
specifies
the userdefined function that relates the model parameters, parameters
,
to its statespace representation.
creates
a linear greybox model with identifiable parameters using the optional
arguments required by sys
= idgrey(odefun
,parameters
,fcn_type
,optional_args
)odefun
.
creates
a linear greybox model with identifiable parameters with the specified
sample time, sys
= idgrey(odefun
,parameters
,fcn_type
,optional_args
,Ts
)Ts
.
creates
a linear greybox model with identifiable parameters with additional
options specified by one or more sys
= idgrey(odefun
,parameters
,fcn_type
,optional_args
,Ts
,Name,Value
)Name,Value
pair
arguments.
An idgrey
model represents a system as
a continuoustime or discretetime statespace model with identifiable
(estimable) coefficients.
A statespace model of a system with input vector, u, output vector, y, and disturbance, e, takes the following form in continuous time:
$$\begin{array}{l}\dot{x}(t)=Ax(t)+Bu(t)+Ke(t)\\ y(t)=Cx(t)+Du(t)+e(t)\end{array}$$
In discrete time, the statespace model takes the form:
$$\begin{array}{l}x[k+1]=Ax[k]+Bu[k]+Ke[k]\\ y[k]=Cx[k]+Du[k]+e[k]\end{array}$$
For idgrey
models, the statespace matrices A, B, C,
and D are expressed as a function of userdefined
parameters using a MATLAB^{®} function. You access estimated parameters
using sys.Structures.Parameters
, where sys
is
an idgrey
model.
Use an idgrey
model when you know the system
of equations governing the system dynamics explicitly. You should
be able to express these dynamics in the form of ordinary differential
or difference equations. You specify complex relationships and constraints
among the parameters that cannot be done through structured statespace
models (idss
).
You can create an idgrey
model using the idgrey
command.
To do so, write a MATLAB function that returns the A, B, C,
and D matrices for given values of the estimable
parameters and sample time. The MATLAB function can also return
the K matrix and accept optional input arguments.
The matrices returned may represent a continuoustime or discretetime
model, as indicated by the sample time.
Use the estimating functions pem
or greyest
to
obtain estimated values for the unknown parameters of an idgrey
model.
You can convert an idgrey
model into other
dynamic systems, such as idpoly
, idss
, tf
, ss
etc.
You cannot convert a dynamic system into an idgrey
model.

MATLAB function that relates the model parameters to its statespace representation.
If the function is not on the MATLAB path, then specify the full file name, including the path. The syntax for [A,B,C,D] = odefun(par1,par2,...,parN,Ts,optional_arg1,optional_arg2,...) The function outputs describe the model in the following linear statespace innovations form: $$\begin{array}{c}xn(t)=Ax(t)+Bu(t)+Ke(t);x(0)={x}_{0}\\ y(t)=Cx(t)+Du(t)+e(t)\end{array}$$ In discrete time xn(t)=x(t+Ts) and in continuous time, $$xn(t)=\dot{x}(t)$$.
The disturbance matrix, K, and the initial
state values, x0, are not parametrized. Instead,
these values are determined separately, using the A good choice for achieving the best simulation results is
to set the (Optional) Parameterizing Disturbance: [A,B,C,D,K] = odefun(par1,par2,...,parN,Ts,optional_arg1,optional_arg2,...) If (Optional) Parameterizing Initial State Values: To make the
model initial states, X0, dependent on the model
parameters, use the following syntax for [A,B,C,D,K,X0] = odefun(par1,par2,...,parN,Ts,optional_arg1,optional_arg2,...) If 

Initial values of the parameters required by Specify You may also specify parameter names using an Nby2 cell array, where N is the number of parameters. The first column specifies the names, and the second column specifies the values of the parameters. For example: parameters = {'mass',par1;'stiffness',par2;'damping',par3} 

Indicates whether the model is parameterized in continuoustime, discretetime, or both.


Optional input arguments required by Specify If 

Model sample time. If


Specify optional commaseparated pairs of Use 
idgrey
object properties include:

Values of statespace matrices.
The values 

Value of state disturbance matrix, K
To create an estimation option set for 

State names, specified as one of the following:
Default: 

State units, specified as one of the following:
Use Default: 

Information about the estimable parameters of the


The variance (covariance matrix) of the model innovations, e. An identified model includes a white, Gaussian noise component, e(t). For SISO models, 

Summary report that contains information about the estimation
options and results when the greybox model is obtained using the
The contents of odefun = 'motorDynamics'; m = idgrey(odefun,1,'cd',0.25,0); m.Report.OptionsUsed ans = [] If you obtain the greybox model using estimation commands,
the fields of load(fullfile(matlabroot,'toolbox','ident','iddemos','data','dcmotordata')); data = iddata(y,u,0.1,'Name','DCmotor'); odefun = 'motorDynamics'; init_sys = idgrey('motorDynamics',1,'cd',0.25,0); m = greyest(data,init_sys); m.Report.OptionsUsed InitialState: 'auto' DisturbanceModel: 'auto' Focus: 'prediction' EstCovar: 1 Display: 'off' InputOffset: [] OutputOffset: [] Regularization: [1x1 struct] OutputWeight: [] SearchMethod: 'auto' SearchOption: [1x1 idoptions.search.identsolver] Advanced: [1x1 struct]
For more information on this property and how to use it, see the Output Arguments section of the corresponding estimation command reference page and Estimation Report. 

Input delay for each input channel, specified as a scalar value
or numeric vector. For continuoustime systems, specify input delays
in the time unit stored in the For a system with You can also set Default: 0 

Output delays. For identified systems, like 

Sample time. For continuoustime models, Changing this property does not discretize or resample the model. For 

Units for the time variable, the sample time
Changing this property has no effect on other properties, and
therefore changes the overall system behavior. Use Default: 

Input channel names, specified as one of the following:
Alternatively, use automatic vector expansion to assign input
names for multiinput models. For example, if sys.InputName = 'controls'; The input names automatically expand to When you estimate a model using an You can use the shorthand notation Input channel names have several uses, including:
Default: 

Input channel units, specified as one of the following:
Use Default: 

Input channel groups. The sys.InputGroup.controls = [1 2]; sys.InputGroup.noise = [3 5]; creates input groups named sys(:,'controls') Default: Struct with no fields 

Output channel names, specified as one of the following:
Alternatively, use automatic vector expansion to assign output
names for multioutput models. For example, if sys.OutputName = 'measurements'; The output names automatically expand to When you estimate a model using an You can use the shorthand notation Output channel names have several uses, including:
Default: 

Output channel units, specified as one of the following:
Use Default: 

Output channel groups. The sys.OutputGroup.temperature = [1]; sys.InputGroup.measurement = [3 5]; creates output groups named sys('measurement',:) Default: Struct with no fields 

System name, specified as a character vector. For example, Default: 

Any text that you want to associate with the system, stored as a string or a cell array of
character vectors. The property stores whichever data type you
provide. For instance, if sys1.Notes = "sys1 has a string."; sys2.Notes = 'sys2 has a character vector.'; sys1.Notes sys2.Notes ans = "sys1 has a string." ans = 1×1 cell array {'sys2 has a character vector.'} Default: 

Any type of data you want to associate with system, specified as any MATLAB data type. Default: 

Sampling grid for model arrays, specified as a data structure. For arrays of identified linear (IDLTI) models that are derived by sampling one or more independent variables, this property tracks the variable values associated with each model. This information appears when you display or plot the model array. Use this information to trace results back to the independent variables. Set the field names of the data structure to the names of the sampling variables. Set the field values to the sampled variable values associated with each model in the array. All sampling variables should be numeric and scalar valued, and all arrays of sampled values should match the dimensions of the model array. For example, if you collect data at various operating points of a system, you can identify a model for each operating point separately and then stack the results together into a single system array. You can tag the individual models in the array with information regarding the operating point: nominal_engine_rpm = [1000 5000 10000];
sys.SamplingGrid = struct('rpm', nominal_engine_rpm) where For model arrays generated by linearizing a Simulink^{®} model
at multiple parameter values or operating points, the software populates Default: 