Page 1 of 1

Inputing the values of the external torque per time step to the TorqueActuator while CMC Simulation in Simulink

Posted: Wed Aug 12, 2020 6:00 am
by raxsel
Hello,

Right now i want to do a CMC (Computed Muscle Control) simulation to get the needed muscle forces under consideration of external torque in simulink. So this external torque (as a function of the input kinematics) will help the osim model to tracking the given reference/input kinematics.
But i'm struggling to input the calculated external torque from my other simulink block to the CMC-block in simulink.
can anyone help me with it or give me a suggestion/an example to how to write the code to input the values of the calculated external torque per time step from my other simulink block to the CMC-block in simulink?

Here is the force set from my osim-model: ('Torque_from_CableActuator')
model with torque.png
model with torque.png (86.99 KiB) Viewed 426 times
Best regards
Wahyu

Re: Inputing the values of the external torque per time step to the TorqueActuator while CMC Simulation in Simulink

Posted: Thu Aug 20, 2020 10:48 am
by ongcf
If you know the input kinematics ahead of time, and thus can calculate the values for your TorqueActuator for the whole simulation ahead of time, you could add a PrescribedController for your TorqueActuator and run CMC. If you are trying to do this between steps of CMC, I'm not aware of a way to do this since CMC is fairly rigid.