Muscle Calibration

Hi everyone,

i have a problem concerning the muscle calibration in GaitLowerExtremity from AMMRV1.2. After the calibration, the muscles look weird having very long tendons and little clumpy muscles. Please take a look at the attached image.

The results of the InverseDynamics analysis look ok, regarding the shape of the ChartFX curves. But muscle activities have much too high levels. And of course there are problems with overloaded muscles. I am analysing a normal smooth gait.

I think the calibration results are not ok. calibrating muscles of the GaitNormal0001-Processed also lets the muscles look this way. What is going wrong here? And how can i possibly change and fix the calibration conditions?

Another question: Is there a file, where the calibration results are written in, and if not: is it possible, to let AnyBody store the results, and load them later on instead of calibrating everytime? That would be very helpful.

Best regards,


The length of the calibrated muscles comes from the literature (Klein Horsman data set). The calibration sequence takes what we estimated to be the position where the muscles have the optimal strength and adjust the tendon length so that the contractile element have the optimal length defined by the literature.

The muscle activity is quite sensible to this calibration process, and it is rigth that in few models we have have seen that the result was not as good as in others. However the calibration sequence in the repository is giving good results for the majority of our gait models.

If you wish to modify the calibration sequence, there is a set of files called LegCal1/2/3… in the folder Body/AAUHuman/LegTD. In each file there are drivers for the position of the leg and a list of muscle to be calibrated in this position.

The result of the calibration is an updated value of the menber Lt0 of the muscle models. You can find it in Body/AAUHuman/LegTD/MusPar. You can dump or output those updated values, then load them as design variables before each simulation or simply hardcode them in the script once and for all.
Note that this aproach is only valid if you work with the same subject every time. If you scale the model differently you will have to recalibrate again.

best regards, Sylvain.


thank you very much for this detailed answer.
Any idea what is going wrong with my calibration (image above)? Or does it have to look this way?

Could you please describe in detail how to dump and load those values? That would give me great pleasure!

Kind regards


For the muscles it is normal, they are supposed to look like this after the calibration. This because the have short fibers.

To save once and for all the Lt0 values you can try the following. Create an AnyOutputFile and use the search menber to get all the Lt0 in a csv file (use the * character like in the ChartFX to replace the muscle names in the path, something like …/Leg/MusPar/*/Lt0).

Then just do a bit a text precessing to get a list of all the muscles Lt0 of the type:
<muscle name>.Lt0 = <value>;

Copy-paste this list at the end of the MusPar file and outcomment all the original Lt0 members inside each muscle model.

Best regards, Sylvain.


i finally tried to dump the values, but no file was generated.
I tried to insert it in the MainFile, in the Calibration Sequence, and at least into every single CalibrationStudy. But no output file is beeing generated.
Where do i have to insert the AnyOutputFile class?

More questions about the calibration:

For the muscles it is normal, they are supposed to look like this after the calibration. This because the have short fibers.
What do you mean by short fibers? For example the gastrocnemius has (in reallity) very long fibers, but here there are almost no muscles, only very long tendons.
Why is that so? Sometimes during analysis the little clumpy muscles seem to get a length near zero.

Let me describe my problem: We at University of Applied Sciences Frankfurt want to do some academical research concerning Gait Analysis. One of the values of interest is tendon length and its elongation.

But how could we rely on the values generated by AnyBody, if the lenght values of the muscles and tendons are not even near the real ones?
How can we produce results, that are useable in a scientific examination, if we don’t even know that we can rely on the muscle calibration?
Is this software already technically mature, so one can use it in academical research??

Thanks fot your efforts,


The original data which the leg model is based on originates from Klein Horsman see

In this report the gastroc muscle is listed with a with a fiber length of 5.7 and 6 cm for the medial and lateral and tendon lengths of 23.4 and 21.2 these are also the values which you will find in the model please have a look in the file AauHuman/LegTd/MusPar.any

When running the calibration on the GaitlowerExtremity model in the repository the tendon of the gastroc muscle is adjusted to a relative higher length. This value reflects that some of the fibers in the muscle work in parallel and the added length in the tendon originates from both the difference in subject size and that the fibers are parallel and has a pennation angle of 25 deg. The muscle model assumes that the muscle belly length is given by the fiber length and if many fibers are in parallel and there is a pennation angle this “extra” length will have to be accounted for in the tendon length.

The Tendon values can be saved as Sylvain describes it, I have just tested adding these lines to the LegCal2.any file in the LegCal2 folder.

AnyOutputFile test ={
FileName =“test.txt”;
AnyVar test=Main.Studies.HumanModel.BodyModel.Right.Leg.MusPar.GastrocnemiusLateralis1Par.Lt0;

Please note that the file be placed in the LegTD folder unless you change the path.

So answering your question if you can rely on the calibrated tendon values the answer is yes, but you should keep in mind that the tendon lengths you see may differ especially if the there is a large pennation angle and many fibers are working in parallel.

The software is indeed technically mature and has been used in numerous scientific publications see

If you have any further questions please ask again.

For more details on the muscle model and it calibration please have a look at the tutorial

Best regards

Hello Mr. Toerholm,

thanks for your answer, it was pretty helpful to understand many details that we’ve been missing.
I think we generally understood the muscles for now. But some details don’t seem clear enough:

  1. Some unclarity about the muscle fibers: Klein Horsman data gives exact values for the muscle fiber length and also the tendon lengths. But if we compare these values with anatomical images, it seems the muscles bellies are much longer.

1a: Maybe the muscle fibres are in reality partially in series, not only parallel, so that the belly length should be summated over more than one fibre length?

1b: Looking to anatomical images of gastrocnemius, the tendon does not begin in one point, but slowly developes over the surface of the muscle, before the can be safely identified. Could this falsify the length of the muscles in AnyBody?

  1. I attached a model, which moves the ankle. The ankle movement has been orientated to the upper and lower bounds of possible movement, taken out of an anatomical book. Inside the ankle Joint operates a moment, that the ankle has to move against.
    At the end of the movement many muscles are overloaded. This seems to result out of the very short muscle lengths (muscles getting close to zero length).

2a: We would very much appreciate somebody of the support team to run our model and examine where the too high activities of the 3e-muscles come from.

2b: In similar models, we saw the muscles getting the shape of a disc, which looks very disturbing. They are getting green, because the pennation angle gets near or already reaches 90 degrees.
Please have a look at the attached image. This is no behaviour similar to real muscle contraction, is it?
We think this is a result of too short muscle bellys and the resulting unreallistic high pennation angles.

  1. In the list of publications I found none that describes a validation of the muscle activities against emg data or other measurements. Did I miss it in this long list? Especially the 3e-muscles or their calibration would be of interest.

Please note that the file be placed in the LegTD folder unless you change the path.
The outpufiles were generated in the LegTD Folder, unfortunately I estimated them in the folder of my main file. So my AnyOutputFile class works, tanks!

Thank you very much!
Best regards

Muscle discs image and our ankle movement model (use in Repo 1.2 or 1.3.1):

Hello Thomas,

Thanks for your persistence in scrutinizing the models. It is this type of effort that eventually improves the models for the benefit of all. I have some comments to your various points:

  1. I think it is an open question whether muscle fibers are indeed entirely parallel or whether they are to some extent in series with each other. In the TLEM model it is assumed that they are parallel, but your opinion on that is as good as anyone else’s. This uncertainty is the reason why the AnyBody models are completely open and let you modify them as you find best. If the fibers are to some extent in series with each other, then you must increase the fiber length in the muscle model and decrease the PCSA or F0 value depending on hos the muscle is defined.

  2. In general we must assume that there is a relationship between the muscle fiber lengths, the moment arms and the range of motion of the joints in such a way that the muscles have strength to articulate the joints in over the entire range of motion. However, this is actually not true for all of the muscles in the lower extremity. Try the following: Stand on one leg, hold onto something with your hand for stability and slowly flex the knee of the other leg, lifting your foot behind you. At some point this becomes difficult because the hamstring muscle fibers become very short, and if you continue to try, your hamstrings are likely to cramp. This shows that some of the muscles in the lower extremity are very specialized to a specific function, typically gait or running.

Whether this is also true for the triceps surae I do not know, but the cadaver studies I remember having seen all find very short fibers for the soleus, indicating that this muscle is very specific to creating force at one particular ankle posture. If I flex my knee and plantar-flex my ankle as much as possible, then my calf muscle does not seem to be very tense, indicating that, perhaps, in this posture the deeper plantar flexors take over some of the function.

Whether this is all reflected well in the TLEM model and whether the muscle assumptions in the model should be modified in the direction of more fibers in series, I don’t know, but if you can come up with experimental evidence to support more parallel fibers, then that would be a very valuable contribution.

Finally, I believe that the division of the muscle/tendon unit into only muscle and tendon is probably not correct. The apenerosis probably forms a significant part of what we consider the tendon in the current model, and this effectively increases the tendon stiffness over what is assumed in the model, because the elastic part of the tendon becomes shorter. However, we do not have any good anatomical data for the length of the apenerosis for all of the muscles in the model. A simple correction might be to assume a somewhat higher stiffness of the assumed tendon, but I do not think this will influence the issue that is worrying you very much. Partially serial fibers would be much more significant in this respect.

  1. Sorry, but I do not recall all of these references in detail and do not have the time to review them right now.

Best regards,