Hi everyone!
I'm having trouble replicating a motion with the forward dynamics tool. I have a lower limb model that has Millard muscles, a coordinate actuator with an optimal force of 1 on an ankle, and hunt crossley contact spheres on the foot. Even though I input a control sto file with muscle excitations and the coordinate actuator control and a states file with coordinate values and speed as well as the muscle activations and fiber lengths as the initial states, the resulting states do not match what I input. I placed the same results in the analyze tool and the result is correct in that the kinematics and GRFs match the input. Is there any reason behind this different result and any ideas on how to fix what is happening? I assume that something is going on with my coordinate actuator settings, but I'm not completely sure.
Thank you,
Eric Hu
Problems with Forward Dynamics Not Producing Correct Motion
- Thomas Uchida
- Posts: 1808
- Joined: Wed May 16, 2012 11:40 am
Re: Problems with Forward Dynamics Not Producing Correct Motion
In this type of model, small numerical differences (which are generally unavoidable) will eventually propagate during forward integration causing the solution to diverge unless a tracking controller is used. The Analyze Tool does not have this issue as it is not integrating forward in time- it merely loads the provided state at each time step and computes the requested state-dependent variables.
Re: Problems with Forward Dynamics Not Producing Correct Motion
Hi Dr. Uchida,
Thank you for providing this insight. I guess what I am still confused about is that the model, controls and the states all come from the same forward dynamics simulation that resulted from a SCONE optimization process. My thought process was that the forward dynamics tool should replicate the same solution if everything came from the same results, just like how if you were to input CMC results into forward dynamics and the resulting joint kinematics should be pretty similar to the state. Would this thinking be accurate? If so, could it be that the integrator method and settings are different from SCONE and Opensim? Also, I'm not sure if I added my coordinate actuator correctly since I am seeing that the ankle is either plantarflexing or dorsiflexing at the wrong times even though the excitations and the force output are the exact same as what SCONE produces. I currently have the coordinate actuator control in the controls file for the forward tool (max = +14 Nm, min = ~-120 Nm) and the model already has a coordinate actuator (optimal force = 1) added to the model.
Thank you so much.
Eric
Thank you for providing this insight. I guess what I am still confused about is that the model, controls and the states all come from the same forward dynamics simulation that resulted from a SCONE optimization process. My thought process was that the forward dynamics tool should replicate the same solution if everything came from the same results, just like how if you were to input CMC results into forward dynamics and the resulting joint kinematics should be pretty similar to the state. Would this thinking be accurate? If so, could it be that the integrator method and settings are different from SCONE and Opensim? Also, I'm not sure if I added my coordinate actuator correctly since I am seeing that the ankle is either plantarflexing or dorsiflexing at the wrong times even though the excitations and the force output are the exact same as what SCONE produces. I currently have the coordinate actuator control in the controls file for the forward tool (max = +14 Nm, min = ~-120 Nm) and the model already has a coordinate actuator (optimal force = 1) added to the model.
Thank you so much.
Eric
- Thomas Uchida
- Posts: 1808
- Joined: Wed May 16, 2012 11:40 am
Re: Problems with Forward Dynamics Not Producing Correct Motion
In theory, theory works in practice; in practice, it doesn't. In theory, you could learn how to catch and balance a stick on your hand from some initial state, and then "replay" your movements with your eyes closed and a thick glove on (i.e. sans feedback) but this is unlikely to work for long. Yes, muscle excitations from CMC can be used to drive a forward simulation, but the solutions will diverge. The divergence will likely be slow at first, so if everything is set up the same between SCONE and OpenSim, I presume the solutions will be similar at least for a short time. In general, the more things that are different (including model parameters, integrator tolerances, etc.), the quicker I would expect the solutions to diverge.