- Open Access
S-EMG signal compression based on domain transformation and spectral shape dynamic bit allocation
- Marcel Henrique Trabuco†1,
- Marcus Vinícius Chaffim Costa†1, 2 and
- Francisco Assis de Oliveira Nascimento1Email author
© Trabuco et al.; licensee BioMed Central Ltd. 2014
- Received: 31 October 2013
- Accepted: 18 February 2014
- Published: 27 February 2014
Surface electromyographic (S-EMG) signal processing has been emerging in the past few years due to its non-invasive assessment of muscle function and structure and because of the fast growing rate of digital technology which brings about new solutions and applications. Factors such as sampling rate, quantization word length, number of channels and experiment duration can lead to a potentially large volume of data. Efficient transmission and/or storage of S-EMG signals are actually a research issue. That is the aim of this work.
This paper presents an algorithm for the data compression of surface electromyographic (S-EMG) signals recorded during isometric contractions protocol and during dynamic experimental protocols such as the cycling activity. The proposed algorithm is based on discrete wavelet transform to proceed spectral decomposition and de-correlation, on a dynamic bit allocation procedure to code the wavelets transformed coefficients, and on an entropy coding to minimize the remaining redundancy and to pack all data. The bit allocation scheme is based on mathematical decreasing spectral shape models, which indicates a shorter digital word length to code high frequency wavelets transformed coefficients. Four bit allocation spectral shape methods were implemented and compared: decreasing exponential spectral shape, decreasing linear spectral shape, decreasing square-root spectral shape and rotated hyperbolic tangent spectral shape.
The proposed method is demonstrated and evaluated for an isometric protocol and for a dynamic protocol using a real S-EMG signal data bank. Objective performance evaluations metrics are presented. In addition, comparisons with other encoders proposed in scientific literature are shown.
The decreasing bit allocation shape applied to the quantized wavelet coefficients combined with arithmetic coding results is an efficient procedure. The performance comparisons of the proposed S-EMG data compression algorithm with the established techniques found in scientific literature have shown promising results.
- Spectral Shape
- Compression Technique
- Arithmetic Code
- Compression Factor
- Entropy Code
Surface Electromyographic Signals (S-EMG) have attracted greater attention from areas that deal with physiotherapy, biomechanics, sports and orthopedic medicine. Two main reasons may be reported upon: 1) S-EMG allows accessing the muscular structure and function through a non-invasive process and; 2) technologies associated with the acquisition and treatment of signals have reached a level where studies and applications based on surface electromyography have become viable.
Applications in biomechanics associated with cutting-edge sports activities may have experimental protocols that last more than fifteen minutes. Constructing an S-EMG signal data bank is important in that it makes it possible to develop research aimed at understanding physiological processes, establishing new objective parameters for analysis (for example, muscle fatigue indicators) and proposing new protocols for training in order to achieve the level of quality desired in a shorter time and without causing injuries to athletes. Storing great quantities of digitized S-EMG signals especially, those whose protocols have long durations, brings about the need for large amounts of mass memory for storing information of interest. Storage also requires an extended time for allocating channels of communication for transferring the experiment data carried out in the field (for example, experimental protocols in a cycling velodrome). Scanning an S-EMG signal involves sampling the signal which generally varies between 1 kHz and 4 kHz and quantization with a 2 byte digital word length per sample (the majority of electromyograms use 12 bit to 16 bit A/D converters). Coding with fewer bits for representing the S-EMG signal waveforms, while avoiding any significant degradation to the original information, constitutes the goal of this work.
Many different approaches for S-EMG signal compression may be found in scientific literature involving parametric coding [1, 2] and waveforms coding [2, 3]. Carotti et al.  proposed a linear prediction technique dedicated to S-EMG which has the advantage of low computational cost and a great gain in compression. Nevertheless, although this process is able to make a good approximation of the spectral envelope of the signal magnitude, phase information cannot be preserved. This leads to degradation of the reconstructed waveform when compared with the original. An improvement in performance may be obtained by using algorithms such as ACELP–Algebraic Code-Excited Linear Prediction . On the other hand, the waveform coders have a significantly greater performance than the linear prediction when compared to the compression gain versus the signal to noise ratio. In consequence, there is also a substantial increase in the computational complexity. Norris and Lovely  studied a compression technique based on ADPCM–Adaptive Differential Pulse Code Modulation. Wellig et al.  and Norris et al.  investigated techniques based on a single-tree algorithm that searches for the best bases from the library of wavelet packet bases and modified EZW (Embedded Zero-tree Wavelets). Other techniques based on wavelet transforms seeking optimization of the bases for S-EMG representation may be found in scientific literature [8, 9]. Techniques based on mixed or vector quantization are also present in scientific literature [10–12]. An approach involving learning about the S-EMG spectral shape with the objective of optimizing dynamic bit allocation in the quantization of wavelet transform coefficients is proposed in Berger et al. [13, 14]. The S-EMG signal compression technique based on recurrent patterns, proposed by Filho et al. , performed excellently (compression gain versus signal to noise ratio) in isometrics experimental protocols. Nonetheless, the computational cost is greater than the techniques that utilize wavelet transforms and it is dependent on the size and spectral behavior of the signal data bank.
Multidimensional techniques may also be found in scientific literature, Carotti et al. [16–18] which have approaches based on linear prediction for application in multichannel electromyography. In Costa et al. [19–21] an approach is proposed where the S-EMG signal is segmented and juxtaposed in order to construct a two-dimensional signal (NxM sample matrix). In the second step, the lines which have greater correlation with each other are shifted so that they are immediately placed one after the other (the indices of their original positions are kept as side information for the decoding process). Finally, techniques for coding two-dimensional signals are applied. Other 2D techniques that use transforms and fractals appear in recent publications [22–24]. In Salman et al.  and Dixon et al.  compressed sensing is applied to S-EMG compression.
This paper presents a technique based on the wavelet transform that proposes dynamic bit allocation derived from spectral shape models and arithmetic coding applied to the data resulting from the lossy compression process. In dynamic bit allocation the spectral signal in the wavelet domain is segmented into sub-bands. The transform coefficients in each sub-band are quantized according to the spectral shape model. This produces a sequence of symbols suitable for the entropy coding utilized. In the dynamic bit allocation strategy an approximation of the behavior of the energy magnitude contour in the wavelet transform domain was sought. Performance evaluation results along with a real signal bank source are presented here. The technique shows itself to be very efficient in respect to performance evaluation metrics when compared to the variety of techniques reported in the references.
Proposed S-EMG compression algorithm
In the S-EMG coding process, firstly, the signal is segmented into windows. The Discrete Wavelet Transform (DWT) is applied at each window leading to a vector of transform coefficients. The signal spectrum in the wavelet domain is also segmented into sub-bands; the coefficients are quantized with a bit amount as indicated by the respective sub-band spectral shape parameter. In the next step, a lossless compression technique is applied to the set of quantized coefficients. The data are finally packed and are ready for transmission and/or storage.
In the quantization process, the amount of bits to be allocated to the transform coefficients belonging to a specific sub-band is provided by a spectral shape model curve decreasing in energy, which aims to estimate the spectral behavior of the transform coefficient vector. The efficiency of the method depends on the reasonability of the shape proposed in relation to the spectral characteristics of the signal that is being coded. The purpose of using the spectral shape model decreasing curve is to provide a better efficiency coding, since the higher energy transformed coefficients, namely those which carry a greater amount of signal information are quantized with a large number of bits, causing them to be better represented and more accurately reconstructed in the decoding process. The output of the quantization process is the input of the entropy coding used here with the goal of reducing the redundancies that still remain in the data.
As already commented, the transform coefficient vector is also segmented, creating a total of M sub-bands. In the examples presented in this study M = 16 was used. Therefore, in each sub-band we have N/M transformed coefficients. There are N/M = 128 transformed coefficients in the simulation results presented in this paper.
The parameter λ m is obtained for each of the M sub-bands from the estimators of the spectral shape which seek to model the spectral energy contour from the S-EMG signal considering that although the information is not stationary, it has a low-pass characteristic (described in the following section is how the λ m scale factor of Equation 2 is obtained). Thus, as the index associated with the transformed coefficient increases, the smaller digital word length will be the indicated to quantize the coefficients of the respective sub-bands.
After finishing this step, the sub-band quantized coefficients are regrouped in order to construct a vector of symbols that represent a signal window of N sample length. The vector of symbols is then compressed by an entropy coder. Arithmetic coding  has been shown to be more efficient when compared to run-length and Huffman techniques . In the last step, the data are packed generating a final representation of the S-EMG file.
Spectral shape in dynamic bit allocation
Four models were studied and implemented for approximating the spectral shape: (1) Decreasing Linear Bit Allocation shape (DLA); (2) Decreasing Square-Root shape (DSR); (3) Decreasing Exponential shape (DEA) and (4) Rotated Hyperbolic Tangent shape (RHT). The curves are decreasing in magnitude and within them are the lengths of the digital words indicated by the numeric representation of each wavelet coefficient in each sub-band of the transformed vector.
In the following, the mathematical formalism associated with the spectral shape models proposed in this paper is presented. Vector B[m] stores the appropriate number of bits for each coefficient of the sub-band m. Parameter m indicates the index of the sub-band and M the amount of sub-bands used in the segmented spectrum. Q and L correspond to the longest and shortest digital word length indicated for coding the transformed coefficients vector.
Decreasing linear bit allocation shape (DLA)
Decreasing square-root shape (DSR)
Decreasing exponential shape (DEA)
Rotated hyperbolic tangent (RHT)
After calculating the λ m parameter, the quantized coefficient vector X q [k], k = 0, 1, … , N–1, may be reached as shown in Equation 2.
Presented next are the metrics used to carry out the performance evaluation of the proposed algorithm.
Metrics used for performance evaluation
where O S is the number of bits necessary for storing the original data and C S is the amount of bits necessary for storing the compressed data.
where x[n] is the original signal, [n] is the reconstructed signal and K is the total length in samples of the S-EMG signal.
To implement the orthogonal transform, the Daubechies-4 base with 8 levels of resolution was chosen. This choice was established based on a previous study having the de-correlation of the S-EMG signal in the transformed space and measurements of the capacity for compressing signal energy into fewer transformed coefficients as performance parameters .
Experimental protocols used to evaluate performance
Two distinct experimental protocols were addressed in this research for evaluating the performance of the data compression technique proposed: (1) isometric protocol and (2) dynamic protocol.
Proposed experimental isometric protocol
Pre-amplified surface electrodes (model DE-02, DelSys Inc. Boston MA, USA) were used in the S-EMG signals acquired in the experimental isometric protocol. The electrodes were positioned in order to get signals coming from the biceps brachii muscle. In all, 14 subjects were evaluated who underwent isometric stress force, maintaining 60% of their maximum voluntary contraction. The signals were fed into a data acquisition card with LabVIEW (NI-DAQ for Windows, National Instruments, USA). All signals were sampled at 2 kHz and digitized with 2 bytes/sample. The duration of the signals varies from 3 to 6 minutes.
Proposed dynamic experimental protocol
When evaluating the proposed techniques with dynamic experimental protocol a set of S-EMG signals collected from the vastus lateralis muscle was used from 14 individuals riding a cycling simulator (Cateye CS1000, USA). In the experiment, pre-amplified surface electrodes were used (model DE-02, DelSys Inc. Boston MA, USA). The signals were fed into a data acquisition card with LabVIEW (NI-DAQ for Windows, National Instruments, USA). All signals were sampled at 2 kHz and quantized with 16 bits. The duration of the signals varies from 3 to 6 minutes.
In the next section, an evaluation of the proposed algorithm and performance comparison with other techniques found in scientific literature are also presented. Simulated results were obtained with the real S-EMG signal data bank.
Isometric–performance evaluation of the coders–PRD (%)
Compression factor‒CF (%)
Norris et al. 
Berger et al. 
Berger et al.-improved 
Filho et al. 
Dynamic–performance evaluation of the coders‒PRD (%)
The algorithm evaluations with isometric and dynamic experimental protocols were implemented. Ahead, the performances of two distinct experimental protocols addressed in this research are discussed.
Performance analysis for S-EMG isometric experimental protocol
For isometric protocol, the PRD results according to the CF is illustrate in Figure 4. In this figure it can be observed that the decreasing exponential spectral shape’s performance is inferior to the other spectral shape models implemented. This difference in performance is more significant for a smaller CF. On the other hand, for isometric S-EMG signal compression, the rotated hyperbolic tangent spectral shape model performed slightly superior to the others proposed. Insofar as the CF grows, the performance curves approach each other.
A comparison of the proposed algorithm using the rotated hyperbolic tangent bit allocation shape (RHT) and the decreasing square-root bit allocation shape (DSR) with other results reported in scientific literature can be observed in Figure 5. In this figure may be verified that the performance curves presented by Filho et al. , Berger et al.–improved  and through the proposed technique using the spectral shapes RHT and DSR are similar. Table 1 succinctly illustrates the difference in performance between the coders analyzed. Highlighted in the table are the lower PRD values for the CF values listed. For 70%, 75% and 95% CF the results reported by Filho et al.  have the lowest PRD values. 80% and 85% CF Berger et al.–improved  had a performance slightly superior to other techniques and for 90% CF the compression technique presented in this paper using the RHT spectral shape model had the lowest PRD value.
Figure 6 shows examples of segments of the original signal, of the decoded signal and of the error signal obtained (difference between the signals). In the example, the waveforms have been normalized for the purpose of illustration. Figure 6b was obtained by using the decreasing linear bit allocation shape. In turn, Figure 6d was reached when using the rotated hyperbolic tangent shape. In both examples, a compression ratio of approximately 85% was sought.
Performance analysis for S-EMG dynamic experimental protocol
Figure 7 shows a summary of the PRD results according to the CF for the S-EMG signal bank with dynamic experimental protocol. The S-EMG compression algorithm was implemented for each of the proposed spectral shape models. Analogous to the isometric case, the spectral shape model with the worst performance was DEA. However, unlike the isometric case, the DSR spectral shape obtained a performance slightly better than the RHT.
In Figure 8, a performance comparison may be observed with other algorithms published in scientific literature. It should be noted that Berger et al.–improved  and Filho et al.  did not present results for dynamic experimental protocol S-EMG signal compression. Table 2 summarizes the results found of the percent residual difference (PRD) for specific values of the compression factor (CF). For 70% and 75% CF the results reported by Berger et al.  have the lowest PRD values. For 80% and 85% CF Costa et al.  show better performance when compared to the other techniques listed in Table 2. For 90% and 95% CF the results of the compression techniques presented in this study using the DSR spectral shape model have the lowest PRD values.
Figure 9 shows a segment of the original signal (a), two examples of the signals reconstructed using the proposed algorithm in (c) and (e) and the respective signal error obtained (difference between the original and reconstructed signal). The results for the decreasing square-root shape model (DSR) and the decreasing linear bit allocation shape (DLA) may be observed in this example.
The S-EMG signal compression algorithm described in this study revealed itself to be very efficient. The proposed dynamic bit allocation scheme for transformed coefficients based on a spectral shape model integrated with a quantization process and entropy coding leads to a high accuracy of S-EMG waveforms coding. It also allows greater liberty for adjusting the spectral content to the length of the digital word to be used in the representation of transformed wavelets coefficients.
For isometric S-EMG experimental protocol the rotated hyperbolic tangent spectral shape model (RHT) performed slightly superior to the others proposed models. However, in dynamic S-EMG experimental protocol, it was observed for similar conditions to the compression factor (CF) the decreasing square-root spectral shape model (DSR) has a percent residual difference slightly lower than others bit allocation spectral shape model.
Dynamic experimental protocol has intervals with and without muscle activation. The electrophysiological behavior and large dynamic range variation in the S-EMG intervals with and without muscle activation lead to different non-stationary power concentration in spectral sub-bands when it is compared with isometric protocol. As a result, different CF x PRD performances are obtained for isometric and dynamic experimental protocols for the various proposed models of spectral shapes.
An improvement in performance with respect to the objective evaluation metrics can be investigated through the development of new models of spectral shapes. Another approach for refining the technique is envisioned by local adaptation of the spectral shape model.
The present study was supported by CAPES and CNPq, two Brazilian government agencies for scientific and technological development.
- Carotti ESG, De Martin JC, Farina D, Merletti R: Linear predictive coding of myoelectric signals. In Proceedings of the 2005 IEEE International Conference on Acoustics, Speech, and Signal Processing: 18–23 March 2005. Vol 5. Philadelphia; 2005:629–632.View ArticleGoogle Scholar
- Guerrero AP, Mailhes C: On the choice of an electromyogram data compression method. In Proceedings of the 19th Annual International Conference of the IEEE Engineering in Medicine and Biology Society: 30 October - 2 November 1997. Vol. 6. Chicago; 1997:1558–1561.Google Scholar
- Berger PA, Nascimento FAO, Carmo JC, Rocha AF, Dos Santos I: Algorithm for compression of EMG signals. In Proceedings of the 25th Annual International Conference of the IEEE Engineering in Medicine Biology Society: 17–21 September 2003. Vol. 2. Cancun; 2003:1299–1302.Google Scholar
- Carotti ESG, De Martin JC, Merletti R, Farina D: Compression of surface EMG signals with algebraic code excited linear prediction. Med Eng Phys 2007,29(2):253–258. 10.1016/j.medengphy.2006.03.004View ArticleGoogle Scholar
- Norris JF, Lovely DF: Real-time compression of myoelectric data utilizing adaptive differential pulse code modulation. Med Biol Eng Comput 1995,33(5):629–635. 10.1007/BF02510779View ArticleGoogle Scholar
- Wellig P, Zhenlan C, Semling M, Moschytz GS: Electromyogram data compression using single-tree and modified zero-tree wavelet encoding. In Proceedings of the 20th Annual International Conference of the IEEE Engineering in Medicine and Biology Society: 29 October - 1 November 1998. Vol. 3. Hong Kong; 1998:1303–1306.Google Scholar
- Norris JA, Englehart K, Lovely D: Steady-state and dynamic myoelectric signal compression using embedded zero-tree wavelets. In Proceedings of the 23rd Annual International Conference of the IEEE Engineering in Medicine Biology Society: 25–28 October 2001. Vol. 2. Istanbul; 2001:1879–1882.View ArticleGoogle Scholar
- Brechet L, Lucas MF, Doncarli C, Farina D: Compression of biomedical signals with mother wavelet optimization and best-basis wavelet packet selection. IEEE Trans Biomed Eng 2007,54(12):2186–2192.View ArticleGoogle Scholar
- Paiva JPLM, Kelencz CA, Paiva HM, Galvão RKH, Magini M: Adaptive wavelet EMG compression based on local optimization of filter banks. Physiol Meas 2008,29(7):843–856. ISSN 1361–6597 10.1088/0967-3334/29/7/012View ArticleGoogle Scholar
- Gronfors TK, Paivinen NS: Comparison of vector quantization methods for medical fidelity preserving lossy compression of EMG signals. In Int Conf Comput Intell Model, Control Automation: 28–30 November 2005. Vienna; 2005:1107–1113.Google Scholar
- Grönfors T, Reinikainen M, Sihvonen T: Vector quantization as a method for integer EMG signal compression. J Med Eng Technol 2006,30(1):41–52. 10.1080/03091900500130872View ArticleGoogle Scholar
- Jain N, Vig R: Wavelet based vector quantization with tree code vectors for EMG Signal compression. In Proceedings of the 6th WSEAS International Conference on Signal Processing: 22–24 March 2007. Vol. 6. Dallas; 2007:117–124.Google Scholar
- Berger PA, Nascimento FAO, Carmo JC, Rocha AF: Compression of EMG signals with wavelet transform and artificial neural networks. Physiol Meas England 2006,27(6):457–465. 10.1088/0967-3334/27/6/003View ArticleGoogle Scholar
- Berger PA, Nascimento FAO, Rocha AF, Carvalho JLA: A new wavelet-based algorithm for compression of EMG signals. In Proceedings of the 29th Annual International Conference of the IEEE Engineering in Medicine and Biology Society: 22–26 August 2007. Lyon; 2007:1554–1557.View ArticleGoogle Scholar
- Filho EBL, Silva EAB, Carvalho MB: On EMG signal compression with recurrent patterns. IEEE Trans Biomed Eng 2008,55(7):1920–1923. ISSN 0018–9294View ArticleGoogle Scholar
- Carotti ESG, De Martin JC, Merletti R, Farina D: ACELP-based compression of multi-channel surface EMG signals. In Proceedings of the 2007 IEEE International Conference on Acoustics, Speech, and Signal Processing: 15–20 April 2007. Vol. 2. Honolulu; 2007:II-361-II-364.Google Scholar
- Carotti ESG, De Martin JC, Merletti R, Farina D: Matrix-based linear predictive compression of multi-channel surface EMG signals. In Proceedings of the 2008 IEEE International Conference on Acoustics, Speech, and Signal Processing: 31 March - 4 April 2008. Las Vegas; 2008:493–496.View ArticleGoogle Scholar
- Carotti ESG, De Martin JC, Merletti R, Farina D: Compression of multidimensional biomedical signals with spatial and temporal codebook-excited linear prediction. IEEE Trans Biomed Eng 2009,56(11):2604–2610.View ArticleGoogle Scholar
- Costa MVC, Berger PA, Rocha AF, Carvalho JL, Nascimento FAO: Compression of Electromyographic Signals Using Image Compression Techniques. In Proceedings of the 30th Annual International Conference of the IEEE Engineering in Medicine and Biology Society: 20–25 August 2008. Vancouver; 2008:2948–2951.View ArticleGoogle Scholar
- Costa MVC, Carvalho JLA, Berger PA, Zaghetto A, Rocha AF, Nascimento FAO: Two-dimensional compression of surface electromyographic signals using column-correlation sorting and image encoders. In Proceedings of the 31st Annual International Conference of the IEEE Engineering in Medicine and Biology Society: 3–6 September 2009. Minneapolis; 2009:428–431.View ArticleGoogle Scholar
- Costa MVC, Carvalho JLA, Berger PA, Rocha AF, Nascimento FAO: Compression of surface electromyographic signals using two-dimensional techniques. In Recent Advances in Biomedical Engineering. Edited by: Naik GR. Rijeka, Croatia: InTech; 2009:17–38.Google Scholar
- Ntsama EP, Ele P, Kabiena IB: Compression approach of EMG signal using 2D discrete wavelet and cosine transforms. Am J Signal Process 2013,3(1):10–16.Google Scholar
- Ntsama EP, Mbaidoun L, Ele P, Kabiena IB: EMG signal compression using 2D fractal. Int J Adv Technol Eng Res(IJATER) 2013,3(3):58–89.Google Scholar
- Ntsama EP, Pierre ESZD, Serfebé ZD, Emmanuel T: Evaluation of EMG signals compression by JPEG 2000 called 1D. Int J Eng Technol(IJET) 2013,5(1):44–51.Google Scholar
- Salman A, Allstot EG, Chen AY, Dixon AMR, Gangopadhyay D, Allstot DJ: Compressive sampling of EMG bio-signals. In Proceedings of the 2011 IEEE International Symposium on Circuits and Systems: 15–18 May 2011. Rio de Janeiro; 2011:2095–2098.View ArticleGoogle Scholar
- Dixon AMR, Allstot EG, Gangopadhyay D, Allstot DJ: Compressed sensing system considerations for ECG and EMG wireless biosensors. IEEE Trans Biomed Circuits Syst 2012,6(2):156–166.View ArticleGoogle Scholar
- Witten IH, Neal RM, Cleary JG: Arithmetic coding for data compression. Commun ACM 1987,30(6):520–540. 10.1145/214762.214771View ArticleGoogle Scholar
This article is published under license to BioMed Central Ltd. This is an Open Access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly credited. The Creative Commons Public Domain Dedication waiver (http://creativecommons.org/publicdomain/zero/1.0/) applies to the data made available in this article, unless otherwise stated.