SysIdent Compare: Plot only selected outputs

3 Ansichten (letzte 30 Tage)
Christoph
Christoph am 29 Mai 2024
Kommentiert: Christoph am 4 Jun. 2024
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

Akzeptierte Antwort

Christoph
Christoph am 3 Jun. 2024
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)

Weitere Antworten (1)

Harald
Harald am 29 Mai 2024
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 Kommentare
Harald
Harald am 3 Jun. 2024
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 am 4 Jun. 2024
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.

Melden Sie sich an, um zu kommentieren.

Produkte


Version

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by