A: Run forward dynamic simulations using adjusted excitations

Objective: Manually adjust excitations for a single muscle using the Excitation Editor in the OpenSim GUI. Run a forward dynamic simulation using the modified muscle controls.

Open the Excitation Editor and load the default controls.

The Excitation Editor in OpenSim allows you to visually inspect and edit the excitation patterns for the muscles in a model. By varying the excitation patterns, you will gain insight into the contribution of different muscle groups to the jump performance. The actuators for the model are Thelen 2003 Muscles. The muscles themselves are defined in the ForceSet group in the .osim model file. The controllers for the muscles will be created in the Excitation Editor and input into the Forward Dynamic Tool.

  • Open the Excitation Editor by selecting the "Excitations..." option from the Edit menu.
  • Load the default controls by clicking "Load..." and navigating to the appropriate XML file (i.e., OptimalJump_DefaultControls.xml).
  • Select a muscle from the list and click OK.

Manually adjust the control points.

In this model, the controller for each muscle calculates excitations by linearly interpolating between control points. In the Excitation Editor, you can select and adjust the control points of the controller. Control points can be selected individually or using the box select functionality.

  • To select an individual control point, hold the <Ctrl> key and left-click on the desired point.
  • To select a group of control points, hold the <Ctrl> key and use the left mouse button to drag a box over the desired points.
  • To add control points to your current selection, hold <Shift> while selecting.

Once you have selected one or more control points, you can drag them to a new location or set their value by typing a number in the box labeled "Set selected points to" and clicking OK.

Save the excitation values to a new XML file and save the editor layout.

To preserve the default control file for later use, it is best to save your changes to a new XML file. By saving the editor layout as well, you will be able to quickly restore the Excitation Editor layout for future adjustments.

  • Click the "Save As" button to save the complete set of muscle controls to a new file (e.g., modified_controls.xml).
  • Click the "Save Layout..." button to save the editor layout to a new file (e.g., modified_layout.txt).

For additional help, see the Excitation Editor page in the Developer's Guide.

Run a forward dynamic simulation of a jump using the modified excitation controls.

The modified controls file can now be used as input for a forward dynamic simulation of a jump. An initial states file (OptimalJump_InitalStates.sto) is attached to this page to help maintain initial conditions across multiple runs. The initial state is composed of the positions and velocities of the generalized coordinates and the activation and fiber length for each muscle. The initial activation is set to zero for all muscles.

  • Open the Forward Dynamics Tool from the Tools menu.
  • In the Input panel, set the controls to the desired XML file (e.g., modified_controls.xml).
  • In the Input panel, set the initial state to the .sto file attached to this page (i.e., OptimalJump_InitialStates.sto).
  • In the Input panel, check the box for Solve for equilibrium actuator states.
  • Set the simulation range to 0 to 1 second.
  • Set the "Directory" name to the desired output directory (e.g., append "\modified" to the current directory showing).
  • In the Analyses tab, click "Add >" and add a ForceReporter, a JointReaction analysis, and a BodyKinematics analysis to the simulation.
  • Save the Forward Dynamics Tool setup to a new file (e.g., modified_forward_tool_setup.xml).
  • Run the forward simulation and observe the result.

Adding three analysis to the Forward Tool creates several files in your output folder. For this example, the important files and data columns are:

  • ForceReporter - File name: Jumper_ForceReporter_forces.sto
    • Muscle Forces - The muscle force time histories are listed by the name of the muscle.
    • ContactForces - The contact force time histories are listed with period-delimited names. The naming convention is (ContactForce).(onBody).(ForceOrTorque).(direction). For example, foot_r.calcn_r.force.X is the force applied by the ContactForce foot_r on the Body calcn_r in the X direction.
    • CoordinateLimitForces - The coordinate limit force time histories are listed by name of the force. The potential energy of the spring in each force is also calculated.

B: Explore the contribution of each muscle group to jumping

Objective: Use the Excitation Editor and Forward Dynamics Tool to explore the effect of maximally exciting select muscle groups.

To speed up your design iterations, we have provided a set of Excitation Editor layout files (attached to this page).

Examine the contribution of the following muscle groups by using the Excitation Editor to maximally excite each group individually and compare the results to the default controls file:

  • (VAS) – vastus intermedius
    • Muscle Names: vas_int_l, vas_int_r
    • Layout File: vas_excitation_layout.txt

  • (SOL) – soleus
    • Muscle Names: soleus_l, soleus_r
    • Layout File: sol_excitation_layout.txt

  • (GAS) – medial gastrocnemius
    • Muscle Names: med_gas_l, med_gas_r
    • Layout File: gas_excitation_layout.txt

  • (GMAXM and GMAXL) – medial and lateral gluteus maximus
    • Muscle Names: glut_max1_l, glut_max2_l, glut_max1_r, glut_max2_r
    • Layout File: gm_excitation_layout.txt

  • (HAMS) – bifemoral long head and short head (hamstrings)
    • Muscle Names: bifemlh_l, bifemlh_r, bifemsh_l, and bifemsh_r
    • Layout File: hams_excitation_layout.txt

  • (ADM) – adductor magnus
    • Muscle Names: add_mag2_l, add_mag2_r
    • Layout File: adm_excitation_layout.text

For each of the muscle groups:

  • Load the default controls into the Excitation Editor (e.g., OptimalJump_DefaultControls.xml).
  • Load the layout for the desired muscle group.
  • Increase the excitation of all the nodes to the maximum value of 1.0.
  • Save the new controls to a file (e.g., vas_modified_controls.xml).
  • Use the Forward Dynamics Tool to simulate the jump with the new controls.

After each change to the excitations, use save as to overwrite the file instead of just save or it is possible that some of your changes may not be fully committed.

C: Jump sky high

Objective: Adjust the muscle excitations to produce the best jump possible.


You are welcome to modify additional sets of muscles to maximize your jump performance. We recommend that you create new layouts in the Excitation Editor for the muscle sets to speed up your editing time.

Find the best jump possible.

By manually editing the muscle excitations, find a set of muscle excitation patterns that produce a well-coordinated jump. The overall jump performance is a combination of the final jump height and the ligament force penalties. The jump height is defined as the center of mass location in the y-direction minus the model's standing height of 0.9633 m. The ligament torque motors enforce the minimum and maximum value of the joint coordinates in the model. The ligament force penalty is proportional to the integral of the ligament joint torques over the duration of stance. You do not need to apply a penalty for the motor torques applied during flight.

The performance criterion for jumping is as follows:

J = \left(\,y_{\mathrm{COM}} - 0.9633\,\right) - 0.001 \left( \int_0^{t_{to}} \mathrm{abs}(\text{LumbarExtensionLimit})\,dt \\+ \int_0^{t_{to}} \mathrm{abs}(\text{KneeLimit_l})\,dt \\+ \int_0^{t_{to}} \mathrm{abs}(\text{KneeLimit_r})\,dt \right)

 

where

  • t_{to} is the time of take-off (i.e., the instant all the ground contact forces become zero).

  • y_{\mathrm{COM}} is the y-component of the system's COM at maximum height. This value is output in the "Jumper_BodyKinematics_pos_global.sto" file, which is in the output folder when the BodyKinematics analysis is attached to the Forward Tool.

  • LumbarExtensionLimit, KneeLimit_l and KneeLimit_r are the values of the torque actuators (reported in Nm) that are used to enforce the coordinate limits. These values are output in the "Jumper_ForceReporter_forces.sto" file, which is in the output folder when the ForceReporter analysis is attached to the Forward Tool.

Make sure to save the controls for your best jump performance to a file (e.g., OptimalJump_controls_best.xml).

Find the second-best jump possible.

Choose one of the muscles whose excitations you modified and set the excitation of that muscle to the minimum 0.02. Produce the best jump possible without that muscle.

Make sure to save the controls for your second-best jump performance to a file (e.g., OptimalJump_controls_second_best.xml).