Page 1 of 1

SO unable to equilibrate muscles at few timesteps

Posted: Sun Oct 18, 2020 2:43 pm
by danielfng
Hello,

I'm running static optimisations on some data. I find that static optimisation solves fine for most timesteps, but for some (typically 1 - 2 timesteps per gait cycle), I get an error similar to the following:

time = 0.89 Performance = 524.291 Constraint violation = 1.56921e-09
WARNING- AnalyzeTool::run() unable to equilibrate muscles at time = 0.9.
Reason: Model::equilibrateMuscles() Unable to compute equilibrium for this muscle.
Please verify that the initial activation is valid and that the length of the musculotendon actuator doesn't produce a pennation angle of 90 degrees or a negative fiber length.

Solution error 0.296003 exceeds tolerance of 2.33e-06
Newton iterations reached limit of 20
Activation is 0.05
Fiber length is nan

In Object 'tfl_r' of type Thelen2003Muscle.
Thrown at Thelen2003Muscle.cpp:376 in computeInitialFiberEquilibrium().


It's not always the same muscle in question, and it seems to happen at random points throughout the gait cycle from what I can see. I can't see any strange features of the input data around these timesteps. I've done digging but can't find evidence of this issue elsewhere.

Does anyone have any tips?

Re: SO unable to equilibrate muscles at few timesteps

Posted: Fri Oct 23, 2020 11:18 am
by ongcf
Often this can happen if the muscles reach a state where they have a lot active force capacity, so the optimizer struggles with what to do for them. One way to check for this is if the muscles are very short or very long. You can attach a MuscleAnalysis to your static optimization, and see if any muscle's normalized fiber length is too long or short, or if the muscle's normalized fiber velocity is very fast (this also decreases active force capacity).