Simplified Mathematical Model For Genera
Simplified Mathematical Model For Genera
ICME11-RT-001
ABSTRACT
ECG models are complex and their computational time is high. In this paper, we propose a Gaussian
wave-based model which can simulate ECG wave as well as P, Q, R, S and T waves individually. In
addition, this model is capable of simulating various kinds of practical phenomena. The coefficient of the
model was calculated by nonlinear least square technique using Gauss-Newton algorithm. In order to
evaluate the effectiveness of the model, different kind time domain and frequency domain techniques such
as PSD and MSC were used. The goodness of fitting was calculated using MSE, NMSE, RMSE, NRMSE
and PRD and compared with real and model ECG signal. The lower value of these error and higher
cross-correlation coefficient of 0.9208 between model and real ECG indicates the outstanding performance
of the model. The model is also successful in generating noisy ECG signal.
Keywords: ECG Signal, Gaussian Wave, Nonlinear Least Square Technique, Goodness Of Fitting
2
[10]
S( f )
component of ECG wave have following parameter: Mi
f
is height of curves peak, ti is the center position of the (7)
peak and Wi controls the width then ECG components
Where f is the frequency, is the variance of the
can be written as 2
t P
2
2W
original signal and β is the slope; a measure of noise color.
White noise (β=0), pink or flicker noise (β=1), and brown
P wave : M P e P
(1)
t
noise or the random walk process (β=2), are three of the
t Q 1
2 2
2W
MQ 2 e
most commonly referenced noises .White noise and color
2WQ
Q2
S wave : M S e
is common in ECG. Muscle noise is, in contrast to
2WS baseline wander and 50/60 Hz interference.
(4)
t T
Mechanical movement of recording electrodes or skin
2
2W
stretching results in changes in potential. Due to
alteration in the physical dimensions of the
T wave : MT e T
(5)
electrode-skin half cell thus modifying cell potential and
Simply the general equation (1-5) can be written as skin-electrode impedance [12]. The proposed model is
M e
t tij
tested on the ECG data recorded from BIOPAC data
t ti
d
2
j 2
2
Mi e
2 wi wij
fi
i acquisition system [13]. The noisy signal was generated
dt
by adding BW, EM, and MA artifacts (Noise Stress Test
iQ , j 1
ij
iP , R,S ,T
(6) Database of MIT-BIH) and white and color noise were
added to the clean ECG signals [12].
N j ,SNR(t ) 3. MATERIALS AND METHODS
d
In Eq. (6), depend on i.
i 3.1 ECG
dt
The experiment is performed to collect the data for
this research work. The subject is a male of 26 years old
© ICME2011 2 RT-011
red lead on the left leg and the black lead was placed on required to solve this problem.
right leg as shown in Fig. 2. Subjects was seated in a chair Consider that an ECG function y= f(x) of a variable of
relaxing and asked to be as still as possible to ensure x tabulated at i values, where y1=f(x1),
lower motion artifact and EMG signal on the data. After y2= f(x2)……………yi = (xi ). Moreover, assume that the
equation will be
d k d dl
j
df
(10)
l 1 l
xk
Fig 1. (a)MP36 Biopac (b)Placement of lead in ECG This element can be written as a i j matrix of partial
measureemnt. derivatives of
d1 d j
df df
.... .... .....
3.2 Preprocessing
x1 x1
The acquired ECG data are preprocessed to remove
d1 d j
noise, artifacts, and baseline wander using df df
.... .... ....
Akl
(11)
Savitzky-Golay Filtering [13]. To this end, two x2 x2
frequency-selective fourth-order Butterwort filters [14]
are used: one high-pass filter with cutoff frequency at
0.5Hz and one low-pass filter with cutoff frequency at 90
d1 d j
df df
.... .... ....
xi
Hz. To suppress the interferences from the power line
xi
grid, a notch filter centered around 50 was used. Again,
this filter is implemented as a fourth-order Butterworth Then,
d k Akl dl
filter like [15].
As from the properties of Gaussian wave it is known (12)
that, the wave do not cross the zero. But P, Q, R, S and T
waves cross the zero line in the real ECG signal. To solve And the brief equation is
d Ad
this zero crossing problem 0.05 was added to real ECG
signal before calculating the coefficients, so that the (13)
baseline of real ECG lies in zero line.
If by defining a= ATA and b= AT dβ
3.3 Nonlinear Fitting
a d b
We find,
For fitting the mathematical model with the real world
© ICME2011 3 RT-011
[ x(n) x
iteration. N 1
2
m ( n)]
NMSE n 0
[ x(n)]
(18)
N 1
3.5 Performance Evaluation Parameters
3.5.1 Coherence 2
n 0
The magnitude squared coherence (MSC) estimate is a
function of frequency with values between 0 and 1 that Another measurement is Root Mean Square Error, which
indicates how well the model ECG corresponds to real
[ x(n) x
is
N 1
ECG at each frequency. The MSC estimate Cxy of the
RMSE
input signals (x and y) using Welch's averaged, modified 1 2
m (n)] (19)
n 0
periodogram method [17]. The MSC is nothing but a N
function of the power spectral densities (Pxx(f) and Pyy(f))
of x and y and the cross power spectral density (Pxy(f)) of
[ x(n) x
x and y. The Normalized version of RMSE is
N 1
Cxy
2
2
Pxy ( f ) m ( n)]
NRMSE n 0
[ x(n)]
(15) (20)
Pxx ( f ) Pyy ( f ) N 1
2
n 0
In this paper; x, y represents the model and real ECG Percent Root Mean square Difference (PRD) can be
signal respectively and x and y must be the same length.
[ x(n) x
determined by Eq. (26).
N 1
3.5.2 Power spectral density (PSD) m ( n)]
2
PRD n 0
100%
[ x(n)]
PSD represents the strength of the energy as a (21)
function of frequency [17].In other words, it shows at N 1
2
which frequencies variations are strong and at which
n 0
frequencies variations are weak. Energy can be obtained
within a specific frequency range by integrating PSD
within that frequency range. Computation of PSD is done 4. RESULT AND DISCUSSION
directly by the method called FFT or computing The coefficient of the model is calculated by
autocorrelation function and then transforming it. nonlinear least square technique using Gauss-Newton
algorithm having 95% confidence level and the
3.5.3 Cross-correlation coefficient coefficient are shown in Table 1.
If x(n) be the recorded or collected ECG signal and
xm (n) be the ECG signal generated by the mathematical Table 1: Coefficient to fit the model with BIOPAC
recorded ECG
model, then cross-correlation coefficient ρ between
ECG Coefficient
x(n) and xm (n) is given by [18] Component Ai Bi ti
[ x(n ) x ][ xm (n ) m ]
P 0.185 17.8 236.9
-0.1103 30.64 26.8
x m
j=1
(16) Q
j=2 -0.1075 5.705 76.23
R 50 29.87 55.71
Where denotes the average calculated by S 0.509 9.09 11.9
summing over the observed time series, indexed by n. T 0.3255 29.78 154.3
0.4
3.5.4 Error Assessment:
[ x(n) x
0.2
The Mean Square Error (MSE) is defined as [19].
N 1
MSE
0
1 2 (17)
m (n)]
n 0
N -0.2
-0.6
0 100 200 300 400 500 600 700 800 900
Samples
© ICME2011 4 RT-011
To evaluate the performance of the model, goodness of (Slow heart rate), Tachycardia (Fast heart rate) etc. From
fitting was calculated using Eq. (17) ~ Eq. (21) and the Fig. 5, brachycardia was simulated for 5 sec possessing 4
values are given in Table 2. It is observed that, the values beat. So the beat per minute (BPM) was 48. Sinus rhythm
of different errors were quite low and the value of and tachycardia were simulated in the same way.
cross-correlation coefficient was 0.9205 which indicated
the highly correlation between the real and model ECG.
Goodness Value
of fitting (BIOPAC)
MSE 0.00779
NMSE 0.172477
RMSE 0.0882615
NRMSE 0.029748
PRD 2.974839
The model was not only evaluated in the time domain but Fig 5. ECG simulation by model for 5 Sec. For
also in the frequency domain. Figure 3 and Fig. 4 showed brachycardia with BPM 48, sinus rhythm with BPM 72,
the power spectral density (PSD) and magnitude square tachycardia with BPM 108.
coherence (MSC) respectively. In Fig 3, the model and
real ECG are reasonably similar and the MSC in fig 4, Another feature of the model is that, it can generate
was exists 1 in most of the frequencies which is a better realistic and simulated noisy ECG signal. N j ,SNR(t ) of
indication of the proposed model.
Eq. (6) indicates the noise parameter of the model.
Power spectral density Different noisy ECG signal (different j) were simulated
0.25
Model ECG for the input SNR of 3dB in fig 6.
Real ECG
0.2
1.5
White noise Colored noise
1
0.15 0.5
PSD
0.1 -0.5
-1
1.5
Real muscle artifacts Real electrode movements
0.05 1
0.5
0
0
0 10 20 30 40 50 60 -0.5
Frequency (Hz)
-1
1.5
Real baseline wander Composite noise
1
Fig 3. Comparison of power spectral density between 0.5
real and model ECG signal. 0
-0.5
1 -1
0 2000 4000 6000
0 2000 4000 6000
Sample Sample
0.9
Fig 6. Different types of noisy ECG signal.
0.8
0.7 5. CONCLUSION
0.6 The proposed model is capable of replicating many
important features of the human ECG wave. A number of
MSC
0.5
© ICME2011 5 RT-011
fitting the model with individual subject’s ECG. of fractal signals from noisy measurement using
This can be used for further analysis and for wavelets” ,IEEE Trans. Signal Process., vol. 40, no.
© ICME2011 6 RT-011