Splines in Compressed Sensing

It is well understood that in any data acquisition system reduction in the amount of data reduces the time and energy, but the major trade-off here is the quality of outcome normally, lesser the amount of data sensed, lower the quality. Compressed Sensing (CS) allows a solution, for sampling below the Nyquist rate. The challenging problem of increasing the reconstruction quality with less number of samples from an unprocessed data set is addressed here by the use of representative coordinate selected from different orders of splines. We have made a detailed comparison with 10 orthogonal and 6 biorthogonal wavelets with two sets of data from MIT Arrhythmia database and our results prove that the Spline coordinates work better than the wavelets. The generation of two new types of splines such as exponential and double exponential are also briefed here .We believe that this is one of the very first attempts made in Compressed Sensing based ECG reconstruction problems using raw data. Keywords— Compressed Sensing; Splines; 2E Splines; PRD; SNR


I. INTRODUCTION
In normal conditions reasonable reconstruction quality can be assured by maintaining the Nyquist rate [1], but sampling below Nyquist rate is always an attractive option especially in situations where collection of samples are too costly or physically not possible to collects the samples at the rate Nyquist demands [2].To deal with these situations people usually does compression which finds the abridged representation of the data which is capable of doing an acceptable reconstruction at the receiver side. Transform coding [3], one of the most used techniques in compression aims finds an alternative set of basis where the signal has a sparse representation. For a signal of length 'n', if it has only 'k' non-zero coefficients, in a domain of interest then is said to have a sparsity of 'k' in that domain. Such a signal can be recovered accurately with the knowledge of only 'k' (or less than 'k') non-zero coefficients. This is often called as sparse approximation which is the basis idea behind transform coding. Inspiring from the idea of sparse approximation a new concept called Compressed Sensing (CS) was formulated which ensures reasonable approximation even with sensing fewer measurements lesser than Nyquist rate. The basic idea behind CS is relatively simple, if the signal is sparse in a basis then why we do sense all the information? Rather than sensing all the information and the throwing the unwanted ones why do we find methods to sense the data in the compressed form itself. Even though this idea came to limelight after the publication of the papers by Candes, Romberg and Tao [4][5][6] in 2006, the origin of this method can be seen from the seventies and eighties [7][8].Even before back in the eighteenth century there were some works which hint towards the solution for this problem, for example in 1795 a French mathematician named Gaspard Riche de Prony developed a method called Prony's method(analysis) [9]which was somewhat similar to Fourier transform, it was used to capture valuable information from a signal uniformly sampled in the presence of noise. Even though there were these abstract definitions they failed to find a solid algorithm for solving this underdetermined problem, Candes, Romberg and Tao construct solid algorithms which are capable of doing this unyielding task. They showed that it is possible to reconstruct the data from fewer measurements than the Nyquist rate. This very helps in situations where large amounts of data are involved. One such application is in continuous ECG monitoring and analysis. In the case of serious cardiac diseases, one way to save a life is to take 24 hours continuous monitoring of ECG and to do nursing accordingly. Wireless sensors are more suited in these cases as in wired networks, reading may alter because of patient movements [10].Wired or wireless 24hour continuous data monitoring involves huge amounts of data. In these situations, CS is an ideal choice. Reduction in the amount of data sensed intern reduction in the amount of data to be processed will reduce the power consumption. CS is a proven technology for reducing the power consumption. CS techniques are successfully implemented to save power up to 70% in ECG and EEG applications [11]. There are lots of papers published in the field of CS based ECG reconstruction most of them considers CS as a technique for compression rather than a sensing paradigm [12][13][14][15][16][17]. Recently in May-2015 Abo-Zahhad, et.al published their work [18] which is showing some promising results, In that they have estimated the QRS complex from the available data and subtracted it from the original and CS techniques are applied on the error signal. The major drawback here is that prior information of the data has to known before, and thresholding has also been employed to increase sparsity. Preprocessing techniques like smoothening, removal of dc offset and thresholding to improve the quality of data are actually contradictory to the original CS based approach. In ideal CS based reconstruction scenario, we sense only a few random coefficients and the algorithm is expected to reconstruct the original signal without sensing the whole data points. As it sounds magical the convex optimization algorithm used in CS is often known as l 1 magic [19]. So in our work, none of the preprocessing methods are applied on the data and have included a lowfrequency base to capture low-frequency information. We had selected spline coordinates instead of wavelet basis and made a detailed comparison between the two. Spline coordinates are compared against the wavelet basis and it was found out that the splines work better than wavelets. The exponential spline is kind of splines which uses causal exponentials instead of polynomials were introduced by Unser. M et.al in 2005 [20] and double sided exponentials spline family [2E spline] was introduced by us through our earlier work [21]. 2E spline uses two-sided exponentials fragments for generating higher orders.
The remaining of the paper is arranged as follows: Section II gives a brief introduction of CS theory, Section III deals with splines, where a brief description of polynomial, exponential, and double exponential spline families are given in subsections. In Section IV, the details about the construction of sparsifying matrix from the spline coordinates are discussed. Results are analyzed in Section V and in subsection the effect of the addition of dc base in the sparsifying domain are detailed; we conclude this paper in section VI II. COMPRESSED SENSING (CS) As mentioned, CS theory states that if the signal has a sparse representation in a certain domain then it can be recovered using a small number of coefficients lesser than that of Nyquist rate by solving basis pursuit algorithms or using greedy based algorithms. For example consider 'x' as the input vector of size N x 1, and if it has a sparse representation in a domain say 'β' with coefficients as ' , mathematically the problem of finding from the measurements 'y' can be formulated as Where 'y' represents the random samples collected by projecting 'x' on a sensing matrix Φ, and is called as the reconstruction matrix which is the product of Φ and β i.e. β, dimensions of Φ is 'M x N', where 'M' represents the number of projected samples, and 'β' is of size N x N; where N is the signal length. The reconstruction matrix (' will be of size 'M x N'. The transform matrix β can be discrete cosine basis or wavelets basis or any other basis in which the signal is supposed to have a sparse representation. In this present work, we have compared this matrix (β) using basis selected from different orders of spline with orthogonal and biorthogonal wavelets. The problem of finding the sparsest solution using l 0 norm is NPhard, computationally not possible to solve in real time [ 22].But CS theory states that this problem can be relaxed in the form
i.e. Instead of solving for l 0 norm we can solve for l 1 norm and yet yield the similar results. Reasoning behind is well explained in the papers [22][23][24][25][26][27]. Geometrically this can be simply explained using the concept of the unit circle (The set of all vectors of norm unit 1). The unit circle will be different for different norms. In R 2 , the unit circle corresponds to l 1 norm is diamond in shape which touches exactly the solution space at the same point where l 0 norm contacts the solution, i.e. in each coordinate axis, as explained in the introductory section of [28]. Even though CS seems to be a better option it is still underutilized in ECG-based applications, this may be because of unavailability of proper hardware in capturing the real-time data, which is always a challenging problem. Some research in recent years [29][30] based on random demodulation changed the scenario and CS is more attractive than before. Random demodulators can be used to collect the random samples instead of sensing the whole signal. Recently Bortolotti et .al proposed an ECG monitor based on CS architecture which saves up to 70% of power compared to other monitors [31].

III. POLYNOMIAL AND EXPONENTIAL SPLINES
Michael Unser made a series of publications [32][33][34][35][36][37] in spline fitting theory which showcases the advantageous of splines in signal and image processing. A discrete signal can be well approximated using splines, and polynomial splines can be constructed from B-spline basis functions. If the spline knots are placed at equally spaced integers, its parameters can be found by simple digital filtering rather than complex matrix manipulations. The spline is one of the most flexible functions, i.e. by increasing the degree of the spline (n) we can progressively switch from the constant (n=0) and piecewise linear representations (n=1) to the other extremes n=∞, i.e. up to band limited models. Three different types of splines are detailed such as polynomial, exponential, and double exponential splines. Fig.3. 0th, 1st, 2nd, and 3rd order Exponential splines.

A. Polynomial splines
A polynomial spline (spline) is a numeric function that is piecewise defined by polynomial functions. They possess a high degree of smoothness at the points where these polynomial segments are connected. These points are called as knots. The individual segments are polynomials and this characteristic of splines make them a better contender in approximation problems, The Polynomial B-spline of order zero can be obtained from rectangular function 0 (y) = Polynomial splines are obtained by connecting polynomial of degree one or by connecting straight lines.
In quadratic spline, the individual segments will be connected by polynomial of degree 2, for example 2 (y) = Cubic spline, most commonly used splines in interpolation problems can be represented as The linear, quadratic, cubic splines and the basis spline (B-Spline) are shown in Figure.1 Higher order splines can be obtained by the repetitive convolution of the lower order ones [20].
B. Exponential Splines Exponential Splines were introduced in order to reduce the gap between the spline fitting and continuous system theory. Here in exponential splines instead of polynomials, cardinal causal exponentials are connected in smooth fashion. Instead of rectangular function here an exponent in unit interval is used as basis function (B 0 y) for generating higher order splines. Similar to polynomial splines higher order splines are obtained by the convolution of lower order splines. B-spline used for exponential splines with a factor of one is shown in Figure [2] and Figure [3] shows zero, first, second and third order causal exponential splines

C. Double Sided exponential Splines
We tried exponential splines in our experiment and found that the splines are not symmetric in nature so we developed a new family of symmetric splines called double sided exponential splines. The basis function used for generatingthis type of spline is of the form (where 'a' indicates the scaling parameter and b, the index of the central (maximum) point)).Higher order splines can be obtained from the convolution of the basis function. This can be called as 2E splines.
The first, second, third order double-sided exponential splines along are shown in Figure [4]. From the figure it can be observed that the spline obtained from double sided exponents shows symmetric characteristics as compared to asymmetric nature of splines obtained from causal exponents.
IV. ALGORITHM FOR CONSTRUCTING SPARSIFYING MATRIX FROM SPLINES. Sparsifying matrices are constructed by taking the representative coordinates from both the first, second, third order exponential, double exponential and polynomial splines. The points are selected in such a way that they are at equal distance from the center of the spline. The polynomial and double exponential spline coordinates are symmetric in nature because of the symmetric nature of their splines, where exponential spline coordinates are asymmetric in nature. The coordinates selected are shown in Table.1.We dictate asymmetrical exponential splines as one-sided exponential splines or 1E splines and symmetrical exponential splines as double sided splines or 2E splines. We introduced a low frequency/dc base, for capturing the lowfrequency information so, if the data (to be reconstructed) is having a DC content that also will be reconstructed. This seems to be very much important as in practical cases as it will not be possible to take samples without having a DC content at least in sensor outs. The reasoning behind this is that bio measurements like ECG employ the same number of electrodes expecting the half cell potential [38] to cancel out. But in practical cases difference in electrode material or skin contact resistance causes a DC offset voltage which makes deviations or baseline drift in the readings. In ideal CS we are expected to collect only a few random samples (not the complete signal) and the algorithm is expected to construct the original data from the limited data sensed. So if we are collecting few samples from a preprocessed data for experimental purpose and analyzing the result based on that, we can only presume that the algorithm will work fine if the data (to be reconstructed) contains dc artifacts. Moreover, rather than reconstructing the original data in the domain where the data is sensed, the CS algorithms recover coefficients of the signal in the domain where it is having a sparse representation (provided if the data does not have a sparse representation in the sensing domain.). There is no guarantee that the random samples sensed with or without noise will have the same sparse presentation in the alternate domain. Moreover Józef K. Cywiński et.al [39] points that very low frequency and DC components of ECG signal carry information about the heart muscle conditions. Different splines tried in our problem are as follows: PS1 -First order polynomial spline, PS2 -Second order polynomial spline, PS3-Third order Polynomial Spline (cubic Spline), 1E1-First order one-sided exponential spline, 1E2-Second order one-sided exponential spline,1E3-Third order one-sided exponential spline, 2E1-First order doublesided exponential spline, 2E2-Second order double-sided exponential spline, 2E3-Third order double-sided exponential spline.

V. RESULTS AND DISCUSSIONS
The algorithm is analyzed on the basis the important parameters such as Percentage Root mean square Difference (PRD) and Signal to Noise Ratio (SNR) and Compression Ratio (CR) which are used to quantify the error between the original and reconstructed signal. The formulation of PRD is given in equation (5) Where be the original signal, be the reconstructed signal and N be its length. CR is defined as the ratio between the numbers of bits used for representing the uncompressed signal to the bites in compressed signal Where orig and comp represent the number of bits required for the original and compressed signals respectively. SNR can be found from PRD using relation SNR= -20log 10 (0.01 × PRD) The experiments are conducted using the data from MIT-BIT Arrhythmia database [40]. MIT-BIH Arrhythmia Database are sampled at 360 samples per second per channel , we took 2 seconds data(720 samples) for analyzing our results datasets used are 101m and 104m. The algorithm is tested for orthogonal wavelets from db1 to db10 and for biorthogonal bior1.1 bior1.3,bior1.5, bior2.2,bior2.4, bior2.6, bior2.8, bior3.9,bior 4.4,bior 5.5 bior6.8 against the coordinates from the splines PS1,PS2,PS3,1E1, 1E2,1E3, 2E1,2E2,2E3. CS on ECG signal is carried out using convex optimization software CVX [41] and mat lab [42] as our platform. Random samples are obtained by projecting the data using a random matrix. The input data analyzed is of size 720 X 1 and for each experiment input data is projected onto a random matrix to take random measurements. Random samples are varied from 10% of the sample size i.e. 72.to 60% (432) for getting a compression ratio (CR) of 10% to 60%, The ideology of CS allows us to sense only that much amount of samples for reconstructing the original signal within the desired PRD. As we aim to reconstruct the data with minimum measurements it is found meaningless for going CR above of 60%. The wavelets are decomposed at level 4 as in [18].  Ratios for the MIT data 101m, Table.3 indicate the same for 101m. Table 4 and Table 5 indicate corresponding SNR values for 101m and 104m respectively. A low PRD and higher SNR are indicating good reconstruction. From Tables 2, 3, 4, 5 it is evident that Splines coordinates perform better than wavelets.
A sample of reconstructed data for the first 720 samples from the data set 101 using first order spline coordinates are shown in Fig.6. and Figure .7 indicate the same for 104

VI. EFFECT OF LOW-FREQUENCY BASE IN RECONSTRUCTION MATRIX
Even though the introduction of a low-frequency base in the transform matrix successively capture low-frequency information from the projected samples it has some adverse effect on the reconstruction matrix, upon performing decomposition using SVD (Singular Value Decomposition), it was found that the introduction of dc base shoots up the first singular value and makes the condition number worse. This is because the addition of a dc base in transform domain replaces a column in reconstruction matrix by the sum of column elements of the sensing matrix. The increase in singular value normally deteriorates the matrix. But here increase in singular value does not have any effect on reconstruction quality; this is proved by reconstructing the signal using unmodified matrix singular values. Our experiments show that increase in first singular value doesn't have an effect and the reconstruction quality is still preserved even though the first singular value is lowered down. Singular value of the reconstruction matrix with and without a dc base along the sparsifying basis is shown below. Figure 8.a shows the singular values (SV) of the reconstruction with adding a dc base along the sparsifying bases and figure 8.b shows the singular values of the reconstruction matrix when a dc base is added. In the first case the maximum SV is 140 and in the second case, it is 698 Fig.5 Different representative coordinates selected from polynomial and exponential splines. PS1 -First order polynomial spline,PS2 -Second order polynomial spline,PS3-Third order Polynomial Spline (cubic Spline),1E1-First order one-sided exponential spline,1E2-Second order one-sided exponential spline,1E3-Third order one-sided exponential spline,2E1-First order double-sided exponential spline,2E2-Second order double-sided exponential spline,2E3-Third order double-sided exponential spline. Fig.6 The original data (top) and the reconstructed data using first order spline coordinates (1E1) for data set 101m by sensing only 30% of the samples.

Spline Type
Representative coordinates selected

VII. CONCLUSIONS
The problem of increasing the reconstruction quality with a limited number of random samples in compressed sensing is addressed here by the use of splines. Both polynomial and exponential splines were experienced and our experiment shows that spline basis performs better than wavelets. We have introduced a low-frequency base in the sparsifying domain in order to capture the low-frequency information from the random samples and this proves to have a higher effect in decreasing the variation between the original data and the reconstructed one. A total of 360 experiments were conducted on two sets of ECG data. The effect of the introduction of a dc base is also studied here.