Degenerate mass distribution after reducing step size and using state-space model
Show older comments
Hello,
I am currently using a state-space model within my Simscape model.
I am using ode4 with a fixed time step of .01 and an absolute tolerance of 1e-12.
My Simscape model works perfectly with no state-space inputs so I am confident there is nothing wrong with my Simscape model, but as soon as I command small inputs, I see my state-space model outputs exponentially grow so it results in a non-finte solution some 30-40 seconds later. My inputs are quite small, so I am puzzled at my state-space outputs growing to 10e300....
I have tried reducing my time step to .001, but when this happens I get the degenerate mass distribution error in the Simscape model.
I am constrained to only using a fixed-step solver and can not switch to a variable step solver.
Does anybody have any ideas on what I might try to get this working?
Thanks!
Accepted Answer
More Answers (1)
Steve Miller
on 25 Jun 2021
1 vote
Hi Erika,
A few things you can try:
- 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.
--Steve
1 Comment
Erika Limon
on 28 Jun 2021
Categories
Find more on Trimming and Linearization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!