AnyForceMomentMeasure

Hi,
in my gait-model I want to calculate the joint contact forces and
moments, especially the ones in the hip. Therefore, I used the
AnyForceMomentMeasure and added all relevant forces. The hip joint
node was used as reference node.
My code looks like:

AnyForceMomentMeasure HipContactForce= {
AnyRefFrame &Point = Main.Model.Right.Leg.Seg.Thigh.HipJoint;
AnyForce &Joint and Driver Forces = (i.e. Driver Forces and
Joint contact force)
};

My question is now: In which coordinate system are the forces and
moments measured? In the frame of the thigh segment or in the global
reference frame? And would it be possible to choose the reference
Node (i.e. the hip joint node) AND the reference frame (i.e. either
the segmental or the global)?

Kind regards
Christine

Hi Christine

The AnyForceMomentMeasure measures in the global reference system by
default. If you want to have the forces in the local coordinate of
the hip node you may transform these forces into the local
coordinate system in the following way

Add this code to your AnyBodyStudy

InverseDynamicAnalysis = {
AnyVec3 HipContactForceLocal =.?
HipContactForce* ?.Seg.Thigh.HipJoint.Axes;
};

here the Axes matrix of the hip joint is multiplied onto the force
vector, this transforms it into a local one. The Axes matrix is the
orientation of a node. You need to have this calculation located in
the InverseDynamicAnalysis folder otherwise the expression will not
be recalculated when the output from the AnyForceMoementMeasure has
changed. In the next release of the system we plan to make this more
flexible.

Best regards
AnyBody support

> Hi,
> in my gait-model I want to calculate the joint contact forces and
> moments, especially the ones in the hip. Therefore, I used the
> AnyForceMomentMeasure and added all relevant forces. The hip joint
> node was used as reference node.
> My code looks like:
>
> AnyForceMomentMeasure HipContactForce= {
> AnyRefFrame &Point = Main.Model.Right.Leg.Seg.Thigh.HipJoint;
> AnyForce &Joint and Driver Forces = (i.e. Driver Forces
and
> Joint contact force)
> };
>
> My question is now: In which coordinate system are the forces and
> moments measured? In the frame of the thigh segment or in the
global
> reference frame? And would it be possible to choose the reference
> Node (i.e. the hip joint node) AND the reference frame (i.e.
either
> the segmental or the global)?
>
> Kind regards
> Christine

Hi,

I’ve been trying to use the AnyForceMomentMeasure class to look at the
forces in the hip. I get values out of that class but I can’t seem to
use an AnyOutputFun to take those values (I ultimately want to output
them so that I can use them in a ParamStudy). Have you got any
suggestions for things I could try?

This is what I have currently which is within the AnyBodyStudy:

AnyForceMomentMeasure HipForceMoment = {
AnyRefFrame &Hip =
Main.Model.HumanModel.Right.Leg.Seg.Thigh.HipJoint;
AnyReacForce &Joint =
Main.Model.HumanModel.Right.Leg.Jnt.Hip.Constraints.Reaction;
AnyReacForce &Driver =
Main.Model.ModelEnvironmentConnection.Drivers.HipDriverRight.Reaction;
}; // HipForceMoment

 AnyOutputFun HipF = {
   Val = Main.Study.HipForceMoment.F;
 };

When I run the inverse dynamic analysis I get three values out for F
with the HipForceMoment but I just get {0,0,0} for the output function.

Best regards,

Catherine Manders

Hi Catherine,

Welcome to the group!

The ForceMomentMeasure may not be what you are looking for. The
problem with it is that it sums up forces on reference frames,
typically segments, and since a part of AnyBody’s job is to ensure
that everything is in equilibrium, you often end up with zero, unless
you exclude some of the forces from the measure. In a complex model
it can be difficult to figure out what to include or exclude.

So I recommend to take a step back and figure out what it is that you
want to compute. If you are interested in the reaction forces in the
joint, then it is probably better to pull those forces directly out
of the joint.

If you describe what you want to do, then I would be more than happy
to give you some more advice.

Best regards,
John

— In anyscript@yahoogroups.com, “Catherine Manders” <cjm301@…>
wrote:
>
> Hi,
>
> I’ve been trying to use the AnyForceMomentMeasure class to look at
the
> forces in the hip. I get values out of that class but I can’t seem
to
> use an AnyOutputFun to take those values (I ultimately want to
output
> them so that I can use them in a ParamStudy). Have you got any
> suggestions for things I could try?
>
> This is what I have currently which is within the AnyBodyStudy:
>
> AnyForceMomentMeasure HipForceMoment = {
> AnyRefFrame &Hip =
> Main.Model.HumanModel.Right.Leg.Seg.Thigh.HipJoint;
> AnyReacForce &Joint =
> Main.Model.HumanModel.Right.Leg.Jnt.Hip.Constraints.Reaction;
> AnyReacForce &Driver =
>
Main.Model.ModelEnvironmentConnection.Drivers.HipDriverRight.Reaction;
> }; // HipForceMoment
>
> AnyOutputFun HipF = {
> Val = Main.Study.HipForceMoment.F;
> };
>
>
> When I run the inverse dynamic analysis I get three values out for F
> with the HipForceMoment but I just get {0,0,0} for the output
function.
>
> Best regards,
>
> Catherine Manders
>

Hi,

Thank you for the response, I will definitely have to think about what
values I am trying to acquire. However, my problem was that I
couldn’t pass the value from the ForceMomentMeasure to the OutputFun.
I did actually get a value from the ForceMomentMeasure but it didn’t
seem to get passed across. I don’t know if I was doing something
wrong or if the ForceMomentMeasure class doesn’t allow values to be
passed onto other variables? Thanks again for the advice.

Best regards,

Catherine Manders

— In anyscript@yahoogroups.com, “AnyBody Support” <support@…> wrote:
>
> Hi Catherine,
>
> Welcome to the group!
>
> The ForceMomentMeasure may not be what you are looking for. The
> problem with it is that it sums up forces on reference frames,
> typically segments, and since a part of AnyBody’s job is to ensure
> that everything is in equilibrium, you often end up with zero, unless
> you exclude some of the forces from the measure. In a complex model
> it can be difficult to figure out what to include or exclude.
>
> So I recommend to take a step back and figure out what it is that you
> want to compute. If you are interested in the reaction forces in the
> joint, then it is probably better to pull those forces directly out
> of the joint.
>
> If you describe what you want to do, then I would be more than happy
> to give you some more advice.
>
> Best regards,
> John
>
>
> — In anyscript@yahoogroups.com, “Catherine Manders” <cjm301@>
> wrote:
> >
> > Hi,
> >
> > I’ve been trying to use the AnyForceMomentMeasure class to look at
> the
> > forces in the hip. I get values out of that class but I can’t seem
> to
> > use an AnyOutputFun to take those values (I ultimately want to
> output
> > them so that I can use them in a ParamStudy). Have you got any
> > suggestions for things I could try?
> >
> > This is what I have currently which is within the AnyBodyStudy:
> >
> > AnyForceMomentMeasure HipForceMoment = {
> > AnyRefFrame &Hip =
> > Main.Model.HumanModel.Right.Leg.Seg.Thigh.HipJoint;
> > AnyReacForce &Joint =
> > Main.Model.HumanModel.Right.Leg.Jnt.Hip.Constraints.Reaction;
> > AnyReacForce &Driver =
> >
> Main.Model.ModelEnvironmentConnection.Drivers.HipDriverRight.Reaction;
> > }; // HipForceMoment
> >
> > AnyOutputFun HipF = {
> > Val = Main.Study.HipForceMoment.F;
> > };
> >
> >
> > When I run the inverse dynamic analysis I get three values out for F
> > with the HipForceMoment but I just get {0,0,0} for the output
> function.
> >
> > Best regards,
> >
> > Catherine Manders
> >
>

Hi Catherine,

>However, my problem was that I couldn’t pass the value
>from the ForceMomentMeasure to the OutputFun.

The problem could be in how and where the original variable passed to
the output function is defined. Is the model small enough to allow you
to upload it so that we can take a look at it?

Thanks,
John

Hi John,

I’ve uploaded most of the ARep part of my model, it is a modified
version of your repository’s standing model. The ForceMomentMeasure
and the OutputFun are in the study part of the main model. Thank you
for the time you have spent on this.

Catherine

— In anyscript@yahoogroups.com, “AnyBody Support” <support@…> wrote:
>
> Hi Catherine,
>
> >However, my problem was that I couldn’t pass the value
> >from the ForceMomentMeasure to the OutputFun.
>
> The problem could be in how and where the original variable passed to
> the output function is defined. Is the model small enough to allow you
> to upload it so that we can take a look at it?
>
> Thanks,
> John
>

Hi Catherine

I downloaded your model but I don’t get any movement when running an
inverse dynamic analysis. What movement is the model supposed to do?

Best regards
Christian, AnyBody Support

— In anyscript@yahoogroups.com, “Catherine Manders” <cjm301@…> wrote:
>
> Hi,
>
> I’ve been trying to use the AnyForceMomentMeasure class to look at the
> forces in the hip. I get values out of that class but I can’t seem to
> use an AnyOutputFun to take those values (I ultimately want to output
> them so that I can use them in a ParamStudy). Have you got any
> suggestions for things I could try?
>
> This is what I have currently which is within the AnyBodyStudy:
>
> AnyForceMomentMeasure HipForceMoment = {
> AnyRefFrame &Hip =
> Main.Model.HumanModel.Right.Leg.Seg.Thigh.HipJoint;
> AnyReacForce &Joint =
> Main.Model.HumanModel.Right.Leg.Jnt.Hip.Constraints.Reaction;
> AnyReacForce &Driver =
> Main.Model.ModelEnvironmentConnection.Drivers.HipDriverRight.Reaction;
> }; // HipForceMoment
>
> AnyOutputFun HipF = {
> Val = Main.Study.HipForceMoment.F;
> };
>
>
> When I run the inverse dynamic analysis I get three values out for F
> with the HipForceMoment but I just get {0,0,0} for the output function.
>
> Best regards,
>
> Catherine Manders
>

Hi,

Thank you for looking at my model. I was attempting to investigate
just a static model, so the model is not supposed to move. It is
suppose to be just using the muscles to hold the body in position
against gravity. Will this cause problems with the ForceMomentMeasure
class?

Best regards,

Catherine

— In anyscript@yahoogroups.com, “AnyBody Support” <support@…> wrote:
>
> Hi Catherine
>
> I downloaded your model but I don’t get any movement when running an
> inverse dynamic analysis. What movement is the model supposed to do?
>
> Best regards
> Christian, AnyBody Support
>
> — In anyscript@yahoogroups.com, “Catherine Manders” <cjm301@> wrote:
> >
> > Hi,
> >
> > I’ve been trying to use the AnyForceMomentMeasure class to look at the
> > forces in the hip. I get values out of that class but I can’t seem to
> > use an AnyOutputFun to take those values (I ultimately want to output
> > them so that I can use them in a ParamStudy). Have you got any
> > suggestions for things I could try?
> >
> > This is what I have currently which is within the AnyBodyStudy:
> >
> > AnyForceMomentMeasure HipForceMoment = {
> > AnyRefFrame &Hip =
> > Main.Model.HumanModel.Right.Leg.Seg.Thigh.HipJoint;
> > AnyReacForce &Joint =
> > Main.Model.HumanModel.Right.Leg.Jnt.Hip.Constraints.Reaction;
> > AnyReacForce &Driver =
> > Main.Model.ModelEnvironmentConnection.Drivers.HipDriverRight.Reaction;
> > }; // HipForceMoment
> >
> > AnyOutputFun HipF = {
> > Val = Main.Study.HipForceMoment.F;
> > };
> >
> >
> > When I run the inverse dynamic analysis I get three values out for F
> > with the HipForceMoment but I just get {0,0,0} for the output
function.
> >
> > Best regards,
> >
> > Catherine Manders
> >
>

I believe this is a bug in AnyForceMomentMeasure.

Please refer to the “Standing Model” discussion I started June 30, 2006.
http://tech.groups.yahoo.com/group/anyscript/message/734

Søren recognized the problem.

Brent

— In anyscript@yahoogroups.com, “Catherine Manders” <cjm301@…> wrote:
>
> Hi,
>
> I’ve been trying to use the AnyForceMomentMeasure class to look at the
> forces in the hip. I get values out of that class but I can’t seem to
> use an AnyOutputFun to take those values (I ultimately want to output
> them so that I can use them in a ParamStudy). Have you got any
> suggestions for things I could try?
>
> This is what I have currently which is within the AnyBodyStudy:
>
> AnyForceMomentMeasure HipForceMoment = {
> AnyRefFrame &Hip =
> Main.Model.HumanModel.Right.Leg.Seg.Thigh.HipJoint;
> AnyReacForce &Joint =
> Main.Model.HumanModel.Right.Leg.Jnt.Hip.Constraints.Reaction;
> AnyReacForce &Driver =
> Main.Model.ModelEnvironmentConnection.Drivers.HipDriverRight.Reaction;
> }; // HipForceMoment
>
> AnyOutputFun HipF = {
> Val = Main.Study.HipForceMoment.F;
> };
>
>
> When I run the inverse dynamic analysis I get three values out for F
> with the HipForceMoment but I just get {0,0,0} for the output function.
>
> Best regards,
>
> Catherine Manders
>

Hi Brent and Catherine

Thank you so much for letting us know, I forgot that more than 250
postings ago;-) Well the new release is soon ready… I have heard;-)

Best regards
Christian, AnyBody Support

— In anyscript@yahoogroups.com, “blulrey” <blulrey@…> wrote:
>
> I believe this is a bug in AnyForceMomentMeasure.
>
> Please refer to the “Standing Model” discussion I started June 30, 2006.
> http://tech.groups.yahoo.com/group/anyscript/message/734
>
> S�ren recognized the problem.
>
> Brent
>
> — In anyscript@yahoogroups.com, “Catherine Manders” <cjm301@> wrote:
> >
> > Hi,
> >
> > I’ve been trying to use the AnyForceMomentMeasure class to look at the
> > forces in the hip. I get values out of that class but I can’t seem to
> > use an AnyOutputFun to take those values (I ultimately want to output
> > them so that I can use them in a ParamStudy). Have you got any
> > suggestions for things I could try?
> >
> > This is what I have currently which is within the AnyBodyStudy:
> >
> > AnyForceMomentMeasure HipForceMoment = {
> > AnyRefFrame &Hip =
> > Main.Model.HumanModel.Right.Leg.Seg.Thigh.HipJoint;
> > AnyReacForce &Joint =
> > Main.Model.HumanModel.Right.Leg.Jnt.Hip.Constraints.Reaction;
> > AnyReacForce &Driver =
> > Main.Model.ModelEnvironmentConnection.Drivers.HipDriverRight.Reaction;
> > }; // HipForceMoment
> >
> > AnyOutputFun HipF = {
> > Val = Main.Study.HipForceMoment.F;
> > };
> >
> >
> > When I run the inverse dynamic analysis I get three values out for F
> > with the HipForceMoment but I just get {0,0,0} for the output
function.
> >
> > Best regards,
> >
> > Catherine Manders
> >
>

Hi Brent and Christian,

Thank you very much for your help, I hadn’t seen the previous post. I
look forward to the new release.

Best regards,

Catherine Manders

— In anyscript@yahoogroups.com, “AnyBody Support” <support@…> wrote:
>
> Hi Brent and Catherine
>
> Thank you so much for letting us know, I forgot that more than 250
> postings ago;-) Well the new release is soon ready… I have heard;-)
>
> Best regards
> Christian, AnyBody Support
>
>
> — In anyscript@yahoogroups.com, “blulrey” <blulrey@> wrote:
> >
> > I believe this is a bug in AnyForceMomentMeasure.
> >
> > Please refer to the “Standing Model” discussion I started June 30,
2006.
> > http://tech.groups.yahoo.com/group/anyscript/message/734
> >
> > S�ren recognized the problem.
> >
> > Brent
> >
> > — In anyscript@yahoogroups.com, “Catherine Manders” <cjm301@> wrote:
> > >
> > > Hi,
> > >
> > > I’ve been trying to use the AnyForceMomentMeasure class to look
at the
> > > forces in the hip. I get values out of that class but I can’t
seem to
> > > use an AnyOutputFun to take those values (I ultimately want to
output
> > > them so that I can use them in a ParamStudy). Have you got any
> > > suggestions for things I could try?
> > >
> > > This is what I have currently which is within the AnyBodyStudy:
> > >
> > > AnyForceMomentMeasure HipForceMoment = {
> > > AnyRefFrame &Hip =
> > > Main.Model.HumanModel.Right.Leg.Seg.Thigh.HipJoint;
> > > AnyReacForce &Joint =
> > > Main.Model.HumanModel.Right.Leg.Jnt.Hip.Constraints.Reaction;
> > > AnyReacForce &Driver =
> > >
Main.Model.ModelEnvironmentConnection.Drivers.HipDriverRight.Reaction;
> > > }; // HipForceMoment
> > >
> > > AnyOutputFun HipF = {
> > > Val = Main.Study.HipForceMoment.F;
> > > };
> > >
> > >
> > > When I run the inverse dynamic analysis I get three values out for F
> > > with the HipForceMoment but I just get {0,0,0} for the output
> function.
> > >
> > > Best regards,
> > >
> > > Catherine Manders
> > >
> >
>

Is there any news on this subject?

Or is it possible to calculate the reaction forces using the fout
values, so they can be used in a paramstudy?

Regards,
Hans

— In anyscript@yahoogroups.com, “Catherine Manders” <cjm301@…> wrote:
>
> Hi Brent and Christian,
>
> Thank you very much for your help, I hadn’t seen the previous post. I
> look forward to the new release.
>
> Best regards,
>
> Catherine Manders
>
>
> — In anyscript@yahoogroups.com, “AnyBody Support” <support@> wrote:
> >
> > Hi Brent and Catherine
> >
> > Thank you so much for letting us know, I forgot that more than 250
> > postings ago;-) Well the new release is soon ready… I have heard;-)
> >
> > Best regards
> > Christian, AnyBody Support
> >
> >
> > — In anyscript@yahoogroups.com, “blulrey” <blulrey@> wrote:
> > >
> > > I believe this is a bug in AnyForceMomentMeasure.
> > >
> > > Please refer to the “Standing Model” discussion I started June 30,
> 2006.
> > > http://tech.groups.yahoo.com/group/anyscript/message/734
> > >
> > > S�ren recognized the problem.
> > >
> > > Brent
> > >
> > > — In anyscript@yahoogroups.com, “Catherine Manders” <cjm301@>
wrote:
> > > >
> > > > Hi,
> > > >
> > > > I’ve been trying to use the AnyForceMomentMeasure class to look
> at the
> > > > forces in the hip. I get values out of that class but I can’t
> seem to
> > > > use an AnyOutputFun to take those values (I ultimately want to
> output
> > > > them so that I can use them in a ParamStudy). Have you got any
> > > > suggestions for things I could try?
> > > >
> > > > This is what I have currently which is within the AnyBodyStudy:
> > > >
> > > > AnyForceMomentMeasure HipForceMoment = {
> > > > AnyRefFrame &Hip =
> > > > Main.Model.HumanModel.Right.Leg.Seg.Thigh.HipJoint;
> > > > AnyReacForce &Joint =
> > > > Main.Model.HumanModel.Right.Leg.Jnt.Hip.Constraints.Reaction;
> > > > AnyReacForce &Driver =
> > > >
> Main.Model.ModelEnvironmentConnection.Drivers.HipDriverRight.Reaction;
> > > > }; // HipForceMoment
> > > >
> > > > AnyOutputFun HipF = {
> > > > Val = Main.Study.HipForceMoment.F;
> > > > };
> > > >
> > > >
> > > > When I run the inverse dynamic analysis I get three values out
for F
> > > > with the HipForceMoment but I just get {0,0,0} for the output
> > function.
> > > >
> > > > Best regards,
> > > >
> > > > Catherine Manders
> > > >
> > >
> >
>

Hi Hans

I have uploaded a small script to the file section of the group it
is named “ParamterStudyWithReactionForce.any” It illustrates how to
make use of Reaction forces or ForceMomentMeasures in a parameter
study.

The bug mention previously was related to the AnyForceMomentMeasure
and it means that it is not possible to do “extra” calculations on
the output from the AnyForceMoementMeasure. So it is not possible
for example to multiply a rotation matrix on the measured force from
the measure. This issue will be solved in the next release.

So as long as you do not have need for extra transformations on the
output from the AnyForceMoementMeasure it should work now.

Best regards
Søren

— In anyscript@yahoogroups.com, “hdruyts” <hans.druyts@…> wrote:
>
> Is there any news on this subject?
>
> Or is it possible to calculate the reaction forces using the fout
> values, so they can be used in a paramstudy?
>
> Regards,
> Hans
>
> — In anyscript@yahoogroups.com, “Catherine Manders” <cjm301@>
wrote:
> >
> > Hi Brent and Christian,
> >
> > Thank you very much for your help, I hadn’t seen the previous
post. I
> > look forward to the new release.
> >
> > Best regards,
> >
> > Catherine Manders
> >
> >
> > — In anyscript@yahoogroups.com, “AnyBody Support” <support@>
wrote:
> > >
> > > Hi Brent and Catherine
> > >
> > > Thank you so much for letting us know, I forgot that more than
250
> > > postings ago;-) Well the new release is soon ready… I have
heard;-)
> > >
> > > Best regards
> > > Christian, AnyBody Support
> > >
> > >
> > > — In anyscript@yahoogroups.com, “blulrey” <blulrey@> wrote:
> > > >
> > > > I believe this is a bug in AnyForceMomentMeasure.
> > > >
> > > > Please refer to the “Standing Model” discussion I started
June 30,
> > 2006.
> > > > http://tech.groups.yahoo.com/group/anyscript/message/734
> > > >
> > > > S�ren recognized the problem.
> > > >
> > > > Brent
> > > >
> > > > — In anyscript@yahoogroups.com, “Catherine Manders”
<cjm301@>
> wrote:
> > > > >
> > > > > Hi,
> > > > >
> > > > > I’ve been trying to use the AnyForceMomentMeasure class to
look
> > at the
> > > > > forces in the hip. I get values out of that class but I
can’t
> > seem to
> > > > > use an AnyOutputFun to take those values (I ultimately
want to
> > output
> > > > > them so that I can use them in a ParamStudy). Have you
got any
> > > > > suggestions for things I could try?
> > > > >
> > > > > This is what I have currently which is within the
AnyBodyStudy:
> > > > >
> > > > > AnyForceMomentMeasure HipForceMoment = {
> > > > > AnyRefFrame &Hip =
> > > > > Main.Model.HumanModel.Right.Leg.Seg.Thigh.HipJoint;
> > > > > AnyReacForce &Joint =
> > > > >
Main.Model.HumanModel.Right.Leg.Jnt.Hip.Constraints.Reaction;
> > > > > AnyReacForce &Driver =
> > > > >
> >
Main.Model.ModelEnvironmentConnection.Drivers.HipDriverRight.Reaction
;
> > > > > }; // HipForceMoment
> > > > >
> > > > > AnyOutputFun HipF = {
> > > > > Val = Main.Study.HipForceMoment.F;
> > > > > };
> > > > >
> > > > >
> > > > > When I run the inverse dynamic analysis I get three values
out
> for F
> > > > > with the HipForceMoment but I just get {0,0,0} for the
output
> > > function.
> > > > >
> > > > > Best regards,
> > > > >
> > > > > Catherine Manders
> > > > >
> > > >
> > >
> >
>