SysIdent Compare: Plot only selected outputs

2 次查看(过去 30 天)
Hello!
using "compare" from the System Identification Toolbox creates a quick way to compare the created model with the data. But when I use a large model (e.g. with 103 output variables), you cannot see anything in the plot.
% code to plot model comparison with measurement data
compare(id_data, model);
Is there an option to plot only selected outputs using compare?
Thanks,
Christoph

采纳的回答

Christoph
Christoph 2024-6-3
I found a solution: we can cut off selected output data of the id_data object before using compare:
compare(id_data(:,50:70,:), model)
This will now only plot output channels 50 to 70, but will also produce some warnings (one for each missing output):
Warning: Output channels required for prediction or initial condition estimation are not available in the validation data object. Prediction horizon of Inf and zero initial conditions will be used.
These warnings can be suppressed via:
warn_id = 'Ident:analysis:compareChk16';
warning('off',warn_id)

更多回答(1 个)

Harald
Harald 2024-5-29
Hi,
my experience with System Identification Toolbox is admittedly limited.
From the documentation, I would try to pass a compareOptions object to compare:
opt = compareOptions('Samples', Samples);
compare(id_data, model, opt);
From the doc of compareOptions:
Specify Samples as a vector containing the data sample indices. For multiexperiment data, use a cell array of Ne vectors, where Ne is the number of experiments.
Perhaps, this already helps?
Best wishes,
Harald
  3 个评论
Harald
Harald 2024-6-3
Hi Christoph,
could you share more details on what you have tried, please? Unless you are still getting the same results, how do they now deviate from what you are looking for?
Best wishes,
Harald
Christoph
Christoph 2024-6-4
Hi Harald,
i tried your suggestion, i.e.:
opt = compareOptions('Samples', [1:10]);
compare(id_data, model, opt)
but there were not any changes to the plot:
My assumption was that the number of samples (time samples) are now cut (therefore only the ten first timepoints of data are plotted), but this was not the case. I don't know what exactly this option does.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Residual Analysis 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by