How is the calibration done?


Could someone explain to me how is calculated the calibration of segments lenghts , and the axis af each limb during the motion, using the c3d markers? All the values we set in the model setup must be used in a calculation, but it is not available directly.
I would like to know precisely how each calibration is done, using external markers or virtuals calcutaled markers like the center of rotation of an articulation, and what happen if I add an new marker, does the system really use each marker, and how?

Many thanks for your help,


Hi Claude,

  1. In the GaitFullBody example, you can see this piece of code:
    [b]AnyOptKinStudy[/b] ParameterIdentification =     {
      AnyFolder &StudyRef = .KinematicStudyForParameterIdentification;
      Analysis =   {
        AnyOperation &ref = .StudyRef.Kinematics;

So, I would recommend you to see the description of ‘AnyOptKinStudy’ class in the reference manual.

  1. If you want to know more in detail, you may have to read this paper:
    Andersen, Michael Skipper; Damsgaard, Michael; Mac-Williams, Bruce; Rasmussen, John (2010):
    A computationally efficient optimisation-based method for parameter identification of kinematically determinate and over-determinate biomechanical systems.
    Computer Methods in Biomechanics and Biomedical Engineering. 13(2), 171-183.

I hope that these information may be helpful to you.

Best regards,

Thank you for your help and giving interesting references!

Best regards,
Claude Pothrat


I just have a question. I read the article you advised me to have a look at, and in the part Example and Results - Model description, they describe how are calibrated the segments length and joint rotation axes.

But They seem to decide themselves of what marker they want to use to do these calibrations. For example it is written " For the Pelvis, we chose to use the ASIS markers to define the pelvis width…".

It means that we can choose ourself which markers we want to define the lengths and rotation axes. It is very interesting as everybody uses his set of markers.

Could you explain how we can set that a marker in particular will be used for calibration of a parameter?

For exemple if I want the knee rotation axe to be calibrated with a knee external marker, a knee internal marker and the external ankle marker, then save the results and compare them with a calibration of this axe made with only 2 markers (knee external and internal for example), is it possible to constrain anybody to calibrate with the markers I want (In so far as all the DoF are constrained) ?

Thank you in advance for you help,

Best regards,

claude Pothrat

Hi Claude,

Sorry for the late reply on your question.
For the segment length optimization you cannot exactly choose the markers defining the length, at least not as directly as you seem to believe. It is in fact the the choice of which marker location is optimized or not that will give a certain effect on the segments length. Remenber that it is a global optimization tries to fit every soft constraint given it weight.
Typicaly the markers situated on clear bony landmarks (ASIS on the pelvis, LKNE/RKNE on the femur condyle) are fixed and have a very strong influence on the segment length (the length direction is usualy aligned with the two fixed marker line) compared to other markers like THI on the misddle of the thigh, which has virtualy no influence because its location is freely optimised in the three direction.

The joint centers are optimised together with the segment length, and influenced by the markers in the same way.

If you want to optimize the orientation of a joint axis, then this is a little more tricky. It is not done by the classic optimisation model (like GaitLowerExtremity). To do so you could for example modify the definition of the joint orientation in the Body folder to make it dependent of several node with the RotMat function, and those nodes can be markers. Those markers location should probably be optimised, which means you will need enough markers to have the fixed ones influencing the segment length and the optimized ones controling the joint orientation…

Best regards, Sylvain.


Thank you a lot for replying.

I have further questions.

You said that RTHI, for example, had virtually no influence on segment length because its location is optimized in the three directions, does it mean that every marker that is to be optimized, have no influence during the calculation of segment length? I thought it had a diminished influence, proportionnaly to the number we set, between 0 and 1.

Currently joint axes are only calculated with segments orientation, so it means that if I add an knee internal marker (without specifying the dependancy in the joint articulation), calcualtions of the knee axis of rotation won’t be more precise ?
Isn’t every added marker necessary taken in account in calculations (in my example, would thigh length and orientation be calculated taking the new marker automatically in account?) ?

Is the location of the center of joint calculated using anthropometric data (knee width), and segment direction?

Thank you again for your interest,

Best Regards

Claude Pothrat

hi Claude,

the weight of the marker that you mentioned applies to the linear constraint between the body marker (red) and the recorded marker (blue). Remenber that the goal of the optimizer is to match these markers the best possible. So a lower weight on a marker only means that the error (the distance) between the two red and blue marker is allowed to be higher than for the rest of the markers. It does not decide directly the influence of the marker on the segments length.

What really makes a marker important or not for the segment length is if the location is optimized:

  • If we take THI with a location optimized in the 3 directions, then you can make the thigh segment as long or as small as you want, it does not matter for this particular marker. Because the system can move the red marker wherever on the segment so that it match the blue one location. It gives no information on the segment length because the location is not fixed.
  • On the opposite take the KNEE marker with a fixed (not optimized) location on the condyle. Then the only option for the system to have a better match of this marker is to adjust the segment length. And thus that defines clearly the segment length.

For the joint axis, adding a knee internal marker will not change the orientation of the axis in the current gait models. What it will do is change the motion and the segment length. As i wrote before it needs modification of the joint definition in the body parts if you want the orientation dependent of acertain marker.

And the joint center location is simply the consequence of the optimized segment length: the joint is fixed at the distal end of the segement, so when the segment becomes longer the joint moves together with the distal end.

Best regards, Sylvain.


Thank you for your explanations, now I understand better the use of optimisation and weight for marker positions.

I would like the knee joint axis of rotation to be dependant of an internal and an external markers (respectively MKNE ans KNE)
THe knee joint is defined as following in the body folder:

AnyRefNode KneeJoint = {
AnyVar AxisRot=0; //this can be used for controlling varus valgus the varible can be linked to a design varible and changed,
sRel = .Scale(.KneeJointStandard);
ARel = RotMat(…Sign7.46pi/180,x) * RotMat(…Sign*-32.25pi/180,y)RotMat(…SignAxisRotpi/180,x);
#include “…/DrawSettings/JointAxesDistal.any”

Have I to change AxisRot or Arel?
How can I specifiy that I want the axis of rotation to be the one that join the 2 markers?

May I write something like that:


And I noticed that for right leg and left leg, the body model refers to the same folder, so how could I specify RMKNE/KNE for the right leg and LMKNE/LKNE for the left one?

To finish, I would like to know if in the classical gait model the axis is reorientated at each step, or if it is orientated at initial position only? And which markers does the system use to caculate it?

Thank you again,

Best regards,

Claude Pothrat


AxisRot will allow you to use the varus/valgus of the knee as a design variable for the optimization. So that will change the orientation of the joint axis, but it will not necesarily fit with the MKNE and KNE markers. It will change it so that all the leg markers have a better fit in general.

In your case you have to change the ARel and use the three points RotMat function as you intended. However the syntax is not correct. Please see RotMat in the reference manual for the details. What you have to provide is the full coordinates (sRel) of three points: origin, axis X direction, axis Y direction. So it will more looks like this:

ARel = RotMat(.RMKNE.sRel, .RKNE.sRel, .<some other thigh node>.SRel);

And you are right that the Seg.any file where this is defined is used both for right and left. So you will have to remove the ARel line from the Seg file and put it somewhere else (a file used only once), in HumanModel.any for example, with a different syntax for right and left:

BodyModel.Right.Leg.Thigh.KneeJoint = {
ARel = RotMat(.RMKNE.sRel, .RKNE.sRel, .<some other thigh node>.SRel);

BodyModel.Left.Leg.Thigh.KneeJoint = {
ARel = RotMat(.LMKNE.sRel, .LKNE.sRel, .<some other thigh node>.SRel);

In the classical GaitModel the joint orientation is not optimised and not calculated with markers. The orientation is simply fixed regarded to the segment (with the ARel member).

Best regards, Sylvain.

Thank you very much for you help!

I tried to follow your advices and it works better! But I still have some problems so I have posted a new thread in the debug model section.

thank you again,

best regards,