Hill Muscle Model Problem

Hi,
I have some questions regarding the use of the 3 element hill muscle model.
I am using the HumanStanding Model as template for the simulation of a squat motion. First i defined my drivers (knee flexion, hip flexion, pelvis thorax flexion) and some other constraints. When i am using the TLEM leg model with simple muscles everything is fine but when i am using the 3E hill type muscles i get an over error tolerance error in the calibration study when running initial conditions.
When i run the calibration sequence everything i am getting no errors.

  1. I noticed that using the hill type muscles the number of joints, drivers and reaction forces is increased in the study object description, where does this come from?
  2. I have 120 dof and with simple muscles 90 and hill muscles 115 reaction forces, could this be the source of my error?

Thanks in advance.

P.S. I am using AMMr 1.6.3 and AnyBody 6.0.5

Dear Bella,
unfortunately, I cannot reproduce your error. I can load a model based on the HumanStanding template and switch between simple and 3E muscles.

Are you sure your Repository is fresh? Did you do any other changes. As mentioned on your other posts, please upload your model if it will not solve.

Dear Amir,
Thank you for your fast response. I started building a new model based on the Standing Model template and i tracked down the error.
I found that the error only occurs if i include a file called “CoMview.any” which simply visualizes the position of the center of mass.
When i exclude this file everything works fine do you have any suggestions why?

This is the code of the CoMview.any file:
AnyFolder Human_CoM = {

AnyKinCoM human_CoM = {
AnyFolder& human = Main.HumanModel;
};

AnySeg dummySeg =
{
Mass = 0;
Jii = {0, 0, 0};
r0 = …HumanModel.BodyModel.Trunk.SegmentsLumbar.PelvisSeg.r0;
Axes0 = …HumanModel.BodyModel.Trunk.SegmentsLumbar.PelvisSeg.Axes0;
AnyDrawNode drw =
{
ScaleXYZ={1,1,1}*0.03;
RGB = {0, 248, 208} / 255;
};
};

// The equality constraints set all components in the organized measure to zero
// Lock all rotations of the dummy segment wrt to the global reference frame
AnyKinEq rotCon =
{
AnyKinRotational rot=
{
AnySeg& ref = …dummySeg;
Type = RotAxesAngles;
};
};

AnyKinLinear lin=
{
AnySeg& ref = .dummySeg;
};

AnyKinEq human_CoM_Drv =
{
AnyKinMeasureLinComb lincomb =
{
AnyKinLinear &ref1 = …lin;
AnyKinCoM &ref2 = …human_CoM;
Coef={{1,0,0,-1,0,0},{0,1,0,0,-1,0},{0,0,1,0,0,-1}};
OutDim = 3;
};
};
};
Thanks again,
Bella

Hi Bella,

the problem is here:

AnyFolder& human = Main.HumanModel

When you switch to 3E muscles, the HumanMOdel folder will include all the calibration files with additional constraints. Those calibrations are not active for the simple muscles, so no additional constraints.

If you write instead:

AnyFolder& human = Main.HumanModel.BodyModel

everything will be fine. Then you only point to the segments in the BodyModel and you will exclude the calibration.

Dear Amir,
Thanks. Now everything works.

OK its me again. Im sorry to bother you but i dont understand why this problem occurs.
In my drivers folder i changed one constraint about the pelvis and now suddenly the inverse dynamic analysis fails again when the CoMview file is included, do you have any suggestions?

With this pelvis driver and CoMview it works:
AnyKinEqSimpleDriver PelvisGroundDriverRotY ={
AnyKinRotational rot ={
AnyFixedRefFrame &ref1 = Main.Model.Environment.GlobalRef;
AnySeg &ref2 = Main.HumanModel.BodyModel.Trunk.SegmentsLumbar.PelvisSeg;
Type=RotAxesAngles;
};
MeasureOrganizer = {1};
DriverPos=pi/180*{.JntPos.PelvisRotY};
DriverVel=pi/180*{.JntVel.PelvisRotY};
Reaction.Type={On};
};

With this pelvis driver and CoMview it doesnt work -> solver aborts due to singular KKT matrix:
AnyKinEqSimpleDriver PelvisZ ={
AnyKinLinear PelvisPosZ ={
AnyFixedRefFrame &Ground = Main.Model.Environment.GlobalRef;
AnyRefNode &Ball = Main.HumanModel.BodyModel.Trunk.SegmentsLumbar.PelvisSeg.HipJointsCenterTD;
};
MeasureOrganizer ={2};
DriverPos ={0.0};
DriverVel ={0.0};
Reaction.Type = {Off};
};
Thanks again,
Bella

Dear Amir,
I am sorry to bother you again but i still have a question.
I changed the drivers of my model and now i can run the initial condtitions and the kinematic analysis without any errors but still the inverse dynamics aborts due to a singular KKT matrix where could this come from?
Thank you,
Bella

please be aware that the rules of this forum include:

Please provide valid Name & Company/Affiliation in order to expect support in the forum!