Wearable RealTime Heart Attack Detection and Warning System to Reduce Car Accidents in Qatar
Authors: Chowdhury Muhammad E.H. , Ali Alzoubi Khawla , Khallifa Ridab Awad Hamid , Abouhasera Rayaan Khalid , Koubaa Sirine 
Published: June 2019

Introduction Fatal car accidents have become an alarming issue all over the globe. A sudden medical condition such as a heart attack causes medical symptoms that lead a driver to lose consciousness while driving and consequently leads to a crash. Many studies have demonstrated the high correlation between the driver's sudden medical conditions and involving in a car crash [1][2]. Therefore, to reduce car crashes from the driver's sudden illness from heart-attack as well as save the driver's life in a timely manner, in this work, we discuss the development of a portable wearable system that can continuously monitor the driver for any early symptoms of heart attack and inform him before losing conciuous to stop the car as well as inform medical caregivers to save life. Background Myocardial infarction (MI) is the medical term for the medical condition commonly known as a heart attack, a serious medical emergency in which the blood supply to the heart is suddenly blocked, usually by a blood clot, leading to damage heart muscle [3]. A complete blockage of a coronary artery is a ‘STEMI’ heart attack (ST-elevation MI), whereas a partial blockage would be a ‘NSTEMI’ heart attack (a non-ST-elevationMI) [4]. The average, resting heart rhythm has a QRS-complex following a P-wave and followed by a T-wave, as illustrated in Figure 1(a). A STEMI heart attack will cause an elevation in the ST-complex (Figure 1(b)), whereas a NSTEMI heart attack would not signify ST elevation, but nonetheless can cause ST-segment depression or T-wave inversion (Figure 1(c)), which can be detected immediately by a real-time device to save the driver's life. Method The prototype system consists of two subsystems (Figure 2) that communicate wirelessly using Bluetooth low energy (BLE) technology: wearable sensor subsystem, and an intelligent heart attack detection and warning subsystem. Wearable Subsystem: The wearable chest-belt sub-system includes dry electrodes (reference and two electrodes for differential acquisition), analogue front end (AFE), power management module, and RFDuino microcontroller with BLE. This subsystem acquires the ECG signals from human body continuously and sends these raw measurements wirelessly using BLE technology to the intelligent subsystem. Reusable and smaller dimension dry electrodes (Cognionics, Inc) were embedded in a chest belt to be worn by a car driver. AD82832 AFE is an integrated signal conditioning block to extract, amplify (60 dB gain), and filter (0.48-41 Hz) ECG signal in the presence of noisy conditions. Lithium Polymer (LiPo) battery of 3.7 V (1000 mAH) with the Microchip MCP73831 charge controllers, and Texas instruments' TPS61200 voltage regulators to supply 3 V to the wearable system. The miniaturized ARM Cortex M0 RFDuino microcontroller digitizes the signal at 500 Hz sampling rate and transmits the acquired signal through built-in BLE to decision making subsystem. Intelligent Decision-making Subsystem: This subsystem will receive the ECG signals from the wearable subsystem continuously. It is capable of processing, analyzing the received ECG signals, and making the right decision using support vector machine (SVM) algorithm to classify the normal and abnormal ECG signal to detect heart attack symptoms. This subsystem was built around the single board computer, Raspberry Pi 3 (RPi3) along with SIM 908 GSM and GPS module for location information and alerting service. Multi-threaded python code was written for RPi3 to automatically acquire, buffer, baseline correction and digital smoothing and analyse the ECG data. SVM algorithm was implemented in RPi 3 and used for real-time abnormality detection using the trained model and classification was done using LIBSVM, an open source library [5]. 4-fold cross-validation was used to evaluate classification accuracy. SIM908 GSM+GPS shield attached on the RPi3 to provide car location (latitude, longitude) and to connect to the mobile network for generating an automatic call to medical emergency. This subsystem is designed to take power from the car battery using Cigarette Lighter Socket, which powers the system only when the car's engine is ON. To develop the intelligent program for decision-making subsystem, public MIT-BIH ST change database [6] was used to train a SVM model for normal, ST-elevated, and T-inverted ECG-beats with the time domain (TD), frequency domain (FD) and extended time-frequency domain (TFD) features extracted. The TD features mean, variance, skewness, kurtosis, and coefficient of variation and the FD features spectral flux, spectral entropy and spectral flatness were calculated to spot abnormalities in the ECG-beats. Three time-frequency (TF) distributions were also used in this study: Wigner-Ville Distribution (WVD), Spectrogram (SPEC), and Extended Modified B-Distribution (EMBD). Result and Discussion Recorded ECG Traces: It was clearly revealed from Fig. 5 that the ECG signal transmitted using the prototyped system is in clinical grade. Training SVM: Five hundred traces from each patient and total 2500 traces from MIT-BIH database having either normal or abnormal heart rhythm were segmented and averaged for each case (Figure 6 (A, B, & C)). The power spectral of the signal in Figure 6 (D, E & F) shows that the power spectral density peaks appear at different frequencies for normal and abnormal ECG signals. This reflects that the FD feature can help in classifying the ECG signals. However, TD, FD, and TFD features provide an insight on the signal while compensating for the noise or motion artefacts. Classification using SVM: Table 1 below summarizes the accuracy of the prototyped device. EMBD produces higher accuracy in classification of ECG signal. Conclusion This work shows the possibility to detect driver's heart attack reliably using the developed prototype system. SVM machine learning algorithm that was trained with a sufficiently high number of training data can classify STEMI or NSTEMI with approximately 97.4% and 96.3% accuracy respectively when the extended TF features (with EMBD distribution) were used for training and classification. The maximum current drawn by the wearable chest-belt subsystem during continuous acquisition is 9.3 mA, which ensures the life span of a 1000 mAh LiPo battery is 75 hours, once it is fully charged and therefore it can be expected that the device can run longer without requiring recharging daily.