Advances of ECG Sensors from Hardware, Software and Format Interoperability Perspectives

: It is well-known that cardiovascular disease is one of the major causes of death worldwide nowadays. Electrocardiogram (ECG) sensor is one of the tools commonly used by cardiologists to diagnose and detect signs of heart disease with their patients. Since fast, prompt and accurate interpretation and decision is important in saving the life of patients from sudden heart attack or cardiac arrest, many innovations have been made to ECG sensors. However, the use of traditional ECG sensors is still prevalent in the clinical settings of many medical institutions. This article provides a comprehensive survey on ECG sensors from hardware, software and data format interoperability perspectives. The hardware perspective outlines a general hardware architecture of an ECG sensor along with the description of its hardware components. The software perspective describes various techniques (denoising, machine learning, deep learning, and privacy preservation) and other computer paradigms used in the software development and deployment for ECG sensors. Finally, the format interoperability perspective offers a detailed taxonomy of current ECG formats and the relationship among these formats. The intention is to help researchers towards the development of modern ECG sensors that are suitable and approved for adoption in real clinical settings.


Introduction
Heart disease refers to disorders that affect the functionality of our hearts [1]. It includes disorders of blood vessels associated with the heart, abnormal heart rate or rhythm, or defects in the structure of the heart. According to World Health Organization (WHO), about 17.5 million people are dying each year due to heart disease. Early diagnosis and detection of heart disease is important to avoid sudden death due to heart attack or cardiac arrest [2]. Electrocardiogram (ECG) sensor is a device commonly used by cardiologists to check for abnormal heart rhythm and signs of potential heart disease quickly and without intervention. Sometimes, the signs of heart disease for a patient do not show up in a short period of ECG signal recording and require longer recording and monitoring period of more than 24 h. This makes the interpretation of ECG graphs by cardiologists longer and more error prone. Thus, a lot of innovations have been made in the recent years on ECG sensors to reduce the mortality rate and assists cardiologists in making prompt, accurate, and quality decisions. The innovations encompass various perspectives such as the ECG hardware, signal preprocessing algorithms, automatic detection of heart disease algorithms from ECG graphs and data format interoperability with other applications of Electronic Health Record (EHR) system. Medication ECG is used to detect electrical activity in the heart to identify and locate the problem if any. A series of leads called electrodes will be placed onto the skin of the limbs and chest of a patient. The ECG will then detect the ionic current flow in the heart which causes the cardiac fiber to contract and afterward relax, in the form of the time-varying signal [11] and plotted as P, Q, R, S, and T waves. ECG waveforms of normal heartbeats could be referred in [12] and many other sources in literature. P wave shows depolarization of the left and right atrium. While Q, R, and S waves occur in rapid succession called QRS complex represents electrical flow in the ventricles and implies right and left ventricular depolarization. Next, the T wave indicates ventricular repolarization. At the start of the P wave, the PR interval arises and closes at the start of the QRS complex. The PR interval's usual values are between 0.12 and 0.20 s. The length is represented by the QT interval of the electrical systole. At the beginning of the QRS complex is the beginning of this interval and the closure is at the endpoint of the T wave. The magnitude of this interval is usually smaller than 0.42 s. The origin of the QRS complex is at the beginning of the Q wave and stops at the S wave terminal, corresponding to the duration of ventricular depolarization. The QRS complex's range is usually less than 0.10s while the QRS complex's amplitude range is between 0.5 and 0.7 mV [12].

Heart Attributes
Attributes of heart disease are useful in developing ECG applications that would automatically detect heart diseases. It is also useful in selecting suitable datasets to use in training machine learning models for prediction or interpretation of heart diseases based on ECG. Examples of available datasets are Physionet [13] and MIT-BIH [14].
Some of the common attributes used for diagnosing heart disease are age, sex, resting blood pressure, chest pain type, Resting ECG, cholesterol level, fasting blood sugar, etc. [15]. Table 2 describes the 14 attributes of a common heart dataset from Cleveland database [16,17]. Although the database comprises 76 attributes, only 14 of them are the most commonly used by researchers. Moreover, the real names of other critical details of the patients are removed from the database and replaced with insignificant values. Researchers so far with the Cleveland database have only attempted to distinguish presence (values 1,2,3,4) from absence (value 0). In Table 2, typical angina refers to chest pain that gives a sensation similar to squeezing or pressure. It generally occurs when the oxygenated blood is not received by the heart muscle in an adequate amount. On the other hand, chest pain that does not satisfy angina's criteria is called atypical angina. Table 2. Heart disease dataset based on [15,16].

Attributes Values
Age -

Hardware Perspective
ECG hardware has evolved from a unit that is big in size, wired and portable, to units that are smaller in size, wireless and wearable, allowing real-time continuous monitoring of patients irrespective of where they are whether in hospital or other places. In this section, the hardware perspectives of an ECG sensor is covered. An introduction to the general hardware architecture of an ECG sensor is followed by the description of every individual component in the architecture. Figure 1 illustrates general architecture of an ECG sensing device. The architecture comprises of three main units. The sensing unit is responsible for storing, monitoring and processing the ECG data and comprises of three sub-units: leads, heart-rate monitor and processor. The wireless communication unit is responsible for the transmission of the recorded ECG data to the cloud or any other receiving device. The battery unit is responsible for supplying power to both sensing and wireless communication unit. These three units are explained in more detail next.

Wireless Communication Unit
Sensing Unit

Leads
Heart-rate Monitor Processor Process data Read data

Sensing Unit
As can be seen in Figure 1, the sensing unit further comprises of three blocks: leads, heart-rate monitors, and processing boards. The description of these individual blocks is provided next.

Leads
The graphical description of the heart's electrical activity is represented by ECG lead, which is generated by interpreting the electrical currents detected at different electrodes. In other words, the computation of ECG lead involves the interpretation of the electrical currents detected at various electrodes. Here, an electrode comprises a conductive pad that is connected to the skin and allows the recording of electrical current. 3-lead ECG monitoring has three electrodes (RA, LA, and LL) RA placed under the right clavicle close to the right shoulder within the rib cage frame, LA placed under the left clavicle close to the left shoulder within the rib cage frame, and LL placed on the left side below the lower edge of the left rib cage muscles. It's Monitor shows bipolar leads [18]. 5-lead monitoring is the same as 3-lead monitoring, but with two additional electrodes enabling extra lead monitoring and helping to improve ST elevation readings. It is monitoring 5 electrodes. The placement of 5-lead ECG monitoring electrodes is standardized to ensure that the information collected is accurate and can be compared with other records. Location of the 5-lead ECG monitoring is right arm, right leg, left arm, left leg, and chest [19]. 5-Lead monitoring can provide a sufficient amount of information if there is some concern, such as cardiac arrhythmia, a 12-lead monitoring can be performed to gain a better understanding of the problem. A 12-lead ECG gives a full picture of the electrical activity of the heart by recording information from 12 different perspectives. Adequate electrode placement is crucial to accurately measure the electrical activity of the heart. There are 12 leads calculated on a 12-lead ECG using 10 electrodes. Six electrodes placed on chest (V1, V2, V3, V4, V5, V6,) four electrodes are placed on limb ( RA, RL, LA, LL) [20].

Heart-Rate Monitor Board
Heart-rate monitor boards assist in the continuous measurement and displaying your heart rate. The specifications of some of the heart-rate monitor boards that are commonly used in ECG sensors are explained next.

AD8232:
To assess the heart's electrical activity, the AD8232 Single Lead Heart Rate Monitor is used [21][22][23][24][25]. This electric activity can be plotted as an electrocardiogram and output as an analog reading. The Single Lead Heart Rate Monitor AD8232 acts as an op-amp to assist the smooth generation of a reliable signal from the PR and QT intervals. It can be very noisy with ECGs. AD8232 for ECG and other bio-potential measurement applications is the optimized signal conditioning block. In the presence of noisy conditions, it is intended to isolate, amplify, and refine small biopotential signals such as those produced by motion or remote placement of electrodes [26]. With the AD8232, the 4 mm x 4 mm, 20-lead LFCSP, and the LFCSP SS kit are available. The production is defined from 0 • C to 70 • C for A-grade models and the models are operational from −40 • C to +85 • C. Performance for the W grade models is defined in the automotive temperature range of −40 • C to + 105 • C. It has a 0.25-inch diameter, a 0.26-inch thickness, and a 0.30-centiliter volume.

AD8233:
AD8233 is an integrated electrocardiogram (ECG) signal conditioning block comprising of different biopotential application measurements [27][28][29]. It is designed to avoid, amplify, and filter tiny biopotential signals in the presence of noisy conditions such as those induced by motion or remote electrode placement. This design allows an ultra-low-power analog-to-digital converter (ADC) or an embedded microcontroller for smoothly acquiring the output signal. Basic restore functionality is included in the AD8233 that reduces the length of the high-pass filter's otherwise long settling tails. The AD8233 automatically transitions to a higher filter cutoff (such as a lead-off condition) after a sudden signal shift that rails the amplifier. This feature helps the AD8233 to recover easily, and thus to take valid measurements soon after attaching the electrodes to the subject. The AD8233 is available for height-constrained applications in a 2 mm × 1.7 mm, 20-ball WLCSP box, and a 150 µm thin die. Output from 0 • C to 70 • C is defined and from −40 • C to +85 • C is operational.

MSP430FG439:
The MSP430FG439 microcontroller is the central feature of the monitor terminal [30]. It's a processor with 16 bits. It has low power consumption, high integration, high space for computing, online processing, and is easy to integrate with an on-chip wireless computer. The power consumption is 300 µA, 2.2 V, while the idle mode is at 1MHz, while the standby mode is 1.1 µA and the off mode is just 0.1 µA. 1.8-3.6V is the low voltage supply spectrum. The five power-save modes are LPMO, LPM1, LPM2, LPM3, and LPM4. These features preserve the low consumption of fuel. 16-Bit RISC architecture; instruction loop time of 125-ns. The instruction set of serial onboard programming consists of 51 instructions with three formats and seven modes of address. On word and byte data, each instruction can operate [31].

Processing Board
Although several processing boards have been utilized for the development of ECG sensors, Arduino and Rasberry's Pi boards are the most widely used. The specifications of commonly used Adruino and Rasberry Pi processing boards are explained next.

Arduino UNO:
Arduino Uno has been used in ECG sensors in several works [33][34][35][36][37][38][39][40]. Arduino is a platform for open source electronics, based on easy-to-use hardware and software. Arduino UNO is the primary processing unit used as a microcontroller in the healthcare system consisting of ATmega328P 8-bit microchip. The board of Arduino UNO has collections of 14 digital and analogue input/output pins that can be interfaced with different expansion boards and other circuits. Arduino Uno microcontroller which processes the data received from the ECG test, ESP Wi-Fi module which transmits the information generated to the remote API application and finally Blynk IoT application which displays the information received on the screen. Operating voltage required for Arduino UNO is 5V and recommended input voltage is 7 to 12 V with a frequency of 16 MHz.

Arduino Pro Mini:
Arduino Pro Mini has been used in ECG sensors in several works [41][42][43][44]. The AT-mega328 based microcontroller board is the Arduino Pro Mini. It has 14 digital input/output pins, 6 analog inputs, an on-board resonator, a reset button, and pin header mounting holes and (6 of which can be used as PWM outputs). To provide the board with USB power and communication, a six-pin header may be attached to an FTDI cable or Spark fun breakout board. To give the board USB power and connectivity, a six-pin header can be linked to an FTDI cable or Spark fun breakout board. Two versions of the Pro Mini are available, one running at 3.3 V and 8 MHz, and the other running at 5 V and 16 MHz.

Arduino DUE:
Arduino Pro Mini has been used in ECG sensors in several works [45,46]. Arduino DUE board is one of the most powerful Arduino development boards in the series. DUE board not only has lots of features that make it ideal for advanced applications, it also has great processing speed. DUE may be considered a technical board used as a starting board for UNO. DUE board is built on ARM controller series where ATMEGA controller series develops like other boards. This board is based on a powerful CortexM3 ARM 32 bit microcontroller that is programmable via the familiar Arduino IDE. The Arduino Due has 54 digital input/output pins (including 12 as PWM, and 42 as input/output). The board Arduino Due operates at 3.3 V. The maximum voltage allowed by the i/o pins is 3.3 V. Providing higher voltages could damage the board, like 5 V to an i/o pin having 84 MHz external and 12 MHz internal frequencies.
Lilypad Arduino: Arduino Lilypad is used for processing and digital conversion analog. It's designed specifically for wearable applications. It is a microcontroller board with the Arduino boot loader, based on the ATmega328V microcontroller. Lilypad is an e-textile wearable technology created by Leah Buechley and co-designed by Leah and SparkFun. Lilypad have 14 digital input/output pins (of which 6 provide PWM output and 6 analog pins. It is also used to create communications via Bluetooth with your mobile device [47]. The board runs from 2 V to 5 V with 8 MHz . The new Lilypad version supports automatic reset to simplify programming even more.

Raspberry Pi:
The Raspberry PI (RPI) is a credit-card-sized single-board computer with an ARM processor weighing just 50 g. As an individual device, it uses 5 V, 700 mA, and costeffective power ratings. The Raspberry base designs RPI in various models: A, B, and a more sophisticated version of B+. The B+ model has a RAM of 512 MB, runs on an ARMII processor, and has an operating frequency of approximately 700 MHz. They aim to promote the use of an inexpensive portable computing system to research information and related subjects [48]. Using its four USB2.0 connectors, various peripherals such as the mouse, keyboard, and Wi-Fi adapter can be linked to make it a full-size device. A network-attach ethernet port, GPIO controller, and control switch pins, switches, LEDs, and other gadgets are also part of the board [49]. These various functions allow users to use Raspberry pi in a wide variety of applications.

Raspberry Pi 2:
The Raspberry Pi Model 2 is a second-generation small-sized mini-computer developed by Raspberry pi in the UK. The Raspberry Pi 2 was released in February 2015 and featured a 900 MHz quad-core ARM Cortex-A7 processor and 1 GB RAM. It is the cheap but genuinely efficient and effective method for simultaneously interfacing with several devices. It is a low-power unit that operates on 5V, 2A [50].

Raspberry Pi 3:
A Raspberry Pi 3 can be used as the system's controller. It is a mobile and portable Linux-based platform with integrated wired and wireless networking comprising of a 40-pin GPIO port extension [51]. The Raspberry Pi is based on a 64-bit, quadcore ARMv8 Cortex A53 1.2 GHz Broadcom BCM2837 processor with 1 GB of RAM. Four USB 2.0 ports can be used for many devices such as a keyboard or a mouse, in addition to an HDMI port that can be connected to a portable graphical LCD screen interface. The Raspberry Pi 3 needs a 2.5 A, 5 V nominal current power supply [52]. Raspberry Pi 3 can be programmed on a multitude of programming languages such as Python, C/C++, and others making it incredibly flexible for rapid development.

Communication Unit
The wireless communication capability of an ECG sensor is significant and enables the ECG sensor to transmit the recorded data to nearby receiving devices. The specifications of the five major communication standards utilized in ECG sensors are explained next.

ZigBee
For its many beneficial characteristics, the ZigBee protocol is well known: low power, long battery life, license-free industry operation, science, and medical (ISM) bands, and efficient networking. As a wireless solution for many different situations, the ZigBee Alliance has therefore proposed ZigBee: commercial building automation (CBA), home automation (HA), home and hospital treatment (PHHC), smart energy (SE), telecom applications (TA), and wireless sensor applications (WSA) [53]. Three topological forms are provided by ZigBee: star tree, mesh, and cluster tree [54]. Each topology has its benefits and is suitable for use in different circumstances. Star topology is lightweight, and here the battery life is very long. The tree topology utilizes a structure. The mixed routing approach combines hierarchical tree routing with Ad hoc On-Demand Distance Vector (AODV) routing and is used by the mesh network. There are three types of nodes in ZigBee networks: (1) ZigBee coordinator that manages the network; (2) the routers that can participate in the AODV routing process; (3) the end devices transmitting and receiving frames through their parent node.
The first industry-standard WPAN interface that uses the 2.4GHz ISM band is ZigBee. The transmission distance varies between 10 and 75m, depending on the power output and environmental conditions [55]. In addition, based on the flow of the data transmitted, ZigBee devices can save energy by switching to sleep mode [56]. As a result, battery life, combined with sleep mode hours, will last for months (more than two years). This feature promotes ZigBee to a very high position in the networks of wireless sensors used for monitoring and management. The Zigbee Alliance developed the Zigbee specifications for multiple sensor network applications and control for low-cost networking and low-power for battery-operating devices. The key characteristics of the Zigbee are based on IEEE standards 802.15.4 [55].

Bluetooth
The Bluetooth standard provides significant advantages: low cost, low EM interference, reduced power consumption, data confidentiality, transmitter measurements, and the ability to produce a small pico-net of some devices [57]. It is also embedded in most compact, palm computers and cell phones, and is also used in a significant number of wearable devices (e.g., wireless headsets and mobile phones). Several wireless technologies, such as GSM/GPRS, Bluetooth, ZigBee, WLAN IEEE 802.11, and so on, can be used to relay ECG signals [58][59][60]. Many ECG experiments-Bluetooth has established a prototype wireless ECG monitoring system and is able to read the patient's ECG signal, send a signal via a Bluetooth interface, and view a personal computer with the ECG waveform [61]. Bluetooth enabled ECG monitoring system consists of three parts, the ECG sensors, PC signal processing circuit, and display controller as well. The Bluetooth protocol allows both portable and stationary devices to communicate using wireless short-range technologies, creating permanent or temporary wireless local area networks. Bluetooth wireless technology facilitates either one-to-one contact or up to seven separate Bluetooth devices to connect and interact with a radius of 10 meters, which is called Piconet or PAN, personal area network. Communication with Bluetooth was designed using the Bluetooth API. The J2ME Wireless Toolkit was used to obtain binaries [62]. The software application takes the bytes obtained from the buffer and analyses the ECG, revealing the body temperature and blood pressure. The ECG telemedicine information system takes advantage of all the benefits of internet communication. The ECG data of the digital portable ECG recorder is transmitted to the cell phone via a radio frequency route using the Bluetooth device.

Infrared Data Association
Based on Infrared Data Association (IrDA) criteria, infrared network communication is widely accessible on personal computers and peripherals, and there is a timely potential for effective and inexpensive short-range wireless communications on embedded systems and devices of all kinds. The IrDA is an industry-based group of more than 150 organizations that have developed networking protocols at a wide range of speeds that are best suited to low cost, short-range, cross-platform, point-to-point communications. Infrared transfer of the ECG signal wireless delivery of biomedical signals has also been carried out in recent years. In early years, IrDA commissioned a working group to identify and establish a specification of the physical layer under the current specifications except with data rates far above 4 Mb/s [63]. The modules and devices designed for wireless infrared systems operate primarily in high-volume markets where both cost and power consumption are key parameters and it is highly desirable to simply comply with existing standards. The new IrDA norm is called VFIR (Very Fast Infra-Red). It is a small angle point-to-point (30 • cones), the basis for ad-hoc data transfer [64]. VFIR also has good bandwidth and delay. The IrDA protocols are organized in a traditional architecture layered or stacked in. The existing protocols have communication up to one meter at distances and speed up to 4 Mbps [65].

Medical Implant Communication Service
The Medical Implant Communication System (MICS) [66] is an internationally recognized short-range, low-power (2 m), high-data, 401-406 MHz (main band 402-405 MHz) data processing communication network. It is utilized for serving medical or therapeutic purposes linked to devices used for surgical implants [67]. The band supports a high data rate and has a contact spectrum of high conductivity in the human body. High-performance and fault-tolerant wireless solutions can be used in the advancement of wireless technologies to minimize medical errors, decrease workload, improve hospital staff morale, and enhance patient satisfaction. Researchers have been increasingly interested in the production of wireless recording and tracking of real-time physiological parameters from patient bodies in the medical field (e.g., EOG, ECG, EMG, EEG, Blood pressure Neurological, Blood flow, etc.) over the past decade [68]. A MICS network involves devices inserted into a body called an embedded device (IMD) or devices mounted on the body or wearable as body-worn devices (BWD) and programmer/controller (P/C) devices. The transmission medium between a P/C and an IMD in the MICS network consists of air, skin, and fat tissue [69]. IMDs perform sensing and therapy functions in a MICS network and the P/C is used to reprogram and send commands to implanted devices in addition to gathering data from implanted devices. Implanted instruments can be tracked within 2 meters by patients and doctors. In support of the diagnostic and therapeutic functions associated with medical implant devices, MICS was implemented as an unlicensed, compact radio service for data transmission. Without competing with other users of the electromagnetic radio spectrum [70], the MICS band allows medical practitioners and people to use ultra-low-power electronic stimulation devices such as cardiac pacemakers and defibrillators.

IEEE 802.11g
Currently, the IEEE802.11g specification, which was only ratified in June 2003, has become the most commonly used standard for local area wireless networks (WLAN). Its popularity is mainly due to higher data rates being supported, thus retaining backward compatibility with legacy IEEE 802.11G WLANs [71]. As it interacts with other 802.11g devices using multiplexing orthogonal frequency division (OFDM) modulation, an IEEE802.11g device achieves higher data rates. For three distinct physical layers, the original IEEE 802.11 protocol [72] defines data rates of 1 Mb/s and 2 Mb/s using direct sequence spread spectrum (DSSS), frequency hopping spread spectrum (FHSS), and infrared (IR) techniques respectively. The specifications of both DSSS and FHSS operations are listed in the 2.4 GHz Commercial, Scientific, and Medical (ISM) band.

Battery Unit
The battery unit is responsible for the continuous supply of energy to the sensing and communication unit. The battery unit must be easy to operate the lightweight and compact ECG machines and enables doctors to adapt them to the needs of patients for faster, more efficient cardiac examination and better patient care. Lithium-Ion ( Li-Ion) batteries can store about three times more energy than the same weight and volume of Ni-Cd batteries. This quality makes them ideal for applications that are portable. A Li-Ion cell's nominal voltage is 3.6 V, which is about three times the voltage of a Ni-Cd or Ni-MH cell (1.2 V). A Li-Ion battery's typical internal resistance (around 100 mΩ) is much higher than a Ni-Cd battery's typical internal resistance (around 5 mΩ-20 mΩ). This feature makes Li-Ion batteries more suitable for devices that do not drain a lot of battery current. Li-ion batteries are prone to over-charge as well as over discharge. There is no jig without placing it into the portable ECG machines to charge the batteries alone [73,74]. Different components are used to require different input voltages; a voltage regulator of 3.3 V, 5 V and 12 V is therefore used to provide unique IC's with the appropriate input. An LCD is used to show battery condition that is changed every second. High-speed battery charger transport is required in the manufacture of portable ECG machines and in order to process mass production of these ECG machines promptly, apart from the fast assembly of portable ECG machines

Software Perspective
In this section, the software perspectives of an ECG sensor are covered. Several advancements have been made to improve ECG data acquisition, preprocessing, storage (for long time monitoring), diagnosis and interpretation processes. Denoising and AI techniques are discussed followed by introducing other computer paradigms, namely cloud computing and smartphone-based applications, while also offering their practical use cases. A literature survey on existing software architectures for CVD detection and classification, highlighting the usage of the above-mentioned techniques and computer paradigms, is also provided. Finally, a study on the existing privacy preservation techniques utilized in the ECG monitoring system is presented.

Denoising
Denoising refers to the removal of noise from an ECG signal. Existing literature [6,75,76] comprises of several denoising techniques for an ECG signal. However, in this section, three fundamental and widely use ECG denoising techniques (wavelet transform, adaptive filtering, and Savitzky-Golay filtering) are explained.

Discrete Wavelet Transform
One of the significant tools for signal processing is the fast Fourier transform (FFT) [77] that transform signals into the frequency domain for all the time and is suitable for the stationery signals analysis. Short-time Fourier transform (STFT) is the simplest form of timefrequency analysis and gives a constant resolution. Here, there is a trade-off between the resolution of time and frequency as STFT takes into account the window size. The wavelet transform (WT) [78] technique was developed to overcome this shortcoming of STFT and is used for signal compression and noise reduction. Discrete wavelet transform (DWT) has lower computation complexity, denoted as O(n), when compared to that of FFT, and can be utilized in biomedical signal processing to study time-frequency analysis.
Discrete wavelet transform (DWT) takes relatively less computation time in the construction of the multi-resolution analysis utilizing filter banks. The two broad categories of filters in SWT are the low pass filter (LPF) and the high pass filter (HPF), and the cut-off frequency for both is half the bandwidth of the incoming signal. The wavelet analysis combines filtering and down-sampling. In the first level, the original signal is passed through the two filters and down-sampled by a factor of 2. The decomposition level is at most log 2 N. Here N represents the signal length. In the case of reconstruction, there are two filters as well. However, instead of downsampling steps, the upsampling process is utilized. In this process, the signals are upsampled by the factor of 2, and zeros are inserted. The reconstruction formula based on [78] is defined as follows: where cA i and cA i represents the approximation and detail coefficients, respectively. As for thresholding, two algorithms are commonly utilized for wavelet-based denoising and are called hard and soft thresholdings. The wavelet coefficients after and before thresholding for the two thresholding algorithms are computed as follows: • Hard thresholding • Soft thresholding The wavelet coefficients after and before thresholding are denoted as cD j and cD j , respectively.

Adaptive Filtering
A simple diagram of an adaptive filter is illustrated in Figure 2. Here, input ECG with the additive noise is denoted as s 1 and n represents the noise. The reference signal s can be either a signal related to n or a pure noise generator. Since signal and noise are uncorrelated, the mean-squared error (MSE) is calculated based on [80] as follows: where E[e 2 ] represents MSE and y is the filter output. Let the N coefficients of the filter at the k th iteration be represented as [80] is as follows: To minimize the mean square error (MSE) between the primary and the reference inputs, the filter is required to adjust its weights W iteratively. This adjustment is mainly achieved by utilizing two iterative techniques that explained next.

Least Mean Squares (LMS) Algorithm:
To reduce the MSE between the primary and the reference inputs, an iterative technique known as LMS algorithm [81] can be used. LMS is utilized in several applications, such as approximation of unknown signals, due to its simplicity [82] and requires fewer computational operations [83]. The weights of the LMS adapting algorithm at the k th iteration is computed based on [79] as in follows: where the desired primary input filtered from the ECG is denoted as d k and y k refers to the filtered output that is the best least-squares estimate of d k .
The empirical selection of parameter µ is to produce convergence at the desired rate. The convergence becomes faster with increasing µ. The time constant for convergence is 1 (4µα) . Here, the highest eigenvalue of the auto-correlation matrix of the reference signal is referred to as α [84]. Large µ may cause instability and must be in the range 1 α > µ > 0 to maintain stability.

Recursive Least-Squares (RLS):
Although RLS takes a relatively fewer number of iterations for convergence when compared to LMS, it requires a higher number of computations per iteration. Work in [85] highlight the iterative steps to update the weights W k of an RLS filter and are as follows: where I refers to the identity matrix, K k denotes the Kalman gain vector, and P k is the correlation matrix. The computation of K k and P k is as follows: where β is a weighting factor in the range 0 < β < 1. For the expedition of the convergence rate and to achieve the minimized mean square error at fewer steps, substituting the stepsize parameter in LMS by the correlation matrix of the input vector in RLS has a significant impact [82]. Here, the polynomial that approximate d with least-square error is referred to asp(n). Therefore, h[−n] =p(n) [87,88]. To achieve the best approximation and smoothing of the noisy data, the selection of M and N is significant.

AI Techniques
In this section, two artificial intelligence (AI) techniques, namely machine learning and deep learning, are explained. These techniques play a vital role in analyzing the ECG data, thereby significantly contributing to the CVD prediction and classification. The basic notion of these techniques is explained next while also highlighting their commonly used algorithms followed by a use case highlighting the utilization of AI techniques in CVD prediction.

Machine Learning
Machine learning (ML) [89] is the subset of AI where a computer program is trained to make decisions like a human with the ability to learn different characteristics from a set of data instead of just solving a simple problem. It is suitable for a program with a complex task or a large set of data with an unknown formula. Machine learning techniques have great potential to assist the healthcare industry and researchers in the diagnosis of CVD and have been used in the literature [90][91][92][93][94] for CVD prediction and classification.
The three broad learning techniques of ML are supervised, unsupervised, and reinforcement learning. Supervised learning makes use of labeled data. Here, the model is trained by giving the input and the correct output data for the program to learn. The model then classifies or predicts the future output of new data using the knowledge that was developed from the training. On the other hand, unsupervised learning utilizes unlabeled data. Here, the model is only given input data and learns patterns from the given input data. The inference is then used to predict the solution. In the case of reinforcement learning, the program learns from experience. Using rewards and hurdles, the program tries all the possibilities to achieve the goal. The best solution is then decided based on the maximum reward gotten. Table 3 highlights some of the commonly used ML algorithms, their ECG applications, to which learning category they belong, and their short summary.

Deep Learning
Deep learning (DL) is a subset of ML. It is where ML extends its ability to learn inspired by the human brain using an artificial neural network (ANN). Here, various layers of ANN provide the possibility for the machine to learn better. Besides that, to improve learning, a large amount of data is needed. Instead of manually instructing a program what it needs to do, the DL model learns by repeatedly performing tasks using the data provided and tweaking where needed until the best result is achieved. The larger the data set, the better the DL model can learn and perform decision. A complete DL model can make its own intelligent decision without any human help even for complex problems with an unstructured, diverse, and interconnected dataset. Deep learning techniques are also being extensively used in the healthcare industry [132][133][134][135][136][137] for the timely detection of ECG anomalies, thereby facilitating the prediction and classification of CVDs. Table 4 highlights some of the commonly used DL algorithms, their ECG applications, and their short summary.

Use Case: Arrhythmia Detection for Varied-Length ECG using ATI-CNN
Work in [147] proposed an attention-based time-incremental convolutional neural network (ATI-CNN) to predict paroxysmal arrhythmias from 12-lead varied-length ECG. ATI-CNN integrates the attention module and recurrent cells with CNN to accomplish the fusion of both temporal and spatial information from ECG signals. Figure 3 illustrates the architecture of the proposed ATI-CNN model.
Here, a preprocessed time-series data is obtained by feeding 12-lead ECG to the fully convolutional network and is then inputted to long short-term memory (LSTM) cells to interchange information between several time points. Finally, the output from the LSTM cells is fed to the attention module that is responsible for assigning weights for every time point before outputting the final result. The architecture has some key features. During the ECG processing, the pipeline is divided into two phases. Spatial fusion information is obtained from ECG signals based on convolutional neural network (CNN), while temporal fusion information is achieved using LSTM with the attention module. In order to extend ATI-CNN's input to varied-length ECG signals, the recurrent cell's unwrapping ability was utilized. Moreover, it accurately detects paroxysmal arrhythmias as there is no prior need for cropping/padding signal when dealing with the varied-length signal database. The classification result along with the signal segment of interest is then outputted from the attention module. The utilization of the attention module significantly assists in finding out the abnormalities in ECG signals, thereby making the deep learning model more interpretable. China Physiological Signal Challenge [148] was utilized to validate and demonstrate the performance of the proposed model for the classification of the cardiac arrhythmia's nine classes by utilizing 12-lead ECG signals.

Other Computer Paradigms
Computer paradigms such as cloud computing and smartphone utilization also have a significant impact on facilitating ECG-based applications. These paradigms along with the use case of analyzing ECG data are explained next.

Cloud Computing
Cloud computing can be defined as a model for enabling convenient, on-demand network access to a distributed pool of configurable computing resources that can be smoothly provisioned and launched with minimal latency or service provider intervention. There are four types of cloud models. The first type is the private cloud that refers to a management that is centralized and where the services are either distributed within one company or its subsidiaries. The second type is the community cloud refers to a collaborative effort where multiple organizations belonging to specific domain share services. The third type is the public cloud that comprises a set of services available to the general public. Finally, the fourth type is the hybrid cloud that refers to the combination of two or more types of clouds and which continue to be separate entities, giving the advantages of multiple deployment modes [149].
Cloud computing provides flexible services that help clients according to their needs, and one of them is machine learning as a service (MLaaS). MLaaS is a range of services that provide machine learning tools in cloud base platform. Using MLaaS, users reduce the cost, time, risk, and resource of providing in-house solutions. All machine learning predictive analysis, such as classification, regression, and clustering, is possible to run using the provided service. It supports data processing, data exploration, model selection, deployment, and result analysis. Three currently major company in cloud computing establish their MLaaS to cope with the current trend. They are Amazon Web Service [150], Microsoft Azure [151], and Google AutoML [152]. Cloud computing applications are currently being used not only to offer online healthcare to people but are also being used for monitoring and diagnosing various diseases, which also includes the prediction and classification of CVD diseases [91,93,94,133,134,136,137].

Smartphone-Based Devices and Applications
One of the most efficient means of achieving mobile healthcare (mHealthcare) is the utilization of smartphone-based devices and applications (SBDAs) [153] that are costeffective and has remote sensing capabilities. Primary physiological parameters, such as pulse rate, blood pressure, electrocardiograph, body analysis, blood glucose saturation, weight, physical and sleeping activity, are being monitored and managed by various commercialized SBDAs. In the case of CVD prediction and classification, SBDAs have been extensively used [93,94,132,137]. Furthermore, SBDAs offer the capability of providing telemedicine opportunities in remote locations while also enabling real-time on-site analysis and is largely due to advancements in communication standards, remote sensing, software, and cloud computing. This is especially significant in developing countries, where access to basic healthcare service is not adequate and a large number of smartphone users are from these countries. The technology assists patients in effectively managing and keeping track of their medical health while also facilitating patient-doctor interaction. Overall, the applications of SDBAs will be rise with the growing field of mHealthcare over the next decade.

Use Case: An Autonomic Cloud Environment for Hosting ECG Data Analysis Services
Work in [154] integrated mobile computing and cloud computing to develop an autonomic system for analyzing ECG data. This autonomic cloud environment stores the recorded data related to people's health to a cloud-based information repository. Furthermore, the stored data is analyzed using software services hosted in the cloud. The system can be utilized at different locations by several users. In addition, the mobile software in the smartphone comprises configuration preferences that enable users to customize the reporting frequency in which readings are sent for remote analysis. Figure 4 shows the software architecture of this autonomic system that includes services deployed at all three layers (software, platform, and infrastructure levels) of the Cloud computing stack.  At the software layer, a web service is hosted by a scalable web server acting as a system's frontend where the data can be uploaded and analyzed at the client-side using the user-friendly application. At the platform level, a middleware software is utilized that is responsible for managing available resources and scheduling of computing tasks with an aim to swiftly deliver the ECG analysis results with satisfactory Quality of Service (QoS) to the user. This layer comprises three main components: Container scaling manager, Workflow Engine [155], and Aneka [156]. Each container hosts a workflow engine that manages the execution of the ECG application. The container scaling manager instantiates more containers with an increasing number of users in order to assign user requests to workflow engines. The tasks that were created from user requests are packaged by workflow engine and then sent to Aneka which is a workload distribution and management platform in Microsoft.NET framework environments and is used for accelerating applications. Furthermore, Aneka utilizes a master-worker framework to handle the communication between the infrastructure layer and the platform layer. In addition, the "Dynamic Scalable Runtime" module is implemented as part of the Aneka scheduling environment and is responsible for managing the QoS of the applications running under the software layer. At the infrastructure level, third-party infrastructure service providers such as Amazon web services [150] are used that provide pay-as-you-go computing and storage services and can be deployed in several geographical locations. Finally, a trusted third-party certification authority is employed for securely storing the data in the cloud storage. Table 5 highlights the existing software architectures utilized for CVD prediction and classification. Specifically, details regarding the type of CVD, denoising and AI techniques used, and the utilization of computer paradigms are provided. As for the selection criteria for Table 5, some of the existing software architectures, developed in the last decade, for CVD prediction and classification are considered. Overall, this survey of software architectures is intended to assist researchers in the selection of appropriate techniques and computer paradigms for the development of next-generation software architectures for CVD prediction and classification.

Privacy Preservation Techniques
With an increase in the usage of ECG signals along with the remote monitoring systems, there is a rising concern for ECG data privacy. ECG data contains sensitive information and hackers could use this information to abuse patients. Several ways could be used to steal the ECG data from monitoring systems. Hacker close to the patient can intercept the ECG data transmission between sensors and the patient's smartphone. Alternatively, the hacker could manipulate the recorded ECG signals at the decision support server, thereby changing the health status of the patient [160]. Another issue is the added usage of the Internet could further increase the number of security and privacy threats while also resulting in data integrity issues [161]. Based on the Health Insurance Portability and Accountability Act (HIPAA) [162], any medical information of the patient transmitted on the Internet must be protected and secured. Specifically, the system must have the capability to offer the patient control on who cannot access the patient's data and who can. In addition, the system must have robust and effective communication and storage security. Therefore, ensuring data privacy is of prime importance for ECG monitoring systems. There exist significant work in the development of privacy preservation techniques for ECG monitoring systems. Table 6 illustrates some of the existing privacy preservation techniques, developed in the last decade, for ECG monitoring systems while also highlighting whether or not they utilized the cloud computing paradigm. Table 6. Existing privacy preservation techniques used in ECG monitoring systems.

Work
Year Cloud Computing Summary [163] 2010 Not utilized Secure cross-layer-based body sensor network platform comprising critical ECG data identification and low-delay adaptive encryption features.
[164] 2012 Not utilized Homomorphic encryption and Yao's garbled circuits-based hybrid multi-party computation protocol to preserve the privacy of ECG quality. [161] 2013 Utilized Hiding patient's confidential information in an ECG signal by utilizing a wavelet-based steganography technique that is an integration of encryption and scrambling techniques.
[165] 2015 Utilized Remote monitoring system utilizing fully homomorphic encryption to the ECG data privacy [160] 2017 Utilized Public-key cryptosystem-based privacy preserving ECG monitoring system for arrhythmia detection with secure communication feature. [166] 2018 Not utilized Low-complexity privacy preserving compressive analysis utilizing subspace-based representation for arrhythmia detection.
[167] 2018 Not utilized Low-latency privacy preserving approach for ECG monitoring systems utilizing several ECG features-based cryptographic key generation.
[168] 2019 Not utilized An Internet of things-based ECG monitoring framework that utilizes biometric authentication to enable privacy preserving during sharing of ECG data.
[169] 2020 Utilized SessionID/SessionKey-based privacy preserving compression model to enable efficient ECG sharing over Internet of Medical Things. [170] 2020 Utilized Internet of things-assisted ECG monitoring framework that enables secure ECG data transmission by utilizing lightweight access control, while also comprising of a lightweight secure health storage system.
It is envisaged that future works on privacy preserving and security of ECG monitoring applications using blcokchain technology will be explored by researchers soon. Blockchain is a promising technology that could be utilized to provide better security of storage, transfer and access of Electronic Health Records in cloud environment [171,172]. One advantage of blockchain technology is that it does not rely on trusting a third party.

Format Interoperability Perspective
In this section, the data format interoperability perspective of an ECG sensor is covered. A taxonomy of several ECG formats, comprising of a brief explanation of individual formats, is provided followed by a survey of existing ECG format converters to show the relationships among these ECG formats.

Overview of Digital ECG Formats
The data output formats play a significant role in the selection of new ECG systems as the goal of current healthcare reforms is to achieve greater interoperability in health IT systems. Specifically, the reforms target the transfer of patient's data with ease, thereby eliminating the need for paper-based systems. However, unlike medical imaging data that is mostly standardized on DICOM and HL7 format, ECG formats do not have a standard file format. Some of the commonly used file formats for ECG data are SCP-ECG, HL7 aECG, DICOM Supp. 30, IEEE11073, XML-ECG, UNISENS, etc. Work in [173] offers an in-depth review of the existing digital ECG formats. The presence of several formats for ECG poses severe interoperability issues when storing or accessing ECG data to or from the cardiovascular information system (CVIS), respectively. Specifically, the different ECG formats and their transmission options need to be addressed before installation to ensure the transferability of waveforms generated by ECG systems to CVIS. In addition, the data should be able to be shared with hopital's electronic medical records in a usable format. Figure 5 illustrates an overall taxonomy of digital ECG formats and are classified based on [173][174][175] into seven different categories. They are as follows:  [176] is an ECG format based on XML and is an American standard from the American National Institute of Standards (ANSI). The SCP-ECG [177] is a binary encoding ECG format specification approved by the European Committee for Standardization (CEN) and is specifically intended for short-term diagnostic ECGs. Descriptions of the content and structure of the information to be transmitted between digital ECG devices and host ECG systems are presented in this format. The MFER [178] format, a Japanese standard, specializes in medical waveforms (EEG, respiratory waveforms, ECG etc.). This format is sponsored by the Japanese Healthcare Information systems Industry Association (JAHIS). Finally, DICOM Complement 30 [179] is a DICOM expansion for the regulation of biomedical signals such as ECG waveforms.

-
The X73 FamilyVital Signs Information Representation (VSIR) format, ENV 13734, also known as VITAL [180] was one of the first ECG formats in the X73 family and comprises of information and service model of object-oriented domains. The VSIR model is further improved by FEF, ENV 14271 [181] by considering the comprehensive nomenclature of biomedical measurements, comprising of data items observed in intensive care units, anesthesia departments, and clinical labs, including neurology. Finally, an update of both the VSIR and FEF versions is the IEEE P11073-10306 X73PoC (X73-Point of Care) specialization for ECG devices [182] format. The object-oriented design and study of the virtual ECG interface and the virtual medical system knowledge data model exchanged with the ECG are discussed in this format.

Binary Formats
Holter applications utilize a specific ECG format, for recording a large amount of data, which is based on the requirements given by the International Society for Holter and Noninvasive Electrocardiology (ISHNE) [183,184]. The Hierarchical Data Format (HDF) is another binary ECG format that is utilized for high-resolution ECG signals [185]. In particular, HDF offers a collection of file formats and libraries that have been built to store and organize broad numerical data volumes [186]. Work in [187] suggested an improvement to the protocol of SCP-ECG and named it e-SCP-ECG+. More vital signs as well as demographic data can be handled by the revised format while also resolving some of the disadvantages of the previous protocol by creating new tags and parts. 3 XML proposals -General PurposeThe Philips XML format [188] utilizes XML Schema Language and is available online along with the electrocardiograph documentation. This format uses a lossless algorithm to compress the ECG waveform data and utilizes a base 64 encoding scheme to encode the data into ASCII characters. Moreover, Scalable Vector Graphics (SVG) is the design format used by Philips XML and is capable of communicating with other display standards such as HL7 aECG or IHE Fetch ECG [189,190]. I-Med [191] consists of a domain-independent framework for transferring many forms of medical records, including ECG information, which can be explained by primary features such as QRS length and text-based interpretations. Work in [192] proposed a template solution called ecgML, for ECG data representation and exchange, to easily incorporate ECG data into electronic health records (EHRs) and medical guidance. The XML-ECG format was proposed in [193] compared to other XML-based ECG variants, like HL7 aECG which ecgML, and consists of a simple structure of just six modules and is more readable. -Environment SpecificTo overcome the technical limitations of mobile devices, the Mobile ElectroCardioGraphy Markup Language (mECGML) [194], which is a minimal XML format intended primarily for ECG sharing data and storing on smartphones, was proposed. Work in [195] proposed awareness of ECG, which is an XML-based markup language that offers information resources and expands reference criteria for ECG, to log a patient's heart telemonitoring during daily operations. For the storage and archiving of sensor data from multiple recording systems, the Unified Data Format for Multi SENSor Data (UNISENS) format [196] was proposed. Several data types can be recorded in the format, such as events e.g. artifact areas, cause annotations, etc.), constant signals (e.g., thoracic impedance, ECG, acceleration, etc., and other biological values (e.g., breathing rhythm, blood pressure, pulse rate, etc.). The XML-BSPM format was suggested in [197] to promote the Body Surface Potential Map (BSPM) methods and was also checked alongside the Web-based XML-BSPM viewer [198]. 4 Intended for Neurophysiology For the neurophysiology environment, there is a need to record and transmit several biological signals such as the electrooculogram (EOG), the electroencephalogram (EEG) the electromyogram (EMG), etc. The standards developed to manage these signals can also be used to store ECG signals.
-Data Format FamilyOne of the leading initiatives is the data format family that comprises multipurpose protocols. The European Data Format (EDF) [199] is one of the first Data Format Family initiatives and has a 16-bit format designed for time series conversion, like polygraphic storage. In addition, EDF is simpler and supports multiple scaling factors and sampling rates. Furthermore, the EDF protocol was enhanced to EDF+ [200], which included several changes, such as the ability to obtain intermittent records or the support of moment annotations, such as parameters of the ECG. To overcome certain limitations of EDF, the General Data Format (GDF) was proposed in [201] and supports many helpful applications that are not widely implemented in other formats only while providing a common event coding scheme. A 24-bit variant of the EDF 16-bit template, known as BioSemi Data Format (BDF) [201], was proposed that supports EEG, BSPM, and EMG applications. Finally, an XML-based EDF extension is proposed in [202]. This format is defined by Neurotronic and is called the OpenXDF protocol.

-
Others E1467 standard [203] is utilized to enable the free exchange of digital neurophysiological data among different computer systems. For some neurophysiological studies, this framework offers a method for waveform data exchange while also offering the ability to distort and label waveform data. Furthermore, ECG waveforms are also provided by the standard. Another digital biomedical signal format was proposed in [204], known as the signal interchange format (SIGIF), Supporting both raw and interpreted data, multiple mechanisms and representations of the signal, different epochs, and external analysis. The EBS file format [205,206] is binary and is utilized for saving Time-series multichannel recordings and related metadata. Specifically, this format can handle various biomedical data types such as EEG, ECG, MEG, ECoG, and other polygraphic recordings. An XML-based format is proposed in [207] to address the inherent incompatibility of different formats that are utilized for storing digital biomedical time-series signals. Finally, an interleaved file format (IFF) based format for physiological data called IFFPHYS is proposed in [208].

5
DatabasesSeveral ECG databases offer their open data format. For instance, the Physionet database [13] offers the format of the Waveform Database. The Massachusetts Institute of Technology-Beth Israel Hospital (MIT-BIH) [14], the American Heart Association (AHA) [209], CSE [210][211][212], and the PTB-XL [175] are among the other databases. 6 IHE (Cardiology Framework) The goal of the IHE Cardiology System is to incorporate current standards and promote cardiology workflow, sharing information, and patient care. Retrieve ECG for Display (ECG) [213] stable final text is one of the IHE Cardiology System integration profiles and provides enterprise-wide access to ECG documents for analysis using the Portable Document Format (PDF) with vector sketch or the type format of SVG + XML Multipurpose Internet Mail Extensions. The integration profile of the Resting ECG Workflow (REWF) [214] describes the workflow linked to automated electrocardiography. The REWF profile that complies with the requirements outlined in the retrieval ECG document for the display transaction is submitted to the displayable ECGs Waveform Communication Management (WCM) [215] is an upcoming IHE-PCD profile that provides a way to pass near-real-time waveform data between a gateway and a health care information system using ISO/IEEE nomenclature and HL7 v2 observation messages. Instead of bit maps or PDF files, data packets in WCM will comprise raw data. Finally, standard export data format (SEAMAT) [174] was developed by the Japanese Circulation Society to export data belonging to ECG, catheterization, and ultrasound cardiography to external storage. 7 Ontologies ECG ontology based on the SCP-ECG file structure was proposed in [216] to integrate and provide seamless access to heterogeneous sources in the form of an electronic health record [217]. The National Center for Biomedical Ontology (NCBO) Bio-Portal has developed an ontology-based annotation [218] Table 7 shows the survey of current ECG format converters available in the literature. Specifically, the table offers details regarding the format input and output type, whether or not the conversion process is reversible, and a brief description of ECG format converters. This survey is intended to assist the researchers in understanding the relationship among several ECG formats, thereby facilitating them in the selection of an appropriate ECG format for their future ECG systems.

Conclusions and Future Directions
ECG sensors have been studied thoroughly in the literature. However, several distinct aspects of these sensors pose significant challenges for the researchers, clinicians, and other users to select these devices based on their requirements. In this article, a comprehensive survey of ECG sensors from the perspective of their hardware components, software algorithms and data format interoperability is carried out. The hardware perspective is covered by introducing the general hardware architecture of an ECG sensor and categorizing it into three main units: sensing, communication and battery unit. In addition, several components and technologies belonging to these units are briefly discussed. In the software perspective, various techniques including denoising, machine learning and deep learning used in processing of ECG signals are discussed while also introducing the other computer paradigms such as cloud computing and smartphone-based applications that facilitates in the development of ECG monitoring systems. In addition, a survey of existing literature on ECG monitoring software architectures is carried out by highlighting the usage of these techniques and computer paradigms followed by a study on the existing privacy preservation techniques used in ECG monitoring systems. Finally, in the ECG data format interoperability perspective, a taxonomy of several ECG formats is provided comprising of a brief description on each of the individual format. Moreover, a survey on existing converters for different ECG formats is carried out, thereby highlighting the relationship among these formats. Overall, this article assists researchers in identifying future room for improvements from the three perspectives (hardware, software, and format interoperability) and facilitates the development of modern ECG sensors that are suitable and approved for adoption in real clinical settings. As part of the future directions, an investigation on robotics and healthcare automation and its impact on the current and nextgeneration monitoring systems will be carried out. Moreover, another possible research direction would be to explore ways to better integrate several IoT technologies and other connected devices (especially when the patient is in a mobile unit such as an ambulance) for the enhancement of the current ECG monitoring systems.

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript: