Page 1 of 1

TorqueActuator configuration for CMC

Posted: Tue Feb 28, 2023 11:42 am
by openseb
Hello,

I have some understanding question regarding the configuration of a torque actuator for CMC.
I've added a TorqueActuator to the hip using Matlab (see code below).

Code: Select all

leftHipTorqueActuator = TorqueActuator(pelvis,femur_l,zAxis,false);
leftHipTorqueActuator.setOptimalForce(10);
leftHipTorqueActuator.setName('leftHipTorqueActuator');
osimModel.addForce(leftHipTorqueActuator);
The API documentation states for the TorqueActuator() constructor
Create a torque actuator that applies equal and opposite torques on the two bodies (bodyA and B) that it connects. The torque is applied about an axis specified in ground if axisInGround is true, otherwise it is specified in bodyA's body frame.
As I understand the doc my command means that the torque should rotate around the zAxis of the pelvis body frame.
Question 1:
But what is the direction of rotation?
Question 2:
How can I influence that the torque turns clockwise and counterclockwise during a gait cycle? Maybe by using the control signal with positive and negative values?

Furthermore the API documentation states
The magnitude of the torque is equal to the product of the optimal_force of the actuator and its control signal.
Question 3:
If I want to exert a maximum of 100 Nm of torque. How should I achieve this?
3 a)
Should I set the optimal force to a value off 100 and apply factors between 0 ... 1 by using the control signal curve, where 0 is unsupported and 1 is the maximum , or
3 b)
Should I set the optimal force to a value off 10 and apply factors between 0 ... 10 by using the control signal curve, or
3 c)
Is a) and b) the same and it only depends on my preference?

I hope someone can answer my questions.

Re: TorqueActuator configuration for CMC

Posted: Wed Mar 08, 2023 4:31 pm
by ongcf
Question 1:
But what is the direction of rotation?
This should follow the right-hand rule, with positive control values generating torque in the positive z-axis direction (and vice versa for negative control values)
Question 2:
How can I influence that the torque turns clockwise and counterclockwise during a gait cycle? Maybe by using the control signal with positive and negative values?
Yes, a negative value should generate torque in the opposite direction

Aside: Users often want to generate torques along the direction of degrees of freedom (e.g., hip flexion or hip adduction), and if this is true for you too, it's often easier to use a "CoordinateActuator" rather than a "TorqueActuator".
Question 3:
If I want to exert a maximum of 100 Nm of torque. How should I achieve this?
3 a)
Should I set the optimal force to a value off 100 and apply factors between 0 ... 1 by using the control signal curve, where 0 is unsupported and 1 is the maximum , or
3 b)
Should I set the optimal force to a value off 10 and apply factors between 0 ... 10 by using the control signal curve, or
3 c)
Is a) and b) the same and it only depends on my preference?
3a and 3b will generate the same range, and it depends a little on preference, but also depending on how you use it in the CMC problem. If you are prescribing a control value, it will not make a difference. However, if you are using CMC to solve for the control values of this actuator, then a higher optimal force will mean that CMC will try to use this actuator more (since it can achieve the same torque for smaller control values, see the CMC documentation for more information).

Re: TorqueActuator configuration for CMC

Posted: Wed Mar 15, 2023 3:58 am
by openseb
Dear Carmichael,

Thank you very much for your explanations. That was very helpful.

Best regards.