Hey AnyBody-Team!

I’m working on a model of a dragonfly to calculate the muscle activity during biting. I have the force data and some marker movements. The whole model is set up on the information of micro ct scans which are used to get the RefNodes and Joints centers.

I know that it is a lot work to get into a new model and find mistakes, so thanks in advance!

In the first step, I wanted the two joints at the mandible (Gelenk and Gelenk1) to be Spherical joints, because this is what they are in reality. The error message I got was:
WARNING(OBJ.MCH.DYN2) : C:/U…s/s…d/D…s/A…B/A…o/A…t/ModellAlex2main.any(199) : MyStudy : Model contains redundant constraint reactions :
List of redundant reactions:
0: Main.MyModel.Joints.Gelenk.Constraints.Reaction[2]

After reading through many forum entries I decided to change the two joints into one revolute joint with the axes going through both joints. Now the kinematics run without any errors.
But when it comes to the Inverse Dynamics, I get an error at time step 81 with the following message:

ERROR(OBJ.MCH.MUS4) : C:/U…s/s…d/D…s/A…B/A…o/A…t/ModellAlex2main.any(205) : MyStudy.InverseDynamics : Muscle recruitment solver : solver aborted due to singular KKT matrix

I also tried different Criterion types for the inverse dynamics with the same result.

As we have really great and probably unique data, we would be really happy if someone could have a look into the model.
Ps: If there is a solution to run it with the two spherical joints that would be great!
I’m using AnyBody Version 6. 0. 5. 4354 (64-bit version) and AMMR v.1.6.2

Thanks a lot!

Hi Sina,

Very interesting model !

I think the issue could be related to the shene segment being difficult to balance for the muscles.

This segment is connected using a spherical joint and there is a “plane” muscle configuration to balance this segment, i think the error relates to these muscles not being able to balance the shene segment.

To test this i added these lines in the joints file:

AnyReacForce test ={

AnySphericalJoint &ref=.SehnengelenkRechts ;

This made the model run through inverse dynamics.

These lines will add reactions on the spherical joints so there will be moments added in the joint to ensure the balance is ok .

I am not sure this what you want … but it may not be too unrealistic…
Instead of a reaction force it could also be made with artificial torque generating muscles of limited strength.

Concerning the first question i am not sure why it helped using revolute joints, this adds more constraints than the spherical joints, and should lead to more such warnings, if this is still an issue please upload the model in this configuration.

Best regards

Hey Soren!

Thanks a lot, this was exactly what I needed! Just for my understanding: What does it mean if the muscles have a “plane” configuration? Are there any other configurations?

I worked again at the model with the two spherical joints and even tried to include your suggestion with the reaction forces. Than the kinematics run but the muscles are not loaded due to kinematical overdetermination. I understand that having two joints on in that position is more constraints than needed, but if I want to have the joint reaction forces I’ll need both.

Is there any option to solve this problem?

And can you give me a hint how to deal with this warnings? :

WARNING(OBJ.MCH.MUS1) : C:/U…s/s…d/D…s/A…B/A…o/D…y/ModellAlex2main.any(199) : MyStudy : The muscles in the model are not loaded due to kinetically over-constrained mechanical system.
WARNING(OBJ.MCH.DYN2) : C:/U…s/s…d/D…s/A…B/A…o/D…y/ModellAlex2main.any(199) : MyStudy : Model contains redundant constraint reactions :
List of redundant reactions:
0: Main.MyModel.Joints.Gelenk.Constraints.Reaction[0]
1: Main.MyModel.Joints.Gelenk.Constraints.Reaction[1]
2: Main.MyModel.Joints.Gelenk.Constraints.Reaction[2]
3: Main.MyModel.Joints.test1[0]
4: Main.MyModel.Joints.test1[1]
5: Main.MyModel.Joints.test2[2]

I reloaded the model in the Two-Spherical-Joints-Configuration.

Thank you for your help!
Sina and the Dragonfly-Team :slight_smile:

Hi Sina,

I took a closer look at the model and found these things:

1: the drivers of had reactions on these needs to be swicthed off… otherwise they will carry loads…
so write like this for all of them:

    AnyKinDriverMarker C3DMotion={
      AnyRefFrame & Marker=Main.MyModel.Segs.mandibel.Spitze;
      AnyParamFun &Trajectory=Main.MyModel.c3d.Points.Markers.markername.PosInterpol;
     CType = {Soft, Soft, Soft}; 

2: There are two spherical joints between the same two segments, this create redundant reactions as you have seen, please try to modify one to the joint to look like this:

AnyKinEq Gelenk ={
AnyKinLinear lin ={
AnyRefFrame &Kapsel = Main.MyModel.Segs.kapsel.Gelenkcenter;
  AnyRefFrame &mandibel = Main.MyModel.Segs.mandibel.Gelenkcenter;

MeasureOrganizer ={0,1};  //do not drive z 

in this way the two joints will have five reactions not six and it will be more like a custom revolute joint

3: Then switch off the reaction forces except the one on the shene it still needs to be there to make the balance. I think if you made the muscles pulling on the shene more spread out in terms of the origin area you could avoid this reaction force, this is what i meant by plane system (it is not a setting or such) , sorry for not explaining this in more detail. I think the problem is that the muscles are not able to cover all directions of the shene in its current configuration.

Hope it made sense

Best regards

Hi Sina,

Just a small correction,

Please forget my first item on the list, the reactions are default off specifically for this driver (for almost all other driver reactions are on by default)

Best regards

It works! Thank you for your support!!! Now I can start analyzing hundreds of bites:-)

Is there any manual that helps to come along with these additional reaction forces that help to balance the joints? I’m always struggling with them but was not able to find a proper tutorial or something and I think using them just randomly is not the right answer…


Hi Sina,

There is no manual for these situations perhaps because the resolution is very different from case to case. However, in general, if the reactions are set to OFF and your actuators (muscles) are oriented in a way that they cannot balance the force or if they are properly oriented, but their strengths are lower than that required, the solver will not be able to find a solution because there will be unbalanced forces in the system.
My suggestion here is to always set the reactions to OFF whenever you have muscles actuating on a degree of freedom unless you get back the inverse dynamics failure in which case you can set back some reactions to ON. Nevertheless, you must be aware whether the extra reaction forces/moments make sense for your application. You also need to know your model well to find the joint that might requires extra reaction.

Overall, as Søren suggested, please double check muscle attachments.

Hope it helps,
Mohammad Shourijeh
ABT Support