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