Methods of Comparing ECG Reconstruction - Semantic Scholar

2 downloads 379 Views 222KB Size Report
The final code in MATLAB is mentioned next. ... MATLAB code for calculation of average interval: ... It is possible to calculate PSD like frequency specter from.
Methods of comparing ECG reconstruction Michal PRAUZEK ([email protected]), Marek PENHAKER ([email protected]) Faculty of Electrical Engineering and Computer Science, Department Measurement and Control 17. listopadu 15, 708 33 Ostrava – Poruba VSB – Technical university of Ostrava Ostrava, Czech Republic

Abstract—The paper describes methods of comparing calculated ECG signal with real signal. Five examination methods of ECG-signal reconstruction from reduced system were proposed in this description. These methods prove reconstruction and evaluate results. They are based on statistic methods, nonparametric approaches and autoregressive models.

It can be used theorem for central quadratic variance, demonstrates the difference between the original and reconstruct signal. x(n) − y(n) (2) δ(n) = 1 n k=1 |x(k)| n

I. I NTRODUCTION Electrocardiogram (ECG) is a classical diagnostic method of heart activity. Medical doctors use 12–leads system to the diagnostics as a rule. However, it is very demanding with regard to the calls on measuring because 10 electrodes are placed on the patient. This fact is mainly unpleasant in term of long-time reading. It also interesting to apply reduced potentials of ECG. See [3] and [1].

Quality coefficient is shown in the end:

II. R EDUCED ECG — BACKGROUND With regard to the ECG reading, the idea of the reduced measuring appears interesting because it is possible to reconstruct leads of classic ECG while engaging of 5 electrodes. To this reconstruction it is possible to make the best of modern computer technologies such as a field-programmable gate array. Output for the medicals doctors is a portrayal of the classical leads, with the help of which it is possible to diagnose dysfunction of heart. In 2000 Philips Company or more precisely Agilit and Hewlett Packard Company started to develop a new kind of ECG. This research was based on the principle of the work of the worldwide past master in the field of cardiographs Dr. Gorgon Dower. The main difference between EASI ECG and standard 12-leads system ECG is that the EASI ECG offers all twelve signals from the heart which are up–to–date all the time in contrast to the standard ECG. See [2]. However, the Philips EASI is a corporate system developed on the base of cardiac study. Our idea is different, it is to estimate reduced ECG by neural networks and other modern computer technologies and to compare them by methods mentioned in this paper. III. M ETHODS OF COMPARING ECG A. Method of absolute average There is shown an original signal x(n) and a reconstruct signal y(n). The n is discrete steps number of sampling. Then, it is possible to qualify z(n). The z(n) is difference between original and reconstruct signal. z(n) = x(n) − y(n)

(1)

n

κ=

1 (δ(i)2 ) n i=1

(3)

The final code in MATLAB is mentioned next. %theorem for central quadratic variance %input vectors X and Y Z=X-Y; Xn=length(X); Xs=sum(abs(X)); delta=Z./(Xs/Xn); kapp=sum(delta.*delta)/Xn B. Method of average interval The fvz is a sampling frequency of the measured signal. It is possible to choose T which divide signal to same time sequences t. T (4) t= fvz There are shown the original signal x(n) and the reconstruct signal y(n). The n is discrete steps number of sampling. It is possible to calculate number of discrete steps N in time sequence t: 1 fvz = (5) N= T t Average value of interval signal x(n) and y(n): k∈N

(6)

(a, b) = (N (k − 1) + 1; kN ) b b |x(i)| − i=a |y(i)| δ(k) = i=a b i=a |x(i)|

(7) (8)

Final result is average of intervals: κint =

k 1 δ(i)2 k i=1

MATLAB code for calculation of average interval: %method of average interval

978-1-4244-4134-1/09/$25.00 ©2009 IEEE

(9)

from independence. In this broad sense, there are several coefficients, measuring the degree of correlation, adapted to the nature of the data. A number of different coefficients is used for different situations. The best known is the Pearson product-moment correlation coefficient, which is obtained by dividing the covariance of two variables by the product of their standard deviations. See [5].  1 T /2 f (t)dt (12) R(τ ) = T −T /2

%input vectors X and Y T=10 fvz=256 k=1 kappatemp=0 N=floor(fvz/T) kmax=floor(length(X)/N) while k ˜= kmax a=sum(abs(X((k-1)*N+1:k*N))) b=sum(abs(Y((k-1)*N+1:k*N))) delta=(a-b)/a kappatemp=kappatemp+delta*delta k=k+1 end kappain=kappatemp/kmax The whole method depends on the right choice of coefficient T . If it chosen T as low, the method is affected by electric disturbance in measure signal, but if T is chosen as big, the method is not predicative. C. Method of angle between two vectors Two vectors can be considered orthogonal if their dot product is zero and they have non-null length. This property provides a simple method to test the condition of orthogonality. Sometimes these properties are also used for defining the dot product, especially in 2 and 3 dimensions; this definition is equivalent to the above one. the formula can be used to define the concept of the angle for higher dimensions. This can be used in comparing of two signals. U.V = ||U||.||V||.cosα

In mathematics, the Fourier transform is an operation that transforms one function of a real variable into another. The new function, often called the frequency domain representation of the original function, describes which frequencies are present in the original function. See [5].  1 T w(ω) = f (t).e−jωt dt (13) T 0 In statistical signal processing and physics, the spectral density, power spectral density (PSD), or energy spectral density (ESD), is a positive real function of a frequency variable associated with the stationary stochastic process, or a deterministic function of time, which has dimensions of power per Hz, or energy per Hz. It is often called simply the spectrum of the signal. Intuitively, the spectral density captures the frequency content of a stochastic process and helps to identify periodicities. See [5].

(10)

Where the α is angle between vectors U and V. Then, it is possible to calculate: cosα =

U.V ||U||.||V||

(11)

The MATLAB code for calculating angle: %vectors definition A=sum(abs(X.*Y)) B=sum(abs(X)) C=sum(abs(Y)) %angle computing angle=A/(B*C) D. Method of power spectral density In probability theory and statistics, correlation (often measured as a correlation coefficient) indicates the strength and direction of linear relationship between the two random variables. In our case we have two gnals, which come from one source — the heart. In general statistical usage, correlation or co-relation refers to the departure of two random variables

Fig. 1.

Original signal A

It is possible to calculate PSD like frequency specter from the autocorrelation function:  1 τ S(ω) = R(τ ).e−jωτ dτ (14) T 0 There are two signals in figures, figure 1 is the original ECG signal and figure 2 is the signal of reconstruction. Differences can be seen in amplitude and shape of signal, but they are signals with the same information criteria from the same source.

Fig. 2.

Reconstruct signal B

Fig. 3.

Specter of signal A

In figures 3 and 4 specter of biosignals can be seen FFT, if it possible to compare this specters, there is shown spectral difference of signals. E. Method of comparing autoregressive model In statistics and signal processing, an autoregressive (AR) model is a type of the random process, which is often used to model and predict various types of natural phenomena. Nonparametric methods of frequency analysis are based on band filters. However, parametric methods are based on the calculation time variances of autoregressive model. See [4]. The same signal as an example like in the case of nonparametric approach. Next methods use the Levinson’s algorithm for estimate time variances of the autoregressive model. The order of model was calculated with the help of the Akaike criterion. There are in figures 6 and 7 PSD of parametric approach. There can be seen in figure 8 between both signal. The signal B has low energy that corresponds with the amplitude information, but frequency shape is very similar to the both signals.

Fig. 4.

Fig. 5.

Specter of signal B

Specter of signal A and B

IV. C ONCLUSION It is impossible to say which methods are better or more useful, everything depends on interpretation of results. The statistical methods are useful for comparing in a shorttime interval. The method of absolute interval is impracticable in long time reading, because occurrence of disturbance in low signal sequences is devastating for this method. This complaint can be particularly brought down by the method of average interval. The method of the vector’s angle can be used as verification of statistical data analysis. A different situation is in frequency analysis. These methods are more suitable for the long-time reading. Fourier’s methods can be used for elimination of frequency artifacts. The parametric methods are better for appreciation aspect of energy value and complex signal specter. The reconstruction methods can be improved after the comparing of signal and then results can be confronted with new reconstruction.

Fig. 6.

Parametric specter — signal A

Fig. 7.

Parametric specter — signal B

ACKNOWLEDGMENT This work was supported in part by grant GACR 102/05/H525, EZ project, and by the faculty internal project Biomedical engineering systems IV. R EFERENCES [1] Malmivuo, J., Plonsey, R. Bioelectromagnetism, Oxford University, New York, 1995. ISBN 0-19-505823-2 [2] Philips Philips Patient Monitoring ECG [on-line], Last revision 200802-16, URL: http://www.medical.philips.com [3] Prauzek, M. Measurement of reduced ECG, page 12, Gradual work on VSB-Technical University of Ostrava, Department of measurement and control, Ostrava 2008. [4] Tuma, J. Parametricka metoda vypoctu frekvecnich spekter signalu, page 1, 7th International Scientific — Technical Conference — PROCESS CONTROL 2006, June 13 -- 16, 2006, Kouty nad Desnou, Czech Republic. [5] Wikipedia Spectral density, Dot product, Fourier transform, Last revision 2008-11-16, URL: http://en.wikipedia.org/wiki/

Fig. 8.

Parametric specter — signal A and B