Using GRF_Prediction

Hey,
I want to get a GRF_Prediction by using my own c3d files, but I received this error:

ERROR(SCR.SCN6) : //u…z/e…s/home/m…5/D…s/FYP/0…s/AMMR/Body/A…n/B…s/G…l/BodyModel.any(16) : ‘BM_LEG_RIGHT’ : Unexpected character.

How to fix this?

OP here, I probably using the old GRF Prediction so that is why BM_LEG_RIGHT is not working. However, I used the AMMR FullBody_GRFPrediction and received this error.

Kinematic parameter analysis failed : there are 54 design variables but only 53 independent associated optimality conditions

  • attempts to continue (attempt no. 1)
    Position analysis failed : 1 unsolvable constraint(s) found
    WARNING : System is kinematically indeterminateERROR(OBJ.DES2) : //u…z/e…s/home/m…5/D…s/FYP/0…s/AMMR/T…s/A…p/AnyMoCapModel.any(35) : ParameterIdentification.ParameterOptimization : Optimization failed : Model is kinematically indeterminate

What should I do?

I upload my zip file here if anyone can help!

Hi

I have taken a quick look at the model, i think the hand markers could be an issue. The hand size seems not to be well defined since all three hand makers can be move proximal/distally so i think you need to lock at least one of them in the X direction (this is done in the markerprotocol.any file )

This will ensure that the handlength can be determined by the solver, if all three markers are free in x direction, the problem is unbounded.

hope it helps

Best regards
Søren

Hi,

Thank you for the suggestion! I did not optimized the X axis for the hand so its worked!

But, for the inverse dynamic analysis, I received an error about muscle recruitment solver.

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

WARNING(OBJ.MCH.KIN7) : H:/D…s/FYP/0…s/AMMR/Body/A…n/Arm/Muscle.any(1598) : Palmaris_Longus.SPLine : Penetration of surface : cyl : Via-point ‘Via_Palmaris_Longus’ on ‘SPLine’ is located below the wrapping surface’cyl
WARNING(OBJ.MCH.KIN7) : H:/D…s/FYP/0…s/AMMR/Body/A…n/Arm/Muscle.any(1620) : Flexor_Digitorum_Superficialis__Digit5.SPLine : Penetration of surface : cyl : Via-point ‘Via_Flexor_Digitorum_Superficialis_Digit5’ on ‘SPLine’ is located below the wrapping surface’cyl
WARNING(OBJ.MCH.KIN7) : H:/D…s/FYP/0…s/AMMR/Body/A…n/Arm/Muscle.any(1700) : Flexor_Digitorum_Produndus__Digit5.SPLine : Penetration of surface : cyl : Via-point ‘Via_Flexor_Digitorum_Profundus_Digit5’ on ‘SPLine’ is located below the wrapping surface’cyl
2.1.0.0.2) …Kinematic analysis completed.
WARNING(OBJ.MCH.KIN7) : H:/D…s/FYP/0…s/AMMR/Body/A…n/Arm/Muscle.any(1598) : Palmaris_Longus.SPLine : Penetration of surface : cyl : Via-point ‘Via_Palmaris_Longus’ on ‘SPLine’ is located below the wrapping surface’cyl
WARNING(OBJ.MCH.KIN7) : H:/D…s/FYP/0…s/AMMR/Body/A…n/Arm/Muscle.any(1620) : Flexor_Digitorum_Superficialis__Digit5.SPLine : Penetration of surface : cyl : Via-point ‘Via_Flexor_Digitorum_Superficialis_Digit5’ on ‘SPLine’ is located below the wrapping surface’cyl
WARNING(OBJ.MCH.KIN7) : H:/D…s/FYP/0…s/AMMR/Body/A…n/Arm/Muscle.any(1700) : Flexor_Digitorum_Produndus__Digit5.SPLine : Penetration of surface : cyl : Via-point ‘Via_Flexor_Digitorum_Profundus_Digit5’ on ‘SPLine’ is located below the wrapping surface’cyl
2.1.0.0.3) …Dependent variables are fully updated.
2.1.0) Inverse dynamic analysis…
ERROR(OBJ.MCH.MUS4) : H:/D…s/FYP/0…s/AMMR/T…s/A…p/AnyMoCapModel.any(59) : InverseDynamicStudy.InverseDynamics : Muscle recruitment solver : solver aborted after maximum number of iterations

Do I need to increase the limit of maximum number of iterations?

Hi

This error indicates that the model was unable to create balance, there is simply no way muscle or contact elements on the feets can create balance.

In anybody each timestep is independent from each other so increasing number of nsteps will not help.

I would check these things:
[ul]
[li] Direction of gravity is it specified correctly? this needs to be correct in two places the Gravity property of the study in the labspecific data and in the defintion of the forceplates. I have also noticed the forceplates was rotated wrongly.
[/li][li] In the file Forceplate_GRFprediction.any try to increase the property LimitDistHigh, this controls when contact can occur to if the number is higher the foot do not need to be as close to the ground. see also LimitVelHigh it controls speed limit.
[/li][li] The acceleration of the model could be the reason if your data are not filtered correctly
[/li][li] The model is using a weak residual to the ground that helps holding the balance in the model if the feet contact are not enough, this is defined in the file “Tools/GRFPrediction/Weakresidual.any” here you can increase the strength of the artificial muscles
[/li][/ul]

Hope so of it helps…

Best regards
Søren

Hi,

[ul]
[li]I already specified the direction of gravity to Z direction.
[/li]
[li]I increased the LimitDistHigh to 0.04 and LimitVelHigh to 4.
[/li]
[li]How do I check the acceleration of the model and how do I know if the data are not filtered correctly?
[/li]
[li]I already increased the strength of the artificial muscles from 2 to 15.
[/li][/ul]

However, I still received the same error:

  1. Operation Sequence: (Operation: Main.RunAnalysis):
    0.0) Operation Sequence: (Operation: Main.RunAnalysis.LoadParameters):
    0.0.0) Dummy operation: (Operation: Main.RunAnalysis.LoadParameters.placeholder_operation):
    0.1.0) Load_parameters (Operation: Main.ModelSetup.Macros.Load_parameters):

Macro command : Load_parameters(1:10)> classoperation Main “Load Values” --file="\uoa.auckland.ac.nz\engdfs\home\mmoh885\Downloads\FYP\0_AnybodyDataAnalysis\AMMR\Application\MocapExamples\Plug-in-gait_Simple\Output/GRF_FullBody_DynamicLeftVisual0004.anyset"

Loading and overriding values from : ‘\uoa.auckland.ac.nz\engdfs\home\mmoh885\Downloads\FYP\0_AnybodyDataAnalysis\AMMR\Application\MocapExamples\Plug-in-gait_Simple\Output\GRF_FullBody_DynamicLeftVisual0004.anyset’ …
…Values updated

Macro command : Load_parameters(10:10)> classoperation Main “Update Values”

Updating expressions…
WARNING(OBJ1) : //u…z/e…s/home/m…5/D…s/FYP/0…s/AMMR/Body/A…n/Arm/Muscle.any(1236) : Brach_rad_1.SPLine : Number of allowed iterations for contact solution has been exceeded in Main.HumanModel.BodyModel.Left.ShoulderArm.Mus.Brach_rad_1.SPLine. Final error at time 5.379889e+000: 1.347594e-008 rel error, 3.917643e-007 abs error
…Finished updating expressions
1.0) Operation Sequence: (Operation: Main.RunAnalysis.MarkerTracking):
1.0.0) Dummy operation: (Operation: Main.RunAnalysis.MarkerTracking.placeholder_operation):
1.1.0) Kinematics (Operation: Main.Studies.MarkerTracking.Kinematics):
1.1.0.0) PreOperation (Operation: Main.Studies.MarkerTracking.Kinematics.PreOperation):
1.1.0.0.0) InitialConditions (Operation: Main.Studies.MarkerTracking.InitialConditions):
1.1.0.0.0) …Design variables have been updated.
1.1.0.0.1) …Load-time positions have been re-established.
1.1.0.0.1.0) PreOperation (Operation: Main.Studies.MarkerTracking.InitialConditions.PreOperation):
1.1.0.0.1.0.0) KinematicView (Operation: Main.ModelSetup.Views.SetViewMacros.KinematicView):

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

1.1.0.0.2) …Kinematic analysis completed.
1.1.0.0.3) …Dependent variables are fully updated.
1.1.0) Kinematic analysis…
1.1.129) …Kinematic analysis completed
2.0) Operation Sequence: (Operation: Main.RunAnalysis.InverseDynamics):
2.0.0) Dummy operation: (Operation: Main.RunAnalysis.InverseDynamics.placeholder_operation):
2.1.0) InverseDynamics (Operation: Main.Studies.InverseDynamicStudy.InverseDynamics):
2.1.0.0) PreOperation (Operation: Main.Studies.InverseDynamicStudy.InverseDynamics.PreOperation):
2.1.0.0.0) InitialConditions (Operation: Main.Studies.InverseDynamicStudy.InitialConditions):
2.1.0.0.0) …Design variables have been updated.
WARNING(OBJ.MCH.KIN7) : //u…z/e…s/home/m…5/D…s/FYP/0…s/AMMR/Body/A…n/L…M/Mus.any(1887) : GluteusMaximusSuperior1.SPLine : Penetration of surface : cyl : Via-point ‘GluteusMaximusSuperior1Node’ on ‘SPLine’ is located below the wrapping surface’cyl
2.1.0.0.1) …Load-time positions have been re-established.
2.1.0.0.1.0) PreOperation (Operation: Main.Studies.InverseDynamicStudy.InitialConditions.PreOperation):
2.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"

WARNING(OBJ.MCH.KIN7) : //u…z/e…s/home/m…5/D…s/FYP/0…s/AMMR/Body/A…n/Arm/Muscle.any(1598) : Palmaris_Longus.SPLine : Penetration of surface : cyl : Via-point ‘Via_Palmaris_Longus’ on ‘SPLine’ is located below the wrapping surface’cyl
WARNING(OBJ.MCH.KIN7) : //u…z/e…s/home/m…5/D…s/FYP/0…s/AMMR/Body/A…n/Arm/Muscle.any(1620) : Flexor_Digitorum_Superficialis__Digit5.SPLine : Penetration of surface : cyl : Via-point ‘Via_Flexor_Digitorum_Superficialis_Digit5’ on ‘SPLine’ is located below the wrapping surface’cyl
WARNING(OBJ.MCH.KIN7) : //u…z/e…s/home/m…5/D…s/FYP/0…s/AMMR/Body/A…n/Arm/Muscle.any(1700) : Flexor_Digitorum_Produndus__Digit5.SPLine : Penetration of surface : cyl : Via-point ‘Via_Flexor_Digitorum_Profundus_Digit5’ on ‘SPLine’ is located below the wrapping surface’cyl
WARNING(OBJ.MCH.KIN7) : //u…z/e…s/home/m…5/D…s/FYP/0…s/AMMR/Body/A…n/Arm/Muscle.any(1721) : Flexor_Digitorum_Profundus__Digit4.SPLine : Penetration of surface : cyl : Via-point ‘Via_Flexor_Digitorum_Profundus_Digit4’ on ‘SPLine’ is located below the wrapping surface’cyl
2.1.0.0.2) …Kinematic analysis completed.
WARNING(OBJ.MCH.KIN7) : //u…z/e…s/home/m…5/D…s/FYP/0…s/AMMR/Body/A…n/Arm/Muscle.any(1598) : Palmaris_Longus.SPLine : Penetration of surface : cyl : Via-point ‘Via_Palmaris_Longus’ on ‘SPLine’ is located below the wrapping surface’cyl
WARNING(OBJ.MCH.KIN7) : //u…z/e…s/home/m…5/D…s/FYP/0…s/AMMR/Body/A…n/Arm/Muscle.any(1620) : Flexor_Digitorum_Superficialis__Digit5.SPLine : Penetration of surface : cyl : Via-point ‘Via_Flexor_Digitorum_Superficialis_Digit5’ on ‘SPLine’ is located below the wrapping surface’cyl
WARNING(OBJ.MCH.KIN7) : //u…z/e…s/home/m…5/D…s/FYP/0…s/AMMR/Body/A…n/Arm/Muscle.any(1700) : Flexor_Digitorum_Produndus__Digit5.SPLine : Penetration of surface : cyl : Via-point ‘Via_Flexor_Digitorum_Profundus_Digit5’ on ‘SPLine’ is located below the wrapping surface’cyl
WARNING(OBJ.MCH.KIN7) : //u…z/e…s/home/m…5/D…s/FYP/0…s/AMMR/Body/A…n/Arm/Muscle.any(1721) : Flexor_Digitorum_Profundus__Digit4.SPLine : Penetration of surface : cyl : Via-point ‘Via_Flexor_Digitorum_Profundus_Digit4’ on ‘SPLine’ is located below the wrapping surface’cyl
2.1.0.0.3) …Dependent variables are fully updated.
2.1.0) Inverse dynamic analysis…
ERROR(OBJ.MCH.MUS4) : //u…z/e…s/home/m…5/D…s/FYP/0…s/AMMR/T…s/A…p/AnyMoCapModel.any(59) : InverseDynamicStudy.InverseDynamics : Muscle recruitment solver : solver aborted after maximum number of iterations

What should I do?

Hi

I have taken a quick look at the model and i think the reason for the problems is the accelerations.

Please try to run the kinematic analysis of the inversedynamicsstudy and review the acceleration of the CoM in the weakresidual file.

To fix it try different filter settings on the markers by setting this values in the labspecific fil.

Main.ModelSetup.LabSpecificData.LowPassFilterSettings.MarkerFilterCutOffFrequency

Sorry for the short answer i will try to elaborate later, this is the best i can do today :wink:

Best regards
søren

Hi

If you add the lines below in the WeakResiduals.any file you will be able to see the location of the CoM and the acceleration acting on it as a vector.



AnyDrawSphere Drw = 
  {
    Opacity = 0.5;
    RGB = {0, 1, 1};
    ScaleXYZ = 0.1*{1, 1, 1};
    Position = .CenterOfMass.DummySegDriver.LinComb.CoMMeasure.Pos;
    GlobalCoord = On;
  };

  
  
  AnyDrawLine ACC_display ={
    AnyFixedRefFrame &ref2=Main.Studies.InverseDynamicStudy.EnvironmentModel.GlobalRef;
    p0=.CenterOfMass.DummySegDriver.LinComb.CoMMeasure.Pos;
    p1=p0+0.2*(-.CenterOfMass.DummySegDriver.LinComb.CoMMeasure.Acc+Main.Studies.InverseDynamicStudy.Gravity);
    Line.Thickness=0.01;
  };
  
  AnyDrawLine ACC_display_reverse ={
    AnyFixedRefFrame &ref2=Main.Studies.InverseDynamicStudy.EnvironmentModel.GlobalRef;
    
    p0=.CenterOfMass.DummySegDriver.LinComb.CoMMeasure.Pos;
    p1=(p0+-0.2*(-.CenterOfMass.DummySegDriver.LinComb.CoMMeasure.Acc+Main.Studies.InverseDynamicStudy.Gravity));
    Line.Thickness=0.01;
  };



This reveals that the model is experience strange accelerations in the beginning of the trial and towards the end, so it looks like some sort of interpolation artifact, this is why the model is unable to find equilibrium.

To fix it please try to change the FirstFrame and LastFrame of the study so that these frames are not being analyzed.

It appears that the filtering of the markers introduces some artifacts…espcially on dynamic motions like this one another way to fix it would be export more C3D frames if you did not already export the full trial.

This is done in the TrialSpecificFile.any file


  // This the C3D frame where the analysis starts
  // If not specified it defaults to the first frame of the C3D file
  FirstFrame = .C3DFileData.Header.FirstFrameNo +10;
  
  // This the C3D frame where the analysis ends
  // If not specified it defaults the first frame of the C3D file
  LastFrame = .C3DFileData.Header.LastFrameNo-10;

Additionally in the LabSpecific file you may wan to alter the cutofffrequency it is currently the default value of 5.

This is the object Main.ModelSetup.LabSpecificData.LowPassFilterSettings.MarkerFilterCutOffFrequency

Hope it helps

Best regards
Søren

1 Like

Hi Søren,

Thank you for your guidance! I can finally run the analysis now!

However, I want to ask regarding the results. In what unit is the axis of the GRF prediction? Is it in Newton? Because my GRF prediction Y-axis is around 1500 N for GRF. Is that logical?

Next, how do we get the knee joint moment valgus loading and in what unit?

Cheers
mirulmus

Hi Mirumlus,

A value of 1500N could be ok depending the motion and the subject weight? try to compare with some litterature values to see if you are in the right ballpark.

The unit for the GRF are in Newtons and torques are in Newton meters.

Best regards
Søren

Hi,

My body mass is 55kg and I did a rugby sidestep cutting motion on a force plate. In your opinion, does it sound reasonable?

Thank you!

I have no experience with rugby motion i am sorry.

Please have a look in this publication it can be found through our publication list
at https://www.anybodytech.com/downloads/publications/

2017
Skals S, Jung MK, Damsgaard M, Andersen MS (2017), “Prediction of ground reaction forces and moments during sports-related movements”, Multibody Syst. Dyn., vol. 39, pp. 175-195. [DOI, WWW]