Simscape model run time/failure

1 visualizzazione (ultimi 30 giorni)
Oliver Uitz
Oliver Uitz il 23 Ago 2017
Risposto: Suhan il 29 Ago 2017
Hello all,
I'm working on a Simscape model, picture below
The springs labeled 'NS' are non-linear and precompressed, and calculate force using the following form
F= k1*x + sign(x)*k2*x^2 +k3*x^3
In this case, k1= 2.7805e+07, k2= -8.8919e+09, k3= 8.4685e+11
The spring on the left is linear and in tension such that the force it exerts equals that of the 'NS' springs (system in equilibrium).
Damper is nonlinear, and interpolates velocity dependent force values using a lookup table (contains 1001 values, see curve table values are pulled from below)
The mass is given an initial velocity of -3 m/s, i.e. it is traveling into the spring-damper system.
HOWEVER, if I run any solver other than ode15s, I get the following error:
"Calculation for differential and algebraic state derivatives failed."
And when I try running using ode15s, I get the following warning:
"Problems possible for transient initialization, as well as step-size control for transient solve, due to equations (including nonlinear equations) of one or more components:..."
MORE problematic is the fact that, even though the simulation runs, IT RUNS AT AN ABYSMALLY SLOW RATE. Observing the run-rate, it looks like it'll take several thousand millennia to complete (which, obviously, is out of the question).
I've tried modifying the solver configuration (relative tolerance and the like), but my inexperience seems to be winning out as none of my changes seem to make an appreciable difference.
Thank you for making it to the bottom of my text wall, hopefully by now you have some idea of how to help out a newbie in need!

Risposte (1)

Suhan
Suhan il 29 Ago 2017
The error that you are encountering usually occurs when the solution is unbounded. Perhaps that is why it is taking too long in ode15s.
I suggest you check the equations for nonlinear springs. Otherwise, try to reduce the stiffness coefficients and see if you get a solution.
You can also try to change the local Simscape solver: trapezoidal/Euler, in the Solver Configuration block and see if it makes any difference.

Community Treasure Hunt

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

Start Hunting!

Translated by