Hello all,
I'm trying to simulate the flexion of an arm using the arm26 model and matlab. For that I'm putting an activation in the biclong, bicshort e bra muscles, and setting the activation of the tri muscles to zero.
The motion that I get while doing that is compatible with the activations I'm putting in the muscles, but when I analyze the activations in the states array, the muscles that I put to zero have negative values that keeps getting lower with time, and when analyzing the active force, all muscles present positive values including the muscles that I set to zero. Shouldn't the muscles with zero activation have zero active force?
I want to know what this negative values of activation means and if I can trust the values that I'm getting for the active force of the muscles.
I would appreciate if someone could help me
Setting a activation to zero and getting negative values of activation in the states array
- Renata Rodrigues
- Posts: 3
- Joined: Mon Oct 04, 2021 5:55 am
- Thomas Uchida
- Posts: 1793
- Joined: Wed May 16, 2012 11:40 am
Re: Setting a activation to zero and getting negative values of activation in the states array
The muscles in the arm26 model are of type "Thelen2003Muscle". Depending on what you mean by "simulate", you may want to be setting excitations (e.g., via a controller) rather than activations. The Thelen2003Muscle model includes an activation dynamics model that computes the activation as an output, so by setting activation as if it is an input, you may be using the muscle model in a way in which it was not designed to be used. The documentation (e.g., https://simtk-confluence.stanford.edu:8 ... scle+Model) provides some information about how the muscle model works.
- Renata Rodrigues
- Posts: 3
- Joined: Mon Oct 04, 2021 5:55 am
Re: Setting a activation to zero and getting negative values of activation in the states array
Hello,
I'm actually adding the activations via a controller. I'm using the files 'IntegrateOpenSimPlant.m' and 'OpenSimPlantFunction.m' from the Dynamic Walking Challenge example. In the code of the 'controlsFuncHandle' I'm putting the following commands:
%%%%
osimModel.updActuators().get('BIClong').addInControls(Vector(1, 0.06),modelControls);
osimModel.updActuators().get('BICshort').addInControls(Vector(1, 0.06),modelControls);
osimModel.updActuators().get('BRA').addInControls(Vector(1,0.06),modelControls);
osimModel.updActuators().get('TRIlat').addInControls(Vector(1,0),modelControls);
osimModel.updActuators().get('TRImed').addInControls(Vector(1,0),modelControls);
osimModel.updActuators().get('TRIlong').addInControls(Vector(1,0),modelControls);
%%%%%
Also in the 'controlsFuncHandle' I put commands to get the active force of the muscles, the elbow's angle, and the activation of the states array.
When I plot the elbow's angle I get consistent values, the same doesn't happen when I plot the active force and the activation, as I said before.
I'm actually adding the activations via a controller. I'm using the files 'IntegrateOpenSimPlant.m' and 'OpenSimPlantFunction.m' from the Dynamic Walking Challenge example. In the code of the 'controlsFuncHandle' I'm putting the following commands:
%%%%
osimModel.updActuators().get('BIClong').addInControls(Vector(1, 0.06),modelControls);
osimModel.updActuators().get('BICshort').addInControls(Vector(1, 0.06),modelControls);
osimModel.updActuators().get('BRA').addInControls(Vector(1,0.06),modelControls);
osimModel.updActuators().get('TRIlat').addInControls(Vector(1,0),modelControls);
osimModel.updActuators().get('TRImed').addInControls(Vector(1,0),modelControls);
osimModel.updActuators().get('TRIlong').addInControls(Vector(1,0),modelControls);
%%%%%
Also in the 'controlsFuncHandle' I put commands to get the active force of the muscles, the elbow's angle, and the activation of the states array.
When I plot the elbow's angle I get consistent values, the same doesn't happen when I plot the active force and the activation, as I said before.