An FPGA Implementation of a Lossless Electrocardiogram Compressor based on Prediction and Golomb-Rice Coding

Similar documents
Modified Golomb-Rice Codes for Lossless Compression of Medical Images

Compression techniques

Image Compression through DCT and Huffman Coding Technique

CHAPTER 2 LITERATURE REVIEW

Analysis of Compression Algorithms for Program Data

Michael W. Marcellin and Ala Bilgin

ASYNCHRONOUS COUNTERS

Introduction to image coding

ANALYSIS OF THE EFFECTIVENESS IN IMAGE COMPRESSION FOR CLOUD STORAGE FOR VARIOUS IMAGE FORMATS

Lossless Medical Image Compression using Predictive Coding and Integer Wavelet Transform based on Minimum Entropy Criteria

Voice---is analog in character and moves in the form of waves. 3-important wave-characteristics:

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language

Hybrid Lossless Compression Method For Binary Images

Khalid Sayood and Martin C. Rost Department of Electrical Engineering University of Nebraska

EC313 - VHDL State Machine Example

Registers & Counters

Data Storage 3.1. Foundations of Computer Science Cengage Learning

Reading.. IMAGE COMPRESSION- I IMAGE COMPRESSION. Image compression. Data Redundancy. Lossy vs Lossless Compression. Chapter 8.

Let s put together a Manual Processor

Introduction to Medical Image Compression Using Wavelet Transform

Microprocessor & Assembly Language

Serial port interface for microcontroller embedded into integrated power meter

Indexing and Compression of Text

Lossless Grey-scale Image Compression using Source Symbols Reduction and Huffman Coding

Reversible Data Hiding and Reversible Authentication Watermarking for Binary Images

Optimising the resource utilisation in high-speed network intrusion detection systems.

Data Storage. Chapter 3. Objectives. 3-1 Data Types. Data Inside the Computer. After studying this chapter, students should be able to:

Counters and Decoders

Memory Elements. Combinational logic cannot remember

RAPID PROTOTYPING OF DIGITAL SYSTEMS Second Edition

Today s topics. Digital Computers. More on binary. Binary Digits (Bits)

Storage Optimization in Cloud Environment using Compression Algorithm

To design digital counter circuits using JK-Flip-Flop. To implement counter using 74LS193 IC.

CHAPTER 3 Boolean Algebra and Digital Logic

Coding and decoding with convolutional codes. The Viterbi Algor

Complexity-bounded Power Control in Video Transmission over a CDMA Wireless Network

Video compression: Performance of available codec software

Computer Networks and Internets, 5e Chapter 6 Information Sources and Signals. Introduction

(Refer Slide Time: 00:01:16 min)

Aims and Objectives. E 3.05 Digital System Design. Course Syllabus. Course Syllabus (1) Programmable Logic

Design of Efficient Algorithms for Image Compression with Application to Medical Images

JPEG Image Compression by Using DCT

LZ77. Example 2.10: Let T = badadadabaab and assume d max and l max are large. phrase b a d adadab aa b

VHDL DESIGN OF EDUCATIONAL, MODERN AND OPEN- ARCHITECTURE CPU

ETEC 2301 Programmable Logic Devices. Chapter 10 Counters. Shawnee State University Department of Industrial and Engineering Technologies

Testing Low Power Designs with Power-Aware Test Manage Manufacturing Test Power Issues with DFTMAX and TetraMAX

Today. Binary addition Representing negative numbers. Andrew H. Fagg: Embedded Real- Time Systems: Binary Arithmetic

Experiment # 9. Clock generator circuits & Counters. Eng. Waleed Y. Mousa

Efficient Storage, Compression and Transmission

Enhancing High-Speed Telecommunications Networks with FEC

Implementation of ASIC For High Resolution Image Compression In Jpeg Format

Sachin Dhawan Deptt. of ECE, UIET, Kurukshetra University, Kurukshetra, Haryana, India

PCM Encoding and Decoding:

SPEECH SIGNAL CODING FOR VOIP APPLICATIONS USING WAVELET PACKET TRANSFORM A

Technical Note. Micron NAND Flash Controller via Xilinx Spartan -3 FPGA. Overview. TN-29-06: NAND Flash Controller on Spartan-3 Overview

Arithmetic Coding: Introduction

Non-Data Aided Carrier Offset Compensation for SDR Implementation

MP3 Player CSEE 4840 SPRING 2010 PROJECT DESIGN.

How To Fix A 3 Bit Error In Data From A Data Point To A Bit Code (Data Point) With A Power Source (Data Source) And A Power Cell (Power Source)

STUDY OF MUTUAL INFORMATION IN PERCEPTUAL CODING WITH APPLICATION FOR LOW BIT-RATE COMPRESSION

The WebGraph Framework:Compression Techniques

Finite State Machine Design and VHDL Coding Techniques

CHAPTER 11: Flip Flops

Evolving Nonlinear Predictive Models for Lossless Image Compression with Genetic Programming

Secured Lossless Medical Image Compression Based On Adaptive Binary Optimization

Manchester Encoder-Decoder for Xilinx CPLDs

Video Coding Basics. Yao Wang Polytechnic University, Brooklyn, NY11201

Modeling a GPS Receiver Using SystemC

BINARY CODED DECIMAL: B.C.D.

INFOCOMMUNICATIONS JOURNAL Mojette Transform Software Hardware Implementations and its Applications

DNA Sequencing Data Compression. Michael Chung

Decimal Number (base 10) Binary Number (base 2)

ANALYSIS AND EFFICIENCY OF ERROR FREE COMPRESSION ALGORITHM FOR MEDICAL IMAGE

Introduction to Digital Audio

encoding compression encryption

Comparison of different image compression formats. ECE 533 Project Report Paula Aguilera

Fast Arithmetic Coding (FastAC) Implementations

Streaming Lossless Data Compression Algorithm (SLDC)

A FAST WAVELET-BASED VIDEO CODEC AND ITS APPLICATION IN AN IP VERSION 6-READY SERVERLESS VIDEOCONFERENCING SYSTEM

A NEW LOSSLESS METHOD OF IMAGE COMPRESSION AND DECOMPRESSION USING HUFFMAN CODING TECHNIQUES

FPGA Implementation of IP Packet Segmentation and Reassembly in Internet Router*

Lecture 8: Synchronous Digital Systems

Information, Entropy, and Coding

Sistemas Digitais I LESI - 2º ano

Lecture-3 MEMORY: Development of Memory:

ALFFT FAST FOURIER Transform Core Application Notes

plc numbers Encoded values; BCD and ASCII Error detection; parity, gray code and checksums

Data Mining Un-Compressed Images from cloud with Clustering Compression technique using Lempel-Ziv-Welch

An Efficient Compression of Strongly Encrypted Images using Error Prediction, AES and Run Length Coding

NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter

DDS. 16-bit Direct Digital Synthesizer / Periodic waveform generator Rev Key Design Features. Block Diagram. Generic Parameters.

A Verilog HDL Test Bench Primer Application Note

Broadband Networks. Prof. Dr. Abhay Karandikar. Electrical Engineering Department. Indian Institute of Technology, Bombay. Lecture - 29.

Design of a High-speed and large-capacity NAND Flash storage system based on Fiber Acquisition

INTRODUCTION TO DIGITAL SYSTEMS. IMPLEMENTATION: MODULES (ICs) AND NETWORKS IMPLEMENTATION OF ALGORITHMS IN HARDWARE

Region of Interest Access with Three-Dimensional SBHP Algorithm CIPR Technical Report TR

How to Send Video Images Through Internet

INTEGRATED CIRCUITS. For a complete data sheet, please also download:

Sequential Logic Design Principles.Latches and Flip-Flops

Transcription:

An FPGA Implementation of a Lossless Electrocardiogram Compressor based on Prediction and Golomb-Rice Coding Moab Mariz Meira 1, José Antônio Gomes de Lima 1, Leonardo Vidal Batista 1 1 Departamento de Informática Universidade Federal da Paraíba (UFPB) Cidade Universitária 58.051-900 João Pessoa PB Brasil moab@lavid.ufpb.br, {jose,leonardo}@di.ufpb.br Abstract. This work describes an FPGA implementation of a lossless electrocardiogram compressor based on prediction and Golomb-Rice coding. The description and functionalities of the main blocks that compose the compressor architecture are presented as well as the simulation and synthesis methodology used to target it on FPGA devices. 1. Introduction The extensive use of digital electrocardiogram (ECG) produces large amounts of data. Since it is often necessary to store or transmit ECG records, efficient compression techniques are important to reduce transmission time or required storage capacity. Especially critical are long duration (24 or even 48 hours) Holter exams. The data generated in such cases can surpass 1G bytes. Holter devices must present good storage capacity, in addition to reduced dimensions and low power dissipation in order to be comfortably carried by patients [Antoniol and Tonella 1997]. These facts show the importance of using some data compression method that preserves the essential characteristics of the original signals. Several ECG compression methods have been developed in the past 30 years, and average compression ratios (CR) ranging approximately from 2:1 up to 50:1 have been reported [Cárdenas-Barreras and Lorenzo-Ginori 1999], [Koski 1997], [Jalaleddine et al. 1990]. CR is defined as the ratio between the number of bits in the original signal and the number of bits used to represent the compressed signal. Most of the reported techniques are lossy compressors, and therefore do not allow perfect reconstruction of the original signal from its compressed representation. For radiological image compression, however, lossless compression is largely preferred by health professional [Bilgin et al. 1998], due to the fear that the distortions introduced by lossy compression may induce misdiagnoses. This kind of apprehension is also present in the case of ECG compression. [Batista et al. 2003] investigated more than 30 lossless compression methods resulting from combinations of three prediction techniques, five integer-to-integer wavelet transforms, and Huffman, Golomb, LZW and LZ78 coders. A very simple compressor based on prediction and Golomb coding reached a competitive CR in comparison with the other evaluated methods [Batista et al. 2003]. Moreover, Golomb- Rice coding, which is a simplification of Golomb coding more suitable to hardware implementation, performs close to Golomb coding when used in combination with prediction techniques [Seroussi and Weinberg 1997].

This paper presents an FPGA implementation of a lossless ECG compressor based on prediction and Golomb-Rice coding. The Section 2 presents the theoretical background for this work. The Section 3 presents the architecture of the compressor and decompressor, and details of its implementation. Section 4 presents the simulation. Section 5 presents a synthesis results in terms of FPGA devices used. Finally, conclusions are presented in section 6. 2. Theoretical Background Figure 1 presents the adopted generic compression model. Initially, the original signal x o is processed by a decorrelation stage, whose objective is to reduce the statistical correlation among the x o samples. The coding stage tries to code x o using a reduced number of bits. The result of the coding is the binary sequence x c. Coders depend on a statistical model for the sequence to be coded. When samples are strongly correlated, high compression rates can be achieved if the coder is based on a contextual model that appropriately captures those correlations. However, there are practical problems associated with the use of contextual models, related to memory requirements, calculation of the estimates and transmission of the estimated conditional probabilities for the decoder [Bell et al. 1990]. If the decorrelation stage significantly reduces the statistical dependency among the samples, simple non-contextual models can lead to a good coding performance. x o Decorrelation Stage x d Coding Stage x c Figure 1. General model of compression 2.1. Prediction The decorrelation stage considered in the proposed method is based on prediction. The prediction techniques build an estimate x~ n for a given sample xn of the signal using past samples x n-1 x n-2 x n-3.... The sample x n is substituted by the prediction error, e n = x n - x~ n. The predictor used is simply: 2.2. Golomb-Rice Coding ~ P 1 : x n = x n 1 (1) Golomb-Rice coding provides a simple way to code any non-negative integer n [Seroussi and Weinberg 1997]. Given a non-negative integer parameter k, the Golomb- Rice code for n is the unary code for n shifted k bits to the right, concatenated with the k less significant bits of n. For one-sided geometric distributions (OSGD), Golomb-Rice codes generally achieve nearly optimal bit rates [Seroussi and Weinberg 1997].

A Laplacian distribution can be transformed in an approximation to an OSGD by the following mapping of values [Weinberg et al. 1996]: 2v M ( v) = 2 v -1 v 0 v < 0 (2) 2.3. k Calculation Given a sequence whose elements follow a Laplacian distribution, the optimum k to GR coding of the sequence obtained after the mapping in (2) can be estimated as k = log 2 a, where a is the average of the absolute values of the sequence before mapping [Weinberg et al. 1996]. In the proposed method, parameter k is incrementally calculated as shown in Equation 3 [Weinberg et al. 1996]. n 2 k a, (3) where n is the number of samples seen so far, and a is the sum of the absolute values of these samples. 3. Compressor Architecture Implemented in FPGA The compressor is composed by two main blocks, the PREDICTOR block and the CODER block as shown in Figure 2. A 16 bits sample is read by the PREDICTOR block, which computes the prediction error. The CODER block performs the coding stage (Golomb-Rice coding) and generates the codeword, bit by bit, on the code output. The table 1 shows the input/output signals of the compressor. Table 1. Compressor input/output signals Signal Dimension Input/Output Data/Control Function Clock 1 bit I C System clock Reset 1 bit I C System reset Sample 16 bits I D Sample input Code 1 bit O D Code output Ready 1 bit O C Ready signal sample [16 bits] clock reset PREDICTOR prediction error [16 bits] CODER code ready Figure 2. Compressor Architecture As seen in Figure 2, a 16 bits sample is read by the PREDICTOR block, calculating the prediction error between the samples according to the Equation 1. The CODER block gives the code-word, bit by bit on the code output.

input [16 bits] input [16 bits] OPTIMALK K[3 bits] mapped input [16 bits] SHIFTER shifted input [16 bits] GENERATOR code ready MAPPING Figure 3. CODER Block As seen in Figure 3, the CODER is composed by the following blocks: OPTIMALK block, MAPPING block, SHIFTER block and GENERATOR block. The OPTIMALK block calculates the optimal k value according to the Equation 3. The MAPPING block maps the read sample according to the Equation 2. The SHIFTER block perfoms the shift of the sample mapped, according to the last k value processed. This operation is part of the unary coding from Golomb-Rice method, that is, the conversion of the bit vector that represents the shifted sample in an integer value. The GENERATOR block performs a unary representation of the data provided by the SHIFTER block and, after this operation, sets the output as the k less significative bits from the mapped sample, generating the correct code-word. The GENERATOR block, synchronize the PREDICTOR block to accept a new sample data. 4. Decompressor Architecture Implemented in FPGA The decompressor is composed by two main blocks, the EPREDICTOR block and the DECODER block as shown in Figure 4. The DECODER block performs the decoding stage from an incoming input from the CODER. The EPREDICTOR block obtains the correct sample from the prediction errors calculated by the PREDICTOR block. The table 2 shows the input/output signals of the decompressor. Table 2. Decompressor input/output signals Signal Dimension Input/Output Data/Control Function Clock 1 bit I C System clock Reset 1 bit I C System reset Input 1 bit I D Code input Output 16 bits O D Sample output Ready 1 bit O C Ready signal As seen in Figure 4, an input (code-word) is read by the DECODER block, a prediction error is sent to the EPREDICTOR block, which obtains a sample as the decompressor output.

input clock reset DECODER prediction error [16 bits] ready EPREDICTOR sample [16 bits] Figure 4. Decompressor Architecture input prediction error before mapping [16 bits] mapped prediction error [16 bits] OPTIMALK GENERATOR MAPPING K[3 bits] Figure 5. DECODER Block As seen in Figure 5, the DECODER is composed by the following blocks: OPTIMALK block, MAPPING block and GENERATOR block. The OPTIMALK block calculates the optimal k according to the Equation 3. The MAPPING block maps the read sample in an inverse way as seen on the compressor. The GENERATOR block is responsible for the decoding itself of Golomb-Rice method. 5. Synthesis and Simulation Methodology The compressor and the decompressor were described in VHDL, the general architectures were divided in blocks as shown in Figure 2 and Figure 4. The blocks were divided in sub-blocks. At sub-blocks level, behavioral description were made and at blocks level, structural descriptions connecting the sub-blocks were constructed and validated using the MAX+plus II 10.0, software from Altera [Altera 1995], [Altera 1997]. Figure 6 presents a simulation of a sample coded by the compressor. First the input, after going through the prediction block (A). Since it is the first sample, there is no predecessor, thus there is no prediction there. The value of the sample is mapped (B). After, a new k is calculated as seen on simulation(c). After the mapping, the sample is shifted k bits to the right (D). Then, following the sequence, the ready signal goes up, indicating the beginning of the coding; the code is sent to the output, each bit on the rising edge of the clock (E). Finally, the coding ends and another input is read (F). The new input is processed by the predictor using the previous sample and the process goes on (G).

Figure 6. Simulation of a sample coded by the compressor Figure 7 presents a simulation of an input decoded by the decompressor. In the beginning of the decoding of the input, the bits are read one by one, on the rising edge of the clock (A). The sample is generated (B), and then it is mapped (inverse process of the compressor), the ready signal goes up indicating to the next block that the sample is ready to be processed (C). The mapped sample is processed by the predictor inverter. Since it is the first sample, there is no predecessor, so there is no prediction there. Also, the mapped sample is used to calculate a new k (D). After, a second sample is processed by the predictor inverter using the previous sample and the process goes on (E). Figure 7. Simulation of a sample decoded by the deeompressor

6. Synthesis Results The descriptions of the compressor and decompressor were synthesized using Alteras tools [Altera 1995], [Altera 1997]. Results in terms of number of logic cells, memory utilized, frequency of operation and device used are showed in Tables III and IV. Table 3 presents the results of the compressor. Table 3. Compressor Synthesis Results Device Number of LCs Percent of the device used Memory utilized Clock Frequency (MHz) EPF10K30ETC144-1 791 45 % - 21.45 EPF10K20TC144-3 791 68% - 10.23 EP1K30TC144-1 793 45% - 19.68 Table 4 presents the results of the decompressor. Table 4. Decompressor Synthesis Results Device Number of LCs Percent of the device used Memory utilized Clock Frequency (MHz) EPF10K30ETC144-1 681 39 % - 39.68 EPF10K20TC144-3 681 59% - 18.08 EP1K30TC144-1 681 39% - 37.03 The clock frequencies obtained in tables 3 e 4 shows that is possible an FPGA implementation of a lossless ECG compressor. 7. Conclusions and Future Works The design of an FPGA implementation of a lossless ECG compressor based on prediction and Golomb-Rice coding has been described, the results show that is possible to implement all the compressor/decompressor functions in a single FPGA chip compatible with a lossless electrocardiogram compressor based on prediction and Golomb-Rice coding. New FPGA families appearing on the market having potential for the implementation of more complex cores with significantly improved performance, encourage further researches to optimize this project design adding new functionalities for ECG equipments.

8. References Altera Corporation, Altera Data Book, 1995. Altera Corporation, Max + Plus II Getting Started, 1997. Antoniol, G. and Tonella, P. (1997) EEG Data Compression Techniques, IEEE Transactions on Biomedical Engineering, v. 44, n. 2, p. 105-114. Batista, L. V., Meira, M. M., Patrício, F. Z. A., Carvalho, L. C. and de Lima, J. A. G. (2003) Compressão sem Perdas de Sinais Eletrocardiográficos, Workshop de Informática Médica. Bell, T. C., Cleary, J. G. and Witten, I. H., Text Compression, Englewood Cliffs: Prentice Hall, 1990. Bilgin, A., Zweig, G. and Marcellin, M. W. (1998) Efficient Lossless Coding of Medical Image Volumes Using Reversible Integer Wavelet Transforms, Proceedings of Data Compression Conference, p. 428-437. Cárdenas-Barreras, J. L. and Lorenzo-Ginori, J. V. (1999) Mean-Shape Vector Quantizier for ECG Signal Compression, IEEE Transactions on Biomedical Engineering, v. 46, n. 1, p. 62-70. Jalaleddine, S. M. S, Hutchens, C. G., Strattan, R. D. and Coberly, W. A. (1990) ECG Data Compression Techniques - A Unified Approach, IEEE Transactions on Biomedical Engineering, v. 37, n. 4, p. 329-343. Koski, A. (1997) Lossless ECG Encoding, Computer Methods and Programs in Biomedicine, v. 52, n. 1, p. 23-33. Seroussi, G. and Weinberg, M. J. (1997) On Adaptive Strategies for an Extended Family of Golomb-type Codes, Proceedings of the Data Compression Conference, p. 131-140. Weinberger, M. J., Seroussi, G. and Sapiro, G. (1996) LOCO-I: A Low Complexity, Context-Based, Lossless Image Compression Algorithm, Proceedings of the Data Compression Conference, p. 140-149.