Compare identified model output and measured output
compare(
simulates the response of a dynamic system model, and superimposes that response over
plotted measurement data. The plot also displays the normalized root mean square (NRMSE)
measure of the goodness of the fit between simulated response and measurement data. 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. You can use
data
,sys
)compare
with time-domain or frequency-domain models and
data.
compare(
also predicts the response of data
,sys
,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.
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 in
data
and sys
based on the channel names. Thus,
it is possible to evaluate models that do not use all the input channels that are
available in data
. 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.
chgFreqUnit
| chgTimeUnit
| compareOptions
| forecast
| goodnessOfFit
| plot
| predict
| sim