add a gearing on rotational FDK dof


I’m trying to implement a 11 DOF FDK solver to the TKA-KneeBendDemo with TLEM 2.0.

Unfortunately, I get some of these error messages:

Failed to resolve force-dependent kinematics. Too many iterations used (final force error = 7.899933E+002). Continue anyhow…

As it stands in the wiki, i wanted to add a gearing on rotational FDK DOFs with an AnyKinMeasureLinComb, to equal them with the linear DOFs.

I know I have to edit this part in the text:


[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]AnyKinEqSimpleDriver[/SIZE] KneeForceDep = {
DriverPos = Main.ModelSetup.SubjectSpecificData.Parameters.KneeForceDepDriverPos;
DriverVel = {0.0,0.0,0.0,0.0,0.0};

[SIZE=2]AnyKinMeasureOrg[/SIZE] OrgLin = {
[SIZE=2]AnyKinLinear[/SIZE] lin = {
[SIZE=2]AnyRefNode[/SIZE] &ShankNode = Main.HumanModel.BodyModel.Right.Leg.Seg.Shank.KneeJoint;
[SIZE=2]AnyRefNode[/SIZE] &ThighNode = Main.HumanModel.BodyModel.Right.Leg.Seg.Thigh.KneeJoint;

[SIZE=2]AnyKinMeasureOrg[/SIZE] RotOrg = {
[SIZE=2]AnyKinRotational[/SIZE] rot = {
Type = RotAxesAngles;
[SIZE=2]AnyRefNode[/SIZE] &ThighNode = Main.HumanModel.BodyModel.Right.Leg.Seg.Thigh.KneeJoint.RotNode;
[SIZE=2]AnyRefNode[/SIZE] &ShankNode = Main.HumanModel.BodyModel.Right.Leg.Seg.Shank.KneeJoint.RotNode;

CType = {ForceDep,ForceDep,ForceDep,ForceDep,ForceDep};
Reaction.Type = {Off,Off,Off,Off,Off};

but I do not know how :confused:

Can you give me some tips?

Kind regards,

Hi Felix,

Here is a piece of code which works on three rotations you will need to adjust slightly to fit your needs… but essentially your measure organizer needs to work on the RotGearing instead of the original rot measure.

AnyKinRotational rot ={ 
      AnyRefFrame &ref1=.Global;
      AnyRefFrame  &ref2=.dummy;
    AnyKinMeasureLinComb RotGearing ={
      AnyKinRotational &ref=.rot ;
      AnyVar Gearing=2;
      Coef ={{Gearing,0,0},{0,Gearing,0},{0,0,Gearing}};
      OutDim =3;

This rotational measure will need to be used instead of the one used earlier.

If the gearing needs to be larger or less than one depends on the problem.

Note that this essentially change the forcetol for these dofs.

Best regards

Hi Søren,

thank you for your quick response.
I did not think it would be that easy.

Unfortunately I get another error message now:

Failed to resolve force-dependent kinematics. Too small steps for GSS search causes looping of Newton method (final force error = 3.282989E+001). Continue anyhow…

Which screw should I turn to fix the error?
Should I increase the perturbation?

Kind regards,

Hi Felix,

It is not possible based on any error message to say if the gearing should go up it depends on the nature the FDK dof in the model. The idea is that you would want a perturbation on any of the FDK DOF in the model to have the same “impact”. So if your pertube 1e-5 m on a linear DOF and if you do the same 1e-5 rad on a rotational dof does it “impact” the model in the same magnitude?

Finally in most FDK models errors occurs due to lack off stiffness on one or more DOF, please see this section of the wiki

Best regards