27
UNIVERSITY OF UDINE – ITALY – DPIA Eusipco 2016, Budapest www.uniud.it Compression and Beyond ROBUST RECONSTRUCTION FOR CS-BASED FETAL BEATS DETECTION Giulia Da Poian [email protected] Riccardo Bernardini [email protected] Roberto Rinaldo [email protected] University of Udine Polytechnic Department of Engineering and Architecture Via delle Scienze 206, Udine, Italy See also: http://ieeexplore.ieee.org/document/7305770/ http://www.mdpi.com/1424-8220/17/1/9/htm

ROBUST RECONSTRUCTION FOR CS-BASED FETAL BEATS DETECTION

Embed Size (px)

Citation preview

Page 1: ROBUST RECONSTRUCTION FOR CS-BASED FETAL BEATS DETECTION

UNIVERSITY OF UDINE – ITALY – DPIA Eusipco 2016, Budapest www.uniud.it

Compression and Beyond

ROBUST RECONSTRUCTION FOR CS-BASED FETAL BEATS DETECTION

Giulia Da Poian [email protected] Riccardo Bernardini [email protected]

Roberto Rinaldo [email protected]

University of UdinePolytechnic Department of Engineering and Architecture

Via delle Scienze 206, Udine, Italy

See also:http://ieeexplore.ieee.org/document/7305770/http://www.mdpi.com/1424-8220/17/1/9/htm

Page 2: ROBUST RECONSTRUCTION FOR CS-BASED FETAL BEATS DETECTION

UNIVERSITY OF UDINE – ITALY – DPIA Eusipco 2016, Budapest www.uniud.it

ROBUST RECONSTRUCTION FOR CS-BASED FETAL BEATS DETECTION

• We propose a novel system for the compression and analysis of Abdominal Fetal Electrocardiogram using Compressive Sensing (CS) and Independent Component Analysis (ICA) applied in the compressed domain, and sparse representations in a specific dictionary.

• We describe the proposed scheme and a robust variant of the Smoothed-L0 reconstruction algorithm.

• The proposed modification significantly improves the reconstruction quality, both for synthetic and real-world ECG signals.

Roberto Rinaldo August 31st, 2016

Page 3: ROBUST RECONSTRUCTION FOR CS-BASED FETAL BEATS DETECTION

UNIVERSITY OF UDINE – ITALY – DPIA Eusipco 2016, Budapest www.uniud.it

Roberto Rinaldo August 31st, 2016

Page 4: ROBUST RECONSTRUCTION FOR CS-BASED FETAL BEATS DETECTION

UNIVERSITY OF UDINE – ITALY – DPIA Eusipco 2016, Budapest www.uniud.it

Outline

• Overview of Sparse Representations and Compressive Sensing (CS)

• Gaussian Dictionary for ECG approximation and CS applied to ECG signal

• Analysis of non invasive Fetal Electrocardiogram (fECG) - adopted methodologies

• Reconstruction algorithm • Results

Roberto Rinaldo August 31st, 2016

Page 5: ROBUST RECONSTRUCTION FOR CS-BASED FETAL BEATS DETECTION

UNIVERSITY OF UDINE – ITALY – DPIA Eusipco 2016, Budapest www.uniud.it

Sparse Representation

coefficients

basis, frame

Many (blue)

Sparse representation of an image via a multiscale wavelet transform

Approximation of image obtained by keeping only the

largest 10% of the wavelet coefficients.

A signal is sparse if most of its coefficients are (approximately) zero

Signals can often be well-approximated as a linear combination of just a few elements from a known basis or dictionary

Roberto Rinaldo August 31st, 2016

Page 6: ROBUST RECONSTRUCTION FOR CS-BASED FETAL BEATS DETECTION

UNIVERSITY OF UDINE – ITALY – DPIA Eusipco 2016, Budapest www.uniud.it

The column vectors of a dictionary are discrete time elementary signals called dictionary atoms

Sparse Representation

Taking Advantage of Sparsity for:

audio/image/video

signal detection and classification blind source separation

• compression • denoising • superresolution

To improve sparsity of composite signals, one has to construct a transform matrix with the best basis

DICTIONARY: collection of elementary waveforms or atoms or basis functions.

Example of an Overcomplete Dictionary 250 x 4267)

Roberto Rinaldo August 31st, 2016

Page 7: ROBUST RECONSTRUCTION FOR CS-BASED FETAL BEATS DETECTION

UNIVERSITY OF UDINE – ITALY – DPIA Eusipco 2016, Budapest www.uniud.it

COMPRESSIVE SENSING (CS): signals that are sparse in some domain, can be fully reconstructed using only few random measurements.

• Asymmetrical:Mostprocessingatdecoder • Universality:Randommeasurementscanbeusedforsignalssparseinanybasis

Compressive Sensing

Systems adopting compressive sensing can:

achieve sub-Nyquist sampling rates directly acquire compressed

representations of signals process signals and solve inference problems in a reduced-dimensionality domain with small or no penalties

Random Sensing Matrix

Measurements

Roberto Rinaldo August 31st, 2016

Page 8: ROBUST RECONSTRUCTION FOR CS-BASED FETAL BEATS DETECTION

UNIVERSITY OF UDINE – ITALY – DPIA Eusipco 2016, Budapest www.uniud.it

Compressive Sensing - ReconstructionSince M<N there are infinitely many solutions

How to solve the undetermined system of equation to recover the original signal from the measurements vector?

Signal reconstruction algorithm aims to find signal’s sparse coefficient vector

NP- hardl0 norm minimization:

can reconstruct the signal exactly with high probability using only M=k+1 measurements

l1 norm minimization:

can exactly recover k-sparse signals using M=c * k log(N/K) measurements

Roberto Rinaldo August 31st, 2016

Page 9: ROBUST RECONSTRUCTION FOR CS-BASED FETAL BEATS DETECTION

UNIVERSITY OF UDINE – ITALY – DPIA Eusipco 2016, Budapest www.uniud.it

Outline

• Overview of Sparse Representations and Compressive Sensing (CS)

• Gaussian Dictionary for ECG approximation and CS applied to ECG signal

• Analysis of non invasive Fetal Electrocardiogram (fECG) - adopted methodologies

• Reconstruction algorithm • Results

Roberto Rinaldo August 31st, 2016

Page 10: ROBUST RECONSTRUCTION FOR CS-BASED FETAL BEATS DETECTION

UNIVERSITY OF UDINE – ITALY – DPIA Eusipco 2016, Budapest www.uniud.it

Gaussian DictionaryTraditional approaches use analytical sparsifying transform (e.g. DWT, DCT, …) to sparse represent the ECG signals

Limited Compression Ratios Limited Reconstruction Quality

ExploitthesparsityoftheECG

signal

StudythemorphologyofthePQRST

cycle

Scale(Shape) parameter

Shiftparameter

Symmetricwaves(Q,RandS) canbeapproximatedbyoneGaussianfunction

Asymmetricwaves(PorT)require2-3

functions

Roberto Rinaldo August 31st, 2016

Page 11: ROBUST RECONSTRUCTION FOR CS-BASED FETAL BEATS DETECTION

UNIVERSITY OF UDINE – ITALY – DPIA Eusipco 2016, Budapest www.uniud.it

Gaussian Dictionary

Dictionaryatom

Coefficient

Real ECG reconstruction examples from M=62 measurements (CR=75%)

using a sparse binary sensing matrix

Using Gaussian Dictionary Reconstruction quality PRD=5.48%

Using Wavelets Reconstruction quality PRD= 28.19%

Roberto Rinaldo August 31st, 2016

8

the RR measure metric is used, which is calculated fromthe differences between matched reference RR and test RRd

intervals. This metric is denoted here by RRmeas (ms)

RRmeas =

vuut 1

I � 1

I�1X

i=1

(RRi

� RRd

i

)

2, (18)

where I is the total number of fetal QRS complexes inthe reference. These measures correspond to the PhysionetChallenge scores and were obtained with the same code usedby the Challenge scorer.

Since we are applying a compression technique (CS), recon-struction quality is evaluated using the PRD metric, definedas

PRD(%) =

sPn

(x(n) � x(n))

2P

n

x(n)

2⇥ 100, (19)

where, x(n) and x(n) are the original (after baseline wanderremoval and notch filtering) and reconstructed signals, respec-tively. This value is computed for each reconstructed segmentof every channel and then the average value is calculated.According to [38], reconstructions with PRD values between0% and 2% are qualified to have “very good” quality, whilevalues between 2% and 9% are categorized as “good”.

Finally, we consider the total time required by the algorithmfor beat classification, including reconstruction of all the 4channels, in order to asses the possibility to implement theproposed framework in a real-time application. The averagetime required by the algorithm, for a 1 minute long signal, isapproximately 3.7 s. The reconstruction program is written inMatlab, running on an Intel Core i7 processor, equipped with16 GB memory.

VIII. EXPERIMENTAL RESULTS

A. Results for Detection PerformanceTable I reports a full evaluation of the proposed framework

in terms of the number of correctly found beats (TP), sen-sitivity S, positive predictivity P+ and F1 measures, for allthe 5 records in the Silesia dataset. The compression ratioresulting from Compressive Sensing is 75%, since we take 63measurements every 250 signal samples at 1 kHz. For eachsignal the first row of the table shows results obtained withinthe first minute, whereas the second row shows results for thewhole five minutes long signals. The same randomly selectedsparse sensing matrix has been used for all traces and signalsegments. For this dataset and the selected sensing matrix,the average value for sensitivity is S=92.5% within the firstminute, and S=90% for the five minutes long signals. Thepositive predictivity average values are P+=92% and P+=88%

within the first minute and for five minutes, respectively.Average HRmeas and RRmeas values within the first minuteare 10.34 bpm2 and 12.33 ms, respectively. For 5 minutes longsignals we obtain HRmeas = 53.55 bpm2 and RRmeas = 16.48ms.

Evaluation of the proposed detection method on the datasetA, using a fixed randomly selected sparse sensing matrix �A

for all the signals of the dataset, gives an average sensitivityS=78% and an average positive predicitivity value P+=77%.

TABLE IRESULTS, AFTER ONE MINUTE AND AFTER FIVE MINUTES, FOR SIGNALSFROM THE ABDOMINAL AND DIRECT FETAL ECG DATASET (SILESIA).THE SAME SENSING MATRIX HAS BEEN USED TO SENSE ALL SIGNALS.

Record t TP FP FN S P+ F1 mean PRD HRmeas RRmeas% % % % (bpm2) (ms)

r01 1’ 129 0 0 100 100 100 9.85 0.0048 1.495’ 628 21 15 98 97 97.5 10.29 22.1578 13.10

r04 1’ 110 17 15 88 87 87.5 5.52 23.6373 12.305’ 508 142 123 80 78 79 5.93 75.9085 22.21

r07 1’ 122 3 5 96 97 96.5 6.20 14.7479 14.745’ 5721 63 55 91 90 90.5 5.21 33.0583 16.04

r08 1’ 123 10 9 93 92 92.5 10.24 0.0038 12.035’ 638 18 12 98 97 97.5 10.60 7.2327 10.12

r10 1’ 109 20 19 85 84 84.5 10.55 13.30 20.985’ 519 154 117 82 77 79.5 10.24 129.4236 20.92

Concerning the scoring method proposed by the PhysionetChallenge the average HRmeas, for the same sensing matrix�A, is 138.65 bpm2 and the RRmeas is 20.92 ms. Since theChallenge dataset contains signals from different databases,recorded using different instrumentations and methods, resultshave an inhomogeneous distribution. Therefore, we analyzedthe distribution among the signals of the dataset, obtaininga minimum value for sensitivity equal to 15% (signal a18)and a maximum value 100% (signal a32), while positivepredictivity values range from 21% up to 99%. The medianvalue of the sensitivity distribution is about 87.7%, while thepositive predictivity median value is 85.5%. Median valuefor the HRmeas and RRmeas are 31.58 bpm2 and 17.96 ms,respectively.

To assess the influence of different sensing matrices onthe ability to correctly classify the fetal beats, we tested 50different sensing matrices on the Challenge dataset A, for acompression ratio CR=75% and the entire dataset. Averageresults obtained for sensitivity are S=78±1% and for positivepredictivity P+=77±1%. Again using 50 different sensingmatrices, the values for HRmeas are 133.16 ± 9.04 bpm2 and21.41 ± 0.6 ms for RRmeas. The influence of the sensingmatrix appears to be moderate.

Finally, we tested the proposed framework on dataset B ofthe Challenge. Also for this dataset, the proposed method hasbeen tested using 50 different sensing matrices. The scores areHRmeas=188 ± 13 bpm2 and RRmeas=24.52 ± 0.26 ms.

To allow the comparison with some off-line methods con-sidered in Section IX, we add a limited complexity post-processing stage after real-time detection, in order to correctthe estimated fHR and RR time series (we call this variationof the proposed method smoothed in Section IX). It operateson 1 min long blocks of the detected fetal channel and consistsin the removal of beats that are too short to be physiologicallypossible. It also checks for missed beats, using an approachsimilar to the one proposed in [17]. After this post-processingstage, the average scores obtained using dataset B, with 50randomly chosen sensing matrices, are 136 ± 11 bpm2 and17,23 ± 0,41 ms for HRmeas and RRmeas, respectively.

B. Effects of Compression RatioFig. 7 shows a comparison between the reconstruction

obtained with the proposed Gaussian dictionary and a wavelet-based sparsifying basis, as commonly adopted for CS imple-

percentage root-mean-square difference

Page 12: ROBUST RECONSTRUCTION FOR CS-BASED FETAL BEATS DETECTION

UNIVERSITY OF UDINE – ITALY – DPIA Eusipco 2016, Budapest www.uniud.it

Gaussian Dictionary

Proposed Gaussian Dictionary

is independent from the training set

dose not require any pre-processing

Increases the compression of:

25% with respect to CS with DWT

7% with respect to BSBL-BO

Roberto Rinaldo August 31st, 2016

Bounded-block-Optimized Block Sparse Bayesian Learning (BSBL-BO) Orthogonal Matching Pursuit (OMP) Basis Pursuit Denoising (BPDN)

Page 13: ROBUST RECONSTRUCTION FOR CS-BASED FETAL BEATS DETECTION

UNIVERSITY OF UDINE – ITALY – DPIA Eusipco 2016, Budapest www.uniud.it

Outline

• Overview of Sparse Representations and Compressive Sensing (CS)

• Gaussian Dictionary for ECG approximation and CS applied to ECG signal

• Analysis of non invasive Fetal Electrocardiogram (fECG) - adopted methodologies

• Reconstruction algorithm • Results

Roberto Rinaldo August 31st, 2016

Page 14: ROBUST RECONSTRUCTION FOR CS-BASED FETAL BEATS DETECTION

UNIVERSITY OF UDINE – ITALY – DPIA Eusipco 2016, Budapest www.uniud.it

Abdominal fetal ECGHeart defects are among the most common birth defects and leading cause of birth defect-related deaths

Noninvasive FECG monitoring makes use of electrodes placed on the mother's abdomen

Recorded signals are a mixture of Maternal ECG, Fetal ECG and noise (Respiration, EMG …)

FetalQRSMaternalQRS

Roberto Rinaldo August 31st, 2016

Page 15: ROBUST RECONSTRUCTION FOR CS-BASED FETAL BEATS DETECTION

UNIVERSITY OF UDINE – ITALY – DPIA Eusipco 2016, Budapest www.uniud.it

CS of abdominal fetal ECGFetal ECG recorded on the abdomen has a low SNR

5-1000 times smaller in intensity than in the adult

Less sparse than adult ECG, for example in the Wavelet domain

Reconstruction does not have to affect the interdependence relation among the multichannel recordings

Current CS algorithms generally fail in this application

Gaussian Dictionary can be used to increase the performance of CS applied to fetal ECG

Roberto Rinaldo August 31st, 2016

Page 16: ROBUST RECONSTRUCTION FOR CS-BASED FETAL BEATS DETECTION

UNIVERSITY OF UDINE – ITALY – DPIA Eusipco 2016, Budapest www.uniud.it

ICA in the CS domainIndependent Component Analysis ICA for the separation of mixed signals (source signals are independent and have non-gaussian distributions)

We propose to perform ICA directly on the compressed measurements

Compressed Independent Components

4xm

Original mixture signal (4 channels)

Reconstructed ICs from ICA applied in CS domain

ICs from ICA applied on original mixture

Abdominal Signals 4xN

Independent Components

4xNMixingMatrix

4x4

Roberto Rinaldo August 31st, 2016

Page 17: ROBUST RECONSTRUCTION FOR CS-BASED FETAL BEATS DETECTION

UNIVERSITY OF UDINE – ITALY – DPIA Eusipco 2016, Budapest www.uniud.it

Beats Classification Information about time and frequency location of maternal and fetal QRS complex

The first part of the dictionary is for Maternal ECG approximation The second part of the dictionary for Fetal ECG approximation

Classification is based on the atoms activated during reconstruction

Decomposition of IC signal in the dictionary part related to maternal approximation Decomposition of IC signal in the dictionary

part related to fetal approximation

Roberto Rinaldo August 31st, 2016

Page 18: ROBUST RECONSTRUCTION FOR CS-BASED FETAL BEATS DETECTION

UNIVERSITY OF UDINE – ITALY – DPIA Eusipco 2016, Budapest www.uniud.it

Beats Classification Detected Maternal QRS of the first

ICAsignal DetectedFetalQRSofthesecondICA

signal

Onemoreexampleoftheproposeddetectionmethod:inredfetalbeatsandingreenmaternal

beats(ononeofthe4originalsignals)

Roberto Rinaldo August 31st, 2016

Page 19: ROBUST RECONSTRUCTION FOR CS-BASED FETAL BEATS DETECTION

UNIVERSITY OF UDINE – ITALY – DPIA Eusipco 2016, Budapest www.uniud.it

Outline

• Overview of Sparse Representations and Compressive Sensing (CS)

• Gaussian Dictionary for ECG approximation and CS applied to ECG signal

• Analysis of non invasive Fetal Electrocardiogram (fECG) - adopted methodologies

• Reconstruction algorithm • Results

Roberto Rinaldo August 31st, 2016

Page 20: ROBUST RECONSTRUCTION FOR CS-BASED FETAL BEATS DETECTION

UNIVERSITY OF UDINE – ITALY – DPIA Eusipco 2016, Budapest www.uniud.it

Reconstruction algorithm

Roberto Rinaldo August 31st, 2016

• Reconstruction of the independent components is done using a modified version of the SL0 reconstruction algorithm, introducing regularization for better immunity against noise (D has D atoms)

random variables [2], sparse binary matrices, where � hasonly d non-zero randomly selected entries in each column,have been proposed to reduce the computational cost [8]. Inthis case, calculating �x takes only O(dN) operations, witha significant saving when d⌧ N .

The SL0 algorithm proposed in [6] solves the problem inEq. (1) by approximating the l0-norm with a continuous func-tion, and optimizing the resulting cost function to provide asmooth measure of sparsity. Indeed, the l0-norm can be ap-proximated using Gaussian functions, for small � values [6],as in

||s||S,0 , D �DX

i=1

exp(�s2i /2�2). (2)

Thus, the minimization of the l0-norm is approximatelyequivalent to maximize F�(s) =

Pi exp(�s2i /2�2

). Thisenables to replace the l0-norm minimization with a convexproblem, and maximize F�(s) using a steepest ascent algo-rithm. The parameter � controls the trade-off between thesmoothness of the objective function and the accuracy of theapproximation of the l0-norm.

The algorithm proposed in [6] consists of two nested it-erations, and the external loop is responsible to gradually de-crease the � value. Note that, when � is sufficiently large,exp(�s2i /2�2

) ⇡ 1�s2i /2�2, and the maximization of F�(s)s.t. y = As resembles the minimum l2-norm solution ofF�(s) s.t. y = As [6]. Therefore, the starting solution of theoptimization process is usually calculated using the pseudo-inverse A

† of A and set to s0 = A

T(AA

T)

�1y.

The internal loop tries to maximize F�(s) on the feasi-ble set {s|y = As}, using a steepest ascent algorithm, andupdating s s� µ�k where

�k = s ·"e� s21

2�2k , . . . , e

� s2D2�2

k

#T

. (3)

The next step consists in projecting s into the convex setto avoid trapping the algorithm in local maxima

s = s�A

T(AA

T)

�1(As� y). (4)

The SL0 is typically 2 to 3 times faster than the Basis Pur-suit denoising algorithm (SPGL1 implementation, [5]), whileresulting in many cases in the same or better accuracy [6].Note that the algorithm requires that matrix A has full rankM . When the number of measurements M increases (i.e., thecompression ratio decreases), this requirement may becomecritical, making the reconstruction problem ill-conditionedand sensitive to noise. To avoid these problems, in the nextsection we propose a regularized version of the reconstructionalgorithm.

2.1. Regularization

In real scenarios where the sparse signal or the measure-ments are affected by noise, if the compound matrix A is

ill-conditioned, then application of A

† amplifies the errorand results in poor reconstruction, even using the RobustSL0 proposed in [9]. Introducing a regularization term in theoptimization problem enables a stable recovery of x = Ds.

As in the SL0 algorithm, we approximate the l0-norm byusing (2), and the algorithm again consists in two nested it-erations. The internal loop seeks the maximum of F� in thefeasible set {s| k y �As k2 ✏}. At each step we computes = s� µ�k and project s by solving

min

sk s� s k2 s.t. k As� y k2 ✏. (5)

Using the Lagrangian function of Eq. (5), the problem can berewritten as

min

sk As� y k22 +� k s� s k22, (6)

where � is the regularization parameter. The solution is

s = s�A

T(AA

T+ �IM )

�1(As� y). (7)

As for the SL0 algorithm, for large � values, the solutionis equal to the l2 norm solution subject to k y �As k2 ✏.Solving the problem

min

sk As� y k22 +� k s k22, (8)

we set the initial solution of the algorithm to s0 = A

T(AA

T+

�IM )

�1y.

The proposed �SL0 algorithm is summarized in Algo-rithm 1. The value of the regularization parameter � repre-sents a compromise between the two terms of the cost func-tion. When the noise norm ✏ is small, � ! 0, and the algo-rithm reduces to the original SL0 for the noiseless case. Wecarried out some experiments (results are omitted due to lackof space) and we observed that the value of � is not criticaland should be ⇠10�100 times the expected noise ✏.

Algorithm 1 �SL0Input: µ step size, y, A, �dec, �min, �, Kiter

Initialization: s0 A

T((AA

T) + �IM )

�1y,

�1 = 2|max(s0)|while �k < �min do

for k=1:Kiter do

�k s · [e� s21

2�2k , . . . , e

� s2D2�2

k]

T

s s� µ�kProject s onto the feasible set: {s| k As� y k2 ✏}s s�A

T((AA

T) + �IM )

�1(As� y)

end for�k �k�dec

sk s

end whileOutput: sOUT sk

• SL0: approximate the L0 norm with the smooth function

• Problem (in the noisy case:mins

||s||0 s.t. As = y, A = �D

F�(s) =DX

i=1

exp(�s2i /2�2)

• Iterate decreasing ! to approach the L0 norm, and use a gradient based steepest ascend procedure to maximize

• At each iteration, project back to the feasible set via

s s�AT(AAT)�1(As� y)

||y �As||2 ✏ )

Page 21: ROBUST RECONSTRUCTION FOR CS-BASED FETAL BEATS DETECTION

UNIVERSITY OF UDINE – ITALY – DPIA Eusipco 2016, Budapest www.uniud.it

• SL0 requires that matrix AAT is invertible, and this can be problematic with large M (low compression ratio)

Reconstruction algorithm

Roberto Rinaldo August 31st, 2016

• λSL0: approximate the L0 norm with the SL0 smooth function

• Iterate decreasing ! to approach the L0 norm, and use a gradient based steepest ascend procedure to maximize

• At each iteration, project back to the feasible set F�(s)

random variables [2], sparse binary matrices, where � hasonly d non-zero randomly selected entries in each column,have been proposed to reduce the computational cost [8]. Inthis case, calculating �x takes only O(dN) operations, witha significant saving when d⌧ N .

The SL0 algorithm proposed in [6] solves the problem inEq. (1) by approximating the l0-norm with a continuous func-tion, and optimizing the resulting cost function to provide asmooth measure of sparsity. Indeed, the l0-norm can be ap-proximated using Gaussian functions, for small � values [6],as in

||s||S,0 , D �DX

i=1

exp(�s2i /2�2). (2)

Thus, the minimization of the l0-norm is approximatelyequivalent to maximize F�(s) =

Pi exp(�s2i /2�2

). Thisenables to replace the l0-norm minimization with a convexproblem, and maximize F�(s) using a steepest ascent algo-rithm. The parameter � controls the trade-off between thesmoothness of the objective function and the accuracy of theapproximation of the l0-norm.

The algorithm proposed in [6] consists of two nested it-erations, and the external loop is responsible to gradually de-crease the � value. Note that, when � is sufficiently large,exp(�s2i /2�2

) ⇡ 1�s2i /2�2, and the maximization of F�(s)s.t. y = As resembles the minimum l2-norm solution ofF�(s) s.t. y = As [6]. Therefore, the starting solution of theoptimization process is usually calculated using the pseudo-inverse A

† of A and set to s0 = A

T(AA

T)

�1y.

The internal loop tries to maximize F�(s) on the feasi-ble set {s|y = As}, using a steepest ascent algorithm, andupdating s s� µ�k where

�k = s ·"e� s21

2�2k , . . . , e

� s2D2�2

k

#T

. (3)

The next step consists in projecting s into the convex setto avoid trapping the algorithm in local maxima

s = s�A

T(AA

T)

�1(As� y). (4)

The SL0 is typically 2 to 3 times faster than the Basis Pur-suit denoising algorithm (SPGL1 implementation, [5]), whileresulting in many cases in the same or better accuracy [6].Note that the algorithm requires that matrix A has full rankM . When the number of measurements M increases (i.e., thecompression ratio decreases), this requirement may becomecritical, making the reconstruction problem ill-conditionedand sensitive to noise. To avoid these problems, in the nextsection we propose a regularized version of the reconstructionalgorithm.

2.1. Regularization

In real scenarios where the sparse signal or the measure-ments are affected by noise, if the compound matrix A is

ill-conditioned, then application of A

† amplifies the errorand results in poor reconstruction, even using the RobustSL0 proposed in [9]. Introducing a regularization term in theoptimization problem enables a stable recovery of x = Ds.

As in the SL0 algorithm, we approximate the l0-norm byusing (2), and the algorithm again consists in two nested it-erations. The internal loop seeks the maximum of F� in thefeasible set {s| k y �As k2 ✏}. At each step we computes = s� µ�k and project s by solving

min

sk s� s k2 s.t. k As� y k2 ✏. (5)

Using the Lagrangian function of Eq. (5), the problem can berewritten as

min

sk As� y k22 +� k s� s k22, (6)

where � is the regularization parameter. The solution is

s = s�A

T(AA

T+ �IM )

�1(As� y). (7)

As for the SL0 algorithm, for large � values, the solutionis equal to the l2 norm solution subject to k y �As k2 ✏.Solving the problem

min

sk As� y k22 +� k s k22, (8)

we set the initial solution of the algorithm to s0 = A

T(AA

T+

�IM )

�1y.

The proposed �SL0 algorithm is summarized in Algo-rithm 1. The value of the regularization parameter � repre-sents a compromise between the two terms of the cost func-tion. When the noise norm ✏ is small, � ! 0, and the algo-rithm reduces to the original SL0 for the noiseless case. Wecarried out some experiments (results are omitted due to lackof space) and we observed that the value of � is not criticaland should be ⇠10�100 times the expected noise ✏.

Algorithm 1 �SL0Input: µ step size, y, A, �dec, �min, �, Kiter

Initialization: s0 A

T((AA

T) + �IM )

�1y,

�1 = 2|max(s0)|while �k < �min do

for k=1:Kiter do

�k s · [e� s21

2�2k , . . . , e

� s2D2�2

k]

T

s s� µ�kProject s onto the feasible set: {s| k As� y k2 ✏}s s�A

T((AA

T) + �IM )

�1(As� y)

end for�k �k�dec

sk s

end whileOutput: sOUT sk

random variables [2], sparse binary matrices, where � hasonly d non-zero randomly selected entries in each column,have been proposed to reduce the computational cost [8]. Inthis case, calculating �x takes only O(dN) operations, witha significant saving when d⌧ N .

The SL0 algorithm proposed in [6] solves the problem inEq. (1) by approximating the l0-norm with a continuous func-tion, and optimizing the resulting cost function to provide asmooth measure of sparsity. Indeed, the l0-norm can be ap-proximated using Gaussian functions, for small � values [6],as in

||s||S,0 , D �DX

i=1

exp(�s2i /2�2). (2)

Thus, the minimization of the l0-norm is approximatelyequivalent to maximize F�(s) =

Pi exp(�s2i /2�2

). Thisenables to replace the l0-norm minimization with a convexproblem, and maximize F�(s) using a steepest ascent algo-rithm. The parameter � controls the trade-off between thesmoothness of the objective function and the accuracy of theapproximation of the l0-norm.

The algorithm proposed in [6] consists of two nested it-erations, and the external loop is responsible to gradually de-crease the � value. Note that, when � is sufficiently large,exp(�s2i /2�2

) ⇡ 1�s2i /2�2, and the maximization of F�(s)s.t. y = As resembles the minimum l2-norm solution ofF�(s) s.t. y = As [6]. Therefore, the starting solution of theoptimization process is usually calculated using the pseudo-inverse A

† of A and set to s0 = A

T(AA

T)

�1y.

The internal loop tries to maximize F�(s) on the feasi-ble set {s|y = As}, using a steepest ascent algorithm, andupdating s s� µ�k where

�k = s ·"e� s21

2�2k , . . . , e

� s2D2�2

k

#T

. (3)

The next step consists in projecting s into the convex setto avoid trapping the algorithm in local maxima

s = s�A

T(AA

T)

�1(As� y). (4)

The SL0 is typically 2 to 3 times faster than the Basis Pur-suit denoising algorithm (SPGL1 implementation, [5]), whileresulting in many cases in the same or better accuracy [6].Note that the algorithm requires that matrix A has full rankM . When the number of measurements M increases (i.e., thecompression ratio decreases), this requirement may becomecritical, making the reconstruction problem ill-conditionedand sensitive to noise. To avoid these problems, in the nextsection we propose a regularized version of the reconstructionalgorithm.

2.1. Regularization

In real scenarios where the sparse signal or the measure-ments are affected by noise, if the compound matrix A is

ill-conditioned, then application of A

† amplifies the errorand results in poor reconstruction, even using the RobustSL0 proposed in [9]. Introducing a regularization term in theoptimization problem enables a stable recovery of x = Ds.

As in the SL0 algorithm, we approximate the l0-norm byusing (2), and the algorithm again consists in two nested it-erations. The internal loop seeks the maximum of F� in thefeasible set {s| k y �As k2 ✏}. At each step we computes = s� µ�k and project s by solving

min

sk s� s k2 s.t. k As� y k2 ✏. (5)

Using the Lagrangian function of Eq. (5), the problem can berewritten as

min

sk As� y k22 +� k s� s k22, (6)

where � is the regularization parameter. The solution is

s = s�A

T(AA

T+ �IM )

�1(As� y). (7)

As for the SL0 algorithm, for large � values, the solutionis equal to the l2 norm solution subject to k y �As k2 ✏.Solving the problem

min

sk As� y k22 +� k s k22, (8)

we set the initial solution of the algorithm to s0 = A

T(AA

T+

�IM )

�1y.

The proposed �SL0 algorithm is summarized in Algo-rithm 1. The value of the regularization parameter � repre-sents a compromise between the two terms of the cost func-tion. When the noise norm ✏ is small, � ! 0, and the algo-rithm reduces to the original SL0 for the noiseless case. Wecarried out some experiments (results are omitted due to lackof space) and we observed that the value of � is not criticaland should be ⇠10�100 times the expected noise ✏.

Algorithm 1 �SL0Input: µ step size, y, A, �dec, �min, �, Kiter

Initialization: s0 A

T((AA

T) + �IM )

�1y,

�1 = 2|max(s0)|while �k < �min do

for k=1:Kiter do

�k s · [e� s21

2�2k , . . . , e

� s2D2�2

k]

T

s s� µ�kProject s onto the feasible set: {s| k As� y k2 ✏}s s�A

T((AA

T) + �IM )

�1(As� y)

end for�k �k�dec

sk s

end whileOutput: sOUT sk

. Let be the updated solution.

random variables [2], sparse binary matrices, where � hasonly d non-zero randomly selected entries in each column,have been proposed to reduce the computational cost [8]. Inthis case, calculating �x takes only O(dN) operations, witha significant saving when d⌧ N .

The SL0 algorithm proposed in [6] solves the problem inEq. (1) by approximating the l0-norm with a continuous func-tion, and optimizing the resulting cost function to provide asmooth measure of sparsity. Indeed, the l0-norm can be ap-proximated using Gaussian functions, for small � values [6],as in

||s||S,0 , D �DX

i=1

exp(�s2i /2�2). (2)

Thus, the minimization of the l0-norm is approximatelyequivalent to maximize F�(s) =

Pi exp(�s2i /2�2

). Thisenables to replace the l0-norm minimization with a convexproblem, and maximize F�(s) using a steepest ascent algo-rithm. The parameter � controls the trade-off between thesmoothness of the objective function and the accuracy of theapproximation of the l0-norm.

The algorithm proposed in [6] consists of two nested it-erations, and the external loop is responsible to gradually de-crease the � value. Note that, when � is sufficiently large,exp(�s2i /2�2

) ⇡ 1�s2i /2�2, and the maximization of F�(s)s.t. y = As resembles the minimum l2-norm solution ofF�(s) s.t. y = As [6]. Therefore, the starting solution of theoptimization process is usually calculated using the pseudo-inverse A

† of A and set to s0 = A

T(AA

T)

�1y.

The internal loop tries to maximize F�(s) on the feasi-ble set {s|y = As}, using a steepest ascent algorithm, andupdating s s� µ�k where

�k = s ·"e� s21

2�2k , . . . , e

� s2D2�2

k

#T

. (3)

The next step consists in projecting s into the convex setto avoid trapping the algorithm in local maxima

s = s�A

T(AA

T)

�1(As� y). (4)

The SL0 is typically 2 to 3 times faster than the Basis Pur-suit denoising algorithm (SPGL1 implementation, [5]), whileresulting in many cases in the same or better accuracy [6].Note that the algorithm requires that matrix A has full rankM . When the number of measurements M increases (i.e., thecompression ratio decreases), this requirement may becomecritical, making the reconstruction problem ill-conditionedand sensitive to noise. To avoid these problems, in the nextsection we propose a regularized version of the reconstructionalgorithm.

2.1. Regularization

In real scenarios where the sparse signal or the measure-ments are affected by noise, if the compound matrix A is

ill-conditioned, then application of A

† amplifies the errorand results in poor reconstruction, even using the RobustSL0 proposed in [9]. Introducing a regularization term in theoptimization problem enables a stable recovery of x = Ds.

As in the SL0 algorithm, we approximate the l0-norm byusing (2), and the algorithm again consists in two nested it-erations. The internal loop seeks the maximum of F� in thefeasible set {s| k y �As k2 ✏}. At each step we computes = s� µ�k and project s by solving

min

sk s� s k2 s.t. k As� y k2 ✏. (5)

Using the Lagrangian function of Eq. (5), the problem can berewritten as

min

sk As� y k22 +� k s� s k22, (6)

where � is the regularization parameter. The solution is

s = s�A

T(AA

T+ �IM )

�1(As� y). (7)

As for the SL0 algorithm, for large � values, the solutionis equal to the l2 norm solution subject to k y �As k2 ✏.Solving the problem

min

sk As� y k22 +� k s k22, (8)

we set the initial solution of the algorithm to s0 = A

T(AA

T+

�IM )

�1y.

The proposed �SL0 algorithm is summarized in Algo-rithm 1. The value of the regularization parameter � repre-sents a compromise between the two terms of the cost func-tion. When the noise norm ✏ is small, � ! 0, and the algo-rithm reduces to the original SL0 for the noiseless case. Wecarried out some experiments (results are omitted due to lackof space) and we observed that the value of � is not criticaland should be ⇠10�100 times the expected noise ✏.

Algorithm 1 �SL0Input: µ step size, y, A, �dec, �min, �, Kiter

Initialization: s0 A

T((AA

T) + �IM )

�1y,

�1 = 2|max(s0)|while �k < �min do

for k=1:Kiter do

�k s · [e� s21

2�2k , . . . , e

� s2D2�2

k]

T

s s� µ�kProject s onto the feasible set: {s| k As� y k2 ✏}s s�A

T((AA

T) + �IM )

�1(As� y)

end for�k �k�dec

sk s

end whileOutput: sOUT sk

• Equivalently, solve

random variables [2], sparse binary matrices, where � hasonly d non-zero randomly selected entries in each column,have been proposed to reduce the computational cost [8]. Inthis case, calculating �x takes only O(dN) operations, witha significant saving when d⌧ N .

The SL0 algorithm proposed in [6] solves the problem inEq. (1) by approximating the l0-norm with a continuous func-tion, and optimizing the resulting cost function to provide asmooth measure of sparsity. Indeed, the l0-norm can be ap-proximated using Gaussian functions, for small � values [6],as in

||s||S,0 , D �DX

i=1

exp(�s2i /2�2). (2)

Thus, the minimization of the l0-norm is approximatelyequivalent to maximize F�(s) =

Pi exp(�s2i /2�2

). Thisenables to replace the l0-norm minimization with a convexproblem, and maximize F�(s) using a steepest ascent algo-rithm. The parameter � controls the trade-off between thesmoothness of the objective function and the accuracy of theapproximation of the l0-norm.

The algorithm proposed in [6] consists of two nested it-erations, and the external loop is responsible to gradually de-crease the � value. Note that, when � is sufficiently large,exp(�s2i /2�2

) ⇡ 1�s2i /2�2, and the maximization of F�(s)s.t. y = As resembles the minimum l2-norm solution ofF�(s) s.t. y = As [6]. Therefore, the starting solution of theoptimization process is usually calculated using the pseudo-inverse A

† of A and set to s0 = A

T(AA

T)

�1y.

The internal loop tries to maximize F�(s) on the feasi-ble set {s|y = As}, using a steepest ascent algorithm, andupdating s s� µ�k where

�k = s ·"e� s21

2�2k , . . . , e

� s2D2�2

k

#T

. (3)

The next step consists in projecting s into the convex setto avoid trapping the algorithm in local maxima

s = s�A

T(AA

T)

�1(As� y). (4)

The SL0 is typically 2 to 3 times faster than the Basis Pur-suit denoising algorithm (SPGL1 implementation, [5]), whileresulting in many cases in the same or better accuracy [6].Note that the algorithm requires that matrix A has full rankM . When the number of measurements M increases (i.e., thecompression ratio decreases), this requirement may becomecritical, making the reconstruction problem ill-conditionedand sensitive to noise. To avoid these problems, in the nextsection we propose a regularized version of the reconstructionalgorithm.

2.1. Regularization

In real scenarios where the sparse signal or the measure-ments are affected by noise, if the compound matrix A is

ill-conditioned, then application of A

† amplifies the errorand results in poor reconstruction, even using the RobustSL0 proposed in [9]. Introducing a regularization term in theoptimization problem enables a stable recovery of x = Ds.

As in the SL0 algorithm, we approximate the l0-norm byusing (2), and the algorithm again consists in two nested it-erations. The internal loop seeks the maximum of F� in thefeasible set {s| k y �As k2 ✏}. At each step we computes = s� µ�k and project s by solving

min

sk s� s k2 s.t. k As� y k2 ✏. (5)

Using the Lagrangian function of Eq. (5), the problem can berewritten as

min

sk As� y k22 +� k s� s k22, (6)

where � is the regularization parameter. The solution is

s = s�A

T(AA

T+ �IM )

�1(As� y). (7)

As for the SL0 algorithm, for large � values, the solutionis equal to the l2 norm solution subject to k y �As k2 ✏.Solving the problem

min

sk As� y k22 +� k s k22, (8)

we set the initial solution of the algorithm to s0 = A

T(AA

T+

�IM )

�1y.

The proposed �SL0 algorithm is summarized in Algo-rithm 1. The value of the regularization parameter � repre-sents a compromise between the two terms of the cost func-tion. When the noise norm ✏ is small, � ! 0, and the algo-rithm reduces to the original SL0 for the noiseless case. Wecarried out some experiments (results are omitted due to lackof space) and we observed that the value of � is not criticaland should be ⇠10�100 times the expected noise ✏.

Algorithm 1 �SL0Input: µ step size, y, A, �dec, �min, �, Kiter

Initialization: s0 A

T((AA

T) + �IM )

�1y,

�1 = 2|max(s0)|while �k < �min do

for k=1:Kiter do

�k s · [e� s21

2�2k , . . . , e

� s2D2�2

k]

T

s s� µ�kProject s onto the feasible set: {s| k As� y k2 ✏}s s�A

T((AA

T) + �IM )

�1(As� y)

end for�k �k�dec

sk s

end whileOutput: sOUT sk

Page 22: ROBUST RECONSTRUCTION FOR CS-BASED FETAL BEATS DETECTION

UNIVERSITY OF UDINE – ITALY – DPIA Eusipco 2016, Budapest www.uniud.it

Reconstruction algorithm

Roberto Rinaldo August 31st, 2016

2

II. REGULARIZATION OF THE SMOOTHED l0 ALGORITHM

Compressive Sensing aims to reconstruct a signal x 2 RN

sparse in some domain by solving the following optimizationproblem:

min

x

k s k0 s.t. As = y (P0), (2)

where A = �D 2 Rm⇥K , and s 2 RN is the vector of thesparse coefficients. The original signal is given by x = Ds.

The Smoothed-l0 (SL0) algorithm proposed in [3] solve theproblem in Eq.(2) by relaxing the l0-norm by a continuousfunction that is non differentiable at 0, and optimizing the re-sulting cost function, to provide a smooth measure of sparsity.

The l0-norm can be approximated using a Gaussian function[3], which is given by:

f�

(s) , exp(�s2/2�2), (3)

it can be seen that as s tends to 0, f�

(s) will tend to 1. Hence,for small � values, the l0-norm can be written as:

k s k0, K �KX

i=1

exp(�s2i

/2�2). (4)

Thus, the minimization of the l0-norm is equivalent tomaximize F

(s) =P

i

f�

(s). This is the key of this approachthat enables to replace the l0-norm minimization with a convexproblem, and use a classical classical steepest ascent algorithmto maximize F

(s) and solve the problem. The � valuecontrols the trade-off between the approximation with the l0-norm and the smoothness of the function.

The algorithm proposed in [3] consists of two nestediterations, and the external loop is responsible to graduallydecreasing the � value. Note that, when the � is sufficientlylarge, the maximization of F

(s) s.t. y = Ax equals the min-imum l2-norm solution of F

(s) s.t. y = Ax [3]. Therefore,the starting solution of the optimization process is usually setto x0 = A

T

(AA

T

)

�1y.

The internal loop try to maximize F�

(s) on the feasible set{s|y = As}, using a steepest ascent algorithm, and updatings s+ µ

j

rF�

and for µj

= µ2�2 we have s� µ�, where:

� =

"e� s21

2�2k , . . . , e

� s2K2�2

k

#T

, (5)

for a constant µ.The next step consists in projecting s into the convex set to

avoid trapping the algorithm in local maxima:

s = s�A

T

(AA

T

)

�1(As� y). (6)

The SL0 is typically 2 to 3 times faster than BP, whileresulting in the same or better accuracy [3]. However, in thepresence of noise, the accuracy of SL0 algorithm needs to beimproved. Therefore, in the next section, we will propose aregularized version of this reconstruction algorithms.

A. Regularization

In real scenarios where the sparse signal itself or themeasurements are affected by noise, if the compound matrixA is ill-conditioned, then application of A

† amplifies errorsresulting in a poor estimate.

Introducing a regularization term in the problem (P0) en-ables to a stable recovery of x = Ds:

min

s

k s k0 s.t. k As� y k2 ✏. (7)

As for the SL0 algorithm we approximated the l0-normby using Gaussian functions, and the algorithm again consistsin two nested iterations: the internal loop seeks to find themaximum of F

but this time the feasible set is {s| k y �As k2 ✏}. At each step we compute s = s � µ� and thanprojecting it by solving:

min

s

k s� s k2 s.t. k As� y k2 ✏ (8)

using the Lagrangian function of Eq.(8), the problem canbe rewritten as:

min

s

k As� y k22 +� k s� s k22, (9)

where � is the regularization parameter. The solution is:

s = s�A

T

(AA

T

+ �Im)

�1(As� y). (10)

As for the SL0 algorithm, for large value of � the solutionof is equal to the l2 norm solution subject to k y�As k2 ✏,and solving the following problem:

min

s

k As� y k22 +� k s k22, (11)

we set the initial solution of the algorithm to:

s0 = A

T(AA

T+ �Im)

�1y; (12)

The proposed algorithm is summarized in 1.

Algorithm 1 �-SL0Input: µ step size, y, A, �

dec

, �min

, �, Kiter

Initialization: s0 A

T((AA

T) + �I)�1

y,�1 = 2|max(s0)|while �

k

< �min

dofor k=1:K

iter

do

� s[e� s21

2�2k , . . . , e

� s2K2�2

k]

T

s s� µ�Project s onto the feasible set: {s| k As� y k2 ✏}s s�A

T((AA

T) + �I)�1

(As� y)

end for�k

�k

�dec

sk s

end whileOutput: sOUT sk

Page 23: ROBUST RECONSTRUCTION FOR CS-BASED FETAL BEATS DETECTION

UNIVERSITY OF UDINE – ITALY – DPIA Eusipco 2016, Budapest www.uniud.it

Outline

• Overview of Sparse Representations and Compressive Sensing (CS)

• Gaussian Dictionary for ECG approximation and CS applied to ECG signal

• Analysis of non invasive Fetal Electrocardiogram (fECG) - adopted methodologies

• Reconstruction algorithm • Results

Roberto Rinaldo August 31st, 2016

Page 24: ROBUST RECONSTRUCTION FOR CS-BASED FETAL BEATS DETECTION

UNIVERSITY OF UDINE – ITALY – DPIA Eusipco 2016, Budapest www.uniud.it

Results: simulated fECG

Roberto Rinaldo August 31st, 2016

3. PERFORMANCE OF �SL0

In this section, the effect of noise on the reconstruction per-formance is experimentally analyzed. We compare the per-formance of the proposed algorithm with the original SL0and the BPDN-SPGL1 algorithms. The signals used in theseexperiments are simulated fECG signals [10] with lengthN = 256. As sparsifying dictionaries we use a dictionaryof Gaussian like functions [7], and the Wavelet basis withDaubechies’ length-4 filters. The sensing matrix elementsare drawn as independent Gaussian random variables [2]. Werepeat the experiment 100 times with different source signalsat different noise levels, and using each time a different ran-dom sensing matrix. The reported SNR value is the averageof these simulations. In Fig. 1, we report the reconstructionSNR as a function of the input SNR (SNRin) when gaussiannoise is added to the simulated fECG traces, for a compres-sion ratio CR=50% (M = 128). Compared to the originalSL0 algorithm, �SL0 allows to achieve better reconstruc-tion quality, especially when the Gaussian Dictionary [7] isused. An improvement can be also appreciated when theWavelet basis is used, especially at lower SNRin values. Notethat the use of the Gaussian Dictionary gives much betterperformance than Wavelets also when BPDN is used.

In addition to the previous experiments, we assess the re-construction performance as the compression ratio changes.In Fig. 2, it is possible to see that the average SNR achievedby the �SL0 algorithm combined with the Gaussian Dictio-nary outperforms the SL0 method, especially at low com-pression ratios (M large) and is comparable with respect tothe traditional BPDN algorithm, which has a higher complex-ity. At higher compression ratios (CR> 50%) the Waveletbasis achieves a lower performance independently of the re-construction algorithm.

As a measure of the computational cost of the algorithmswe use the CPU time, setting the same parameters (Kiter = 3

an �dec = 0.5 ) for SL0 and �SL0. Experiments show anaverage reconstruction time for the �SL0 algorithm rangingfrom 0.07 s, when CR=30%, to 0.01 s, when CR=80%. Thus,it maintains approximately the same computational cost of theoriginal SL0 algorithm (ranging from 0.03 s to 0.01 s), whilebeing much faster than the BPDN algorithm (1.6 s to 0.6 s).Programs are written in Matlab, running on an Intel Core i7processor, equipped with 16 GB memory.

4. APPLICATION TO JOINT COMPRESSION ANDBEATS DETECTION IN FECG

In this section, we analyze the performance of �SL0 for fe-tal beat detection in CS-compressed real-world fECG signals.We also analyze the influence of different sensing matrices,in particular sparse matrices which allow very low complex-ity of the CS sensor.

SNRin [dB]10 20 30 40 50

Ave

rage R

eco

nst

ruct

ion S

NR

[dB

]

-10

0

10

20

30

40

50SL0 Gaussian Dic.λSL0 Gaussian Dic.SL0 Wavelet BasisλSL0 Wavelet BasisBPDN Wavelet BasisBPDN Gaussian Dic.

Fig. 1. Reconstruction SNR versus input SNR obtained from100 trials for simulated fECG signals, at CR=50%, using theSL0, �SL0 and BPBN (SPGL1) algorithms using the Waveletand the Gaussian Dictionary.

CR 0.3 0.4 0.5 0.6 0.7 0.8A

vera

ge R

eco

nst

ruct

ion S

NR

[dB

]

0

10

20

30

40

50

λSL0 - Gaussian Dic.SL0 - Gaussian Dic.BPDN - Gaussian Dic.λSL0 - Wavelet BasisSL0 - Wavelet BasisBPDN - Wavelet Basis

Fig. 2. Reconstruction SNR versus CR obtained from 100 tri-als for simulated fECG signals.

4.1. fECG Reconstruction and Fetal Beats Detection

In [7] a framework for the compression of multichannel ab-dominal fECG and joint detection of fetal beats has been pro-posed. The compression of the signal is based on Compres-sive Sensing and uses a binary sparse sensing matrix, con-taining only d = 2 ones in random positions in each column,in order to reduce the sensor complexity [8]. Before recon-struction using SL0, Independent Component Analysis (ICA)is applied on the compressed measurements, and then the re-construction process recovers the uncompressed independentcomponents (ICs). The sparse decomposition used to recon-struct the ICs is also used to further separate the maternal andfetal signals and to detect the time location of the beats. Inparticular, we use a dictionary of Gaussian like functions [4],composed by two sub-dictionaries for the approximation ofthe maternal ECG component and the fetal one. The separa-tion is based on the atoms, belonging to the fetal or mother’ssub-dictionaries, activated during the reconstruction process.In accordance with the analysis of the previous section,wefound out experimentally that, for compression ratios greater

3. PERFORMANCE OF �SL0

In this section, the effect of noise on the reconstruction per-formance is experimentally analyzed. We compare the per-formance of the proposed algorithm with the original SL0and the BPDN-SPGL1 algorithms. The signals used in theseexperiments are simulated fECG signals [10] with lengthN = 256. As sparsifying dictionaries we use a dictionaryof Gaussian like functions [7], and the Wavelet basis withDaubechies’ length-4 filters. The sensing matrix elementsare drawn as independent Gaussian random variables [2]. Werepeat the experiment 100 times with different source signalsat different noise levels, and using each time a different ran-dom sensing matrix. The reported SNR value is the averageof these simulations. In Fig. 1, we report the reconstructionSNR as a function of the input SNR (SNRin) when gaussiannoise is added to the simulated fECG traces, for a compres-sion ratio CR=50% (M = 128). Compared to the originalSL0 algorithm, �SL0 allows to achieve better reconstruc-tion quality, especially when the Gaussian Dictionary [7] isused. An improvement can be also appreciated when theWavelet basis is used, especially at lower SNRin values. Notethat the use of the Gaussian Dictionary gives much betterperformance than Wavelets also when BPDN is used.

In addition to the previous experiments, we assess the re-construction performance as the compression ratio changes.In Fig. 2, it is possible to see that the average SNR achievedby the �SL0 algorithm combined with the Gaussian Dictio-nary outperforms the SL0 method, especially at low com-pression ratios (M large) and is comparable with respect tothe traditional BPDN algorithm, which has a higher complex-ity. At higher compression ratios (CR> 50%) the Waveletbasis achieves a lower performance independently of the re-construction algorithm.

As a measure of the computational cost of the algorithmswe use the CPU time, setting the same parameters (Kiter = 3

an �dec = 0.5 ) for SL0 and �SL0. Experiments show anaverage reconstruction time for the �SL0 algorithm rangingfrom 0.07 s, when CR=30%, to 0.01 s, when CR=80%. Thus,it maintains approximately the same computational cost of theoriginal SL0 algorithm (ranging from 0.03 s to 0.01 s), whilebeing much faster than the BPDN algorithm (1.6 s to 0.6 s).Programs are written in Matlab, running on an Intel Core i7processor, equipped with 16 GB memory.

4. APPLICATION TO JOINT COMPRESSION ANDBEATS DETECTION IN FECG

In this section, we analyze the performance of �SL0 for fe-tal beat detection in CS-compressed real-world fECG signals.We also analyze the influence of different sensing matrices,in particular sparse matrices which allow very low complex-ity of the CS sensor.

SNRin [dB]10 20 30 40 50

Ave

rag

e R

eco

nst

ruct

ion

SN

R [

dB

]

-10

0

10

20

30

40

50SL0 Gaussian Dic.λSL0 Gaussian Dic.SL0 Wavelet BasisλSL0 Wavelet BasisBPDN Wavelet BasisBPDN Gaussian Dic.

Fig. 1. Reconstruction SNR versus input SNR obtained from100 trials for simulated fECG signals, at CR=50%, using theSL0, �SL0 and BPBN (SPGL1) algorithms using the Waveletand the Gaussian Dictionary.

CR 0.3 0.4 0.5 0.6 0.7 0.8A

vera

ge

Re

con

stru

ctio

n S

NR

[d

B]

0

10

20

30

40

50

λSL0 - Gaussian Dic.SL0 - Gaussian Dic.BPDN - Gaussian Dic.λSL0 - Wavelet BasisSL0 - Wavelet BasisBPDN - Wavelet Basis

Fig. 2. Reconstruction SNR versus CR obtained from 100 tri-als for simulated fECG signals.

4.1. fECG Reconstruction and Fetal Beats Detection

In [7] a framework for the compression of multichannel ab-dominal fECG and joint detection of fetal beats has been pro-posed. The compression of the signal is based on Compres-sive Sensing and uses a binary sparse sensing matrix, con-taining only d = 2 ones in random positions in each column,in order to reduce the sensor complexity [8]. Before recon-struction using SL0, Independent Component Analysis (ICA)is applied on the compressed measurements, and then the re-construction process recovers the uncompressed independentcomponents (ICs). The sparse decomposition used to recon-struct the ICs is also used to further separate the maternal andfetal signals and to detect the time location of the beats. Inparticular, we use a dictionary of Gaussian like functions [4],composed by two sub-dictionaries for the approximation ofthe maternal ECG component and the fetal one. The separa-tion is based on the atoms, belonging to the fetal or mother’ssub-dictionaries, activated during the reconstruction process.In accordance with the analysis of the previous section,wefound out experimentally that, for compression ratios greater

Reconstruction SNR versus input SNR obtained from 100 trials for simulated fECG signals*, at CR=50%, using the SL0, λSL0 and BPDN algorithms using the Wavelet and the Gaussian Dictionary, N=256.

Reconstruction SNR versus CR obtained from 100 trials for simulated fECG signals, CR=50%.

*Behar et al., “An ECG simulator for generating maternal-foetal activity mixtures on abdominal ecg recordings,” Physiological measurement, vol. 35, no. 8, p. 1537, 2014.

Page 25: ROBUST RECONSTRUCTION FOR CS-BASED FETAL BEATS DETECTION

UNIVERSITY OF UDINE – ITALY – DPIA Eusipco 2016, Budapest www.uniud.it

Results: Physionet Challenge dataset A*

Roberto Rinaldo August 31st, 2016

than 50%, the detection performance is preserved, while atlower compression ratios, besides the increased informationavailable, fetal beat detection may fail.

Fig. 3. Sparse decomposition of the independent componentin (a) using the SL0 algorithm, for (b) CR=75% and (c)CR=40% and (d) using the �SL0 algorithm for CR=40%. Inthe graphs, different intensities represent the weight of the ac-tivated atoms.

Compression Ratio [%]20 40 60 80 100

Ave

rag

e s

en

sitiv

ity S

[%

]

0

20

40

60

80

100

SL0λ-SL0

(a)Compression Ratio [%]

20 40 60 80 100

Ave

rag

e P

RD

[%

]

0

10

20

30 SL0λ-SL0

(b)

Fig. 4. (a) Detection performance for SL0 and �SL0 algo-rithm. The vertical coordinate gives the average Sensitivityfor dataset A at different CR values. (b) Comparison of aver-age PRD when using the two algorithms at different CRs.

As an example, we show in Fig. 3 (a) a portion of the IC ofsignal a32 of the 4-channel Physionet Challenge dataset [11],where the fetal beat is clearly visible. When the compressionratio is CR=75%, the reconstruction quality value PRD (per-centage root-mean-square difference) is about 6% (averageof the 4 channels) and the detection performance in terms ofsensitivity (S) and positive predictivity (P+) are S=100% andP+=99.34%, respectively. At lower compression ratios de-tection fails, and for CR=40% we have PRD=0.47%, S=60%and P+=68%. Fig. 3 (b) and (c) show the positions of the fe-tal activated dictionary atoms for the two cases CR=75% andCR=40%, respectively. As we can see, when CR=40%, thealgorithm fails to find the correct sparse representation, lead-ing to a wrong beat detection. Instead, Fig. 3 (d) shows the

Number of non-zero entries d2 4 6 8 10 12

Ave

rag

e P

RD

[%

]

0.6

0.8

1

1.2

1.4λSL0SL0

(a)CR [%]

40 60 80

Ave

rag

e P

RD

[%

]

0

5

10

15

20

25

30

Sparse sensing d=2Gaussian sensing

(b)

Fig. 5. Average recovery quality for signal a25 of dataset A.The vertical coordinate gives the average PRD and the errorbar gives the standard deviation. (a) Effects of the numberof non-zero entries in each column of the sensing matrix atCR=40% for SL0 and �SL0. (b) Comparison of average PRDusing sparse sensing matrices with d = 2 and random Gaus-sian sensing matrices at different CR (�SL0 algorithm).

activated atoms when the �SL0 algorithm is used instead ofSL0. For the whole signal and using the same sensing matrixat CR=40%, �SL0 achieves S=100% and P+=99%. We repeatthe experiment 20 times with different random sparse binarymatrix (d = 2), for all the signals in dataset A (excludingbadly annotated signal as in [12]). The reported sensitivityvalue is the average of these simulations. Fig. 4 (a) showsthat the detection performance of the proposed algorithm isalmost independent of the CR, while the SL0 algorithm failsat lower CRs.In Fig. 4 (b) it can be seen that the proposed �SL0 algorithmoutperforms the original algorithm, in terms of average recon-struction quality PRD, at low compression ratios.

4.2. Influence of the sensing matrix

In this section, we analyze the performance of the reconstruc-tion procedure, using SL0 and �SL0 algorithms, when differ-ent sensing matrices, generated from i.i.d. Gaussian randomvariables or sparse with different d values, are used. There arenot theoretical guidelines for choosing the optimal number ofnon-zero elements d, therefore it has been determined exper-imentally. In the following experiments, the signal is dividedinto N = 250 sample long segments, which are compressedindependently. For each d value and compression ratio, theexperiments were repeated using 20 randomly generated dif-ferent sensing matrices, and the average performance is re-ported. Results for signal a25 of the Challenge dataset A areshown in Fig. 5 and Fig. 6. As we can see from Fig. 5(a), for acompression ratio CR=40%, increasing the number of ones ineach column of the sensing matrix, does not improve the re-construction quality, both for the SL0 and �SL0 reconstruc-tion algorithms. Note however that �SL0 outperforms SL0.Fig. 5(b) shows a comparison of the reconstruction quality ob-tained with sparse matrices, d = 2, with respect to the qualityobtained using Gaussian random matrices. Although the theo-

(a) Detection performance for SL0 and λSL0 algorithm. The vertical coordinate gives the average Sensitivity for dataset A at different CR values. (b) Comparison of average PRD when using the two algorithms at different CRs.

7

multiplying them by a constant value 0 < � < 1, Forsimulations we set this constant equal to � = 0.25. Thisensures that when there is a time overlap between the fetaland maternal beats, we are still able to detect the fetal one(see Fig. 6).

The threshold value used for the detection of fetal QRScomplexes should take into account the lower power of thefetal signal, and it is set at T = 0.5A

max

in the experiments.The time interval used to classify close peaks as redundantis reduced to 0.25 s, given that the fetus heart rate is fasterthan the maternal normal sinus rhythm (i.e., about 110 to 160beats per minute (bpm) [34]). We compute the time differencesbetween the detected atom positions in the three channels, andselect the one with the lowest difference variance, correspond-ing to the most regular beat rate.

VII. EXPERIMENTAL SETUP AND METHODS

Fig. 2 summarizes the approach implemented for this work,which consists of five main steps, namely, (1) compression ofthe raw abdominal ECG signals using Compressive Sensing,(2) application of ICA on the compressed measurements,(3) reconstruction of the Independent Components via theirsparse representation, (4) detection of the maternal beats, (5)detection of the fetal beats.

Before calculating the CS measures, raw signals are pre-processed using a zero phase high-pass Butterworth digitalfilter for baseline wander removal, with cut-off frequencyequal to 2 Hz. To remove power-line interference, a secondorder notch filter at 50 Hz or 60 Hz is applied, depending onthe fact that signals come from European or US recordings.Original signals are sampled at 1 kHz.

Compressive Sensing is applied on signal blocks of lengthN = 250 samples, using a sparse sensing matrix �, with onlytwo non-zero elements in each column, whose row position israndomly chosen. This class of sensing matrices is particularlyinteresting for low-power applications and allows an efficientimplementation in hardware. In the experiments, we considersignal blocks of N = 250 samples, and take M = 62

measurements, corresponding to a compression ratio CR=75%.With a 63 ⇥ 250 sensing matrix, we require 437 additions.The choice of a compression ratio of 75% is based on theresults reported in [12], where it has been shown that it is themaximum CR that ensures a good reconstruction quality ofthe signals. However, for the sake of completeness, in SectionVIII, we evaluate the performance of the proposed frameworkat different CRs. Compressed data are represented with 16bits.

In the proposed framework, we reconstruct signal ICsand not the original mixed signals. However, these can berecovered by simply multiplying the estimated mixing matrixand the reconstructed ICs. As mentioned, in this work we usethe reconstruction algorithm proposed in [32], the Smoothedl0 (SL0) algorithm, which allows real-time implementation.Detection and classification are applied on the sparse repre-sentation and the fHR is computed every 2 s.

A. DatasetsValidation of the proposed compression and detection

framework has been done on three datasets. The first one is theAbdominal and Direct Fetal Electrocardiogram Database [3][35] denoted as the Silesia dataset. It contains 5 multichannelf-ECGs, obtained from 5 different women, each one consistingof four abdominal f-ECG recordings as well as one f-ECGrecording taken directly from a scalp electrode and used asreference. The position of the electrodes was constant duringall recordings. The sampling rate is 1 kHz with a resolutionof 16 bits. For this dataset, data are already pre-processedby digital filtering for removal of power-line interferenceand baseline drift. The R-wave locations were automaticallydetermined in the direct f-ECG signal and these locations wereverified by a group of expert cardiologists.

The second and the third datasets we consider are set A andset B of the Physionet Challenge dataset. Both consist of oneminute long 4-lead abdominal f-ECG recordings. Set A has 75records while set B has 100 records. These datasets containsignals belonging to different databases, all sampled at 1 kHzwith a resolution of 16 bit, but with different instrumentationand unknown electrode position. Reference positions of fetalQRS complexes are available for all the files in set A, whilethe reference annotations for dataset B are not public. Due tothe inaccuracy of reference annotations, records a38, a46, a52,a54, a71, a74 of dataset A are discarded, as suggested in [22].

B. Evaluation MetricsFor the evaluation of the proposed scheme, we use classical

performance figures usually applied for the assessment of QRSdetection algorithms, i.e., sensitivity (S) and positive predic-tivity (P+). According to the American National Standard [36]S and P+ are computed as

S =

TPTP + FN

100, P+ =

TPTP + FP

100, (15)

where TP is the number of true positives, FP of false positivesand FN of false negatives. A detected beat is considered to betrue positive if its time location differs less than 50 ms fromthe reference markers (within a window of 100 ms centeredon the reference marker). The algorithm accuracy can be alsoevaluated using the F1 measure, proposed in [37],

F1 = 2

S P+S + P+

100 = 2

TP2TP + FN + FP

100. (16)

Additionally, we apply the scoring methods proposed in[4], using two metrics, i.e., fetal heart rate measurement andRR interval measurement. The first one, denoted here asHRmeas (bpm2), is used to assess the ability of the algorithmto provide valid fHR estimation. It is based on the squareddifference between matched reference (fHR) and detectedfHRd measurements every 5 s (12 instances for 1 min longsignals)

HRmeas =

1

12

12X

i=1

(fHRi

� fHRd

i

)

2. (17)

To asses the ability of the algorithm to extract the correctfetal QRS locations with respect to the reference markers,

We repeat the experiment 20 times with different random sparse binary matrix (d = 2), for all the signals in dataset A. The reported values are the average of these simulations.

*“Physionet challenge 2013,” http: www.physionet.org/challenge/2013/.

Page 26: ROBUST RECONSTRUCTION FOR CS-BASED FETAL BEATS DETECTION

UNIVERSITY OF UDINE – ITALY – DPIA Eusipco 2016, Budapest www.uniud.it

Results: sensing matrix

Roberto Rinaldo August 31st, 2016

Table 1. Average performance of detection and reconstructionfor SL0 and �SL0 for dataset A.

SL0 �SL0CR S PRD S PRD% [%] [%] [%] [%]

40 Sparse 2 46 5.27 85 3.77Gaussian 45 5.58 84 3.72

50 Sparse 2 77 5.93 85 4.49Gaussian 75 5.71 85 4.27

75 Sparse 2 84 8.81 84 8.14Gaussian 84 8.80 84 8.02

retical reconstruction performance for i.i.d. Gaussian sensingmatrices is well established, we can see experimentally that,for the class of signals we are considering, sparse matriceshave similar performance. The use of a sparse sensing matrixwith d = 2 allows to achieve almost identical reconstruc-tion results, besides the very low complexity implementation.Finally, Table 1 summarizes the average reconstruction anddetection performance for dataset A, at different compressionratios, when using a sparse sensing matrix with d = 2 and ani.i.d. Gaussian sensing matrix. Experiments are repeated forthe SL0 and �SL0 algorithms. Both detection and reconstruc-tion are mostly independent from the sensing matrix, while itis apparent that the �SL0 algorithm allows robust detectionand reconstruction.

Number of non-zero entries d2 4 6 8 10 12

Ave

rag

e S

en

sitiv

ity S

[%

]

85

90

95

100

λ-SL0SL0

(a)CR [%]

40 60 80

Ave

rag

e S

en

sitiv

ity S

[%

]

60

70

80

90

100

Sparse Sensing d=2Gaussian Sensing

(b)

Fig. 6. (a) Effects of the number of non-zero entries in eachcolumn of the sensing matrix on detection performance. Thevertical coordinate gives the average Sensitivity S for signala25 of dataset A for CR=40%, the error bar gives the standarddeviation. (b) Comparison of average Sensitivity when usingsparse sensing matrices with d = 2 and random Gaussiansensing matrices at different CR (�SL0 algorithm).

5. CONCLUSIONS

In this paper we proposed a regularized version of the SL0algorithm. Experimental results confirm that the proposedalgorithm has good performance, while preserving the lowcomputation complexity of the original one. The applicationof �SL0 to the joint compression and detection framework offetal ECG also demonstrates that the proposed modification

can efficiently reconstruct the signals and correctly detect thebeats in the presence of noise and for different compressionratios. Moreover, we have shown that the use of sparse sens-ing matrices with only 2 non-zero elements in each column,compares successfully with random Gaussian matrices, whilepermitting a very low complexity implementation.

REFERENCES

[1] D. L. Donoho, “Compressed sensing,” Information The-ory, IEEE Transactions on, vol. 52, no. 4, pp. 1289–1306, 2006.

[2] E. J. Candes et al., “Compressive sampling,” in Pro-ceedings of the international congress of mathemati-cians, vol. 3. Madrid, Spain, 2006, pp. 1433–1452.

[3] D. Craven et al., “Compressed sensing for bioelectricsignals: A review,” Biomedical and Health Informatics,IEEE Journal of, vol. 19, no. 2, pp. 529–540, 2015.

[4] G. Da Poian et al., “Gaussian dictionary for compres-sive sensing of the ECG signal,” in Biometric Measure-ments and Systems for Security and Medical Applica-tions (BIOMS) Proceedings, 2014 IEEE Workshop on.IEEE, 2014, pp. 80–85.

[5] E. van den Berg and M. P. Friedlander, “Probing thepareto frontier for basis pursuit solutions,” SIAM Jour-nal on Scientific Computing, vol. 31, no. 2, pp. 890–912, 2008.

[6] H. Mohimani et al., “A fast approach for overcompletesparse decomposition based on smoothed norm,” SignalProcessing, IEEE Transactions on, vol. 57, no. 1, pp.289–301, 2009.

[7] G. Da Poian et al., “Separation and analysis of fetal-ecgsignals from compressed sensed abdominal ecg record-ings,” Biomedical Engineering, IEEE Transactions on,vol. PP, no. 99, pp. 1–11, 2015.

[8] R. Berinde and P. Indyk, “Sparse recovery using sparserandom matrices,” MIT-CSAIL Technical Report, 2008.

[9] A. Eftekhari et al., “Robust-SL0 for stable sparse rep-resentation in noisy settings,” in Acoustics, Speech andSignal Processing, 2009. ICASSP 2009. IEEE Interna-tional Conference on. IEEE, 2009, pp. 3433–3436.

[10] J. Behar et al., “An ECG simulator for generatingmaternal-foetal activity mixtures on abdominal ecgrecordings,” Physiological measurement, vol. 35, no. 8,p. 1537, 2014.

[11] “Physionet challenge 2013,” http:www.physionet.org/challenge/2013/.

[12] J. Behar et al., “Combining and benchmarking methodsof foetal ECG extraction without maternal or scalp elec-trode data,” Physiological Measurement, vol. 35, no. 8,p. 1569, 2014.

Average performance of detection and reconstruction for SL0 and λSL0 for dataset A.

Page 27: ROBUST RECONSTRUCTION FOR CS-BASED FETAL BEATS DETECTION

UNIVERSITY OF UDINE – ITALY – DPIA Eusipco 2016, Budapest www.uniud.it

Conclusions

The proposed method has been tested on public datasets (set A and set B of the Physionet Challenge, Silesia dataset*), showing promising results for both reconstruction quality and detection/classification performance The use of the proposed λSL0 reconstruction algorithm is crucial for consistent performance at all compression ratios Experiments show an average reconstruction time for the λSL0 algorithm ranging from 0.07 s, when CR=30%, to 0.01 s, when CR=80%. Thus, it maintains approximately the same computational cost of the original SL0 algorithm (ranging from 0.03 s to 0.01 s), while being much faster than the BPDN algorithm (1.6 s to 0.6 s). Programs are written in Matlab, running on an Intel Core i7 processor, equipped with 16 GB memory. The proposed framework has good performance and is suitable for real-time implementation with low-power sensors and low complexity devices.

Roberto Rinaldo August 31st, 2016

*A. L. Goldberger, L. A. Amaral, L. Glass, J. M. Hausdorff, P. C. Ivanov, R. G. Mark, J. E. Mietus, G. B. Moody, C.-K. Peng, and H. E. Stanley, “Physiobank, physiotoolkit, and physionet components of a new research resource for complex physiologic signals,” Circulation, vol. 101, no. 23, pp. e215–e220, 2000.