Hi Brent
You seem to have found a minor bug in the AnyForceMomentMeasure.
The bug do not affect the results of the measure which are still ok, but it
makes it impossible to make any further calculations on the output from the
AnyForceMoment measure like you try to do, it will all give zero. It seems
that the F and M property in the AnyForceMomentMeasure where treated as
constants internally in the program and when making expressions using F and
M they would not be calculated. This issue have now been resolved for future
versions, we are planning a version 2.1 which will be released soon.
If you would like to display the joint reactions given in a specific
coordinate system like you try to do, you will need to rotate the nodes in
the joints to have the desired orientation and read out the joints reactions
directly from the joint. At the moment this is the only way to do this, I am
sorry.
Thank you for making us aware of this issue, we will notify you when the new
version is released.
Best regards
Søren, AnyBody Support
From: anyscript@yahoogroups.com [mailto:anyscript@yahoogroups.com] On Behalf
Of blulrey
Sent: 24. august 2006 02:58
To: anyscript@yahoogroups.com
Subject: [anyscript] Re: Standing Model
Søren,
I have figured out the rotation matrix, but am having problems reading
the force and moment values. The values are not transferring to the
AnyMatrix. Here is the ForceMomentMeasure part of the code placed in
main of the standing model:
AnyForceMomentMeasure L5S1Reactions = {
AnyForceBase &FBase =
Main.Model.HumanModel.Trunk.JointsLumbar.L5SacrumJnt.Constraints.Reaction;
AnyRefNode &L5S1 =
Main.Model.HumanModel.Trunk.SegmentsLumbar.SacrumSeg.SacrumL5JntNode;
AnyVec3 TestF = F;
AnyMatrix TestFtranspose = F’;
AnyMatrix RotF = RotMat(-40.0*pi/180,z)*F’;
AnyVec3 TestM = M;
AnyMatrix TestMtranspose = M’;
AnyMatrix RotM = RotMat(-40.0*pi/180,z)*M’;
};
In the output, the F vector has values, but all the variables where F
or M are used gives zeroes.
-------------------------------Objects dump--------------------------
Main.Model.Measures.L5S1Reactions.F = {-1471.839, -1880.454,
3.110087e-009};
-------------------------------Objects dump--------------------------
Main.Model.Measures.L5S1Reactions.M = {2.507527e-018, -1.962676e-018,
-1.414038e-011};
-------------------------------Objects dump--------------------------
Main.Model.Measures.L5S1Reactions.TestF = {0, 0, 0};
-------------------------------Objects dump--------------------------
Main.Model.Measures.L5S1Reactions.TestFtranspose = {{0}, {0}, {0}};
-------------------------------Objects dump--------------------------
Main.Model.Measures.L5S1Reactions.RotF = {{0}, {0}, {0}};
-------------------------------Objects dump--------------------------
Main.Model.Measures.L5S1Reactions.TestM = {0, 0, 0};
-------------------------------Objects dump--------------------------
Main.Model.Measures.L5S1Reactions.TestMtranspose = {{0}, {0}, {0}};
-------------------------------Objects dump--------------------------
Main.Model.Measures.L5S1Reactions.RotM = {{0}, {0}, {0}};
I tried placing the code both outside the Study and inside the Study
with the same result.
Brent
— In anyscript@yahoogrou <mailto:anyscript%40yahoogroups.com> ps.com,
“AnyBody Support” <support@…>
wrote:
>
> Hi Brent
>
> I think the problem is that you are multiplying a 3x3 matrix with a
> 1x3 vector and not 3x1 vector
>
> So the force vector needs to be transposed like this
>
> AnyMatrix RotF = RotMat(-40.0,z)L5S1Reactions.F’;
>
> This should solve the problem i belive.
>
>
> I do not know the exact angle between the sacral plane and the local
> coordinate system of the sacrum, i assume that this is what you mean?
>
> I think the easiest way to measure this angle would be to create a
> new visible coordinate system by placing an AnyDrawRefFrame inside
> the sacrum segment, please do this in the following file
> BRep/aalborg/Spine/SegmentsLumbar and then measure the angle
> manually.
>
> Best regards
> Søren, AnyBody Support
>
>
>
> — In anyscript@yahoogrou <mailto:anyscript%40yahoogroups.com> ps.com,
“blulrey” <blulrey@> wrote:
> >
> > Hello,
> > I am having problems multipying by a rotation matrix.
> >
> > I placed this in the Main file of the StandingModel:
> >
> > AnyFolder Measures = {
> > AnyForceMomentMeasure L5S1Reactions = {
> > AnyForceBase &FBase =
> >
> Main.Model.HumanModel.Trunk.JointsLumbar.L5SacrumJnt.Constraints.Reac
> tion;
> >
> > AnyRefNode &L5S1 =
> >
> Main.Model.HumanModel.Trunk.SegmentsLumbar.SacrumSeg.SacrumL5JntNode;
> > };
> > AnyVec3 RotF = RotMat(-40.0,z)L5S1Reactions.F;
> > };
> >
> > Here is the error:
> >
> > : '’ : Illegal operation for given argument types :
> > ‘AnyFloat[3][3]’ '’ ‘AnyFloat[3]’
> >
> > Why is this an error? I’m multiplying a 3x3 to a 3x1 matrix.
> >
> > Also, in the body model, what is the angle of the sacral plane with
> > respect to the sacral segment?
> >
> > Thank you,
> > Brent
> >
> > — In anyscript@yahoogrou <mailto:anyscript%40yahoogroups.com> ps.com,
“AnyBody Support” <support@>
> wrote:
> > >
> > > Hi Brent
> > >
> > > The reactions you get in a joint if you look at the
> > > Constraints.Reaction property is given wrt to the first
> reference
> > > system mentioned in the definition of the joint.
> > >
> > > If you use the the AnyForceMomentMeasure it will by default give
> the
> > > values in global coordinates, but you can transform these values
> to
> > > any local coordinate system by multiplying with an rotation
> matrix.
> > >
> > > Best regards
> > > Søren, AnyBody Support
> > >
> > > — In anyscript@yahoogrou <mailto:anyscript%40yahoogroups.com>
ps.com, “blulrey” <blulrey@> wrote:
> > > >
> > > > Hello,
> > > > I have not implemented the AnyForceMomentMeasure command yet,
> but I
> > > > did consult the joint definitions and have obtained the
> appropriate
> > > > reactions. Now the problem is that I need the reactions in
> local
> > > > coordinates, e.g. I need the resultant sheer and compressive
> load
> > > on a
> > > > spinal segment and on the knee, not the reactions in global
> > > > coordinates. Does AnyBody calculate local reactions at the
> joints?
> > > >
> > > > Brent
> > > >
> > > >
> > > > — In anyscript@yahoogrou <mailto:anyscript%40yahoogroups.com>
ps.com, “AnyBody Support” <support@>
> > > wrote:
> > > > >
> > > > > Hi Brent,
> > > > >
> > > > > Just an answer for your question under Item 3
> > > > >
> > > > > 3.
> > > > > Please see my latest response to Nick about “Segment
> Orientation
> > > in
> > > > > Standing Model”.
> > > > > There I write a bit about the AnyForces and how they are
> > > generally
> > > > > related to kinematic measures (see also the reference manual
> > > about
> > > > > AnyForces etc.).
> > > > > The ‘Reaction’ member in kinematic constraints (AnyKinEq)
> and
> > > > > therefore in ‘Constraints’ of all joints are derived from
> > > AnyForce,
> > > > > indeed it is a special class for reaction forces called
> > > AnyReacForce.
> > > > > The number of elements in such reaction forces match the
> > > constraints
> > > > > to be enforced by the reactions, and therefore you almost
> never
> > > see
> > > > > six reactions in joints since this would imply a completely
> > > rigid
> > > > > joint.
> > > > >
> > > > > The five reactions in a revolute joint are three
> translational
> > > > > reactions and two moments. The directions of the momemts
> depend
> > > on
> > > > > the definition of the joint axis. Please see the reference
> > > manual on
> > > > > the joints.
> > > > >
> > > > > As I explained to Nick, you can use AnyForceMomentMeasure to
> > > convert
> > > > > all kinds of AnyForces to more familiar quantities (3d
> vectors).
> > > > > This might be the way to go for you. Notice that
> > > > > AnyForceMomentMeasure measures in global coordinates.
> > > > >
> > > > >
> > > > > Best regards,
> > > > >
> > > > > Michael
> > > > > AnyBody Support
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > — In anyscript@yahoogrou <mailto:anyscript%40yahoogroups.com>
ps.com, “blulrey” <blulrey@> wrote:
> > > > > >
> > > > > > Thank you for the response.
> > > > > >
> > > > > > 1. & 2. I’ll investigate the FreePostureMove model as I
> > > continue to
> > > > > > build my model. I will calibrate before running with the
> 3
> > > element
> > > > > > models.
> > > > > >
> > > > > > 3. I ran the inverse dynamic analysis on the default
> > > StandingModel
> > > > > > (changing nStep to 2) and found the JointMuscles folders
> for
> > > the
> > > > > L5/S1
> > > > > > and knee joints at
> > > > > >
> > > > >
> > >
> Main.Study.Output.Model.HumanModel.Trunk.JointsLumbar.L5SacrumJnt.Con
> > > > > straints.Reaction.Fout
> > > > > > and
> > > > > >
> > > > >
> > >
> Main.Study.Output.Model.HumanModel.Right.Leg.JntDOF.Knee.Constraints.
> > > > > Reaction.Fout
> > > > > > respectively. I still only see 3 values for the L5/S1
> joint
> > > and 5
> > > > > > values for the knee joint. Am I looking in the wrong
> place to
> > > find
> > > > > > the expected 6 values?
> > > > > >
> > > > > > 4. Yes, I am modeling lifting an object from the ground,
> while
> > > > > keeping
> > > > > > the knees straight. I have not done a full motion
> analysis to
> > > know
> > > > > > whether the hip also rotates in this position. The
> > > > > > GlenohumeralFlexion will most likely have to be greater
> than
> > > 75, so
> > > > > > this could be a problem. I have uploaded the files to
> > > > > > StandingModel1.zip, however it is just the default
> > > StandingModel
> > > > > with
> > > > > > nStep = 2 and GlenohumeralFlexion = 75.
> > > > > >
> > > > > > Brent
> > > > > >
> > > > > >
> > > > > > — In anyscript@yahoogrou <mailto:anyscript%40yahoogroups.com>
ps.com, “AnyBody Support”
> <support@>
> > > > > wrote:
> > > > > > >
> > > > > > > Hi Brent
> > > > > > >
> > > > > > > Welcome to the group
> > > > > > >
> > > > > > > 1: The standingmodel is good starting point for a
> lifting
> > > model
> > > > > > > since it already has the feet on the floor with the
> proper
> > > > > boundary
> > > > > > > conditions on.
> > > > > > >
> > > > > > > The FreePosture and FreePostureMove models are very
> similar,
> > > the
> > > > > > > difference is that Freeposture is a static model and the
> > > > > > > FreePostureMove is dynamic. The free posturemove model
> uses
> > > > > > > interpolation drivers for all the joints in the human.
> So in
> > > the
> > > > > > > mannikin file you can set a vector of joint angles for
> each
> > > > > joint
> > > > > > > and the model will try to follow these. In the
> FreePosture
> > > model
> > > > > you
> > > > > > > set static values. Maybe you can impose some of the
> drivers
> > > for
> > > > > the
> > > > > > > spine and arms from the FreePostureMove model on the
> > > standing
> > > > > model
> > > > > > > to obtain a flexible model that can be used for lifting.
> > > When
> > > > > you do
> > > > > > > this it is important that you keep a close eye on the
> > > numbers
> > > > > of
> > > > > > > dof you add and remove drivers for, this number can not
> > > change
> > > > > for
> > > > > > > the same body model.
> > > > > > >
> > > > > > > 2: Yes the BodyModel_Mus3E.any model uses the three
> element
> > > > > muscles
> > > > > > > for both the arms and the legs but not the spine. It is
> > > > > important
> > > > > > > that you remember to calibrate the muscles for this
> model.
> > > > > > >
> > > > > > > 3: Yes this is the right location to find these values.
> The
> > > > > three
> > > > > > > numbers you see is the Fx, Fy, and Fz reactions. It is
> not
> > > > > possible
> > > > > > > directly to see the moment reactions since these are
> carried
> > > by
> > > > > the
> > > > > > > muscles. If you have a kinetically open loop model you
> can
> > > > > switch to
> > > > > > > the bodymodel_nomuscles model. This model has joint
> muscles
> > > > > (torque
> > > > > > > muscles) for a all joints and if you look at the force
> > > values
> > > > > for
> > > > > > > these you have the moments you are looking for. This
> > > approach
> > > > > will
> > > > > > > only work if the model is a open chain, if the model is
> a
> > > close
> > > > > > > chain for example if both hands are lifting the same
> object
> > > you
> > > > > need
> > > > > > > the real muscle to make sure the moments are distribute
> in a
> > > > > > > reasonable way.
> > > > > > > We are working on a new measure that makes it possible
> to
> > > > > meausure
> > > > > > > the moment which the muscles generates on a specific
> point,
> > > this
> > > > > is
> > > > > > > exactly what you need i think, but unfortunately this is
> not
> > > > > ready
> > > > > > > for release yet.
> > > > > > >
> > > > > > >
> > > > > > > 4: I do not think we have tested the
> PelvisThoraxExtension
> > > which
> > > > > > > such an value. The error you get is a kinematic error
> that
> > > says
> > > > > that
> > > > > > > some of the joint and driver constraints in the
> abdominal
> > > region
> > > > > can
> > > > > > > not be solved. The abdominal model is modelled as a
> > > complicate
> > > > > > > mechanism and it can not work for pelvisthorax angles
> which
> > > are
> > > > > too
> > > > > > > exreme. So i think you will need to go for lower value
> of
> > > this
> > > > > > > angles. I assume you want this high angle because the
> model
> > > > > should
> > > > > > > lift something from the ground?. In this case i think
> you
> > > will
> > > > > also
> > > > > > > rotate the pelvis forward, as a part of this motion,
> this
> > > would
> > > > > mean
> > > > > > > that the pelvisthorax could be smaller.
> > > > > > >
> > > > > > > I am unsure about the inverse error you get. Which
> muscle
> > > model
> > > > > do
> > > > > > > you use?, if it is the three element hill model please
> try
> > > to
> > > > > shift
> > > > > > > to the simple one to see if it makes a difference.
> > > > > > >
> > > > > > > If it continues to cause problems please upload the
> model
> > > > > > > application model and we wil have look at it.
> > > > > > >
> > > > > > > Best regards
> > > > > > > AnyBody Technology Support
> > > > > > >
> > > > > > > — In anyscript@yahoogrou
<mailto:anyscript%40yahoogroups.com> ps.com, “blulrey” <blulrey@>
> wrote:
> > > > > > > >
> > > > > > > > Hello,
> > > > > > > > I have recently started using AnyBody and have been
> > > working
> > > > > with
> > > > > > > the
> > > > > > > > StandingModel. I have a few questions:
> > > > > > > >
> > > > > > > > 1. Should I use the StandingModel as a starting point
> for
> > > a
> > > > > lifting
> > > > > > > > motion? What is the difference between the
> StandingModel,
> > > > > > > > FreePosture, and FreePostureMove models? I have
> looked at
> > > the
> > > > > > > > previous webcasts, and the models seem very similar.
> > > > > > > >
> > > > > > > > 2. Does BodyModel_Mus3E.any contain 3 element models
> for
> > > the
> > > > > legs,
> > > > > > > > arm, and shoulder? The comments in main say that only
> the
> > > > > legs
> > > > > > > have 3
> > > > > > > > element models, however it seems that the legs, arms,
> and
> > > > > shoulder
> > > > > > > are
> > > > > > > > 3 element.
> > > > > > > >
> > > > > > > > 3. To estimate the reaction loads on the L5/S1
> vertebral
> > > disc,
> > > > > > > would I
> > > > > > > > go to
> > > > > > > >
> > > > > > >
> > > > >
> > >
> Main.Study.Output.Model.HumanModel.Trunk.JointsLumbar.L5SacrumJnt.Con
> > > > > > > straints.Reaction.Fout?
> > > > > > > > I only see 3 values here, which I assume are Fx, Fy,
> and
> > > Fz.
> > > > > How
> > > > > > > do
> > > > > > > > I obtain Mx, My, and Mz? Similarly, for the knee
> reaction
> > > > > loads at
> > > > > > > >
> > > > > > >
> > > > >
> > >
> Main.Study.Output.Model.HumanModel.Right.Leg.JntDOF.Knee.Constraints.
> > > > > > > Reaction.Fout,
> > > > > > > > there are 5 values, instead of the expected 6 (3 loads
> and
> > > 3
> > > > > > > moments).
> > > > > > > > Will I have to insert an AnyForceMomentMeasure
> statement
> > > to
> > > > > obtain
> > > > > > > > all the reaction loads?
> > > > > > > >
> > > > > > > > 4. I am getting kinematic constraint errors with
> > > > > > > PelvisThoraxExtension
> > > > > > > > = -95 and less (more negative). The further the
> Mannequin
> > > > > bends
> > > > > > > over,
> > > > > > > > the more errors. I also get a muscle recruitment
> analysis
> > > > > error
> > > > > > > with
> > > > > > > > GlenohumeralFlexion = 75 and greater. Since I’m new
> to
> > > > > AnyBody, I
> > > > > > > > don’t know where I should begin to fix the errors.
> The
> > > errors
> > > > > are
> > > > > > > > pasted below. The only thing I changed in the
> > > StandingModel
> > > > > files
> > > > > > > was
> > > > > > > > the two parameters above, and the nStep=2.
> > > > > > > >
> > > > > > > > Thank you,
> > > > > > > > Brent
> > > > > > > >
> > > > > > > > Below are the error messages:
> > > > > > > >
> > > > > > > > Error 1
> > > > > > > > PelvisThoraxExtension = -95:
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > >
> > >
> *********************************************************************
> > > > > > > ******************
> > > > > > > > Inverse Dynamic Analysis (Operation:
> > > > > > > Main.Study.InverseDynamicAnalysis):
> > > > > > > > 0) Design variables have been updated.
> > > > > > > > 1) Load time positions have been re-established.
> > > > > > > > Failed to resolve kinematic constraints (final kin.
> error
> > > =
> > > > > > > 8.582067E-004)
> > > > > > > > Constraint no. 49 above error tolerance 0.000001,
> error =
> > > > > > > 0.000858. -
> > > > > > > > constr. #0
> > > > > in ‘Main.Model.HumanModel.Trunk.Buckle.Slider1.LinDrv’
> > > > > > > > Constraint no. 77 above error tolerance 0.000001,
> error =
> > > > > > > 0.000139. -
> > > > > > > > constr. #0
> > > > > > >
> > > in ‘Main.Model.HumanModel.Trunk.Buckle.Disc1.Disc.LinDrvRight’
> > > > > > > > Constraint no. 78 above error tolerance 0.000001,
> error =
> > > > > > > 0.000139. -
> > > > > > > > constr. #0
> > > > > > >
> in ‘Main.Model.HumanModel.Trunk.Buckle.Disc1.Disc.LinDrvLeft’
> > > > > > > > Constraint no. 80 above error tolerance 0.000001,
> error =
> > > > > > > 0.000008. -
> > > > > > > > constr. #0 in
> > > > > > >
> > > > >
> > >
> > ‘Main.Model.HumanModel.Trunk.Buckle.Disc1.Disc.VirtuelSegDiscJnt.Co
> > > > > > > nstraints’
> > > > > > > > Constraint no. 82 above error tolerance 0.000001,
> error =
> > > > > > > 0.000212. -
> > > > > > > > constr. #2 in
> > > > > > >
> > > > >
> > >
> > ‘Main.Model.HumanModel.Trunk.Buckle.Disc1.Disc.VirtuelSegDiscJnt.Co
> > > > > > > nstraints’
> > > > > > > > Constraint no. 83 above error tolerance 0.000001,
> error =
> > > > > > > 0.000162. -
> > > > > > > > constr. #3 in
> > > > > > >
> > > > >
> > >
> > ‘Main.Model.HumanModel.Trunk.Buckle.Disc1.Disc.VirtuelSegDiscJnt.Co
> > > > > > > nstraints’
> > > > > > > > Constraint no. 85 above error tolerance 0.000001,
> error =
> > > > > > > 0.000168. -
> > > > > > > > constr. #0
> > > > > in ‘Main.Model.HumanModel.Trunk.Buckle.Disc1.Disc.drv’
> > > > > > > > Constraint no. 94 above error tolerance 0.000001,
> error =
> > > > > > > 0.000016. -
> > > > > > > > constr. #2 in
> > > > > > >
> > > > >
> > >
> > ‘Main.Model.HumanModel.Trunk.Buckle.Disc2.Disc.VirtuelSegDiscJnt.Co
> > > > > > > nstraints’
> > > > > > > > Constraint no. 95 above error tolerance 0.000001,
> error =
> > > > > > > 0.000008. -
> > > > > > > > constr. #3 in
> > > > > > >
> > > > >
> > >
> > ‘Main.Model.HumanModel.Trunk.Buckle.Disc2.Disc.VirtuelSegDiscJnt.Co
> > > > > > > nstraints’
> > > > > > > > ERROR(OBJ.MCH.KIN3) : C:\Program Files\AnyBody
> > > > > > > > Technology\Repository.6
> > > > > > > \ARep\Aalborg\StandingModel\StandingModel.Main.any(112)
> > > > > > > > : ‘Study’ : Kinematic analysis failed in time
> step 0
> > > > > > > >
> > > > > > > >
> > > > > > > > Error 2
> > > > > > > > GlenohumeralFlexion = 75
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > >
> > >
> *********************************************************************
> > > > > > > ******************
> > > > > > > > Inverse Dynamic Analysis (Operation:
> > > > > > > Main.Study.InverseDynamicAnalysis):
> > > > > > > > 0) Design variables have been updated.
> > > > > > > > 1) Load time positions have been re-established.
> > > > > > > > 2) Kinematic analysis completed. The kinematic
> constraints
> > > > > have
> > > > > > > been
> > > > > > > > resolved.
> > > > > > > > 3) Initial conditions are fully updated
> > > > > > > > 4) Inverse dynamic analysis…
> > > > > > > > ERROR(OBJ1) : C:\Program Files\AnyBody
> > > > > > > > Technology\Repository.6
> > > > > > > \ARep\Aalborg\StandingModel\StandingModel.Main.any(112)
> > > > > > > > : ‘Study’ : Muscle recruitment analysis failed,
> > > simplex
> > > > > solver
> > > > > > > > reports that solution does not satisfy all constraints.
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
[Non-text portions of this message have been removed]