Page 1 of 1

CMC muscle excitation controls

Posted: Tue Nov 28, 2017 6:47 am
by ashmheers
Hi all,

I'm trying to constrain the times at which my muscles are activated, because CMC is activating them for too much of the stroke cycle. I used the excitation editor to make an xml file, and then I loaded that under the "actuator constraints" part of the CMC GUI, then ran CMC. My results don't change at all (i.e., muscles are still activated when they shouldn't be, outside of the time regions specified by my control file). I know I'm doing something wrong but I can't figure out what... My xml file looks like this (there are several wingbeats, and the muscles I'm trying to constrain are called "Pectoralis" and "Supracoracoideus" in my osim file):

<?xml version="1.0" encoding="UTF-8" ?>
<OpenSimDocument Version="30000">
<ControlSet name="chukar_fixing_Default">
<objects>
<ControlLinear name="Pectoralis_r.excitation">
<is_model_control>true</is_model_control>
<extrapolate>true</extrapolate>
<default_min>0.02</default_min>
<default_max>1</default_max>
<filter_on>false</filter_on>
<use_steps>false</use_steps>
<min_nodes>
<ControlLinearNode>
<t>0.052</t>
<value>0</value>
</ControlLinearNode>
<ControlLinearNode>
<t>0.091</t>
<value>0</value>
</ControlLinearNode>
<ControlLinearNode>
<t>0.128</t>
<value>0</value>
</ControlLinearNode>
<ControlLinearNode>
<t>0.167</t>
<value>0</value>
</ControlLinearNode>
<ControlLinearNode>
<t>0.204</t>
<value>0</value>
</ControlLinearNode>
<ControlLinearNode>
<t>0.243</t>
<value>0</value>
</ControlLinearNode>
<ControlLinearNode>
<t>0.28</t>
<value>0</value>
</ControlLinearNode>
<ControlLinearNode>
<t>0.319</t>
<value>0</value>
</ControlLinearNode>
</min_nodes>
<max_nodes>
<ControlLinearNode>
<t>0.052</t>
<value>0</value>
</ControlLinearNode>
<ControlLinearNode>
<t>0.091</t>
<value>1</value>
</ControlLinearNode>
<ControlLinearNode>
<t>0.128</t>
<value>0</value>
</ControlLinearNode>
<ControlLinearNode>
<t>0.167</t>
<value>1</value>
</ControlLinearNode>
<ControlLinearNode>
<t>0.204</t>
<value>0</value>
</ControlLinearNode>
<ControlLinearNode>
<t>0.243</t>
<value>1</value>
</ControlLinearNode>
<ControlLinearNode>
<t>0.28</t>
<value>0</value>
</ControlLinearNode>
<ControlLinearNode>
<t>0.319</t>
<value>1</value>
</ControlLinearNode>
</max_nodes>
<kp>100</kp>
<kv>20</kv>
</ControlLinear>

+ one other muscle (Supracoracoideus). Thanks in advance for suggestions!

Re: CMC muscle excitation controls

Posted: Sat Dec 02, 2017 4:09 pm
by tkuchida
I was unable to find an error in the code you posted. A couple things you might try: (1) Look at an example that uses control constraints (e.g., https://simtk.org/projects/nmbl_running/), and (2) post your files so someone can reproduce the problem and help you track down the issue.

Re: CMC muscle excitation controls

Posted: Mon Aug 08, 2022 8:14 pm
by marcohan98
Hi ashley:
I also met this problem recently. Did you find any solutions? It seems that my constraints are not valid also. And also the excitation editor will crash during the process of adding max_nodes.

Thank you so much for your reply.
Regard,
marco