Efficient lossless compression scheme for multi-channel ECG signal processing

Efficient lossless compression scheme for multi-channel ECG signal processing

Biomedical Signal Processing and Control 59 (2020) 101879 Contents lists available at ScienceDirect Biomedical Signal Processing and Control journal...

2MB Sizes 0 Downloads 64 Views

Biomedical Signal Processing and Control 59 (2020) 101879

Contents lists available at ScienceDirect

Biomedical Signal Processing and Control journal homepage: www.elsevier.com/locate/bspc

Efficient lossless compression scheme for multi-channel ECG signal processing Tsung-Han Tsai ∗ , Fong-Lin Tsai Department of Electrical Engineering, National Central University Taoyuan, Taiwan

a r t i c l e

i n f o

Article history: Received 6 March 2019 Received in revised form 3 January 2020 Accepted 8 February 2020 Keywords: Lossless compression Multi-channel ECG signal Telemedicine Golomb-Rice codec Linear prediction

a b s t r a c t Electrocardiogram (ECG) represents the recording of the heart’s electrical activity and is used to diagnose heart disease nowadays. The diagnosis requires huge time consumption for acquiring enough multichannel data. The storage and transmission of 12 lead ECG data results in massive cost. In this work, we propose a multi-channel ECG lossless compression which uses the adaptive linear prediction for intra and inter channel decorrelation. We also use the adaptive Golomb-Rice codec for entropy coding. The proposed technique for adaptive linear prediction and Golomb-Rice codec is based on the performance of passed samples. Thus, the coefficient of linear prediction and Golomb-Rice codec will make self-adjustments during the process. We evaluate the proposed algorithm with MIT-BIH Arrhythmia database for single-channel compression, and Physikalisch-Technische Bundesanstalt database (PTB) for multi-channel compression. The overall compression scheme is also implemented in embedded system with an ARM Cortex-M4 processor for real-time demonstration. © 2020 Published by Elsevier Ltd.

1. Introduction In recent years, cardiovascular disease has become an important cause of death. Monitoring electrocardiogram is the most used method for diagnosis of cardiovascular disease. Multi-channel electrocardiogram (ECG) provides full information of heart electrical activity simultaneously for a better diagnosis of every cardiovascular conditions. In reality, multi-channel ECG data will be recorded continuously for hours, accompanied by a huge amount of data. Furthermore, the rise of wearable devices has started a new generation of telemedicine. Nowadays, ECG recorder is not only being used in hospital but also in mobile device. The large cost of storage and data transmission has been a challenge for mobile devices. Most ECG compression techniques are proposed with lossy mode to gain better compression rate [1–3]. Although data recovery in lossy mode has been brought in acceptable range, yet it may cause some information loss. Consequently, lossless ECG data compression is proposed to prevent any data loss during the data analysis for diagnosis of diseases. This technique can effectively reduce the number of bits that are necessary to store and transmit while maintaining the data quality without any distortion. ECG signal compression technique is divided into three types [4,5], as shown in Fig. 1. The first type is direct time domain

∗ Corresponding author. E-mail addresses: [email protected], [email protected] (T.-H. Tsai). https://doi.org/10.1016/j.bspc.2020.101879 1746-8094/© 2020 Published by Elsevier Ltd.

technique, which includes Delta pulse code module (DPCM) [6], Turing point (TP), Fan technique, Amplitude zone time epoch coding (AZTEC) [7] and ASCII character encoding [8]. The second type of compression is domain conversion technique. The ECG signal in the time domain is converted to the frequency or other domain and the data compression action is performed after the conversion. Examples include Wavelet transform [9,10], Fourier technique and discrete cosine transforms [11,12]. Most of the lossy compression schemes are part of domain conversion technique. The third type of compression technique is based on parameter extraction. This technique extracts and records the main features and parameter of ECG signal and compresses it based on the extracted parameters. Linear prediction and the neural network, which are most popular nowadays, are examples of parameter extraction-based compression. For lossless compression, the features of the ECG signal are used with a lossless encoding technique to achieve the compression. There are many related works on lossless ECG compression. In [13], the lossless compression technology achieved the lossless compression by the traditional Delta pulse code module. However, the Delta pulse code module does not minimize prediction errors [14,15] used Huffman coding as the entropy coding of the entire compression process. However, Huffman coding requires additional memory to hold the Huffman table. In [16], Huffman coding is used to achieve lossless compression based on the characteristics of the QRS wave of the ECG signal and K-means clustering method. Although Huffman coding can establish an appropriate

2

T.-H. Tsai and F.-L. Tsai / Biomedical Signal Processing and Control 59 (2020) 101879

Fig. 2. Encoding scheme block diagram.

2. Lossless ECG compression

Fig. 1. ECG Signal.

Huffman table for the probability of signal, it is necessary to have statistical analysis on the probability distribution of the data before encoding. The Huffman table should be reserved and passed into the decoder for signal reconstruction. Moreover, when used in a real environment, the method must consider the interference of some noise, which reduces the cluster efficiency, resulting in a decrease in compression ratio. In [17], the currently popular neural network method is used. Although the compression efficiency of this compression technology can achieve outstanding performance, it requires the powerful hardware to support a huge amount of computing. The power consumption for neural network is much larger than the traditional algorithms. To extend the compression from single to multi-channel, some extra design is added to improve the compression ratio, such as inter-channel dependency analysis. The compression technology especially for multi-lead ECG signals, such as [18] uses the Moving Pictures Experts Group audio lossless compression standard (MPEG4-ALS). It was originally applied to audio compression, and then to multi-lead ECG signals. However, such an MPEG-based codecs involve complex operations [19] also used multi-channel linear prediction with MPEG4-ALS to achieve outstanding compression efficiency. But its multi-lead linear prediction calculates the parameters of the predictor by linear regression. Although this method can improve the accuracy, yet due to large number of calculations for linear regression, the computational complexity is quite large compared to other compression techniques. In this work, we aim to develop a real-time ECG compression scheme which is suitable to be implemented in low-cost processor. Our goal is that ECG compression system can be easily targeted to be implemented as an embedded system and mounted in the consumer electronics. We propose a multichannel ECG compression technique which exploits intra-channel and inter-channel correlation to remove redundancy in lossless mode. We use the encoder of “Reduced lead ECG” [20,21] as multi-channel linear predictor for reduce inter-channel redundancy. The adaptive linear prediction technique is also used with exponential weighting technique [22,23] for reduce intra-channel redundancy. The entropy coding consists of self-adjusted Golomb-Rice codec which means the parameter of Golomb-Rice codec will self-adjust based on forward entropy. The performance evaluated by compression ratio (CR) shows that the proposed system performed well than previous works. The paper is organized as follows: first we introduce the overview of lossless encoder architecture in Section 2. In Section 3, the overall system design for the proposed compression scheme is discussed. Section 4 contains the experimental result for single/multi-channel ECG compression, evaluation for power consumption, and the comparison with existing methods. Finally, the conclusions are discussed in Section 5.

The proposed lossless ECG compression scheme consists of three elements. Original ECG data is fed into Multi-channel Linear Prediction unit (MLP) to create the approximation of different ECG channels. The ECG signals generated from MLP are subtracted by original ECG channel respectively to form a set of residuals for each channel. The residual channels are fed into adaptive linear prediction unit (LP) to reduce the intra-channel redundancy. To improve the compression efficiency, we propose a self-adjusted GolombRice codec. The block diagram of proposed compression encoding scheme is shown in Fig. 2. 2.1. Multi-channel linear prediction The main challenge in multi-channel ECG compression is the decorrelation of the ECG channels. The decorrelation can be achieved by using multi-channel linear prediction technique to remove the redundancy between channels. Multi-channel linear prediction can be implemented on the basis of inter-channel correlation over a large number of samples for multiple or individual patient’s data for high prediction accuracy. Currently, 12 lead channels are used to create ECG data for further usage. The redundancy between 12 lead ECG signal can be removed by choosing reference set of ECG channels and the predicted value can be calculated using (1); Xˆ p,j (n) =

k 

hj,i Xr,i (n)

(1)

i=1

where Xˆ p,j (n) is predicted value of nth sample in prediction channel j, Xr,i (n) is nth sample of reference channel i and hj,i is the predictor coefficient. As mentioned, both generalized and patient specific multichannel linear prediction exist. We choose generalized mode in order to fit our system for all type of ECG data. In this work, we introduce the result of [21] as multi-channel linear predictor. Reduced lead ECG uses few leads than traditional 12-lead ECG. Therefore, it is more convenient in the situation of long-term ECG monitoring. We choose 4 leads of ECG, I, II, V1, V5, as reference leads and use the result of reduced-lead ECG to predict the rest, III, aVR, aVL, aVF, V2, V3, V4, V6 by using (2) to (9) where (6) to (9) are based on the work of [21]. III = II − I

(2)

− (I + II) aVR = 2

(3)

aVF =

(II + III) 2

(4)

aVL =

(I − III) 2

(5)

V2 = (0.887330 ∗ I) − (0.09116 ∗ II) + (1.57862 ∗ V1) + (0.230214 ∗ V5) V3 = (0.245068 ∗ I) + (0.447773 ∗ II) + (1.14726 ∗ V1) + (0.609744 ∗ V5)

(6)

(7)

T.-H. Tsai and F.-L. Tsai / Biomedical Signal Processing and Control 59 (2020) 101879

3

Fig. 3. Prediction of V4 lead signal (a)Original signal (b) Predicted signal (c) Redundancy set.

V4 = (0.111111 ∗ I) − (0.064849 ∗ II) + (1.57862 ∗ V1) + (0.230214 ∗ V5) V6 = (0.202721 ∗ I) − (0.038811 ∗ II) − (0.176913 ∗ V1) + (0.59492 ∗ V5)

(8)

(9)

Fig. 4. Prediction error of different order linear predictor (a) Source (b) 1st order (c) 2nd order (d) 4th order.

Finally, we subtract the original ECG channel with predicted channel to form the redundancy set of predicted channels. The result of predicted channel and redundancy set are shown in Fig. 3 where x-axis represents sample index and y-axis represents amplitude. xp (n) = Xp (n) − Xˆ p (n)

(10)

where xp (n) is the prediction error of nth sample and Xp (n) is nth sample of original prediction channel. 2.2. Adaptive linear prediction In ECG signal, there are some steep states such as P, Q, R, S, and T wave. These waves will cause high prediction error. In order to reduce the overall error, we use different predictors for different conditions to improve the efficiency. We propose an adaptive linear prediction based on fuzzy theory, and exponential weighting technique to reduce the prediction error as much as possible. Linear prediction is used to estimate the current sample from the past sample as following xˆ (n) =

m

i=1

ai x (n − i)

where xˆ (n) is the prediction value of x (n), m is the order of predictor and ai is a coefficient. We use the first order linear prediction which have better performance at flat region. The second and fourth order linear prediction with exponential weighting technique for other regions are used to gain better performance at steep regions. The different order of linear prediction is described as following. Fig. 4 shows the higher order linear predictor, where x-axis represents sample index and y-axis represents amplitude, which has better performance in steep region and 1st order linear predictor has better performance in flat region. 1st order : xˆ i (n) = xi (n − 1)

(12)

2nd order : xˆ i (n) = 2xi (n − 1) − xi (n − 2)

(13)

4th order : xˆ i (n) = 4xi (n − 1) − 6xi (n − 2)

Fig. 5. Adaptive linear prediction scheme flow.

(11)

(14)

+4xi (n − 3) − xi (n − 4) The proposed adaptive-linear prediction scheme is shown in Fig. 5, First, we use the correlation between the past sample to estimate where the current sample is. It is calculated by the difference between two samples. If the difference between xi (n − 1) and xi (n − 2) and the difference between xi (n − 3) and xi (n − 2) are

Fig. 6. Exponential weighting scheme.

both less than threshold, we assume the current sample is located at flat region. Once the sample is located at flat region, first order linear prediction will be applied. Otherwise 2nd and 4th order linear prediction with exponential weighting technique will be applied. For steep region, exponential weighting technique is applied. The scheme of exponential weighting is shown in Fig. 6. The final predicted value of sample is the weighting average of outputs of 2nd and 4th order linear predictor. ωr (n) = 2C−er (n)

xˆi (n) =

ω2 (n) xˆi2 + ω4 (n) xˆi4 ω2 + ω4

(15)

(16)

4

T.-H. Tsai and F.-L. Tsai / Biomedical Signal Processing and Control 59 (2020) 101879

Fig. 7. Prediction error of proposed adaptive linear prediction (a)Source data (b) Prediction error.

where C is a constant and er (n) denotes the average prediction error of a predictor at time n. ωr (n) is the weight of r order predictor that will decay based on er (n). Since the ECG signal is a non-linear system referring to its prediction error, we average the past three prediction errors as er (n). To form the final residual set, we subtract the output of MLP from output of linear prediction as following: e (n) = x (n) − xˆ (n)

(17)

where e (n) denotes predict error, which feeds into entropy coding unit. Fig. 7 shows the final predict error of a channel. We convert the 1st predict error to binary directly as a seed. For 1st to 4th sample, we use 1st order predictor directly since there are not enough samples to determine the sample location. Since ECG does not have deterministic properties, we take advantage of the trend of the first four signals to simplify uncertainty of flat and non-flat situations. Then uncertainty problem are solved by matching the corresponding predictor. If sample is in a flat band, the first order predictor is used, the second and fourth order predictors are used to match the weighted averaging technique if sample is in the non-flat region. Although it is not robust to use fixed coefficients in linear prediction yet it can reduce the computational complexity of updating the coefficients and can achieve the fast computation time. 2.3. Golomb-rice codec Golomb coding depends on the entropy and geometric distribution. Geometric distribution is quite suitable for modeling data distribution with higher probability of smaller values. In particular, a Rice code corresponds to a Golomb code in which the parameter is a power of two. Since the value of ECG data is tend to have Laplace distribution, Golomb code is quite suitable for such distribution. However, since the prediction error may be negative value, it is necessary to translate the negative value to positive value. The mapping function is shown in (18), and the predicted value e(n) will be rounded to the integer.



E (n) =

2e

,

e

≥0

(n)  (n)  2 e (n) − 1, e (n) < 0

(18)

Originally one bit for sign is recorded directly. We use the mapping method which saves one bit while the absolute value of negative value is equal to power of two. Thus, it can gain a better compression performance. The Golomb-Rice code consists of the value of quotient and remainder, as shown in (19).

⎧ ⎨ ⎩

quotient =

Fig. 8. Relation between prediction error and K parameter (a) Prediction error after mapping (b)Trend of k parameter.

where k is positive parameter and it represents number of bits for remainder, and E (n) is the prediction error after mapping. The unary and binary codes are used to encode quotient and remainder respectively. An isolated bit ‘0 is inserted between quotient and remainder in bitstream. The number of bits used per sample could be counted easily with Q+1+k bit. Since the efficiency of Golomb-Rice code is sensitive to k parameter, this work proposes a self-adaptive Golomb-Rice prediction code that will adjust k parameter based on the past three errors. The concept of this method is that the prediction error in neighbor will locate nearby in distribution. The forward three prediction errors are used to determine k parameter by Mean Absolute Error (MAE) as shown in (20) and (21). This method can optimize the k parameter to present the predict error without any side information required for decoder. MAE (E (n)) =

 N  E (n) n=1

N

k = log2 MAE (E)

(20) (21)

Fig. 8 shows the trend in change of k parameter. In the steep region, prediction error is higher and will have bigger k parameter after calculations. We fix k value to 1 for first three prediction errors since from 1st to 3rd prediction error does not have enough references to calculate k value. 3. System implementation The proposed multi-channel ECG compression scheme is also implemented on STM32f429 Discovery development board. The overall system is illustrated by Fig. 9. The whole system carries an ECG signal measuring device for providing 12 channel ECG signals. 12 channel ECG signals are transmitted to development board by RS232 protocol communication. The compressed bitstream is then transmitted by Bluetooth. The device such as laptop can receive and decode compressed bitstream immediately and record the signals. Finally, on the PC/Mac device, the compression results can be decoded after Bluetooth transmission. The verification can be performed whether the compressed result is the same as the input signal. Power supply of all system including Bluetooth module and development board is 5 V through USB cable. The discussion on saving the power consumption with the proposed scheme is provided in Section 4. 3.1. ECG measuring device

E (n) 2k

remainder = E (n) mod2k

(19)

The ECG measuring device has sampling rate of 600 Hz with 10bits resolution for all twelve-channel data. With Direct Memory Access (DMA) technique within development board, ECG mea-

T.-H. Tsai and F.-L. Tsai / Biomedical Signal Processing and Control 59 (2020) 101879

5

Table 1 Performance comparison with other algorithm in MIT-BIH Arrhythmia database. Ref

Technique

Avg. CR

[13] [15] [26] [27] [28]

Delta coding + zero run-length encoding Adaptive linear prediction + two stage Huffman coding Adaptive region prediction + variable length coding Peak detection + backward difference Huffman coding Adaptive linear prediction + content adaptive Golomb-Rice coding Adaptive linear prediction + Golomb-Rice coding

2.11 2.53 2.67 2.64 2.77

proposed

Fig. 9. The whole system architecture.

2.89

of Golomb-Rice decoding is converted into prediction errors with positive and negative numbers. After the mapping, the first fourth prediction errors are restored via differential coding. The remaining prediction errors are updated according to the first three data and prediction is performed afterwards. The prediction is performed according to the adaptive linear prediction process as shown in Fig. 4 and then combined with the prediction error to reduce the redundancy set. We use the redundant set of reference leads I, II, V1, V5, as well as their original signals. The four reference leads obtain the predicted values of the remaining leads according to the multi-path linear prediction. The predicted values are combined with the redundancy set to reconstruct signals of the remaining leads. The decompression of the ECG signals is thereby completed. 4. Performance and power consumption evaluation

Fig. 10. Decoding scheme block diagram.

suring device transmits twelve channels ECG data to memory of development board directly with RS232 protocol communication. 3.2. Embedded system platform The system STM32f429 discovery consists of an ARM Cortex-M4 base 32-bit MCU from STMicroelectronics. Its operating frequency can be up to 180 MHz, which is used for data compression in this work. The development board offers a direct memory access technique (DMA) for ECG measuring device accessing memory directly, and is connected with Bluetooth module with UART as output of compressed data. We also construct the user interface where the information of proposed scheme such as compression ratio and number of processed samples is displayed on LCD panel. 3.3. Bluetooth module HL-MD08R-C2A Bluetooth module is used, which supports baud rate from 1.2k to 921.6k bps. In this work, Bluetooth module is connected to development board using UART interface and baud rate is set to 230400 bps. 3.4. Decoding & verification As shown in Fig. 10, the first three prediction errors are used to calculate k value of the current prediction error and then use ¨ a counter to calculate several consecutive 1¨ bits while performing Golomb-Rice decoding on bitstream. When we encounter the isolation bit 0¨ ¨, counter is stopped and the quotient is calculated. After reading k bits, the remainder is restored. Finally, the quotient, the remainder and the k values are combined to restore the prediction error e (n) of each lead. Due to the limitations of Golomb-Rice coding, we use the mapping method to map all prediction errors to prediction errors with only positive numbers. We also use the inverse conversion mode as shown in (18). It means the result

In this section, we analyze the compression efficiency with two public databases, and compare to existing works for single channel ECG compression and multi-channel ECG compression respectively. We also evaluate the power consumption based on the real development board with and without proposed compression scheme. As different datasets have different sampling frequencies, different codes have been implemented for to process different frequencies’ dataset. 4.1. Performance evaluation The MIT-BIH Arrhythmia database [24] and MIT-BIH PTB diagnostic database [25] are used to evaluate the performance of the proposed work. With two ambulatory channels, the MIT-BIH Arrhythmia database is used as a benchmark for 48 half-hour ECG recordings. In the 10 mV range the sampling frequency of data is in 11-bit resolution at 360 Hz. PTB database contains the recordings of 249 subjects with total 548 ECG recordings. The ECG recordings contain 12-lead ECG data with 16-bit resolution and 1000 Hz sample rate. Most of records are recorded for 2 min. In order to evaluate the performance in lossless mode, we calculate the compression ratio (CR) as following; Compression ratio =

So Sc

(22)

where So are the bits used in original data, and Sc are the number of bits after the compression. First, we evaluate the performance for single-channel compression with MIT-BIH Arrhythmia database. Since this evaluation was limited to single channel, the performance only relied on the linear prediction and Golomb-Rice code. The proposed compression scheme has an average compression ratio of 2.809. The maximum is 3.331 and the minimum is 2.766. Table 1 shows the comparison between the proposed method and relative techniques. In [13], a traditional delta coding achieved the CR of 2.11. However, delta coding does not minimize the prediction error [15] used Huffman coding as its entropy coding but it required additional memory to save Huffman table. In the proposed algorithm, it can improve CR

6

T.-H. Tsai and F.-L. Tsai / Biomedical Signal Processing and Control 59 (2020) 101879

Fig. 11. Distribution of CR (a) with MLP (b) without MLP.

Fig. 12. Current consumption of development board (a) w/o any processing (b) w/ proposed compression.

Table 2 Performance comparison with other algorithms in PTB database.

Table 3 Performance with/without MLP unit in PTB database.

Ref

Technique

Avg. CR

[18] [29] [30] proposed [19]

MPEG4-ALS fast search + MPEG4-ALS joint-coding decision method + MPEG4-ALS MLP + LP + Golomb-Rice coding Multi linear regression + MPEG4-ALS

3.22 3.25 3.41 4.073 6.7

about 6% over [26], and [27] and 1.4% over [28]. Although [16] and [17] can offer better compression efficiency [16], is hard to apply since there are different kinds of noise during data acquiring. The result of cluster may get worse due to noise [17] used the neural network-based method. However, it requires strong computing hardware to support the parallel computation. Next, we evaluate the performance for multi-channel compression with PTB database. Fig. 11(a) shows the distribution of compression rate in PTB database. The proposed compression scheme has an average compression ratio of 4.073. The maximum is 5.71 and the minimum is 4.079. Table 2 shows the comparison between the proposed method and relative techniques. [18,29] and [30] used MPEG4-ALS for multi-channel ECG compression and it can achieve CR of 3.22 to 3.41 [16] used multi-channel linear regression with MPEG4-ALS to achieve outstanding compression efficiency. However, multi-lead linear regression calculates the parameters of the predictor by linear regression and MPEG-based codec is a complex framework. We also evaluate the effect of MLP unit by PTB database with/without MLP unit. The distribution is shown in Fig. 11(b). The average of compression ratio is 3.18. The

Avg CR w/ MLP w/o MLP

4.073 3.18

maximum is 4.52 and the minimum is 3.16. The performance is shown in Table 3. With MLP unit, the compression ratio can achieve 33% improvement. 4.2. Power consumption evaluation We construct the real system to measure the power consumption. A shunt resistor is placed in series with mobile power supply (5 V). The voltage drop across shunt resistor is acquired with oscilloscope. We evaluate the power consumption of proposed compression scheme on development board first. Fig. 12(a) shows the current wave in idle state without any processing which is 72.2 mA in average. Fig. 12(b) shows the current wave is shown with the operation for proposed compression. With proposed compression scheme, the current of development board is increased to 74.3 mA in average to process the arithmetic computing for compression method by providing additional 2.1 mA current. To evaluate power consumption of Bluetooth module alone, we modify the setup scheme by placing a shunt resistor in series between mobile power supply and Bluetooth module. The power consumption of Bluetooth depends on the state of the link which can be idle, connected and transmitting. Fig. 13 shows the current

T.-H. Tsai and F.-L. Tsai / Biomedical Signal Processing and Control 59 (2020) 101879

7

Fig. 13. Current consumption of Bluetooth in different state (a) Idle (b) Connected.

Fig. 14. Current consumption of Bluetooth (a) transmitting raw data (b) transmitting compressed bitstream.

wave over time for idle and connected state. The average current of Bluetooth in idle state is 4 mA and the average current of Bluetooth in connected state is 25.7 mA. To evaluate the impact of proposed compression scheme on Bluetooth power consumption, we transmit the input sample directly (no compression) and the compressed data bitstream respectively, and compare the difference of power consumption. The current wave of direct transmission is shown in Fig. 14(a). The average current is 39.8 mA. The current wave while transmitting compressed bitstream is shown in Fig. 14(b). The average current is 30.5 mA. When comparing Fig. 14(a), (b), the number of pulses in Fig. 14(b) are less than Fig. 14(a). It means the power consumption will decrease because proposed compression scheme will reduce the frequency of data transmission. With proposed compression scheme, although we have to provide additional power to development board for computing, we save the transmission power while performing data communication. In our experimental setup, we save 36.5 mW in average. The proposed work has not been compared with the references in Tables 1 and 2 because of lack of current consumption information. Moreover, the work of [13,15], and [26] provide the current information but, their work is related to VLSI implementation and VLSI based systems always have less power consumption than embedded systems. The work in [30] has been implemented in VLSI and it does not provide any information about the current consumption. 5. Conclusion This paper proposed a multi-channel lossless ECG compression algorithm. We use multi-channel linear prediction method for

inter-channel decorrelation. For intra-channel decorrelation, we proposed an adaptive liner prediction with exponential weighting technique where the selection of predictor is determined by performance of each predictor. In the encoding unit, self-adaptive Golomb-Rice coding is proposed. Golomb-Rice threshold parameter is adjusted during the computation based on the distribution of prediction error. One of the important goals of the proposed system is to target the implementation on any embedded system which can be mounted in the consumer electronics. Thus, the overall system is implemented in low cost development board to demonstrate the telemedicine ECG monitoring system. The power consumption is also evaluated to present the power saving result. The proposed method shows better performance compared to the reported existing methods.

CRediT authorship contribution statement Tsung-Han Tsai: Conceptualization, Methodology, Writing review & editing. Fong-Lin Tsai: Data curation, Software.

Acknowledgement We thank physiobank for providing ECG signal database, and also to those who gave suggestions and comments on our papers. This work was supported in part by the Ministry of Science and Technology, Taiwan, under Grant MOST 108-2221-E-008-078MY3.

8

T.-H. Tsai and F.-L. Tsai / Biomedical Signal Processing and Control 59 (2020) 101879

Declaration of Competing Interest The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper. Appendix A. Supplementary data Supplementary material related to this article can be found, in the online version, at https://doi.org/10.1016/j.bspc.2020.101879. References [1] A. Singh, S. Dandapat, Block sparsity-based joint compressed sensing recovery of multi-channel ECG signals, Healthc. Technol. Lett. 4 (April (2)) (2017) 50–56. [2] A. Singh, S. Dandapat, Exploiting interchannel correlations in multichannel compressed sensing ECG systems, 2015 IEEE UP Section Conference on Electrical Computer and Electronics (UPCON) (2015) 1–7. [3] A. Singh, J.J. Nallikuzhy, S. Dandapat, Compressed sensing framework of data reduction at multiscale level for eigenspace multichannel ECG signals, 2015 Twenty First National Conference on Communications (NCC) (2015) 1–6. [4] R.P. Tripathi, G.R. Mishra, Study of various data compression techniques used in lossless compression of ECG signals, 2017 International Conference on Computing, Communication and Automation (ICCCA) (2017) 1093–1097. [5] R. Tornekar, S. Gajre, Comparative Study of Lossless ECG Signal Compression Techniques for Wireless Networks, Comput. Cardiol. Conf. 44 (2017) 1–4, 2018. [6] S. Alam, R. Gupta, A DPCM based electrocardiogram coder with thresholding for real time telemonitoring applications, 2014 International Conference on Communication and Signal Processing (2014) 176–180. [7] J.R. Cox, F.M. Nolle, H.A. Fozzard, G.C. Oliver, AZTEC, a preprocessing program for real-time ECG rhythm analysis, IEEE Trans. Biomed. Eng. BME-15 (April (2)) (1968) 128–129. [8] S.K. Mukhopadhyay, M.O. Ahmad, M.N.S. Swamy, An ECG compression algorithm with guaranteed reconstruction quality based on optimum truncation of singular values and ASCII character encoding, Biomed. Signal Process. Control 44 (July) (2018) 288–306. [9] K. Luo, J. Li, J. Wu, A dynamic compression scheme for energy-efficient real-time wireless electrocardiogram biosensors, IEEE Trans. Instrum. Meas. 63 (9) (2014) 2160–2169. [10] M.S. Manikandan, S. Dandapat, Wavelet-based electrocardiogram signal compression methods and their performances: a prospective review, Biomed. Signal Process. Control 14 (November) (2014) 73–107. [11] A. Bendifallah, R. Benzid, M. Boulemden, Improved ECG compression method using discrete cosine transform, Electron. Lett. 47 (2) (2011) 87. [12] C.K. Jha, M.H. Kolekar, Electrocardiogram data compression using DCT based discrete orthogonal Stockwell transform, Biomed. Signal Process. Control 46 (September) (2018) 174–181. [13] W.-J. Chen, C.-C. Lu, Y.-H. Jiang, H.-W. Fang, FPGA design and verification for lossless ECG coding compression, 2017 6th International Symposium on Next Generation Electronics (ISNE) (2017) 1–3.

[14] K.J. Lin, H.H. Huang, Y.Y. Lin, An FPGA implementation of lossless ECG compressors based on multi-stage Huffman coding, 2018 IEEE 7th Global Conference on Consumer Electronics (GCCE) (2018) 132–133. [15] G.A. Luo, S.L. Chen, T.L. Lin, VLSI implementation of a lossless ECG encoder design with fuzzy decision and two-stage Huffman coding for wireless body sensor network, ICICS 2013 – Conf. Guid. 9th Int. Conf. Information, Commun. Signal Process (2013) 1–4. [16] Q. Zhou, Study on ECG data lossless compression algorithm based on K-means cluster, 2009 Int. Conf. Futur. Comput. Commun. FCC 2009 (2009) 91–93. [17] C.-K. Tseng, L.-J. Kau, W.-Y. Cheng, A Takagi-Sugeno fuzzy neural network-based predictive coding scheme for lossless compression of ECG signals, TENCON 2017 – 2017 IEEE Region 10 Conference (2017) 1646–1660. [18] Y. Kamamoto, N. Harada, T. Moriya, Interchannel dependency analysis of biomedical signals for efficient lossless compression by MPEG-4 ALS, 2008 IEEE International Conference on Acoustics, Speech and Signal Processing (2008) 569–572. [19] N.P. Sgouros, I.P. Constantinou, G.K. Loudos, S.A. Kossida, Use of the MPEG-4 ALS architecture and inter-channel prediction for multi-channel ECG coding, 2007 IEEE International Symposium on Signal Processing and Information Technology (2007) 754–759. [20] P. Kaewfoongrungsi, D. Hormdee, The comparison between linear regression derivings of 12-lead ECG signals from 5-lead system and EASI-lead system, 2017 17th International Symposium on Communications and Information Technologies (ISCIT) (2017) 1–6. [21] J.Q. Xue, Adapting ECG morphology changes from reduced-lead set by specifically trained algorithms for acute ischemia detection, 2007 Computers in Cardiology (2007) 709–712. [22] A.C. Singer, M. Feder, Universal linear prediction by model order weighting, IEEE Trans. Signal Process. 47 (10) (1999) 2685–2699. [23] G. Dufort y Alvarez, et al., Wireless EEG system achieving high throughput and reduced energy consumption through lossless and near-lossless compression, IEEE Trans. Biomed. Circ. Syst. 12 (February (1)) (2018) 231–241. [24] G.B. Moody, R.G. Mark, The impact of the MIT-BIH arrhythmia database, IEEE Eng. Med. Biol. Mag. 20 (3) (2001) 45–50. [25] The PTB Diagnostic ECG Database [Online]. Available: https://physionet.org/ physiobank/database/ptbdb/. (Accessed 22 July 2019). [26] F. Chen, Y. Pan, R. Huan, K.-T. Cheng, K. Li, Real-time lossless ECG compression for low-power wearable medical devices based on adaptive region prediction, Electron. Lett. 50 (25) (2014) 1904–1906. [27] S.-C. Lai, P.-C. Tail, M.-K. Lee, S.-F. Lei, C.-H. Luo, Prototype system design of ECG signal acquisition with lossless data compression algorithm applied for smart devices, 2018 IEEE International Conference on Consumer Electronics-Taiwan (ICCE-TW) (2018) 1–2. [28] T.-H. Tsai, W.-T. Kuo, An efficient ECG lossless compression system for embedded platforms with telemedicine applications, IEEE Access 6 (2018) 42207–42215. [29] Y. Kamamoto, et al., An efficient lossless compression of multichannel time-series signals by MPEG-4 ALS, 2009 IEEE 13th International Symposium on Consumer Electronics (2009) 159–163. [30] D.-S. Kim, J.-S. Kwon, A lossless multichannel bio-signal compression based on low-complexity joint coding scheme for portable medical devices, Sensors 14 (September (9)) (2014) 17516–17529.