Projection of GRF along ankle-hip axis

Hi everyone,

I'm trying to calculate the components of GRF acting along or perpendicularly (in the sagittal plane) to the ankle-hip axis.

First of all I'm concatenating the GRFs of multiple force plates for each leg.
I am analysing multiple subjects that don't necessarily hit the same force plates in the same order, so to output the GRF according to the foot which is actually in contact with the force plates I used the following code:

AnyVec3 RightGRF_Vec= 
(Main.EnvironmentModel.ForcePlates.Plate1.ForcePlate.NetEffectMeasure.Flocal
*Main.EnvironmentModel.ForcePlates.Plate1.ContactDetectionLimb1.InContactMuscle.S/10000)
*Main.EnvironmentModel.GlobalRef.RightGaitDirection.Axes   +
(Main.EnvironmentModel.ForcePlates.Plate2.ForcePlate.NetEffectMeasure.Flocal
*Main.EnvironmentModel.ForcePlates.Plate2.ContactDetectionLimb1.InContactMuscle.S/10000)
*Main.EnvironmentModel.GlobalRef.RightGaitDirection.Axes;
 

NetEffectMeasure is for a ForcePlate type 3, otherwise I would use Main.EnvironmentModel.ForcePlates.Plate1.ForcePlate.Force.Fout for a ForcePlate type 2

and this works well so far.
I don't know if there was a better way to do this? I was also searching for the corresponding force applied to a node on the leg, but I couldn't find it.

RightGaitDirectionX is the ref frame of the actual direction of gait based on the projections of the heel and toe markers on the ground. This has the advantage that ML and AP components are homogeneously reported even if the subjects walk over the force plates in the different directions.

       AnyRefNode RightGaitDirection = {
    AnyVec3 O = Main.Studies.InverseDynamicStudy.Normalized.RightHeelStrike1Proj ;
    AnyVec3 X = Main.Studies.InverseDynamicStudy.Normalized.RightHeelStrike2Proj - Main.Studies.InverseDynamicStudy.Normalized.RightHeelStrike1Proj;
    AnyVec3 Y =  {0.0,0.0,1.0};
    AnyVec3 Z = cross(X,Y);
    sRel = O;
    ARel = {X/vnorm(X),Y/vnorm(Y),Z/vnorm(Z)}';
    AnyDrawRefFrame drw = {RGB = {1,0,0}; ScaleXYZ = {1.0, 1.0, 1.0};};
  };
  

but Main.EnvironmentModel.GlobalRef would do the job just fine.

Right now I'm trying to project the vector RightGRF_Vec on the axis connecting the hip and the ankle joint.

AnyVec3 RightLegAnkleHipAxis =(Main.HumanModel.BodyModel.Right.Leg.Seg.Thigh.HipJointAnatomicalFrame.r)-(Main.HumanModel.BodyModel.Right.Leg.Seg.Shank.AnkleJointComplexAnatomicalFrame.r)

I thought of creating a ref node that includes with one of the axis defined as ankle-hip vector above, something like this:

AnyRefNode RightLegAnkleHipRefFrame = 
{
AnyVec3 O = Main.EnvironmentModel.GlobalRef.Origin; 
     ​
​AnyVec3 Y = .RightLegAnkleHipAxis; 
AnyVec3 Z = Main.EnvironmentModel.GlobalRef.RightGaitDirection.Z;  //the mediolateral component
AnyVec3 X = cross(Y,Z);

   ​sRel = O;   
​ ​ARel = {X/vnorm(X),Y/vnorm(Y),Z/vnorm(Z)}';
};

but I get the following error:
ERROR(SCR.EXP10) : GRF Outputs.any(17) : 'RightLegAnkleHipRefFrame' : Expression evaluation failed at moment 'DesignVar' :
GRF Outputs.any(21) : X : argument will not be ready for evaluation until moment 'PosVar'
Model loading skipped

And then I was thinking of calculating the projection like this


  AnyVec3 GRF_projected= RightGRF_Vec*RightLegAnkleHipRefFrame.Axes;

Any suggestion on how to fix the issue with defining the last reference frame, or how to bypass the problem altogether and implement a smarter approach?

Thanks for your help!
Enrico

Hi Enrico

The issue is because that the node would have to rotate relative to segment and hence is not rigid.

So instead of defining a node, just compute the rotation matrix as a AnyMat33 and use that when you compute the projection.

Best regards
Michael

Hi Michael,

Thank you so much! I thought I was unnecessarily complicating my life :slight_smile: This is definitely much easier and faster.

Have a good day!
Enrico

This topic was automatically closed 125 days after the last reply. New replies are no longer allowed.