|
static void | createAnderson2007ActiveTorqueAngleCurve (double c2, double c3, const std::string &curveName, RigidBodyDynamics::Addons::Geometry::SmoothSegmentedFunction &smoothSegmentedFunctionToUpdate) |
|
static void | createAnderson2007ActiveTorqueVelocityCurve (double c4, double c5, double c6, double minEccentricMultiplier, double maxEccentricMultiplier, const std::string &curveName, RigidBodyDynamics::Addons::Geometry::SmoothSegmentedFunction &smoothSegmentedFunctionToUpdate) |
|
static void | createAnderson2007PassiveTorqueAngleCurve (double scale, double c1, double b1, double k1, double b2, double k2, const std::string &curveName, RigidBodyDynamics::Addons::Geometry::SmoothSegmentedFunction &smoothSegmentedFunctionToUpdate) |
|
static void | createTorqueVelocityCurve (double tvAtEccentricOmegaMax, double tvAtHalfConcentricOmegaMax, const std::string &curveName, RigidBodyDynamics::Addons::Geometry::SmoothSegmentedFunction &smoothSegmentedFunctionToUpdate) |
|
static void | createTorqueVelocityCurve (double tvAtEccentricOmegaMax, double tvAtHalfConcentricOmegaMax, double slopeAtConcentricOmegaMax, double slopeNearEccentricOmegaMax, double slopeAtEccentricOmegaMax, double eccentricCurviness, const std::string &curveName, RigidBodyDynamics::Addons::Geometry::SmoothSegmentedFunction &smoothSegmentedFunctionToUpdate) |
|
static void | createPassiveTorqueAngleCurve (double angleAtZeroTorque, double angleAtOneNormTorque, const std::string &curveName, RigidBodyDynamics::Addons::Geometry::SmoothSegmentedFunction &smoothSegmentedFunctionToUpdate) |
|
static void | createPassiveTorqueAngleCurve (double angleAtZeroTorque, double angleAtOneNormTorque, double stiffnessAtLowTorque, double stiffnessAtOneNormTorque, double curviness, const std::string &curveName, RigidBodyDynamics::Addons::Geometry::SmoothSegmentedFunction &smoothSegmentedFunctionToUpdate) |
|
static void | createGaussianShapedActiveTorqueAngleCurve (double angleAtOneNormTorque, double angularStandardDeviation, const std::string &curveName, RigidBodyDynamics::Addons::Geometry::SmoothSegmentedFunction &smoothSegmentedFunctionToUpdate) |
|
static void | createGaussianShapedActiveTorqueAngleCurve (double angleAtOneNormTorque, double angularStandardDeviation, double minSlopeAtShoulders, double minValueAtShoulders, double curviness, const std::string &curveName, RigidBodyDynamics::Addons::Geometry::SmoothSegmentedFunction &smoothSegmentedFunctionToUpdate) |
|
static void | createTendonTorqueAngleCurve (double angularStretchAtOneNormTorque, const std::string &curveName, RigidBodyDynamics::Addons::Geometry::SmoothSegmentedFunction &smoothSegmentedFunctionToUpdate) |
|
static void | createTendonTorqueAngleCurve (double angularStretchAtOneNormTorque, double stiffnessAtOneNormTorque, double normTorqueAtToeEnd, double curviness, const std::string &curveName, RigidBodyDynamics::Addons::Geometry::SmoothSegmentedFunction &smoothSegmentedFunctionToUpdate) |
|
static void | createDampingBlendingCurve (double normAngularVelocityAtMaximumDamping, const std::string &curveName, RigidBodyDynamics::Addons::Geometry::SmoothSegmentedFunction &smoothSegmentedFunctionToUpdate) |
|
This is a function that will produce a C2 (continuous to the second derivative) active torque angle curve. This Bezier curve has been fitted to match the active-torque-angle curve described in
Anderson, Dennis E., Michael L. Madigan, and Maury A. Nussbaum. "Maximum voluntary joint torque as a function of joint angle and
angular velocity: model development and application to the lower
limb." Journal of biomechanics 40, no. 14 (2007): 3105-3113.
but note that its range is normalized to [0,1].
- Parameters
-
c2 | (radians) The active-torque-angle width parameter. The parameter c2 is defined by Anderson et al. as |
c2 = pi/(theta_max - theta_min).
- Parameters
-
c3 | : (radians) Then angle which has the largest active-torque. |
curveName | The name of the joint torque this curve applies to. This curve name should have the name of the joint and the direction (e.g. hipExtensionTorqueMuscle) so that if this curve ever causes an exception, a user friendly error message can be displayed to the end user to help them debug their model. |
smoothSegmentedFunctionToUpdate | A SmoothSegmentedFunction object that will be erased and filled with the coefficients that are defined by this curve. |
This is a function that will produce a C2 (continuous to the second derivative) active torque (angular) velocity curve. This Bezier curve has been fitted to match the active-torque-angle curve described in
Anderson, Dennis E., Michael L. Madigan, and Maury A. Nussbaum. "Maximum voluntary joint torque as a function of joint angle and
angular velocity: model development and application to the lower
limb." Journal of biomechanics 40, no. 14 (2007): 3105-3113.
While the concentric side of the Bezier curve and the original formulation match, the eccentric side does not: the equations Anderson et al. chose decrease down to 0 rapidly. Since Anderson et al. did not collect data at the higher eccentric velocities the oddities in their chosen curves are likely due to the parameterization they chose. The eccentric side of the Bezier curve will be fitted so that, if possible, it passes close to the value of the original curves for theta = -60 deg/s within the limits imposed by minEccentricMultiplier and maxEccentricMultiplier.
- Parameters
-
c4 | (rads/s) Angular velocity when the torque is 75% of the maximum isometric torque. |
c5 | (rads/s) Angular velocity when the torque is 50% of the maximum isometric torque. |
c6 | Multiplier that Anderson et al. uses to describe the change in slope of the curve as the contraction velocity changes sign from + to -. |
minEccentricMultiplier | The minimum value of the torque-(angular)-velocity curve tends to at large eccentric contraction velocities. Note minEccentricMultiplier > 1.0 |
maxEccentricMultiplier | The value of the torque-(angular)-velocity curve tends to at large eccentric contraction velocities. Note maxEccentricMultiplier > minEccentricMultiplier. |
curveName | The name of the joint torque this curve applies to. This curve name should have the name of the joint and the direction (e.g. hipExtensionTorqueMuscle) so that if this curve ever causes an exception, a user friendly error message can be displayed to the end user to help them debug their model. |
smoothSegmentedFunctionToUpdate | A SmoothSegmentedFunction object that will be erased and filled with the coefficients that are defined by this curve. |
This is a function that will produce a C2 (continuous to the second derivative) passive torque angle curve described in
Anderson, Dennis E., Michael L. Madigan, and Maury A. Nussbaum. "Maximum voluntary joint torque as a function of joint angle and
angular velocity: model development and application to the lower
limb." Journal of biomechanics 40, no. 14 (2007): 3105-3113.
Note the following differences between this implementation and the original equations presented in Anderson et al.:
- This function will return a curve that is fitted to the positive side of the curve defined by the coefficients b1, k1, b2, and k2. Because of the sign convention employed by Anderson et al. the positive side of the curve corresponds to the passive curve generated by the torque actuator associated with the rest of the coefficients.
- This function has been normalized so that a value of 1.0 corresponds to one-maximum-isometric-active-contraction torque, or c1*subjectWeightInNewtons*subjectHeightInMeters.
- Parameters
-
scale | The scaling factor used on the c1 column in Table 3 of Anderson et al.: |
scale = subjectWeightInNewtons * subjectHeightInMeters
- Parameters
-
c1 | The normalized c1 parameter listed in Tabel 3 of Anderson et al. |
b1 | The passive torque angle curve parameter used in Anderson et al.'s Eqn. 1: |
torquePassive = b1*exp(k1*theta) + b2*exp(k2*theta)
- Parameters
-
k1 | The term k1 in Anderson et al.'s Eqn. 1. |
b2 | The term b2 in Anderson et al.'s Eqn. 1. |
k2 | The term k2 in Anderson et al.'s Eqn. 1. |
curveName | The name of the joint torque this curve applies to. This curve name should have the name of the joint and the direction (e.g. hipExtensionTorqueMuscle) so that if this curve ever causes an exception, a user friendly error message can be displayed to the end user to help them debug their model. |
smoothSegmentedFunctionToUpdate | A SmoothSegmentedFunction object that will be erased and filled with the coefficients that are defined by this curve. |
This function creates a Bezier spline that closely follows the exponential curves that are typically used to model the passive-torque-angle characteristic of muscles. This curve has a value and a slope of zero for angles that are less than abs(angleAtZeroTorque). For angles that have an absolute magnitude larger than abs(angleAtOneNormTorque) the curve is simply linearly extrapolated.
Note that curves can be represented that increase left-to-right, or decrease left-to-right by setting the variables angleAtOneNormTorque and angleAtZeroTorque correctly. For example using (0,1) for angleAtOneNormTorque and angleAtZeroTorque produces a curve that increases left-to-right while using (-1,0) produces a curve that decreases left to right.
- Parameters
-
angleAtZeroTorque | is the angle at which the curve transitions from a flat line and begins curving upwards. (radians) |
angleAtOneNormTorque | is the angle at which this curve achieves a value of 1.0. (radians) |
curveName | The name of the joint torque this curve applies to. This curve name should have the name of the joint and the direction (e.g. hipExtensionTorqueMuscle) so that if this curve ever causes an exception, a user friendly error message can be displayed to the end user to help them debug their model. |
smoothSegmentedFunctionToUpdate | A SmoothSegmentedFunction object that will be erased and filled with the coefficients that are defined by this curve. |
aborts
- abs(angleAtOneNormTorque-angleAtZeroTorque) < sqrt(eps)
static void createPassiveTorqueAngleCurve |
( |
double |
angleAtZeroTorque, |
|
|
double |
angleAtOneNormTorque, |
|
|
double |
stiffnessAtLowTorque, |
|
|
double |
stiffnessAtOneNormTorque, |
|
|
double |
curviness, |
|
|
const std::string & |
curveName, |
|
|
RigidBodyDynamics::Addons::Geometry::SmoothSegmentedFunction & |
smoothSegmentedFunctionToUpdate |
|
) |
| |
|
static |
This function creates a Bezier spline that closely follows the exponential curves that are typically used to model the passive-torque-angle characteristic of muscles. This curve has a value and a slope of zero for angles that are less than abs(angleAtZeroTorque). For angles that have an absolute magnitude larger than abs(angleAtOneNormTorque) the curve is simply linearly extrapolated.
Note that curves can be represented that increase left-to-right, or decrease left-to-right by setting the variables angleAtOneNormTorque and angleAtZeroTorque correctly. For example using (0,1) for angleAtOneNormTorque and angleAtZeroTorque produces a curve that increases left-to-right while using (-1,0) produces a curve that decreases left to right.
- Parameters
-
angleAtZeroTorque | is the angle at which the curve transitions from a flat line and begins curving upwards. (radians) |
angleAtOneNormTorque | is the angle at which this curve achieves a value of 1.0. (radians) |
stiffnessAtLowTorque | The normalized stiffness (or slope) of the curve achieves as it begins to increase. This is usually chosen to be a small, but non-zero fraction of stiffnessAtOneNormTorque (stiffnessAtLowTorque = 0.025 stiffnessAtOneNormTorque is typical). The sign of stiffnessAtLowTorque must be positive if angleAtOneNormTorque > angleAtZeroPassiveTorque. The sign of stiffnessAtLowTorque must be negative if angleAtOneNormTorque < angleAtZeroPassiveTorque. (Norm.Torque/radians)
|
stiffnessAtOneNormTorque | The normalized stiffness (or slope) of the fiber curve when the fiber is stretched by
angleAtOneNormTorque - angleAtZeroPassiveTorque. The sign of stiffnessAtOneNormTorque must agree with stiffnessAtLowTorque. (Norm.Torque/radians) |
curviness | The dimensionless 'curviness' parameter that can vary between 0 (a line) to 1 (a smooth, but sharply bent elbow). A value of 0.5 is typical as it produces a graceful curve. |
curveName | The name of the joint torque this curve applies to. This curve name should have the name of the joint and the direction (e.g. hipExtensionTorqueMuscle) so that if this curve ever causes an exception, a user friendly error message can be displayed to the end user to help them debug their model. |
smoothSegmentedFunctionToUpdate | A SmoothSegmentedFunction object that will be erased and filled with the coefficients that are defined by this curve. |
aborts
- abs(angleAtOneNormTorque-angleAtZeroTorque) < sqrt(eps)
- sign(stiffnessAtLowTorque) != sign(angleAtOneNormTorque-angleAtLowTorque)
- sign(stiffnessAtOneNormTorque) != sign(stiffnessAtLowTorque)
- abs(stiffnessAtLowTorque) > 0.9/abs(angleAtOneNormTorque-angleAtZeroTorque)
- abs(stiffnessAtOneTorque) <= 1.1/abs(angleAtOneNormTorque-angleAtZeroTorque)
- curviness < 0 or curviness > 1
This function creates a normalized torque-velocity curve. The concentric side of the curve is fitted to Hill's hyperbola that passes through the value of tv-at-half-of-the-maximum-concentric-velocity (a parameter supplied by the user). The eccentric side of the curve rapidly, but smoothly approaches a terminal value of tv-at-the-maximum-eccentric-contraction-velocity. Outside of the normalized velocities of -1 to 1 the curve takes the values of 0, and tvAtEccentricOmegaMax respectively with a slope of 0.
- Parameters
-
tvAtEccentricOmegaMax | The value of the torque-velocity-multiplier at the maximum eccentric contraction velocity. This value must be |
tvAtHalfConcentricOmegaMax | The value of the torque-velocity- |
curveName | The name of the joint torque this curve applies to. This curve name should have the name of the joint and the direction (e.g. hipExtensionTorqueMuscle) so that if this curve ever causes an exception, a user friendly error message can be displayed to the end user to help them debug their model. |
smoothSegmentedFunctionToUpdate | A SmoothSegmentedFunction object that will be erased and filled with the coefficients that are defined by this curve. |
aborts
-tvAtEccentricOmegaMax < 1.05 -tvAtHalfOmegaMax >= 0.45
-tvAtHalfOmegaMax <= 0.05
References Hill, A. V. (1938). The heat of shortening and the dynamic constants of muscle. Proceedings of the Royal Society of London B: Biological Sciences, 126(843), 136-195.
static void createTorqueVelocityCurve |
( |
double |
tvAtEccentricOmegaMax, |
|
|
double |
tvAtHalfConcentricOmegaMax, |
|
|
double |
slopeAtConcentricOmegaMax, |
|
|
double |
slopeNearEccentricOmegaMax, |
|
|
double |
slopeAtEccentricOmegaMax, |
|
|
double |
eccentricCurviness, |
|
|
const std::string & |
curveName, |
|
|
RigidBodyDynamics::Addons::Geometry::SmoothSegmentedFunction & |
smoothSegmentedFunctionToUpdate |
|
) |
| |
|
static |
This function creates a normalized torque-velocity curve. The concentric side of the curve is fitted to Hill's hyperbola that passes through the value of tv-at-half-of-the-maximum-concentric-velocity (a parameter supplied by the user). The eccentric side of the curve rapidly, but smoothly approaches a terminal value of tv-at-the-maximum-eccentric-contraction-velocity. Shape of the eccentric side of the curve can be changed using the slopeNearEccentricOmegaMax and curviness variables. Outside of the normalized velocities of -1 to 1 the curve takes the values of slopeAtConcentricOmegaMax and slopeAtEccentricOmegaMax respectively.
- Parameters
-
tvAtEccentricOmegaMax | The value of the torque-velocity-multiplier at the maximum eccentric contraction velocity. This value must be |
tvAtHalfConcentricOmegaMax | The value of the torque-velocity- |
slopeAtConcentricOmegaMax | The slope of the curve at a normalized angular velocity of -1. This slope is used to extrapolate for normalized angular velocities of less than -1. |
slopeNearEccentricOmegaMax | The slope of the eccentric side of the curve as the normalized angular velocity approaches 1. |
slopeAtEccentricOmegaMax | The slope of the curve at a normalized angular velocity of 1. This slope is used to extrapolate for normalized angular velocities of greater than 1. |
eccentricCurviness | This parameter controls the shape of the curve between the normalized angular velocities of 0 and 1. An eccentricCurviness of 0 will flatten the elbow so that the curve closely follows a line that begins at (0,1) and ends at (1,tvAtEccentricOmegaMax). An eccentricCurviness of 1 will give the curve a strong elbow so that it quickly approaches the line that passes through the point (1,tvAtEccentricOmegaMax) and has a slope of slopeNearEccentricOmegaMax. |
curveName | The name of the joint torque this curve applies to. This curve name should have the name of the joint and the direction (e.g. hipExtensionTorqueMuscle) so that if this curve ever causes an exception, a user friendly error message can be displayed to the end user to help them debug their model. |
smoothSegmentedFunctionToUpdate | A SmoothSegmentedFunction object that will be erased and filled with the coefficients that are defined by this curve. |
aborts
-tvAtEccentricOmegaMax < 1.05 -tvAtHalfOmegaMax > 0.45 or tvAtHalfOmegaMax < 0.05 -slopeAtConcentricOmegaMax < 0 -slopeNearEccentricOmegaMax < 0 -slopeAtEccentricOmegaMax < 0 -eccentricCurviness < 0 or eccentricCurviness > 1
References Hill, A. V. (1938). The heat of shortening and the dynamic constants of muscle. Proceedings of the Royal Society of London B: Biological Sciences, 126(843), 136-195.