This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Choosing idgrey or idnlgrey Model Object

Grey-box models require that you specify the structure of the ODE model in a file. You use this file to create the idgrey or idnlgrey model object. You can use both the idgrey and the idnlgrey objects to model linear systems. However, you can only represent nonlinear dynamics using the idnlgrey model object.

The idgrey object requires that you write a function to describe the linear dynamics in the state-space form, such that this file returns the state-space matrices as a function of your parameters. For more information, see Specifying the Linear Grey-Box Model Structure.

The idnlgrey object requires that you write a function or MEX-file to describe the dynamics as a set of first-order differential equations, such that this file returns the output and state derivatives as a function of time, input, state, and parameter values. For more information, see Specifying the Nonlinear Grey-Box Model Structure.

The following table compares idgrey and idnlgrey model objects.

Comparison of idgrey and idnlgrey Objects

Settings and OperationsSupported by idgrey?Supported by idnlgrey?
Set bounds on parameter values.YesYes
Handle initial states individually.YesYes
Perform linear analysis.


For example, use the bode command.

Honor stability constraints.


Specify constraints using the Advanced.StabilityThreshold estimation option. For more information, see greyestOptions.



You can use parameter bounds to ensure stability of an idnlgrey model, if these bounds are known.

Estimate a disturbance model.


The disturbance model is represented by K in state-space equations.

Optimize estimation results for simulation or prediction.


Set the Focus estimation option to 'simulation' or 'prediction'. For more information, see greyestOptions.


Because idnlgrey models are Output-Error models, there is no difference between simulation and prediction results.

See Also

| |

Related Examples

More About