Home Questions How to use a vector of forces in the load table

How to use a vector of forces in the load table

DWQA QuestionsCategory: QuestionsHow to use a vector of forces in the load table
Hi, I am trying to implement force/load in the form of a sinusoidal wave for each trial protocol. I understand that we can change the load value in the load table of the parameter definition block. But, it only accepts one float variable per trial protocol. Is it possible to enter a vector of load value so that the load value keeps changing within the same trial protocol and will imitate a sinusoidal form in a single trial protocol. That is, one sinusoidal form of load values per trial protocol. Please let me know. Thank you. Regards, Yokhesh
1 Answers
Koloman Varady Staff answered 5 years ago

Hi Yokhesh,

The load table works with the different load blocks to convert the parameters in the load table to force/torques (it's generally forces for EP robots, torques for EXO robots).
The load blocks are ultimately connected to the Apply EP/EXO Loads block, which is the block that will convert those inputs to the bits that are sent to the drives that control the motors.

If you look at the Apply Load blocks, you will see that they take very specific and easy to understand format.
For the EP, the Apply Load block takes in a 1x4 vector that has the format [Fx_right_robot Fy_right_robot Fx_left_robot Fy_left_robot]. The EXO Apply Load block has the format [Shoulder_torque_right_arm Elbow_torque_right_arm Shoulder_torque_left_arm Elbow_torque_left_arm].

So you can bypass the load blocks and build your own loads by inputting the force vector directly into the Apply Load block.
So say you wanted to have a force in the x-direction on the right arm of an EP that is a sin wave with a different frequency for each trial, one thing you could do is have the load row set the frequency.

Then pass that load row data into a MATLAB function which calculates a vector [sin(theta) 0 0 0] that you can connect to the Apply Load blocks.

Let me know if you have any questions.