An Ultra Low Power Personalizable Wrist Worn ECG Monitor Integrated With IoT Infrastructure

Cardiovascular diseases are the leading cause of death in the U.K., motivating the use of long term wearable devices to monitor the heart in out-of-the-clinic settings. While a wide number of heart rate measuring wearable devices are now available, they are principally based upon photoplethysmography rather than the electrocardiogram (ECG) and are stand-alone devices rather than integrated with Internet-of-Things infrastructures which collect and combine information from a wide range of sensors. This paper presents a wrist worn ECG sensor which integrates with the SPHERE IoT platform—the UK’s demonstrator platform for health monitoring in the home environment, combining a range of on-person and ambient sensors. The ECG device integrates ultralow power consumption electronics with personalizable 3-D printed casings which maintain gold standard Ag/AgCl electrodes to provide measurements of the raw ECG waveform, heart rate, and meanNN and SDNN heart rate variability parameters. The end device allows for more than a month of battery life for a weight of <50 g including the watch straps. The design and heart sensing performance of the device are presented in detail, together with the integration with the SPHERE IoT platform.


I. INTRODUCTION
Ageing populations are placing an increasing burden on health care services around the world.In the UK alone, the population over 85 is expected to double by the year 2041 [1] with a corresponding increase in the number of noncommunicable and age related diseases.Noncommunicable diseases, such as cardiovascular diseases represent 66% of all annual deaths worldwide [2] and are the leading cause of death amongst the over 85 [3].In spite of this, it is estimated that 80% of coronary heart disease cases could be prevented with better care and monitoring [4].
Wearable devices have recently emerged as the body worn aspect of the Internet-of-Things (IoT), monitoring health parameters over long periods of time to allow a drive towards personalized and preventative P4 medicine [5] in which data is routinely collected outside of clinical environments.This is driven by a significant rise in the accuracy of wearable devices, and they are now approaching the point where they are capable of monitoring and facilitating the diagnosis of diseases [6].However, current devices, which focus on the recording of activity (accelerometery) and heart rate (via photoplethysmography), still have a wide range of limitations for use in ubiquitous health care.
Firstly, as wrist-worn watch style wearables have grown in popularity, their social acceptability has grown.However, the age group most likely to benefit-the elderly-remain the least likely to use a wearable device [7].A significant barrier to the adoption of wearables in this user group continues to be the need to charge devices on a daily basis [8].Secondly, current devices do not integrate with open IoT infrastructure which is being created around the world.Most business models are based upon data driven approaches [9], passing data to a propriety cloud where it can be aggregated and mined.This raises privacy concerns [10] and limits the interoperability and combination of devices which could allow insights from a range of on-body and ambient sensors to be merged.Thirdly, current devices are one-size-fits-all, similar looking devices in a watch form factor.There is no personalization of the physical unit to obtain a better contact with the body or for ease of use by different people.
Finally, the electrocardiogram (ECG), which measures the electrical activity of heart and is widely used in clinical settings, has not been integrated into wrist worn devices.Instead, current units focus on photoplethysmography (PPG), which operates by shining light onto the body and measuring the amount of reflection which is modulated by the blood flow [11].This means that factors such as the morphological components of the waveform (such as P waves and T waves in the ECG [12]) and heart rate variability cannot be reported.Moreover, as PPG sensing uses a light source (typically an LED), it inherently consumes a large amount of power, of the order of 1 mW.While there have been efforts to reduce this (for example compressive sensing [13]), reducing power consumption to the range where a typical battery used in a wearable could provide a months battery usage, is not feasible.In contrast, as the sensing element in an ECG is only metal electrodes, the system is intrinsically lower power and can provide additional health related information beyond using the PPG alone.
This paper presents a wrist worn wearable for overcoming the above four challenges.We use a 3D printed case with painted Silver/Silver-Chloride (Ag/AgCl) electrodes which allows for custom shapes and sizes of electrodes which can be made individually for each user if desired (in addition to a fixed size/shape across all people if this is preferred).This is used to provide ECG monitoring of the heart by asking users to touch the face of the wearable with a finger.A second electrode is present on the back face touching the wrist, allowing the wearable to have contact points on either side of the heart for a large amplitude ECG trace to be recorded.We present a high input impedance, high Common-Mode Rejection Ration (CMRR) front-end circuit which is compatible with gel-free electrodes while consuming less than 10 µW of power and using only off-the-shelf electronic devices.
The resulting data is used to find the user's heart rate and other information on the health of the heart, particularly relating to heart rate variability.Our optimized ECG circuitry offers over a month of battery lifetime and is connected to the SPHERE (a Sensor Platform for HEalthcare in a Residential Environment) IoT infrastructure [14].SPHERE is an established IoT smart-home health care system demonstrator in the UK, and this integration allows for inter-interoperability and platform building based upon the wearable data.
Here we focus on describing the complete multidisciplinary system rather than any single topic in isolation.Section II overviews the system concept and previous attempts at wrist based ECG sensing.Section III details our design in terms of the system architecture, hardware and software required for the ECG sensing performed, including our 3D printed dry Ag/AgCl electrodes.Section IV then details the SPHERE smart home IoT infrastructure platform to demonstrate the data integration potential.
Finally, Section V reports the performance of our ECG system, comparing it to a currently available commercial device for heart monitoring performance.A preliminary version of this paper was presented in [15].In this paper we have extended this work to include 3D printed electrodes, integration with the SPHERE IoT platform, and more detailed testing of heart rate measurement accuracy, together with testing of heart rate variability performance.

II. WRIST BASED ECG SENSING
The ECG is widely used clinically by placing electrodes on the chest.Up to 12 leads may be placed in locations all across the chest to build up a multi-channel picture of the operation of the heart [12].However, this arrangement is not wearable and instead a range of wearable patches have been proposed which record a single ECG channel with electrodes placed over the sternum with at least one electrode on either side of the heart (see for example [16]).Nevertheless, this still requires placing a recording unit in a potentially sensitive area, which may be difficult to access, and is an additional device to use if a standard watch location is used for recording other health data modalities.
Attempts have been made to overcome this, using a variety of methods.Sun et al. [17] tackled the electrode connection issue by attaching flexible electrodes to the inside of a T-shirt.These electrodes were based on a conductive fabric that pressed against the chest.This relies on the T-shirt maintaining a good contact with the user's chest to ensure a good ohmic connection.As a result, to obtain a good signal the T-shirt must be kept tight against the user's body to ensure all the electrodes are touching the skin.
Rachim and Chung [18] attempted to overcome this through this by using capacitive electrodes mounted into an armband.The ECG electrodes are all placed in a single armband, with electrodes made from silver coated polyester.This armband is able to sense ECG signals and stream them to a Bluetooth connected smartphone.However, again this requires an additional device to be worn if a standard watch location is used for recording other health data modalities.
Integration of ECG into a standard watch location at the wrist is challenging due to the need for electrodes to be placed on either side of the heart.If electrodes are placed on just one side of the heart, the collected signals reduce in amplitude and become increasingly small the further away from the heart, Fig. 1.Placing electrodes on just one arm, the time domain ECG signal reaches a 0 dB Signal-to-Noise Ratio at (approximately) the elbow.It is possible, however, to place one electrode on one wrist, and then touch a second electrode with the other hand.As the two sensing connection points are on either side of the heart a high Signal-to-Noise Ratio (SNR) ECG can be collected [19], see Fig. 1.
We use this approach to allow ECG monitoring in a watchtype form factor.One electrode is placed on the back-side of the watch, and so in constant contact with the skin.A second electrode is placed on the front of the watch for the wearer to touch with a finger from their other hand.This will give a discontinuous monitoring of the heart, with a reading started whenever the user touches the front face of the wearable unit.
A similar approach was used in the BioWatch [20], although this focused on attempting to measure blood pressure, rather than heart rate and other signal components from the ECG.A number of other approaches to watch-type wrist ECG have also been reported [21], [22], for example those integrating flexible textile electrodes into smart clothing [23]- [25], those studying artifacts and artifact removal algorithms for wrist ECG data [26]- [28], and novel uses such as bio-authentication [29].A commercial add-on from AliveCor adds similar functionality to an Apple Watch platform [30].
To our knowledge none of these have aggressively minimized power consumption to allow long battery lifetimes, and none consider whether personalization can be incorporated.Moreover, only [31] only considered integration in an IoT context.This uses a MQTT (Message Queuing Telemetry Transport) protocol to pass data into a compliant back-end, but with no details on this wider IoT part of the system.In this article we consider all of these factors to present a holistic IoT system for long term monitoring of the heart, with a focus on the raw ECG waveform, calculated heart rate and potential for measuring heart rate variability factors.

III. WRIST ECG WEARABLE DESIGN A. ECG FRONT-END
A typical ECG recording requires at least three electrodes, two of these sense a differential signal, and are placed on the upper body.The third electrode is a Driven Right Leg (DRL) connection that reduces 50/60 Hz mains noise by driving the body to cancel the interference.However, this is not suitable for a wrist worn unit where only two points of contact are available, one on the front face of the watch-like unit and one on the back.
A number of techniques have been suggested previously for allowing ECG recordings using only two electrodes, simplifying the equipment set up by requiring just two body contacts.[32] used very high common mode rejection electronics, [33], [34] a DC servo loop for preventing saturation, [35] an active virtual ground, and [36] a common mode follower and a.c.bias approach.We make use of the topology introduced in [32] in 1980, as it requires only 3 active components, intrinsically minimizing power consumption as our primary objective.Made using modern integrated circuits this topology allows sufficient input impedance and commonmode rejection to allow recording from gel-free electrodes (Section III-B) with micro-Watt levels of power consumption, and no need for a dedicated custom microchip as considered in other wearable ECG works [27].
Our ECG amplifier circuit is shown in Fig. 2, which uses the LPV542 op-amp due to its ultra low 1 µW power consumption per device.Two high input impedance buffers are used as the subject connection with partial positive feedback employed to increase the input impedance, making the circuit suitable for gel-free ECG recordings (see Section III-B).The a.c.coupling provided by capacitors C1 and C2 allows the user to be d.c.biased via resistor network R1/R2/R3, ensuring the absolute input voltage remains within the input range of the amplifiers, without affecting the biasing of the subsequent circuit stages.
To reduce power consumption no common mode feedback or feedforward is provided [37].Instead, to ensure the collected ECG signal is within the input ranges of the front-end amplifiers the user is driven to a fixed mid-supply voltage, with resistors sized to ensure that the single point failure current into the user is limited to below 18 µA.This arrangement means that more mains interference (50/60 Hz) is collected by the circuit, but as this is a known frequency which does not overlap with the wanted ECG components it is easily removed by hardware and software filtering.
Beyond the above, resistor sizes, particularly for the biasing, are chosen to minimize power consumption, at the cost of interference pick-up due to high impedance nodes being present, and introducing more thermal noise.All resistors are carefully sized to keep the final system noise to an acceptable level (see Section V).The front-end circuit is completed with a standard difference amplifier made with high precision (0.1%) resistors to ensure that a high common mode rejection ratio is maintained and a single op-amp second order low pass filter is used for anti-aliasing prior to digitization.
The complete front-end circuit requires only four active components and approximately 8 µW from a 1.8 V supply for ultra low power operation.The output is passed to the analogue-to-digital converter on the SPHERE wearable platform described in Section IV for digitization and passing to our IoT ecosystem.

B. PERSONALIZED CASE AND ELECTRODES
In addition to ultra low power consumption, essential for practical use is that the body contact electrodes are dry.For many ECG recordings a wet conductive gel is placed over the electrodes in order to minimize the contact impedance.This significantly improves the quality of the recorded signal, but at the cost of the gel drying out over time so the performance is not constant.Moreover, the gel leaves a residue when removed which is unpopular and needs cleaning.Further, current ECG electrodes are held in place with a strong adhesive, which can be painful to remove.Repeated electrode removals, day-after-day, can lead to skin reddening, and eventual tearing.In turn this produces user discomfort, the potential for infection, and an inability to record from the same location.As examples, [38], [39] report skin reddening when using wet electrodes for between one and two days.Reference [40] recommends changing electrodes every day for the best signal quality.
To help overcome these issues in [41] we introduced dry 3D printed electrodes for electro-physiology.These were coated in silver, with different length and area prongs used to make contact with the body, with the precise sizes used being customizable.In this work, we use a similar approach, but now 3D print an entire watch-like body for the wrist ECG unit, as shown in Fig. 3. Rather than using a strong adhesive to hold the electrodes in place we use a watch body and strap, for which the curvature of the back plane (Fig. 3d) can be customized to different arms, with customizable bumps (Fig. 3b) to ensure contact through hair.All parts are printed in a standard PLA plastic.Electrodes are formed by coating these 3D printed parts in a conductive ink.Here, we make use of silver/silver chloride (Ag/AgCl) to improve the performance compared to the silver electrodes in [41].Ag/AgCl electrodes show better long term stability and reduced noise compared to silver electrodes [42].
We use a medical grade Ag/AgCl ink from Creative Materials (Boston, USA) which is painted directly onto the casing on the front and back to form electrode locations.To create this ink, we mixed Ag/AgCl ink from creative materials (113-09) with the supplied thinner (102-03) at a 1:1 ratio.The painted electrodes were then cured at 100 • C for 2 minutes, to increase their conductivity while avoiding deformations to the plastic casing.
An example overall system and its electrodes are shown in Fig. 3.The total assembly weighs 50 g including the strap.

IV. SPHERE IoT INFRASTRUCTURE
A. THE SPHERE PLATFORM SPHERE (a Sensor Platform for HEalthcare in a Residential Environment) is an IoT platform of off-the-shelf and custom sensors [43] that aims to build a picture of how people live in their homes for medical applications.The purpose is to use the collected information to assist in determining the physical and mental well-being of the residents.Applications include characterizing sedentary behavior, detecting correlations (e.g.diet and sleep), measuring movement/postures, analyzing eating behavior, detecting strokes, predicting falls, and detecting depression.This is performed by combining a wide range wearable and ambient sensors into an IoT ecosystem.
Fig. 4 depicts the SPHERE smart home architecture [14], which is currently being deployed in 100 homes across Bristol in the UK.Each house installation includes environmental sensors, depth cameras, water flow sensors, and electrical appliance monitoring sensors, in addition to custom wearable devices which seamlessly integrate together.All of the raw sensor data is collected at a home gateway.At the gateway, the raw data are saved locally, whilst monitoring data are transmitted to the SPHERE Control Centre over a cellular link.After a substantial period (e.g up to 12 months in the current 100 home deployment), the sensor data is collected at the SPHERE Control Centre where it can be analyzed using any desired technique, including semi-supervised machine learning approaches.Numerous features are extracted from each sensor signal and combined to build effective multimodal models for the various applications.

B. THE SPHERE WEARABLE AND USE CASE EXAMPLE
The wearable part of the SPHERE platform is a custom made sensor node for wearing on the wrist [44], with this main board shown in Fig. 5.The base SPHERE wearable sensor is an acceleration-based activity sensor equipped with the Texas Instruments CC2650 System-on-Chip (SoC) for processing and wireless connectivity in the 2.4 GHz band.The device uses the ADX362 as its primary acceleration sensor, and includes an optional gyroscope.
Minimal power consumption is the core design consideration for the platform, with it intended be and forget-central to the SPHERE IoT platform design is that low power consumption is critical for user acceptance and preventing loss of data due to depleted batteries.
We aim for more than one month of battery life, and in some configurations the base SPHERE wearable can operate for more than 990 days [45], essentially eliminating battery charging/changing as a task required by the user.
To reduce power consumption the SPHERE wearable sensor communicates its sensor data over undirected Bluetooth Low Energy (BLE) advertisements.The broadcasting nature of BLE advertisements is leveraged for room-level indoor localization.The advertisements are captured by multiple receiver points in the house, and the received signal strength is used for determining the location of the device.This allows multi-modal sensing of activity and location from the wearable, in addition to the environmental sensors and other devices available in the IoT platform.This IoT platform has now been used in a wide number of studies.For example, to monitor patients that have undergone hip/knee replacement surgery, and to monitor patients before and after a heart valve intervention as part of EurValve: Personalized Decision Support for Heart Valve Disease [46].In this the SPHERE platform and wearable device were used to provide unbiased and quantitative information about the patients' recovery status, overcoming the limitations of patient reported feedback to determine the patient's activities and activity levels while recuperating at home.Unsurprisingly, in this heart-related use case, the clinicians were very interested in heart monitoring, in addition to the activity monitoring of the base SPHERE wearable.To date, to allow this an off-the-shelf PPG wrist-worn device has also deployed.Fig. 6 shows data collected during a controlled experiment over a fifteen minute calibration of the system where the ground truth activity and location are annotated.The data consists of four received signal strength signals, three accelerometer signals from the SPHERE wearable, and one heart rate signal acquired using the PPG wrist-worn device.
The sensor readings in Fig. 6 are collected and analyzed using the SPHERE Control Centre infrastructure.The analysis makes use of multi-modal data fusion and is currently providing useful information for clinicians and researchers.However, as can be seen in Fig. 6, the PPG signal is very coarse as it only provides a heart rate reading once every minute.Additionally, the PPG device has to be recharged approximately every three days.
The work in this paper extends the SPHERE wearable to allow ECG data to be integrated for the first time.The ECG design can easily be incorporated into the existing SPHERE architecture providing more useful information.

C. ECG INTEGRATION
The main SPHERE wearable in Fig. 5 is designed to be expandable to allow new modalities to be added in, and previous works have demonstrated an inductive energy harvester [47], a privacy preservation algorithm [48], and gyrofree motion analysis with two accelerometers [49].
The ECG front end described in Section III acts as a custom daughter board to this main unit.The ECG front-end circuitry is connected to the CC2650 ADC and sampled at 128 Hz.To reduce power we make use of the Sensor Controller on the CC2650 device, allowing us to store the data in a buffer without having to wake up the main processor.The sensor controller has a 2 KB buffer, which provides storage for up to 6 seconds of data, allowing the main processor to sleep for this time, only needing to wake and to collect the data from this buffer and transfer the data over the BLE link.Using the controller in this way allows a significant reduction in power consumption as the microcontroller does not need to wake for each data sample.The estimated power consumption of the ADC and sensor controller in these configurations is  approximately 200 µW.Running the same task without the sensor controller would easily exceed several milli-Watts in power consumption.
To measure power consumption the energy usage was determined by using a Texas Instruments INA226 Power Monitor.For test purposes the system was powered using a 3.7 V battery with 100 mAh capacity and the monitor configured to take 16 bit current samples at approximately 22247 samples/second.The ECG system was set up to take 128 samples per second and transmit approximately 40 BLE messages per second over a full BLE connection.Fig. 7 shows the results of the experiment for a typical 0.5 s period during transmission.
In Fig. 7 the average current is approximately 9 mA.Note that this is the energy usage of the entire system, including the ECG front-end and IoT back-end.In practical use we assume that a heart rate measurement will be performed once an hour each day, and otherwise the system will be placed in a low power idle state.In the idle state, the SPHERE wearable device consumes 3.3 µA [14].Including the front-end idle current, the total idle current is 11.3 µA.
Total battery life will thus depend on the amount of use and number of ECG readings taken.We assume that when performing a heart rate reading it takes between 20 and 30 seconds of data collection for sufficient heart beats to be present to allow accurate estimation.Given this, the average current in one hour, where a 30 s ECG measurement is taken, is thus 86 µA (30 seconds at 9 mA and 3570 seconds at 11.3 µA).Based on these parameters the system can last for an estimated 48 days (100 mAh / 0.086 mA).

V. HEART SENSING PERFORMANCE ANALYSIS A. EXAMPLE ECG
An example of the raw ECG data collected from our new ECG sensor node is shown in Fig. 8.Here the data is shown in its raw form prior to any software filtering, and it can be seen that the SNR is low.This is a deliberate design decision: the system is optimized for longer battery life at the cost of increased noise.In spite of this, the R peaks which correspond to each heart beat can still be clearly seen by eye.Additionally, the location of the T-waves, a morphological feature of  an ECG recording can also be seen, and their locations are highlighted on Fig. 8.This excess noise present is generally easily removed in the system back-end using standard ECG filtering approaches as described below.

B. HEART RATE MEASUREMENTS
To quantify the heart sensing performance of our device we carried out a comparison with a commercially available wearable PPG unit, the Empatica E4 [50].We used a PPG as a reference, rather than an ECG gold standard, as performing simultaneous ECG recordings with different devices leads to them both driving the body.This causes the resulting signal from each of the devices to be different from when each of the devices were connected one at a time.As a PPG unit does not make a electrical connection to the body, it does not affect a simultaneous ECG measurement.
We recruited five participants, aged 23-36, selected through convenience sampling to verify the device operates correctly.The participants were asked to sit stationary at a desk while wearing a SPHERE ECG device and reference PPG unit.Recordings were a minimum length of 6 minutes to allow us to analyze the 5 minute record in the middle after any transients or motion artifacts that may have occurred when the recording was started and subjects were placing their fingers.Each of the five records were processed in Matlab using standard ECG signal processing to extract a heart rate measurement.The below steps were applied on the raw data: 1) The raw ECG data was low pass (F l = 30 Hz), high pass (F h = 0.1 Hz), and notch filtered (F d = 47.5 Hz, F u = 52.5 Hz) using first order zero phase delay (filtfilt) Butterworth filters.
2) The ECG baseline wander was removed using the Discrete Wavelet Transform as described in [51].3) Candidate initial R peak locations were extracted using the Pan-Tompkins algorithm [52].Identified R peaks with amplitudes less than 1.5 times the RMS of the signal, or greater than 9 times the RMS, were discarded.4) The ECG was further smoothed using an extended Kalman filter based around the initial R peak locations as described in [53].5) Final R peak locations were extracted by re-running the Pan-Tompkins algorithm on the cleaned ECG data.R peaks closer together than 0.4 s (150 beats per minute) were discarded.6) A Kalman tracking filter with zero order hold state model was implemented to track the heart rate in the presence of both missing R peaks and additional R peaks due to transient events.showing an example of a high SNR record, and Fig. 11 an example of a low SNR record.These demonstrate the variation in SNR between subjects, and how the signal processing cleans these signals to produce an accurate heart rate estimation.
Fig. 10 shows an example from a record with a high SNR, where the R peaks are clearly identifiable, as are the T waves and some P waves.Fig. 10(a) shows the raw data, and Fig. 10(b) shows the data after the first three signal processing steps have removed high and low frequency components and baseline wander.Fig. 10(c) shows the data after Kalman filtering and R peak detection.In this record the identified heart beats are the same in (b) and (c) as there is little noise present.
In contrast, Fig. 11 shows a sample of the record with the lowest SNR.Again, Fig. 11(a), (b), and (c) show the raw, partly filtered, and fully filtered data respectively.However, in this example there are additional extra heartbeats detected in Fig. 11(b) that are removed in Fig. 11(c).Although some incorrect R peak detections remain, the extended Kalman filter smoothing the data leads to a far more accurate heart rate estimation in this noisy record.
To quantify the performance the R peak locations for each of the five records were converted into a heart rate value, calculated from each 10 s window of data, with an 8 s overlap between windows.These heart rate values were compared  against the Empatica E4, which gives an estimated heart rate value every 2 s.The average result across each record is shown in Table 1.The mean heart rate error within all records is low, at 2.42 beats per minute.For comparison, the accuracy of PPG units for measuring heart rate during exercise is estimated to be approximately 5 beats per minute [54], [55].
Also, note that the PPG gold standard device itself is a wearable unit, subject to motion interference, giving some uncertainly in the actual underlying heart rate.We have estimated the difference between the reported heart rate from the algorithmic output of the Empatica E4 and the actual number of peaks in the PPG trace to be a mean of 2.7 beats per minute across all records, with a standard deviation of 2.1 beats per minute.The new ECG sensor accuracy compares well with this.
The heart rate results are also visualized as a Bland-Altman plot in Fig. 12 where each marker represents the heart rate value taken from a 10 s window of data.The limits of agreement are from 6.2 to −3.6 beats per minute, and do not show any trend for improved (or degraded) accuracy at higher or lower heart rates.

C. HEART RATE VARIABILITY MEASUREMENTS
While many current wearable devices only focus on heart rate, at a fixed average rate the time between each individual heart beat is not constant, it is modulated by vagal nerve and and sympathetic nervous system activity [56].This gives rise to Heart Rate Variability (HRV) measures which are direct markers of autonomic activity and of significant interest in clinical, non-exercise, situations such as myocardial infarction and diabetic neuropathy [56].
Heart rate variability is traditionally measured using five minute epochs of data [56] to allow long term tends to be observed, but can also be calculated on smaller epoch sizes.25 s epochs allow for information reflecting the low frequency and high frequency information bands to be extracted [57], and we make use of this epoch size as a practical one for users to hold their fingers on the wearable devices during use to give information beyond heart rate alone.
There are a wide number of metrics which have been defined for characterizing and assessing heart rate variability [56], [57] and in this work we focus on the four widely used time domain metrics as defined in [56]: • meanNN: The mean time interval between beats.Typical values 787.7±79.2ms.
• SDNN: The standard deviation of the time interval between beats.Typical values 136.5±33.4ms.
• RMSSD: The root-mean-squared value of the difference from one beat interval to the next.Typical values 27.9±12.3ms.
• pNN50: The proportion of intervals where the difference from one beat interval to the next is greater than 50 ms.Typical values 7.5±7.6%.
The examples of illustrative values above are taken from [58].
The calculation of other metrics, particularly frequency domain measures, are left for future work.These metrics are calculated by using the recently released Physionet Cardiovascular Signal toolbox [57], [59] which is intended as an open source tool for the standardized generation of a wide range of heart rate variability measurements.The detected peaks are analyzed in 25 s epochs and HRV estimates are updated every 2 s to match the update rate used with the heart rate in Section V-B.
For both the ECG waveform and reference PPG waveform the detected peaks from Section V-B are used as the input to this.For PPG signals, we note that variability measures are typically termed Pulse Rate Variability (PRV) [60] to account for the minor differences between HRV and PRV as the pulse transit time down the arm varies with posture and blood pressure.Many suggest that HRV and PRV can be considered as equivalent for practical purposes [60]- [62], and in this study we use PPG as the best available modality which will not bias the ECG measurement, keeping in mind that minor differences between the HRV and PRV will be an additional source of error in the reported results.
Table 2 shows the error in each of the calculated HRV metrics for our 5 records, with the mean and standard deviation of the error over time given.The RMSDD and pNN50 are very sensitive to any mis-placed beat detections [57] and as a result have large relative errors and cannot be measured accurately with our current ultra-low-power dry electrode approach.
For meanNN and SDNN the Bland-Altman plot shown in Fig. 13 shows all five records on one plot, plotting the mean and the difference between the new wearable ECG and the reference PPG for each heart rate estimation window.For the  meanNN again no trend in the results is seen, with there being no clear improved or degraded accuracy at higher or lower values of the measurement.The 95% limits of agreement are at 22 ms and −67.67 ms, giving an accuracy within 10% of the mean reading present in all cases.In contrast, for SDNN there is a clear improvement in agreement between the SPHERE ECG and the reference device at low SDNN values, with the agreement being poorer at higher SDNN values.The limits of agreement are 79.67 ms and −41.92 ms.In comparison, previous ambulatory ECG units have shown SDNN limits of agreement of ±32.5 ms [63], and smartphone PPG based sensors of ±31.3 ms [64].
The measurement of HRV parameters at the wrist is an emerging area [51], and there is clearly scope for obtaining significantly better performance, across a wide range of HRV metrics than those present in Table 2 and Fig. 13.Nevertheless, our results demonstrate that it is possible to extract information from the wrist worn wearable beyond heart rate alone.Indeed in many cases, such as in Fig. 8 and Fig. 10, and even in the low SNR Fig. 11, morphological components of the ECG (P waves and T waves) can be identified by eye, showing the added benefit of ECG in the SPHERE IoT platform over PPG heart rate measurements alone.

VI. CONCLUSION
This paper has proposed a new wrist worn wearable for heart monitoring, that is capable of monitoring the user's heart rate via the ECG, with some measures of heart rate variability extracted and morphological components of the ECG waveform observable.The device has been optimized for low power consumption, trading-off with noise performance.The results allow over a month of battery life assuming moderate usage which is a step change for a wearable of this size and weight (50 g including the strap).It includes 3D printed elements to allow personalization if desired, and to ensure the best body contact is made in all cases.Further, the device is designed to seamlessly integrate with the SPHERE IoT system, adding wrist ECG as a new sensing modality to this platform which already captures activity, location, water usage and other modalities from IoT sensors.

FIGURE 1 .
FIGURE 1.The ECG signal showing each heart beat is large when the electrodes are on either side of the heart, and get smaller if the electrodes are placed only on one side of the heart.Note measurements are not simultaneous.

FIGURE 2 .
FIGURE 2. Two electrode ECG front-end design to minimize power consumption.

FIGURE 3 .
FIGURE 3. The wrist worn wearable ECG sensor.(a) Top view of the case with the top electrode for touching by the hand.(b) Bottom view of the case which forms the electrode that is in contact with the wrist, highlighted are the bumps on the electrode that improve the contact through arm hair.(c) Inside view of the case, showing the SPHERE IoT main board and our ECG front-end circuit.(d) Side profile of the watch showing the curvature of the body and the electrode bumps.

FIGURE 4 .
FIGURE 4. Overview of a SPHERE IoT enabled house.Data from a wide range of IoT sensors are combined in a home gateway before being sent to the SPHERE Control Centre.

FIGURE 5 .
FIGURE 5.The SPHERE wearable sensor base board based upon the CC2650 and sized to fit inside a watch case.

FIGURE 6 .
FIGURE 6. Example data from the current SPHERE platform.(a) Heart rate from current PPG unit.(b) Activity classification from accelerometer data.(c) Location detection within house from the Return Signal Strength Indicator (RSSI) of the Bluetooth transmissions.

FIGURE 7 .
FIGURE 7. Example energy usage during ECG collection and BLE transmission.

FIGURE 8 .
FIGURE 8.An example raw ECG trace showing the typical R peak level against the background noise.Here, R peaks can be clearly identified in the time domain.

FIGURE 9 .
FIGURE 9. experimental set up used in this paper.The new ECG wearable is highlighted on the right, showing how the two electrode recording is taken with one electrode against the wrist and the participant touching the other electrode with their other hand.The Empatica E4 PPG device is worn on the opposite wrist to provide a reference heart measurement.

FIGURE 10 .
FIGURE 10.Example ECG of a high SNR recording.(a) The raw data as collected from the SPHERE ECG wearable, highlighting example T and P waves.(b) The data after first 3 signal processing steps, with candidate R peak locations highlighted with crosses.(c) The signal after all the signal processing steps, with final R peak locations highlighted with crosses.All R peaks are correctly detected.

Fig. 10 and
Fig. 11  show two sample recordings taken using the SPHERE ECG device at different stages of signal analysis.They are from different subjects, with Fig.10

FIGURE 11 .
FIGURE 11.Example ECG of a low SNR recording.(a) The raw data as collected from the SHPERE ECG wearable.(b)The data after first 3 signal processing steps, with candidate R peak locations highlighted with crosses.(c) The signal after all the signal processing steps, with final R peak locations highlighted with crosses.All R peaks are detected, with some incorrect detections also present.

FIGURE 13 .
FIGURE 13.Bland-Altman plot comparing the HRV as reported by the ECG and PPG units for each 25 s window of data.This shows how the performance varies as the underlying heart rate changes.(a) mean NN metric.(b) SDNN metric.

TABLE 1 .
Heart rate measurement accuracy.Difference between heart rates reported by the new SPHERE ECG device and a wrist worn PPG reference.All units are beats per minute.FIGURE 12.Bland-Altman plot comparing the heart rate measurements as reported by the ECG and PPG units for each 10 s window of data.This shows how the performance varies as the underlying heart rate changes.

TABLE 2 .
Heart rate variability measurement accuracy.Difference between HRV measures reported by the new SPHERE ECG device and a wrist worn PPG reference.