Skip to main content

Verification Optimization

Tutorial Developers: Robert Salati, B.J. Fregly, Rice Computational Neuromechanics Lab, Rice University

Last Updated: 3/10/2026

For this step in the soccer kicking example, you will use the Verification Optimization (VO) tool to sanity check your TO run and dry run your future DO run.

Setting up a VO settings file

  1. Copy and paste your settings file TOSettings.xml and name it VOSettings.xml

  2. Open VOSettings.xml in a text editor and change the XML headings at the top and bottom of the file from <TrackingOptimizationTool> to <VerificationOptimizationTool>

  3. Chang <initial_guess_directory> and <tracked_quantities_directory> to TOResults

  4. Disable <optimize_synergy_vectors>

  5. Remove all cost terms except for Synergy_Activation_Tracking

  6. Change the max allowable error of Synergy_Activation_Tracking to 1.

  7. Add the following constraints:

    Name: Initial_Generalized_Coordinate_Deviation
    Type: initial_generalized_coordinate_deviation
    Component list:
    hip_flexion_r
    knee_angle_r
    ankle_angle_r
    Max error: 0.0175
    Min error: -0.0175
    Name: Initial_Generalized_Speed_Deviation 
    Type: initial_generalized_speed_deviation
    Component list:
    hip_flexion_r
    knee_angle_r
    ankle_angle_r
    Max error: 0.175
    Min error: -0.175
    Name: Final_Toe_Marker_Position_Deviation 
    Type: final_marker_position_deviation
    Component list:
    R_Toe
    Axes: x y
    Max error: 0.001
    Min error: 0.001
    info

    To add the axes to this cost term, you need to save the settings file first and then copy and paste the following line into that cost term:

    <axes>x y</axes>
    Name: Final_Foot_Orientation_Deviation
    Type: final_body_orientation_deviation
    Component list:
    calcn_r
    Axes: z
    Sequence: zxy
    Max error: 0.0175
    Min error: -0.0175
    info

    To add the sequence to this cost term, you need to save the settings file first and then copy and paste the following line into that cost term:

    <sequence>zxy</sequence>
    Name: Final_Toe_Marker_Velocity_Value
    Type: final_marker_velocity_value
    Component list:
    R_Toe
    Max error: 13.1
    Min error: 13.0
    Name: Final_Generalized_Speed_Deviation
    Type: final_generalized_speed_deviation
    Component list:
    ankle_angle_r
    Max error: 0.175
    Min error: -0.175

Running VO

Open runVOTool.m in Matlab and click run

Runtime

This VO run takes 10 iterations to finish.

Analyzing VO results

Plots should be automatically created by the runVOTool.m script.

The VO results should be almost identical to the TO results.

Questions
  • Does your VO run look good? If not, what problems does it have and how can you fix them?
  • What was the reason for adding all of the extra constraint terms?