Muscle Analysis not computing moment arms

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Dominic Farris
Posts: 2
Joined: Tue Mar 13, 2012 11:33 am

Muscle Analysis not computing moment arms

Post by Dominic Farris » Wed May 14, 2014 9:56 pm

Hi!

I've been having some difficulty computing moment arms using a Muscle Analysis in OpenSim 3.2 (I have used a similar approach with previous versions successfully). The analysis tool runs (either in the GUI or through Matlab scripting) and outputs all the expected files but the files that should contain moment arm data only have a header and no data in them. I've posted the content of the XML setup file for the analysis tool below.Prior to the analysis tool I have run the IK tool. Can anyone point me to what's missing?

thanks,

Dominic

<OpenSimDocument Version="30000">
<AnalyzeTool name="AP_00KG_01_S1_tracked">
<!--Name of the .osim file used to construct a model.-->
<model_file>\\storage.health.uq.edu.au\shares\HMS-Research\Biomechanics\Dom\DOM_MICHAEL\tracked\AP_130114\gait2392_LowerBodyUQ_MinMuscles_SCALED.osim</model_file>
<!--Replace the model's force set with sets specified in <force_set_files>? If false, the force set is appended to.-->
<replace_force_set>false</replace_force_set>
<!--List of xml files used to construct an force set for the model.-->
<force_set_files />
<!--Directory used for writing results.-->
<results_directory>\\storage.health.uq.edu.au\shares\HMS-Research\Biomechanics\Dom\DOM_MICHAEL\tracked\AP_130114\AP_00KG_01_S1_tracked</results_directory>
<!--Output precision. It is 8 by default.-->
<output_precision>8</output_precision>
<!--Initial time for the simulation.-->
<initial_time>0</initial_time>
<!--Final time for the simulation.-->
<final_time>6.54</final_time>
<!--Flag indicating whether or not to compute equilibrium values for states other than the coordinates or speeds. For example, equilibrium muscle fiber lengths or muscle forces.-->
<solve_for_equilibrium_for_auxiliary_states>true</solve_for_equilibrium_for_auxiliary_states>
<!--Maximum number of integrator steps.-->
<maximum_number_of_integrator_steps>20000</maximum_number_of_integrator_steps>
<!--Maximum integration step size.-->
<maximum_integrator_step_size>1</maximum_integrator_step_size>
<!--Minimum integration step size.-->
<minimum_integrator_step_size>1e-008</minimum_integrator_step_size>
<!--Integrator error tolerance. When the error is greater, the integrator step size is decreased.-->
<integrator_error_tolerance>1e-005</integrator_error_tolerance>
<!--Set of analyses to be run during the investigation.-->
<AnalysisSet name="Analyses">
<objects>
<Kinematics name="Kinematics">
<!--Names of generalized coordinates whose kinematics are to be recorded.-->
<coordinates>all</coordinates>
<!--Flag (true or false) specifying whether whether on. True by default.-->
<on>true</on>
<!--Start time.-->
<start_time>-Inf</start_time>
<!--End time.-->
<end_time>Inf</end_time>
<!--Specifies how often to store results during a simulation. More specifically, the interval (a positive integer) specifies how many successful integration steps should be taken before results are recorded again.-->
<step_interval>10</step_interval>
<!--Flag (true or false) indicating whether the results are in degrees or not.-->
<in_degrees>true</in_degrees>
</Kinematics>
<MuscleAnalysis name="MuscleAnalysis">
<!--Flag (true or false) specifying whether whether on. True by default.-->
<on>true</on>
<!--Start time.-->
<start_time>-Inf</start_time>
<!--End time.-->
<end_time>Inf</end_time>
<!--Specifies how often to store results during a simulation. More specifically, the interval (a positive integer) specifies how many successful integration steps should be taken before results are recorded again.-->
<step_interval>1</step_interval>
<!--Flag (true or false) indicating whether the results are in degrees or not.-->
<in_degrees>true</in_degrees>
<!--List of muscles for which to perform the analysis. Use 'all' to perform the analysis for all muscles.-->
<muscle_list> all</muscle_list>
<!--List of generalized coordinates for which to compute moment arms. Use 'all' to compute for all coordinates.-->
<moment_arm_coordinate_list> ankle_angle_r</moment_arm_coordinate_list>
<!--Flag indicating whether moments should be computed.-->
<compute_moments>false</compute_moments>
</MuscleAnalysis>
</objects>
<groups />
</AnalysisSet>
<!--Controller objects in the model.-->
<ControllerSet name="Controllers">
<objects />
<groups />
</ControllerSet>
<!--XML file (.xml) containing the forces applied to the model as ExternalLoads.-->
<external_loads_file />
<!--Storage file (.sto) containing the time history of states for the model. This file often contains multiple rows of data, each row being a time-stamped array of states. The first column contains the time. The rest of the columns contain the states in the order appropriate for the model. In a storage file, unlike a motion file (.mot), non-uniform time spacing is allowed. If the user-specified initial time for a simulation does not correspond exactly to one of the time stamps in this file, inerpolation is NOT used because it is sometimes necessary to an exact set of states for analyses. Instead, the closest earlier set of states is used.-->
<states_file />
<!--Motion file (.mot) or storage file (.sto) containing the time history of the generalized coordinates for the model. These can be specified in place of the states file.-->
<coordinates_file>\\storage.health.uq.edu.au\shares\HMS-Research\Biomechanics\Dom\DOM_MICHAEL\tracked\AP_130114\AP_00KG_01_S1_tracked\IKresults.mot</coordinates_file>
<!--Storage file (.sto) containing the time history of the generalized speeds for the model. If coordinates_file is used in place of states_file, these can be optionally set as well to give the speeds. If not specified, speeds will be computed from coordinates by differentiation.-->
<speeds_file />
<!--Low-pass cut-off frequency for filtering the coordinates_file data (currently does not apply to states_file or speeds_file). A negative value results in no filtering. The default value is -1.0, so no filtering.-->
<lowpass_cutoff_frequency_for_coordinates>-1</lowpass_cutoff_frequency_for_coordinates>
</AnalyzeTool>
</OpenSimDocument>

User avatar
Ayman Habib
Posts: 2248
Joined: Fri Apr 01, 2005 12:24 pm

Re: Muscle Analysis not computing moment arms

Post by Ayman Habib » Thu May 15, 2014 1:12 pm

Hi Dominic,

If I want to guess I'd say the flag <compute_moments> should be set to "true" inside the MuscleAnalysis part of the XML file. Please try that and let us know how it goes.

Best regards,
-Ayman

POST REPLY