Disclosure of Invention
In order to solve the technical problems, the invention provides a method capable of evaluating the quality of electrocardiosignals in a compressed domain. When the method is used for evaluating the quality of the compressed electrocardiosignals, the evaluation result can be quickly obtained, the accuracy is high, and a basis can be provided for removing noise of signals in the later period or accepting or rejecting collected data.
The purpose of the invention is realized by the following technical scheme:
a compressed domain electrocardiosignal quality evaluation method based on an improved band-pass filter comprises the following steps:
step 1, dividing the quality evaluation result of the electrocardiosignal into an acceptable type and an unacceptable type;
step 2, intercepting electrocardio data x (N) from the obtained electrocardio signals according to a preset interception length, and marking the signals into two categories of acceptable and unacceptable;
step 3, performing compression sampling on the intercepted electrocardio data x (N) to obtain a compression sampling signal y (M);
step 4, constructing a modified compression domain band-pass filter based on Discrete Wavelet Transform (DWT), and performing band decomposition on the compression sampling signal y (M) to obtain an equivalent form of wavelet coefficients on a plurality of frequency bands of the electrocardiogram data x (N) in a compression domain;
step 5, based on the step 4, calculating similar band energy and similar wavelet entropy under each sub-band of the compressed sampling signal y (M), taking the similar band energy and the similar wavelet entropy as characteristic data of the signal, and constructing a learning and classifying system based on a Support Vector Machine (SVM) method;
step 6, after intercepting a preset length of the new electrocardio-test signal, performing step 3 and step 4 to obtain new electrocardio-signal characteristic data, and then classifying the electrocardio-test signal based on the SVM classification system trained in step 5;
and 7, taking the classification result of the SVM classification system as the evaluation result of the signal quality.
The invention has the following advantages:
1. the invention can directly acquire the energy information of the CSECG signal and evaluate the signal quality by taking the energy information as the compressed signal characteristic data, thereby providing a theoretical basis for directly evaluating the signal quality in a compressed domain and avoiding a complex signal reconstruction process.
2. According to the invention, the sparse binary random matrix is used as the measurement matrix to perform compression sampling on the original signal, so that on one hand, the calculation complexity can be reduced when the compression sampling is completed, and the calculation power consumption is further reduced by properly reducing the number of 1 element; on the other hand, the matrix is only composed of two elements of 0 and 1, the number of 1 elements is very small, and 0 and 1 just respectively represent the switch states of two circuits, which is beneficial to hardware implementation.
3. The wearable health monitoring system adopting compressed sensing at the sampling node can realize sampling far lower than Nyquist sampling frequency, thereby greatly reducing data acquisition amount and data amount needing to be transmitted, further reducing system energy consumption, further achieving better matching between algorithm performance and hardware equipment, and improving cost performance.
4. The method provided by the invention has higher accuracy, can effectively evaluate the quality of the multi-lead CSECG signal, and has the advantages of simple method, low cost and the like.
Detailed Description
The technical solution of the present invention is further explained below with reference to the accompanying drawings. The invention is not limited thereto, and any modification made to the technical solution of the invention, which is equivalent to the replacement, is covered within the scope of the invention without departing from the spirit and scope of the technical solution of the invention.
The invention provides a compressed domain electrocardiosignal quality evaluation method based on an improved band-pass filter, which is characterized in that a flow chart is shown as figure 1, a scheme schematic diagram is shown as figure 2, and the method comprises the following specific implementation steps:
step 1, the quality evaluation results of the electrocardiosignals are divided into two types of acceptability and unacceptability, namely, the evaluation results of the electrocardiosignals have only two grades.
Step 2, intercepting electrocardio data x (N) from the obtained electrocardio signals according to a preset interception length, and marking the signals into two categories of acceptable and unacceptable;
specifically, in order to reduce the data calculation amount and ensure the accuracy of the evaluation result, the specific interception length is the length of the acquired electrocardiographic data when the sampling frequency of the electrocardiographic data is fixed and the number of sampling points is 2048.
Step 3, performing 2 times of compression sampling on the intercepted electrocardio data x (N) to obtain a compression sampling signal y (M);
in this embodiment, a sparse binary random matrix is used as the measurement matrix Φ for compressed sampling of the electrocardiographic data x (n). A comparison of the original signal (using Nyquist sampling) with the compressed cardiac signal (using compressed sensing sampling) is shown in fig. 3.
Step 4, under the condition of Discrete Wavelet Transform (DWT), performing 5-layer DWT decomposition on the compression sampling signal y (M) by adopting db6 wavelet through modifying the compression domain band-pass filter, decomposing 6 compression domain sub-bands, and obtaining the equivalent forms of wavelet coefficients on six frequency bands of electrocardio data x (N) in the compression domain, wherein the specific construction steps of each frequency band modification compression domain band-pass filter are as follows:
referring to the DWT decomposition of ECGs in the conventional domain, assume that an N × N square matrix D can represent the L-layer DWT of the ECG, i.e.:
in the formula: d in the framen(N is more than or equal to 1 and less than or equal to L +1) represents a solving matrix corresponding to the nth layer wavelet coefficient, and x is a vector form of intercepting electrocardio data x (N) and is in an N-dimensional column directionAnd z represents the wavelet coefficient of the signal x after L-layer decomposition. The number of wavelet coefficients of each scale decomposed by DWT is a multiple relation of 2, the number of the wavelet coefficients is equal to the number of rows of a solving matrix, so that the number of rows of the solving matrix of the wavelet coefficients is different, the number of columns is kept uniform, all the solving matrices are sequentially arranged according to rows and are equal to a matrix D, and the solving mode is as follows:
in the formula, C
N/2Representing a down-sampled matrix of dimensions N/2 x N,
and
respectively representing a high-pass filtering and a low-pass filtering process. One or several continuous layers of wavelet coefficient solving matrixes are sequentially kept, and other positions are set to be zero to form an NxN band-pass filter matrix B
iAnd i represents the number of band divisions. According to the invention, DWT is carried out on electrocardiosignals according to the noise interference and the frequency distribution condition of ECG, and the electrocardiosignals are divided into 6 frequency bands, and the wavelet coefficient of each frequency band is expressed by matrix multiplication as follows:
fi=Bix;
in the formula: f. ofiWavelet coefficients of the i-th band after DWT decomposition of uncompressed electrocardiogram data x (N), BiRepresents the ith bandpass filter matrix;
under the condition of obtaining a non-compression domain, on the basis of L +1 wavelet coefficients and a band-pass filter after L-layer DWT decomposition is carried out on electrocardio data x (N), compressed sampling signals y (M) are supposed to be subjected to compressed domain band-pass filtering, so that the band-pass filtering effect under each frequency band is equivalent to the direct compression sampling of the result of conventional band-pass filtering, matrix and vector multiplication are used for representing, and the equation is expressed as follows:
wherein phi is an M multiplied by N matrix which is a measurement matrix of electrocardio data x (N) under a conventional domain, f
iWavelet coefficients of the ith frequency band after DWT decomposition are carried out on the uncompressed electrocardiogram data x (N),
is a M multiplied by M square matrix which represents the ith modified compressed domain band-pass filter, y is the vector form of the compressed sampling signal y (M), and y belongs to R
M×1Is an M-dimensional column vector;
by the formula y ═ Φ x and fi=Bix (x is a vector form of intercepting electrocardio data x (N), is an N-dimensional column vector, BiRepresenting the ith bandpass filter matrix) can be derived as follows;
further simplified modified compressed domain band-pass filter capable of obtaining each frequency band
Is represented by the following formula:
in the formula (I), the compound is shown in the specification,
representing the generalized inverse matrix of phi.
Here, on the basis of analyzing the DWT decomposition sub-band in the conventional domain, it is proposed to modify the conventional band-pass filter to obtain a compressed domain sub-band similar to the conventional sub-band. Because each layer of wavelet coefficient corresponds to a frequency band, the wavelet coefficient is correctedCompressed domain band-pass filter
Obtaining the equivalent form of wavelet coefficients on six frequency bands of the electrocardio data x (N) in a compressed domain, namely similar wavelet coefficients in the compressed domain
Representing the output of the filter after the i-th layer subspace correction, i ═ 1,2, …,6, there is an equation
Step 5, calculating the similar wavelet coefficient under the compressed domain based on the step 4
Calculating similar band energy and similar wavelet entropy under each sub-band of a compressed sampling signal y (M), taking the similar band energy and the similar wavelet entropy as feature data of the signal, and training an SVM classification system by combining the class mark of the signal in the step 2, wherein the specific step of extracting the feature data is as follows:
the method is characterized in that: computation of band-like energy of compressed domain under each sub-band
According to the Johnson-Lindenstaus lemma, the inner product of the vectors remains unchanged under random conditions, and the constrained equidistant nature of compressive sensing constrains the energy conservation nature of compressive sampling. Calculating similar frequency band energy of the compressed domain according to the following formula;
in the formula, E
iThe similar band energy of the compressed domain for the i-th layer subspace signal,
represents the output of the filter after the i-th layer subspace correction,
and (2) feature: computation of wavelet-like entropy of compressed domain under each sub-band
The specific calculation process of the similar wavelet entropy of each sub-band is as follows:
first, the total energy E of the signal frequency band is calculatedt;
Then, the specific gravity P of the energy of each frequency band in the total energy is obtainedi;
Pi=Ei/Et;
Wavelet-like entropy S of compressed domain under each sub-bandiIs represented as;
Si=-Pi log Pi;
in the formula, subscript i is 1,2, …, n, and n is the number of sub-bands.
And 6, intercepting a preset length of the new electrocardio-test signal, performing the step 3 and the step 4 to obtain new electrocardio-signal characteristic data, and then classifying the electrocardio-test signal based on the SVM classification system trained in the step 5.
And 7, taking the classification result of the SVM classification system as the evaluation result of the signal quality.
The foregoing merely represents preferred embodiments of the invention, which are described in some detail and detail, and therefore should not be construed as limiting the scope of the invention. It should be noted that, for those skilled in the art, various changes, modifications and substitutions can be made without departing from the spirit of the present invention, and these are all within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.