Dear everyone,
I am working on the Arm26 model to which I added a coordinate actuator at the elbow joint. My goal is to define a trajectory to be followed by the elbow joint and to compute the torque to be applied by the coordinate actuator to follow that trajectory, considering the muscles inactive.
To obtain this, I compute the inverse dynamics using the InverseDynamicsTool and I compute the passive torques applied by the muscles at the elbow joint by simply multipliying the passiveFiberForceAlongTendon and the MomentArm of the muscle with respect to the elbow joint. Finally, I compute the total torque to apply simply by subtracting the passive torques to the torque computed by inverse dynamics.
Then, in a Forward Dynamics simulation I apply the total torque at the coordinate actuator and check whether the trajectory is tracked or not.
Here you can see my results:
Do you have any idea of why the trajectories do not match? I tried to apply a PD controller to see if the torque profile significantly changes and here is the result:
As you can see, the torque computed matches the torque needed to better track the trajectory in some points, but it does not in others. Do you know what forces I may be missing?
Thank you all in advance,
Elena
inverse dynamics and passive muscle contribution
- Elena Bardi
- Posts: 11
- Joined: Sun May 17, 2020 6:49 am
- Jacob J. Banks
- Posts: 97
- Joined: Tue Jul 15, 2014 5:17 am
Re: inverse dynamics and passive muscle contribution
Perhaps your signs are flipped... have you tried adding the passive torques instead of subtracting them?
Otherwise, are you also applying a similar method to account for shoulder joint flexion (assuming you have that DoF)? If not, biarticular muscles may be impacting moment arms and passive lengths.
Otherwise, are you also applying a similar method to account for shoulder joint flexion (assuming you have that DoF)? If not, biarticular muscles may be impacting moment arms and passive lengths.
- Elena Bardi
- Posts: 11
- Joined: Sun May 17, 2020 6:49 am
Re: inverse dynamics and passive muscle contribution
Hi Jacob,
thanks for your reply!
I double-checked the sign and I tried to add the passive contribution but the resultant kinematics is definetely not the desired one.
Regarding the shoulder I have blocked the coordinate, so I guess it shouldn't interfere with my calculations, am I correct?
Thank you.
Elena
thanks for your reply!
I double-checked the sign and I tried to add the passive contribution but the resultant kinematics is definetely not the desired one.
Regarding the shoulder I have blocked the coordinate, so I guess it shouldn't interfere with my calculations, am I correct?
Thank you.
Elena
- Jacob J. Banks
- Posts: 97
- Joined: Tue Jul 15, 2014 5:17 am
Re: inverse dynamics and passive muscle contribution
I assume you mean 'weld' or 'locked' the shoulder coordinate instead of 'blocked'? If so, a other things to consider then (perhaps in this order):
- Inverse Dynamics is just a frame-by-frame (i.e. incremental times) calculation of the joint demands. Even in a very simple single pendulum model (like this one) with very granular time steps you can't necessarily use the moments from ID to replicate movements. I'm actually a bit surprised your movements are as smooth as they are... As a test, try try removing all your muscles and assigning the ID moments. This will show if it is a muscle modeling or a forward sim assumption problem (I'm guessing the latter).
- Is your minimal muscle activation >0? This may cause your muscles to be slightly active during your forward sim even if you do not want them to be.
- Inverse Dynamics does not consider antagonistic muscle contributions. You are including passive contributions from all the muscles, flexors and extensors? Make for sure the sign on your moment arms considers this relationship (they should) and you are not simply summing all moment contributions equally.
- Inverse Dynamics is just a frame-by-frame (i.e. incremental times) calculation of the joint demands. Even in a very simple single pendulum model (like this one) with very granular time steps you can't necessarily use the moments from ID to replicate movements. I'm actually a bit surprised your movements are as smooth as they are... As a test, try try removing all your muscles and assigning the ID moments. This will show if it is a muscle modeling or a forward sim assumption problem (I'm guessing the latter).
- Is your minimal muscle activation >0? This may cause your muscles to be slightly active during your forward sim even if you do not want them to be.
- Inverse Dynamics does not consider antagonistic muscle contributions. You are including passive contributions from all the muscles, flexors and extensors? Make for sure the sign on your moment arms considers this relationship (they should) and you are not simply summing all moment contributions equally.
- Elena Bardi
- Posts: 11
- Joined: Sun May 17, 2020 6:49 am
Re: inverse dynamics and passive muscle contribution
Hi Jacob,
Thank you for your kind and very useful answer!
It appears that there is indeed some residual activation of the muscles. I computed the muscles' active contribution while setting their activation to 0 and I realized it is not null as I was expecting it to be. If I consider this contribution as well, then the tracking of the trajectory is quite good.
Thank you again,
Elena
Thank you for your kind and very useful answer!
It appears that there is indeed some residual activation of the muscles. I computed the muscles' active contribution while setting their activation to 0 and I realized it is not null as I was expecting it to be. If I consider this contribution as well, then the tracking of the trajectory is quite good.
Thank you again,
Elena
- Jacob J. Banks
- Posts: 97
- Joined: Tue Jul 15, 2014 5:17 am
Re: inverse dynamics and passive muscle contribution
Good deal. Glad to that I could help.
FYI: If your using Thelen muscles, consider switching to Millards. In OpenSim >4 the Thelen muscle's lowest activation is .01, while Millard's can go to 0. You'll want to recalculate/find your PEC forces, as the curves are slightly different. You can switch muscles by simply find/replace in a text editor and then opening, saving, and closing the model in OpenSim (there may even be a 'replace' function, but I have never bothered looking into it because the find/replace method is so easy).
FYI: If your using Thelen muscles, consider switching to Millards. In OpenSim >4 the Thelen muscle's lowest activation is .01, while Millard's can go to 0. You'll want to recalculate/find your PEC forces, as the curves are slightly different. You can switch muscles by simply find/replace in a text editor and then opening, saving, and closing the model in OpenSim (there may even be a 'replace' function, but I have never bothered looking into it because the find/replace method is so easy).
- Elena Bardi
- Posts: 11
- Joined: Sun May 17, 2020 6:49 am
Re: inverse dynamics and passive muscle contribution
Thanks for the suggestion, I will try to do that!