Rigid Body Dynamics Library
|
#include <TorqueMuscleFittingToolkit.h>
Static Public Member Functions | |
static void | fitTorqueMuscleParameters (Millard2016TorqueMuscle const &tqMcl, RigidBodyDynamics::Math::VectorNd const &jointAngle, RigidBodyDynamics::Math::VectorNd const &jointAngularVelocity, RigidBodyDynamics::Math::VectorNd const &jointTorque, double activationUpperBound, double passiveTorqueAngleMultiplierUpperBound, TorqueMuscleParameterFittingData ¶metersOfBestFit, bool verbose=false) |
This function will adjust the parameters of the muscle-torque-generator (MTG) so that the MTG is strong enough and flexible enough that it can produce the measured output torque across the vector of measured joint angles and angular velocities without exceeding the desired activation upper bound, nor the passive forces exceeding the prescribed upper bound. This function requires that IPOPT is installed and that cmake has been correctly configured to point at IPOPT's install directory. For a detailed description of the method please see : M.Millard, A.L.Kleesattel, M.Harant, & K.Mombaur. A reduced muscle model and planar musculoskeletal model fit for the synthesis of whole body movements. Journal of Biomechanics. (under review as of August 2018) More... | |
Definition at line 15 of file TorqueMuscleFittingToolkit.h.
|
static |
This function will adjust the parameters of the muscle-torque-generator (MTG) so that the MTG is strong enough and flexible enough that it can produce the measured output torque across the vector of measured joint angles and angular velocities without exceeding the desired activation upper bound, nor the passive forces exceeding the prescribed upper bound. This function requires that IPOPT is installed and that cmake has been correctly configured to point at IPOPT's install directory. For a detailed description of the method please see : M.Millard, A.L.Kleesattel, M.Harant, & K.Mombaur. A reduced muscle model and planar musculoskeletal model fit for the synthesis of whole body movements. Journal of Biomechanics. (under review as of August 2018)
The method adjusts five parameters:
These 5 parameters are a subset of the fitting variables that are available, and are illustrated below:
To peform the fitting, the user must provide vectors of the joint angle, joint angular velocity, and the joint torque for the joint that the muscle-torque-generator (MTG) actuates. The sign of all of these quantities must be consistent with the multibody and the torque muscle. IPOPT solves for the fitting parameters such that the final result is as close as possible to the values the MTG has before the fitting is performed
such that at every point in the vector of joint angles, velocities, and torques the following constraints are satisfied
These constraints ensure that the muscle can deliver the requested torque with an activation of or less, such that the active forces of the muscle are never fighting the passive forces, and that passive forces that are or less. The bound limits on the various optimization variables ensure that the muscle is not made to be weaker or slower than the default settings for the muscle. Thus if your subject is weaker than the default settings for the muscle, you should first weaken the MTG and then run this function.
Notes
tqMcl | The Millard2016TorqueMuscle object that is to be fitted. |
jointAngle | (radians) A vector of measured joint angles. The sign of this vector must be consistent with the multibody model and this torque muscle. |
jointAngularVelocity | (radians/s) A vector of joint angular velocities. The sign of this vector must be consistent with the multibody model and this torque muscle. |
jointTorque | (Nm) A vector of joint torques. Only the values in this vector that have the same torque sign as the muscle are considered during the fitting process. This means, inherently, that the muscle fitting is done assuming that there is no co-contraction. If you want co-contraction to be included in the fitting process, you must preprocess this vector so that it just contains the (estimated) single-signed torque of the muscle in question. The sign of this vector must be consistent with the multibody model and this torque muscle. |
activationUpperBound | (0,1] The maximum activation that is permitted for the given set of joint angles, joint angular velocities, and joint torques. |
passiveTorqueAngleMultiplierUpperBound | (0, ] The maximum passive torque angle multipler that you expect to see when the muscle moves through the values in jointAngle. Note that a value of 1 is quite large: this corresponds to 1 maximum active isometric torque. |
parametersOfBestFit | A structure that contains the parameters of best fit along with a summary of the internal variables of the muscle model at the points in the data where the peak passive forces are developed and where the maximum activation is developed. |
verbose | Setting this to will print information from IPOPT to the screen during the solution process. |