Clear Filters
Clear Filters

Initial Computation Failed or Unstable System Error After Matlab Version Upgrade - System Identification, greyest

22 views (last 30 days)
I have .m script that uses greybox estimation. The script works fine when I run it in Matlab 2019b. However, when I ran same script with same inputs in Matlab 2022a, it gives 'system unstable' error.
  1. What is causing this error?
  2. How do I make the same script work in new Matlab release?
Error message:
Error using iddata/greyest
The initial computation of the loss function failed. The initial model, if specified, may be unstable.
For linear models, consider setting the "EnforceStability" option to TRUE.
For structured estimations (procest, greyest, nlgreyest) check that the parameter bounds do not make the model
unstable.

Answers (1)

Dhruv
Dhruv on 4 Sep 2023
The error message you're encountering is related to the initial computation of the loss function in the “greyest” function from the System Identification Toolbox in MATLAB. The error message suggests that the initial model may be unstable, which is why the estimation process is failing.
Here are a few steps you can take to address this issue and make your script work:
  • Enforce Stability: As suggested in the error message, you can try setting the "EnforceStability" option to TRUE. This can help prevent unstable models from being estimated. You can set this option when calling the greyest function like this:
options = greyestOptions('EnforceStability', true);
sys = greyest(data, initModel, options);
% Replace data with your data, and initModel with your initial model.
  • Check Parameter Bounds: If you're using parameter bounds for your model, it's possible that the parameter bounds you've set are causing the model to become unstable during the estimation process. Review the parameter bounds you've specified and ensure that they are reasonable and won't lead to instability.
  • Initial Model: The error message also mentions that the initial model might be unstable. If you're providing an initial model, make sure that it's a stable model. If possible, try using a different initial model or estimating the initial model using different techniques before passing it to greyest.
Hopefully the above steps will help you solve the issue!

Categories

Find more on Grey-Box Model Estimation in Help Center and File Exchange

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!