Solver Change From Variable to Fixed Step : Transient initialization, solving for consistent states and modes, failed to converge. ...Nonlinear solver: Linear Algebra error. Failed to solve using iteration matrix.
82 次查看(过去 30 天)
显示 更早的评论
Hello,
When Changed Sovler settings from Variable-step to Fixed-step for Code generation, Follwoing Error reports : Transient initialization, solving for consistent states and modes, failed to converge. Nonlinear solver: Linear Algebra error. Failed to solve using iteration matrix.
Model run fine with Variable-step solver settings. Can you please help me to dianose the issue
Thanks
Arole
2 个评论
Jim Riggs
2019-9-3
It could be that your model is very stiff and this will cause the fixed-step solver to have trouble.
Note that when using a variable-step solver, it usually includes a high-order solver which has good numerical accuracy. When you switch to fixed-step solver, the only option is Euler, and this has severe limitations in both accuracy and stabilty.
Note that the variable-step solver usually starts with a very small initial step (1e-6, or smaller) and then progressively increases the step size based on the calculated error.
Check the step size that te fixed step solver is using. It will have to be very small (much smaler than the variable-step solver - three orders of magnitude or more). This is a good place to start.
回答(1 个)
Steve Miller
2020-8-3
When you get this error message during simulation, try
- Ensure that you are using the local solver (for Simscape models)
- Making your step size smaller
- Increasing the number of nonlinear iterations
You should make sure your model runs well during variable-step simulation before attempting to run it with a fixed-step solver.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simscape Driveline 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!