The topics covered in this section include:
Setup File and XML Tag Definitions
The settings file is an XML file whose tags specify properties to be used by OpenSim for the static optimization analysis. The XML tags used are defined in the following sections.
Example: XML file for a static optimization setup file
Specifying an Execution Name
The properties for the analyze tool, which is responsible for performing the inverse dynamics analysis, are enclosed inside the opening and closing tags <AnalyzeTool> and </AnalyzeTool>. The name attribute name="subject01_walk1" specifies the execution name. The name of the results file generated will be prefixed with this name.
Specifying the Model
The <model_file> tag specifies the OpenSim .osim file used to construct a model. This file typically defines the OpenSim musculoskeletal model scaled to the dimensions of the subject by the Scale Tool.
Specifying the Forces
The <replace_force_set> allows the modification of the actuators defined in the model file. If the value of <replace_force_set> is true, then the actuators specified in any file listed under the property <force_set_files> will replace the corresponding model's actuators. If the value of <replace_force_set> is false, then the actuators specified in the files listed under <force_set_files> will be added to the model's existing actuator set.
Specifying the Results Directory and Precision
The <results_directory> tag specifies the directory where results should be written. The <output_precision> tag specifies how many decimal places should be used when writing results. A value of 20 is sufficient to avoid round-off error.
Specifying Initial and Final Times
The <initial_time> and <final_time> tags specify the time interval over which the inverse dynamics analysis is to be performed. The initial and final times may be adjusted to the nearest frames of data available.
Specifying a Static Optimization Analysis
The properties for the analysis set used by the analyze tool are enclosed inside the opening and closing tags <AnalysisSet> and </AnalysisSet>. The properties for the objects contained in the analysis set are enclosed inside the opening and closing tags <objects> and </objects >.
The properties for the static optimization analysis are enclosed inside the opening and closing tags <StaticOptimization> and </StaticOptimization>. The name attribute name="StaticOptimization" specifies the analysis name. The name of the results file generated will include this name. The <on> tag specifies whether or not the static optimization analysis should be performed. The <step_interval> tag specifies how often to record results during the static optimization analysis. A value of 1 means results are recorded every 1 frame of motion data. The <use_model_force_set> tag specifies whether or not the model's actuator set will be used in the static optimization analysis. If not, generalized forces (e.g., net joint forces and torques) will be computed for all unconstrained degrees of freedom.
Specifying Coordinates and Filtering
The <coordinates_file> tag specifies the time histories of kinematics (e.g., generalized coordinates) that describe the movement of the model. For example, this file may be generated by the inverse kinematics tool. The <lowpass_cutoff_frequency> tag specifies the low-pass cutoff frequency for filtering the kinematics. If the kinematics have already been filtered, specify a negative cutoff frequency to prevent filtering.
Specifying External Loads
The <external_loads_file> tag specifies the XML file containing the external loads applied to the model during a static optimization analysis. See How Inverse Dynamics Works for additional details for applying any number of external loads as point forces and/or body torques.
As of OpenSim 3.1, you can additionally specify the properties of the optimizer, including the <optimizer_convergence_criterion> and <optimizer_max_iterations>/