• No results found

Architecture Design for Compressed Sensing-Based Low Power Systems

N/A
N/A
Protected

Academic year: 2021

Share "Architecture Design for Compressed Sensing-Based Low Power Systems"

Copied!
85
0
0

Loading.... (view fulltext now)

Full text

(1)

INOM

EXAMENSARBETE INFORMATIONS- OCH

KOMMUNIKATIONSTEKNIK, AVANCERAD NIVÅ, 30 HP

,

STOCKHOLM SVERIGE 2016

Architecture Design for

Compressed Sensing-Based Low

Power Systems

GIOVANNI ZAMOLO

(2)

Architecture Design

for Compressed Sensing-Based

Low Power Systems

GIOVANNI ZAMOLO

Master’s Thesis at KTH Information and Communication Technology Erasmus+ program

Semptember 2016

Supervisor: Dr. Zou Zhuo

Dr. Mao Jia Prof. Rinaldo Roberto

Examiner: Prof. Zheng Li-Rong

(3)
(4)

Universit`

a degli Studi di Udine

Corso di Laurea Magistrale in Ingegneria Elettronica Dipartimento Politecnico di Ingegneria e Architettura

Architecture Design

for Compressed Sensing-Based

Low Power Systems

Relatore:

Prof. Roberto Rinaldo

Correlatori:

Prof. Li-Rong Zheng Dr. Zhuo Zou

Dr. Jia Mao

Laureando:

(5)
(6)

Sommario

Nello scenario dell’Internet of Things, una caratteristica auspicabile per i sen-sori wireless è l’autonomia energetica. Tuttavia, il trasmettitore richiede una considerevole quantità di energia per modulare e trasmettere l’informazione di interesse. Il consumo di potenza può essere ridotto utilizzando algoritmi di compressione dati: in tal modo, la quantità finale di dati trasmessi è ridotta a discapito però di una maggiore complessità computazionale. In alternativa, la recente tecnica del compressed sensing può essere applicata nel caso di segnali sparsi, ovvero nel caso in cui un segnale presenti per lo più valori nulli o trascu-rabili se rappresentato in una certa base. Tramite compressed sensing, viene acquisito il segnale già in forma compressa attraverso un certo numero di misu-re effettuate sul segnale diviso in frame di lunghezza pmisu-refissata; la ricostruzione avviene utilizzando algoritmi non lineari. Come risultato, l’architettura del

front-end viene semplificata a discapito della ricostruzione. Inoltre, tramite gli

schemi a compressed sensing, la frequenza di campionamento può essere molto minore di quella convenzionale, pari ad almeno due volte la banda del segnale. In questa tesi viene studiata l’applicabilità e i vantaggi di questa tecnica nel caso di acquisizione dei segnali elettrocardiogramma ed ultra-wideband, che possono essere entrambi considerati sparsi. L’interesse è nel ridurre il nume-ro totale di misure in quanto influisce sui requisiti hardware. I parametri di progetto ottimali vengono quindi definiti per i due sistemi.

Durante le simulazioni, un elettrocardiogramma rumoroso viene acquisito e successivamente ricostruito utilizzando diversi possibili setup. Particolare at-tenzione viene posta alla rappresentazione sparsa del segnale, alla frequenza di campionamento, e alla lunghezza del compressed sensing frame. I risultati mostrano chiaramente che il segnale ha una rappresentazione maggiormente sparsa se decomposto da una funzione wavelet Biorsplines. Inoltre, la frequen-za cardiaca influenfrequen-za le performance e pertanto un trade-off tra frequenfrequen-za di campionamento e lunghezza del segnale risulta necessario. Risulta conveniente utilizzare basse frequenze di campionamento e frame lunghi, quali 350 Hz e 1024 campioni.

La tecnologia ultra-wideband permette la produzione di trasmettitori più semplici e di minor consumo rispetto ai tradizionali sistemi a banda stretta, trovando quindi ottima applicazione nell’Internet of Things. Tuttavia, la ne-cessaria frequenza di campionamento risulta essere troppo elevata nel caso di ricevitori completamente digitali. Invece, un ricevitore basato sul compressed

sensing permette di ricostruire interamente il segnale a partire da un basso

numero di misure effettuate a frequenza di campionamento inferiore, anche di cento volte. Sono stati per tanto sviluppati modelli del trasmettitore e del ricevitore mentre le simulazioni sono state svolte in vari scenari di rumore. I parametri di progetto studiati sono la larghezza di banda dell’impulso trasmes-so e la dimensione del compressed sensing frame. Dai risultati, l’impultrasmes-so con banda compresa fra i 3.1 e i 10.6 GHz è risultato essere il più indicato. Inoltre si consiglia di utilizzare un frame il più corto possibile al fine di ridurre il numero di misure.

(7)
(8)

Abstract

In the Internet of Things scenario, a desirable feature of wireless sensors is the energy autonomy. However, the transmitter stage needs a great amount of energy to modulate and transmit the interested information. The power consumption can be improved using data compression algorithms: thereby, the total amount of the transmitted data is reduced, at expense of computational complexity. Alternatively, the recent compressed sensing technique can be applied on sparse signal instances, that is when most of the entries of the signal are zero or negligible in a fixed representation. Compressed sensing acquires directly the compressed information using nonadaptive measurements and it reconstructs the signal using non-linear algorithms. Each measurement contains information of the whole signal within a frame having a fixed length. As a result, the front-end architecture complexity is decreased at expense of the reconstruction. Moreover, thanks to the compressed sensing schemes, the sampling frequency can be far lower than the conventional Nyquist rate.

This thesis investigates the applicability and the advantages of this tech-nique for the electrocardiogram signal acquisition and for the ultra-wideband receiver; indeed, both signals can be considered sparse. The focus is on the re-duction of the CS measurements for the impact on the hardware requirements. The optimal design parameters are defined for the CS-based systems, leading to a reduction of power consumption.

During the simulations, a noisy electrocardiogram signal is acquired and reconstructed using different setups. More interest is made on the sparsity rep-resentation, the sampling frequency, and the compressed sensing frame length. The results show clearly that the signal is more sparse when it is represented using a Biorsplines wavelet function. Moreover, a trade-off between the sam-pling frequency and the signal length is needed and the performance is strongly influenced by the heart rate. It is convenient to use low sampling frequency, and high frame length: a valid performance is obtained using 350 Hz as sampling rate and frames of 1024 samples.

Ultra-wideband technology is suitable for Internet of Things applications because the transmitter is easier to implement and it consumes less power if compared to the traditional narrow band transmitters. However, in fully digi-tal receivers, the required Nyquist rate is high. In the ultra-wideband scenario, compressed sensing is an attractive solution in the receiver side for the ca-pability of recovering the signal from a small number of measurements using sub-Nyquist sampling rate: using a parallel receiver the sampling rate can be one hundred times lower than the Nyquist one. Models of the ultra-wideband transmitter and receiver are developed and simulations are performed in dif-ferent noisy scenarios. Therefore, practical design parameters are investigated, including the pulse bandwidth and the compressed sensing frame length. From the results, the 3.1 - 10.6 GHz band allows better performance. Moreover, this thesis suggests using short compressed sensing frame length in order to reduce the total amount of needed measurements.

(9)
(10)

Contents

Contents v

List of Figures vii

List of Tables ix

1 Introduction 1

2 Compressed Sensing Theory 7

2.1 Introduction . . . 7

2.2 Compressed Sensing Basics . . . 9

2.2.1 Sparse and Compressible Signals . . . 10

2.2.2 Dictionary Representation . . . 10

2.2.3 CS Overview . . . 11

2.3 The Sensing Matrix . . . 13

2.3.1 Spark Property . . . 14

2.3.2 The Restricted Isometry Property . . . 15

2.4 Recovery Algorithms . . . 16

2.4.1 Basis Pursuit . . . 16

2.4.2 Greedy Algorithms . . . 17

2.5 Compressed Sensing Encoder . . . 18

2.6 Conclusion . . . 20

3 Compressed Sensing for Electrocardiogram Acquisition 21 3.1 Introduction . . . 21

3.2 The Electrocardiogram Signal Overview . . . 22

3.2.1 Noise . . . 23

3.2.2 Real ECG Signal . . . 24

3.3 Methodology: Simulated Model . . . 24

3.3.1 Sampling . . . 25

3.3.2 Sensing . . . 26

3.3.3 Reconstruction . . . 26

3.3.4 Evaluation . . . 28

(11)

CONTENTS

3.4 Results . . . 29

3.4.1 Dictionary . . . 29

3.4.2 Sampling Frequency and CS Frame . . . 30

3.5 Discussion . . . 32

3.6 Conclusion . . . 35

4 Compressed Sensing for Communication 37 4.1 Introduction . . . 37 4.2 UWB Overview . . . 38 4.2.1 Definition . . . 38 4.2.2 Emission Mask . . . 39 4.2.3 Pulse Shape . . . 41 4.2.4 Modulation . . . 44 4.2.5 Receiver Overview . . . 45

4.2.6 AWGN Channel and Bit Error Rate . . . 46

4.3 Methodology: Simulated Model . . . 46

4.3.1 IR-transmitter . . . 47

4.3.2 Noisy Channel . . . 48

4.3.3 CS Sampling and Reconstruction . . . 48

4.3.4 Bit Evaluation . . . 51

4.4 Results and Discussion . . . 52

4.4.1 Pulse Bandwidth Choice . . . 52

4.4.2 Changing N . . . 56

4.5 Conclusion . . . 59

Conclusion 62

(12)

List of Figures

1.1 Shannon’s theorem represented in the frequency domain. . . 2

1.2 IoT application scheme. . . 2

1.3 Ultra-wideband spectrum compared with other common narrowband RF signals. . . 4

1.4 LifeSync wireless ECG monitor. . . 5

2.1 Example of how a signal can be expressed as a sparse signal using a proper transformation. . . 8

2.2 Example of sparse signal with only 15 values different from zero among 100 values. . . 10

2.3 CS overall process. . . 12

2.4 Different sampling approach between the common sampling method and the CS measurements. . . 13

2.5 Graphical representation of the acquisition step in the discrete domain . 15 2.6 Graphical interpretation of `2 and `1 minimization problems. . . 16

2.7 CS digital encoder. . . 19

2.8 CS analog encoder. . . 19

3.1 Phases of depolarization and repolarization of a myocardial cell. . . 22

3.2 ECG signal of a normal sinus rhythm for a human heart. . . 22

3.3 Graphical representation of the ECG signal used in this thesis, in the time and frequency domains. . . 24

3.4 Graphical representation of the implemented steps of the algorithm. . . 25

3.5 Reconstruction quality comparison using different wavelet dictionary for representing the ECG signal. . . 30

3.6 Comparison of PRD1 as a function of the compression ratio for a fixed CS frame length and increased sampling frequency. . . 31

3.7 Comparison of PRD1 as a function of the compression ratio for a fixed value of sampling frequency and different CS frame length. . . 31

3.8 Comparison between the original and the reconstructed signal. . . 33

3.9 Different amount of signal contained in one CS frame in the cases of N respectively equal to 128, 256, 512, and 1024. . . 34

(13)

List of Figures

4.2 The Gaussian pulse and its firsts seven derivatives. . . 42

4.3 Variation of the peak frequency increasing the differentiation order for different spreading factors. . . 43

4.4 PSD variation increasing the derivation order n. . . 44

4.5 PSD variation increasing the pulse duration Tm. . . 44

4.6 Meeting the emission mask: sub-GHz pulse. . . 49

4.7 Meeting the emission mask: 3.1 - 5.1 GHz pulse. . . 49

4.8 Meeting the emission mask: 3.1 - 10.6 GHz pulse. . . 49

4.9 Comparison between the three pulses with the same power constraint of -40 dBm. . . 49

4.10 PPM modulation for 5 bits with value [1 0 0 1 0]. . . 49

4.11 Comparison between the time dictionary and the pulse-based dictionary under the same bit rate, pulse and Φ. . . 51

4.12 BER performance comparison with different CR and bandwidth. . . 54

4.13 Emission mask constraints and PSD of the three pulses for same average power per bit -40 dBm using PPM modulation. . . 55

4.14 BER comparison between the energy detector scheme and CS-based scheme when the number of CS measurement are increased. . . 56

4.15 Minimum M evaluation that allows a BER less than 10−3 when the length of the CS frame is modified, high noise scenario. . . 57

4.16 Minimum M evaluation that allows a BER less than 10−3 when the length of the CS frame is modified, low noise scenario. . . 57

4.17 Scheme of sensing and reconstructing process for the proposed receiver. 58 4.18 BER performance improvements using the minimum value of N instead of a CS frame long as the whole bit period. . . 58

(14)

List of Tables

3.1 Compression ratio values which correspond to PRD1 of 9. . . 32

4.1 Average Power Limits for indoor and outdoor UWB application defined by the FCC in the U.S. . . 40

(15)
(16)

Chapter 1

Introduction

We live in a digital world, but we’re fairly analog creatures.

Omar Ahmad

We are living in a world increasingly digital. Every technological field is follow-ing the trend to acquire signals and digitize them. Indeed, digital data is convenient because it can be easily stored, transmitted and elaborated; moreover, digital sys-tems are more robust, flexible and cheaper than the analog counterparts [1]. It can be felt this evolution in the everyday life when we hear music from our smart-phones, when we take a picture or when we stream a movie. Entertainment media are just the most easily understanding examples. Indeed, thousands of sensors are used for detect signals which can be voice, light wavelengths, magnetic fields, radio frequencies, velocities, pressures and more over. Sensors detect the desired signal, transform it into an electrical signal, and then they convert it into digital data.

The basis of this revolutionary paradigm was built on the work of Nyquist and Shannon [2,3]. The Shannon theorem claims that a signal can be perfectly recon-structed from a set of samples uniformly spaced in time. The sampling frequency must be at least twice the maximum frequency component of the signal in order to avoid aliasing, as it is represented in Fig. 1.1. The sampling frequency is named Nyquist rate when it is exactly equal to twice the signal bandwidth. Later, the reconstruction is made using a kernel interpolation.

The device that permits the digitization is the analog-to-digital converter (ADC). Basically, the ADC takes a snapshot of the time varying input signal every sam-pling period and, during the quantization step, it transforms the electrical signal in digital data using a certain number of bits depending on the desired resolution of the converter. Finally, the generated bits can be transmitted, elaborated or just stored.

(17)

CHAPTER 1. INTRODUCTION

Figure 1.1: Shannon’s theorem

repre-sented in the frequency domain. Figure 1.2: IoT application vision [5].

be equipped with noninvasive devices. Consequently, IoT changes the relationship between the object and the subject giving a new control of the surrounding items [4]. This new concept is nowadays possible thanks to the recent advancements in micro-electronics which allow the development of smaller, cheaper and with great computational capability devices. The IoT concept can be applied on numerous and different fields, such as automotive, medical technology, supply chain management, food traceability, recycling, and telecommunication [4]. A vision of the IoTs is illustrated in Fig. 1.2.

Practical applications make use of a large number of IoT sensors that realize, in most of the cases, a wireless sensor network. Different challenges must be addressed to make IoT attractive. Firstly, considering the total number of nodes in the sensor network, the cost of each node have to be reduced as possible. In addition, the device, that senses and transmits the useful information, needs to have a small form factor in order to be placed easily and in particular positions. Moreover, they must be sufficiently autonomous in order to avoid frequently battery replacement. Lastly, the communication protocol must ensure suitable performance [6].

Wireless sensor networks are commonly implemented using narrow-band trans-mission schemes, as Bluetooth, ZigBee or WiFi. The information is transmitted using a carrier signal and different modulation techniques [7]. As a result, the transmitter architecture needs multiple electronic devices, such as the local oscil-lator, the mixer, the power amplifier, and the band pass filter; they can also be integrated onto a single chip [8].

(18)

be taken to overcome this problem.

Firstly, the data can be compressed before the transmission. This procedure is made following the steps:

• the signal is sampled at the Nyquist rate;

• the resulting digital signal is converted to a transform domain; • only the more relevant entries are coded;

• the compressed data is transmitted.

This technique is commonly used in the front-end device and can improve the performance of the transmitter. As an example, the JPEG2000 standard uses the discrete cosine transform to compress the signal information [11]. On the other hand, the architecture complexity of the signal processing block is increased, e.g. the compression algorithm in the digital camera is the main cause of battery con-sumption [12]. Thereby, a great effort must be done to sample the signal and then discard most of it: this can be considered as the failure of the acquisition process [12]. The second solution that can be adopted to reduce the power consumption of the transmitter is to change completely the transmission technology: low power hardware architectures can be considered. A promising solution is the employment of ultra-wideband signals (UWB). In UWB systems, the data information is coded using short time pulses: the pulse generator produce just a voltage swing and, as a consequence, the modulation stage is not required making the system easier, smaller and cheaper to implement [8,10]. The modern trend is to substitute the analog components with the digital counterparts; however, in UWB receiver, the ADC sampling frequency required might not be feasible, especially in fully digital receivers [13]. As a matter of fact, the short time pulses imply a wider bandwidth respect the traditional narrow band signals. Fig. 1.3 shows this difference; it can be noticed also that the maximum power spectral density is limited in order to not disturb the others signals.

Although both solutions address the problem of the transmitter power consump-tion, they present different disadvantages. Indeed, the compression solution reduce the amount of data but it increases the complexity of the signal processing block, while the low power architecture reduces the consumption of the transmitter at the expense of the ADC sampling frequency of the receiver.

In this scenario, the Compressed Sensing theory (CS) finds its successful appli-cation. CS is a new sampling technique that uses a different sampling protocol to condensate the useful information in a small amount of data [1]. CS claims that a signal can be reconstructed only from far fewer samples if the signal is sparse in a fixed representation, that means that the information is contained in few entries when represented by a proper basis, as is well explained is chapter2.

(19)

CHAPTER 1. INTRODUCTION

Figure 1.3: Ultra-wideband spectrum compared with other common narrowband RF signals.

Moreover, the ADC sampling frequency can be reduced. Each CS measurement is a random combination of the entries of the finite length input signal instead of a time snapshot; thereby, each measurement contains information of the whole signal. As a result, the sampling frequency does not need to obey anymore to the Shannon Theorem1.

CS can be applied every time the signal is sparse in a fixed representation. In this thesis, the focus is on the data compression, in electrocardiogram (ECG) sensing systems, and on the reduction of the analog-to-digital converters, in ultra-wideband (UWB) receivers.

The ECG signal can be decomposed in order to obtain a sparse representation: as a result, CS can be applied [14]. The CS technique is useful in ECG application because it reduces the complexity of the front-end with a consequent improvement in the power consumption. Indeed, in certain applications, the heart behavior must be monitored for more than 24 hours: the acquisition device must be small in order to leave good mobility to the patient, and the battery must last until the end of the monitoring time [15,16]. In Fig. 1.4 it is represented a general ECG wireless recording system made by LifeSync corporation [17]. The signal must be acquired, processed and stored or transmitted and, for this reason, the amount of data has to be decreased. Therefore, compression algorithms can be successfully applied at expense of higher power cost of the elaboration. Instead, CS reduces the hardware complexity while it increases the lifetime of the battery.

Considering the limited bandwidth of the ECG signal, the compressed sensing algorithm may be implemented fully digitally. Many authors have demonstrated that CS can be suitable for ECG acquisition and reconstruction as it is well explained in the review made by Craven et al. [14]. Moreover, it is proved that the CS based ECG acquisition system can be implemented in real time [18,19], and for the fetal ECG records [20,21]. In literature comparisons between reconstruction

(20)

Figure 1.4: LifeSync wireless ECG monitor [17].

algorithms and the dictionaries are available, where the wavelet dictionary is the most common [9,22].

In this thesis, an investigation is made on the best setting that can be applied in order to reduce the amount of data; in wireless systems, this leads to a power consumption reduction. Therefore, we compare different results obtained by a trade-off between the sampling frequency and the CS frame length. As a result, we propose valid guidelines for design a CS based ECG acquisition system in the case of noisy signal without a pre-processing stage; in this way, there is open space for improvements.

For what concern the UWB application, CS can be adopted as a solution for the receiver because it relaxes the constraints on the analog-to-digital converters; CS can reconstruct the whole signal using an ADC sampling rate far lower than the Nyquist one [13]. The UWB signal present an inherent small duty cycle that is suitable for CS acquisition. Moreover, the authors of [23] have explained that the sparsity of the UWB signal can be improved using a representation based on the pulse shape; they also demonstrated that CS can be adopted for the channel estimation. Many authors [13,24,25] have shown that CS can be adopted for communication applications. Therefore, a compressed sensing Impulse-Radio (IR) UWB receiver can be chosen for evaluating the bit information of the transmitted signal.

The focus of this thesis is to investigate a CS based IR-UWB receiver that is able to use a sub-Nyquist sampling rate and to reconstruct all the signal information. In literature the applicability is demonstrated but it is missing a study on the most suitable pulse bandwidth that might be adopted. A comparison between three possible pulse bandwidth is made: the sub-GHz, the 3.1-5.1 GHz, and the 3.1-10.6 GHz bands. Moreover, the interest is to determine how the choice of the CS frame can impact on the bit error rate performance. From our results the best CS settings for the IR-UWB communication receiver can be deduced and moreover we present a new possible architecture based on the previous solution.

(21)

CHAPTER 1. INTRODUCTION

(22)

Chapter 2

Compressed Sensing Theory

2.1

Introduction

The demand for digital data is constantly increasing. IoT applications produce a new enormous quantity of information that has to be transmitted or stored inside the devices. In wireless sensor systems, the transmitter is the electronic component that requires more power and a data reduction must be considered for low power applications.

A possible solution is the data compression. Some signals can be represented using just a few relevant coefficients when expressed by a fixed basis. In this case, the signal can be considered sparse that means that the information rate of the signal is smaller than what it is suggested by the signal bandwidth [26]; therefore, only few non-zero entries are present when the signal is expressed by the right basis. As an example, considering the combination of four sinusoids having a different angular frequency, in time domain signal is clearly not sparse, as it can be observed from Fig. 2.1a. However, using the Fourier transform is possible to represent the same signal in the frequency domain and, in this case, Fig. 2.1b shows that only four entries are different from zero. Therefore, instead of storing the time vector, it is possible to store only the position in the frequency domain of the non-zero entries and their magnitude, after a Fourier transform computation. Sophisticated compression algorithms can be adopted before storing or transmitting the data at expense of implementation complexity. As an example, the JPEG or MP3 standards discard the negligible elements of the signal, after a proper transformation, in order to reduce the effective dimension [1].

In order to compress the data, the signal must be acquired at the Nyquist rate, decomposed in a proper basis and only the valuable information is stored or transmitted . From this consideration, Donoho in 2006 asked himself [27]:

(23)

CHAPTER 2. COMPRESSED SENSING THEORY 0 0.05 0.1 0.15 0.2 0.25 0.3 −25 −20 −15 −10 −5 0 5 10 15 20 25 time [s] x(t) Time domain

(a) Superposition of four sinusoidal waves in the time domain.

0 10 20 30 40 50 60 70 80 90 100 0 2 4 6 8 10 12 Frequency [Hz] |X(f)| Frequency domain

(b) Superposition of four sinusoidal waves in the frequency domain.

Figure 2.1: Example of how a signal can be expressed as a sparse signal using a proper transformation.

Starting from this point of view, compressed sensing theory (CS), or compressive sensing, proposes an alternative framework for signal acquisition and sensor design. The basic idea is to use a different sampling protocol to directly condensate the useful information in a small amount of data. A substantial difference with the Shannon sampling theorem is that CS is focused on measuring and compressing only finite length signals. The topic is recent and it grows out of the work of Candès, Romberg, and Tao [28] and Donoho [27].

Compressed sensing claims that it is possible to exactly reconstruct a signal from far fewer samples than the traditional Shannon sampling theorem [26]. A signal that is sparse in a fixed basis, can be reconstructed from a limited set of measurements obtained by linear combination of the entries of the signal [1]. The measurements are nonadaptive and it is only required that the signal is sparse in some basis. The reconstruction is made by non-linear methods and they involve greater computational cost than the traditional sampling technique. Indeed, it is needed to find exactly the sparse vector starting from few condensate measurements. For this reason, the design of the test functions is one of the main challenge in CS theory [1].

The compressed sensing protocol leads to numerous advantages. First of all, the amount of data can be considerably reduced with low computational effort making the front end acquisition system easier. Indeed, no computation is required to compress the data thanks to the nonadaptive CS measurements. Second, the signal is acquired using low sampling frequency: the ADC constraints are then relaxed in some applications as in ultra-wideband systems. Moreover, the nonadaptive measurement property produces data in a shorter time when compared to the others compression standards, which have to decompose the signal, to find and code only the most relevant entries.

(24)

2.2. COMPRESSED SENSING BASICS

• magnetic resonance imaging; • medical signal sensing;

• low hardware complexity cameras; • astronomic imaging;

• ultra-wideband signals, • radar;

• sensor networks; • and many others.

More generally, every signal that has a sparse representation in a fixed basis can be acquired, or compressed, using the CS technique.

In this chapter, the main features of CS are presented and discussed. The focus is on the main requisites to understand and prove the next chapters. The chapter is structured as follows: in the next section, we described generally the compressed sensing process, from the acquisition to the reconstruction. Then, we describe the main CS blocks: the measurement process in section2.3, the recovery algorithm in section 2.4, and the implementation of the CS encoder in section 2.5. Lastly, we explain the main conclusions on this sampling technique.

2.2

Compressed Sensing Basics

The compressed sensing theory is usually explained for discrete signals x ∈ RN

because it is easier to understand and because the theory can be later extended for continuous time signals. Some useful notation is necessarily introduced [1].

Signals produced by physical systems can usually be modeled as linear signals and then, in signal processing field, they can be represented as vectors in normed vector spaces, in particular the N-dimensional Euclidean space RN. In that vector

space, it is possible to define the general `p norm that represent the concept of

distance and it is defined for p ∈ [1, ∞] as: kxkp=    (Pn i=1|xi|p) 1 p, p ∈[1, ∞) max i=1,2,...n|xi|, p= ∞ (2.1) Beside the defined `pnorm exist also the quasinorm `0 which is defined in a different

way because it fails to satisfy the triangle inequality:

kxk0 , card(supp(x)) (2.2)

where supp(x) = {i : xi 6= 0} is the index set of the non-zero entries of x. The `0

(25)

CHAPTER 2. COMPRESSED SENSING THEORY

Figure 2.2: Example of sparse signal with only 15 values different from zero among 100 values.

2.2.1 Sparse and Compressible Signals

The concept of sparsity is the basic feature that the signal must satisfy for be sampled using compressed sensing. This property shows that the real quantity of information is contained within only few entries as it shown in Fig. 2.2: it can be noticed that only fifteen values are different from zero among one hundred samples. Considering x ∈ RN, the signal is mathematically defined as K-sparse if it has a

number K of non-zeros entries. We define asP

K the set of all the K-sparse vectors:

X

K

= {x : kxk0 ≤ K} (2.3)

Sparsity is a non-linear model. Indeed, the sum of two K-sparse signals may not generate a new K-sparse vector but a 2K-sparse vector because their support may be not coincident.

However, real-world signals are usually not perfectly sparse, but they present elements nearly zero. Therefore, these signals are often named compressibles because they are living close to a perfectly sparse signal [31]. Using thresholding strategies is possible to approximate the signal x to the closest sparse signal ˆx ∈P

K, introducing

an approximation error σK(s) defined as:

σK(x)p= min

ˆ

x∈PK

kx −ˆxkp (2.4)

Moreover, some signal present entries that follow a power law decay when sorted in descending order. Faster is the magnitude decay and more compressible are the signals.

2.2.2 Dictionary Representation

(26)

2.2. COMPRESSED SENSING BASICS

can be expressed as a linear combination of the basis elements: x=

N

X

i=1

ψi αi (2.5)

where αi is the vector of coefficients. The linear independence between the vectors

leads to a unique representation of the signal in the basis. An important case is the orthonormal basis where the inner product between two general vectors of the basis is 1 when the two vectors are coincident while 0 in all the other cases. This is a special instance because the generalized Parseval theorem claims that the energy of the coefficient vector is the same of the signal; therefore the geometrical relations between different signals are maintained [32]. Moreover, the coefficients αi can be

easily founded as αi=< x, ψi >. The basis can be both in the continuous and in the

discrete time: in the second case, each function φi is a column vector representing

the basis function sampled at the same frequency of the signal.

As an example, the traditional Fourier representation is a collection of sinusoids that defines an orthonormal basis [33]. In Fig. 2.1 an example is reported: the superposition of four sinusoidal waves, with different pulsation, generates a signal that is obviously not sparse in the time domain, as it is shown in Fig. 2.4a. However, using the Fourier transform, it is possible to observe that the signal in the frequency domain is sparse with only four entries different from zero, as in Fig. 2.4b.

However, there are cases in which the signal is sparse not in an orthonormal basis but in a complete or overcomplete dictionaries. A dictionary is defined as a collection of parameterized waveform D = [d1, d2, ...dγ] and the waveform di is

called atom [33]. The dictionary can be complete if γ = N or overcomplete when γ > N. Usually the case γ < N is not commonly used. Often, the orthonormality property is not satisfied. Among others, important dictionaries are: oversampled discrete Fourier transform , Gabor frames (in particular for radar applications), Curvelet frames, Wavelet frames, and Concatenations. The last one is obtained joining together multiple dictionaries.

In order to not increase the notation, we refer to the dictionary and the basis with the same symbol Ψ. Summarizing, the general discrete signal x ∈ RN can be

decomposed in a proper dictionary in order to obtain a sparse representation: x= N X i=1 ψi αi= Ψ α (2.6) 2.2.3 CS Overview

Considering the signal x ∈ RN, M compressed sensing measurements are made

trough the so-called sensing matrix Φ ∈ RM ×N:

y= Φx (2.7)

(27)

CHAPTER 2. COMPRESSED SENSING THEORY

Figure 2.3: CS process: M measurements are performed using the sensing matrix, then the y vector can be transmitted or stored. The reconstruction algorithm finds the sparsest vector in a defined dictionary and the original signal can be successfully recovered.

recover it with different methods. The reconstruction algorithm needs to find the sparser vector that produces the measurement vector y:

min

x∈RNkxk0 s.t. y= Φx (2.8)

Although the founded solution is the correct one, this problem is well known in literature to be a non-convex NP hard (Nondeterministic Polynomial-time) opti-mization problem [29]; this problem is intractable requiring a great computational time and capability to be solved. Therefore, different minimization problems are used and it is demonstrated that the `1 norm minimization is able to find the right

solution.

min

x∈RNkxk1 s.t. y= Φx (2.9)

If the signal is sparse in a different dictionary, the minimization problem find the sparsest solution in that dictionary and then the signal x is recovered starting from the founded coefficients.

The overall CS path is expressed in Fig. 2.3. In order to make the reconstruction possible, the sensing matrix must satisfy different properties, and the reconstruction must be achievable also from noisy measurements. Indeed, all the measurements are affected by noise and the system can be then modeled as:

y= Φx + n (2.10)

where n ∈ RM is the noise vector. The `

1 minimization problem of equation 2.9 is

(28)

2.3. THE SENSING MATRIX

(a) Common sampling protocol according to

Shannon theorem. (b) CS measurements obtained by randomlinear combination of the input.

Figure 2.4: Different sampling approach between the common sampling method and the CS measurements.

Lasso problemis implemented, as explain in section2.4. One of the main challenges in CS design is the sensing matrix that has to satisfy some properties, fist of all the Restricted Isometry Property (RIP). In this way is possible to obtain robust CS systems.

2.3

The Sensing Matrix

The potentiality of compressed sensing lies in the capability of sensing and com-pressing the information, of a finite length signal, using far fewer measurements than the Shannon sampling method. Each CS measurement is obtained by inner products between the signal and some sampling, or sensing, functions. From an-other point of view, each measurement contains information of the whole signal and not only a snapshot. From M measurements it is then possible to reconstruct the K−sparse signal if the sampling functions satisfy some properties. A general measurement is expressed as:

yl=< x, φl>, l= 1, ..., m (2.11)

If the sensing function φl are Dirac delta functions, equation 2.11 refers to the

general sampling in time [26]. In Fig. 2.4 it is shown graphically the differences between the common sampling method, according to the Shannon theorem, and the CS measurement process. In the illustrated case the sampling functions are randomly chosen; this choice is explained further in this chapter.

Considering a finite length discrete time signal x ∈ RN, a CS measurement

system acquired M linear measurements and the process can be expressed as:

(29)

CHAPTER 2. COMPRESSED SENSING THEORY

where the matrix Φ ∈ RM ×N is the so-called sensing matrix. Typically M is much

smaller then N and therefore the Φ represent a dimensionality reduction. The ratio between the dimensions is named compression ratio (CR):

CR= N

M (2.13)

and it is greater than 1. In the general CS theory, the measurements are non-adaptive, meaning that the sampling functions are not depending on previous ac-quired measurements but they are fixed.

Although the interest is to acquire compressed measurements of continuous time signals, in section2.5it is explained how the discrete time CS theory can be extended to the continuous case using a proper encoder device. Therefore, x can be considered as N samples of the windowed continuous signal xc sampled at the Nyquist rate.

The sensing matrix must be designed in order to be able to identify uniquely the original vector x from the measurement vector y: the information must be in some way preserved in the sensing step. Obviously equation 2.12 is ill-posed when M < N. However, knowing that the signal is sparse allows making some considerations on the required properties of Φ and on the minimum number of measurements needed.

2.3.1 Spark Property

Each K-sparse vector, acquired using the sensing matrix Φ, must have a unique representation y in order to be distinguished from every other possible K-sparse vector. If this feature is not verified, then for some x, x0 P

K it is possible to have

Φx = Φx0, then Φ(x − x0) = 0 and as a consequence x − x0 P

2K. Therefore in

order to have a unique representation of each K-sparse vector the null space of Φ must not contain vectors in P

2K [1]. This property is expressed mathematically

using the spark of a matrix, that is defined as the smallest number of columns of the matrix that are linearly dependent [31].

The sparse property ensures that for any y ∈ RM, there exist at most one signal x ∈P

K such that y= Φx, if and only if

spark(Φ) > 2K (2.14)

Basically, if the matrix has a minimum number of columns linearly dependent greater than 2K, then there will be at most 2K columns linearly independent and then the null space of Φ not contains vectors in P

2K. Moreover, from the spark

theory it can be seen that spark(Φ) ∈ [2, M +1] [31]. As a result, the spark property fixes the M value boundary:

M ≥2K (2.15)

(30)

2.3. THE SENSING MATRIX

Figure 2.5: Graphical representation of the acquisition step in the discrete domain [36].

2.3.2 The Restricted Isometry Property

The noise modifies the sparsity of the signal and different K-sparse vectors can be mapped in the same y. Candès and Tao introduced in [34] the so-called Restricted Isometry Property that represents the basic feature that a sensing matrix needs to satisfy.

A generic matrix A satisfies the RIP of order s if there exist a δk(0, 1)

(isometry constant) such that

(1 − δk)kxk2 ≤ kAxk22 ≤(1 + δk)kxk22 (2.16)

holds for all the K-sparse vectors x [1]. If A satisfies the RIP of order 2K, with a small δ2K, the distances between any pair of K-sparse vectors are almost preserved.

From another point of view, all the subsets of 2K columns are nearly orthogonal [26]. It is demonstrated that a matrix with entries taken from i.i.d. random distri-bution have small isometry constants and they satisfy the RIP with overwhelming probability if: M ≥ CKlog N K  (2.17) with C a constant that depends on different instances [34], [35], [26]. Typically, sensing matrices are built from Gaussian and Bernoulli distribution:

φi,j ∼ N  0, 1 M  Gaussian case (2.18) φ(i, j) =    +1 M with probability 1 2,1 M with probability 1 2, Bernoulli case (2.19)

In Fig. 2.5it is shown the sensing step in a graphical way. The signal x is acquired using the random matrix Φ and x can be considered sparse using the decomposition made by Ψ.

(31)

CHAPTER 2. COMPRESSED SENSING THEORY

(a) Reconstruction using `2minimization

problem. (b) Reconstruction using `problem. 1minimization

Figure 2.6: Graphical interpretation that shows why the solution obtained using the `2 minimization problem is wrong. Instead, the `1 minimization problem can

find the exact sparse solution. the factor 1

M can be stored only once separately. The matrix-multiply operation

are minimized as well.

If the signal is sparse in an orthonormal dictionary Ψ and if Φ satisfies the RIP, then also the new matrix ΦΨ satisfies the RIP. Instead, if the dictionary is not orthonormal, the product between the two matrices may not satisfy the RIP.

However, RIP is difficult to demonstrate and compressed sensing acquisition step can be seen from a different point of view: the incoherence. The coherence of a matrix is defined as the largest inner product between any two columns:

µ(A) = max

1≤i<j≤N

| < ai, aj > |

kaik2kajk2 (2.20)

It is desired that the sensing matrix have small coherence because it is demonstrated that the minimum number of measurements are proportional to the square of the coherence. Using overcomplete dictionaries, the resulting coherence is high; however it is proved that the reconstruction is still possible [38].

2.4

Recovery Algorithms

If the signal x is acquired using a sensing matrix that satisfies the basic RIP, the signal can be reconstructed using different algorithms. It is possible to divide them in two groups: le `1 minimization algorithms and the greedy algorithms.

2.4.1 Basis Pursuit

The signal can be recovered using the `0 minimization problem of equation 2.8.

(32)

2.4. RECOVERY ALGORITHMS

problem [29]:

min

ˆ

x∈RNkˆxkp s.t. y= Φˆx (2.21)

Indeed, this is possible because kˆxkp

papproaches to kˆxk0when p tend to 0. However,

the solution of the problem is wrong for all the p > 1. As an example, a sparse signal x ∈ R3 is considered: x = [1 0 0]. The signal is acquired using a sensing

matrix Φ, and a measurement vector y is obtained. Defining B(y) = {ˆx : y = Φˆx} the set of points that verify the equation, the interest is to find the original sparse vector x. Using a `2 minimization problem:

min

ˆ

x∈RNkˆxk2 s.t. y= Φˆx (2.22)

a wrong solution will be found. Indeed, from Fig. 2.6a it can be noticed that the solution of the problem, obtained by the intersection between B(y) and the `2norm

ball, gives a wrong result.

Instead, the `1 minimization problem finds always the sparsest solution thanks

to its norm feature, as it can be seen in Fig. 2.6b. This problem is also known as Basis Pursuit [34].

In the noisy case the reconstruction is possible using the minimization problem known as Lasso which relaxes the constraints as follows:

min

ˆ

x∈RNkxk1 s.t. kΦˆx − yk2 ≤  (2.23)

where  is the estimated upper boundary of the noise power.

2.4.2 Greedy Algorithms

An alternative class of recovery algorithms is named Greedy. In this case the es-timated sparse vector ˆx is evaluated trough an iterative procedure where an entry of ˆx is evaluated in each step using a hard decision based on local optimization criteria [39]. There exist a great number of different Greedy algorithms that can be chosen for various applications. In this thesis it is used the Orthogonal matching pursuitalgorithm (OMP) [40,41]. The main advantages of using this reconstruction algorithm are the easy implementation and the computational speed, while it might give worse results outside the simple settings [42]. OMP shows valid performance in the UWB application and, for this reason, the main features are explained. Orthogonal Matching Pursuit The OMP algorithm evaluates at each step the column of Φ (or A = ΦΨ if the signal is sparse in a dictionary representation) that is most correlated with the measurement vector y [42]. The contribution of the column is then subtracted to y and the procedure is repeated on the residual [42].

We define Λ a set of index and xΛa vector having all the entries not indexed in

Λ equal to zero. Similarly, AΛis the matrix obtained setting to zero the columns of

(33)

CHAPTER 2. COMPRESSED SENSING THEORY

The OMP algorithm initializes Λ0 = 0 and the residual equal to the input

measurement vector r0 = y. The iteration counter is then incremented t = 1. The

algorithm follows the steps:

• the current index λt is evaluated solving the optimization problem

λt= arg max

j=1,...,N| < rt−1, aj > | (2.24)

the algorithm selects the index of the column that is more correlated to the residual vector. In case of multiples indexes, the choice is taken deterministi-cally;

• the index set and the matrix of chosen columns are updated: Λt= Λt−1T{λt},

At= [At−1 aλt];

• a least square problem is solved in order to obtain the new estimated vector: xt= arg minxtx − yk2 ; (2.25)

• the approximated measurement vector atis evaluated, the contribution of the

estimated vector is then subtracted from the measurement vector, and the residual is updated:

attxt

rt=y − at ; (2.26)

• the iteration counter is incremented and the procedure is repeated until a stopping criterion is met.

Different choices can be adopted to stop the iteration. A possible solution is to break the iteration when krtk2 > krt−1k2; another one is to stop the iteration

after the evaluation of K atoms, where K is the expected sparsity. In this thesis, when the OMP is applied, the stopping criterion is defined using the sparsity of the signal. If K is not defined, the algorithm evaluates all the component of the estimated vector xt.

The residual is always orthogonal to the columns of Φt and, as a result, a new

atom is selected at each step.

2.5

Compressed Sensing Encoder

(34)

2.5. COMPRESSED SENSING ENCODER

Figure 2.7: CS digital encoder: the M measurements are implemented using digital logic.

Figure 2.8: CS analog encoder: the entries of the sensing matrix are taken from the Bernoulli distribution in the particular example.

For signals with a narrow baseband as the ECG signal, the digital encoder can be successfully applied because the required ADC sampling frequency is not particularly high. In the digital encoder, the sensing matrix is applied on N samples long frames of the signal sampled at the Nyquist rate (Rny) or higher frequency (fs).

This procedure can be performed using a Digital Signal Processor (DSP) otherwise the circuit of Fig. 2.8can be implemented. Thereby, the signal is quantized and M parallel measurements are performed using digital logic [43]. The resulting vector is CR = N/M times shorter than the original one.

Instead, for wide bandwidth signals, as the UWB, the demanded ADC sampling rate represents a limitation and a sub-Nyquist solution must be adopted. There exist many architectures that realize the analog CS encoder; this is also known as Analog to Information conversion [44]. A possible instance is the parallel branches implementation known also as Random Modulation Pre-Integrator (RMPI) [43,45,

46].

In the analog case, the N row coefficients of Φ are firstly applied to the analog signal at the Nyquist rate or higher frequency. The process is obtained using rectan-gular waves with magnitude equal to the φi,j coefficient and duration equal to 1/fs.

(35)

CHAPTER 2. COMPRESSED SENSING THEORY

samples the output and the integrator is reset; thus, the ADC sampling frequency is fs

N [37]. The process is executed M times in parallel branches.

As a result, the choice of the M parameter defines the demanded number of electronic components, in particular the analog-to-digital converters. Therefore, it is required to limit the M value in low power consumption applications. Fig. 2.7

depicts the CS analog encoder. It can be noticed that in the considered case the entries of the sensing matrix are taken from the Bernoulli distribution.

Different solution can be adopted when the required number of branches is to high for practical implementations, e.g. the correlated signal can be segmented in order to obtain fewer branches at expense to higher ADC sampling frequency [47].

2.6

Conclusion

In this chapter the basic properties of the compressed sensing theory have been pre-sented. It is clear that CS represent a valid solution both for an easier compression of the signal and for reducing the constraints on the analog-to-digital converter in wideband applications. We have explained the main features needed in order to use CS in real systems, in particular, we have described the sparsity of the signal and its representation in a different dictionary. How to built a valid sensing matrix, and the commons reconstruction algorithms have been reported. Moreover, we have de-scribed how the choice of N and M influences the number of electronic components in the analog encoder.

(36)

Chapter 3

Compressed Sensing for

Electrocardiogram Acquisition

3.1

Introduction

According to Word Health Organization statistics [48], one of the main cause of deaths in the world is connected to hearth diseases. Indeed, in 2012, ischaemic heart disease was the cause of dead for 7.4 million people in the world followed by stroke (6.7 million deads), and chronic obstructive pulmonary disease (3.1 million deads). While medical researchers are studying the pathologies, the advancements in electronics permit to develop devices useful for prevention and monitoring.

A valid solution is the employment of wireless sensor networks, in which the electrocardiogram signal (ECG) is acquired using sensors and the resulting data is transmitted or stored [49]. This solution is available now thanks to micro-electronics devices and to wireless technology which permits to produce noninvasive monitoring systems. Indeed, the monitoring devices need to be wearable, leaving the patient free to move [16], and autonomous because, for some disease, long recordings times are demanded. As an example, for some particular conditions of cardiac arrhythmia, it is required to monitor the heart signal for a range between 12 and 72 hours [15]. In order to extend the lifetime of the battery, data compression algorithms can be adopted. However, this solution is time-consuming and it needs great compu-tation capability. Alternatively, compressed sensing can be an attractive solution that reduces the amount of sensing data while preserving a relaxed coding system. In literature it is possible to find many papers that demonstrate that CS can be successfully applied to ECG signal as it is well explained in the review made by Darren et al. [14]. Moreover, some real time implementation CS-based ECG acqui-sition systems are also investigated [18,19]. Compressed sensing is also proved to be useful for abdominal fetal ECG recordings [20,21].

(37)

reconstruc-CHAPTER 3. COMPRESSED SENSING FOR ELECTROCARDIOGRAM ACQUISITION

Figure 3.1: Phases of depolarization and

repolarization of a myocardial cell [51]. Figure 3.2: ECG signal of a normal sinusrhythm for a human heart. tion algorithms and, furthermore, a nonuniform binary sensing matrix is tested in [50].

However, in literature it is missed a general investigation on the trade-off be-tween the sampling frequency and the CS frame length. Therefore, in this thesis we acquire and reconstruct a noisy signal and we evaluate the performance varia-tions due to changes in the setup parameters. As a result, guidelines are provided for the design of the CS-based ECG acquisition system for low power consumption application.

The chapter is structured as follows: in the next section the main features of the ECG signal are provided both from a medical and a signal processing point of view. In section3.3we explain the steps from the acquisition to the reconstruction validating also the choices made on some fixed parameters. Section3.4describes the obtained results and in section 3.5we discuss them. Finally, we report the overall conclusions of the chapter.

3.2

The Electrocardiogram Signal Overview

The ECG is the graphical recording of surface potentials generated by the heart activity. The contraction of the myocardial cells is due to a rapid reversal of the electrical trans-membrane potential that occurs when the cell exchanges some ions with the surrounding fluids, such as sodium, calcium, and potassium [52]. Fig. 3.1

(38)

3.2. THE ELECTROCARDIOGRAM SIGNAL OVERVIEW

within the body [53]. The ion current produced by the action potential generates a potential difference that can be recorded on the skin using electrodes displaced in proper positions: the electrocardiogram represents the changes of this potential as a function of time.

The sequence of beats is called sinus rhythm and the normal rate is 60 BP M (beats per minute). The normal schematic diagram of one beat is shown in Fig3.2

where the typical phases of the heart beat are figured. The corresponding heart behavior can be summarized as follow:

• P wave: it is due to the depolarization of the atria;

• QRS complex: it results from the ventricular depolarization and it has a normal amplitude of 1.5 mV . In this interval also the atrial repolarisation occurs but it is obscured by the QRS complex;

• T wave: it corresponds to the ventricular repolarisation.

In the power spectral density of a normal ECG signal, it is possible to notice peaks at 1, 4, 7 and 10 hertz, that correspond respectively to the beat rate (normal rate 60 BP M), the T wave, the P wave and the QRS complex [54]. The range of the ECG spectrum is between 0.005 Hz and 150 Hz [53].

3.2.1 Noise

The ECG signal is effected by different sources of noise. According to [53], it is possible to group the noise respect its origin:

Low frequency noise: the change of distance between the electrode and the heart yields a variation of impedance that produces a noise with frequencies below 1 Hz. This is mainly due to small patient’s movements as breathing. During some ECG recordings, as the exercise test, the frequency of the noise can be several hertz.

Muscle noise: the contraction of the skeletal muscles affects the ECG signal with noise having frequency between 20 and 80 Hz. This contraction can be caused by involuntary shivers due to the room temperature and they are more evident during exercise test ECGs.

Electromagnetic noise of power line: the power line produces a narrow inter-ference at 50 Hz (or 60 Hz). This can be easily noticed in the power spectral density. The resulting peak can be removing using a notch filter that usually is implemented digitally.

(39)

CHAPTER 3. COMPRESSED SENSING FOR ELECTROCARDIOGRAM ACQUISITION 0 0.5 1 1.5 2 2.5 3 3.5 4 −9.4 −9.2 −9 −8.8 −8.6 −8.4 −8.2 −8 −7.8 −7.6 −7.4 x 10−3 time [s] ECG(t)

ECG time domain

(a) Four seconds of the ECG signal in time domain.

0 100 200 300 400 500 600 700 800 900 1000 10−9 10−8 10−7 10−6 10−5 10−4 10−3 10−2 10−1 Frequency [Hz] |ECG(f)|

ECG frequency domain

(b) Fourier representation of one beat of the ECG signal.

Figure 3.3: Graphical representation of the ECG signal used in this thesis, in the time and frequency domains.

Sophisticated digital techniques can be used for partially remove the low frequency and the muscle noise.

3.2.2 Real ECG Signal

The signal used in this thesis is a 20 seconds ECG record and it is sampled using a sampling rate of 2 KHz. The heart rate is around 80 BP M. In Fig. 3.3a four seconds of the signal are reported. It can be noticed that the signal is noisy. Using the Fast Fourier Transform (FFT) it is possible to analyze the frequency behavior of the signal. In Fig. 3.3bthe Fourier representation of one complete beat is shown. It can be easily observed the presence of peaks at the harmonics of the power line frequency (50 hertz in this case).

3.3

Methodology: Simulated Model

(40)

3.3. METHODOLOGY: SIMULATED MODEL Sampling Fsam Sensing matrix Ф M x N N, M, distribution Xorig y Reconstruction Algorithm Ф Ψ Dictionary Ψ Xrec

Figure 3.4: Graphical representation of the implemented steps of the algorithm. simulated using a commercial software package1. The acquisition and reconstruction

steps are shown in the graphical representation of Fig. 3.4, where they are also indicated the parameters that can be changed.

According to CS theory of chapter 2, the sensing matrix is chosen from the Bernoulli random distribution and, as a result, the acquisition and reconstruction is strongly influenced by the matrix. Therefore, each simulation is repeated 100 times with different independent random sensing matrices.

The signal tested is the one described in section 3.2.2. The algorithm performs the following steps:

• sampling: the signal is firstly sampled at the Fsam rate;

• CS sensing: the signal is acquired using the sensing matrix defined by the parameters M, N and the random distribution entries;

• CS reconstructing: from the measured signal y the reconstruction algorithm finds the sparsest signal in the dictionary representation;

• evaluation: the original and the reconstructed signal are compared in order to estimate the quality of the chosen parameters.

3.3.1 Sampling

The first step is the sampling of the signal. It is possible to see from Fig. 3.3b, that the bandwidth of the signal is not wider than 150 Hz and, for this reason, the minimum sampling frequency that can be used is 300 Hz according to the Shannon theorem [2,3]. As explained in chapter 2, the CS encoder can be both digital or analog. In the ECG case, the minimum sampling frequency is not high and, for this reason, the digital encoder might be adopted. However, even if the sensing is made by an analog encoder, the signal is again multiplied by the entries of the sensing matrix at least at the Nyquist rate before the final sampling. Therefore,

(41)

CHAPTER 3. COMPRESSED SENSING FOR ELECTROCARDIOGRAM ACQUISITION

for the simulation of both encoders, the fist step is the acquisition of the signal at the sampling frequency, and the simulated frequency can be changed in order to evaluate the performance.

The sampling frequency is changed from 300 Hz to 450 Hz with a 50 Hz step.

3.3.2 Sensing

The sampling is performed using a sensing matrix with size M ×N. The entries can be taken from i.i.d. Gaussian or Bernoulli distribution. In this thesis the Bernoulli one is chosen because its easiest implementation:

φ(i, j) =    +1 M with probability 1 2,1 M with probability 1 2, (3.1) Moreover, the Bernoulli matrix can be easily stored using only one bit for each entries and the 1/M term can be stored separately.

We desire to find the suitable parameters M and N which reduce the power computations. As a result, the parameters are changed during the simulation. Con-sidering that the CS-based ECG acquisition system has a simplest digital imple-mentation, the parameters are chosen according to the power of 2. The maximum value is set to 1024. The sensing step produces the measurement vector y ∈ RM.

3.3.3 Reconstruction

The sensed signal can be transmitted or stored. For simplicity, we neglect the sensed and the transmission noise. The reconstruction algorithm finds the sparsest solution in the dictionary representation.

The `1 minimization problem is adopted in this thesis. Multiple toolboxes are

available on-line that implement the optimized algorithm, in particular we use the cvx [55] and the l1magic [56]. After preliminary simulations, the reconstruction quality of the two toolboxes are similar but we decide to make use of the l1magic simulation toolbox for its computational speed. The reconstruction algorithm re-covers the sparsest vector of coefficients (α) in the fixed representation defined by the dictionary Ψ. The signal ˆx is then recovered according to equation2.6: ˆx = Ψα. Moreover, the choice of the dictionary is of prime importance because it defines the sparsity and, as a result, the reconstruction quality. Considering the ideal ECG signal of Fig. 3.2, it can be noticed that the signal presents a good sparsity in the time domain, especially in the case of low BP M. Indeed, the authors of [9] investigate different algorithm performance using the time domain dictionary.

(42)

3.3. METHODOLOGY: SIMULATED MODEL

using a single function ψ(t), called the mother wavelet, that is dilated and shifted [57]; as a result, the resolution band ∆f raises when f is increased .

The mother wavelet is defined in the continue domain as: ψab(t) = √1 t − b a  (3.2) when a > 1 the expand version is obtained, and when a<1 the compressed one. The continue wavelet transform (CWT) is defined as [57]:

CW T[f(t)] = W (a, b) = √1 a Z ∞ −∞ f(t)ψ? t − b a  dt = f(t) ∗√1 ?t − b a  (3.3) where W (a, b) represents the wavelet coefficients of the function f(t). In order to invert the transform, the mother wavelet must have 0 average value.

The digital wavelet transform (DWT) is usually implemented using filter banks [58,59] and it allows the multi-resolution analysis: indeed, the WT produces sets of coefficients that represent the approximated and the detailed function using different scale levels. The transform can be easily done by a cascade of filters and sub-sampling stages [58]: the signal is filtered using a low-pass and a high-pass filter. Basically, the low-pass filter gives the new coefficients that represents the signal in a new scale and they can be filtered again; the high-pass filter expresses the differences between two resolutions. The signal is usually 2L long, and in this way

it is possible to obtain L resolution levels. Moreover, the mother wavelet defines the coefficients of the two filters. As an example, for the Haar wavelet, the low-pass filter h and high-pass filter g as follows:

h=√1 2[1, 1] g=√1

2[1, −1] (3.4)

The transformed signal has often many zeros entries and therefore it is suitable for compressed sensing. Moreover, the transform needs to be expressed using the dictionary matrix in order to use the DWT in the CS reconstruction algorithm: the cascade filters, with the inner sub-sampling step, can be arranged using a square matrix [60,61]. Using this procedure, the N long signal x can be expressed through its wavelet coefficients α using as a dictionary the matrix Ψ ∈ RN ×N. The maximum

decomposition level, in this case, is linked to the size of the filter.

(43)

CHAPTER 3. COMPRESSED SENSING FOR ELECTROCARDIOGRAM ACQUISITION

3.3.4 Evaluation

In order to compare the results between different simulations, it is necessary to define parameters that expresses the quality of the reconstruction and the performance of the system. Therefore, the reconstructed signal ˆx is compared to the original one x. According to literature [14,64], the evaluation metrics chosen are the compression ratio (CR) and the percentual root-mean-square difference (PRD). The compression ratio is defined as the ratio between the lengths of the original signal (N) and the compressed one (M):

CR= N

M (3.5)

It represents how much the final signal is compressed and it is always greater than one.

The PRD metric is often used to evaluate the quality of the reconstruction. The authors of [19,22], use the following equation for PRD:

P RD= 100 ·||x −ˆx||2

||x||2 (3.6)

where x is the original signal and ˆx is the reconstructed one. However, some authors [14,64,65] explain that PRD is influenced by the mean value of the original signal:

¯x = 1 N N X i=1 xi (3.7)

Therefore, they suggest to use a different equation to obtain a more accurate pa-rameter:

P RD1= 100 ·

||x −ˆx||2

||x −¯x||2 (3.8)

Zigel, Cohen, and Kats [64] suggest to consider the quality of the compression as very good if the PRD1 is between 0 and 2 and good if PRD1 is between 2 and 9. Values of PRD1 greater than 9 correspond to a bad reconstruction. However, the settings

that produce worst results may not be always useless. Indeed, in [64] the Weighted Diagnostic Distortion (WDD) measure is introduced: it takes in consideration the PQRST complex diagnostic features and it express the quality of the signal from a cardiologists’ perception. However, WDD requires greater computation capability and, therefore, we leave its implementation for a possible future work.

To compare the results obtained using different settings the PRD1 is chosen

and the mean value and the standard deviation are evaluated. The mean value is computed using the same equation of3.7on 100 PRD1 results, whereas the SDV is

defined generally by the following equation: SDV(z(n)) = v u u t 1 N −1 N X i=1 (zi¯z)2 (3.9)

(44)

3.4. RESULTS

3.3.5 Simulations

In order to make clearer how we change the investigation parameters in the var-ious simulations, we summarize the settings that are prevvar-iously explained. The simulations are made considering:

1. wavelet dictionary: the tested wavelets are db4,db8, db10, rbio3.7, rbio3.9, and bior4.4;

2. sampling frequency: it is changed from 300 Hz to 450 Hz with a 50 Hz step; 3. N: the length of the CS frame is increased according to the power of 2 from

64 to 1024;

4. CR: the compression ratio is changed from 1.25 to 3.00 with 0.25 step. The results are plotted using the main value and the standard deviation. In order to make clearer plots, the results with maximum PRD1 value greater than 25 are

not reported.

3.4

Results

3.4.1 Dictionary

The first simulation is made in order to define the suitable dictionary for the given ECG signal. The sampling frequency is fixed to 300 Hz and the CS frame is chosen equal to 512. It is supposed that differed choices (sampling frequency and N) do not effect the evaluation of the best dictionary. The results are shown in Fig. 3.5where the values greater the 25 are not reported whereas the target value of PRD1 = 9 is

indicated by a dashed line. It can be noticed that the best results are obtained using the wavelet bior4.4. Indeed, in the considered case, the bior4.4 wavelet dictionary allows achieving a PRD1value less than 9 for a compression ratio of 1.9; using other

wavelet dictionaries we obtain worst results.

Furthermore, from Fig. 3.5it is possible to observe that, if we build a dictionary based on a mother wavelet that belongs to the Daubechies family wavelets (db4, db8, and db10 ), the results are almost equivalent in the PRD1range of interest. Instead,

considering PRD1 values greater than 9, the wavelet db4 produce better results

when compared to other Daubechies functions.

References

Related documents

As we will see, it turns out that even if k is too large for the given sensing matrix A (in the sense of guaranteed reconstruction), error correction may still be successful with

För- eningsformen och statens finansiering av verksamhet i förenings- eller studieförbundsform bidrar till att knyta transnationella verksamheter till nationalstatens fysiska ramar

För det tredje har det påståtts, att den syftar till att göra kritik till »vetenskap», ett angrepp som förefaller helt motsägas av den fjärde invändningen,

Linköping Studies in Science and Technology, Dissertation No. 1963, 2018 Department of Science

Cloverfield teasern var bra inspiration för hur vi ville göra vår teaser, den skulle vara mystisk och inte avslöja för mycket.. Med en lugn och trevlig start ville vi att det skulle

I en litteraturstudie undersökte Thornberg (2014) vilka effekter sambedömning har och om dessa effekter kan leda till en mer likvärdig bedömning och

The main objective of this thesis is to demonstrate the capability of the atmospheric pressure chemical ionization technique (APCI), using gas chro- matography coupled to tandem

Given the seemingly high importance of both user communities as a source of learning and market sensing capabilities to capture that learning, the aim of the thesis