A number of physiological systems in the human body generate a wide variety of signals with different natures, the monitoring of which can provide us with highly useful information about their usual functioning and changes in health state. Among the most widely known of these signals are the bioelectric potentials associated with muscle activity and the nerve conduction potentials [1
]. In order to monitor the signals generated by the cardiac muscles, many systems have been developed to support the diagnosis and treatment of patients with heart diseases, which are intended either for medical practice or for disease research. Several techniques have been recently developed to improve the acquisition and to display the electrocardiogram (ECG) signals, and are increasingly focused on use on cellphones, and they are called here mobile ECG systems. However, these proposals sometimes correspond to partial solutions in terms of the available mobile technology at that moment. Current electrocardiography often works in two ways, namely, with the recording of a 12-lead ECG during 10–20 s and with the recording of 2–3 leads during 24 h in the so-called Holter monitoring, and this last one is currently being extended to 7-day and longer Holter monitoring. Mobile ECG systems so far only partially achieves some of these applications. In addition, it is usual that signal processing, both in conventional and in mobile ECG systems, is made in stages close to the application stage, and not close to the recording and pre-sending stage. However, compression processing in the later ones would be an interesting option in some cases. And finally, long-term monitoring in current ECG mobile systems is often constrained by memory issues, by transmission issues, or by both.
A scenario that requires specific solutions is that of health care facilities in rural areas of developing countries. The lack of medical specialists and the limited bandwidth offered by cellular networks in these areas make it necessary to design telemedicine systems specially adapted to this reality [2
]. Although the number and configuration of leads or the recording duration can be improved in existing systems, both characteristics may not be jointly necessary, as a 12-lead ECG is usually taken during some few seconds in controlled conditions, whereas a Holter requires 2–3 leads for some hours or days in ambulatory conditions. Nevertheless, a mobile system providing both of them can have advantages in some aspects such as simplicity or versatility. According to the previous considerations, we propose here a prototype of an ECG mobile system, based on the STM32F microcontroller, which provides us with long-term Holter monitoring and high-resolution 12-lead ECG recording, and this same architecture also enables us to make efficient compression processing close to the acquisition stages. In our implementation, the prototype measures the ECG signals from 10 electrodes on the patient body and generates the 12 ECG leads with simple mathematical processing. Alternatively, it can measure 2 or 3 leads with a different set of cables in a patient during several days. This data is sent via Bluetooth to the cellphone to be displayed and then to a web server for remote monitoring. The system allows the real-time execution of compression algorithms using filter banks as an implementation example, and it also allows the system to send the ECG information through narrow communication channels. The use of this lossy compression algorithm has shown the ability to considerably reduce the required bandwidth (especially useful in rural areas of developing countries), and the quality of the ECG signals subject to compression has been checked in the present work to be clinically valid. On the other hand, Holter devices usually work with two or three leads, but it could still be advantageous to use a flexible single system capable of doing both a 12-lead ECG and a 2- or 3-lead Holter by simply changing the the set of cables, rather than acquiring two separate devices, as long as such a design does not degrade the system characteristics, such as weight, size, price, or battery consumption.
This paper is organized as follows. Section 2
summarizes a compendium of related works in the field of mobile systems previously proposed for ECG monitoring, which can be seen as related precedents of the current proposal. Section 3
provides the description of the general architecture of the proposed and developed prototype, which includes the acquisition and storage modules, the cellphone, and the web server. Section 4
presents the general software architecture, emphasizing the acquisition software, the cellphone software, and the web server software. Section 5
shows several performance tests (storage, power consumption, data quality, compression rate, and calibration with respect to commercial electrocardiographs). Section 6
gives the results with recordings from simulators and patients when evaluated by the clinical staff. Finally, Section 7
summarizes the conclusions.
2. Previous Related Works
An increasing number of ECG-recording mobile systems is emerging every year. Several of these proposed systems in the literature used 3 leads taken from the patient to generate the 12 leads by subsequently using processing techniques in the cellphone, but the obtained ECG sometimes exhibited waveform distortion and time cuts on the rebuilt signals [3
]. Many projects have used Arduino™ modules for signal processing, and the data were then sent to the cellphone, so that the patients could observe their ECG signal in real time at any place [4
], though often limited to one single lead. Applications for Android™-based mobile devices have been developed for real-time ECG monitoring and automated arrhythmia detection by analyzing the ECG parameters from a single lead [5
]. The Advanced RISC Machine (ARM) microprocessor STM32A was used to implement a telecardiology system using a mobile 7-lead ECG device, and to provide a 24 h health monitoring service. The use of 7-lead wires has been proposed to help collect enough ECG data to guarantee the detection accuracy without impairing the system mobility [6
]. This same idea was extended [7
] to incorporate a system-on-chip in the prototype, the so-called CardioChip, for the acquisition of ECG signals, which was a single-channel, low-power, small-size ECG application-specific integrated circuit, designed for personal mobile applications. In addition, the algorithms developed in a personal computer (PC) for R-peak detection and respiratory rate analysis provided with satisfactory sensitivity and precision, according to the authors.
Current mobile technology is at an increasingly mature stage, hence it offers new possibilities. Commercial discrete components, such as on-chip operation amplifier MSP430FG439 and the Bluetooth system-on-chip CC2540, were used in the portable ECG prototype in [8
], where a cellphone based on an Android™ system provided a communication gateway. Therefore, the ECG data could be easily transferred to the remote doctors via 3G-mobile communication networks with 1 KB/s bandwidth. Other prototypes have used a Peripheral Interface Controller (PIC) for ECG monitoring using an Android™ mobile phone and Bluetooth. In [9
], one single lead was digitized with a 10-bit Analog-to-Digital Converter (ADC), processed in the PIC, and sent to the cellphone for viewing. Another basic ECG mobile system was recently implemented with the filtering and conditioning modules for a single lead with instrumentation and operational amplifiers [10
]. The ECG signal digitization was made with an Arduino™ board, and this signal was sent to the cellphone via Bluetooth. Multiple-purpose ECG acquisition systems have also been designed to analyze the stress, often considering a single lead and processing the signals in the cellphone [11
]. The use of basic microcontrollers of the STMicroelectronics™ family in ECG prototypes is common nowadays [12
]. In [13
], a single-lead portable ECG prototype was implemented by using the STM32L476xx microcontroller, which was used for control purposes and to send the ECG data to the user. The NXPLPC1768 microcontrollers of the ARM series were used to design a 12-lead wireless ECG device using the TI ADS 1198 front-end amplifier [14
] and to visualize the data in the PC without using a cellphone [15
Many innovative projects applied to remote sites face difficulties that are due to the communication availability at the rural areas is not constant [16
]. In rural areas, the coverage of cellular networks is very poor and many problems arise there for allowing robust and secure communications. It has been estimated that 89% of the world’s urban population will have third generation (3G) or Long Term Evolution (LTE) coverage by the end of 2019, whereas the situation is different for the rural population, as only 29% are expected to have 3G coverage by that date [17
shows a detailed performance evaluation in terms of the number of leads, the use of a cellphone, the implementation of parameter detection subsystem, the use of Internet cloud, compression capacity, noise, input range, power consumption, CMRR, noise, input impedance, and sampling rate. These parameters allow a direct comparison with state-of-the-art prototypes and systems recently proposed in the literature, as well as a justification for some of the features addressed by our system.
4. Software Architecture of the Flexible 12-Lead/Holter Prototype
The software architecture of the flexible ECG/Holter prototype has three levels that are handled by their respective hardware. This section describes the applications at the microcontroller, at the cellular, and at the web application levels. All the software used in the higher (cellphone, web) and in the microcontroller levels of the prototype is free (see [26
]). The application at the microcontroller level was developed with the Micro C software for ARM, whose license was acquired specifically for this work.
4.1. Acquisition Module Software Architecture
The development software Mikro C PRO for ARM was used to program the software application of the acquisition module. The application contains the instructions that the STM32F microcontroller executes to manage the ADS1198 acquisition module, the storage in the MicroSD, and the Bluetooth module to communicate with the cellphone and to execute the compression algorithm. Micro C PRO is a low level software developed by MikroElektronika company for the family of ARM microcontrollers. This software was selected due to its versatility to handle the control ports of the ADS1198 IC, which perform the signal acquisition from the electrodes connected to the patient. The acquisition module application has mainly two operation modes, namely, online and disconnected modes. Figure 5
shows the application flowchart for both operation modes. The disconnected mode allows the acquisition module to work autonomously. Once this mode has been selected in the app, the acquisition module works autonomously without the cellphone. In this operation mode, the selected signals can be stored in the 4-GB MicroSD compressed or uncompressed (by default). The online mode allows one to send the signals to the cellphone via Bluetooth.
The evaluation of compressors was performed out in terms of compression capability and quality of the reconstructed signal [27
]. The Compression Ratio (CR) informs of the bit reduction, and it is calculated according to
are the number of bits needed for the original and the compressed signal representation, respectively. The most usual parameter to measure the quality of the reconstructed signal is the Percentage Root-mean-square Difference (PRD), which is defined as
is the original ECG signal and
is the reconstructed one.
In order to compress the ECG signals, we implemented a filter bank technique, which uses criteria similar to those of MPEG1 to process the audio signals by dividing the working band into subbands. The technique of Nearly-Perfect Reconstruction Cosine Modulated Filter Bank (N-PR CMFB) was proposed in [28
], and it was implemented here with an algorithm in the acquisition module program. The algorithm runs continuously with the 1024-sample ECG blocks that are obtained from the patient when the prototype works in compression mode. The algorithm performs the decomposition into 16 subbands to each 1024-sample input block with an N-PR CMFB, as well as the thresholding of the subband signals to guarantee the quality of the recovered signal. The implementation of an N-PR CMFB with M
channels of maximum decimation where all the analysis and synthesis filters was obtained through the modulation of a low-pass prototype filter. The filter bank logic contains an analysis filter bank represented by an analysis matrix, which allows one to decompress the original signal in bands, and a synthesis filter bank, represented by a synthesis matrix. The coefficients of the analysis and synthesis filters were obtained in [25
], starting with a low-pass filter prototype. The analysis and synthesis matrices had sizes 16 × 192, and they were used in the compression algorithm implemented in the software of the prototype acquisition module.
The target PRD was established a priori for this work to be 5%. The applied thresholding is dependent on the target PRD, as explained in [25
]. Once the corresponding thresholded signal is obtained, the resulting samples are entropy-encoded as proposed in [25
]. The significant coefficients are grouped and encoded with 8 bits per sample. A significance map is generated assigning ‘1’ to the significant coefficients and ‘0’ to the others. The map is then organized as a set of 8-bit integers. This map and the significant coefficients are stored or transmitted through the corresponding communication media.
4.2. Cellphone Software
The cellphone application was developed using the Eclipse™ software ( Ottawa, ON, Canada), which has a friendly graphical interface for developers. Eclipse is a generic application that allows the user to program in several languages. A plug-in for Android™ can be installed, and the SDK with the available Android™ (Baltimore, MD, USA) version can then be used. The application controls the acquisition module and graphics on the cellphone screen, and it runs the operation modes of the acquisition module through the buttons on the main screen of the graphic interface. If we are working without compression, the cellphone receives the information of the acquisition module, which is processed to separate each of the ECG signals from the 12-lead bitstream, and finally they can be continuously and simultaneously shown on the cellphone. The communication protocol used to transfer data via Bluetooth is formed by a 12 signed-integer array of 2 bytes, corresponding to the data of the 12 leads and the package header with identifier 241. The communication protocol to transfer data from the cellphones to the Internet uses a cloud package, consisting of a floating-point data matrix with 320 × 12 elements, where each column corresponds to a lead. The cellphone application converts into mV each time a lead data arrives from the acquisition module, shows it on the screen, and stores it in the corresponding position. Once the matrix on the cellphone application is full, data are sent to the web server. The generated traffic is 15,360 bytes per second. Each datum has a four-byte length. These 320 data are taken in 1.25 s, so the online transmission has a delay of 1.25 s. Note that this internal protocol is inserted inside the transmission control protocols ensuring secure and errorless wireless communication. In addition, the cellphone sends the information to the web server when the online button has been activated. If we are working with compression, the cellphone passes the compressed information from the acquisition module to the web server. In the disconnected mode, the cellphone configures the parameters of the operation module and then disconnects.
This application has four modules: (1) the Bluetooth connection module, which establishes the communication between the cellphone and the acquisition module; (2) the ECG signal reception module, which performs the management of the data coming from the acquisition system; (3) the signal processing module, which here only performs the scale adjustment; (4) the display module, which calls the Eclipse™ display routines. Figure 6
a shows an application flowchart. The graphical interface of the application represents the signals obtained in two modes, namely, the default mode, which shows one lead signal in the screen, and the connection mode, which displays the 12-lead ECG on the full screen. Figure 6
e,f shows the 12-lead ECG on the full screen and the selected lead on the screen, respectively. The application has a local database to store patient information, and it assigns a unique identifier (ID) for each patient. Figure 6
c shows the fields of the database. The recorded signal is stored in a plain file into a database on the mobile device memory, and the records can be viewed later from the registration list corresponding to each patient signals. The generated plain file conveys the patient ID, the date and time of the signal recording, and the sequential number of that corresponding signal. Figure 6
d shows the register storage in the cellphone. The database is synchronized with the database of the web server when an online connection is made for patient monitoring purposes. The database allows one to search for the patient register. In addition, the application records the ECG signals for the required time periods and reproduces them on the cellphone screen under the user request.
4.3. Web Server Software
The web server application is responsible of providing online access for medical review. This application performs several front-end and back-end functions, namely, registration of user personal data, classification of user types, registration of clinical data from patients, user authentication, information management according to user permissions, display of performed examinations, and permanently available interface on the Internet.
The web server application uses the database server and the model view controller (MVC) for efficient management of remote users and database access. The database stores the clinical data and the 12-lead ECG signals from patients. The web server application was installed on the web server with the domain http://www.ecgholterurjc.com:8888/ECGBDD
provided by the web hosting service. The application has two operation modes: (1) The uncompressed mode receives the 12-lead ECG signals information to depict them on the server screen or remote user screen. (2) The compressed mode receives the compressed information of one-lead ECG to plot it on the remote or local user screen.
The application can display either the 12-lead ECG signals on the screen simultaneously or only one single ECG signal on the screen. Figure 7
a,b show these two display modes of the ECG signals on the web application. The application has three forms of navigation according to the user type (doctors, patients, or managers). Each user has an account to access to the system, and these accounts are managed by the application administrator.
7. Discussion and Conclusions
In this paper we presented the design and implementation of a flexible 12-lead/Holter ECG prototype with visualization interface in the cellphone and remote transfer to a web server for remote access. The prototype has the ability to function in a flexible form as a Holter and as an electrocardiograph thanks to the designed hardware architecture, and providing the prototype with the ability to deliver ECG signals with high clinical quality. Our system is flexible enough to combine the processing power of the prototype, with that of the cellphone and that of the remote server in order to properly perform compression processes such as (we have implemented and checked, inside the prototype, compression algorithms based on modulated-cosine filter-banks) adaptive-band filtering, baseline wander and artefact cancellation, multichannel decomposition with principal component analysis or independent component analysis, feature extraction, delineation analysis, and arrhythmic event detection. In our system, although the compression algorithm introduces information loss and modifies the waveform of the reconstructed wave, the diagnostic information is still preserved with the advantage of an increased compression ratio of around 15.
On the Technical Achievements.
The experiments carried out made it possible to determine its efficiency in energy autonomy, which in combination with large storage capacity allow its operation as a Holter for several days. Nevertheless, the execution of the compression algorithms has a high computational cost for the microcontroller, causing a notably high consumption of battery current affecting the autonomy of the system, though time usage could be logically increased by providing higher capacity batteries. In addition, a commercial prototype should allow the recharge of the system in use, without risks for the patient, an end that has not been implemented in this prototype because it goes beyond the scope of the present validation. In order to ensure the clinical quality, prototype calibration experiments were carried out by taking a commercial electrocardiograph model as a reference. The experimentation with signals obtained from real patients and with synthetic signals, together with their corresponding medical validation, generated high agreement among the cardiologists (98.48%). The price of this flexible 12-lead/Holter prototype was around 90 dollars, obtaining clinical quality for diagnosis, with a minimum compression ratio of the signals of 14.35. In [29
], it was mentioned that the medical format protocols use algorithms that usually execute lossless compression techniques to compress the ECG signals in order to guarantee the quality of the signals. Alternatively, in the present work, we have verified that it is possible to use conservative lossy-compression techniques while still ensuring the signal quality, significantly reducing the recording sizes and the bandwidth needed to send signals through narrow communication channels, such as those ones that are found in rural areas of developing countries.
On the System Flexibility. It has to be kept in mind that there is a clear clinical difference between the ECG recording system with a double use, namely, the short-term 12-lead ECG recording in controlled environments and at rest, and Holter ECG recording in ambulatory use. Our aim here was to create a flexible system in terms of the possibility of using a single device in rural and isolated areas of developing countries, so that a single device can provide both, according to the clinician’s or nurse’s need. Recall that it is uncommon to use a Holter system with 12 leads for Holter long-term monitoring, because the need for wires would make it impractical and the gain in information retrieved with respect to the 2–3 lead system does not compensate in general the effort. In some clinical scenarios, a 12-lead long-term Holter could be useful, for instance, in order to document the morphology of extrasystoles or spontaneous ventricular tachycardia (which can be clinically relevant in some cases) or to document regional elevations of ST-segment that can be visible only in some leads, but this should be useful in only a very small percentage of the usual indications for the Holter.
Limitations of the Current Development. Several limitations must be mentioned. A signal quality validation on ambulatory conditions, which is crucial for its final use, is pending. The same can be said for a suitable and definitive clinical validation of the system, which is beyond the scope of the present work. Our small-scale validation did not reach a multicenter evaluation or certification, but it was oriented toward this direction, aiming to overcome this limitation of some proposals of mobile ECG devices in the literature. It is necessary to include records with subtle electrocardiographic changes among those cases to review, in order to verify that the filters or the compression and decompression algorithms do not mask epsilon, fragmentation or pre-excitation waves, or mild elevations or depressions of the ST segment. Nevertheless, the current prototype has put together a new scenario for mobile ECG systems by taking advantage of currently available technology and knowledge.
Clinical Usefulness. From a clinical point of view, several clinical needs can be addressed with the proposed prototype. First, a conventional 12-lead ECG could be made at home, still needing to be at rest and with very controlled conditions, and it could be subsequently transmitted by the nurse through the mobile to the clinician in a domiciliary attention service, which is still a low-developed commercial scenario. Second, in an emergency scenario where the general clinician is willing to make an ECG and consulting it with the cardiologist, this can be done nowadays from many centers and small hospitals, but it is not often implemented in rural areas of developing countries. In both cases, 12-lead ECG availability is necessary. Third, the application can be used to detect asymptomatic or infrequent arrhythmias, and in these cases, the patient carries the device in order to transmit the ECG to the clinician either when symptoms happen or on a scheduled basis. This kind of diagnosis is usually focused on arrhythmia detection, and it is widely accepted that a single lead is not enough. Two leads is usual, and three is better. More leads are scarcely used in this scenario. On the other hand, if the patient’s comfort is compromised, it is easier for the patient to put two fingers on the mobile or press two electrodes on her/his chest, rather than using 10 surface leads. There is a variety of devices of this type, from recent mobile systems such as Kardia™ to implantable Holters. The current system is especially flexible in this scenario. Finally, our system can be useful for recording a 12-lead ECG for an extended period of time (24 h or more), this being equivalent to a combination of 12-lead and Holter. Most of the patients referred to a standard Holter (24–48 h) are suspected of altered rhythm, but in general 2–3 leads are enough, and some patients will benefit from more leads, such as patients with thoracic recurrent pain with suspected ischemia for coronary spasm and patients with low-frequency ventricular ectopy, in which we are interested in the detailed morphology of the premature beats.
From the Prototype to the Medical Device.
In our study and in others related to mobile ECG systems, it should be noted that mobile cellphones are hard to regulate as clinical devices, although software can actually be regulated as such. At this moment, the present work stays at the prototype stage, as many others in the literature. Nevertheless, our motivation is clearly supported by the fact that rural regions of developing countries have limited availability to electrocardiography equipment, due to the high cost of commercial equipment. However, the widespread use of cellphones in the population makes them an attractive option for many health applications, which makes it worth pursuing the usually hard and long effort to pass the regulation stages such as FDA approval. A clinical validation of the system would require one to check its reliability in different pathologies, and this could be hard and complex due to their variety. Those pathologies with clear electrocardiographic repercussion (such as evident morphological changes in the ECG, a clear increment of wave duration, and the appearance or disappearance of evident deflections) would not represent an issue, as they reproduce similar phenomena to the ones analyzed in a normal ECG. Those ones generating subtle changes (such as doubtful preexcitation, a slight deviation of ST-segment, or small Q waves) should be the ones to be checked in a wider clinical study. On the other hand, the technical standards that are usually required for medical devices include such diverse aspects as patient security, resistance to physical agents, sampling rate, filtering, device documentation, benchmarks to be performed, and electromagnetic compatibility. All of them are included in specific documents from the regulatory agencies (FDA in the USA, and several in the European Union), see for instance [30
] for the 12-lead ECG and [31
] for the Holter. These are hot topics for companies in the electromedicine field, though they are currently not part of the prototype state in this paper.
Usefulness in Rural Areas.
], it was pointed out that one of the problems in rural areas is the bandwidth limitation and the subsequently needed bit-rate reduction of the information flow. In these environments, the use of the developed prototype would be advantageously applicable. In rural areas of developing countries, the access to mobile broadband services (3G or higher) is always limited. In 2015, the International Telecommunications Union (ITU) reported that 71% of the rural population did not have 3G service [32
]. In 2016, the ITU indicated that only 67% of the world’s rural population had access to this broadband service [33
]. Approximately 450 million people living in rural areas do not have mobile coverage [34
]. In regions with high inequality such as Latin America, the situation differs greatly from one country to another. In Cuba and Nicaragua, no more than 1% penetration is reported, Paraguay reports 4% and Peru, Honduras, and Bolivia reported respectively 14%, 16%, and 28% according to the data of the ITU and the GSMA of 2015 [35
]. Therefore, it is necessary to use compression techniques that guarantee a high compression ratio of the signals transmitted by these communication systems.
The results achieved in the prototype development and in the experimentation allow us to conclude that it has been verified that the high compression rates achieved with compression algorithms with losses guarantees a high clinical quality when a robust and low-cost hardware structure is available.