OpenSim is a framework for modeling and simulation of musculoskeletal systems. The muscle moment arm is an important variable for evaluating the effectiveness of a muscle to actuate a particular joint. Calculating the muscle moment arm requires knowledge of the muscle path and wrapping surfaces. OpenSim is restricted to evaluate the muscle moment arm at an arbitrary configuration, lacking the information for calculating higher order derivatives. This project evaluates the moment arm at different configurations and approximates its terms using multivariate polynomial fitting, thus a symbolic expression is derived. Examples are provided for the gait2392 model (23 DoFs and 92 muscles). Results are calculated and stored in the *.dat* files which can be loaded using python's pickle utility. The *R.dat* file is the symbolic expression (sympy Matrix) of the muscle moment arm matrix. Visual inspection of the polynomial fitting is provided.
https://github.com/mitkof6/symbolic_moment_arm