Control constraints for CMC
Posted: Mon Oct 02, 2023 11:46 pm
Hi OpenSim team,
For my master's thesis, I'm working with the ARMS lab hand-wrist model. The end goal of my project is to investigate the changes in wrist kinematics after implantation with a new wrist implant. Therefore, I adjusted the ARMS lab model with this new implant. Next, I want to see if the same muscle activations/excitations still result in the same motion. As I don't have any muscle activation data I want to use the kinematic data provided with the ARMS lab model. My setup is thus to perform a CMC first on the ARMS lab model to determine the muscle activations. Next, I want to perform a Forward dynamics simulation on both the ARMS lab model and my model to see if the motion is the same.
Currently, I have the CMC working pretty well. However, the resulting muscle activation of one muscle (OPP) is at certain times seemingly random: '
I tried to make a control constraint to ensure the muscle wouldn't be activated before t=4.3 and after t=7.2.
After some trial and error, the best I could come up with resulted in the following: .
I used the following code in the control constraint file:
If someone could help me with this, it would be much appreciated!
Kind regards,
Ilse
For my master's thesis, I'm working with the ARMS lab hand-wrist model. The end goal of my project is to investigate the changes in wrist kinematics after implantation with a new wrist implant. Therefore, I adjusted the ARMS lab model with this new implant. Next, I want to see if the same muscle activations/excitations still result in the same motion. As I don't have any muscle activation data I want to use the kinematic data provided with the ARMS lab model. My setup is thus to perform a CMC first on the ARMS lab model to determine the muscle activations. Next, I want to perform a Forward dynamics simulation on both the ARMS lab model and my model to see if the motion is the same.
Currently, I have the CMC working pretty well. However, the resulting muscle activation of one muscle (OPP) is at certain times seemingly random: '
I tried to make a control constraint to ensure the muscle wouldn't be activated before t=4.3 and after t=7.2.
After some trial and error, the best I could come up with resulted in the following: .
I used the following code in the control constraint file:
Code: Select all
<ControlLinear name="OPP.excitation">
<is_model_control> true </is_model_control>
<min_nodes>
`<ControlLinearNode>
<t>1</t>
<value>0.02</value>
</ControlLinearNode>
<ControlLinearNode>
<t>4.2</t>
<value>0.02</value>
</ControlLinearNode>
<ControlLinearNode>
<t>4.35</t>
<value>0.02</value>
</ControlLinearNode>
<ControlLinearNode>
<t>4.5</t>
<value>0.02</value>
</ControlLinearNode>
<ControlLinearNode>
<t>4.8</t>
<value>0.02</value>
</ControlLinearNode>
<ControlLinearNode>
<t>4.9</t>
<value>0.02</value>
</ControlLinearNode>
<ControlLinearNode>
<t>5</t>
<value>0.02</value>
</ControlLinearNode>
<ControlLinearNode>
<t>5.1</t>
<value>0.02</value>
</ControlLinearNode>
<ControlLinearNode>
<t>5.1</t>
<value>0.02</value>
</ControlLinearNode>
<ControlLinearNode>
<t>5.3</t>
<value>0.02</value>
</ControlLinearNode>
<ControlLinearNode>
<t>5.4</t>
<value>0.02</value>
</ControlLinearNode>
<ControlLinearNode>
<t>5.5</t>
<value>0.02</value>
</ControlLinearNode>
<ControlLinearNode>
<t>6</t>
<value>0.02</value>
</ControlLinearNode>
<ControlLinearNode>
<t>6.2</t>
<value>0.02</value>
</ControlLinearNode>
<ControlLinearNode>
<t>6.4</t>
<value>0.02</value>
</ControlLinearNode>
<ControlLinearNode>
<t>6.5</t>
<value>0.02</value>
</ControlLinearNode>
<ControlLinearNode>
<t>6.6</t>
<value>0.02</value>
</ControlLinearNode>
<ControlLinearNode>
<t>6.7</t>
<value>0.02</value>
</ControlLinearNode>
<ControlLinearNode>
<t>6.8</t>
<value>0.02</value>
</ControlLinearNode>
<ControlLinearNode>
<t>6.9</t>
<value>0.02</value>
</ControlLinearNode>
<ControlLinearNode>
<t>7</t>
<value>0.02</value>
</ControlLinearNode>
<ControlLinearNode>
<t>7.1</t>
<value>0.02</value>
</ControlLinearNode>
<ControlLinearNode>
<t>8.999</t>
<value>0.02</value>
</ControlLinearNode>
</min_nodes>
<max_nodes>
<ControlLinearNode>
<t>1</t>
<value>0.02</value>
</ControlLinearNode>
<ControlLinearNode>
<t>4.2</t>
<value>0.02</value>
</ControlLinearNode>
<ControlLinearNode>
<t>4.35</t>
<value>0.1</value>
</ControlLinearNode>
<ControlLinearNode>
<t>4.5</t>
<value>0.2</value>
</ControlLinearNode>
<ControlLinearNode>
<t>4.6</t>
<value>0.25</value>
</ControlLinearNode>
<ControlLinearNode>
<t>4.7</t>
<value>0.31</value>
</ControlLinearNode>
<ControlLinearNode>
<t>4.8</t>
<value>0.42</value>
</ControlLinearNode>
<ControlLinearNode>
<t>4.9</t>
<value>0.53</value>
</ControlLinearNode>
<ControlLinearNode>
<t>5</t>
<value>0.64</value>
</ControlLinearNode>
<ControlLinearNode>
<t>5.1</t>
<value>0.72</value>
</ControlLinearNode>
<ControlLinearNode>
<t>5.2</t>
<value>0.75</value>
</ControlLinearNode>
<ControlLinearNode>
<t>5.3</t>
<value>0.8</value>
</ControlLinearNode>
<ControlLinearNode>
<t>5.4</t>
<value>0.82</value>
</ControlLinearNode>
<ControlLinearNode>
<t>5.5</t>
<value>0.84</value>
</ControlLinearNode>
<ControlLinearNode>
<t>6</t>
<value>0.86</value>
</ControlLinearNode>
<ControlLinearNode>
<t>6.2</t>
<value>0.84</value>
</ControlLinearNode>
<ControlLinearNode>
<t>6.4</t>
<value>0.76</value>
</ControlLinearNode>
<ControlLinearNode>
<t>6.5</t>
<value>0.7</value>
</ControlLinearNode>
<ControlLinearNode>
<t>6.6</t>
<value>0.6</value>
</ControlLinearNode>
<ControlLinearNode>
<t>6.7</t>
<value>0.45</value>
</ControlLinearNode>
<ControlLinearNode>
<t>6.8</t>
<value>0.27</value>
</ControlLinearNode>
<ControlLinearNode>
<t>6.9</t>
<value>0.18</value>
</ControlLinearNode>
<ControlLinearNode>
<t>7</t>
<value>0.08</value>
</ControlLinearNode>
<ControlLinearNode>
<t>7.1</t>
<value>0.06</value>
</ControlLinearNode>
<ControlLinearNode>
<t>8.999</t>
<value>0.02</value>
</ControlLinearNode>
</max_nodes>
<kp> 100.00000000 </kp>
<kv> 20.00000000 </kv>
</ControlLinear>
Kind regards,
Ilse