Some questions about how to use my EMG data from the experiment

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Jianlin Zheng
Posts: 8
Joined: Sun Mar 15, 2020 2:37 am

Some questions about how to use my EMG data from the experiment

Post by Jianlin Zheng » Tue Jul 07, 2020 12:41 am

Hello, everyone!
I'm a new learner in Opensim.
I have gotten the EMG data from my experiment.
I just want to use the Forward Dynamics Tool with the EMG data.However, I don't know how to configure the input files and what steps I should take next.
I feel very sorry that my question is very simple, but I would like to know what the specific steps are.
Now, I only have the EMG data from the experiment, which has been normalized, and I also have the bone lattice muscle model required by the simulation.
What should I do next?
If there is any help from you, I'll very appreciate it. Thank you very much!

User avatar
Michael Asmussen
Posts: 67
Joined: Mon Jul 11, 2016 7:46 am

Re: Some questions about how to use my EMG data from the experiment

Post by Michael Asmussen » Sat Jul 11, 2020 3:10 pm

Hi,

Could you provide some more details about your intended research questions? This might help some of the users guide the next steps.

For example, what is your intended use of the EMG? Do you intend to implement an EMG-driven simulation? If so, what type of movement were the participants performing when you collected EMG?

Another use of EMG might be to validate the predicted activations from a simulation and treat the EMG as the "true" activations of the muscle (which obviously has its own limitations).

Please provide some more details :)

All the best,

Mike

User avatar
Jianlin Zheng
Posts: 8
Joined: Sun Mar 15, 2020 2:37 am

Re: Some questions about how to use my EMG data from the experiment

Post by Jianlin Zheng » Thu Jul 23, 2020 7:40 am

mjasmuss wrote:
Sat Jul 11, 2020 3:10 pm
Hi,

Could you provide some more details about your intended research questions? This might help some of the users guide the next steps.

For example, what is your intended use of the EMG? Do you intend to implement an EMG-driven simulation? If so, what type of movement were the participants performing when you collected EMG?

Another use of EMG might be to validate the predicted activations from a simulation and treat the EMG as the "true" activations of the muscle (which obviously has its own limitations).

Please provide some more details :)

All the best,

Mike
I'm very sorry that my mailbox put your reply in the junk mail. About your reply, I can share the result of my reseaches. I hope that it's helpful.

My problem is that I want to input the EMG data from my experiment so that the model can work under the controll of the EMG data inputted. Nowaday, after some work to investigated some useful detals in this formul, I could determine that the EMG data we input must be normalized.

The EMG data must be a .sto file. I think that the Excitation Editor may be helpfulless, because OpenSim always collapsed when I imported data in this tool.I think the control.xml used in Excitation Editor comes from CMC Tool. The result of CMC includes the control.xml and it's available.

After some researches to search on the forum with many keywords such as "EMG forward dynamics" to find similar questions and answers, the relevant urls are summarized in the rear. These are some ideals and I hope that they're helpful. Also, I downloaded some simulation projects in these forum in order to learn something from their file configure.

1) The EMG data (.sto format) can be directly entered as a control to the controls column in the Forward Dynamic Tool, of course, this is not a motion and will not produce a motion.This idea comes from
viewtopicPhpbb.php?F = t = 9120 & 91 & ... 0 & view =
The mobl_arms_module4_setup_xml file can be directly loaded in the Forward Dynamic Tool. This method is also covered in the other question, the url is as follow
viewtopicPhpbb.php?F = t = 2526 & 91 & ... 0 & view =

2) Use Analysis Tool. I have no further attempt about this idea. The idea comes from
viewtopicPhpbb.php?F = t = 4627 & 91 & ... 0 & view =
Analysis as an entry point is also mentioned in another Q&A
viewtopicPhpbb.php?F = t = 1220 & 91 & ... 1c337377a6

3) CMC can calculate the muscle excitation named control.xml, so the third method is to calculate the CMC_Controls.xml file through EMG.sto data file as the input file of CMC, and then continue the Forward Dynamic. But I don't know how to do next. The open project may be helpful:
https://simtk.org/frs/?Group_id = 386
In the cmcSettingsemG2.xml file (which is a Forward Dynamic Tool-setup.xml), the following information is shown:
123.png
123.png (271.13 KiB) Viewed 556 times
As we known that the desired kinematics.sto/.mot and the tracking task.xml should be input in the CMC Tool, however, in this setup.xml file, I found that there are some another file named desired excitations.sto and emg task.xml. So, it's vital that how to configure the emg task.xml.

User avatar
Michael Asmussen
Posts: 67
Joined: Mon Jul 11, 2016 7:46 am

Re: Some questions about how to use my EMG data from the experiment

Post by Michael Asmussen » Sun Jul 26, 2020 2:11 pm

Hi Jianlin,

My suggestion would be to check out this project: https://simtk.org/projects/ceinms

It might be able to help you get up an running with using EMG with MSK modelling. My other thought would be to try implement something a bit more simple such as an EMG assisted static optimization with the models available on OpenSim. You could also look at this project: https://simtk.org/projects/synergy/

I hope this is helpful

Mike

User avatar
Hongrun Lu
Posts: 1
Joined: Tue May 12, 2020 5:12 am

Re: Some questions about how to use my EMG data from the experiment

Post by Hongrun Lu » Mon Jul 27, 2020 3:25 am

If you use the CMC, you'll find the file named 'control.sto' in result. Opening it in 'txt' type, and the data is simple. For example, just like this.

controls
version=1
nRows=100
nColumns=7
inDegrees=no
endheader
time TRIlong TRIlat TRImed BIClong BICshort BRA
0.03000000 0.02000000 0.02000000 0.02000000 0.02000000 0.02000000 0.02000000

Editing your data in EXCEL, copy and paste it in text. Modify the number of rows and columns. To modify the format, using TAB key fills in some missing tabs. Save as a STO file.
I am also a beginner. This may be a clumsy, but simple and useful method. 8-)

User avatar
Jianlin Zheng
Posts: 8
Joined: Sun Mar 15, 2020 2:37 am

Re: Some questions about how to use my EMG data from the experiment

Post by Jianlin Zheng » Thu Jul 30, 2020 10:18 pm

homerain wrote:
Mon Jul 27, 2020 3:25 am
If you use the CMC, you'll find the file named 'control.sto' in result. Opening it in 'txt' type, and the data is simple. For example, just like this.

controls
version=1
nRows=100
nColumns=7
inDegrees=no
endheader
time TRIlong TRIlat TRImed BIClong BICshort BRA
0.03000000 0.02000000 0.02000000 0.02000000 0.02000000 0.02000000 0.02000000

Editing your data in EXCEL, copy and paste it in text. Modify the number of rows and columns. To modify the format, using TAB key fills in some missing tabs. Save as a STO file.
I am also a beginner. This may be a clumsy, but simple and useful method. 8-)
Wow, thank you thank you!

Best wishes!!!

User avatar
Jianlin Zheng
Posts: 8
Joined: Sun Mar 15, 2020 2:37 am

Re: Some questions about how to use my EMG data from the experiment

Post by Jianlin Zheng » Thu Jul 30, 2020 10:23 pm

mjasmuss wrote:
Sun Jul 26, 2020 2:11 pm
Hi Jianlin,

My suggestion would be to check out this project: https://simtk.org/projects/ceinms

It might be able to help you get up an running with using EMG with MSK modelling. My other thought would be to try implement something a bit more simple such as an EMG assisted static optimization with the models available on OpenSim. You could also look at this project: https://simtk.org/projects/synergy/

I hope this is helpful

Mike
Thanks, Mike!

I think it may be difficult :o but worth learning.

Thank you so much!

Best wishes!

POST REPLY