Error during Parameter Identification

Hello AnyBody Community,

  • AnyBody.8.0.x
  • AMMR4-Beta
  • Plug-in-gait_MultiTrial_StandingRef with flexible thoracic model, incorporating simple muscles+ligaments+non linear disc+soft rhythm for all 3 spine region
  • Driven by mocap data of several subjects, reflecting ADL movements

I seem to encounter an issue when running parameter identification for some of the subjects. The error as below:-

During loading (but succesfully loaded):

Configuring model...
Evaluating model...
ERROR(SCR.EXP.FUN2) : MusclesRight.any(1835) : Defined at : SplineMuscle.ClassTemplate.any(419) : Error in function InsertionFun_Offset : Parameter has an invalid value for this interpolation; extrapolations are not allowed.
ERROR(SCR.EXP.FUN2) : MusclesLeft.any(1824) : Defined at : SplineMuscle.ClassTemplate.any(419) : Error in function InsertionFun_Offset : Parameter has an invalid value for this interpolation; extrapolations are not allowed.

Upon running parameter identification:

0.1.0.0.0.0.0) InitialConditions (Operation: Main.Studies.ParameterIdentification.KinematicStudyForParameterIdentification.InitialConditions):
ERROR(SCR.EXP0) : MusclesRight.any(1835) : Defined at : SplineMuscle.ClassTemplate.any(416) : UpdDesign : Error in evaluation. Please refer to the following error messages for details ...
ERROR(SCR.EXP.FUN2) : MusclesRight.any(1835) : Defined at : SplineMuscle.ClassTemplate.any(419) : Error in function InsertionFun_Offset : Parameter has an invalid value for this interpolation; extrapolations are not allowed.

I haven't changed anything on the AnyBodyModel. The error occurs for a small number of subjects but it was successful for the rest of the group.

I can't work out what went wrong. I figured it must be the data from C3D files but I am not sure what it is.

Let me know! Thanks.

Kind regards,
Faizal

Hi @faizalkamarol

Can you try to change some code for me.

On line 395: in file Body\AAUHuman\BodyModels\GenericBodyModel\SplineMuscle.ClassTemplate.any

Change: Type=Bspline; to Type=PiecewiseLinear;

So it reads:

AnyFunInterpol InsertionFun_Offset = { 
   T= linspace(0,1.0,.Insertion_Size);
   Type=PiecewiseLinear;  
   Data={ linspace(0,1,.Insertion_Size)+.Offsets.Offset/.Insertion_L};
}; 

The line numbers maybe different from you if you are using a slightly different version.

Can you test that and see if that helps, and let me know if it does..

This an area where the implementation became quite difficult to do in AnyScript. So there are room for simplifications.

Best wishes,
Morten

1 Like

Hi @melund,

Thank you for the solution! It helps to solve the param identf process for most (2/3 that were failed previously) whilst a very small minority (1/3) still unable to solve. But I think it might be because of something else (which I am still exploring...).

For the sake of consistency of my experimental procedure, do you think I should rerun all other (previously) successful param idenf studies for the rest of the subject cohort or this is unnecessary? Sorry, if this question sound silly...

Thank you very much.

Kind regards,
Faizal

I don't think it should be necessary. But if you have a setup that allow you to easily rerun things, then I would probably do it anyway.

Also, if you have the option to use version 8.1.1 then try that. It fixes some issues introduced in 8.1, which could cause the parameter optimization to fail for no good reason.

1 Like