Home Examples Loads on the Kinarm Robot
Loads

Loads on the Kinarm Robot

This section will explain the Simulink blocks necessary to apply loads to a Kinarm robot. In this example, the sum of two different classes of loads are to be applied to a Kinarm Exoskeleton robot: constant loads and velocity dependent (e.g., viscous or curl field) loads.  There is a Sample Task available for download.

The Simulink blocks used to create and apply loads in this example are available in the KINARM Exo loads library of the Task Development Kit. For Kinarm End-Point robots, analogous blocks are available in the KINARM EP loads library.

10.5.1   Simulink Code for Loads on the Kinarm Robot Example

Implementing a load on the Kinarm robot requires at least 2 blocks: a load block that creates a torque output (e.g. Constant_Loads_(joints)) and either the KINARM_Exo_Apply_Loads block or the KINARM_EP_Apply_Loads block, which apply the desired torques to the Kinarm robot. Multiple simultaneous loads can be applied as shown in

the example below, by copying additional load blocks from the Task Development Kit library and summing the output torques prior to inputting the torque to the KINARM_Exo|EP_Apply_Loads block. The actual parameters to be used for each load are gathered from the Load Table, as referenced by the column indices chosen by the block (in this example, Constant_Loads_(joints)will reference columns [1 2]) and also by the row input to the block from the Stateflow chart (the Stateflow chart has a new output: load_row). For more details on load and column definitions, click Help for the “load” block of interest within Simulink.

Figure 10.10: Simulink Code for Loads on Kinarm Robot Example (Note figure may not match sample task.)

Attention: There can be only one copy of each of the KINARM_Exo_Apply_Loads block or the KINARM_EP_Apply_Loads block in any Task Program.

10.5.2   Stateflow Chart for Loads on the Kinarm Robot Example

The Stateflow Chart for this example is not shown here. The main feature is a new Stateflow output load_row, which must be set as desired from within Stateflow (e.g. load_row = Trial_Protocol[LOAD_COL], which assumes that the load choice is defined in the Trial_Protocol).

10.5.3   Parameter Table Defn Block for Loads on the Kinarm Robot Example

Although the Simulink code completely defines how coefficients in the Load Table will get passed to the various Load blocks in the Task Program, in order for the Load Table to appear properly for editing in Dexterit-E’s GUI, the Parameter Table Defn block needs to be edited. For each column in the Load Table that is to be used, a line needs to be included in the table definition GUI. Below are the four lines that would be included for this “Loads” example (only four columns from the Load Table are used by the Simulink code: columns 1 and 2 for the Constant_Loads_(joint) block and columns 3 and 4 for the Velocity_Loads_(joint) block).

Figure 10.11: Load Table Definitions

  • Col# – The column in the Load Table.
  • Constant Name – A name that can be used within any Stateflow code, or in Simulink blocks as described in Section 3.12.
  • Param Label – The label shown to the operator in the Dexterit-E GUI when editing a protocol’s Load Table.
  • Param Type – The type that the number should be recorded as in the Dexterit-E protocol editing GUI.
  • Parameter Description – The description of the of the column that will be shown in the Dexterit-E GUI.

Note: Loads are applied to the Kinarm robot, not to the subject, whether the loads are hand-based or joint-based. Under static conditions the load applied to the Kinarm robot will equal the load applied to the subject, but under dynamic conditions these will not be equal because of Newton’s laws and the equations of motion.

Note: The constant names defined in the Parameter Table Defn block can be used to specify the columns in the various load blocks.

Sample Tasks

There are several available for download.

The linked task is the simplest: Reaching task with force channel.

Also see:

Reaching Task with Velocity Fields

Related Tasks

Coding Tips
Persistent Variables
Persistent variables are ones that hold their value between calls to the embedded MATLAB code they are defined in.
Coding Tips
Custom Control of the Trial Protocol Order
Normally, Dexterit-E manages and controls the order in which Trial Protocols (TPs) execute based on what is defined in the block table of the Task Protocol (see the Dexterit-E User Guide for more details).