Solver options for Sim in System Identification Toolbox

2 ビュー (過去 30 日間)
soeren graabaek
soeren graabaek 2022 年 5 月 11 日
回答済み: soeren graabaek 2022 年 5 月 17 日
For a project, I want to be able to simulate a continuous-time system with a fix-step ODE and then estimate the system parameters using the System Identification Toolbox.
However, I cannot arrive at a good fit when estimating the parameters on data created by a simple deterministic system using an ODE, but I will get a 100% fit when the data is created by the same system simulated using the build-in Sim function. "compare" won't even give me a 100% fit if I fix the estimation parameters to the parameter values used for the simulation.
After looking into the issue I figured that the problem stems from how Sim solves the underlying equations -- which I cannot find any documentation on.
Through some tests (see the two attached scripts) I found that sim probably uses the same adaptive solution find as simulink, and hence that Sim chooses its solver based on system dynamic and system input behavior.
My question is then: How do I know what solve Sim is using, and can I somehow fix the solver option?

採用された回答

soeren graabaek
soeren graabaek 2022 年 5 月 17 日
I found that 'idnlgrey' [1] let you specify the simulation options.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLinear Model Identification についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by