phd.meghan-smith.comphd.meghan-smith.com/.../2015/09/cns-imotions-manual.docx · web viewplace the...

26
iMotions ECG DATA COLLECTION/EXTRACTION Revised 9/21/15 1

Upload: ngobao

Post on 03-May-2018

216 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: phd.meghan-smith.comphd.meghan-smith.com/.../2015/09/CNS-Imotions-Manual.docx · Web viewPlace the ECG pack around the participant’s waist. The connections should be placed so that

iMotions ECG

DATA COLLECTION/EXTRACTION

Revised 9/21/15

1

Page 2: phd.meghan-smith.comphd.meghan-smith.com/.../2015/09/CNS-Imotions-Manual.docx · Web viewPlace the ECG pack around the participant’s waist. The connections should be placed so that

TABLE OF CONTENTS

Equipment ………….………………………………………………………………………………………….............................3

Setup …………………………………………………………………………......................……………………………….......….4

Placement Procedure ………………….…..………………………………………......................………….......…………6

Data Collection………………………………………………......................………………………………......……….........8

Troubleshooting ……………......................………………………………......………..............................………. 10

ECG Raw Data Extraction from iMotions.....................................................................................12

ECG Data Extraction using the Algorithm.....................................................................................14

2

Page 3: phd.meghan-smith.comphd.meghan-smith.com/.../2015/09/CNS-Imotions-Manual.docx · Web viewPlace the ECG pack around the participant’s waist. The connections should be placed so that

EQUIPMENT

Shimmer3 ECG (for ECG/RSP) Data capture computer with Attention Tool Presentation computer (participant) Materials

o ECG electrodes (square)o 4-lead wires (2 long, 2 short) (ECG)o 1 Belt

Shimmer3 EXGEquipment Setup

Make sure there are ECG electrodes, ECG receivers, sets of 4-lead wires (ECG) Place Receivers and supplies in the room where the equipment will be placed on

participants. Make sure wireless receivers are charged Experiment log (placed by Attention Tool computer) Paper towels or Wet Ones for clean-up in removal room

3

Page 4: phd.meghan-smith.comphd.meghan-smith.com/.../2015/09/CNS-Imotions-Manual.docx · Web viewPlace the ECG pack around the participant’s waist. The connections should be placed so that

INITIAL SETUP

(to check devices & connection on laptop)

Blue tooth icon on the right -> PC & Devices -> control panel ->

view devices & printers -> unspecified devices, right click -> properties->

hardware -> check if COM on 5 & 7

Optimal Set Up

First open Attention tool on the desktop.

Shown in picture 1: Click “Preferences” (at the top left) -> then choose “global settings” -> click the “sensors” tab (shown below) -> scroll to bottom -> look under “ECG” Configure -> uncheck “enable data collection” -> go back & enable data collection for ECG

4

Page 5: phd.meghan-smith.comphd.meghan-smith.com/.../2015/09/CNS-Imotions-Manual.docx · Web viewPlace the ECG pack around the participant’s waist. The connections should be placed so that

Shown in picture 2: hit “configure” under ECG -> confirm ECG is checked and enable ECG & heart rate (in the bottom left) -> choose what format you are setting up in drop down menu (top selection) “ECG LL RA” -> make sure data collection is set to 256 Hz -> edit resolution to 16 BZ -> apply ->

Shown in picture 3: Choose “advanced” ECG tab -> under ECG settings, check default -> apply all

5

Page 6: phd.meghan-smith.comphd.meghan-smith.com/.../2015/09/CNS-Imotions-Manual.docx · Web viewPlace the ECG pack around the participant’s waist. The connections should be placed so that

PLACEMENT PROCEDURE

ECG Placement

Right side Left side

Inform Ppt you will be placing the ECG electrodes below their collarbones, above and to the left of the belly button, and at the bottom of their ribcage. Show “Shimmer ECG Placement” handout or show them on yourself by pointing.

Ask Ppt if they are comfortable with you placing electrodes. o Tell Ppt what you are doing before you doing it. If they seem hesitant, guide them

in electrode placement. Ask Ppt to pull down their shirt/blouse to expose one upper pectoral muscle at a time. Find the collarbone, place 3 fingers underneath the collarbone. Place the white and/or

blue electrode where your finger is. Make sure to press the electrode on firmly. Ask Ppt to lift their shirt/blouse and find the bellybutton. Place green electrode above it. The red, and last, electrode gets placed outside (down) and to the right (your right) of

the triangle formed by the electrodes in the white, blue and green positions already placed.

Place the ECG pack around the participant’s waist. The connections should be placed so that there is the least amount of tension for the wires. The pack should be loose enough to give room for the waistband to stretch when they sit down, but not so much that the white lead has no slack.

6

Page 7: phd.meghan-smith.comphd.meghan-smith.com/.../2015/09/CNS-Imotions-Manual.docx · Web viewPlace the ECG pack around the participant’s waist. The connections should be placed so that

Plug the electrode leads into the pack according to the colors that match the above picture.

Make sure the electrode wires are positioned so that the wires are flowing away from the participant’s heart.

Additional Notes

If any application area appears oily, you may use a non-alcohol wipe to clean the area. For participants who have hairy chests, place electrodes between hair. Impedance may

be an issue and as such those with hairy chests should be monitored closely. If a participant’s chest is particularly hairy please make a note of this in the log.

7

Page 8: phd.meghan-smith.comphd.meghan-smith.com/.../2015/09/CNS-Imotions-Manual.docx · Web viewPlace the ECG pack around the participant’s waist. The connections should be placed so that

DATA COLLECTION

Stop!

1. Check temperature in collection to ensure set between 71-75°

2. Double-check to see that all data streams are properly functioning (the little white box on left of graph at the bottom -> choose live viewer-> click top right of live viewer)

3. Instruct Ppt to turn off cell phone and keep as still as possible as movement interferes with quality

Open Data Stream

On the iMotions home screen, click the little white box on left of graph at the bottom This shows you if you set everything up properly. Make sure you see the “ECG1 CH1 16bit” is streaming. If not, click top right of live

viewer (shows different channels & color key for waves) and choose the correct one.

8

Page 9: phd.meghan-smith.comphd.meghan-smith.com/.../2015/09/CNS-Imotions-Manual.docx · Web viewPlace the ECG pack around the participant’s waist. The connections should be placed so that

Add Participant

Under the “Respondents” column, press the plus sign at the bottom. Enter the ID, the biological gender and the age of the participant. When you are ready to begin the study, press the Red Dot button.

During Data Collection

Keep a watchful eye on participants to make sure they are not moving excessively. Make notes of any movements, such as coughs, sneezing, twisting of the chair, tapping,

nervous twitches, etc. (If applicable) Watch for loss of signal or distortions of data that may need to be fixed right away

9

Page 10: phd.meghan-smith.comphd.meghan-smith.com/.../2015/09/CNS-Imotions-Manual.docx · Web viewPlace the ECG pack around the participant’s waist. The connections should be placed so that

Troubleshooting: ECG

If you are not getting a signal from ECG make sure the pack is on, make sure you have a right angle (all leads facing away from the heart), and make sure the wires are in the correct color order.

If you are still not getting a signal try changing packs. (Remember when changing packs to change the check channels.)

Should see:

Note the top row: It should resemble an ECG wave and stay between the bounds -1 and 3. If the numbers are a lot larger, the chances are you did not select “Default ECG” under the “Advanced ECG” tab of the configuation process.

10

Page 11: phd.meghan-smith.comphd.meghan-smith.com/.../2015/09/CNS-Imotions-Manual.docx · Web viewPlace the ECG pack around the participant’s waist. The connections should be placed so that

Should not see:

*This is indicative of a lead not being connected properly or a lead that is loose.

Equipment Removal

A same sex RA should take the Ppt back into private room and let the Ppt know you are going to help them take off the equipment.

Unplug the ECG lead wires. Remove the ECG pack and turn off. Allow the Ppt to take off the electrodes from their chest. Tell them they may throw

them away into the trash can. Then lead the participant back to reception area. Put all lead wires back into the suitcase. Plug back in all equipment in the hallway closet.

Clean Up

Throw out used disposables. Leave trash can outside locked room door for trash pick up. Return all disposables to the hall closet. Return all iMotions receivers to the storage closet to charge (NOTE: Receivers must be

OFF to charge properly). Check all used rooms for lingering supplies, tidy up. Turn off system.

11

Page 12: phd.meghan-smith.comphd.meghan-smith.com/.../2015/09/CNS-Imotions-Manual.docx · Web viewPlace the ECG pack around the participant’s waist. The connections should be placed so that

ECG Raw Data Extraction from iMotions

Saving “Dump” file

Right click the study you are working on and hover over the “Export option” Choose “Export Sensor Data” Check “Shimmer Sensor” and change the “Output Directory” to where you would like to

save your files

Creating “.txt” file

Open the “DUMP” text document that shimmer gave you as an excel document (Note: be careful if you open it as a text document and copy it into excel, the columns might be wrong).

Use the column titled “Calc ECG1 CH1 16Bit (ECG)”

0 If there is any question as to which column to use, graph some of the column in

question. You should see a standard ECG wage on a wavey plain (this is because respiration is included in the wave form).

Select the whole column, starting from the first numerical entry, and copy it into a plain text file.

12

Page 13: phd.meghan-smith.comphd.meghan-smith.com/.../2015/09/CNS-Imotions-Manual.docx · Web viewPlace the ECG pack around the participant’s waist. The connections should be placed so that

This Data must be ran through Brian’s iMotions_Raw_Handler R program at this point.

13

Page 14: phd.meghan-smith.comphd.meghan-smith.com/.../2015/09/CNS-Imotions-Manual.docx · Web viewPlace the ECG pack around the participant’s waist. The connections should be placed so that

ECG Data Extraction using the Algorithm

This must be done on the Mac Pro if you are doing this at the lab. If you have a computer (PC or Mac) at home with a new version of MATLAB installed on it, along with the Wavelet toolbox, then you can use the ECG algorithm there instead.

Using the Algorithm (these instructions are for the lab’s Mac Pro)

Move the prepared .txt files that will be extracted into “matlab ECG cleaning”

Open MATLAB Navigate to the “matlab ECG cleaning” folder Click on the ecgExtract_TXT.m file Make sure your path is set /Users/jorgebarraza/matlab ECG cleaning

o This should be in the dropdown menu

MAKE SURE that all of the file names that you want to extract data from

have NO spaces in them. MATLAB will not run the file that has a space in it.

Setting path/Dropdown menu

Green triangle to run file

14

Page 15: phd.meghan-smith.comphd.meghan-smith.com/.../2015/09/CNS-Imotions-Manual.docx · Web viewPlace the ECG pack around the participant’s waist. The connections should be placed so that

Also, it will significantly speed things up if you only leave participant’s number and event type .txt, instead of keeping the whole name of the raw file plus the ECG at the end (or beginning). Just remember to organize them properly after you are done (see below).

Click on the green triangle Enter in the entire name of the file you are using (note that the files have to be in the

same MATLAB directory as the script at this point) Open the output file at the top of the “matlab ECG cleaning” folder Select All (command + A) and then Paste the values into the Excel spreadsheet, for the

appropriate period of the participant you are extracting data for

2. Check for and remove artifacts from the data (in Excel)

15

Page 16: phd.meghan-smith.comphd.meghan-smith.com/.../2015/09/CNS-Imotions-Manual.docx · Web viewPlace the ECG pack around the participant’s waist. The connections should be placed so that

This step can be done right after you’ve just pasted data for one period of interest for one participant — or it can be done after all periods of all the files have been run through the algorithm

Highlight the data that you want to check. If doing it in bulk, after everything has been run through the algorithm, then you can highlight multiple columns (up to 4 or 5, otherwise you can miss some artifacts).

Make a line graph (so that you see the RR values for each second)

Check for abnormalities, includingo Major deviations from the overall pattern of data:

Picture for BU007 below shows a waveform with two major deviations from the mean (at around seconds #50 and #94);

Picture for BU003 below shows participant’s RR that has standard deviation significantly greater than normal (and normal standard deviation is generally equal to about 0.04 to 0.15).

You can spot this by noting that the data is not all located in the narrow band (even if the moving average shifts a bit, the data should not have major deviations band)

16

Page 17: phd.meghan-smith.comphd.meghan-smith.com/.../2015/09/CNS-Imotions-Manual.docx · Web viewPlace the ECG pack around the participant’s waist. The connections should be placed so that

For BU003, the band (range of value changes around average) often exceeds 1

See the picture of BU067’s RR time series below for a more common distribution, with band width mostly equal to 0.4

o Data not in the human ECG range (HR values have to be between around 30 BPM and 150 BPM, thus RR values – the ones you’ve extracted using algorithm – have to be between 0.4 and 2): picture for BU007, at around second 50) and on the right below (BU003, between seconds #107 and #113)

1 7 13 19 25 31 37 43 49 55 61 67 73 79 85 91 97 103109 1150

0.5

1

1.5

2

2.5

3

BU003

1 7 13 19 25 31 37 43 49 55 61 67 73 79 85 91 97 1031091151211271330

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

BU007

17

Page 18: phd.meghan-smith.comphd.meghan-smith.com/.../2015/09/CNS-Imotions-Manual.docx · Web viewPlace the ECG pack around the participant’s waist. The connections should be placed so that

If there are no artifacts or other abnormalities, like in the picture below, proceed to checking data for the next participant/next period of interest (each participant’s data have to be checked, for every period)

If the standard deviation of the RR is significantly greater than normal, and/or about 25% or more of the data is outside the human ECG range, the data CANNOT be used and the file containing ECG signal has to be checked for the “abnormalities” described in the ECG cleaning section above. The example of such a file is the picture above, for BU003.

If there are only a few artifacts, like the picture for BU007 above, fix them in Excel, by replicating the pattern (4-5 seconds before and after) as closely as possible. The successful result should not have any more visible artifacts, like the picture below, for **modified** BU007:

1 7 13 19 25 31 37 43 49 55 61 67 73 79 85 91 97 1031091151211271330

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

BU007

3. Save the results as a text file if you are going to be extracting HRV values

1 12 23 34 45 56 67 78 89 1001111221331441551661771881992102212322432542652762872980

0.2

0.4

0.6

0.8

1

1.2

1.4

BU067

18

Page 19: phd.meghan-smith.comphd.meghan-smith.com/.../2015/09/CNS-Imotions-Manual.docx · Web viewPlace the ECG pack around the participant’s waist. The connections should be placed so that

Note that there has to be at least 30 seconds worth of data otherwise it won’t be enough to extract HRV values.

Make a new folder inside one that you have accumulated processed ECG files (can name it txt or something easy to find later)

Start with the Baseline data and progress through all of the periods of interest, putting each period for every participant in a separate text file. NOTE: do not include the title above the values in the file – each file has to just include RR values that you’ve extracted and fixed from Excel

Name these files very simply (it will save a lot of time). For example, for the first participant’s baseline, name it 1-0.txt; for the first participant’s 1st period, name it 1-1.txt, and so on.

4. Cleaning up

Note that after you’ve completed the ECG extraction, it is best to move all of the resulting files into the folder dedicated for the particular experiment you are working with. For example, for the Movie Trailers experiment, move all of the prepared and extracted ECG data into the “ECG” folder inside the “Movie Trailers” folder.

This step will help a lot to keep track of everything, especially if there are multiple Biopac studies are currently running.

19

Page 20: phd.meghan-smith.comphd.meghan-smith.com/.../2015/09/CNS-Imotions-Manual.docx · Web viewPlace the ECG pack around the participant’s waist. The connections should be placed so that

*NOTE* If comparing to Biopac:

20