Penetration between segments

Good morning,

I have 6 DOF between patella-thigh and 6 DOF between thigh-shank in my model and I would link these two joint with a driver that doesn´t allow the penetration between segments. Is this possible?

I have the AMMRV 1.4 and I can´t use the 1.5 one so I can´t see what´s happen in the TKA-KneeBendDemo!

Best regards,
Giovanni

Good morning Giovanni,

First of all, please write your AMS version number so we know what capabilities it has.

Secondly, if i understand it correct - you would like to define kinematics in such way that it will take into account the articular surfaces. If so - you can look into the example SpineFixationWithForceDepKinematics (it should be present in AMMRv1.4). What you want from there is the definition of facet joints and how to enable the Force-Dependent Kinematics. But it will, of course, require you to define something similar for the knee.

Best regards,
Pavel

I have the AnyBody 5.1.0 version.

Thanks for your help!

I have seen the SpineFixationWithForceDependantKinematics.any and its subroutine, but in this case there are three spherical joint to driver, I haven´t any sphercal or revolute joint between thigh and shank (they are completely free), so How I can give a driver to Thigh-Shank linked in which there won´t be a penetration of the to bones?

Sorry for my disturbance,
Thanks,
Giovanni

I have put these drivers for Thigh-shank movement:

[SIZE=3]
AnyKinEqSimpleDriver[/SIZE] KneeDriverRight={
[SIZE=3]AnyKinMeasureOrg[/SIZE] &ref1 =...HumanModel.Interface.Right.KneeFlexion;
[SIZE=3]AnyKinMeasureOrg[/SIZE] &ref2 =...HumanModel.Interface.Right.KneeExternalRotation;
[SIZE=3]AnyKinMeasureOrg[/SIZE] &ref3 =...HumanModel.Interface.Right.KneeAbduction;
DriverPos = pi/180*{
.JntPos.Right.KneeFlexion,
.JntPos.Right.KneeExternalRotation,
.JntPos.Right.KneeAbduction
}; 
DriverVel={0,0,-0.60};
CType = {ForceDep,ForceDep,ForceDep};
Reaction.Type={Off,Off,Off};
};

[SIZE=3]AnyKinEqSimpleDriver[/SIZE] KneeDriverTRight={
[SIZE=3]AnyKinMeasureOrg[/SIZE] &ref4 =...HumanModel.Interface.Right.KneeTranslationX;
[SIZE=3]AnyKinMeasureOrg[/SIZE] &ref5 =...HumanModel.Interface.Right.KneeTranslationY;
[SIZE=3]AnyKinMeasureOrg[/SIZE] &ref6 =...HumanModel.Interface.Right.KneeTranslationZ;
DriverPos =1*{
.JntPos.Right.KneeTranslationX,
.JntPos.Right.KneeTranslationY,
.JntPos.Right.KneeTranslationZ}; 
DriverVel={0,0,0};
Reaction.Type={Off,Off,Off};
};

 

And I have defined this contact surface Force:

[SIZE=3]
AnyForceSurfaceContact[/SIZE] stiff = 
{
MeshRefinementMaster = 1;
MeshRefinementSlave = 1;
PressureModule = 1e6;
[SIZE=3]//ForceViewOnOff = On;
[/SIZE][SIZE=3]//SingleSidedOnOff = Off;
[/SIZE][SIZE=3]AnySurfSTL[/SIZE] &r1 = Main.HumanModel.BodyModel.Right.Leg.Seg.Thigh.femore;
[SIZE=3]AnySurfSTL[/SIZE] &r2 = Main.HumanModel.BodyModel.Right.Leg.Seg.Shank.tibia;
};

Do you know How Could I link these two things?
When I run the Kinematics, the two surface penetrate one into the other in the model view.

Hi Giovanni,

Yes, we have a very good idea how to do that.

Check our wikipage - it contains a question about driving your model with forces (in your case the contact forces would be an input) : Can I use AnyBody to make models which are moved “just” by forces?

Essentially it is the same thing as SpineFixationWithFDK, but shown a little simpler. If you understand this model - you should be able to make your own FDK model.

In case of your problem you need to set the relevant degrees of freedom to have the constraint type to be “ForceDep”, switch on the FDK solver, and define contact forces. For example, you can set varus-valgus rotation only to be force-dependent and leave everything else to be driven like you do now.

Read carefully the FDK example and try to understand the function of each section.

Best regards,
Pavel

The follow problem:

[u][SIZE=1]
ERROR(OBJ1)[/u][/SIZE] : [u][SIZE=1]C:/U..s/g..a/D..p/m..i/A..l/A..n/E..s/K..d/KneeLoad.main.any[/u][/SIZE] : [u][SIZE=1]Study.InverseDynamics[/u][/SIZE] : No solution found : There are fewer unknown forces (muscles and reactions) than dynamic equations

Has given to me during the execution of the InverseDynamics because I don´t use muscles in the model or for other motivation.

Ok, then the only option for you is to supply kinematic drivers so that they would not lead to penetration. I mean that you have to come up with some motion that is acceptable for you. For example, add some velocities to X,Y directions to simulate elevation of the bone due to the contact forces.

An ideal scenario would be to have the markers on the bone so you can drive your bone segments using them.

Pavel

Ok, I explain you what will be my thesis project, I would create a model of the right knee with ligaments and these follow drivers and consequently degree of freedom:

[SIZE=3]
AnyFolder[/SIZE] Joints = {
[SIZE=3]AnyStdJoint[/SIZE] PelvisGround = { 
[SIZE=3]AnyRefNode[/SIZE] &ref1 = Main.Model.EnvironmentModel.GlobalRef.Hip;
[SIZE=3]AnyRefNode[/SIZE] &ref2 = Main.HumanModel.BodyModel.Trunk.SegmentsLumbar.PelvisSeg.HipJointRight;
};
};
[SIZE=3]AnyFolder[/SIZE] Drivers = {
[SIZE=3]/// Aliases for convenient referencing
[/SIZE][SIZE=3]AnyFolder[/SIZE] &JntPos=..Mannequin.Posture; 
[SIZE=3]AnyFolder[/SIZE] &JntVel=..Mannequin.PostureVel; 


[SIZE=3]///Ankle driver
[/SIZE][SIZE=3]AnyKinEqSimpleDriver[/SIZE] AnkleDriverRight={
[SIZE=3]AnyKinMeasureOrg[/SIZE] &ref1=...HumanModel.Interface.Right.AnklePlantarFlexion;
DriverPos = pi/180*{.JntPos.Right.AnklePlantarFlexion}; 
DriverVel=pi/180*{0}; 
Reaction.Type={Off};
}; 
[SIZE=3]AnyKinEqSimpleDriver[/SIZE] SubTalarDriverRight={
[SIZE=3]AnyKinMeasureOrg[/SIZE] &ref1=...HumanModel.Interface.Right.SubTalarEversion;
DriverPos = pi/180*{.JntPos.Right.SubTalarEversion}; 
DriverVel=pi/180*{0}; 
Reaction.Type={Off};
}; 
[SIZE=3]///Hip driver 
[/SIZE][SIZE=3]AnyKinEqSimpleDriver[/SIZE] HipDriverRight={
[SIZE=3]AnyKinMeasureOrg[/SIZE] &ref1 =...HumanModel.Interface.Right.HipFlexion;
[SIZE=3]AnyKinMeasureOrg[/SIZE] &ref2 =...HumanModel.Interface.Right.HipExternalRotation;
[SIZE=3]AnyKinMeasureOrg[/SIZE] &ref3 =...HumanModel.Interface.Right.HipAbduction;
DriverPos = pi/180*{
.JntPos.Right.HipFlexion,
.JntPos.Right.HipExternalRotation,
.JntPos.Right.HipAbduction
}; 
DriverVel={0,0,0};
Reaction.Type={Off,Off,Off};
};

 
[SIZE=3]// 
[/SIZE]
[SIZE=3]AnyKinEqSimpleDriver[/SIZE] KneeDriverRight={
[SIZE=3]AnyKinMeasureOrg[/SIZE] &ref1 =...HumanModel.Interface.Right.KneeFlexion;
[SIZE=3]AnyKinMeasureOrg[/SIZE] &ref2 =...HumanModel.Interface.Right.KneeExternalRotation;
[SIZE=3]AnyKinMeasureOrg[/SIZE] &ref3 =...HumanModel.Interface.Right.KneeAbduction;
DriverPos = pi/180*{
.JntPos.Right.KneeFlexion,
.JntPos.Right.KneeExternalRotation,
.JntPos.Right.KneeAbduction
}; 
DriverVel={0.0,0.0,0};
CType = {ForceDep,ForceDep,ForceDep};
Reaction.Type={Off,Off,Off};
};

[SIZE=3]AnyKinEqSimpleDriver[/SIZE] KneeDriverTRight={
[SIZE=3]AnyKinMeasureOrg[/SIZE] &ref4 =...HumanModel.Interface.Right.KneeTranslationX;
[SIZE=3]AnyKinMeasureOrg[/SIZE] &ref5 =...HumanModel.Interface.Right.KneeTranslationY;
[SIZE=3]AnyKinMeasureOrg[/SIZE] &ref6 =...HumanModel.Interface.Right.KneeTranslationZ;
DriverPos =1*{
.JntPos.Right.KneeTranslationX,
.JntPos.Right.KneeTranslationY,
.JntPos.Right.KneeTranslationZ}; 
DriverVel={0.005,0.005,0.0};
[SIZE=3]// CType = {ForceDep,ForceDep,ForceDep};
[/SIZE]Reaction.Type={Off,Off,Off};
};


[SIZE=3]//Patella driver
[/SIZE][SIZE=3]AnyKinEqSimpleDriver[/SIZE] PatellaDriverRight={
[SIZE=3]AnyKinMeasureOrg[/SIZE] &ref1 =...HumanModel.Interface.Right.PatellaFlexion;
[SIZE=3]AnyKinMeasureOrg[/SIZE] &ref2 =...HumanModel.Interface.Right.PatellaExternalRotation;
[SIZE=3]AnyKinMeasureOrg[/SIZE] &ref3 =...HumanModel.Interface.Right.PatellaAbduction;
DriverPos = pi/180*{
.JntPos.Right.PatellaFlexion,
.JntPos.Right.PatellaExternalRotation,
.JntPos.Right.PatellaAbduction
}; 
DriverVel={0.40,0.50,0.000000006};
[SIZE=3]// CType = {ForceDep,ForceDep,ForceDep};
[/SIZE]Reaction.Type={Off,Off,Off};
};
[SIZE=3]AnyKinEqSimpleDriver[/SIZE] PatellaDriverTRight={
[SIZE=3]AnyKinMeasureOrg[/SIZE] &ref4 =...HumanModel.Interface.Right.PatellaTranslationX;
[SIZE=3]AnyKinMeasureOrg[/SIZE] &ref5 =...HumanModel.Interface.Right.PatellaTranslationY;
[SIZE=3]AnyKinMeasureOrg[/SIZE] &ref6 =...HumanModel.Interface.Right.PatellaTranslationZ;
DriverPos = 1*{
.JntPos.Right.PatellaTranslationX,
.JntPos.Right.PatellaTranslationY,
.JntPos.Right.PatellaTranslationZ}; 
DriverVel={0.000000005,0.000000000050,0.0000000000030};
[SIZE=3]// CType = {ForceDep,ForceDep,ForceDep};
[/SIZE]Reaction.Type={Off,Off,Off};
};

Now the model hasn´t the muscles. For the aim of the project i would investigate what kind of stress will be create in the ligaments of the knee, when I shall aplly force and torque obtained by experimental data in the shank. Am I in a correct way?

I´m sorry but in my departement there isn´t a person that knows AnyBody package so I´m alone to work.

Thanks a lot for your help
Giovanni

That’s possible, but not easy.

You would need to have the subject-specific bones (STL files), construct and FDK model with all ligaments, and provide a good initial guess to your FDK model.

Otherwise that would not work. How are you planning to validate your model?

Could you make a list of things that you have for this project? We can recommend something based on that.

Pavel

For the model I´ll use the STL bones just present in AnyBody, and I´m started from the “kneeload.any” from the model repository. I have eliminated all the trunk bones, and I´ve keeped only pelvis and sacrum.

I´have just put all the ligaments with AnyForce how you have kindly advised to me in the other forum.

I have change the joint in this way:

  • hip ->shperical joint;
  • ankle -> revolute joint(flexion);
  • subtalar -> revolute joint(pronation)
  • tibio,femural -> free;
  • patello,femural ->free;

I miss to define the muscles and the contact condiction, the kinematics runs, but the inverse dynamics fails.

when I have finished the model I´ll put the force from experimental data in the shank and I´ll see what will happen in the knee to vary the input forces. There aren´t real data to compare, I think.

Thanks,
Gio

Hi,

  1. Revert to the original model, make sure it runs. Try to model a single DOF to be contact force-dependent to understand how it works.

  2. Next thing is to try adding your loads - it is not certain that given configuration of passive structures (ligaments) can provide equilibrium.

  3. If this works you can change DOFs one by one to be force-dependent.

Pavel.

P.S. The fact of successful kinematic analysis with wrong kinematics does not help you.

Thanks Pavel,

So I think that re-started from the base model with revolute knee and patella joints and I´ll see until when I could eliminate degree of freedom in the knee, putting at their places FDK equation.

Could be a Good way?

Regards,
Giovanni

Yes, that’s what i meant. Try to understand how FDK works - you need to define surface contact forces, choose DOF that is most likely affected, etc.

Pavel

Hi Pavel,

I have put the contact model and now then as driver for the simple knee revolute joint is this:

[SIZE=3]
AnyMoment3D[/SIZE] moment = 
{
[SIZE=3]AnyFunInterpol[/SIZE] ForceFunction ={
T={0,0.125,0.25,0.375,0.5,0.625,0.75,0.875,1};
Data ={{1,3000,55000,88000,500000,1000000,2000000,3000000,3700000}}; [SIZE=3]//Try to alter these number and see the position change when runnig inverse analysis
[/SIZE]Type=Bspline;
};
M={ForceFunction(Main.Study.t)[0],0,0};
[SIZE=3]AnySeg[/SIZE] &ShankNode = Main.HumanModel.BodyModel.Right.Leg.Seg.Shank;
};

That allow the movement of the shank, how I would do.

However the Inverse dynamic run but very very slowly, Could I put directly a vector for the force in this way:

AnyMoment3D moment = {

AnyVec Force = {0,200,300,400,500,600,700,800,900,1000,1200,1300,1400};

M = {Force[i],0,0};
};

Where i is the step that is running?

Very best regards,
Giovanni

Hi Giovanni,

No, it can’t be done, but you made it correct with the AnyFunInterpol and it is essentially the same thing, no drawbacks.

The slow computation is the FDK - it solves differential equations to find the equilibrium state for your system. This is why it is very important to give a good initial guess and use forces that will not disturb the equilibrium too much. A good initial guess will speed up the computation time too.

Best regards,
Pavel

So if I put very big forces or moments, that could alter the initial model in a very dangerous way the software will be more slow in its computational work. Is this exactly?

Regards, Giovanni

Yes, generally it is not a very good idea.
Pavel

Why if I put a minus in the definition of the Moment the shank moves itself in the same direction of plus value?

Regards,
Giovanni

Don’t Worry Pavel, I have found the reason!!!

Thanks,
Giovanni