change mot file while adding external force

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
saeed aram
Posts: 20
Joined: Mon Oct 09, 2017 2:26 pm

change mot file while adding external force

Post by saeed aram » Sun Jun 02, 2019 2:40 am

Hello
Is it possible to change .MOT file of default model while adding external force? ( I want to change .mot file of gait2392 while adding external force by Matlab and see the results of changing muscle forces)
also, I don't have any experimental data to create new .MOT file

Tags:

User avatar
jimmy d
Posts: 1375
Joined: Thu Oct 04, 2007 11:51 pm

Re: change mot file while adding external force

Post by jimmy d » Mon Jun 03, 2019 9:02 am

Hi-

You can edit the .mot file in a text editor and in Matlab. What editing are you trying to perform? It isn't clear from your description of what you are trying to do and with what files.

-J

User avatar
saeed aram
Posts: 20
Joined: Mon Oct 09, 2017 2:26 pm

Re: change mot file while adding external force

Post by saeed aram » Wed Jun 05, 2019 3:07 am

jimmy wrote:
Mon Jun 03, 2019 9:02 am
Hi-

You can edit the .mot file in a text editor and in Matlab. What editing are you trying to perform? It isn't clear from your description of what you are trying to do and with what files.

-J
Thanks for your response
I know that i can edit .mot file in a text editor and in matlab but my main question is that i want to change angular displacement and GRF of motion manually due to i have not enough facilities to get experimental data. after edit .mot file i want to add external force to model by matlab and then load .mot file on model and plot tendon forces to time to take results.

my question is very important to continue my research so I am waiting to your exact response.
best regards

User avatar
jimmy d
Posts: 1375
Joined: Thu Oct 04, 2007 11:51 pm

Re: change mot file while adding external force

Post by jimmy d » Wed Jun 05, 2019 5:20 pm

If you want to make your own data, you will have to use something like Matlab or Excel to define the motion and force curves. Once you have the curves, you could edit the .mot file in Excel-- copying and pasting the data into the correct columns-- or in Matlab to generate a OpenSim TimesSeriesTable and write the data to file using the STOFileAdapter().

Once you have the force file, I would suggest using the InverseDynamicsTool(), and the ExternalLoads() classes to perform the dynamics analysis you need. There is some example code of the Inverse Dynamics pipeline written in Jython here that can be converted to Matlab very easily. You would just then need to add code that altered the External Loads file.

User avatar
saeed aram
Posts: 20
Joined: Mon Oct 09, 2017 2:26 pm

Re: change mot file while adding external force

Post by saeed aram » Thu Jun 06, 2019 10:37 am

jimmy wrote:
Wed Jun 05, 2019 5:20 pm
If you want to make your own data, you will have to use something like Matlab or Excel to define the motion and force curves. Once you have the curves, you could edit the .mot file in Excel-- copying and pasting the data into the correct columns-- or in Matlab to generate a OpenSim TimesSeriesTable and write the data to file using the STOFileAdapter().

Once you have the force file, I would suggest using the InverseDynamicsTool(), and the ExternalLoads() classes to perform the dynamics analysis you need. There is some example code of the Inverse Dynamics pipeline written in Jython here that can be converted to Matlab very easily. You would just then need to add code that altered the External Loads file.
thank you very much for your exact response
that was really useful

POST REPLY