prescribing muscle activation

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Ilan Eskinazi
Posts: 24
Joined: Fri Mar 19, 2010 5:35 am

prescribing muscle activation

Post by Ilan Eskinazi » Tue Feb 19, 2013 12:18 pm

Hi all,

I've been running a forward dynamic simulation with constant prescribed activations with four muscles. I used Millard2012EquilibriumMuscle and set the flag "ignore_activation_dynamics" to true, and created a PrescribedController with Constant functions which equaled the initial state activation values. After running 50 ms of simulation time, and plotting the activations I see strange results. I notice that all my muscle activations start at their correct prescribed activation value, but then ramp up to a slightly higher incorrect value, and remain constant thereafter at this incorrect value. I expected a constant activation throughout.
I also performed the following tests:
I changed the recfem muscle to a deprecated Schutte muscle->It DOESN'T show the ramp behavior.
I changed the vasint muscle to a Thelen2003Muscle-> It DOES show the ramp behavior
I changed the "ignore_activation_dynamics" flag of the vaslat muscle to FALSE and gave it very small activation time constants-> It shows a very quick ramping behavior. Then I changed the "ignore_activation_dynamics" flag to TRUE and it showed the exact same behavior.
question activation.PNG
Could someone please explain to me what is happening here?

User avatar
Matthew Millard
Posts: 25
Joined: Fri Aug 01, 2008 7:17 am

Re: prescribing muscle activation

Post by Matthew Millard » Tue Feb 19, 2013 4:07 pm

Hello Ilan,

Responses interspersed ...

I've been running a forward dynamic simulation with constant prescribed activations with four muscles. I used Millard2012EquilibriumMuscle and set the flag "ignore_activation_dynamics" to true, and created a PrescribedController with Constant functions which equaled the initial state activation values. After running 50 ms of simulation time, and plotting the activations I see strange results. I notice that all my muscle activations start at their correct prescribed activation value, but then ramp up to a slightly higher incorrect value, and remain constant thereafter at this incorrect value. I expected a constant activation throughout.

I suspect the odd ramp behavior that you're observing is occurring because:
1. The minimum activation is greater than 0
2. The activation dynamics equations have been massaged to respect this lower bound.

These changes have been made to prevent a singularity from occurring. You can see the details of the activation model in Sec. 2.1 of

Millard, M., Uchida, T., Seth, A., and Delp, S.L., (2013). Flexing Computational Muscle: Modeling and Simulation of Musculotendon Dynamics J. Biomech. Eng. 135, 021004, http://dx.doi.org/10.1115/1.4023390

To get rid of the ramp you have a couple of options:

1. Are you using OpenSim from the trunk? If so, you can use a configuration of the Millard2012EquilibriumMuscle model that does not have an activation singularity, and thus has the usual activation equations. Use the function 'setMuscleConfiguration' with the useDamping option set to 'true' to use the damped equilibrium model described in the above paper. This model, which is free of singularities, will be released in the next version of OpenSim.

2. Use Eqn. 2 in the above paper (with da/dt = 0) and solve for the excitation u you need to use to get the activation you would like. Note that the excitation does not equal the activation level when da/dt = 0 with the updated activation model.

3. Lower the minimum activation (which by default is 0.01). This lower bound must still be greater than SimTK::SignificantReal(), or the model will not initialize.
a. use the function 'getFirstOrderActivationDynamicModel()' to get a reference to the activation model.
b. use the function 'setMinimumActivation' to set a smaller minimum activation.

I also performed the following tests:
I changed the recfem muscle to a deprecated Schutte muscle->It DOESN'T show the ramp behavior.


This muscle model does not use the upgraded activation dynamic model.

I changed the vasint muscle to a Thelen2003Muscle-> It DOES show the ramp behavior

The 'Thelen2003Muscle' model has been re-coded from scratch and does use the upgraded activation model. This model does have a singularity at 0 activation, and for the this case I would recommend option 2 suggested above.

I changed the "ignore_activation_dynamics" flag of the vaslat muscle to FALSE and gave it very small activation time constants-> It shows a very quick ramping behavior. Then I changed the "ignore_activation_dynamics" flag to TRUE and it showed the exact same behavior.

The 'ignore_activation_dynamics' flag has not been implemented for the Thelen2003Muscle model, so as you observe, you get exactly the same behavior whether or not the flag is set. The Millard2012EquilibriumMuscle is the only model for which both the 'ignore_tendon_compliance' and 'ignore_activation_dynamics' flags have been implemented.

User avatar
Ilan Eskinazi
Posts: 24
Joined: Fri Mar 19, 2010 5:35 am

Re: prescribing muscle activation

Post by Ilan Eskinazi » Wed Feb 20, 2013 2:30 pm

Matthew,

Thank you for that detailed explanation. Everything is clear now that I've read your paper. As a side note, I think it be prudent to mark the "ignore activation dynamics" and "ignore tendon compliance" flags as unavailable options for the muscle models which lack their implementation.

Regards,

User avatar
Matthew Millard
Posts: 25
Joined: Fri Aug 01, 2008 7:17 am

Re: prescribing muscle activation

Post by Matthew Millard » Wed Feb 20, 2013 3:06 pm

I wholeheartedly agree - it should be clearer which models implement the 'ignore' flags and which do not.

POST REPLY