Initial muscle fiber length is NaN in Static Optimization

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Lukas Connolly
Posts: 4
Joined: Mon Dec 16, 2019 4:06 pm

Initial muscle fiber length is NaN in Static Optimization

Post by Lukas Connolly » Mon Nov 09, 2020 9:26 am

Hello,

I'm currently working on a full body model which combines the detailed thoracolumbar spine model by Bruno et al. and the Gait2354 model. Therefore the full model is relatively large and difficult to oversee. In general my modeling (custom spinal alignment) and simulation pipeline runs well. But in some cases I get the error below, this happens for roughly 3% of my simulations and seems to occur without any obvious reason. My pipeline consists of 5 repetitions of lifting, sitting up, walking, running and stair walking for each subject. If I repeat the simulations I get exactly the same error, also after rerunning inverse kinematics. But if I modify small stuff on the model, e.g. adding actuators to the L5/S1 joint or not realigning the spinal alignment, I can run my simulation. But get the same kind of error for some different repetition in my pipeline, which worked with the previous model version. Looking at the inverse kinematics solutions I can also not observe any irregularities within the motions.

In a different post I read that the MuscleAnalysis plot tool might help analyzing this problem, but I can't really run it from the GUI, because I can't select "time" for the x-axis due to the long list of options and now scrollbar (guess this is a small bug). So do you have any idea, how to plot fiber-lengths to better understand the problem? Also is this the right approach? And even if yes, how can I fix such a problem? I don't really see how I would solve this problem by optimizing my inverse kinematics weights, as the movements look natural.

Any help/hint is very much appreciated! Thanks for taking the time to read (and answer (if you do)).

Cheers Lukas

Exception:
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.388468 exceeds tolerance of 1.073e-05
Newton iterations reached limit of 20
Activation is 0.05
Fiber length is nan

In Object 'iliacus_l' of type Thelen2003Muscle.
Thrown at Thelen2003Muscle.cpp:376 in computeInitialFiberEquilibrium().
file= C:\projects\opensim-build-releases\opensim-core\OpenSim\Simulation\Model\Model.cpp
line= 1199

Tags:

POST REPLY