Development of a Mobile Phone Based e-Health Monitoring Application

The use of Electrocardiogram (ECG) system is important in primary diagnosis and survival analysis of the heart diseases. Growing portable mobile technologies have provided possibilities for medical monitoring for human vital signs and allow patient move around freely. In this paper, a mobile health monitoring application program is described. This system consists of the following sub-systems: real-time signal receiver, ECG signal processing, signal display in mobile phone, and data management as well five user interface screens. We verified the signal feature detection using the MIT-BIH arrhythmia database. The detection algorithms were implemented in the mobile phone application program. This paper describes the application system that was developed and tested successfully.


INTRODUCTION
Nowadays, cardiac diseases are increasing in an alarming rate.According to the World Health Organization (WHO), cardiac disease is one of the leading causes of death in the developing world and is the leading cause in the developed world [1].For these reasons, electrocardiogram (ECG) monitoring and diagnosis system is widely studied.ECG examination is a basic diagnosis procedure to find out if the patients have sporadic heart diseases, such as, arrhythmia and ischemia.Due to the growth of microcontroller and semiconductor technology, new ECG systems of small size and light weight have arrived [2].Recent technological advances in wearable sensor networks, integrated circuits and wireless communication allow the design of light weight, low power consuming sensors at low-cost.Wearable and portable monitoring systems of physiological parameters have been studied by many research groups [3] [4].However, the majority of such health's monitoring devices are not suitable for medical monitoring of high-risk patients.Some of these systems have wireless modules, for instance Bluetooth and Radio Frequency (RF), but the development of local area networks (LAN) in hospitals have not matured yet.But a light and portable type wireless physiological signal-retrieving system has always been a medical personnel's dream [5].A portable smart mobile phone has various functions.In medical fields, a new generation of mobile phones will have an important impact for the development of such healthcare systems, as they seamlessly integrate a wide variety of networks and thus provide the opportunity to transmit recorded biomedical data to a server in a hospital.Consequently, this paper describes the design and implementation of a prototype mobile healthcare application system and monitoring the ECG signals of patients in real-time.

II. METHOD AND MATERIAL
The system receiving block diagram is shown in Figure 1 of which the design and architecture details are explained in the following sub-sections.

A. Software Implementation
Development of software depends on operating system (OS) of mobile device.The emergence of various form of personal mobile device and associated various OS makes it important to make a smart choice based on the application requirements.We developed the portable monitoring system prototype using the SGH-i900 Omnia SmartPhone (Samsung Co. Ltd).This mobile device is equipped with a 624 MHz Marvell PXA312 processor, internal 16 GB storage and it includes a Bluetooth v2.0 interface.This mobile device supported the Windows Mobile 6.1 Professional for Marvell processor.Therefore, this mobile device is suitable for use in this research.

B. Signal Transmission Structure
Bluetooth is an industrial specification for wireless Personal Area Networks (PANs).Bluetooth provides a way to connect and exchange information between devices such as mobile phones, laptops, PCs, printers, digital cameras, and video game consoles over a secure, globally unlicensed short-range radio frequency.The Bluetooth specifications are developed and licensed by the Bluetooth Special Interest Group.It is a www.ijacsa.thesai.orgstandard communications protocol primarily designed for low power consumption, with a short range (1 meter (0 dBm), 10 meter (4 dBm), and 100 meter (20 dBm)) [6].We used the small size (18*20*12 mm), low power consumption, high reliability, and low cost FB155BC (Firmtech Co., Ltd) Bluetooth transceiver module.This device is a Bluetooth specification 2.0-support module that has an approximate range of 10-meters.The ECG acquisition hardware Bluetooth module is configured as a Master, and the mobile phone is considered to be functioning as a Slave.Figure 2 shows the ECG signals flow-chart.

C. Data Management
A display of real-time ECG signals attempted on the screen display and data were saved in memory at the same time.The data were saved in binary format ASCII-code type, and rule of ECG data file name created follow; include Day, Time, a minute, and a second.For example, "xxxxxxxx.ecg" is an example of the filename of the data files saved.Also, the first time measurement of the data generated were saved in new storage folder in base driver at SmartPhone.This ECG data is available for administration through the history and management screen in the application program.It also protects patient information.

D. ECG Signal Processing
Recorded physiological signals usually have an original signal contaminated with noise.The noise is encountered at every stage of data acquisition until the data is digitized.Therefore, power noise, muscular contract noise, electrode movement with signal wandering, and analog-to-digital converter noise all perturb the ECG signals.If an electrode is removed the ECG signal becomes indecipherable.Power line interference noise is electromagnetic field from the power line, which causes 50 or 60 Hz sinusoidal interference.This noise causes problem in interpreting low amplitude waveform like ECG.Hence, many methods have been utilized on the removal of the power line interference in the ECG signals [7].The wavelet coefficient threshold based hyper shrinkage function to remove power line frequency was used in [7], a nonlinear adaptive method to remove noise was used in [8], and subtraction procedure for power line interference removing from ECG which is extended to almost all possible cases of sampling rate and interference frequency variation was used in [9].Power line noise cancellation based on these methods take a lot of operation time, as well as difficult to apply for a real time system.Therefore, we used an Infinite Impulse Response (IIR) notch filter.Though it has short processing time, it does not consider tracking frequency or removing a specific bandwidth rather than 60 Hz peak.This system is indented for real-time processing.The difference equation for this filter is as follows.
 Another type of unwanted signal in ECG is the baseline wander.Baseline wander can be caused by respiration, electrode impedance change and body movements.Baseline wander makes manual and automatic analysis of ECG recordings difficult, especially the measuring of ST-segment deviation, which is used for diagnosis of ischemia.Baseline wander elimination has been addressed in many different ways.The most widely used method uses cubic spline filtering and linear phase filtering for estimating the baseline drift [10] [11].We used baseline wander interference cancellation method based on band-pass sixth order Butterworth digital filter.The transfer function equation of the digital filter is shown below.

E. QRS detection and Heart Rate Caculation
A typical ECG signal of a normal heartbeat can be divided into 3 parts, as depicted in Figure 3 [12], P wave or P complex, which indicates the start and end of the atrial depolarization of the heart; the QRS complex, which corresponds to the ventricular depolarization; and, finally, T wave or T complex, which indicates the ventricular depolarization [13] [14].QRS complex can be identified using general ECG parameter detection method.R-peak is easier to distinguish from noisy components since it has large amplitude.Noise and spike signals appear irregularly in ECG signals.www.ijacsa.thesai.orgAfter the pre-processing method, variable threshold method was used to further detect the R-peak.The formula for variable threshold value is defined as follows.


The threshold makes it possible to differentiate R peak from the baseline, which is corresponding to 70% of ECG peak data detection.We were able to find QRS complex based on the detected R-peak.Detection of QRS complex is particularly important in ECG signal processing.In our system, we used a robust real-time QRS detection algorithm [15].This algorithm reliably detects QRS complexes using slope, amplitude, and other information.The information obtained from QRS detection, temporal information of each beat and QRS morphology information can be further used for the other ECG parameter detection.In order to detect QRS complex, the signal is initially passed through a band-pass filter.It is composed of cascaded high-pass and low-pass filters.Subsequent processes are five-point derivative (Eq.4), square (Eq.5), moving window integrator (Eq.6), and detection.
We computed instantaneous heart rate directly from R-R interval.In clinical settings, heart rate is measured in beats per minute (bpm).So the formula for determining heart rate from RR interval is given below (Eq.7).

A. ECG Pre-processing
Appropriate shielding and safety consideration can be employed to reduce power line noise in addition to analog filtering as discussed in previous sections.After receiving signals at the receiver sides, it is preferred to remove this type of noise in the pre-processing step.Typically, band-stop (notch) filtering with cutoff, Fc = 50 or 60 Hz would suppress such a noise.Figure 4 illustrates the magnitude and phase response of a digital second order Infinite Impulse Response (IIR) notch filter with cutoff frequency of 60 Hz.The frequency of the baseline wander is usually below 0.5 Hz.This information particularly helps in the design of a highpass filter in order to get rid of baseline wander.The design of a linear time-invariant high pass filter requires several considerations, most importantly, the choice of cut-off frequency and filter order.It is important to note that the ECG characteristic wave frequencies are higher than baseline wander.Therefore, carefully designed high pass filters with cut-off frequency 0.5 Hz can effectively remove the baseline.Baseline wander removing was performed using a band-pass sixth order Butterworth digital filter with cutoff 0.7-40Hz.To avoid distortion, zero phase digital filtering was performed by processing the data in both forward and reverse direction.In Figure 5, baseline wander correction using a linear digital filter is shown.

B. QRS detection using MIT-BIH ECG databases
The QRS detection provides the fundamentals for almost all automated ECG analysis algorithm.We tested the performance of the QRS detection on the MIT-BIH database, which is composed of half-hour recording of ECG of 48 ambulatory patients.The ECG recording "103.dat"shown in Figure 6 has been used to validate the algorithm and the following things are observed.The QRS detection algorithm [15] consists of several steps.First, the signal is passed through a digital band-pass filter.The pass band that maximizes the QRS energy is approximately in the 5-15 HZ range (Figure 6 (b)).Secondly, differentiation step is a standard technique for finding the high slop that normally distinguish the QRS complexes from other ECG waves (Figure 6 (c)); The squaring process makes the result positive and emphasize large differences resulting from QRS complexes (Figure 6 (d)); The moving window integration provides the slop and width of the QRS complex (Figure 6 (e)).The choice of window sample size is an important parameter.We choose window of 83 ms (i.e., 30 samples for a sampling frequency of 360 samples/s).Finally, an adaptive threshold was applied to identify the location of QRS complexes (Figure 6 (f), (g)).

C. Wireless Communication Test
Wireless communication module consists of master and slave.The master part transmitted after acquisition of ECG signal and amplification, and slave part received the signal and saved in data buffer.The master transmitted after conversion to digital value for 0 to 255 of the analog signal.Also, ECG hardware system and mobile phone communicate using Bluetooth.When the master/slave wireless module is first connected, the master module looks for a wireless module and attempts pairing for 5 to 10 seconds.If the ECG signal acquisition device and mobile phone are paired properly, the master module provides information to mobile phone wireless module with master address (Master Bluetooth module local address: 001901216B70) and starts the data transmission.The

D. Mobile Application Program
The mobile application program consists of five screen activities.These activities are main view, Bluetooth search view, real-time ECG signal view, signal parameter view, and data management view.Figure 7 shows the application program.The main view is the operation four-function key as shown in Figure 7 (a), each function key is moving to another functional screen and emergency connection button.The Bluetooth view searching to the ECG acquisition device on the mobile phone is shown in Figure 7 (b).Without this functionality the user has to stop the application program and restart the application.After the system connects successfully to the hardware, the visualization of the ECG signal and calculated heart rate graph is shown in Figure 7 (c).In case of not pairing, the program shows "Turn on ECG device" message box on the ECG signal view.A figure 7 (d) and figure 7 (e) is a user optional screen.Signal parameter view display calculated signal parameters: Heart Rate (HR), QRS duration, QT/QTc, PR and RR-interval.Data management view is displayed in case the measurement of ECG data has preserved for information.In order to search the previous ECG data the user has two options, either using drop list or calendar.

IV. CONCLUSIONS
The advances in mobile communication open up opportunities for developing mobile healthcare systems that monitor biomedical signals from patients.We developed such an ECG monitoring device for the advanced personal healthcare system using a mobile phone.The preliminary results showed a successful test of this mobile healthcare application.However, there are scopes of improvement, such as noise reduction, external memory expansion, memory space utilization, inclusion of more diagnostic parameters, and measurement of the physiological signals.Also, we would study the system safety for clinical trials in a variety of conditions.Above all, heart rate is a vital sign to determine the patient's condition and well-being.The heart rate monitoring tool should avoid any wrong results.
Finally, portable mobile healthcare has the potential to reduce long-term costs and improve quality of medical service, but it also faces many technical challenges.In future, more research on the small wireless electrical sensors and data compress technology for healthcare system is needed.The development of mobile health monitoring system would allow basic medical assessment of patients provided by medical staffs.

Figure 1 .
Figure 1.Real-time ECG system block diagram

Figure 3 .
Figure 3.The general ECG waveform

Figure 4 .
Figure 4. Magnitude and phase response of an Infinite Impulse Response(IIR) notch filter to remove 60Hz power line noise

Figure 6 .
Figure 6.An example of QRS detection: (a) original ECG signal; (b) bandpass filter; (c) derivative; (d) square; (e) Moving window integrator; (f) QRS complex detection (X-axis: samples, Y-axis: amplitude) ijacsa.thesai.orgdevice pairing success rate was around 85%, and the system requires initialization time for data buffer and screen display for 3 to 5 seconds.Communication test results between devices are shown in Table1.We tested 20 cases.The master and slave module of average Pairing Time (PT) are 783 ms; ECG Signal Transmission Time (ECG STT) is 355.75 ms.

Figure 7 .
Figure 7. Mobile Phone Configuration: (a) monitoring system main view; (b) wireless connectionl; (c) real-time display of the ECG measurement; (d) the ECG parameters calculation value; (e) data history and management

TABLE I
a. PT: Pairing Time, STT: ECG Signal Transmission Time (msec)