Use Hill muscle model and muscle fiber and tendon length calibration in Plug-in-gait_Simple example

Dear AnyBody community

We want to estimate the metabolic power consumption and the mechanical power of the muscle-tendon unit of the psoas major as accurate as possible during walking. Before using real measurement data, we tried to adapt the 'Plug-in-gait_simple' example so that it would use the 3 element Hill-muscle model for the leg and trunk muscles. Additionally, we would like to calibrate the muscles using the 'Muscle Fiber and Tendon Length Calibration' method. We did this by adding the following lines


to the 'TrailSpecificData_FullBody.any' below


We are able to load the model, run the 'ParameterIdentification' study and the 'LoadParameters' and 'MarkerTracking' substudies from the 'RunAnalysis' study. However, when running the 'InverseDynamicsStudy', an overloaded muscle configuration is obtained on the muscles around the shanks of the legs. This ultimately leads to the following error:

> Muscle recruitment solver: solver aborted due to singular KKT matrix

Is there an additional parameter that we should define?
As the 'InverseDynamicsStudy' runs when using the muscle tendon length calibration (CALIBRATION_TYPE_1PAR), our guess is that there is a problem with how we used the 'Muscle Fiber and Tendon Length Calibration' method.

Additionally, we noted that although BM_LEG_MODEL LEG_MODEL_TLEM2 was defined, 'MusMdl3E_2.any' is used for the muscle model (which refers to the TLEM1 according to the comments in the script). When assigning 1 to BM_LEG_MORPHOLOGY (to include 'MusMdl3E_1.any') the model does not load anymore (because of unresolved objects).

We do not have much experience with AnyBody yet. Is there anyone who has already encountered a similar problem/ know how to implement the above properly? Any suggestion to address the problem would be greatly appreciated.

With kind regards
Kate Duquesne

Hi @kateduquesne

It sounds like a interesting research area.

As you indicated, the error you are seeing is most likely linked to the muscles spanning the ankle joint.
The 2-parameter muscle calibaration is tough to adjust correctly and you should look into how much ankle eversion / inversion your model have when the foot comes in contact with the force plate / ground.

The fix to this is to alter the positions used in the calibration of the ankle joint muscles.
The positions are found in the ammr\Body\AAUHuman\LegTLEM\Calibration\AnkleMuscleCal.any file.

You can also tweak the RMin and RMax values of those muscles that are overloaded. These parameters indicate the lower and upper bounds of the ratio (l_m / l_{m0}) .
As of now all muscles share the same values of 0.5 and 1.0 but you can alter it to add a individual value for specific muscles.

Another important aspect is the tendon stiffness, especially for muscles with long tendons and short fibers. The default in AMS is that all muscles have a tendon strain of 0.053 while you could argue that this is to compliant for some tendons. It is worthwhile to look at Zajac, 1989, PMID:2676342 and Maganaris & Paul, 2000, PMID:10648216 that indicate stiffness values could go as low as 0.02.

The last thing I will mention is to look at the parallel elasticity parameters j_{pe} and Pe_{factor} - they control the onset and steepness of passive force of the muscle model. Depending on how much passive force you are experiencing in your model you could alter these paramters for some muscles.

I hope the above can be of help to you.

NB. Thanks for noting the typo in the MuscleMdl3E_2.any - it should have stated 2.1 to indicate the updated TLEM 2 model - so we will fix that for future versions.

Best regards,
AnyBody Technology

Dear Bjorn

Thank you for your quick and extended reply! I'll try to update the positions used in calibration for the ankle joint muscles and/or the parameters you've mentioned.

With kind regards
Kate Duquesne