compare
Compare identified model output with measured output
Syntax
Description
Plot Simulated and Measured Outputs
compare(
simulates the response of a dynamic system model, and superimposes that response over the
plotted input/output measurement data contained in data
,sys
)data
. The plot
also displays the normalized root mean square (NRMSE) measure of the goodness of the fit
between simulated response and measurement data. data
can be a
timetable, an input/output matrix pair, or a data object such as an iddata
object or an idfrd
object. For timetables and data
objects, compare
matches the input/output channels based on the
channel names and ignores nonmatching channels. Use this function when you want to
evaluate a set of candidate models identified from the same measurement data, or when you
want to validate a model you have selected.
compare(
compares the
responses of multiple dynamic systems on the same axes. data
,sys1,...,sysN)compare
automatically chooses the line specifications.
Predict Model Output
compare(___,
predicts the
response of kstep
)sys
, using a prediction horizon specified by
kstep
. Prediction uses output measurements as well as input
measurements to project a future response. kstep
represents the
number of time samples between the timepoint of each output measurement and the timepoint
of the resulting predicted response. For more information on prediction, see Simulate and Predict Identified Model Output. You can use this syntax with
any of the previous input-output combinations.
Specify Additional Options
Examples
Input Arguments
Output Arguments
Tips
The NRMSE fit result you obtain with
compare
may not precisely match the fit value reported in model identification. These differences typically arise from mismatches in initial conditions, and in the differences in the prediction horizon defaults for identification and for validation. The differences are generally small, and should not impact your model selection and validation workflow. For more information, see Resolve Fit Value Differences Between Model Identification and compare Command.compare
matches the input/output channels indata
andsys
based on the channel names. Thus, it is possible to evaluate models that do not use all the input channels that are available indata
. This flexibility allows you to compare multiple models which were each identified independently from different sets of input/output channels.The
compare
plot allows you to vary key parameters. For example, you can interactively control:Whether you generate a simulated or predicted response
Prediction horizon value
Initial condition handling
Which experiment data you view
Which system models you view
To access the controls, right-click the plot to bring up the options menu.
Version History
Introduced in R2006a
See Also
compareOptions
| sim
| predict
| forecast
| goodnessOfFit
| chgTimeUnit
| chgFreqUnit
| plot