Prescribed Controller with Static Optimization
Posted: Wed Feb 03, 2021 4:55 am
Dear all,
I am trying to prescribe an experimentally measured knee flexion torque to a model while running a Static Optimization simulation through the Matlab API.
According to a previous post (viewtopicPhpbb.php?f=91&t=12742&p=36438&start=0&view=), the best way to do so in OpenSim is with a Cooordinate Actuator and a Prescribed Controller. However, if I follow this process (see attached code), when I run Static Optimization, it seems that the function defined through the prescribed controller is not taken into account (i.e., the generated torque is constant, and equal to the optimal force). Does the prescribed controller work only in Forward Dynamic simulations?
I found a possible work-around in this other post (viewtopicPhpbb.php?f=91&t=4870&p=28472&start=0&view=), where external torques were imposed as a PrescribedForce to mimick the effect of exoskeletons. This approach seems to work, as the prescribed torque profile is correct (i.e., same as on the experimental data). In my specific case, I applied a PrescribedForce to the tibial body (i.e. on the tibial reference system (?), which is close to but not coincident with the knee joint reference frame) aiming to apply a knee flexion moment. Does this make sense?
Thanks in advance,
Francesca
I am trying to prescribe an experimentally measured knee flexion torque to a model while running a Static Optimization simulation through the Matlab API.
According to a previous post (viewtopicPhpbb.php?f=91&t=12742&p=36438&start=0&view=), the best way to do so in OpenSim is with a Cooordinate Actuator and a Prescribed Controller. However, if I follow this process (see attached code), when I run Static Optimization, it seems that the function defined through the prescribed controller is not taken into account (i.e., the generated torque is constant, and equal to the optimal force). Does the prescribed controller work only in Forward Dynamic simulations?
I found a possible work-around in this other post (viewtopicPhpbb.php?f=91&t=4870&p=28472&start=0&view=), where external torques were imposed as a PrescribedForce to mimick the effect of exoskeletons. This approach seems to work, as the prescribed torque profile is correct (i.e., same as on the experimental data). In my specific case, I applied a PrescribedForce to the tibial body (i.e. on the tibial reference system (?), which is close to but not coincident with the knee joint reference frame) aiming to apply a knee flexion moment. Does this make sense?
Thanks in advance,
Francesca