• No results found

In the following lines, as description of the app is given. More interestingly, it provides the steps the researcher shall follow to control the prosthesis through the CEINMS model.

Main page: running an experiment

The main page provides intuitive guidelines to control the prosthesis. The functionalities implemented and the steps to start prosthesis control are described below.

52 Appendix C. Prosthesis Control In Matlab

FIGUREC.1

1. Choose an EMG calibration file

The first thing is to load subject-specific EMG .txt calibration file. By clicking the search button a window of the current Matlab path will appear, where the desired EMG .txt file should previously be allocated. The name of the file will appear in the small window.

If any experiment is intended to be recorded, it is advised to create an specific exper- imentation session for the subject by entering subject’s name or reference in the ’Subject name’ edit field and pressing ’Create’. This will create a folder containing all experimen- tal variables and data recordings. The file system and data storage system is explained in section C.4 in this appendix.

2. Choose control type

The GUI gives the option to control the prosthesis with admittance-based or non- admittance-based EMG-driven musculoskeletal model control. In the GUI, the latter is called ’Proportional’, just because velocity commands will be ’just proportional’ to the torque (perhaps a better naming would have beendirectcontrol).

Furthermore, in this moment the researcher shall chose between 1 DOF or 2 DOF control. By default, 1 DOF is active, which allow to control prosthetic hand opening and closing. 2 DOF allows this, plus prosthetic pronation-supination. Note that a proper calibration of the subject-specific CEINMS model for the 2 DOFs should have been pre- viously made (refer to Appendix A).

3. Choose experiment

In case the researcher needs to perform the ’blind object’ or ’force tracking’ experi- ment, the option should be chosen accordingly. This will change the shape of the plot according to the experiment. If modifications in the shape of the reference line needs to

C.2. Description and steps for prosthesis control 53 be changed, this should be done in the ’generatePattern’ function included in the code view. The control of the prosthesis is limited to the duration of each experiment: 120 seconds.

The option ’Free ctrl.’ gives the option of just controlling the prosthesis with no time limitations. Then, this options should be selected to conduct functional tasks.

4. How to run an experiment

To control the prosthetic hand, first, a UDP connection with the Michelangelo hand GUI and a UDP connection with the CEINMS model plug-in must be established, as explained in Appendix B. The ’Connect’ button will create the UDP connection to the Michelangelo and CEINMS model. Afterwards, the ’Start Experiment’ button will allow control of the prosthesis. Some explicit steps need to be followed for successful connec- tion of both UDPs and prosthesis control:

a) Connect to Michelangelo hand

To control the Michelangelo hand, the bluetooth dongle must be connected to the PC. Then, press ’Connect’in the Michelangelo GUI. A calibration file for the Michelangelo hand must be loaded by pressing ’Load *.xml file’ in the ’Calibration’ zone of such GUI. Select ’MikeyRot_Calibration.xml’. Then, click ’Start Communication’.

b) Click ’Connect’ in the Matlab GUI

Once connect is pressed, the button will be disabled. In this point, the CEINMS model must be started. The order of the steps is important because Matlab must retrieve the unknown IP address and the connection ports of the CEINMS plug-in before trying to connect to it.

c) Start the CEINMS model

In the same way as the calibration, the CEINMS model must be started from the com- mand line in PowerShell as shown in Fig. C.2. It is important to note that each subject has his/her own ’subjectCalibration.xml’ and this must be placed in the right path (i.e. .\cfg\Arm\). After few seconds, the GUI of the real-time CEINMS model will open. In this point, the ’Connect’ button of the Matlab GUI should be green indicating successful connection to both the Michelangelo hand and to the real-time CEINMS-model.

FIGUREC.2: Starting CEINMS model.

d) Click ’Start Experiment’ in Maltab GUI

Once UDP connections are ready, press ’Start Experiment’. In should say ’waiting to Start Dump’.

FIGUREC.3: Change of state of the ’Start Experiment’ button

e) Click ’Start Dump’ in Michelangelo GUI

The ’Start Dump’ button is the most important to start control of the prosthesis. By press- ing this button, the streaming of datagram packages from the AxonMaster will start. In

54 Appendix C. Prosthesis Control In Matlab this moment, in the Matlab GUI, the ’waiting to start dump’ should change to ’Stop ex- periment’ coloured in red.

FIGUREC.4: Change of state of the ’Start Experiment’ button to ’Stop ex- periment’

f) Stopping an experiment

To stop the experiment, click ’Stop experiment’ red button in the Matlab GUI. This will end the stream of data and will close all UDP connections. If another experiment needs to be conducted, steps from b) to e) should be repeated.

Related documents