Статья опубликована в журнале «Mobile Multimedia/Image Processing, Security, and Applications 2015» №9497 21.05.2015
I.S. Svirin^{a}, N.V. Nabilskaya^{b}, V.V. Voronin^{c}, E.N. Solodova^{d}, E.V. Epishina^{d}
^{a}CJSC Nordavind, Moscov, Russian Federation
^{b}LLC Scientific Enterprise «Nordavind Dubna», Dubna, Russian Federation
^{c}Dept. of RadioElectronics Systems, Don State Technical University, Shakhty, Russian Federation
^{d}LLC Scientific Enterprise «Tsezis», Dubna
Abstract
In this paper we present a method for the functional analysis of human heart based on electrocardiography (ECG) signals. The approach using the apparatus of analytical and differential geometry and correlation and regression analysis. ECG contains information on the current condition of the cardiovascular system as well as on the pathological changes in the heart. Mathematical processing of the heart rate variability allows to obtain a great set of mathematical and statistical characteristics. These characteristics of the heart rate are used when solving research problems to study physiological changes that determine functional changes of an individual. The proposed method implemented for uptodate mobile Android and iOS based devices.
Keywords: signal processing, electrocardiography, 3D reconstruction, correlation and regression analysis.
INTRODUCTION
The modern tendency of using mobile devices have become solvation of medical electronic apparatus problems related to automatic analysis of biomedical information to estimate physiological parameters of the human body, to provide informational support to doctor’s diagnostic decisions as well as to automatically diagnose pathological changes of the body. The goal to estimate cardiovascular system is of major social significance where electrocardiography (ECG) plays a key role. ECG represents recording of projections on the body surface of volumetric electronic activity that takes place in the heart [1]. ECG contains information on the current condition of the cardiovascular system as well as on the pathological changes in the heart. The promising direction of the ECG analysis is estimation of the heart rate variability. Mathematical processing of the heart rate variability allows to obtain a great set of mathematical and statistical characteristics. These characteristics of the heart rate are used when solving research problems to study physiological changes that determine functional changes of an individual. For practical purposes it is enough to have 23 quantitative indexes that integrally reflect functional condition of a person and predetermine his/her maximum exercise load. Appearance of mobile devices made it possible to calculate and estimate indexes of the heart rate variability in realtime mode that will allow to properly plan and change the person’s exercise load in time.
To use the advantages of the heart rate variability method when planning the exercise load it is important to understand how the body responses to the stress and to the exercise load. According to the general adaptation syndrome by Hans Selye there are three phases when organisms respond to stress:
 «Alarm» or «Alert phase» is the first reaction of a healthy organism to a new stressor. The heart rate variability (HRV) is decreasing at this stage.
 «Overwork» or «Resistance phase» is the organism’s reaction to disequilibrium in load at a training and recovery. The heart rate variability (HRV) is increasing.
 «Chronical stress», «Overtraining stage» or «Exhaustion». This stage follows if an organism is unable to adapt to chronic stress for a long time. Complete recovery may take up to several months when the exhaustion is serious. HRV is decreasing to the base level (the base level may increase if the training system is aimed at aerobic activity).
Cardiovascular diseases are diseases that may progress implicitly during the whole life and to progress into a chronic stage by the time when the first symptoms arise. Cardiovascular diseases take the first place among all causes of death rate of the population: up to 56,7% of all deaths.
When determining the major courses of development of the national medical radio electronics the main attention is paid to the necessity of creating more and more accurate and sensitive devices including those based on new nontraditional physical principles which is inevitably related to the progressive growth of the price on radio electronic medical devices. At the moment radio electronic medical devices equipment of functional diagnostics consulting rooms (FDCR) of regional, city and central district hospitals is far from optimal. There is also a significant disjuncture between capabilities of radio electronics and its actual use in medicine. Besides electrocardiological electronic devices are indispensable for solvation of some specific diagnostic problems such as heart function monitoring. Thus it is reasonable to make a basis of a diagnostic process a principle of maximum use of capabilities of clinically tested, accessible and lowcost methods of research, one of which is electrocardiography (ECG) [2].
Signal processing today is performed in the vast majority of systems for ECG analysis and interpretation. The objective of ECG signal processing is manifold and comprises the improvement of measurement accuracy and reproducibility (when compared with manual measurements) and the extraction of information not readily available from the signal through visual assessment. In many situations, the ECG is recorded during ambulatory or strenuous conditions such that the signal is corrupted by different types of noise, sometimes originating from another physiological process of the body. Hence, noise reduction represents another important objective of ECG signal processing; in fact, the waveforms of interest are sometimes so heavily masked by noise that their presence can only be revealed once appropriate signal processing has first been applied.
Based on the above, the goal of the research is creation of an effective algorithm which will allow to determine special points of signals of the ECG (received from various deflections) to detect variation from the norm.
METHODOLOGY
ECG is a valuable diagnostic tool. On it is possible to estimate the source (socalled driver) rhythm, regularity of heart contractions and their frequency. All this is importance for the diagnosis of various arrhythmias. For the duration of the various intervals and ECG peaks can be seen on the changes of cardiac conduction [3]. Figure 1 shows one of the example waves and intervals. Intervals and segments: PR Interval: from the start of the P wave to the start of the QRS complex; PR Segment: from the end of the P wave to the start of the QRS complex; J Point: the junction between the QRS complex and the ST segment; QT Interval: from the start of the QRS complex to the end of the T wave; QRS Interval: from the start to the end of the QRS complex; ST Segment: from the end of the QRS complex (J point) to the start of the T wave.

a) 

b) 
Figure 1. ECG waves and intervals
Realizing the essence of ECG it is possible to highlight and offer the following methods of analysis of the heart rate variability.
 Statistical methods. Statistical methods of analysis of the heart rate variability (HRV) refer to the methods of research of temporary area. These methods are used for HRV quantitative estimation in a period of time under study. When they are used a cardiogram is considered as a combination of successive intervals – RRintervals [4].
 Geometricalmethods. Geometrical methods of analysis of the HRV, as well as the described above statistical methods, refer to the methods of research of temporary area [5]. Essence of the variational pulsometry consists in studying RRinterval distribution law as random variables. In addition the variation curve is plotted (the curve of RRintervals distribution  histogram) and its main characteristics are determined.
 Autocorrelation analysis. Calculation and plotting of an autocorrelation function of RRinterval time series is directed at studying the internal structure of these series as an accidental process. An autocorrelation function represents a flow chart of correlation indexes that are obtained during a gradual displacement of the analyzed time series one number further related to its own time series. Physiological sense of using the autocorrelation analysis consists in estimation of the degree of impact of the central control loop to the selfregulating one. Autocorrelogram allows to estimate hidden periodicity of the heart rate.
 Correlation rithmography – stenography/ sterography. This method of estimation of the HRV refers to the methods of nonlinear analysis and is especially helpful for the cases when there are rare and impulsive disorders against the background of rhythm monotonicity. The essence of the correlation rithmography method consists in a graphic representation of consistent pairs of RRintervals (preceding and succeeding) in a twodimensional coordinate surface. Deviation amount of the point from bisectrix on the left shows how much this heart rate is shorter than the previous one, on the right  how much it is longer than the previous one.
 Spectral methods. Spectral methods of the HRV analysis are methods of frequency domain research. They are extremely widely used at the moment. Analysis of the power spectral density of the fluctuations gives information about the distribution of power depending on vibration frequency. Use of the spectral analysis allows to quantitatively evaluate various frequency components of heart rate fluctuations and to graphically represent the correlation of different components of the heart rate that reflect the activity of certain parts of a regulatory mechanism.
 Timefrequency spectral analysis. This promising new movement has been introduced into the practice of heart rate assessment relatively recently (Novak V. and coauthors). A twodimensional representation of the spectrum of heart rate «frequency  power» does not provide information on the dynamics of vegetative correlations in time. When using the timefrequency spectral transformation you can quite clearly observe the phenomenon of displacement of fundamental frequencies in fairly short time frames. This method was the first to show that even under rest conditions the central frequency ranges are of vibrating character when flattened in the time axis [6].
Statistical and geometrical methods as well as spectral analysis require high stationarity for series of RRintervals that imposes restrictions to the electrocardiogram under analysis. This type of analysis may be applied to cardiograms with arrhythmia not more than 10%, providing that parts of the cardiogram with arrhythmia are replaced with parts of normal cardiograms. These methods may neither be used to analyse orthostatic tests that include a transition period (transition from lying position to standing position). These methods were used to analyse the heart rate variability in two groups of people (healthy people and people that suffer hypertension). For both methods comparable results are obtained when estimating condition of the sympathetic and parasympathetic parts of vegetal nervous systems.
In case when there are impulsive disorders against the background of monotonous rhythm usage of a statistical analysis, geometrical analysis or spectral analysis is noninformative. In this case a correlation rithmography or sterography method is of more effective. This method permits to estimate the cumulative effect of regulation of heart rate variability and to estimate characteristics of arrhythmia.
Calculating and plotting the autocorrelation function of the RRinterval time series is aimed at studying the internal structure of these series as a random process. This method allows to estimate slowwave and fastwave components of the heart rate, but it also requires a high level of stationarity of the process under investigation. The method showed the same results as the above listed statistical, geometrical and spectral methods [7].
Usage of classical methods of analysis with the help of autoregression had no effect due to bad matrix condition arising from the analyzed basic data. The autoregression may be used in case of modification of these methods subject to bad condition of the basic data. Development of the abovementioned modified methods is expected.
Usage of spectral, statistical, geometrical and autocorrelation analysis for people with an unknown diagnosis, as well as development of autoregression modified methods due to bad condition of the basic data will be subject of further research.
Only the timefrequency analysis can be applied to analysis orthostatic tests [7]. It is less sensitive to stationarity, since the source is split into a number of quasistationary series of 30 seconds duration. The resulting threedimensional graphics provide a unique opportunity to see the drift of the central frequency and the amplitude changes of low and high frequency components of the spectrum in time. Such information contributes fundamentally new ideas about the influence of the sympathetic and parasympathetic nervous systems on the cardiac pacer. Visualization of threedimensional frequency representation of the picture that the timefrequency analysis offers is equally important for the work of a physiologist and clinicist. The real opportunity to see the rapidly changing vagosympathetic relationship can be a powerful tool to further study autonomic regulation of heart.
In summary we note that the method of correlation rithmography which is one of the methods of nonlinear analysis is the most useful for cases where impulsive disorders arise against the background of monotonous rhythm that are caused by a defect record, by emergence of various noises or by the occurrence of various arrhythmias.
ALGORITHM
Traditional automated algorithm of ECG analysis shown at the figure 2:
Figure 2. Algorithm of ECG analysis
The proposed algorithm for automatic ECG analysis includes the following standard steps:
 Digitization and filtering.
 Regions recognition of ECG (detection QRS, PQ, QT, waves and intervals).
 Analysis of the parameters for the appraisal report.
Application of pattern recognition algorithms for automatic analysis of electrocardiograms predicts good quality results. In this case, the development of algorithms for analysis shall be based on their further use, as in stationary systems, and as part of different mobile systems (for example, on a smartphone).
In order to identify the best and most effective way to ECG analysis considered the following algorithms:
 The algorithm for detecting QRScomplexes, as well as the parameters P, Twave (peak positions, the start and end points of the waves) [8].
 The algorithm for detecting peaks P, T, R, boundaries QRS (without peaks Q, S), the boundaries of the waves P, T [9].
 The algorithm for detecting the initial border QRScomplexes [10].
 The algorithm for detecting the start and end boundaries of QRS complexes (i.e., does not determine the peaks Q, R, S) [10].
 The algorithm for detecting the start and end boundaries of QRS complexes, as well as the peak position R [11].
 The algorithm for detecting peaks P, Q, R, S, T [12].
 The algorithm for detecting peaks Q, R, S [12].
 The algorithm for detecting peaks R, S, T, and calculating heart rate [4].
 The algorithm for detecting peak R [4].
 The algorithm for detecting peaks R, S [12].
All the above algorithms are designed to detect exceptional points of ECG which will allow to determine deviations from the norm. We have performed a comparative analysis of the following characteristics: methodology, noise tolerance, accuracy in detecting special points, adaptability, adjustment ability, the range of the used frequencies, the processing time, as well as arising problems (when the result of running the algorithm is not consistent with the stated in the description).
We used a multiparametrical database and an ECG database to perform the comparative analysis of algorithms. The analysis of the processing results shows that most algorithms have high accuracy in recognition of special points of the ECG. All algorithms are also resistant to noises. The processing time and arising problems are the main characteristics that were compared. Thus, after testing the described algorithms based on PhysioBank which contains a large number of ECG recordings, as well as after conducting a comparative analysis of various characteristics Algorithm 1 turned out to be the most appropriate. It offers the shortest processing time of the signal and it neither has any problems in detecting special points.
To implement the mobile health system for an individual electrophysiological diagnosis of cardiovascular diseases a generalized algorithm is developed. It allows to solve the problem of making an ECG, its assessment and analysis without an operator, which algorithm is shown at the figure 3.
Figure 3. The algorithm for individual electrophysiological diagnosis of cardiovascular diseases for mobile medical system
 The proposed algorithm is implemented as follows:
 Registration ECG signals with automatic cardioscope.
 Choosing the coefficients for filtering method while maintaining peaks form according to the analysis of the results received electrical rhythms.
 Identification of the electrical axis of the heart on the analysis results produced and purified cardiograms.
 Comparison of the provisions of the electrical axis of the heart obtained in the previous step, and if the threshold is adopted rule change in the parameters of the method of filtration.
 Automated allocation of amplitudes and durations of peaks P, Q, R, S, T, U based on analysis of the ECG.
 Determination of heart rate variability with subsequent determination of the angle of the EOS.
 Interpretation of the results based on ECG data obtained at the previous stages. Classification and decisionmaking on normal, borderline, pathological or erroneous interpretation. A determination of the following classes:
 Rhythm classification
 Definition of supraventricular extrasystole;
 Definition of ventricular extrasystole;
 Definition of contraction(s) with aberrant ventricular conduction;
 Definition of sinus rhythm;
 Definition of sinus arrhythmia;
 Definition of supraventricular arrhythmia.
 Definition of sinus bradycardia. Supraventricular tachycardia
 Definition of nodal rhythm;
 Definition of idioventricular rhythm;
 Definition of ventricular tachycardia;
 Definition of auricular fluttering/atrial fibrillation.
 Pathology in atrium function:
 Definition of negative ending phase of the P wave in V1;
 Definition of maximum negative range in V1;
 Definition of range of P waves in lead II;
 Definition of P range in lead III;
 Definition of P range in lead aVF;
 Definition of PR interval prolongation.
 Definition of volt characteristics. Definition of QRS amplitudes intervals of the full vibration range in leads I, II, III and the difference between the amplitudes of the full vibration range of QRS in V4  V6 and minimum QRS amplitudes in leads V1  V3.
 Detection of block classification:
 Definition of right bundle branch block.
 Definition of incomplete right bundle branch block.
 Definition of left bundle branch block.
 Definition of incomplete left bundle branch block.
 Definition of nonspecific intraventricular block.
 Definition of intraventricular conduction delay.
 Definition of left anterior fascicular block.
 Definition of left posterior hemiblock.
 Definition of bifascicular heart block.
 Detection of malfunction of the QRS.
 Detection of myocardial infarction.
 Detection of STT morphology, pathology detection.
 Detection of QT interval.
 Detection of QRSamplitude.
 Detection of ST&T.
 S1,S2,S3 syndromes.
 WPW syndrome, type А.
 WPW syndrome, type В.
As algorithms reduce the effect of the noise component, can use methods based on wavelet transformation, Wiener filtering, Kalman filtering, frequency analysis, rank methods of digital nonlinear methods based on the L, R, M estimations and other. In the case of a limited amount of a priori information about the statistical characteristics of the noise component, the use of these methods is impossible or very limited. As true information used ECG obtained using the cardioscope in an environment with electromagnetic interference. Noise component will vary depending on the location of the patient, and have a random distribution of different densities.
As a method of determining the position of the electrical axis of the heart can be used approaches based on the analysis of the ratio of positive and negative values of the peaks of the complex QRS. EOS position is determined on the basis of ECG data. As an additional criterion in this paper we propose an approach for calculating the double analysis of filtered ECG.
As a possible approach to the definition of segments and peaks P, Q, R, S, T, U on the ECG may use information about the amplitude and time parameters of the peaks.
Heart rate variability can be carried out based on the analysis of amplitudetime parameters of the peaks. As a criterion for evaluation of possible use of pattern recognition algorithms applied to ECG signals based on artificial neural networks, statistical methods, and others.
The developed algorithm can be implemented on the basis of the block structure, with the possibility of replacement of the unit. In connection with the building blocks based on different techniques will vary correct detection efficiency due to low computational cost required to implement them.
IMPLEMENTATION AND EXPERIMENTAL RESULTS
The practical implementation of the above proposed estimation algorithms implemented in the variability of the analytical part cardioscope "RHYTHM". Mobile cardioscope "RHYTHM" an innovative device for the individual assessment of the cardiovascular system and the diagnosis of diseases at an early stage of development in the home.
Mobile cardioscope consists of several parts:
 Measuring part:
 electrodes;
 measuring device, readings from sensors and sends the data over the wireless bluetooth technology to a smartphone.
 The analytical part of the analysis of measurement results and the establishment of the preliminary diagnosis:
The proposed device measures the ECG data in real time and transfers them on a smartphone or the server then gives information about the state of the cardiovascular system as well as a recommendation to see a doctor.
Scheme of the proposed system is shown at the figure 4.
Figure 4. The scheme of the proposed system
Functional capability of the cardioscope in its basic version:
 Viewing the ECG in real time;
 Analysis of the results of the ECG to detect violations;
 Calculation of the heart rate;
 Issue of an automatic report with information;
 Keeping a diary of events;
 Keeping the report in a pdf format and sending it by email.
Functional capability of the advanced version:
 Detection of cardiac arrhythmias and hypertrophy;
 Keeping an audiodiary of the events;
 Browsing previously recorded ECG data with the ability to rewind;
Functions for sports:
 Calorie consumption per a training session;
 Speed of the heart rate recovery;
 Determination of the individual heart rate zone training load
Functions if you are feeling anxious:
 An automatic call to a relative with an audio message of the user’s coordinates;
 An automatic SMS to a friend with the user’s coordinates.
Figure 5 shows screenshots of the analytical part cardioscope "RHYTHM".



Start screen 
The screen of the current study 
Screen viewing online cardiogram 


Screen studies 
Screen editing a user profile 
Figure 5. Screenshots of the analytical part cardioscope "RHYTHM"
The mobile cardioscope "RITM" has the following advantages: the ability to be used by people without medical and technical education, low price. As normal ECG parameters used the values shown in Table 1.
Table 1. Normal values of ECG
Heart rate 
60  100 bpm 
PR interval 
0.12  0.20 s 
QRS interval 
≤ 0.12 s 
QT interval 
< half RR interval (males < 0.40 s; females < 0.44 s) 
P wave amplitude (in lead II) 
≤ 3 mV (mm) 
P wave terminal negative deflection (in lead V1) 
≤ 1 mV (mm) 
Q wave 
< 0.04 s (1 mm) and < 1/3 of R wave amplitude in the same lead 
After analyzing the basic version via cardioscope RHYTHM data during recovery from sports load and compare the results with the theory we can conclude that the majority of the dynamic change of heart rate variability is a simple math graphs, which allow sufficiently clearly to draw conclusions about the dynamics of changes in the functional state of an athlete.
Positively correlated with an increase in functional state: Mean RR, SDNN, RMSSD, NN50, pNN50, RR Triangular index; HF (absolute, %, % in N.U.), Total Power; SD1, SD2. Negatively correlated with the growth of the functional state: Mean HR, TINN; LF (% in N.U.); [SD2SD1], a1, ShanEn, Lmax, REC, DET.
For some ВСР was found a clear relationship. For their study needs further collection of statistics and deeper acquaintance with the medical theory. Unexplored indicators of ВСР: STD HR; %LF (absolute, %), %VLF (absolute, %), LF,HF Peaks, LF\HF; a2, [a2a1], D2, ApEn, Lmean.
CONCLUSION
In this paper we present a method for the functional analysis of human heart rate variability based on electrocardiography signals for the planning exercise. The approach using the apparatus of analytical and differential geometry and correlation and regression analysis. For the reconstruction of the mathematical tools we used geometric and deformation modeling curvilinear forms of higher order. Method implemented for uptodate mobile Android and iOS based devices.
Allocated general information about heart rate variability, as well as the necessary tools for its monitoring, recording and mathematical analysis, examined and explained mathematical indicators of heart rate variability, suggested practical application and analysis of heart rate variability in sports practice. Thus, even with the help of the basic version cardioscope rhythm, made possible the calculation and assessment of heart rate variability in real time for timely adjustment of the physical load of man.
ACKNOWLEGEMENT
This work was supported by Russian Ministry of Education and Science in frame of the Federal Program "Research and development on priority directions of scientifictechnological complex of Russia Federation in 20142020" (contract № 14.576.21.0083).
REFERENCES
 Sornmo, L. and Laguna, P., “Bioelectrical Signal Processing in Cardiac and Neurological Applications,” Amsterdam: Elsevier (Academic Press), (2005).
 Rosenbaum, D.S., Jackson, L.E., Smith, J.M., Garan, H., Ruskin, J.N., and Cohen, R.J., “Electrical alternans and vulnerability to ventricular arrhythmias,” N. Engl. J. Med, vol. 330, pp. 235–241 (1994).
 Macfarlane, P.W. and Lawrie, T.D.W., “Comprehensive Electrocardiology. Theory and Practice in Health and Disease,” New York: Pergamon Press, vol. 1, (1989).
 Shen, T.W., Laio, T.F., “Image processing on ECG chart for ECG signal recovery,” Computers in Cardiology, pp. 725728 (2009).
 Kostic, M.N., Fakhar, S., Foxall, T., Drakulic, B.S., Krucoff, M.W., “Evaluation of novel ECG Signal Processing on Quantification of Transient Ischemia amd Baseline wander suppression,” Conf Proc IEEE Eng Med Biol Soc, pp. 199202 (2007).
 Huang, Jian, Sopher, S. Mark, Leatham, Edward, Redwood, Simon, Camm, A. John, Carlos, Kaski Juan, “Heart rate variability depression in patients with unstable angina,” American Heart Journal, Vol. 130, Issue 4, pp. 772–779 (1995).
 Guzzetti, S., “Different spectral components of 24 h heart rate variability are related to different modes of death in chronic heart failure,” Ibid, vol. 26, pp. 357–362 (2005).
 Abramov, S. K., Lukin, V.V., Astola. J.T., “Myriad filter properties and parameter selection” Proc. of the Fifth AllUkrainian international conference UkrOBRAZ'2000, pp. 59–62 (2000).
 Aisha, S.S., Abeelen, M., David, M., “Simpson Betweencentre variability in transfer function analysis, a widely used method for linear quantification of the dynamic pressureflow relation: The CARNet study,” Medical Engineering and Physics, vol. 36, issue 5, pp. 620–627 (2014).
 Hermosillo, A.G. “Effects of delayed recanalization of an occluded acutemyocardial infarctionrelated artery using coronary angioplastyon late potentials,” Coron. Artery Dis, vol. 6, № 2, pp. 169–177 (1995).
 Hohnloser, S.H., “Reflex versus tonic vagal activity as a prognostic parameter in patients with sustained ventricular tachycardia or ventricular fibrillation,” Circulation, vol. 89, pp. 1068–1073 (1994).
 Huikuri, H.V., “Fractal correlation properties of RR interval dynamics and mortality in patients with depressed left ventricular function after an acute myocardial infarction,” Circulation, vol. 101, pp. 47–53 (2000).