- Simulink solver: variable auto; Simscape local solver: off. This will be the RIGHT answer.
- Simulink solver: variable auto; Simscape local solver: backward Euler, no limit on iterations; make sure you get RIGHT answer.
- Simulink solver: variable auto; Simscape local solver: backward Euler, put limit on iterations and gradually reduce the number to say 5 (or whatever small number that your model can take and produce RIGHT answer).
- Simulink solver: low order fixed step solver (ode2, e.g.); everything else the same. Play with time steps. Check results and stability. Change time step in the local solver together with the SL solver (unless you have a good reason not to).
- Increase the order of Simulink solver. You'll need to strike some balance here. Given a desired level of accuracy, high order solvers can usually tolerate a larger time step than low order solvers, BUT they can be less stable at the same step size (aka blow up more easily). The "best" choice depends on the type of problem and the resulting equations you have.
Degenerate mass distribution after reducing step size and using state-space model
More Answers (1)
- Typically the degenerate mass distribution error with a fixed step solver indicates a numerical issue (step size is too large, solver choice is inappropriate for the system)
- Try analying/simulating your state space model alone and see what frequencies it has. You may find the step size is just too large for what that represents.
- Try using solver ode1be - that one is usually stable at larger step sizes.
- You can also try ode14x - that one is usually stable at larger step sizes, but does a lot more computation per time step.
- Try simulating just the Simscape piece variable step and see if it highlights any issues in the model.