A Low Cost Remote Cardiac Monitoring Framework for Rural Regions

Cardiovascular diseases in rural developing countries take a large toll of human lives, due to inadequate quality health care facilities and their limited reach to the patients. The burgeoning population of developing nations make the linear organic scaling of health care facilities impractical to cater the diverse rural geography. Hence it is imperative to scale the health care facilities through wireless communication technologies in an affordable manner. Timely analysis of ECG data is critical for early diagnosis and treatment of several cardiovascular diseases. With this aim, a wearable wireless ECG monitoring framework, named as Amrita-Spandanam was designed. This framework consist of a patient wearable device and a patient smart phone with Amrita-Spandanam application, enabling a doctor/hospital to monitor the remote patient through his internet connected mobile phone or web browser. The framework does the post analysis of the ECG signal using a backend server to disseminate warnings to the doctor and the patient. Several de-noising algorithms were applied to the acquired ECG signal prior to this post analysis. The framework was implemented successfully enabling real time remote monitoring of the cardiac patients in rural villages.


INTRODUCTION
Globally an estimated 17.3 million people die of Cardiovascular diseases.The larger percentage of this is from the developing nations.With coronary heart disease attributing to one fifth of Indian deaths, with an estimated 45 million coronary heart patients, it is expected that by 2020, it may account for one thirds of all deaths.These problems are aggravated by several factors unique to developing nations.

• High population and population density
• Large rural population (56% according to UN, 2007) • Limited rural reach to hospitals (poor connectivity) • Limited number of quality healthcare institutions • Limited number of trained doctors

• Expensive healthcare
• Limited reach to expensive medical equipments Hence it is prudent to improve the rural healthcare reach based on wireless wearable technologies such as body area networks.Thus a wearable wireless cardiac ECG monitoring solution is envisioned to fit the following operational scenarios of cardiac patients.
• Fast discharge of the patient from ICU (Intensive Care Unit) • Low cost continuous monitoring like holter systems.
• Remote real time patient monitoring from home • Enabling the monitored patient to be mobile • Enable the timely capturing of the critical ECG when the patient experience the discomfort • A solution suitable for daily use, where the patient is intermittently monitored automatically • Backend Analytics with multi-patient data and warning dissemination Reference [2] and [1] implements a similar system, where [1] uses a wired connection to a PDA which then transfers the ECG data through GPRS mobile link.Reference [2] is bluetooth based and QRS complex morphology is extracted and analyzed.Reference [4] uses a novel approach of implementing a single active cable and intelligent electrodes, though using FPGA making this enhancement difficult for rural low cost deployment.Reference [3] envisions a similar design, though more focused on the context aware aspect of the patient using the accelerometer sensor.
Amrita-Spandanam (Amrita-Pulse), a wearable wireless framework is architected with a vision of low cost, small sized lightweight wearable profile, with at least a day of battery endurance, acceptable quality of medical measurement, wireless connectivity through 2G/3G/WiFi wireless networks and accessibility through web/mobile applications.

OPERATIONAL SCENARIO
In a typical operational scenario there are a number of patients who need to be monitored remotely through Amritaspandanam by a number of Doctors/nurses.Each patient is provided with a wearable battery powered wireless ECG device which he/she may wear as necklace or placed on the waist.The wearable ECG device connects to a remote analytical storage server through the patients' smart phone (via Bluetooth) which is connected to internet through 2G, 3G or WiFi.The smart phone does a preliminary ECG analysis to warn the patient of the arrhythmia cases specifically when internet is unreachable.The analytical storage engine does the backend storage and the signal processing of the acquired ecg live streams before performing the required analytical diagnostics algorithm over the stream data.The server intimates the doctor, patient and the hospital monitoring service about the potential abnormality in the ECG.The doctor/hospital monitoring station may choose to connect to the server for the live ECG stream on their smart phone/tablet or on a browser based web client.
The doctor could further trigger an alarm to the patient about the criticality of his condition and further course of action.Pervasive and affordable mobile computing through cheap android smart phones coupled with wide rural mobile coverage and progresses in Big data analytics has enabled this scenario to be pragmatic.

SYSTEM DESCRIPTION
The Amrita-Spandanam framework, consist of following components with the described functionalities.
• Wearable Wireless ECG acquisition device  The detailed architecture of each of these components is detailed in the below sections.

Wearable System Architecture
The Amrita-Spandanam wearable device is a lightweight ECG acquisition hardware and firmware, built into a wearable profile.This device is required to acquire the ECG data from the human body through electrodes, digitize it and stream it to the patients smart phone upon commands from it.The device should operate in aggressive power save modes for extending battery endurance.
ADS1292 ECG analog front-end from TI is used for analog 3 lead ECG acquisition.ADS1292 is custom tailored for ECG acquisition with two 24 Bit, 8Khz, simultaneously sampling differential ADC and RLD (Right leg drive) for minimizing noise.An internal PGA (programmable gain amplifier) enables dynamic gain adjustment for optimizing the dynamic range.The device also provides with a facility for lead-off detection.The chip interfaces to the microcontroller (MSP430) through an SPI interface.The firmware running in the microcontroller is required to configure the  A standard lithium-ion 3.7v, 890mAH battery is used as the power source.Provisions for USB charging of the battery is provided.Standard unshielded thin ECG cables are modified to fit into the Amrita-Spandanam casing.

Andriod Application Architecture
The Amrita-Spandanam ECG device need to be controlled through a master smart phone for its operation.An appropriately designed mobile application residing in the patients' smart phone configures the wearable device with appropriate acquisition parameters such as gain, sampling rate, lead-off detection etc and also acquire the ECG data stream through the Bluetooth framework.Further it connects to the backend server through internet and relays the ECG data after some minor signal processing.The doctors' side smart phone also need to have the necessary mobile application to enable ECG visualization to the doctor.The basic blocks of the Android application is listed below.

Background Service
This android service awaits in a listening mode for triggers from the bluetooth and the network interface of the smartphone.This trigger can be an alarm from the remote server or trigger from the wearable device, to start streaming the ECG data.This background service can also intermittently acquire the ECG data for analysing potential anomalies.This service being in the background, do not affect the normal operations of the smartphone.
In case of the doctor's smartphone, this service receives the intimation about a potential ECG anomaly from the server.This will raise a pop-up dialog and alarm to the doctor so that he/she may chose to view the real-time ECG stream for further inspection.This is done by the service triggering the launch of foreground visualizer activity.

Streaming/Protocol Engine
This component is used by the background service to encode/decode the communication protocols between the smartphone, the server and the wearable device.The protocol abstraction enable independent scaling of these components.

Foreground Control-panel Activity
This foreground activity is launched by the user (patient/doctor) to configure various settings for the background service.

Foreground Visualiser Activity
This activity is responsible for displaying the ECG data in the patients' and doctors' smartphone.The drawline API of the Android canvas 2D framework is used for plotting.Standard ECG conventions of 25mm/sec and 1mV/10mm is used to derive scales for the ECG display.Appropriate interpolation/decimation filtering needs to be performed for accommodating various screen resolutions, screen-sizes and sampling rates.

ECG signal processing Engine
This engine provides with the required java routines for interpolation, decimation, ECG post processing filters, and heart rhythm computation, required for preliminary analysis in the mobile side.

Analytical storage/Streaming server and Websockets Proxy
The backend server acts as the communication hub for this architecture.The patient's mobile which is the source, the doctor's mobile which is one of the sinks and the browser based web-client from a hospital monitoring station which is another sink, all could connect to this backend server.The server acts as a middleware which post process and analyze the incoming ECG stream from the source, and then relay it to all sinks corresponding to appropriate patient.The server could handle multiple source/sink streams for different patient/doctor pairs.
Various sub blocks of the server is listed below.
• DSP Engine : Performs post processing on the source ECG stream • Storage Engine : Performs ECG stream storage as files • Analytics Engine : Performs various diagnostics analytics over the ECG stream • Web sockets proxy gateway : Enable JavaScript web clients to connect to the server The analytics engine is a scalable engine which can be a simple arrhythmia analyzer or a complex cardiovascular diseases detection algorithm.The current system has implemented only arrhythmia detection, leaving further analysis to the doctor through manual inspection of the live ECG stream.

ECG SIGNAL PROCESSING
The ECG signals acquired will have contributions to it, from a number of noise sources.It is important to post process them, before performing any analytics over them.For better battery performance the wearable device is relieved from any signal processing activities.These processing are done either at the smart phone side or the server side or both.The various noise sources contributing to the ECG signal is listed below.

• Instrumentation noise
Various filter are designed using MATLAB to mitigate most of these noises.The base ECG data is taken from the MIT-BIH database.Further these MATLAB algorithms are ported to java and C to enable their use in android smartphones and the backend server.

Unprocessed Raw ECG data from Amrita Spandanam
The unprocessed time domain signal and its spectrum is shown in 6.The baseline wandering, 50Hz power line noise and other high frequencies noises can be easily observed.The time domain and frequency domain plot of raw ECG signal is shown in Fig. 6 and Fig. 7 respectevly.

Power line interference removal
A two tap IIR notch filter at 50Hz is implemented using direct form-II realization.The filter's frequency response is shown in the Fig. 8.The ECG signal spectrum after passing through the notch filter is also given Fig. 9.

High Frequency EMG Noise Removal
The high frequency EMG noise is removed using a 7 tap low pass filter of 100Hz cutoff, realized using direct form-II implementation.The frequency response and output from the filter is shown in Fig. 10.

Heart Rate extraction
The derivative of input samples are computed for a period T1 and its peak P determined.70% of the peak is taken as the threshold for deciding the R-peak.Average R-peak time index intervals (RR Interval) are computed for a time duration of T2.Using this average RR interval and the sampling rate, heart rate can be computed.The peak and hence threshold is recomputed on each iteration.

INTEGRATION AND TESTING
The Amrita-Spandanam device is fabricated as a wearable belt solution as shown in the Fig. 16.The ECG cabling for a four wet AgCl electrode scenario is made using the standard 3.5 inch audio stereo jack.Two push buttons and a reset button assisted with 2 RGB LEDs and a buzzer provides a sufficiently flexible user interface for the patient apart from his android phone.The test setup of developed hardware is shown in Fig. 14.Low power modes of the bluetooth module and the processor is exploited for extended battery life.
An ECG display app is developed for both doctor and the patient.A control panel in the app configures the ECG device and server settings.A 3G connection is used to stream the ECG data to the server.A simple TCP socket based server program is implemented on a Dell server.A websockify proxy server is also installed and integrated for HTML websockets based web access of the live ecg stream.The ECG plot in web browser is shown in Fig. 15.

CONCLUSIONS
A wireless remote ECG monitoring framework, Amrita-Spandanam, which enables timely healthcare reach for cardiovascular patients in rural area, especially in developing countries is implemented and tested.The framework is able to capture, process, store, transmit, analyze and visualize live ECG streams from a conveniently placed device worn  More complicated diagnostic analytics can be performed for various cardiovascular diseases, so that better warning accuracies can be achieved.Future advancement to the system should be made in line with [5] using P-FCB (planar fashionable circuit board) and flexible PCB technology implementing dry fabric integrated design to enable comfortable wearing and ease of use.

Figure 7 :
Figure 7: Frequency spectrum of raw data.

Figure 9 :
Figure 9: Frequency response of filtered signal.

Figure 10 :
Figure 10: Magnitude response of low pass filter.

Figure 11 :
Figure 11: Magnitude response of high pass filter.

4. 4
Baseline wandering, Loose contact, Motion artifact removalThese noises are removed by using a two tap high pass FIR filter of 0.5Hz cutoff, realized as direct form II. The frequency response of the designed filter is shown in Fig.11.