**Recognition of Biomedical Signals Based on Their Spectral Description Data Analysis**

L.A. Manilo, A.P. Nemirko

lmanilo@yandex.ru, apn-bs@yandex.ru

St. Petersburg Electrotechnical University “LETI”

**Abstract **— Methods for generating spectral features in biosignal recognition in frequency domain are described. The method of linear decision rules constructing using the Fisher’s criterion is discussed. The efficiency of the method is investigated on the example of complex arrhythmia recognition according to the spectral description of electrocardiosignals.

*Keywords:* spectral analysis, linear decision functions, Fisher’s criterion, arrhythmia recognition

DOI: 10.1134/S1054661816040088

**INTRODUCTION**

Recent years many practical applications are based on biomedical signal analysis in frequency domain. Spectral analysis of electrocardiosignal (ECS) led to the creation of new areas of research (e.g., analysis of heart rate variability) the development of which improves the efficiency of pathologies detection in continuous monitoring of the patient’s condition via ECG. Of particular interest is the spectral analysis of ECS rhythm disturbances that cause the development of dangerous arrhythmias—atrial flutter and flicker of the heart ventricles. The signal thus acquires a wavy form and has typical spectral description. Said waves are hard to be identified automatically. While the task of reliable detection of hazardous arrhythmias and their harbingers stays of the top priority for cardiac monitoring systems.

Signal analysis in the frequency domain usually involves the assessment of the power of the basic harmonic components, as well as the identification of some peculiarities in spectral density power (SPD) distribution at a given range of frequencies [1, 2]. In the tasks of biomedical signal recognition this leads to the need for finding a specific set of features that vary clearly for different classes (for instance, presence of spectrum narrow-band components of the spectrum, the intensity of the main peak of SPD and etc.) [3].

Exploring the distribution of objects in space of the selected features, we can solve the problem of signal classification, implementing linear decision functions or designing a more complex decision surfaces. But optimization of decision rule type does not often ensure required quality of signal recognition. This taken intuitively or empirically, does not carry significant information for classification. System of features can be incomplete, and inclusion in decision rules some of them may even reduce the efficiency of the recognition system.

This article is focused on ECS recognition task and it proposes to solve the task by forming an optimum spectral description and construction of decision rules using Fisher’s linear discriminant.

**SELECTING FREQUENCY BAND FOR SPD FUNCTION ANALYSIS**

Assume the initial signal is represented x(*t*) by N count sequence x* _{n}*,

*n = 0, …, (N – 1)*, set by sampling rate

*f*. Then, for time interval

_{d}= 1/h*T = Nh*SPD sample estimate can be obtained:

Given the known effect of energy leakage through the side lobes of the spectral window, resulting from the truncation of the process under study by a rectangular window of width *T*, you must first smooth the realization of the initial process. To do this, they use a special weighing function, e.g., cosine function, which reduces the amount of displacement of the sample spectrum estimate [1]. The area of the analyzing frequencies can be limited to the frequency *f _{c} = f_{d}*/

*2*, and the set of values SPD is ordered by

*k = 0, 1, 2, … (N/2)*.

*Fig. 1.*

The SPD assessment can be used for formation of spectral features. However, you must limit the analyzed frequency range, which will reduce the dimensionality of spectral description and will simplify the procedure of signal recognition. To this end, we propose to estimate the divergence of the obtained signal descriptions, forming the training sample data for the given classes ω1 and ω2 and evaluating the assessment of SPD for them. As proximity grade between these classes one can use the criterion based on analysis of average inter-group distance:

where *n _{1}* and

*n*are numbers of objects forming classes ω1 and ω2;

_{2}*k*is iteration pitch; G

_{q}

^{(k)}, G

_{j}

^{(k)}are spectral representation of objects q and j for classes ω1 and ω2 applied on

*k*th step (for

*k*frequency components).

The considered approach was used when processing ECS to solve the problem of detecting hazardous rhythm disturbances (ventricle fibrillation) (class ω1) on the background of other arrhythmias representing no hazard for patient’s life (normal rhythm with single extrasystoles, group premature beats, other function perversions of auricles and ventricles of the heart) (class ω2) [4, 5].

As an example, ECS realizations and corresponding sample assessments of normalized spectrum for ventricular fibrillation (VF) (

*a, b*) and background rhythm (BR) (

*c, d*) are given in Fig.

*1*. Signal fragments are represented by ECG recordings with duration of 2 s, sampled with frequency of 250 Hz (50 units of ADC correspond to 1 mV).

Figure

*2*shows the dependence of inter-group distances from the number of SPD samples

*k*, included in the spectral representation of signals. Figure

*2a*shows integral curve ρ

^{(k)}= (ω1, ω2), and Fig.

*2b*shows dependence of a distance ρ

^{(k)}= (ω1, ω2) calculated individually for each spectral feature.

*Fig. 2.*

The dependencies are obtained based on processing of 60 ECS recordings specially selected from MITBIH electrocardiographic data base [6]. The dependency analysis allowed us to limit the effective SPD analysis area with upper frequency *f _{max}*=14 Hz (k = 28), because higher frequencies, as one can see in figures, do not significantly contribute to estimate a measure of classes divergence.

In general, you need to specify an acceptable level ρ

*(ω1, ω2)and, comparing it with values ρ*

_{min}^{(k)}= (ω1, ω2) separate the output region of important frequencies {

*f*,

_{min}*f*}.

_{max}**FORMING A SET OF SPECTRAL FEATURES**

Next, grouping of spectral coefficients is applied by smoothing of their values within the limits of specified areas. It is known, that sample spectrum calculated for independent frequencies *f _{k}* follows the

*χ*-distribution law with two degrees of freedom. The value obtained for each frequency is not SPD consistent estimate, as its standard deviation is comparable with the average value of

^{2}*G*(

*f*) [1]. Smoothing by

_{k}*l*independent frequencies let us proceed to

*χ*- distribution with 2

^{2}*l*degrees of freedom which leads to decrease in the magnitude of random error by times. Thus, the procedure of adjacent frequencies merging helps to reduce the estimate variance of SPD, i.e., it leads to more robust spectral characteristics.

Generating of spectral feature set can be implemented with one of proposed methods. First method is based on the use of Daniel periodogram evaluation which forms a new row of spectral samples by averaging of (2P + 1) neighboring frequencies.

This reduces the dimensionality of the signal frequency description and increases stability of spectral estimates at the cost of the total power analysis in different spectral regions. Given the possible deterioration in resolution of neighboring frequencies, it is possible to use overlapping segments to provide more detailed analysis of the signal in the frequency domain [1]. In this case, the correlation between neighboring estimates shall differ from zero, and number of features to be estimated shall be virtually doubled. The effectiveness of selected spectral window and method of SPD sampling can be also evaluated according to the distance maximization criterion between given classes of signals in the frequency domain (1).

The second method involves automatic generation of effective frequency domains, by locating the optimal boundaries to group adjacent spectral coefficients. First, maximum number of intervals *L* shall be set within each limits point wise SPD assessments shall be joined. This value shall define number of features which can be used to build discriminant functions. Then summary areas beneath SPD curve shall be evaluated:

Searching options for location of boundaries of regions (*m _{p}, m_{p+1}*) in each of L frequency areas allows to obtain a sufficiently large set of vectors {

**G**

^{(L)}}, the best one can be determined according to the maximum value of criterion (1). To reduce the time of analysis you can use the procedure of gradient search of extremum of the objective function. Similar actions shall be performed at subsequent processing steps, in a sequential decrease in the number of intervals (

*L, L – 1, L – 2, …*). The result is an ordered set of vectors {

**G**

^{(L)},

**G**

^{(L -1)},

**G**

^{(L - 2)}, …}, which are compared to each other using values of function (1), and the final option for spectral description

**G**= (G

_{1},…, G

*,…, G*

_{p}_{L})is selected. Resulting from applying this treatment method for a sample of actual ECG records there were obtained the following boundaries of frequency domains

All frequencies are multiple of 0.244 Hz which is associated with addition of sequence *x(n)*, *n = 0*, …, *N - 1* with zeroes up to *N* = 1024 samples.

**BUILDING UP OF DECISION FUNCTIONS**

Building of decision functions for two classes recognition of signals ω1 and ω2 for spectral description **G**_{L} = (G* _{1}*,…, G

*,…, G*

_{p}*) is not an easy task. Let us consider possible ways to resolve it.*

_{L}Well-known Bayesian approach based on calculating likelihood ratio is the optimal, as it relates to the best criterion of minimizing the probability of making erroneous decision. However, in practice it is difficult to implement it as it requires knowledge of the conditional probability densities.

Simpler is a linear or piecewise-linear classifier that can be built in several ways. For two normally distributed random values the Bayesian decision rule is a quadratic function, but, if we assume equal covariance matrices, the function becomes linear. However, this assumption is not always justified, so the more efficient is a different approach, allowing building a linear separating function

*h*(

**G**) =

**W**

^{T}

**G**+

*w*for normal distributions with unequal covariance matrices, and distributions that are not normal. The decision rule in this case shall be set by the linear function ;

_{0}**W**= (

*w*,

_{1}*w*, …,

_{2}*w*) which conditionally

_{L}*h*(

**G**) > 0 refers observation vector

**G**to class ω1, otherwise (

*h*(

**G**) < 0) it shall fall in class ω2.

Assuming a normal distribution law of the random variable

*h*(

**G**) (which is true at large L due to the Central limit theorem), you can find components of vector W and w0 which minimize classification error. The exact solution of equations obtained during this process is unknown, but is known an iterative process of finding optimal values of

**W**and

*w*[7].

_{0}The solution in explicit form for

*h*(

**X**) can beobtained using a different optimization criterion, namely, the Fisher’s criterion which is given by:

where η_{i}, σ_{i}^{2}, *i* = 1, 2 estimates of mathematical expectation and dispersion values h(**X**/ω* _{i}*) that are functions of

**W**and

*w*.

_{0}This criterion is a degree of the distance between distribution values of the linear separating function in classes ω

_{1}and ω

_{2}. By analogy with the criterion of minimizing, the errors of classification determine values of

**W**and

*w*which maximize

_{0}*J*. It is shown [7] that to achieve the best separation of classes the required parameters must be defined as follows:

where **M**_{1}, **M**_{2} covariance matrices and vectors of mathematical expectations of classes ω* _{1}* and ω

*, respectively.*

_{2}This method for building the decision rules was used to solve the problem of rhythm disorder recognition using ECS frequency description.

Figure

*3*shows object projection distributions on vector

**W**(y =

**W**

^{T}

**G**

^{(L)}) in the form of bar graph for smoothed SPD evaluation in frequency range of 0‒15 Hz. On the left (Fig.

*3a*) you can see the result obtained by using the Daniell periodogram for

*L*=15 frequency samples at a window width of ∆

*f*= 0.976 Hz. On the right (Fig.

*3b*) you can see the distribution obtained by forming

*L*= 4 spectrum frequency areas according to the criterion of maximizing intergroup distances. Class ω

_{1}here is represented by VF realizations, and class ω

_{2}is represented by BR signals.

*Fig. 3.*

Analysis of the obtained data shows that objects in both cases form sufficiently compact groups and classification of signals can be effectively made by using one of the proposed methods for building the spectral feature space. In addition, it should be noted that applying the optimization frequency domains you can significantly reduce the number of features simplifying implementation of the decision rules. However, in the complex grouping of objects in the frequency domain the task of finding vector **W** has certain limitations related to the choice of the type of *J* criterion.

**CORRECTION OF SEPARATING FUNCTION POSITION**

From expressions (2) follows that the dividing hyperplane is not affected by the peculiarities of each of the two covariance matricesand . In addition, the components of vector **W** = (*w _{1}*,

*w*,…,

_{2}*w*) take the highest values for those features

_{L}*G*, …,

_{1}*G*, …

_{p}*G*, which have a larger value of the ratio of scatter between classes to the scatter within classes, which leads to forced orientation of desired vector

_{L}**W**along these coordinate. This can cause undesirable attraction effect of

**W**in the original space to the directions that form the features, characterized by small amount of scatter between classes, but having a close to zero variance. Study [8] shows model examples, which illustrate effect of these factors to vector

**W**orientation.

The separating function position can be adjusted by finding additional vector defined by the Fisher’s criterion in space of lower dimension. Such solution can be obtained by projecting objects of the original set onto the hyperplane D* _{L-1}* dimension

*(L -*1

*)*located orthogonal to the vector

**W**.

To calculate the components of the new vector, let us designate the linear discriminant found in the original space DL through

**W**

_{1}(

*w*). The coordinates of any object from the original

_{1}^{(1)}, w_{2}^{(1)},…, w_{L}^{(1)}*L*-dimensional data sample

**G**

*,*

_{1}**G**

_{2},…,

**G**

_{N}in this space can be defined in the form:

where **G**_{i}^{(L)}, **G**_{i}^{(L-1)} vectors that specify the location of ith object, respectively, in the original (*L*-dimensional) and transformed ((*L* – 1)-dimensional) feature space.

Then the problem of finding the vector **W**_{2} is reduced to finding such a direction in space that maximizes in it the value of *J*. Components **W**_{2} = (*w _{1}^{(2)}, w_{2}^{(2)},… ,w_{L}^{(2)}*) are determined in accordance with the same expressions as for calculation of vector

**W**

_{1}. To find the projections of objects at the chosen directions, bring the vectors

**W**

_{1}and

**W**

_{2}to normalized form, presenting them in the form of weight vectors of unit length:

Then projection of objects in space of the two new coordinates will be defined as a set of scalar values defined by the following expressions:

Study [9] shows recurrent expression for direct calculating of vector **W**_{2} components, which does not require converting the covariation matrix in (2).

**EXPERIMENTS FOR ECG SIGNAL RECOGNITION**

Figure *4* shows results of displaying of two object classes ω_{1} and ω_{2} that are implementations of VF and BR realizations in space of new coordinates *y _{1}*,

*y*. The data are obtained for spectral description which based on Daniell periodogram at

_{2}*L*=15, ∆

*f*= 0.976 Hz (object distribution bar graph on

**W**

_{1}direction is shown in Fig. 3a). Data analysis shows that introduction of additional vector

**W**

_{2}allowed to correct position of separating hypersplane by means of function transfer from

*H*to

_{1}*H*. The distance between the nearest neighbors of the considered classes increased for 1.5 times (

_{2}*r*= 0.0014,

_{1}*r*= 0.0021), which creates more favorable conditions to build a linear classifier. In case of sufficiently complex picture with observation grouping, there is a possibility to use more complex separating planes by approximation them with piecewise-linear functions.

_{2}

*Fig. 4.*

We investigate the possibility of recognition of arrhythmias that are harbingers of dangerous arrhythmias. These include the following disturbances: multifocal ventricular extra systoles, paroxysmal tachycardia, bidirectional ventricular tachycardia (torsade de pointes). Figure *5* shows experimental results of two ECS classes: normal rhythm (NR), frequent ES and tachycardia paroxysmal (TP) (*r _{1}* = 0.042,

*r*= 0.059). Figure

_{2}*6*illustrates display results for objects in two ECG classes: TP and tachycardia “torsade de pointes” (PointT) (

*r*= 3.4 × 10–4,

_{1}*r*= 3.9 × 10–4). Each class consisted of 25 ECG recordings, and for each one of them the above mentioned spectral description was obtained. The figures show that at the coordinate plane

_{2}*y*,

_{1}*y*the objects are grouped sufficiently well, there are no intersections of observing alternative classes. Therefore, the recognition task can be effectively solved based on the considered method of constructing a linear decision function applied to ECS spectral description.

_{2}

*Fig. 5.*

*Fig. 6.*

**CONCLUSION**

The processing technology for biomedical signal recognizing according to their description in the frequency domain is described in the article. The methods forming the set of spectral features and methods of constructing linear decision functions by the Fisher’s test are discussed. Consideration is given to correction of separating functions due to transfer into twodimensional feature space. The experiments on recognition of complex arrhythmias in the spectral description of electrocardiosignal showed high efficiency of the proposed methods.

**ACKNOWLEDGMENTS**

The study was partially supported by RFBR, research projects nos. 15-07-01790-a, 16-01-00159-a, and medical project CardioQVARK Cardiogram by Phone (www.cardioqvark.ru).

**REFERENCES**

1. S. L. Marple, Digital Spectral Analysis with Applications (Prentice Hall, Englewood Cliffs, NJ, 1987).

2. G. Jenkins and D. Watts, Spectral Analysis and Its Applications (Emerson-Adams Press, 2000).

3. A. P. Nemirko, L. A. Manilo, and I. N. Degtyareva, “Recognition of heart ventricular fibrillation on the basis of analysis of the electrocardiogram in the frequency domain,” Pattern Recogn. Image Anal. 11 (2), 353–355 (2001).

4. L. A. Manilo and A. P. Nemirko, “Forming the spectral signs when classifying the electrocardiosignals within the frequency range,” Pattern Recogn. Image Anal. 15 (4), 668–671 (2005).

5. L. A. Manilo, “Ordering of spectral attributes by empirical estimations of intergroup distance in problems of biosignals classification,” Proc. Russ. Univ.: Radioelectron., No. 3, 20–29 (2006).

6. MIT-BIH Arrhythmia Database (Massachusetts Institute of Technology). http://www.physionet.org/physiobank/database/mitdb; http://ecg.mit.edu

7. K. Fukunaga, Introduction to Statistical Pattern Recognition, 2nd ed. (Acad. Press. 1990).

8. L. A. Manilo, “Fisher’s linear discriminant in tasks of biosignal recognition in frequency domain,” in Proc. 12th Russian Conf. MMPR-12 (MAKS Press, Moscow, 2005), pp. 371–374 [in Russian].

9. A. P. Nemirko, “Transformation of feature space based on Fisher’s linear discriminant,” Pattern Recogn. Image Anal. 26 (2), 257–261 (2016).

**Lyudmila A. Manilo** was born in 1946. In 1970 she graduated from St. Petersburg Electrotechnical University “LETI.” From 2007 she is a professor of the Department of Bioengineering Systems at this University. Doctor of Engineering since 2007. The area of hers research interests is pattern recognition, processing and analysis of biomedical signals, intelligent biomedical systems. She has over 120 research publications, including 70 articles and 3 monographs.

**Anatolii P. Nemirko** was born in 1943. In 1967 he graduated from Saint Petersburg ElectrotechnicalUniversity “LETI.” From 1986 he is a professor of the Department of Biotechnical Systems at this University. Doctor of Engineering since 1986, Professor since 1988. The area of his research interests is pattern recognition, processing and analysis of biomedical signals, intelligent biomedical systems. He has over 300 research publications, including 90 articles and 5 monographs. He is a member of the IAPR Governing Board, a member of Editorial Board of Pattern Recognition and Image Analysis Journal.