Home Examples Position control
BeginnerPosition Control

Position control

This task demonstrates how to move the subject’s arm smoothly while using the Position Controller block. It will move the subject’s arm alternatively between 4 target locations.

Forces/torques will be commanded to the Kinarm as soon as the task starts, and will continue throughout the entire task (i.e. the Position Controller is always on). There is a different sample task “Position controller enable/disable” which demonstrates how to turn the Position Controller on/off smoothly within a trial, for tasks that need to alternate between free movement and positioning the arm.

In the Trajectory subsystem/Create_Trajectory subsystem, a bell-shaped velocity profile is calculated between where the hand was at the start of the trial and the destination target. Using Stateflow, the virtual trajectory is sent point by point to the Position Controller block to create a smooth motion.

This task works on both Endpoint and Exoskeleton Kinarm labs.

Last tested in Dexterit-E 3.10 and MATLAB 2015a.

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).