Muscle recruitment solver

Hi ~

I encountered a problem when I was learning muscle modeling.I made a very example test,but always show :Muscle recruitment solver: solve aborted after maximum number of line-search iteration. Why:confused:?

But ,when changed the ‘Axis=y’ to ‘Axis=x’ or ‘Axis=z’,the example run successful

the changed code :
AnyPrismaticJoint Joint={
Axis = y;
AnyRefFrame & hel= Main.MyModel.GlobalRef.global;
AnyRefFrame & global=Main.MyModel.segment.center;
};

thank you very much for you time and help.

Hi Yang Yang,

This is the algorithm’s way of telling you that the equilibrium cannot be obtained with the muscle configuration you have. Possibly the muscles you have are able to carry loads around the x and z axes but not around the y axis.

Best regards,
John

Hi John
thank you help,I can't understand why The direction of elongation along x and z axis is ok but around the y axis ? In my mind , The direction of elongation is the same and there are no difference between the x y and z axis .
If I need the segment move along the y axis ,How to set the program?
thank you very much ~~~~

Yang Yang, it’s really very simple. When axis is ‘y’ you have segment above the global reference frame. Muscles can only pull, but to hold segment up against gravity, the muscle would have to push.

If you reverse gravity from -9.81 to 9.81, then it works.

John

Thank you for your help, with you help I solve the problem .

ERROR(OBJ.MCH.MUS4) : C:/U…s/t…k/D…p/A…3/AMMR/A…n/E…s/S…l/SitUpModel.Main.any(70) : Study.InverseDynamics : Muscle recruitment solver : solver aborted due to singular KKT matrix.

Hi dear Sir I am facing these problem whenever I tried to change number of steps from 51 to 5 or 10 please help me out sir.

#include “…/libdef.any”

// Find a detailed description here
#include “Model/Description.any”

Main = {
// ----------------------------------------------------------
// Path to draw settings
// ----------------------------------------------------------
#path BM_DRAWSETTINGS_FILE “Model/DrawSettings.any”

// ----------------------------------------------------------
// Model configuration:
// For more info on body model configuration options please load the model and double click on:
// #include “<ANYBODY_PATH_BODY>\Documentation\BodyModel.parameters.any”
// ----------------------------------------------------------

// The Mannequin file specifies load-time positions for all the segments
// in the HumanModel. This is important for the model’s ablity to resolve
// all the kinematic constraints when the model is analyzed.
// The mannequin file also drives those degrees of freedom of the human
// model that are not governed by problem-specific drivers at run time.
#path BM_MANNEQUIN_FILE “Model/Mannequin.any”

// #define BM_TRUNK_MUSCLES CONST_MUSCLES_NONE
// #define BM_LEG_MUSCLES_BOTH CONST_MUSCLES_NONE
// #define BM_ARM_MUSCLES_BOTH CONST_MUSCLES_NONE

// Model of the human body to be used for the analysis
#include “<ANYBODY_PATH_BODY>/HumanModel.any”

/// The actual model where all components are assembled
AnyFolder Model =
{
/// Body model without default drivers
AnyFolder &HumanModel=.HumanModel.BodyModel;
/// Reference to the mannequin folder (used by drivers)
AnyFolder &Mannequin =.HumanModel.Mannequin;

#include "Model/Environment.any"   

AnyFolder ModelEnvironmentConnection = {
  #include "Model/JointsAndDrivers.any"
};

//--&gt;Folder for design parameters
AnyFolder Parameters = 
{
  AnyVar Distance_From_PelvisContactNode_To_HeelNode = 0.6;
};
//&lt;--

//--&gt;Use of the object name to insert additional objects inside
HumanModel.Trunk.SegmentsLumbar.PelvisSeg = 
{
  AnyRefNode ContactNode = 
  {
    sRel = .Scale({-0.02, -0.18, 0});
    AnyDrawRefFrame Drw = 
    {
      ScaleXYZ = 0.1*{1, 1, 1};
      RGB = {1, 0, 0};
    };
  };
};
//&lt;--

};

AnyBodyStudy Study = {
AnyOperationShellExec ConvertToAPDL=
{
Show=On;
FileName =“AnyFE2APDL.exe”;
Arguments ="-i\C:\Users amuk\Desktop\AMMRV1.6.3\AMMR\Application\Examples\SitUpModel\Model\ForceL5.xml-o\C:\Users amuk\Desktop\AMMRV1.6.3\AMMR\Application\Examples\SitUpModel\Model-t\C:\Users amuk\Desktop\AMMRV1.6.3\AMMR\Application\Examples\SitUpModel\Model\APDLsitup.txt";
WorkDir=“C:\Users amuk\Desktop\AMMRV1.6.3\AMMR\Application\Examples\SitUpModel\Model”;
};

AnyFolder &Model = .Model;

tEnd = 10;
Gravity = {0.0, -9.81, 0.0};
nStep = 5;
AnyMechOutputFileForceExport ForceOutput = 
 {
   FileName = "Output\ForceL5.xml";
   /*NumberFormat = thats fine t
   {
   Digits = 15;
   Width = 22;
   Style = ScientificNumber;
   FormatStr = "";
   };*/
   AllSegmentsInStudyOnOff = Off;
   XMLformatOnOff = On;
   UseRefFrameOnOff = Off;
   AnySeg &L5Seg = Main.HumanModel.BodyModel.Trunk.SegmentsLumbar.L5Seg;
   AnyRefFrame &L5RefFrame = Main.HumanModel.BodyModel.Trunk.SegmentsLumbar.L5Seg;
 };    

AnyMechOutputFileForceExport FE_out =
{
FileName = “files_in/ForceL5.xml”;
UseRefFrameOnOff = On;
AnyRefFrame &L5RefFrame = Main.HumanModel.BodyModel.Trunk.SegmentsLumbar.L5Seg;
AllSegmentsInStudyOnOff = Off;
XMLformatOnOff = On;
//AllSegmentsInStudyOnOff = Off;
AnySeg &L5 = Main.HumanModel.BodyModel.Trunk.SegmentsLumbar.L5Seg;
};

//include the next line to have a camera in the model

}; // End of study

// Include an operation sequence to run all required steps of your application (see Operations tab)
#include “<ANYBODY_PATH_TOOLBOX>\Operations\RunAppSequence.any”

}; //Main

The error message means that AMS cannot find a muscle activation to deal with the motion. I would suggest to keep 51 steps if that runs.