Page 1 of 1

compute moment arm in MATLAB?

Posted: Sat Jun 18, 2011 5:26 pm
by ceo012
Hello All

I am modeling an index finger and thumb in OpenSim; add muscles into the index finger, downloaded from Upper Extremity Model https://simtk.org/home/up-ext-model.

I know how to calculate moment arm, r = derivative muscle tendon length / derivative joint angle where, muscle tendon length = tendon length + fiber length * cos (pennation angle). In addition, I have realized the only way to change this moment arm is to change muscle points or to combine them by fixed, via and moving points (wrapping surface as well).

To decide moment arms to be fitted to literatures, I just keep repeating same works: change muscle points, plot them, and compare them with literatures over and over again. That’s so ~ boring.

Therefore, I just want to compute moment arms in Matlab and find out best points via optimization methods. Please, let me know if any one tired this work or knew how to do. Your comment would be greatly appreciated. Thanks in advance.

RE: compute moment arm in MATLAB?

Posted: Sat Jun 18, 2011 7:16 pm
by hossein
Hi Jong ,

I think what you need to do is as follows:
1- Read your OSIM file using "Load_OSIM.m" in matlab . You can find this .m file in simtk website.

https://simtk.org/project/xml/downloads ... kage_id851


2- Do any changes you like to your .OSIM file in Matlab

3- Write your OSIM with new changes. This could be a new OSIM file or just overwrite the last one.

3-Do "MuscleAnalysis" in Matlab to get moment arms and compare the results with the Literature.

You may be able to have loops or optimization through Matlab easily.

Hope this would help.
Hossein

Re: compute moment arm in MATLAB?

Posted: Tue Sep 20, 2016 5:33 am
by m.davoodi
Hi Hossein

In opensim 3.3, muscle moment arm ploted as directly result , is this result basically formulation r = derivative muscle tendon length / derivative joint angle where, muscle tendon length = tendon length + fiber length * cos (pennation angle) that Mr.Lee say?
and if i want to export my results (muscle moment arms) to matlab, what i doing? because opensim plot moment arm and i have not another format (txt or csv ,..) as result!

Best,
Mehrdad

Re: compute moment arm in MATLAB?

Posted: Tue Sep 20, 2016 9:41 am
by jimmy
That is not how moment arms are calculated. Refer to this paper;
http://proceedings.asmedigitalcollectio ... id=1830919

You can use the computeMomentArm function in Matlab;
https://simtk.org/api_docs/opensim/api_ ... 6fb26e24f3
https://github.com/jimmyDunne/opensim-m ... Musc.m#L26