Apply assistive torque to hip joint

Hello, I would like to apply an assistive torque to the hip joint. Based on the examples available, I can generate the assistance profile within AnyBody and apply that to a particular DOF using "AnyForce". For example:

        AnyVar K_LHip = 20;
    AnyForce Spring_LHip = {
      AnyKinMeasure &k1 = Main.HumanModel.BodyModel.Interface.Left.HipFlexion;
      F = .K_LHip*k1.Pos + 20;
      viewForce.Visible = On;
    };

I think, here I defined the assistive force applied (F) to the hip flexion DOF, which is in Newtons. If this is not correct, and this "F" is actually the "Assistive Torque" in Newton.Meter, then how the assistive force and moment arm should be defined here? Could you please provide your feedback so that I can have a better understanding of this?

To simplify my question: consider that I already have a torque profile which is in Newton.Meter. Now, I will try to input this torque to the hip flexion DOF from a .txt file. Which class should I use in AnyBody to apply the torque appropriately? Should I use "AnyForce" and it will define the assistive torque in Newton.Meter to my desired DOF?

Your feedback will be highly appreciated. Thank you very much.

Hi,

Depends on how your .txt is structured. If it is a regular table - you can read it in and construct an interpolation function using AnyFunInterpol class . You can find many example in the repository if you search for these keywords. Once you have the time-dependent force/moment function ready - you add it to the expression defining F.

Here is an example from the repository using AnyForce3D (but same principle works for AnyForce):

  AnyForce3D GRF_M ={
    AnyFunInterpol force = {
      //Type = PiecewiseLinear;
      Type = Bspline;
      BsplineOrder = 4;
      FileName ="..\Input\GRF\GRF_M_325g.txt";
    }; 
    AnySeg &ref1 = Main.RatModel.GroundSegmentM;
    //AnySeg &ref1 = Main.RatModel.Seg.Metatarsus;
    
    // F fuer globale angreifende Kraft
    // FLocal fr lokale angreifende Kraft
    F=force(t);    //GRF from Muir et al., Exp Brain Res 1999 adjusted to 325g BW
  };
  

The units will correspond to the kinematic measure specified.

Kind regards,
Pavel

Hi Pavel,

Thanks very much for your input. I am working on a conceptual hip exoskeleton where an assistive torque will be incorporated to the hip joint. I would like to assist the hip flexion or hip abduction DOF by adding this torque to the joint. In the example you presented above, I believe this force/assistance is applied to a segment "GroundSegmentM" and it's then transferred to the joint ("AnySeg &ref1 = Main.RatModel.GroundSegmentM;"). Since I don't have a design or other reference segment where the torque/force will be applied, I need to consider the net effective torque/force to the hip joint to assist a particular DOF. I will have to report the assistive torque accordingly. In that case, how can I modify the script you presented above? Do I need to create a node at the hip joint center and then use that as my reference node - AnySeg &ref1 = "-";

In the script I mentioned in main post, the assistance is provided to the hip flexion DOF using "AnyKinMeasure" and "AnyForce". I am trying to understand the AnyForce3D class properly and how I can use this script in my case. It would be great if you kindly provide your guidance.

Since I will be testing different assistive torque profiles, I have to generate this torque profile based on values in the literature. This will be a time-dependent torque profile (column 1: Time (s), and column 2: Torque (N.m)).

As you mentioned: "The units will correspond to the kinematic measure specified", does it mean the units of X,Y,Z coordinates in the C3D file as specified? Could you please confirm?

Your feedback is highly appreciated. Thanks again.

Best regards,
Arif

Hi Arif,

Use AnyForce, it is exactly what you need. It will apply a torque in the planes defined by the specified kinematic measure. Units of AnyKinRotational are radians, AnyKinLinear - meters.

Kind regards,
Pavel