How to solve "Failed to resolve kinematic constraints. Newton relaxation too small."

Hi,

I have been using AnyBody for a number of months now so I am fairly new to how the code interacts with itself and for a project I have been using the "Plug-in-gait_Simple" Mocap Example found in the AMMR folder provided.

I have opted to use the GRF Prediction instead of force plates since my model is standing upright with the movement recorded consisting mostly of the upper body and arms. Subject data and the c3d file were both adjusted according and the model loads without any outstanding problem.

My query comes when I conduct the RunParameterIdentification operation where it results in the following output messages:

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

0.1.0.0.0.0.2) ...Kinematic analysis completed.
0.1.0.0.0.0.3) ...Dependent variables are fully updated.
0.1.0.0.0) Kinematic analysis...
0.1.0.0.19) ...Kinematic analysis completed
0.1.0.0) Optimization (Operation: Main.Studies.ParameterIdentification.ParameterOptimization):
0.1.0.0.0) Optimization step (Operation: Main.Studies.ParameterIdentification.ParameterOptimization):
0.1.0.0.0.0) Evaluating KKT conditions (Operation: Main.Studies.ParameterIdentification.ParameterOptimization):
0.1.0.0.0.0) Evaluating the objective function (Operation: Main.Studies.ParameterIdentification.ParameterOptimization):
0.1.0.0.0.0) Calculating a new search direction (Operation: Main.Studies.ParameterIdentification.ParameterOptimization):
0.1.0.1.0) Optimization step (Operation: Main.Studies.ParameterIdentification.ParameterOptimization):
0.1.0.1.0.0) Evaluating KKT conditions (Operation: Main.Studies.ParameterIdentification.ParameterOptimization):
Previous AbsSumKinError before decrease of step length: 29.8317670.1.0.1.0.0) Evaluating KKT conditions while decreasing step length (Operation: Main.Studies.ParameterIdentification.ParameterOptimization):
0.1.0.1.0.0) Evaluating KKT conditions while decreasing step length (Operation: Main.Studies.ParameterIdentification.ParameterOptimization):
0.1.0.1.0.0) Evaluating KKT conditions while decreasing step length (Operation: Main.Studies.ParameterIdentification.ParameterOptimization):
0.1.0.1.0.0) Evaluating KKT conditions while decreasing step length (Operation: Main.Studies.ParameterIdentification.ParameterOptimization):
0.1.0.1.0.0) Evaluating KKT conditions while decreasing step length (Operation: Main.Studies.ParameterIdentification.ParameterOptimization):
0.1.0.1.0.0) Evaluating KKT conditions while decreasing step length (Operation: Main.Studies.ParameterIdentification.ParameterOptimization):
0.1.0.1.0.0) Evaluating KKT conditions while decreasing step length (Operation: Main.Studies.ParameterIdentification.ParameterOptimization):
0.1.0.1.0.0) Evaluating KKT conditions while decreasing step length (Operation: Main.Studies.ParameterIdentification.ParameterOptimization):
0.1.0.1.0.0) Evaluating KKT conditions while decreasing step length (Operation: Main.Studies.ParameterIdentification.ParameterOptimization):
0.1.0.1.0.0) Evaluating KKT conditions while decreasing step length (Operation: Main.Studies.ParameterIdentification.ParameterOptimization):
0.1.0.1.0.0) Evaluating KKT conditions while decreasing step length (Operation: Main.Studies.ParameterIdentification.ParameterOptimization):
0.1.0.1.0.0) Evaluating the objective function (Operation: Main.Studies.ParameterIdentification.ParameterOptimization):
0.1.0.1.0.0) Calculating a new search direction (Operation: Main.Studies.ParameterIdentification.ParameterOptimization):
0.1.0.2.0) Optimization step (Operation: Main.Studies.ParameterIdentification.ParameterOptimization):
0.1.0.2.0.0) Evaluating KKT conditions (Operation: Main.Studies.ParameterIdentification.ParameterOptimization):
Previous AbsSumKinError before decrease of step length: 29.8310990.1.0.2.0.0) Evaluating KKT conditions while decreasing step length (Operation: Main.Studies.ParameterIdentification.ParameterOptimization):
0.1.0.2.0.0) Evaluating KKT conditions while decreasing step length (Operation: Main.Studies.ParameterIdentification.ParameterOptimization):
0.1.0.2.0.0) Evaluating KKT conditions while decreasing step length (Operation: Main.Studies.ParameterIdentification.ParameterOptimization):
0.1.0.2.0.0) Evaluating KKT conditions while decreasing step length (Operation: Main.Studies.ParameterIdentification.ParameterOptimization):
0.1.0.2.0.0) Evaluating KKT conditions while decreasing step length (Operation: Main.Studies.ParameterIdentification.ParameterOptimization):
0.1.0.2.0.0) Evaluating KKT conditions while decreasing step length (Operation: Main.Studies.ParameterIdentification.ParameterOptimization):
0.1.0.2.0.0) Evaluating KKT conditions while decreasing step length (Operation: Main.Studies.ParameterIdentification.ParameterOptimization):
Failed to resolve kinematic constraints. Newton relaxation too small. (final kin. error = 3.818724E+00)Constraint no. 12256 above error tolerance 0.000100, error = 0.3831213740387.Constraint no. 12300 above error tolerance 0.000100, error = 0.1883070652376.

I have several recorded c3d files and unfortunately I get the similar output messages for each one. Any aid in fixing this issue would be immensely appreciated.

Hi @lucasvella and welcome to the forum!

The KKT error you are experiencing is due to the fact that the solver can't balance the mechanical system so something is probably missing.

Do you have the force plate data in your c3d files? if so you could try and run it with that.
If not you can inspect if the feet are actually close enough to the trigger volume generated by the GRF prediction tool. It is only inside this volume that the GRF is active - if the feet are outside then the model is floating.

Best regards,
Bjørn

1 Like

Hi Bjørn and thanks for your reply,

The c3d files contain the force plate data, (the data was recorded with the Vicon Nexus system with the subject standing on 2 force plates - with each foot on a separate force plate).

However when I tried to use the force plates it resulted in the same error were the software model did not seem to be in contact with the force plates.

Regards,
Luca

Hi @lucasvella

Have you checked that the settings in the ForcePlates.any are correct?
Here is our wiki page on the most common modification you need to do in a MoCap model

Best regards,
Bjørn