Spine models in AMMRV1.2 and 1.3

Hi Amir

I am comparing the normailzed EMG values using MVC, (percentage of muscle activity) to the precentage of muscle activity values given in AB, not to the muscle force values in AB. It seems to make more sense to compare muscle activity to muscle activity. Why would I want to compare the EMG to the AB force value when AB provides the percentage of muscle activity?

In the AnyBody optimization criterion one of the variables is Nj: “estimate of muscle strength, which is assigned a constant value in AB”. Is this value a force value? How can I change this value in AB?

Sincerely thanks
Damon

Hi Damon,

Nj is the current strength of the muscle, if you use simple muscles, it is the value of F0 in the Muscle parameters. When you use Hill Type muscles this is more tricky, as it is influenced by all parameters that describe the muscle.

Hi Amir

I am wondering with this N value, if I can import a maximum strength value from the subject for this N value, or import the MVC of the subject for this N value; to improve the optimization to be more subject specific. What do you think of this approach? Or do you have some other idea besides using the N variable to do this?

Sincerely
Damon

Hi Damon,

You could use this MVC to set the Upper and Lower Bound of the Muscle Criteria: You will find those values under:
Main.Studies.InverseDynamicStudy.InverseDynamics.Criterion.UpperBound
Main.Studies.InverseDynamicStudy.InverseDynamics.Criterion.LowerBound
You have to switch them “on” and then create a value from the normalized MVC and set these limits.
This was explained a little bit in the muscle recruitment tutorials. Let me know if this is clear or you need more info…

Hi Ami

It seems like upper bound could be set by MVC. But how can maximum MVC and be used to set at lower bound? Can you help me understand this please?

Also, how can using MVC for upper/lower bound help with this?

1- AB is showing zero abdomoninal muscle activity, but EMG is showing some muscle activity ~5%. How can setting the upper or lower bound help to get the AB muscle activity closer to the EMG muscle avtivity?

2-AB is showing a much lower muscle activity than the EMG for the Erector Spenae during the placement phase of the lift. how can setting the upper or lower bound help to get the AB ES muscle activity higher in this phase of the lift.

Thank you for all your help with this.

Sincerely
Damon

Hi Søren

The model I'm using is the GaitFullModel. In the Model tab, in the main folder there are four folders. The folder "Studies" has "HumanModel", "InverseDynamicStudy" and "LoadParametersOptimizationResults". In the InverseDynamicStudy folder there is "Output". And also in the LoadParametersOptimizationResults is an "Output". In the HumanModel there is BodyModel, which has a SelectedOutput. Which of these is the output your talking about?

Also is there a webcast that shows how to do this?

Sincerely thanks
Damon

Hi Damon,

Here are some answers to the previous two postings.

If you use the same value for both upper and lower bound you basically prescribe what should be the activation. So if your EMG is 70% of MVC set the activation bound both to 0.7%.

If the abdominal muscles are recorded to have 5% activation and you set the upper and lower bounsds to this, the model will also obtain 5% activation.

Concerning the output it should be the InverseDynamicStudy in this case.

The folder named "Output " present in all studies comes as part of the study and can not have any different name. If comparing the results from two studies it should alsways be done between studies which have identical topology.

The selectedoutput is something diffent and this study can not be save in the same way… but all values it are saved as part of the output folder in the study.

Best regards
Søren

Hi Søren

So for example, the EMG electrodes are placed near the L3 for the erector spinae (ES) muscles. And I think the correct muscles to choose in AB model for this location is, L_LTptT9S4, and R_LTptT9S4. (please confirm?).

And lets say for one frame of the activity the EMG is 70% for both left and right muscles. When L_LTptT9S4, and R_LTptT9S4 upper and lower bound is set to 70% for that frame will the optimization generate the muscle activity for L_LTptT8S3, and all the other spine muscles activity based on the EMG inputs for L_LTptT9S4, and R_LTptT9S4?

Sincerely thanks
Damon

Damon,

unfortunately it’s not that easy.

  1. The ES muscle is divided into several branches in AnyBody. I attached a picture of L3 with only the right ES muscles. How precise did you measure your EMG? Where exactly was it? R_LTptT9S4 is one of the big long muscle branches, it goes from T9 to the Sacrum.

  2. There is a nice little example, when you type in AnyMuscleActivityBound
    in the Reference Manual of the AnyBody Help.

[COLOR=black][FONT=Arial]Hi Amir

The EMG was placed at 3 cm lateral (left and right side) to L3 spinous process. The AB muscle that I thought was for this location is LTptT9S4?

Also what do you think, for the below AB muscles for the below EMG locations?

External oblique, approximately 15 cm lateral to the umbilicus. AB muscle, OEC9RS

Internal oblique, below the external oblique electrodes and just superior to the inguinal ligament. AB muscle, OICRS3

Rectus abdominis, 3 cm lateral to the umbilicus; 2 cm above umbilicus. AB muscle was RA.

Sincerely thanks
Damon
[/FONT][/COLOR]

Hi Søren

Basically I would like to save the muscle data from more than one muscle at a time. See the attachment how I do it now, one muscle at a time. The reason I am doing this is so I can compare the AB muscle activity data to the EMG data. So I need to download the AB muscle activity for the abdominals, erector spinea, internal and external obliques.

Sincerely
Damon

Hi Damon,

I highly recommend that you use several AnyBody muscle branches to compare the measured values to. You should get the envelope of the muscle branches you think that are in the area of interest. You will never be able to measure EMG precise enough to focus on one branch as simulated in AnyBody.

This is a part from the GaitVaughan Example from the repository. This will show you how to do the envelope:
AnyVar ModelEnvelope = max({Main.Model.HumanModel.Right.Leg.Mus.GluteusMaximus1.Activity,
Main.Model.HumanModel.Right.Leg.Mus.GluteusMaximus2.Activity,Main.Model.HumanModel.Right.Leg.Mus.GluteusMaximus3.Activity});


Hi Amir
I went to the GaitVaughan repository. http://forum.anyscript.org/showthread.php?t=2312&highlight=GaitVaughan

I don’t see how this explains how to envelop the AB muscle activity outputs so they can be compared to AB muscle activity. Am in the correct repository?, if not can you please explain to me how to do this,

Sincerly
Damon

Hey Damon,

I just added following to the Wiki, I hope it explains enough how to make an envelope of MA:

http://wiki.anyscript.org/index.php/All_about_Muscles#How_to_compare_EMG_and_Muscle_activity_in_AnyBody.21


Hi Søren, Amir, any body at AnyBody, did you get this question?

Thanks Damon

Hi Amir

Below is the wiki information, can you help me with four questions please.

a- Does all of this code below go in the main folder?

b- If so where in the main should 1, 2 and 3 go? # 4 is explained to go at the beginning.

b- How do I import in the normalized EMG data?

c- After running the model, where do I find the graph for the EMG to AB comparision?

Sincerely thanks
Damon

--------Wiki info-----------

1- How to compare EMG and Muscle activity in AnyBody!
there is a post-study in the GaitVaughn model in the repository that makes this EMG comparison:
AnyBodyStudy PostStudy ={ nStep=100; Gravity = {0.0, 0.0,-9.81}; tEnd=1.26-0.1; tStart=0.01; #include "PostProcessing.any" };
2- In this PostStudy.any, there is a comparison between measured (EMG) and modeled (MA) data.
For example for GluteusMaximus
AnyFolder GluteusMaximus ={ AnyFloat ModelNormalize=Main.Study.EMGComparison.GluteusMaximus.ModelFun()[.Index]/(max(Main.Study.EMGComparison.GluteusMaximus.ModelFun())+0.000001); AnyFloat MeasuredNormalize=Main.Study.EMGComparison.GluteusMaximus.MeasuredFun()[.Index]/(max(max(Main.Study.EMGComparison.GluteusMaximus.MeasuredFun())+0.000001)); };
3-You need to create an envelope of the Activities of all GluteusMaximus parts as following:
AnyFolder GluteusMaximus ={ AnyFunInterpol FunMeasured={ Type=PiecewiseLinear; #include "time.any" #include "GluteusMaximus.any" Data = {DataVector}; }; AnyVector MeasuredEnvelope =FunMeasured(..t); AnyVar ModelEnvelope = max({Main.Model.HumanModel.Right.Leg.Mus.GluteusMaximus1.Activity, Main.Model.HumanModel.Right.Leg.Mus.GluteusMaximus2.Activity,Main.Model.HumanModel.Right.Leg.Mus.GluteusMaximus3.Activity}); AnyOutputFun MeasuredFun = { Val = .MeasuredEnvelope;}; AnyOutputFun ModelFun = { Val = .ModelEnvelope;}; };

4- To do everything in one go you should add the post-study to the run command in the beginning of the Main file:
AnyOperationSequence RunApplication = { //**This operation calibrates the muscles in the model if these are of the type AnyMuscleModel3E. This will just be an empty operation if the model is using a muscle type that does not require calibration.*/ AnyOperation &CalibrationAnal = Main.HumanModel.Calibration.CalibrationSequence; ///This operation is the inverse dynamic analysis AnyOperation &InvAnal=Main.Study.InverseDynamics; ///This operation is running a post analysis of the model it will normalize muscle activity and measured EMG to unity AnyOperation &PostAnal=Main.PostStudy.Kinematics; };

Damon,

  1. if you want ot post proecess everything outside of AnyBody, you can easily include an output function. IN there you include your muscle activations MA1, MA2, …
    that will give you a text file with all results, so you could process is in Excel, or similar…

    AnyOutputFile OutputFile = {
       FileName = "Results.txt";
    

AnyFloat MA1 = Main.xxx.MA1;
AnyFloat MA2 = Main.xxx.MA2;
AnyFloat MA3 = Main.xxx.MA3;

SepSign = Main.GeneralSettings.OutputSepSign;
};

  1. the Wiki example is almost completely form the GaitVaughan model. There you can see where to include the PostStudy and all the other include functions.

Hi Amir

I put the below code at the end of the code in the GaitFullBody.main folder, and the code skipped…would not load. Am i putting this code in the wrong folder?, or am I not adjusting the code correctly?

Thanks,

[SIZE=3]AnyOutputFile[/SIZE] OutputFile = {
FileName = “Results.txt”;
[SIZE=3]AnyFloat[/SIZE] MA1 = Main.LTptT6S1.MA1;
[SIZE=3]AnyFloat[/SIZE][SIZE=3] [/SIZE]MA3[SIZE=3] [/SIZE]=[SIZE=3] [/SIZE]Main.L5SacrumMedioLateralForce.MA3;
SepSign = Main.GeneralSettings.OutputSepSign;
};

Hi Damon,

You should put it in the relevant study folder.

Regards,
Pavel

Hi Pavel

I put the code in HumanModel, and it skipped again. See code below. What do you think is wrong?

[SIZE=3][SIZE=3][COLOR=#0000ff][SIZE=3][COLOR=#0000ff]AnyFolder[/SIZE] HumanModel={

[SIZE=3]// // Select the body model:
// // ----------------------
// // This file contains a list of all body parts, select them to create
// // the body model wanted.
// #include “BodyPartsSetup.any”
//
[/SIZE][SIZE=3]// This file creates the body model from the selected list.
[/SIZE][SIZE=3]#include[/SIZE] “…\Body\AAUHuman\BodyModels\GenericBodyModel\BodyModel.any”

[SIZE=3]AnyFolder[/SIZE] StrengthParameters={
[SIZE=3]AnyVar[/SIZE] SpecificMuscleTensionSpine= 150; [SIZE=3]//N/cm^2
[/SIZE][SIZE=3]AnyVar[/SIZE] StrengthIndexLeg= 1.53;
[SIZE=3]AnyVar[/SIZE] SpecificMuscleTensionShoulderArm= 150; [SIZE=3]//N/cm^2
[/SIZE]};

[SIZE=3]//Choose between scaling laws
[/SIZE][SIZE=3]//#include “…\Body\AAUHuman\Scaling\ScalingUniform.any”
[/SIZE][SIZE=3]//#include “…\Body\AAUHuman\Scaling\ScalingLengthMass.any”
[/SIZE][SIZE=3]#include[/SIZE] “…\Body\AAUHuman\Scaling\ScalingLengthMassFat.any”

Scaling = {
[SIZE=3]//This is the file which set the segments lenghts
[/SIZE][SIZE=3]#include[/SIZE] “AnyMan.any”
};

[SIZE=3]AnyOutputFile[/SIZE][SIZE=3] [/SIZE]OutputFile[SIZE=3] [/SIZE]=[SIZE=3] [/SIZE]{
FileName[SIZE=3] [/SIZE]=[SIZE=3] [/SIZE]“Results.txt”;
[SIZE=3]AnyFloat[/SIZE][SIZE=3] [/SIZE]MA1[SIZE=3] [/SIZE]=[SIZE=3] [/SIZE]Main.LTptT6S1.MA1;
AnyFloatMA3=Main.L5SacrumMedioLateralForce.MA3;
SepSign[SIZE=3] [/SIZE]=[SIZE=3] [/SIZE]Main.GeneralSettings.OutputSepSign;
};

};

[/COLOR][/SIZE][/COLOR][/SIZE]Sincerely thanks. Damon