Skip to main content

Surrogate Model Creation

Surrogate Model Creation is a process built into all of the Treatment Optimization tools that fits a polynomial to model properties in order to more efficiently calculate the values throughout the optimization process. In particular, it calculates the time varying quantities muscle-tendon lengths (lMT)(l^{MT}), muscle-tendon velocities (vMT)(v^{MT}), and moment arms (r) using polynomial functions of the joint angles and velocities that share common coefficients. For more details on how this works see below.

How it Works

The time varying quantities muscle-tendon lengths (lMTl^{MT}), muscle-tendon velocities (vMTv^{MT}), and moment arms (r) are calculated using polynomial functions of the joint angles and velocities that share common coefficients. For muscles that span a single degree of freedom (DOF) and for the selection of a cubic polynomial, the muscle-tendon length is approximated using the following equation:

lMT(t)=b0+b1θ+b2θ2+b3θ3l^{MT}(t) = b_0 + b_1 \theta + b_2 \theta ^2 + b_3 \theta ^3

where θ\theta is joint angle and b0b_0 through b3b_3 are constant coefficients. Muscle-tendon velocity can then be calculated using the first derivative with respect to time of muscle-tendon length.

vMT(t)=dlMTdt=b1θ˙+2b2θθ˙+3b3θ2θ˙v^{MT}(t) = \frac {dl^{MT}} {dt} = b_1 \.\theta + 2 b_2 \theta \.\theta + 3 b_3 \theta ^2 \.\theta

where θ˙\.\theta is joint angular velocity. Similarly, the muscle-tendon moment arm can be calculated from muscle-tendon length using a relationship from An et al.:

r(t)=lMTθ=b12b2θ3b3θ2r(t) = - \frac {\partial l^{MT}} {\partial \theta} = -b_1 -2b_2 \theta -3b_3 \theta ^2

The negative sign in this expression is needed for consistency with the OpenSim musculoskeletal modeling environment, where a positive joint moment causes a positive change in joint angle. For muscles that span two DOFs and for the selection of a cubic polynomial, these equations are extended as follows:

lMT(t)=b0+b1θ1+b2θ2+b3θ1θ2+b4θ12+b5θ22+b6θ12θ2+b7θ1θ22+b8θ13+b9θ23l^{MT}(t) = b_0 + b_1 \theta_1 + b_2 \theta_2 + b_3 \theta_1 \theta_2 + b_4\theta_1^2 + b_5\theta_2^2 + b_6 \theta_1^2 \theta_2 + b_7 \theta_1 \theta_2^2 + b_8 \theta_1^3 + b_9 \theta_2^3
vMT(t)=b1θ˙1+b2θ˙2+b3(θ˙1θ2+θ1θ˙2)+2b4θ1θ˙1+2b5θ2θ˙2+...v^{MT}(t) = b_1\.\theta_1 + b_2\.\theta_2 + b_3(\.\theta_1 \theta_2 + \theta_1 \.\theta_2) + 2b_4\theta_1\.\theta_1 + 2b_5\theta_2\.\theta_2 + ...
b6(2θ1θ˙1θ2+θ12θ˙2)+b7(θ˙1θ22+2θ1θ2θ˙2)+3b8θ12θ˙1+3b9θ22θ˙2b_6(2\theta_1\.\theta_1\theta_2 + \theta_1^2\.\theta_2) + b_7(\.\theta_1\theta_2^2 + 2\theta_1\theta_2\.\theta_2) + 3b_8\theta_1^2\.\theta_1 + 3b_9\theta_2^2\.\theta_2
r1=lMTθ1=b1b3θ22b4θ12b6θ1θ2b7θ223b8θ12r_1 = - \frac {\partial l^{MT}} {\partial \theta_1} = -b_1 -b_3\theta_2 -2b_4 \theta_1 -2b_6\theta_1\theta_2 - b_7\theta_2^2 -3b_8\theta_1^2
r2=lMTθ2=b2b3θ12b5θ2b6θ122b7θ1θ23b9θ22r_2 = - \frac {\partial l^{MT}} {\partial \theta_2} = -b_2 -b_3\theta_1 -2b_5 \theta_2 -b_6\theta_1^2 -2b_7\theta_1\theta_2 -3b_9\theta_2^2

For muscles that span three, four or more degrees of freedom, the equations for muscle-tendon length, muscle-tendon velocities, and moment arms are extended in a similar manner by adding terms corresponding to the additional joint angles and velocities.

For more detail, visit the hands-on Surrogate Model Tutorial.