ERROR(OBJ.MCH.MUS4) : AnyMoCapModel.any(65) : InverseDynamicStudy.InverseDynamics : Muscle recruitment solver : solver aborted due to singular KKT matrix

Dear all,
I have a human standing wearing an exoskeleton (I'm trying to simulate 3 different exoskeleton configurations with different DOFs each). I'm using motion data from a c3d file to drive the human model (however, it is a static motion). The exoskeleton is attached via nodes and drivers at three points. All drivers are soft drivers using weights. (The exoskeleton has 5 DOFs on each side, so 10DOFs in total - for configurations 1 and 2, and 8 DOFs total for configuration 3). I'm trying to use FDK.

Here's a link to the model: ExoTrials_OS.zip - Google Drive

I keep getting the following error message during the inverse dynamics analysis:

3.0.1.0.0.1.0) PreOperation (Operation: Main.Studies.InverseDynamicStudy.InitialConditions.PreOperation):
3.0.1.0.0.1.0.0) InverseDynamicView (Operation: Main.ModelSetup.Views.SetViewMacros.InverseDynamicView):

Macro command : InverseDynamicView(1:1)> classoperation Main.ModelSetup.Views.InverseDynamicView"Set View"

3.0.1.0.0.2) ...Kinematic analysis completed.
WARNING(OBJ.MCH.KIN7) : Muscle.any(1189) : trapezius_scapular_inter_7.SPLine : Penetration of surface : cyl : Via-point 'O_trapezius_scapular_inter_7' on 'SPLine' is located below the wrapping surface'cyl
WARNING(OBJ1) : Mus.any(1342) : BicepsFemorisCaputBreve1.SPLine : Number of allowed iterations during contact penetration removal has been exceeded in line segment 0. Final error at time 0.13 : 0.00416548 rel error, 0.00529959 abs error
WARNING(OBJ1) : Mus.any(2935) : Plantaris1.SPLine : Number of allowed iterations during contact penetration removal has been exceeded in line segment 0. Final error at time 0.13 : 0.0114637 rel error, 0.0285077 abs error
WARNING(OBJ1) : Muscle.any(812) : latissimus_dorsi_2.SPLine : Number of allowed iterations during contact penetration removal has been exceeded in line segment 0. Final error at time 0.13 : 0.0166347 rel error, 0.0484398 abs error
WARNING(OBJ1) : Mus.any(1230) : RectusFemoris2.SPLine : Number of allowed iterations during contact penetration removal has been exceeded in line segment 0. Final error at time 0.13 : 5.557e-08 rel error, 1.67296e-07 abs error
WARNING(OBJ1) : Mus.any(1342) : BicepsFemorisCaputBreve1.SPLine : Number of allowed iterations during contact penetration removal has been exceeded in line segment 0. Final error at time 0.13 : 0.00185758 rel error, 0.00229458 abs error
WARNING(OBJ1) : Mus.any(2935) : Plantaris1.SPLine : Number of allowed iterations during contact penetration removal has been exceeded in line segment 0. Final error at time 0.13 : 0.0115836 rel error, 0.0286222 abs error
3.0.1.0.0.3) ...Dependent variables are fully updated.
3.0.1.0) Inverse dynamic analysis...
WARNING(OBJ1) : Mus.any(2935) : Plantaris1.SPLine : Number of allowed iterations during contact penetration removal has been exceeded in line segment 0. Final error at time 0.13 : 0.0102064 rel error, 0.049378 abs error
WARNING(OBJ1) : Muscle.any(812) : latissimus_dorsi_2.SPLine : Number of allowed iterations during contact penetration removal has been exceeded in line segment 0. Final error at time 0.13 : 0.0166347 rel error, 0.0484398 abs error
WARNING(OBJ1) : Mus.any(1342) : BicepsFemorisCaputBreve1.SPLine : Number of allowed iterations during contact penetration removal has been exceeded in line segment 0. Final error at time 0.13 : 0.00185758 rel error, 0.00229458 abs error
WARNING(OBJ1) : Mus.any(2935) : Plantaris1.SPLine : Number of allowed iterations during contact penetration removal has been exceeded in line segment 0. Final error at time 0.13 : 0.00712381 rel error, 0.0415127 abs error
WARNING(OBJ1) : Mus.any(1342) : BicepsFemorisCaputBreve1.SPLine : Number of allowed iterations during contact penetration removal has been exceeded in line segment 0. Final error at time 0.13 : 0.00362251 rel error, 0.00455152 abs error
WARNING(OBJ1) : Mus.any(2935) : Plantaris1.SPLine : Number of allowed iterations during contact penetration removal has been exceeded in line segment 0. Final error at time 0.13 : 0.0102064 rel error, 0.049378 abs error
WARNING(OBJ1) : Muscle.any(812) : latissimus_dorsi_2.SPLine : Number of allowed iterations during contact penetration removal has been exceeded in line segment 0. Final error at time 0.13 : 0.0166347 rel error, 0.0484398 abs error
WARNING(OBJ1) : Mus.any(1342) : BicepsFemorisCaputBreve1.SPLine : Number of allowed iterations during contact penetration removal has been exceeded in line segment 0. Final error at time 0.13 : 0.00185758 rel error, 0.00229458 abs error
WARNING(OBJ1) : Mus.any(2935) : Plantaris1.SPLine : Number of allowed iterations during contact penetration removal has been exceeded in line segment 0. Final error at time 0.13 : 0.00712381 rel error, 0.0415127 abs error
ERROR(OBJ.MCH.MUS4) : AnyMoCapModel.any(65) : InverseDynamicStudy.InverseDynamics : Muscle recruitment solver : solver aborted due to singular KKT matrix
ERROR(OBJ.MCH.MUS4) : AnyMoCapModel.any(65) : InverseDynamicStudy.InverseDynamics : Muscle recruitment solver : solver aborted due to singular KKT matrix

I've played with different driver weights and reaction forces in multiple ways but nothing seems to work.

Looking forward to your help!

Many thanks in advance,

OS

Hi Olivia,

We have a wiki page on FDK solver that may help you a little bit.

Before I look into your model, I have some comments/suggestions.

How many FDK DOFs are you using? Are you able to run your model without the FDK DOFs? If not, then that is the first thing you should look at. In general, I think adding FDK adds a layer of complexity to the model that can be hard to understand. My suggestion would be to remove all the FDK DOFs, make sure you have a model that runs, and then bring in the FDK DOFs one by one, ensuring that the model runs after every FDK DOF that you add.

Best regards,
Dave

Hi Dave,

thanks for your reply! I get the "singular KKT matrix" error regardless of whether I enable FDK or not. I want to implement 2 FDK DOFs (at the left humerous-exo armshell interface via ExoConnectionMuscles.any - this file is included via EnvironmentModel.any).
This is the link to the most recent model (with FDK disabled): ExoTrials_OS_27-03-24.zip - Google Drive

Best regards,
OS

Hi Olivia,

I spent some time looking at the model and I haven't completely figured it out but I have a few points for you to look into.

I think the parameter optimization process is not set up correctly. I loaded the original parameter file and ran marker tracking and the leg of the model seems to be shorter than what the markers suggest. There is a difference of around 7 cm between the knee markers on the model and the c3d file. A consequence of the short leg is that in the end your model looks like it is standing on its toes because there is a foot marker that keeps the foot on the ground.

So, I tried to run Parameter Optimization process again and the whole model gets in a really bad shape. The problem is that the model has too much freedom and parameter optimization can't work like this. Looking at the leg again, the knee markers can be optimized in all three axes and also the leg length can be optimized. This means that there is too much freedom. All solutions are good in this case... the model can change the leg size and move the markers away from the knee. Normally, the markers located on anatomical landmarks (like knee, shoulder, elbow, etc) should not be optimized as normally these markers are precisely located. Please think about your marker protocol and the optimization directions.

Another problem that I saw with the model is that the exoskeleton is attached to the human body in marker tracking but when you run inverse dynamics analysis, the exoskeleton is not attached to the body. Can you please check if these drivers are correctly implemented in the inverse dynamics study? I see there are some extra drivers in the marker tracking but in inverse dynamics there is an input file that is read into the model. Maybe there is some conflict somewhere.

Is there any specific reason you are using the shoulder rhythm? Normally, when you have a shoulder marker, then you don't need to use shoulder rhythm. Rather it can create some conflicts with marker data.

I will share a couple of links that can be helpful on how to proceed in general with mocap models and connecting an exoskeleton.

Generally, my advice will be to proceed step-by-step for exoskeleton and ensure that you have a working model at all times:

  • Start without exo and ensure kinematics and inverse dynamics work.
  • Add exo model and ensure kinematics work. Maybe at first just include the exo to the model and add some fake drivers, and then try to work on connecting the exo to the human kinematically.
  • Finally attempt to make the kinetic connection.

I hope this helps a bit to move you forward.

Best regards,
Dave

Dear Dave,
thank you a lot for all of your helpful feedback!
I've managed to solve the problem for the model without FDK. To anyone interested, here's what I did:

First, I adjusted my marker protocol with regard to optimization and position. After that, I was able to run Parameter Optimization with the result that the model is no longer standing on its toes.

Afterwards, I re-positioned all contact cylinders and implemented AnyReacForces at the humerous-exo-interface.

Now my model runs with predicitive contact elements. As a next step, I will implement FDK one DOF at a time, as suggested by Dave.

Best regards,
Olivia

Hi Olivia,

Great to hear that you have managed to get going, and thanks for sharing the changes you made :slight_smile:

Best regards,
Dave