Wearable ECG Recognition and Monitor
*
DONG Jun 1 XU Miao 1 ZHU Hong-hai 2 LU Wei-feng 2 (Software Engineering Institute, East China Normal University, Shanghai, 200062, P.R. China) 1 (Shanghai Jillion SoftwareTechnology Co., Ltd., Shanghai, 200031, P.R. China) 2 (
[email protected]) Abstract ECG(Electrocardiogram) recognition and monitor are inevitable to trace and determine heart diseases. As self-health being focused on and social medical grade being progressed, ECG monitors with features such as portable/wearable, wireless, use-friendly, low-cost and convenient at home, are more and more necessary. Unfortunately, such kind of equipments couldn’t be got currently. Thus, wearable ECG recognition and monitor instrument is developed. Palm, mobile phone and PC could be acting as display and relay terminals, where ECG signals would be transmitted to service center(e.g. hospital) through GSM/GPRS/CDMA and Internet. After introducing system architecture, the paper describes software design, direct ECG recognition method with morphology parameters based on specialists’ experiences. The first generation product includes wearable monitor and Palm is ready now, which has huge market.
1. Introduction As we know, ECG(Electrocardiogram) recognition and monitor are inevitable to trace and determine heart diseases. For the time being, there are two kinds ECG monitors: general monitor at hospital and Holter which can be used to record 24 hours(or more) ECG data. The recorded data should be displayed and analyzed at hospital by specialists through special software. Unfortunately, they both couldn’t be used to monitor at home. In fact, “monitoring at home” is necessary to grasp patient’s abnormal situation and be presented suggestion by specialist right away. The mobile ECG detector[1] by the aid of wireless communications could be used at home or other emergent case to monitor patients. This paper focuses on system modules, software design and direct ECG recognition method based on specialists’ experiences. Test results are analyzed too.
2. System Modules The general system should include: monitored object(lead lines included), monitor, wireless modules, Plam/mobile phone/PC with GSM/GPRS/CDMA module. It is illustrated in figure 1. The monitored object is patient or someone whose heart needs to be monitored. Monitor is the core module of the system. It is designed specially for detecting, sampling, preprocessing, analyzing is and transmitting real time ECG signals. Bluetooth is a kind of short distance wireless communication protocol that is used to transmit data between Monitor and Palm/mobile phone/PC. ECG data from Monitor are received, stored and displayed in Palm/mobile phone/PC. Users can operate through man-machine interface. Monitored object, monitor, Palm/mobile phone/PC and relative wireless communications construct the basic system. *
Supported by “211” Project and State Key Basic Research and Development Plan(2002CB312001) , P.R. China.
GSM/GPRS/CDMA
Bluetooth Monitor
Palm/
Internet
Mobile phone/
Remote PC
PC Monitored
Database
Object
Server
Figure 1. Architecture overview GSM/GPRS/CDMA based wireless communications between Palm/mobile phone/PC and remote PC in hospital is used to transmit ECG signal to service center such as hospital to get instructions from specialists. Remote PC and database server are located in server center, where more functions than that in monitor exists for specialists to diagnose and answer different patients in time in case of ECG data arriving. Monitor includes ECG signals processing, AD transferring modules, and power, LED directors etc. Its structure is illustrated in figure 2. Through Bluetooth monitor can connect with Palm/mobile phone/PC, which are used to alarm, display and storage.
Lead signals
Pre-filter
ECG-ASIC
Post-filter
Memory
MCU
A/D
Bluetooth
Monitor Palm
Bluetooth
Mobile Phone
Bluetooth
PC
Bluetooth
Figure 2. Modules of monitor The kernel of Monitor is implemented with ECG_ASIC. Memory is designed specially for storage of preprocessed ECG signals and let Monitor act as Holter. ECG recognition and classifier algorithm will analyses QRS wave complex etc. using these data. The exception event will be preserved in memory too. All these data will be sent to Palm/mobile phone/PC through Bluetooth.
3. Software Design Standard 5 leads system is used with 7 generalized signals(vectors), among which 3 signals are primitive, and other 4 can be calculated on the base of former 3 signals. Software architecture is illustrated in figure 3. “Timer interrupt” module judges whether data sampling and Bluetooth are correct. If not, informs “Alarm module”. “Low power interrupt” module responses to “Low voltage (of power) event”. If low, informs “Alarm module”.
Low-level interrupt process Main process ECG sample interrupt
Lead failure interrupt
Low power interrupt
Timer interrupt Alarm Info
Software filter &data process
ECG data
Initilization
Alarm module ECG algorithm Data package
call
Data
Sending buffer
Data
Bluetooth protocol Module
Receiving buffer
Serial port receiving & sending interrupt
Module
Active process
High-level interrupt process
Figure 3. Software architecture “Lead Failure interrupt” module responses to “Leads failure event”, gets leads status(on/off), and sends them to “Software filter & data process” module. “ECG sample interrupt” module responses to “ECG sample finish interrupt”, and sends result to “Software filter & data process” module. “Software filter&data process” module filters 50 Hz signals and other noises for original signals. Then filters signals with 0.5~25 Hz filter and saves the result. If some lead is off, the result is assigned to “0”. “Alarm Module” gives indictors on exceptions and saves valued exceptions. “Data package” module arranges ECD data in “Sending buffer” when the connection being established between monitor and Palm/mobile phone/PC. “Bluetooth protocol Module” is in charge of connection with Palm/mobile phone/PC. “Serial port receiving & sending interrupt” module responses the serial port interrupt communicated with Bluetooth module, reads data from “Sending buffer”, receives data from Bluetooth and saves them in “Receiving buffer”.
4. ECG Recognition Algorithm There are many ECG recognition algorithms by the aid of different approaches such as wavelet,
syntax analysis, mathematical morphology, hidden Markov models, neural network, fuzzy logic, pattern match and knowledge base etc.[2,3] But they can’t be used as automotive recognition method fully because correctness not being able to guaranteed. Even more, complex computing needs more resource that can’t be offered by hand-held instrument such as the monitor described here. In fact, an object can be recognized at different levels[4]—a face can be recognized as a face, but also more specifically as “a male face”, “Tommy Poggio’s face” or “Tommy Poggio’s smiling face”. It has been common in cognitive science to assume that recognition of an object at different levels relies on different computational mechanisms. In particular, it has been proposed that “subordinate level” recognition (identification) is derived from “configurational” judgements, whereas “basic level” categorization(a face? a dog? a car?) relies on a qualitative representation formulated on the presence or absence of features. When specialists extract features from ECG, there is no numeric computing as usual but general recognition and match: (1) Scan ECG, locate P wave, QRS wave complex etc.; (2) Select part of ECG which should be focused on; (3) Estimate altitude, slope, interval between adjacent QRS complexes, duration of one QRS complex etc.; (4) Recognize special morphology, compare with templates and experiences; (5) Compare and make decision. The diagnosing course could be finished immediately depends on the specialists’ imagery thinking which is difficult to be simulated by computer currently. “ECG algorithm” module analyses ECG singals(especially QRS wave complex) and informs “Alarm module” when necessary. Altitude, slope, interval parameters between adjacent QRS complexes were used before[5], but ECG “morphology features”, which is very important parameter, was ignored there. There are over 20 kinds of QRS morphology, part of which are illustrated in figure 4. For example, when only downside wave exists in QRS complex, it is named QS wave, and q, r, s are used to represent relative small altitude of QRS complex.
Figure 4. QRS complex morphology (a)qR (b)QR (c)rS (d)qRs Here, qRs、rS and QRS Incisure(turn points occurs two or over two times along same side of
reference level)are chosen to analyses. If the peak of QRS is positive, it’s large R wave; if negative, it’s large S wave; If large R wave, search turn point in[QRS start point, QRS peak] and [QRS peak, QRS end point], If large S wave, end; Check whether the turn point locates along same side with peak. If the turn point is under reference line, it’s Q;otherwise it’s Incisure. Whether QRS complex is Blunt can be determined through following procedure: (1) Let H = QRS main altitude-0.2; (2) Search point whose altitude is large than H in[QRS start point, QRS end point], counter increase 1 when found; (3) If the counter value is not less than 5, QRS is Blunt. The results could be used to classify. For example, Ventricular Premture Contraction(VPC) occurs when following conditions being satisfied: (1) Large S wave occurs; (2) WWi ≥ 100ms and (QRS with Incisure or QRS with Blunt) (3) WWi ≥ 100ms and RRi < 0.75 RR (4) WWi ≥ 100ms and( APi > 1.5 AP or APi < 0.5 AP ) Here, WWi means wave width, RR means
normal average RR interval of QRS complex,
AP means normal main altitude of QRS complex, RRi and APi mean current values of two parameters above respectively. The Sensitivity and Specificity of VPC are shown in table 1 and table 2. Case No.
SP(%)
SE(%)
106
99.75
85.87
119
93.81
100.00
200
94.78
96.00
201
82.71
89.39
205
100.00
95.38
210
95.59
78.79
213
96.15
89.74
215
98.43
95.42
Summary
95.15
91.32
Table 1. Test results(with morphology parameters)
Eight cases in MIT/BIH with more PVCs are tested here. The definitions of true positive (TP) vs false positive(FP), and of true negative (TN) vs false negative (FN) tachycardia detection are same as used generally. Accordingly, the following definitions are generally applied when examining the performance of detection algorithms: Sensitivity(SE) = TP/(TP+FN), Specificity(SP) = TN/(TN+FP). The reason why SE of case No. 106 and case No.210 are low is those QRS complexes with PVC is a little narrow, and difficult to be distinguished from normal heart rate. SP of case No. 201 is low, for RR interval of some normal heart rate is short, and can’t be recognized correctly. The recognition result with morphology parameters are improved, especially on case No. 213, where RR interval isn’t abnormal, but part of QRS wave has Blunt and Incisure morphology.
Case No.
SP(%)
SE(%)
106
99.75
85.65
119
93.08
99.73
200
98.67
95.71
201
83.49
89.39
205
100.00
95.38
210
95.49
76.97
213
82.05
16.41
215
100.00
93.13
Summary
94.06
81.55
Table 2. Test results(without morphology parameters)
5. Conclusions We have developed the wearable ECG monitor with Palm connected through Bluetooth. Morphology parameters are considered in ECG recognition algorithm. The interface is illustrated in figure 5. The relevant patent(03116539.7) is being issued. First generation product includes monitor, Bluetooth and Palm is ready for sale. Currently, Palm is being replaced by mobile phone(Nokia mobile phone is selected first of all for Nokia series 60 development kits are supplied) and PC to be used conveniently by those who owns mobile phone or PC at home. Then, customers can choice Palm or mobile phone or PC freely to be connected with monitor.
Figure 5. Interface of wearable ECG monitor References [1] Dong Jun, Zhu Hong-hai. Mobile ECG Detector Through GPRS/Internet. 17th CBMS, Bethesda, Maryland, USA, June 24-25, 2004: 485~489. [2] Mahantapas Kundu, Mita Nasipuri, Dipak Kumar Basu. Knowledge-based ECG Interpretation: A Critical Review. Pattern Recognition, 2000, 33: 351-373. [3] Carrault G., Cordier M. O., Quimiou R., Wang F. Temporal Abstraction and Inductive Logic Programming for Arrhythmia Recognition Electrocardiograms. Artificial Intelligence in Medicine, 2003, 28: 231-263. [4] Riesenhuber Maximilian, Poggio Tomaso. Neural Mechanisms of Object Recognition. Current Opinion in Neurobiology. 2002, 12: 162~168. [5] Pan J, Tompkins, WJ. A Real-Time QRS Detection Algorithm. IEEE Transactions on Biomedical Engineering. 1985, 32(3): 230-236.