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.

46 views (last 30 days)
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 Comments
Jim Riggs
Jim Riggs on 3 Sep 2019
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.

Sign in to comment.

Answers (1)

Steve Miller
Steve Miller on 3 Aug 2020
When you get this error message during simulation, try
  1. Ensure that you are using the local solver (for Simscape models)
  2. Making your step size smaller
  3. 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.

Categories

Find more on Simscape Driveline in Help Center and File Exchange

Products


Release

R2015b

Community Treasure Hunt

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

Start Hunting!