detecting cocaine use with wearable electrocardiogram sensors

10
Detecting Cocaine Use with Wearable Electrocardiogram Sensors Annamalai Natarajan 1 Abhinav Parate 1 Edward Gaiser 2 Gustavo Angarita 2 Robert Malison 2 Benjamin Marlin 1 Deepak Ganesan 1 1 School of Computer Science, University of Massachusetts, Amherst {anataraj, aparate, marlin, dganesan}@cs.umass.edu 2 Department of Psychiatry, Yale School of Medicine, New Haven {edward.gaiser, gustavo.angarita, robert.malison}@yale.edu ABSTRACT Ubiquitous physiological sensing has the potential to pro- foundly improve our understanding of human behavior, lead- ing to more targeted treatments for a variety of disorders. The long term goal of this work is development of novel compu- tational tools to support the study of addiction in the context of cocaine use. The current paper takes the first step in this important direction by posing a simple, but crucial question: Can cocaine use be reliably detected using wearable electro- cardiogram (ECG) sensors? The main contributions in this paper include the presentation of a novel clinical study of co- caine use, the development of a computational pipeline for in- ferring morphological features from noisy ECG waveforms, and the evaluation of feature sets for cocaine use detection. Our results show that 32mg/70kg doses of cocaine can be de- tected with the area under the receiver operating characteristic curve levels above 0.9 both within and between-subjects. Author Keywords Drug Use, On-body Sensors, Classification ACM Classification Keywords I.2 ARTIFICIAL INTELLIGENCE : [Medicine and science] General Terms Algorithms; Experimentation; Measurement; Performance INTRODUCTION In recent years, the ability to continuously monitor the activi- ties, health, and lifestyle of individuals using sensor technolo- gies has reached unprecedented levels. Wearable “on-body” sensors now enable routine and continuous monitoring of a host of physiological signals including heart rate, blood pres- sure, respiratory rate, blood glucose and more. Commercial sensors manufactured by companies including Zephyr [23] are now commonly available to the everyday consumer for personal fitness and health applications. Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full cita- tion on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or re- publish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]. UbiComp’13, September 8–12, 2013, Zurich, Switzerland. Copyright c 2013 ACM 978-1-4503-1770-2/13/09...$15.00. http://dx.doi.org/10.1145/2493432.2493496 Such ubiquitous physiological sensing has the potential to profoundly improve our understanding of human behavior, leading to more targeted treatments for a variety of disor- ders. This work focuses on the development of novel compu- tational tools to support the study of addiction in the context of cocaine use. Current clinical studies of addictive behav- ior around cocaine use are limited to collecting data through subjective, retrospective self-reports [5]. In addition to being vulnerable to recall bias and intentional misrepresentation, this methodology may fail to capture important aspects of ad- diction that an individual patient is not consciously aware of including context-dependent triggers. In contrast, continuous sensing technologies provide a new window into patients’ daily lives - one through which an indi- vidual’s behavior might be more completely, accurately, and dynamically viewed as it evolves in real-time. We posit that such an approach has the potential to yield new insights on unique aspects of an individual’s addictive behavior as well as the extent to which specific environmental factors (people, places, and things) contribute to relapse, leading to highly individualized and dynamic markers of treatment response. While such an approach offers considerable promise, rigor- ous, well-controlled studies are required to establish the clin- ical utility of the technology in complex use cases like un- derstanding cocaine addiction. The current work takes the first step in this important direction by posing a simple, but crucial question: Can cocaine use be reliably detected using wearable on-body sensors? To begin to answer this question, it is important to under- stand the effect of cocaine on physiology, and the state-of-art in uncovering specific physiological features that could be in- dicative of cocaine use. By virtue of its peripheral actions on the sympathetic nervous system, it is well known that cocaine produces robust changes in primary indices of cardiovascular function (e.g., increases in heart rate) [19]. However, overall heart rate is also known to be easily confounded by a vari- ety of other real-world behaviors such as exercise or stress. The topic of how cocaine affects morphological features of ECG waveforms is thus of great interest and the literature on the effects of cocaine provides support for a number of such features [9, 14, 15, 21, 19]. Building on this body of prior work from the cocaine litera- ture, we select ECG as the most promising sensing modality Session: Health I UbiComp’13, September 8–12, 2013, Zurich, Switzerland 123

Upload: buinhi

Post on 10-Feb-2017

222 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Detecting cocaine use with wearable electrocardiogram sensors

Detecting Cocaine Use with WearableElectrocardiogram Sensors

Annamalai Natarajan1 Abhinav Parate1 Edward Gaiser2 Gustavo Angarita2

Robert Malison2 Benjamin Marlin1 Deepak Ganesan1

1School of Computer Science, University of Massachusetts, Amherst{anataraj, aparate, marlin, dganesan}@cs.umass.edu

2Department of Psychiatry, Yale School of Medicine, New Haven{edward.gaiser, gustavo.angarita, robert.malison}@yale.edu

ABSTRACTUbiquitous physiological sensing has the potential to pro-foundly improve our understanding of human behavior, lead-ing to more targeted treatments for a variety of disorders. Thelong term goal of this work is development of novel compu-tational tools to support the study of addiction in the contextof cocaine use. The current paper takes the first step in thisimportant direction by posing a simple, but crucial question:Can cocaine use be reliably detected using wearable electro-cardiogram (ECG) sensors? The main contributions in thispaper include the presentation of a novel clinical study of co-caine use, the development of a computational pipeline for in-ferring morphological features from noisy ECG waveforms,and the evaluation of feature sets for cocaine use detection.Our results show that 32mg/70kg doses of cocaine can be de-tected with the area under the receiver operating characteristiccurve levels above 0.9 both within and between-subjects.

Author KeywordsDrug Use, On-body Sensors, Classification

ACM Classification KeywordsI.2 ARTIFICIAL INTELLIGENCE : [Medicine and science]

General TermsAlgorithms; Experimentation; Measurement; Performance

INTRODUCTIONIn recent years, the ability to continuously monitor the activi-ties, health, and lifestyle of individuals using sensor technolo-gies has reached unprecedented levels. Wearable “on-body”sensors now enable routine and continuous monitoring of ahost of physiological signals including heart rate, blood pres-sure, respiratory rate, blood glucose and more. Commercialsensors manufactured by companies including Zephyr [23]are now commonly available to the everyday consumer forpersonal fitness and health applications.

Permission to make digital or hard copies of all or part of this work for personal orclassroom use is granted without fee provided that copies are not made or distributedfor profit or commercial advantage and that copies bear this notice and the full cita-tion on the first page. Copyrights for components of this work owned by others thanACM must be honored. Abstracting with credit is permitted. To copy otherwise, or re-publish, to post on servers or to redistribute to lists, requires prior specific permissionand/or a fee. Request permissions from [email protected]’13, September 8–12, 2013, Zurich, Switzerland.Copyright c� 2013 ACM 978-1-4503-1770-2/13/09...$15.00.http://dx.doi.org/10.1145/2493432.2493496

Such ubiquitous physiological sensing has the potential toprofoundly improve our understanding of human behavior,leading to more targeted treatments for a variety of disor-ders. This work focuses on the development of novel compu-tational tools to support the study of addiction in the contextof cocaine use. Current clinical studies of addictive behav-ior around cocaine use are limited to collecting data throughsubjective, retrospective self-reports [5]. In addition to beingvulnerable to recall bias and intentional misrepresentation,this methodology may fail to capture important aspects of ad-diction that an individual patient is not consciously aware ofincluding context-dependent triggers.

In contrast, continuous sensing technologies provide a newwindow into patients’ daily lives - one through which an indi-vidual’s behavior might be more completely, accurately, anddynamically viewed as it evolves in real-time. We posit thatsuch an approach has the potential to yield new insights onunique aspects of an individual’s addictive behavior as wellas the extent to which specific environmental factors (people,places, and things) contribute to relapse, leading to highlyindividualized and dynamic markers of treatment response.While such an approach offers considerable promise, rigor-ous, well-controlled studies are required to establish the clin-ical utility of the technology in complex use cases like un-derstanding cocaine addiction. The current work takes thefirst step in this important direction by posing a simple, butcrucial question: Can cocaine use be reliably detected usingwearable on-body sensors?

To begin to answer this question, it is important to under-stand the effect of cocaine on physiology, and the state-of-artin uncovering specific physiological features that could be in-dicative of cocaine use. By virtue of its peripheral actions onthe sympathetic nervous system, it is well known that cocaineproduces robust changes in primary indices of cardiovascularfunction (e.g., increases in heart rate) [19]. However, overallheart rate is also known to be easily confounded by a vari-ety of other real-world behaviors such as exercise or stress.The topic of how cocaine affects morphological features ofECG waveforms is thus of great interest and the literature onthe effects of cocaine provides support for a number of suchfeatures [9, 14, 15, 21, 19].

Building on this body of prior work from the cocaine litera-ture, we select ECG as the most promising sensing modality

Session: Health I UbiComp’13, September 8–12, 2013, Zurich, Switzerland

123

Page 2: Detecting cocaine use with wearable electrocardiogram sensors

for the detection of cocaine use. In this work, we evaluatethe ability of machine learning methods to detect cocaine usebased on two fundamentally different representational frame-works. The first framework is a fully data-driven approachwhere the underlying detector has access to complete ECGwaveforms. The key benefits of such a framework are thatit eliminates the need for feature extraction from ECG wave-forms, which is non-trivial both because of the noisy nature ofthe data, as well as waveform variations across subjects. Thesecond framework we consider is knowledge-based in that itleverages features that have been explored in prior studies ofcocaine’s effect on the heart. We study six different featuresof ECG waveforms that have been shown to correlate withcocaine use in the literature. These features (described in de-tail in the following sections) include the RR interval, QTinterval, QTc interval, PR interval, QRS interval, and T waveamplitude.

This paper makes the following primary contributions towearable ECG-based sensing and cocaine use detection:

• The presentation of a novel clinical study of cocaine useconducted at the Yale Center for Clinical Investigation’sHospital Research Unit (YCCI-HRU) in which a uniqueset of wireless ECG data were collected from experiencedcocaine users.

• The development of a computational pipeline for inferringmorphological features from noisy ECG waveforms col-lected using a wearable ECG sensor (the Zephyr BioHar-ness 3).

• The evaluation of ECG feature sets from the knowledge-based and data-driven detection frameworks using bothwithin-subject and between-subject protocols.

The clinical study involved six subjects, each of whom par-ticipated in a multi-week protocol involving multiple experi-mental conditions. The subjects wore the Zephyr BioHarness3 chest band for extended time periods including baseline ses-sions (following several days of habituation) and cocaine usesessions with multiple dosage levels. The resulting ECG datais quite noisy and also subject to signal dropout. Standardalgorithms for morphological analysis of intensive care unit(ICU) quality ECG data were found to be inadequate whenapplied to wireless ECG data, motivating the development ofa customized feature extraction pipeline that includes signifi-cant filtering and smoothing. Our results show that wearableECG-based cocaine use detection can be reliably performedboth within and between subjects. We achieve average AUCrates over 0.9 at the 32mg/70Kg dosage level and over 0.8 atthe 8 and 16mg/70Kg dosage levels using a combination offeatures.

BACKGROUND AND RELATED WORKIn this section, we provide background information on thephysiological effects of cocaine use, and review prior workfrom the ubiquitous computing community that has made useof wearable ECG for personal health sensing.

Effects of Cocaine Use: Cocaine addiction is associatedwith largely predictable and highly characteristic physiologi-cal, behavioral, and subjective effects [17]. Such effects de-

Figure 1. This figure illustrates two ECG periods. The peaks andtroughs of the PQRST complex are labeled on the left period. SeveralECG features that have been reported to undergo changes in the pres-ence of cocaine use are also illustrated including the RR interval, the QTinterval, the PR interval, the QRS interval and the T wave height.

rive directly from cocaine’s well-established pharmacologi-cal mechanism of action: it is an indirect agonist/monoaminereuptake inhibitor. By virtue of its peripheral actions onthe sympathetic nervous system, cocaine produces robustand predictable changes in primary indices of cardiovascu-lar and neurological function (increases in heart rate, sys-tolic, and diastolic blood pressure and pupillary diameter).As a “psychostimulant”, cocaine also produces a character-istic profile of centrally-mediated, behavioral effects includ-ing increased arousal, alertness, decreased somnolence/sleep,increased talkativeness, decreased appetite, and involuntarymotor activity ranging from non-specific increases in gen-eral activity level to highly repetitive and stereotypical move-ments, both simple and behaviorally complex.

In this work, we focus on the acute physiological effectsof cocaine use on the heart. There is substantial evidencefrom human studies that cocaine use causes changes in car-diovascular function that are observable in electrocardiogram(ECG) signals [9, 14, 15, 19]. Figure 1 illustrates two peri-ods of a typical ECG signal. We can see that each period ischaracterized by the presence of three peaks (P, R, T) and twotroughs (Q, S), which are collectively known as the PQRSTcomplex. Traditional ECG analysis focuses on how variousrelationships between the locations and heights of these peaksand troughs changes in response to differing conditions. Sev-eral such changes have been observed in subjects under theinfluence of cocaine.

As already mentioned, cocaine use has a robust effect on heartrate, causing it to increase significantly [19]. An increasedheart rate manifests as a reduced ECG period length. Due tothe ease of detecting the peak of the R wave, which is typi-cally the highest peak in the ECG signal, the ECG period isusually measured using the RR interval as shown in Figure1. While heart rate is known to increase with cocaine use re-sulting in a decrease in RR interval, this feature is obviouslyconfounded by any other activity that influences heart rate(activity, stress, etc) and thus has limited usefulness in prac-tice. Cocaine has also been reported to have an effect on theQT interval [19]. Some research has also made use of a “cor-rected” QT interval, QTc, meant to partially normalize out theeffect of heart rate. QTc is typically computed as the length ofthe QT interval divided by the square root of the length of theRR interval (Bazett’s correction) [22]. However, the literature

Session: Health I UbiComp’13, September 8–12, 2013, Zurich, Switzerland

124

Page 3: Detecting cocaine use with wearable electrocardiogram sensors

is contradictory as to whether QTc increases or decreases inthe presence of cocaine. Magnano et al., [15] suggests thatQTc prolongs in the presence of cocaine while Levin et al.,[14] suggests that QTc shortens. Magnano et al. have alsoreported changes in the height and shape of the T-wave inthe presence of cocaine. Animal studies have pointed to ad-ditional effects of cocaine on the PR and QRS intervals [10,18]. The PR, QRS and T wave height (TH) are also illustratedin Figure 1. In this work, we focus our knowledge-based de-tection framework around these six ECG features (RR, QT,QTc, TH, PR and QRS) since they are well supported by theliterature regarding the effect of cocaine on the heart.

Wearable ECG for Health and Activity Sensing: A sub-stantial body of work has explored the use of ECG usingwearable chestbands, primarily in the context of understand-ing physiological stress [1, 11], assessing cognitive load [8]and detection of arrhythmias caused specifically by atrial fib-rillation [2, 3, 12]. The work on physiological stress focusprimarily on the use of heart rate-based features to determinean individual’s stress level. Hong et al [11] aim to predictphysiological stress using simple ECG-based features (aver-age and median of heart-rate, ECG amplitude, and RR inter-val) combined with a set of features derived from accelerom-eter and galvanic skin response (GSR) sensors. Haapalainenet al [8] estimate cognitive load experienced by an individ-ual using a combination of sensors to monitor ECG, elec-troencephalogram (EEG), GSR, heat-flux, eye-movementsand change in pupil size. They observed that the best featurefor cognitive load level classification for most of the subjectswas derived from the median absolute deviation of ECG. Re-search on atrial fibrillation has looked at extraction of specificfeatures from the QRS complex. For example, [2, 3] usesQRS duration and PR interval to detect atrial fibrillation.

Our work clearly builds on past research regarding the effectsof cocaine on the electrophysiology of the heart by focus-ing our knowledge-based detection framework around a setof ECG-based features that is well supported by the litera-ture. While most of the previous studies, involving mobileand on-body physiological sensing, used heart rate and heartrate variability as features [1, 7, 11] only few studies usedlimited forms of morphological features [2, 3]. To the best ofour knowledge our ECG feature set is the most extensive everused. Unlike past studies from both the cocaine literature andthe mobile sensing literature, we also consider a data-drivendetection framework where detectors are built directly fromcomplete ECG waveforms.

COCAINE USE STUDY DESIGNAs part of an ongoing National Institute on Drug Abuse-approved cocaine use study at Yale University, we have col-lected data from six medically healthy, non-treatment seek-ing, experienced cocaine users. Subjects typically participatein the study for a two week period. The study consists ofmultiple components that we describe in this section.

Dry-Out Period: When subjects are first admitted to the unit,they undergo a “dry-out” period to ensure that the acute influ-ence of previous drug use does not affect the results of the

study. All subjects undergo a “dry-out” period that lasts forseveral days.

On-Body Sensor System: During the study protocol, thesubjects wear a Zephyr Bioharness 3 chest band [23] whichprovides several raw (ECG, chest band diameter, accelerome-ter) and derived (RR interval, heart rate, respiratory rate) mea-surements. These chest bands are designed to be comfortableand less intrusive to wear than Holter monitors. We focus onthe raw ECG data only in this work.

Our system encompasses two levels of data logging. The firstlevel is on the sensor itself. The second is on a smartphone.The data on the sensor is downloaded at the end of each dayand uploaded to a secure server. The sensor also transmitssummary packets to the phone, which are periodically trans-mitted wirelessly to the secure server. The redundancy of-fered by logging via the phone as well as on the sensing de-vice proved extremely useful since we found that the devicefailed to log locally on two occasions, but we were able toretrieve data transmitted from the phone.

Cocaine Administration Sessions: Subjects participate in asingle 6-hour cocaine administration experiment comprisedof several sessions. In this work, we use ECG data collectedfrom a baseline session, three fixed-dose cocaine administra-tion sessions and three cocaine self-administration sessions.These sessions appear in the same order for all subjects. Sub-jects wear the sensor system for all sessions. The baselinesession is conducted at the end of the dry-out period and im-mediately before cocaine administration. It provides ECGmeasurements in the complete absence of cocaine. The threefixed-dose sessions last 20 minutes each. At the start of eachof the these three sessions, the subjects receive a single-bolusintravenous (IV) injection of cocaine. The three cocaine ses-sions use a fixed-order, ascending dose regimen of 8, 16, and32 mg per 70kg respectively with a 100kg cap per adjusteddose. This procedure is based on extensive prior experience,which has shown these doses and procedures to be safe, welltolerated, valid, behaviorally relevant, and test-retest reliable[20].

The main purpose of the baseline and fixed-dose sessionsis to assess subjects for participation in subsequent cocaineself-administration sessions. Physiological (ECG, respira-tion) and behavioral (visual analog ccale self-ratings) assess-ments are conducted at five-minute intervals throughout eachsession. An advanced cardiac life support certified researchnurse and a basic life support certified research assistant arealso present. Subjects who exhibit a heart rate greater than160 beats per minute, diastolic blood pressure greater than110 mm Hg, systolic blood pressure greater than 180 mm Hg,and/or have evidence of clinically significant cardiac ectopy,arrhythmia, or other dangerous symptoms are excluded fromfurther self-administration sessions.

The three self-administration sessions give subjects somecontrol over the amount of cocaine they can receive. Eachself-administration session uses one dosage level (8mg, 16mgor 32mg). The order of the dosage levels is randomized. Thesubject can click a button to receive an IV cocaine infusion

Session: Health I UbiComp’13, September 8–12, 2013, Zurich, Switzerland

125

Page 4: Detecting cocaine use with wearable electrocardiogram sensors

(a) Noise (b) Dropout (c) Baseline Drift

Figure 2. This figure depicts some of the issues that occur when using a wearable ECG device. The data are inherently noisy compared to ICU-qualityECG that uses careful skin preparation as well as adhesive electrodes. Various forms of signal dropout occur in our data, including cases that manifestas extreme noise. The data are also subject to baseline drift even over short time scales.

at the given dosage level within each self-administration ses-sion. There is a minimum period of 5 minutes enforced be-tween subsequent infusions. All cocaine self-administrationsessions take place at the YCCI-HRU. A saline lock, or pe-ripheral intravenous device, is used for infusions of cocaine.Saline locks are maintained by trained research personnel inaccordance with local, institutional policies and procedures.

In this work, we make use of the ascending dose regime in thebaseline and fixed-dose sessions to explore the ability to dis-criminate between ECG waveforms from the baseline condi-tion (no cocaine), and ECG waveforms from each of the threefixed dose sessions (8, 16, and 32 mg). We also explore theability to discriminate between the ECG waveforms from thebaseline session and those obtained from the complete set ofcocaine sessions (the ascending dose regime combined withthe self-administration sessions).

At the time of writing this paper, six subjects have completedthe protocol. While the numbers may seem small, we notethat in-patient studies on drug use are considerably harder torun and much more costly than typical user studies involvingwearable sensors. Also, despite the low number of subjects,we are collecting hours of ECG waveform data per subjectcomprising thousands of heartbeats. We believe that the vol-ume of data we have currently obtained is sufficient to explorethe problem of cocaine use detection and provide an initial an-swer to our motivating question of whether cocaine use canbe reliably detected based on wearable ECG sensor data.

DATA CHARACTERISTICS AND PROCESSINGWe begin by presenting the noise characteristics of the ECGdata obtained in our study to illustrate the challenges itpresents. We then describe our data processing pipelineand how it extracts the features required to support both thedata-driven and knowledge-based detection frameworks inthe presence of these noise sources.

Noise Characteristics: We present several examples of rawdata obtained from our sensing and data acquisition pipelinein Figure 2. This figure illustrates various difficulties withthe use of a sensor like the Zephyr BioHarness chest bandwhere no skin preparation is used and the electrodes are notadhesive. Figure 2(a) gives an indication of how noisy the rawdata is in the best case. We also often see ECG periods that

have larger-scale distortions where the R wave may still beevident while the other peaks and troughs are not discernible.Such distorted periods would not pose a difficulty for featuresbased on the RR interval only (heart rate), but they do posechallenges when attempting to extract the complete PQRSTcomplex. Fortunately, these distorted periods appear to betransients and don’t frequently occur in long runs.

Figure 2(b) shows an example of signal dropout resulting inextended intervals of extreme noise. These intervals are easyto identify because their characteristics differ widely whencompared to normal signals. They contain no useful informa-tion and no features can be extracted from them. They typ-ically result from large-scale disturbances to the sensor likecompletely removing or readjusting the chest band.

Finally, Figure 2(c) shows the degree to which the signalbaseline drifts over short time spans. The baseline is alsoobserved to drift over longer time spans. The long-run driftis likely due to slippage of the sensor over time. It is unclearwhat causes the short-run drift, but it is likely a hardware is-sue with the sensor itself. Again, the drift is a minor issuewhen extracting features based on the RR interval, but needsto be accounted for when extracting and standardizing mor-phological features.

Data Processing and Feature Extraction: Several ECGdata processing toolkits provide functions to extract thePQRST complex from raw ECG waveforms (e.g. ECGBag[4]). However, we found that these toolkits are geared tothe high-quality signals typical of ICU-grade sensors. Whilethey can often be used to extract R peak locations, they lackrobustness to noise and dropout when attempting to extractmorphological features from signals obtained from the classof consumer-grade wearable ECG sensors that we use in thiswork. On the other hand, chest band-based ECG sensors haveexcellent ease of use in ambulatory settings when comparedto multi-lead ECG devices like Holter monitors that also useadhesive electrodes.

It is also interesting to note that while consumer-grade de-vices such as the Zephyr Bioharness have been available forsome time, most existing work only uses the ECG signal toextract basic features based on the RR interval like heart rateand heart rate variability. This is likely due to the difficulty of

Session: Health I UbiComp’13, September 8–12, 2013, Zurich, Switzerland

126

Page 5: Detecting cocaine use with wearable electrocardiogram sensors

Figure 3. This figure illustrates the primary steps in our sensing, data acquisition and data processing pipeline. Raw ECG measurements are transmittedwirelessly to a smartphone and also downloaded directly to a server to provide redundancy. We first segment ECG periods using RR intervals. To dealwith noise in the signals, we compute local averages over 30 second sliding windows. We apply peak detection to the smoothed waveforms and discardthose that do not have the correct configuration of peaks and troughs. We apply feature extraction and standardization followed by classification. Theabove steps apply only to features in the knowledge-based framework. For features in the data-driven framework the local averaging step is directlyfollowed by classification

extracting more nuanced morphological features in the pres-ence of substantial noise. One aim in the current work is tobridge the gap between traditional ECG analysis based onfeatures that require identification of the complete PQRSTcomplex (as is common in the electrocardiology literature),and the analysis of ECG signals obtained from consumer-grade sensors. We illustrate the main components of the dataprocessing and feature extraction pipeline that we have devel-oped to deal with these issues in Figure 3. We describe thecomponents in detail below.

Period Extraction: The easiest way to extract each complexis to split the ECG waveform into individual RR intervals.The R peak is easily localized because it clearly stands out asthe highest amplitude peak in the raw ECG signal. We usethe ECGBag [4] toolbox to identify the location of R wavepeaks in the raw ECG trace. We use the R peak locations tosegment the entire raw ECG trace into RR intervals. We re-move spurious R peaks by computing the heart rate using thetime between two adjacent R peaks, and discard those thatfall outside normal heart beat range (50 - 150 bpm). This ef-fectively removes much of the extreme noise due to drop out.However, the RR intervals that are extracted from the rawdata are of non-uniform length since they vary inversely withheart rate. After storing the RR interval feature, we standard-ize all periods by resampling them to 100 samples per period,effectively removing all information about heart rate.

Smoothing by Local Averaging: To smooth out the effect ofinherent noise as well as transient distorted ECG waves, weaverage the standardized waveforms within thirty second slid-ing windows. It is very important to note that this smoothingprocedure is not appropriate for detecting transient morpho-logical changes in ECG waveforms, which are often of in-terest in arrhythmia detection. It is appropriate in our case asthe reported effects of cocaine on the electrophysiology of theheart are persistent over time scales of several minutes [13].

Figure 4. Example filtered and smoothed ECG period with extractedPQRST locations.

Having obtained the length-standardized and smoothed RRintervals, we remove the DC offset of each period separatelyto deal with baseline drift. We also divide by the standarddeviation within each individual sample to normalize out anydrift in overall amplitude. Figure 4 shows an example of theresult of smoothing that can be contrasted with the raw datashown in Figure 2(a).

Peak Detection: Given the cleaned signal, we next need toidentify the elements of the PQRST complex. To do this,we apply a standard peak detection algorithm to the absolutevalue of the smoothed and standardized waveforms. We takethe five largest peaks and assign them the labels PQRST intemporal order. Waveforms that do not exhibit a peak-trough-peak-trough-peak sequence expected of the PQRST complexare filtered out as described below.

Filtering: When individual waves are as pronounced as theexample shown in Figure 4, the PQRST complex is relativelyeasy to identify, as described above. However, we find that

Session: Health I UbiComp’13, September 8–12, 2013, Zurich, Switzerland

127

Page 6: Detecting cocaine use with wearable electrocardiogram sensors

(a) Morphological Features (b) Waveform Features

Figure 5. Figure (a) shows histograms represented as heat maps for each morphological feature as a function of dosage level (darker colors indicatehigher frequency) for Subject 3. Figure (b) shows sample ECG waveforms, also from Subject 3, illustrating the effect of cocaine dosage level on theshape of the waveform.

some of the peaks are harder to detect than others, and resid-ual noise in the waveform sometimes results in too many ortoo few peaks being detected. Since the subsequent featureextraction step is highly sensitive to incorrect identificationof the PQRST complex, we apply several filtering steps todiscard potentially problematic waveforms. First, we filterout any waveforms that do not result in exactly three peaksand two troughs in the correct sequence. Second, we filterout waveforms where one or more waveform values is morethan three standard deviations away from the sliding windowmean. Such waveforms may exhibit the correct sequence ofpeaks and troughs, but the presence of extreme values is likelydue to noise and the detected peaks are then not reliable.

Feature Extraction: Given the standardized, smoothed andfiltered periods with identified PQRST complex locations, thefeature extraction step is straightforward. We have alreadyobtained the RR interval length (prior to standardization) asa byproduct of the ECG period segmentation step. We definethe QT, PR and QRS interval to be the distance between theidentified locations of the Q and T peaks, P and R peaks and Qand S peaks, respectively.1 These distances are all measuredin the standardized waveform space where the RR intervallength has been completely normalized away. To calculateQTc in its standard units, we then need to multiply our QT in-terval (where RR has be normalized away) by the square rootof the original RR interval length. Finally, the T wave heightis simply obtained as the height of the standardized waveformat the location identified as the peak of the T wave. Figure5(a) shows example histograms of each of these feature val-ues across dosage levels for one subject. The histograms arerepresented as heat maps. Each column of each figure repre-sents the distribution over feature values for a single dosagelevel. Higher frequencies are displayed as darker colors. Wecan see that some features like RR, TH and QT show distinct

1We note that the electrocardiology literature recommends slightlydifferent procedures for computing the QT, PR and QRS intervallengths based on where tangent lines to the individual waves inter-sect the baseline. We do not use this approach because numericalestimates of the tangent lines remain noisy even for our smoothedsamples.

changes between the baseline (first column) and cocaine use(second to fifth column) sessions.

Data Volume: The table below shows the total number ofsamples available for each subject and each session follow-ing all data processing steps.

Subject B 8 16 32 A1 1224 258 1024 60 78832 2232 1489 915 1015 119453 1916 1830 999 1459 136304 1362 731 296 299 79505 131 405 1524 1454 214586 647 317 98 784 16148

Table 1. Number of data cases per subject for the baseline, 8mg, 16mg,and 32mg sessions, as well as for all cocaine sessions combined (fixeddose and self-administration)

COCAINE DETECTIONThe final stage of our computational pipeline is detection ofcocaine use. In this section we discuss the feature sets used,how we frame the cocaine use detection problem as a classi-fication problem and describe our classification model.

Knowledge-Based and Data-Driven Detection: As de-scribed in the introduction, we consider two different detec-tion frameworks that differ in the features they use. The pre-vious section described at length how we compute the RRinterval and the five morphological features (QT, QTc, PR,QRS, TH) that are supported by the literature on cocaine.These features form the core of our knowledge-based detec-tion framework.

The second detection framework we consider is a purely data-driven framework where the feature representation for a pe-riod is the complete vector of ECG waveform amplitudes.For all the reasons described in the previous section, theuse of raw ECG waveforms in the data-driven frameworkis not advisable. Instead, we use the length-normalized andsmoothed waveforms produced by the first two steps of thepre-processing pipeline. In the data-driven framework, each

Session: Health I UbiComp’13, September 8–12, 2013, Zurich, Switzerland

128

Page 7: Detecting cocaine use with wearable electrocardiogram sensors

data case consists of a vector of 100 feature values represent-ing the amplitude of the ECG waveform at each of the stan-dardized time points. We refer to these features as the wave-form features and use the abbreviation W.

The use of the complete waveform itself is motivated by thefact that we observe substantial differences in the shape of theECG waveform across the four sessions (baseline, 8, 16, and32 mg/70kg cocaine) in most subjects. These differences areillustrated in Figure 5(b) using examples waveforms drawnfrom the middle of each session. We can see that for thissubject, as the cocaine dosage level increases, there are large-scale morphological changes in the ECG waveform includ-ing QT prolongation and T-wave flattening. The differencesare substantial enough to suggest that discrimination betweensessions should be easy given the full waveform representa-tion, at least within subjects. Other subjects exhibit qualita-tively similar changes as a function of cocaine dose.

The advantage of the fully data-driven approach is that evenwith the steps we have taken to reduce noise in the ECG sig-nals, the peak detection step can still be quite sensitive. Us-ing full waveforms allows us to avoid (or supplement) thepeak detection-based features with a feature representationthat does not require such processing and should thus be morerobust to residual noise in the signals. The only drawback isthat the number of individual features is obviously larger thanwhen using single morphological features. However, thereis no issue whatsoever fitting models to 100 features giventhat we have thousands of available data cases. In addition,the number of features is still low enough for detection al-gorithms to eventually run in real-time on a smart phone orother embedded system.

Cocaine Detection as Classification: Given a particular fea-ture representation, we view the problem of constructing adetector for cocaine use as a standard binary classifier learn-ing problem. We use the four experimental conditions in ourstudy (baseline, 8, 16, and 32 mg/70kg cocaine) to form foursets of binary classification problems: baseline vs 8mg, base-line vs 16mg, baseline vs 32mg, and baseline vs all dosagelevels combined. Within each problem, we construct classi-fiers based on each of the RR, QT, QTc, PR, QRS, TH and Wfeatures separately. In this work, we consider the problemof detecting cocaine use independently for each smoothedECG period derived from each 30 second window. Eachdata case consists of a feature vector xn extracted from thesmoothed waveform and a corresponding class label yn in-dicating which of the two sessions the data case belongs to.When using the RR, QT, QTc, PR, QRS or TH features, thefeature vector xn consists of one element only. When usingthe waveform features W , the feature vector xn is length 100,containing the 100 waveform amplitudes. We also considerfeature vectors containing all the morphological features (QT,QTc, PR, QRS and TH) and all of the morphological featurescombined with the waveform features.

Classification Model: In solving the detector constructionproblem, we can apply any existing binary classificationmodel. In this work, we select a standard linear logistic re-gression classifier [6]. Given a feature vector x consisting

of D features, the binary logistic regression classifier returnsthe probability that the feature vector belongs to the positiveclass. Letting Y represent the label for the instance x, logisticregression computes the class probability as shown below. ✓is a length D vector of feature weights. It is easy to see thatthe classifier has a linear decision boundary specified by theweights ✓.

P (Y = 1) =

1

1 + exp (�(✓>x+ b))(1)

The default classification rule when using linear regressionis to predict that the data case belongs to the positive classif P (Y = 1) > 0.5. Learning the weights of the logisticregression classifier is accomplished by maximizing the loglikelihood of the training data using numerical optimization[6]. This is a continuous, convex optimization problem withno constraints. It can be solved using any gradient-based op-timizer. In this work, we use the limited memory BroydenFletcher Goldfarb Shanno (BFGS) algorithm [16]. Given adata set D = {(yn,xn)}1:N , the log likelihood function isdefined as shown below. We assume the labels for the twoclasses are �1 and 1.

L(✓, b|D) = �NX

n=1

log

�1 + exp(�yn(✓

>xn + b))

�(2)

The term within the sum is known as the logistic loss. It upperbounds the zero-one loss and is very similar to the hinge-lossfunction used in support vector machines (SVMs) [6]. Whilethe slightly different properties of the logistic loss mean itdoes not yield a support vector property, this is irrelevant inthe linear case since the model is explicitly parameterized inweight-space. Further, there is known to be very little differ-ence between a learned linear logistic regression model anda learned linear SVM when the amount of available data islarge. One advantage of linear logistic regression over thelinear SVM is that it directly outputs probabilities, which areoften more desirable in medical domain applications such asours.

We do expect that non-linear classifiers including kernel lo-gistic regression or kernel support vector machines will im-prove cocaine detection performance further. However, weleave an investigation of alternative classification models forfuture work. In this work, we instead focus on an evaluationof the utility of different features and feature combinationswhen used with the linear logistic regression model.

EXPERIMENTS AND RESULTSIn this section, we present experiments and results comparingmultiple feature sets on the four classification problems intro-duced in the previous section: baseline vs 8mg (Bv8), base-line vs 16mg (Bv16), baseline vs 32mg (Bv32), and baselinevs all dosage levels combined (BvA). We consider two exper-imental conditions for each problem. In the within-subjectscondition, we train and test detectors separately for each sub-ject. In the between-subjects condition, we use each subjectas the test subject in turn, and train the detector on data fromthe remaining subjects. We assess detection performance us-ing the area under the receiver operating characteristic curve

Session: Health I UbiComp’13, September 8–12, 2013, Zurich, Switzerland

129

Page 8: Detecting cocaine use with wearable electrocardiogram sensors

Figure 6. This plot shows the results of within-subjects cocaine detection for all feature sets and four classification tasks. We see that the within-subjectsdetection task can be reliably solved with average AUC values approaching the maximum of 1.0 at the higher dosage levels for some feature sets.

(AUC) since there are sample imbalances between the classesboth within and between subjects. Table 2 summarizes thefeature sets that we use in our analysis. KB indicates fea-tures from the knowledge-based framework while DD indi-cates features from the data-driven framework.

Identifier Description FrameworkRR RR interval length KBQT QT interval length KBQTc Corrected QT interval KBPR PR interval length KBQRS QS interval length KBTH Height of T wave KBW Waveform Features DDAM All morphological features

(QT, QTc, PR, QRS, TH)KB

AM+W All morphological featuresplus waveform features

DD/KB

Table 2. Summary of Feature Sets

Within-Subject Cocaine Detection: In this section, we lookat within subject classification where the classifier is trainedand tested on data from the same subject. While training aclassifier for each individual user of such a detection systemis clearly not practical, studying within-subject classificationsheds light on which features work best if we ignore between-subject variability in baseline ECG waveform structure, ha-bituation, and cardiac response to cocaine.

In the within-subjects setting, we split the data for each ofthe four classification problems (Bv8, Bv16, Bv32 and BvA)into a training and testing set for each each subject. Splittingthe data for each subject randomly is not a valid protocol andwill result in inflated accuracy since the features and labelsare highly correlated in time. Instead, we divide each sub-ject’s data for each session into two equal halves. We use thefirst half of both session to train the classifier and the sec-ond half of both session to test the classifier. We train andtest detectors separately for each subject using this protocol.We report the mean AUC averaged across subjects as wellas the standard error of the mean in Figure 6 for each of thefour classification problems and each of the nine feature sets.The features are ordered from highest average AUC acrossthe four tasks to lowest average AUC.

First, we see that the detection problem can often be more ac-curately solved when the dosage level is higher than when it is

lower. This is certainly the case with the waveform features.It is consistent with the pattern of increasing morphologicaldeformation as a function of dosage presented in Figure 5(b).Determining why this pattern is not observed consistently forall features will require further investigation.

In terms of the feature sets, we see that the RR interval lengthperforms the best on average among the sets of features wehave investigated, followed closely by the waveform featuresand the combination of the waveform features and morpho-logical features. The AUC differences between these threefeature sets are not statistically significant as evidenced bythe overlapping error bars. Importantly, the average AUCacross all four classification problems is above 0.8 out of amaximum of 1.0, and for the waveform features, the AUCfor baseline vs 32mg is nearly equal to 1.0. We note that theperformance ranking of the morphological features generallyagrees with the degree of overlap in the feature distributionsacross dosage levels as seen in Figure 5(a). Among the mor-phological features, T and QT perform best. These two fea-tures along with RR exhibit the least overlap in feature distri-butions.

Before moving on to the between-subjects case, we pause toconsider the potential of the RR feature as a basis for cocainedetection outside of the clinical setting. While the RR in-terval has very good performance in the clinical setting, it isobviously confounded by any other activity that results in anincrease of base heart rate, as mentioned previously. The factthat the waveform features yield essentially the same accu-racy while completely removing the effect of heart rate is thusvery encouraging. It implies that there are significant differ-ences in the shape of the ECG waveform in the presence andabsence of cocaine. Since gross heart rate is so easily con-founded, we do not consider the RR interval to be a viablefeature for practical use in a cocaine detection system.

Between-Subject Cocaine Detection:We now turn tobetween-subjects cocaine detection. In these experiments weuse all of each subject’s data as test data, training on all ofthe data from the remaining subjects. We report the meanAUC averaged over all subjects as well as the standard errorof the mean. We restrict our attention to the three best setsof features identified in the within-subjects experiment. We

Session: Health I UbiComp’13, September 8–12, 2013, Zurich, Switzerland

130

Page 9: Detecting cocaine use with wearable electrocardiogram sensors

Figure 7. This plot shows the results of between-subjects cocaine detec-tion for the three best feature sets found in the within subjects analysisand all four classification tasks. We see that the AUC results are againapproaching the maximum of 1.0 at the higher dosage levels.

exclude the RR interval from consideration for the reasonsdiscussed above.

These results again show that the average AUC is alwaysabove 0.8 for the best feature set and again approaches themaximum possible value of 1.0 at the higher dosage levels.In this case, we see that the combined feature set AM+Wperforms best. The performance gain of AM+W over W inthis case indicates that there is some benefit to combiningthe waveform and morphological features in the between-subjects case. This is not surprising as there are some sig-nificant differences between the characteristics of the ECGwaveforms from different subjects (one subject has an aver-age R peak height nearly 1.5 times higher than the other sub-jects, for example.)

DISCUSSION AND CONCLUSIONSThe results presented in the previous section support a verypositive answer to the motivating question driving our currentresearch: we can indeed reliably detect cocaine use based ondata from wearable ECG sensors using appropriately chosenfeatures. While results obtained in the within-subjects settingare quite remarkable, collecting data to learn a customizeddetector for every individual is clearly not feasible outside ofthe clinical setting. However, the fact that high detection ac-curacy was also obtained in the between-subjects setting athigher dosage levels is extremely promising. We expect thatthe between-subjects results can be further improved giventraining data from additional subjects. We also expect thatclustering subjects according to their ECG waveforms andbuilding detectors at the cluster level will help to account forbetween-subjects variability in basic ECG waveform charac-teristics.

There are several additional exciting areas for future research.At the sensing level, we are interested in exploring what ad-ditional information we might obtain from other modalitiessuch as galvanic skin response that may also correlate withcocaine use. At the data processing level, we plan to investi-

gate solving the ECG period segmentation and PQRST com-plex extraction problems as joint inference problems in a uni-fied probabilistic model. We expect that this will result inimprovements in our solutions to both sub-problems. At thedetection level, we plan to investigate non-linear classifica-tion methods including kernel logistic regression and kernelsupport vector machines, which will likely lead to improve-ments in detector reliability. We also plan to re-cast the co-caine use detection problem as a structured prediction prob-lem as opposed to many independent classification problems.This will allow us to smooth predictions over longer time in-tervals, likely leading to further performance improvements.

In the clinical setting, there are several additional problemsthat we are interested in adapting our current methods to. Amore difficult problem than detecting whether an individualis under the influence of cocaine is identifying the preciseinstant the drug was administered. This will require datafrom additional subjects since, while we have many ECGperiods, there are relatively few infusion events per subject.Another problem is predicting the cumulative concentrationof the drug through time. While there are discrete infusionevents, cocaine diffuses out of the bloodstream with a half-life measured in tens of minutes. Learning to predict ef-fective concentrations is difficult because we currently lackground truth training data on the concentration of cocainein the bloodstream. However, it may be possible to applycurrently available mathematical models of cocaine diffusionand metabolization to compute estimated effective concentra-tions given the discrete time course of infusions. Finally, ourcurrent study also includes the collection of survey-type datafrom subjects at five minute intervals during self administra-tion including questions that probe an individual’s perceptionof their level of cocaine intoxication. We plan to explore howwell these self assessments correlate with estimated and pre-dicted effective concentrations.

Finally, looking toward the use of this technology outsideof the clinical setting presents several additional challenges.First, the subjects were seated for the duration of the cocaineadministration sessions since the infusions were delivered in-travenously. If this constraint were removed, we would ex-pect to see additional noise in the ECG data due to increasedmotion of the sensor. Our pre-processing pipeline has notbeen evaluated in such settings yet, but we expect that itwould easily handle more frequent noise of the type we havealready encountered. There is also an opportunity to use ac-celerometer data from the chest band to assist with filteringout ECG samples with potential artifacts due to motion ofthe subject. Second, there are significant differences betweenthe intravenous cocaine administration method used in ourstudy and real-world self administration methods and formsof the drug. This may result in different lag times between ad-ministration of the substance and it’s observable effect on thecardiovascular system. However, we expect the effects to besimilar to those we have observed in our study at equivalenteffective concentrations.

Session: Health I UbiComp’13, September 8–12, 2013, Zurich, Switzerland

131

Page 10: Detecting cocaine use with wearable electrocardiogram sensors

ACKNOWLEDGEMENTSWe would like to thank the staff of the Clinical Neuro-science Research Unit at the Connecticut Mental HealthCenter and the Hospital Research Unit at Yale New-HavenHospital. This work was supported by the National In-stitute on Drug Abuse (K24 DA017899; R01 DA033733;P20 DA027844; RTM), the National Science Foundation(CNS-0910900; CNS-0855128) and the Department of Men-tal Health and Addiction Services of the State of Connecti-cut. This publication was also made possible by CTSA GrantNumber UL1 RR024139 from the National Center for Re-search Resources and the National Center for AdvancingTranslational Science, components of the National Institutesof Health. This work also received financial support fromthe President’s Science and Technology Fund, University ofMassachusetts, Amherst

REFERENCES1. Alamudun, F., Choi, J., Gutierrez-Osuna, R., Khan, H.,

and Ahmed, B. Removal of subject-dependent andactivity-dependent variation in physiological measuresof stress. In Pervasive Computing Technologies forHealthcare, Proceedings of the 6th InternationalConference on (2012), 115–122.

2. Bouhenguel, R., and Mahgoub, I. A risk and incidencebased atrial fibrillation detection scheme for wearablehealthcare computing devices. In Pervasive ComputingTechnologies for Healthcare, Proceedings of the 6thInternational Conference on (2012), 97–104.

3. Bouhenguel, R., Mahgoub, I., and llyas, M. An energyefficient model for monitoring and detecting atrialfibrillation in wearable computing. In Body AreaNetworks, Proceedings of the 7th InternationalConference on (2012), 59–65.

4. Clifford, G. D. Ecgtools.http://www.robots.ox.ac.uk/

˜

gari/code.html.

5. Elman, I., Krause, S., Breiter, H., Gollub, R. L.,Heintges, J., Baumgartner, W. A., Rosen, B. R., andGastfriend, D. R. The validity of self-reported drug usein non-treatment seeking individuals with cocainedependence: correlation with biochemical assays. TheAmerican Journal on Addictions 9, 3 (2000), 216–221.

6. Friedman, J., Hastie, T., and Tibshirani, R. The elementsof statistical learning, vol. 1. Springer Series inStatistics, 2001.

7. Gaggioli, A., Pioggia, G., Tartarisco, G., Baldus, G.,Corda, D., Cipresso, P., and Riva, G. A mobile datacollection platform for mental health research. PersonalUbiquitous Computing 17, 2 (2013), 241–251.

8. Haapalainen, E., Kim, S., Forlizzi, J. F., and Dey, A. K.Psycho-physiological measures for assessing cognitiveload. In Ubiquitous computing, Proceedings of the 12thACM international conference on (2010), 301–310.

9. Haigney, M. C., Alam, S., Tebo, S., Marhefka, G.,Elkashef, A., Kahn, R., Chiang, C., Vocci, F., andCantilena, L. Intravenous cocaine and qt variability.

Journal of cardiovascular electrophysiology 17, 6(2006), 610–616.

10. Hale, S. L., Lehmann, M. H., and Kloner, R. A.Electrocardiographic abnormalities after acuteadministration of cocaine in the rat. The Americanjournal of cardiology 63, 20 (1989), 1529–1530.

11. Hong, J.-H., Ramos, J., and Dey, A. K. Understandingphysiological responses to stressors during physicalactivity. In Ubiquitous Computing, Proceedings of the2012 ACM Conference on (2012), 270–279.

12. Hu, S., Shao, Z., and Tan, J. A real-time cardiacarrhythmia classification system with wearableelectrocardiogram. In Body Sensor Networks,Proceedings of the 2011 International Conference on(2011), 119–124.

13. Kolbrich, E., Barnes, A., Gorelick, D., Boyd, S., Cone,E., and Huestis, M. Major and minor metabolites ofcocaine in human plasma following controlledsubcutaneous cocaine administration. Journal ofanalytical toxicology 30, 8 (2006), 501–510.

14. Levin, K., Copersino, M., Epstein, D., Boyd, S., andGorelick, D. Longitudinal ECG changes in cocaine usersduring extended abstinence. Drug Alcohol Depend 95,1-2 (2008), 160–163.

15. Magnano, A., Talathoti, N., Hallur, R., Jurus, D., Dizon,J., Holleran, S., M., B. D., Collins, E., and Garan, H.Effect of acute cocaine administration on the QTcinterval of habitual users. The American journal ofcardiology 97, 8 (2006), 1244–1246.

16. Nocedal, J., and Wright, S. J. Numerical optimization.Springer verlag, 1999.

17. O’Brien, C. P. Evidence-based treatments of addiction.Focus 9, 1 (2011), 107.

18. Schwartz, A., Janzen, D., Jones, R., and Boyle, W.Electrocardiographic and hemodynamic effects ofintravenous cocaine in awake and anesthetized dogs.Journal of electrocardiology 22, 2 (1989), 159–166.

19. Schwartz, B. G., Rezkalla, S., and Kloner, R. A.Cardiovascular effects of cocaine. Circulation 122, 24(2010), 2558–2569.

20. Sughondhabirom, A., Jain, D., Gueorguieva, R., Coric,V., Berman, R., Lynch, W. J., Self, D., Jatlow, P., andMalison, R. T. A paradigm to investigate theself-regulation of cocaine administration in humans.Psychopharmacology 180, 3 (2005), 436–446.

21. Vongpatanasin, W., Taylor, A. J., and Victor, R. G.Effects of cocaine on heart rate variability in healthysubjects. The American journal of cardiology 93, 3(2004), 385–388.

22. Wikipedia. QT c interval.http://en.wikipedia.org/wiki/QT_interval.

23. Zephyr. Bioharness 3. http://www.zephyr-technology.com/products/bioharness-3/.

Session: Health I UbiComp’13, September 8–12, 2013, Zurich, Switzerland

132