SysIdent Compare: Plot only selected outputs

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일

1 개 추천

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일

0 개 추천

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

Christoph
Christoph 2024년 6월 3일
Sadly, this does not help :(
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
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.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Time and Frequency Domain Analysis에 대해 자세히 알아보기

제품

릴리스

R2024a

질문:

2024년 5월 29일

댓글:

2024년 6월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by