Equations of motion

I see in the reference manual that the equations of motion can be
exported using EquilEqExportFileName inside AnyBodyStudy. I have
exported these as a text file and could use some help deciphering what
is output.

First, all of the segments are listed and I understand that. Then,
muscles are listed twice; the first time they are just named ‘Muscles’
and the second, they are named ‘Strong Muscles’, but both groups have
the same muscles listed (172 in the model including extraneous muscles
like th GHReaction muscles…which is more than the 114 in the arm
model I am using). What is the difference between ‘Muscles’ and
‘Strong Muscles’?

Then there is actual data, with variable names t, Cm, Cr, and R. What
are the last three? Cm is 114 x 172 (rows x columns), so I assume has
something to do with the 114 real muscles and the 172 muscles listed
at the top of the file. Cr is 114 x 79 and I don’t know what the 79
corresponds to. R is 1 x 100 and I don’t know what this is either.

What is the general form of the equations with respect to the output
variables? Any other hints or tips about these equations of motion
would be appreciated as well. Thanks.

Chris

Check that … R is 1 x 114. Excel combined some cells initially.

— In anyscript@yahoogroups.com, “chrisjgatti” <cjgatti@…> wrote:
>
> I see in the reference manual that the equations of motion can be
> exported using EquilEqExportFileName inside AnyBodyStudy. I have
> exported these as a text file and could use some help deciphering what
> is output.
>
> First, all of the segments are listed and I understand that. Then,
> muscles are listed twice; the first time they are just named ‘Muscles’
> and the second, they are named ‘Strong Muscles’, but both groups have
> the same muscles listed (172 in the model including extraneous muscles
> like th GHReaction muscles…which is more than the 114 in the arm
> model I am using). What is the difference between ‘Muscles’ and
> ‘Strong Muscles’?
>
> Then there is actual data, with variable names t, Cm, Cr, and R. What
> are the last three? Cm is 114 x 172 (rows x columns), so I assume has
> something to do with the 114 real muscles and the 172 muscles listed
> at the top of the file. Cr is 114 x 79 and I don’t know what the 79
> corresponds to. R is 1 x 100 and I don’t know what this is either.
>
> What is the general form of the equations with respect to the output
> variables? Any other hints or tips about these equations of motion
> would be appreciated as well. Thanks.
>
> Chris
>

Hello.
If you haven’t done so already, check out:

  1. Michael Damsgaard, John Rasmussen, Søren Tørholm Christensen,
    Egidijus Surma, and Mark de Zee (2006): Analysis of musculoskeletal
    systems in the AnyBody Modeling System. Simulation Modelling Practice
    and Theory. Volume 14, Issue 8 , November 2006, Pages 1100-1111.
    Elsevier, ISSN: 1569-190X.
  2. M. Damsgaard, J. Rasmussen & S.T. Christensen (2001): Inverse
    dynamics of musculo-skeletal systems using an efficient min/max
    muscle recruitment model. Proceedings of IDETC: 18-th Biennial
    Conference on Mechanical Vibration and Noise, Pittsburgh, September 9-
    13, 2001.
    They both (especially the second one) give you the background needed.
    I haven’t tried the “EquilEqExportFileName” myself but Cm and Cr
    should correspond to the coefficient vectors for the muscles and
    reaction forces respectively.
    /jokke

— In anyscript@yahoogroups.com, “chrisjgatti” <cjgatti@…> wrote:
>
> Check that … R is 1 x 114. Excel combined some cells initially.
>
> — In anyscript@yahoogroups.com, “chrisjgatti” <cjgatti@> wrote:
> >
> > I see in the reference manual that the equations of motion can be
> > exported using EquilEqExportFileName inside AnyBodyStudy. I have
> > exported these as a text file and could use some help deciphering
what
> > is output.
> >
> > First, all of the segments are listed and I understand that. Then,
> > muscles are listed twice; the first time they are just
named ‘Muscles’
> > and the second, they are named ‘Strong Muscles’, but both groups
have
> > the same muscles listed (172 in the model including extraneous
muscles
> > like th GHReaction muscles…which is more than the 114 in the arm
> > model I am using). What is the difference between ‘Muscles’ and
> > ‘Strong Muscles’?
> >
> > Then there is actual data, with variable names t, Cm, Cr, and R.
What
> > are the last three? Cm is 114 x 172 (rows x columns), so I assume
has
> > something to do with the 114 real muscles and the 172 muscles
listed
> > at the top of the file. Cr is 114 x 79 and I don’t know what the
79
> > corresponds to. R is 1 x 100 and I don’t know what this is either.
> >
> > What is the general form of the equations with respect to the
output
> > variables? Any other hints or tips about these equations of motion
> > would be appreciated as well. Thanks.
> >
> > Chris
> >
>

I am trying to use the exported equations of motion an implement the
same optimization as done in AnyBody. I have exported the equations
and set up the optimization problem in Matlab. I am using the
objective function of minimizing the sum of the squared stresses. In
Damsgaard, 2006, this objective function is shown generally as the
polynomial criteria in equation 4. As I read it, the objective
function only uses the forces of the muscles and excludes the forces
of the reactions. What are considered ‘muscles’ in this case with
respect to what is exported from AnyBody?

For example, data from 172 muscles are exported with the equations of
motion, but are these all considered muscles to be included in the
objective function? Some of these muscles which I am unsure about
include: Pos and Neg muscles for the spine; EdgeMuscles for the
glenohumeral constraint; scapula-thorax node reactions; ligament
reactions; wrist flexion, extension, abduction, adduction; Pos and Neg
Rot muscles for the shoulder.

Thanks.

Reference: Damsgaard M, Rasmussen J, Christensen ST, Surma E, de Zee
M, 2006. Analysis of musculoskeletal systems in the AnyBody Modeling
System. Simulation Modeling Practice and Theory 14: 1100-1111.

Chris

Hi Chris

The muscles you list are recruited as any other muscle by the recruitment
algorithm; some of them are moment generating muscles in model parts with no
real muscles and other are used to create unilateral contact conditions. The
muscles used for the unilateral contact are usually very strong and not
close to muscle activity envelope, so they do not disturb the activation of
the real muscles, they act as a unilateral constraint would have done.

I have looked at eq 4 in the paper and you are right the reaction forces are
not part of this, but if you create a model which uses strong muscles for
creating the boundary conditions then they are in principle part of this
equation, but the higher the strength they have the less activated they will
be and they will become less important. Normally we use eq. 6 as the
criteria, but if you add a large quadratic penalty to this one it will work
as eq 4. There is a tutorial which explains about the penalties
http://www.anybodytech.com/691.0.html it might be helpful.

We hope someday to implement real unilateral constraints, but until then,
these have to be created as muscles.

I hope this answered your questions otherwise please ask again.

Best regards

Søren, AnyBody Support


From: anyscript@yahoogroups.com [mailto:anyscript@yahoogroups.com] On Behalf
Of chrisjgatti
Sent: 22 May 2008 21:56
To: anyscript@yahoogroups.com
Subject: [AnyScript] Re: Equations of motion

I am trying to use the exported equations of motion an implement the
same optimization as done in AnyBody. I have exported the equations
and set up the optimization problem in Matlab. I am using the
objective function of minimizing the sum of the squared stresses. In
Damsgaard, 2006, this objective function is shown generally as the
polynomial criteria in equation 4. As I read it, the objective
function only uses the forces of the muscles and excludes the forces
of the reactions. What are considered ‘muscles’ in this case with
respect to what is exported from AnyBody?

For example, data from 172 muscles are exported with the equations of
motion, but are these all considered muscles to be included in the
objective function? Some of these muscles which I am unsure about
include: Pos and Neg muscles for the spine; EdgeMuscles for the
glenohumeral constraint; scapula-thorax node reactions; ligament
reactions; wrist flexion, extension, abduction, adduction; Pos and Neg
Rot muscles for the shoulder.

Thanks.

Reference: Damsgaard M, Rasmussen J, Christensen ST, Surma E, de Zee
M, 2006. Analysis of musculoskeletal systems in the AnyBody Modeling
System. Simulation Modeling Practice and Theory 14: 1100-1111.

Chris

[Non-text portions of this message have been removed]

Thanks Søren,

I assume then that all of those muscles I listed are included in the
objective function?

I knew the objective function is actually a combination of a couple
weighted objective functions. I have read through some other threads
and know some of the penalties do not play a role in some of the
objective functions. As I understand it, the min/max objective
function looks like:

min( max(muscle activity) + e1*sum(muscle activity) )

where e1 is 0 (or 1e-5 for stabilization). The sum of activity
objective function looks like:

min( max(muscle activity) + e1*sum(muscle activity) )

where e1 is 1. And the sum-squared of activity objective function
looks like:

min( max(muscle activity) + e2*sum(muscle activity^2) )

where e2 is 1000. Is this all correct?

Chris

— In anyscript@yahoogroups.com, “AnyBody Support” <support@…> wrote:
>
> Hi Chris
>
>
>
> The muscles you list are recruited as any other muscle by the
recruitment
> algorithm; some of them are moment generating muscles in model parts
with no
> real muscles and other are used to create unilateral contact
conditions. The
> muscles used for the unilateral contact are usually very strong and not
> close to muscle activity envelope, so they do not disturb the
activation of
> the real muscles, they act as a unilateral constraint would have done.
>
>
>
> I have looked at eq 4 in the paper and you are right the reaction
forces are
> not part of this, but if you create a model which uses strong
muscles for
> creating the boundary conditions then they are in principle part of this
> equation, but the higher the strength they have the less activated
they will
> be and they will become less important. Normally we use eq. 6 as the
> criteria, but if you add a large quadratic penalty to this one it
will work
> as eq 4. There is a tutorial which explains about the penalties
> http://www.anybodytech.com/691.0.html it might be helpful.
>
>
>
> We hope someday to implement real unilateral constraints, but until
then,
> these have to be created as muscles.
>
>
>
> I hope this answered your questions otherwise please ask again.
>
>
>
> Best regards
>
> Søren, AnyBody Support

Hi Chris

Yes this is correct; you can not define any muscle which will not be part of
the objective function.

Your formulas are correct…

The properties e1 and e2 you can change in the script, they are named
‘RecruitmentLpPenalty’ and ‘RecruitmentQpPenalty’. There is one thing; the
Qp penalty will only have an effect if you make use of the quadratic solver
MinMaxOOSolQP, otherwise there is no effect…

Please ask again if you have further questions

Best regards

Søren, AnyBody Support


From: anyscript@yahoogroups.com [mailto:anyscript@yahoogroups.com] On Behalf
Of chrisjgatti
Sent: 28 May 2008 18:41
To: anyscript@yahoogroups.com
Subject: [AnyScript] Re: Equations of motion

Thanks Søren,

I assume then that all of those muscles I listed are included in the
objective function?

I knew the objective function is actually a combination of a couple
weighted objective functions. I have read through some other threads
and know some of the penalties do not play a role in some of the
objective functions. As I understand it, the min/max objective
function looks like:

min( max(muscle activity) + e1*sum(muscle activity) )

where e1 is 0 (or 1e-5 for stabilization). The sum of activity
objective function looks like:

min( max(muscle activity) + e1*sum(muscle activity) )

where e1 is 1. And the sum-squared of activity objective function
looks like:

min( max(muscle activity) + e2*sum(muscle activity^2) )

where e2 is 1000. Is this all correct?

Chris

— In anyscript@yahoogrou <mailto:anyscript%40yahoogroups.com> ps.com,
“AnyBody Support” <support@…> wrote:
>
> Hi Chris
>
>
>
> The muscles you list are recruited as any other muscle by the
recruitment
> algorithm; some of them are moment generating muscles in model parts
with no
> real muscles and other are used to create unilateral contact
conditions. The
> muscles used for the unilateral contact are usually very strong and not
> close to muscle activity envelope, so they do not disturb the
activation of
> the real muscles, they act as a unilateral constraint would have done.
>
>
>
> I have looked at eq 4 in the paper and you are right the reaction
forces are
> not part of this, but if you create a model which uses strong
muscles for
> creating the boundary conditions then they are in principle part of this
> equation, but the higher the strength they have the less activated
they will
> be and they will become less important. Normally we use eq. 6 as the
> criteria, but if you add a large quadratic penalty to this one it
will work
> as eq 4. There is a tutorial which explains about the penalties
> http://www.anybodyt <http://www.anybodytech.com/691.0.html>
ech.com/691.0.html it might be helpful.
>
>
>
> We hope someday to implement real unilateral constraints, but until
then,
> these have to be created as muscles.
>
>
>
> I hope this answered your questions otherwise please ask again.
>
>
>
> Best regards
>
> Søren, AnyBody Support

[Non-text portions of this message have been removed]

I have figured out how Cm, Cr, and R are used, but I am unsure about
what the rows and columns correspond to. Is there a way to list out
each row or column name such as which muscle or DOF they correspond to?

Thanks.

Chris

— In anyscript@yahoogroups.com, “chrisjgatti” <cjgatti@…> wrote:
>
> Check that … R is 1 x 114. Excel combined some cells initially.
>
> — In anyscript@yahoogroups.com, “chrisjgatti” <cjgatti@> wrote:
> >
> > I see in the reference manual that the equations of motion can be
> > exported using EquilEqExportFileName inside AnyBodyStudy. I have
> > exported these as a text file and could use some help deciphering what
> > is output.
> >
> > First, all of the segments are listed and I understand that. Then,
> > muscles are listed twice; the first time they are just named ‘Muscles’
> > and the second, they are named ‘Strong Muscles’, but both groups have
> > the same muscles listed (172 in the model including extraneous muscles
> > like th GHReaction muscles…which is more than the 114 in the arm
> > model I am using). What is the difference between ‘Muscles’ and
> > ‘Strong Muscles’?
> >
> > Then there is actual data, with variable names t, Cm, Cr, and R. What
> > are the last three? Cm is 114 x 172 (rows x columns), so I assume has
> > something to do with the 114 real muscles and the 172 muscles listed
> > at the top of the file. Cr is 114 x 79 and I don’t know what the 79
> > corresponds to. R is 1 x 100 and I don’t know what this is either.
> >
> > What is the general form of the equations with respect to the output
> > variables? Any other hints or tips about these equations of motion
> > would be appreciated as well. Thanks.
> >
> > Chris
> >
>

Hello Chris,

The rows are each corresponding to one degree of freedom. In principle, you
do not know any more about the rows. It is not like you might imagine that
each row was liked to a certain kinematic property in the model (e.g. a
kinematic measure), at least it does not have to be like this. A row can, in
general, be associated with any combination of kinematics.

However, in the current format, I think that each row is actually associated
with one degree of freedom of a segment; so the first six rows are first 3
translational then 3 rotational degrees of freedom of the first segment and
so on.

I cannot recall whether the file also contains a list of segments name, but
if so, this list is ordered like these blocks of 6 rows.

I state it this way because there is no guarantee that it will stay like
this for all model setups. The data are outputted directly for the
computational kernel of AnyBody, so it will reflect whatever algorithm that
is forming the equations of motion.

The columns of Cm each correspond to one muscle and they are ordered like
the list of “Strong Muscles” in the file.

Similarly, each column of Cr corresponds to a component of a reaction force
with Type equal to On. As far as I recall, the names of the reaction force
are not outputted to the file.

Could you explain what kind of information you would like and the task you
need it for?

We are always open for improvements.

If you for instance are using the equations to do your own muscle
recruitment analysis in external software or your own code, we would be very
glad to know what criteria you are looking for (but obviously didn’t find)
in AnyBody.

Best regards,

Michael


Michael Damsgaard, AnyBody Support

www.anybodytech.com


From: anyscript@yahoogroups.com [mailto:anyscript@yahoogroups.com] On Behalf
Of chrisjgatti
Sent: Friday, August 01, 2008 13:11
To: anyscript@yahoogroups.com
Subject: [AnyScript] Re: Equations of motion

I have figured out how Cm, Cr, and R are used, but I am unsure about
what the rows and columns correspond to. Is there a way to list out
each row or column name such as which muscle or DOF they correspond to?

Thanks.

Chris

— In anyscript@yahoogrou <mailto:anyscript%40yahoogroups.com> ps.com,
“chrisjgatti” <cjgatti@…> wrote:
>
> Check that … R is 1 x 114. Excel combined some cells initially.
>
> — In anyscript@yahoogrou <mailto:anyscript%40yahoogroups.com> ps.com,
“chrisjgatti” <cjgatti@> wrote:
> >
> > I see in the reference manual that the equations of motion can be
> > exported using EquilEqExportFileName inside AnyBodyStudy. I have
> > exported these as a text file and could use some help deciphering what
> > is output.
> >
> > First, all of the segments are listed and I understand that. Then,
> > muscles are listed twice; the first time they are just named ‘Muscles’
> > and the second, they are named ‘Strong Muscles’, but both groups have
> > the same muscles listed (172 in the model including extraneous muscles
> > like th GHReaction muscles…which is more than the 114 in the arm
> > model I am using). What is the difference between ‘Muscles’ and
> > ‘Strong Muscles’?
> >
> > Then there is actual data, with variable names t, Cm, Cr, and R. What
> > are the last three? Cm is 114 x 172 (rows x columns), so I assume has
> > something to do with the 114 real muscles and the 172 muscles listed
> > at the top of the file. Cr is 114 x 79 and I don’t know what the 79
> > corresponds to. R is 1 x 100 and I don’t know what this is either.
> >
> > What is the general form of the equations with respect to the output
> > variables? Any other hints or tips about these equations of motion
> > would be appreciated as well. Thanks.
> >
> > Chris
> >
>

[Non-text portions of this message have been removed]