Mathematical modeling of EKG feature spectra, and synthesis of the EKG signal as the interaction of multiple bandpass filters.

Here is a component software system which models the EKG signal as the sum of the inverses of the first 3 feature spectra calculated on the previous page. Each feature is generated independently of the others by first modeling the spectrum as a simple mathematical function (shown below), and then performing the inverse Fourier transform on a Hermitian filter derived from that function. The overall signal is then the sum of the 3 synthetic features.

(Click for larger image)

Here is the result of the above synthesis. Each feature is shown at the top left. The spectrum magnitudes of each feature, as derived on the previous page and then fitted to an exponential function of 2 parameters, are shown at right. The complete synthetic signal is in the middle, and the actual EKG signal is shown at the bottom. The first 3 feature components correspond respectively to the T "wave", the QRS "complex", and the P "wave" of the EKG.

(Click for larger image)

Note the high degree of fit between the synthetic and actual signals, for just the first 3 out of 7 feature components. Compare this to the fairly low degree of fit for the first 3 (and more) Fourier series components, shown on a previous page. Note also that while the Fourier series components attempt to fit the entire signal at once, the feature components each fit only one part of the signal at a time, independently of other components.

The accurate reconstruction of the EKG signal from a small number of independent features tends to confirm the hypothesis that the EKG in the living heart may be the result of the impulse responses of several independent band-pass filters operating in parallel. This is considerably different from the hypotheses that the EKG signal is either the result of several endogenous oscillators operating together in lock-step, or is the result of a single global chaotic attractor.

The function used to fit each feature spectrum is the following exponential:

for the two parameters a and b. Parameters computed for the first 3 features are:

The phase of each filter is given by a single parameter which is the slope of the phase line:

The value pi/2 is added to each phase because, while the frequency-delay analysis uses a filter which is a sine pulse, the real part of the inverse Fourier transform is given as a cosine series (from Euler's relation exp(i w) = cos(w) + i sin(w)). Thus, adding pi/2 to each phase line maps the sine function into the cosine, and yields a completely real inverse Fourier result.

Phase parameters computed for these features are the following:

It should be noted that, as in the reconstruction of the EKG via the Fourier series, each component of the signal is parameterized by 3 real numbers. Thus, the first 3 feature components require 9 numbers to describe the signal. By comparison, an accurate fit via the Fourier series requires on the order of 90 values, or 10 times as many. For a signal consisting of 256 points, the first 3 feature parameters provide a compression ratio of 256/9 = 28.44, which is fairly high.

The exponential listed above is not, of course, the only function which could be used to model the feature spectra. I have tried many other functions (including black-body radiation functions), but have found that the equation listed appears to be the simplest 2 parameter function which yields acceptable results.

To study the behavior of this modeling function, and others, I have created the following component software system:

(Click for larger image)

This system allows one to change the parameters of the fitting function interactively and continuously in order to see what effect this has on the inverse Fourier transform, and therefore on the synthesized signal. Changing the value of the b parameter of the spectrum magnitude changes the width of the sine pulse produced. Changing the value of the phase line slope rolls the synthetic feature along the length of the signal.

Decreasing the value of the b parameter increases the spectrum bandwidth, and thus decreases the time width of the synthetic feature, as is expected.

Another fitting function which shows promise for modeling EKG features is the following:

By increasing the exponent of the first x above 1, the sine pulse feature can be changed into a sine "packet", consisting of one or more cycles bounded by an envelope. This parameter may therefore be useful in modeling QRS features which contain a pronounced Q "wave", or initial downstroke of the EKG trace, or those which lead into an elevated S-T interval. This wave "packet" may also be used to model RSR "inversion" of the QRS which occurs in traces acquired from leads superior to the standard V1-6 locations, or in cases where bundle branch block is suspected.

©Copyright Sky Coyote, 2001-2002.