# Patent

## Title
Methods, systems and devices for detecting and diagnosing diabetic diseases and disorders

## Abstract

Disclosed herein methods, devices, and systems for detecting and diagnosing a diabetic disease or disorder in a subject from a prime electrocardiogram which comprises calculating at least one distribution function of the prime electrocardiogram and determining whether the distribution function is indicative of the presence of absence of the diabetic disease or disorder.

## Background
CROSS-REFERENCE TO RELATED APPLICATIONS
This application claims the benefit of U.S. Patent Application No. 61/612,858, filed 19 Mar. 2012, which is herein incorporated by reference in its entirety.


BACKGROUND OF THE INVENTION
1. Field of the Invention
The present invention relates to the field of detecting and diagnosing diabetic diseases and disorders using electrocardiogram analysis.
2. Description of the Related Art
For over a hundred years since the invention of the electrocardiograph which produces a graphical recording (i.e., an electrocardiogram (ECG) which may be recorded on paper or stored as electronic data) of electrical activity of a heart over time. In the prior art there are two main perspectives in the study of the heart's electrical signals: (1) morphology, the meaning of the different deflections that appear to repeat from beat to beat, and (2) rhythm (or arrhythmology as used herein), the meaning of the different periodicities of these signals. Morphology is the study of electrocardiograms and is focused on the detection of muscular or conductional abnormalities within a beat such as myocardial ion exchange abnormalities, myocardial ischemia, hypertrophies, bundle branch blocks, and the like. Arrhythmology is the study of electrical firing and conduction abnormalities such as ventricular premature beats, conduction blocks, and the like. An electrocardiogram as used herein may be a recording of a part of one (heart) beat, a complete beat, or more than one beat.
Myocardial ion exchange abnormalities are traditionally detected by morphological analysis, where an abnormally elevated or depressed deflection of the ST-segment within each beat indicates possible ischemia. It is noted, however, that prior art methods of electrocardiogram analysis and interpretation, mainly visual inspection of the time-domain electrocardiogram, have never before enabled the detection and diagnosis of diabetes. Instead, prior art methods of diabetes detection require a resource-rich observation (RRO), e.g., blood sampling from the subject for glucose measurements, which are invasive and require stringent testing procedures, e.g., fasting, and are subject to a wide degree of error.
Thus, a need exists for a method of detecting and diagnosing diabetes using a resource-limited observation (RLO) that is non-invasive, inexpensive, and time-efficient such as a conventional ECG.
SUMMARY OF THE INVENTION
The present invention provides a method for determining a distribution function of a prime electrocardiogram which comprises obtaining a prime electrocardiogram; obtaining density functions for the harmonics in a range of harmonics of the prime electrocardiogram; and summing the density functions. In some embodiments, the prime electrocardiogram is a prime morphological electrocardiogram. In other embodiments, the prime electrocardiogram is a prime arrhythmological electrocardiogram. In some embodiments, the prime morphological electrocardiogram is obtained by obtaining a raw electrocardiogram as electronic data; selecting at least one characteristic segment or at least one characteristic window; and isolating the characteristic segment or the characteristic window by removing information extraneous to the characteristic segment or the characteristic window. In some embodiments, the characteristic segment is a QT segment, an RT segment, a JT segment, or a PR segment. In some embodiments, the characteristic window includes part or all of a T-wave or part or all of a PQRST interval. In some embodiments, the characteristic segment or the characteristic window is further refined by averaging the characteristic segment or the characteristic window. In some embodiments, the averaged characteristic window or the averaged characteristic segment may be repeated by N times, wherein N is any positive integer. In some embodiments, the isolated characteristic segment is a plurality of isolated characteristic segments in series. In some embodiments, the isolated characteristic window is a plurality of isolated characteristic windows in series.
In some embodiments, the present invention provides a method for diagnosing or detecting a diabetic disease or disorder, such as Type 1 or Type 2 diabetes in a subject which comprises acquiring a prime electrocardiogram from the subject; obtaining a plurality of density functions for the harmonics in a range of harmonics of the prime electrocardiogram; summing the plurality of density functions to give at least one distribution function; and determining the presence or absence of the diabetic disease or disorder based on whether the distribution function is indicative of the diabetic disease or disorder. In some embodiments, the prime electrocardiogram is a prime morphological electrocardiogram. In some embodiments, the method comprises creating a prime electrocardiogram from a raw electrocardiogram of the subject, obtaining harmonics from the prime electrocardiogram by performing discrete cosine transform analysis; obtaining a plurality of density functions for the harmonics in a range of harmonics of the prime electrocardiogram, wherein the density function refers to the sampling rate multiplied by the harmonic peak energy divided by the length of the period of the prime electrocardiogram; summing the plurality of density functions to give at least one distribution function; and determining the presence or absence of the diabetic disease or disorder based on whether the distribution function is indicative of the diabetic disease or disorder. In some embodiments, the prime electrocardiogram is a prime arrhythmological electrocardiogram. In some embodiments, the prime morphological electrocardiogram is obtained by obtaining a raw electrocardiogram as electronic data; selecting at least one characteristic segment or at least one characteristic window; and isolating the characteristic segment or the characteristic window by removing information extraneous to the characteristic segment or the characteristic window. In some embodiments, the characteristic segment is a QT segment, an RT segment, a JT segment, or a PR segment. In some embodiments, the characteristic window includes part or all of a T-wave or part or all of a PQRST interval. In some embodiments, the characteristic segment or the characteristic window is further refined by averaging the characteristic segment or the characteristic window. In some embodiments, the averaged characteristic window or the averaged characteristic segment may be repeated by N times, wherein N is any positive integer. In some embodiments, the isolated characteristic segment is a plurality of isolated characteristic segments in series. In some embodiments, the isolated characteristic window is a plurality of isolated characteristic windows in series.
In some embodiments, a combination of distribution functions as follows: HaVR[30]≧θ1; HaVR[30]<θ1, HV6[4]≧θ2, HI[30]≧θ3, HaVL[30]≧θ4, and HV3[4]<θ5; HaVR[30]<θ1, HV6[4]≧θ2, HI[30]≧θ3, HaVL[30]θ4, HV3[4]≧θ5, and HIII[4]≧θ6; HaVR[30]<θ1, HV6[4]≧θ2, HI[30]<θ3, and HV6[30]<θ7; and HaVR[30]<θ1, HV6[4]≧θ2, HI[30]<θ3, HV6[30]≧θ7, and HV3[30]≧θ8 is indicative of the absence of the diabetic disease or disorder. In some embodiments, a combination of distribution functions as follows: HaVR[30]<θ1, and HV6[4]<θ2; HaVR[30]<θ1, HV6[4]θ2, HI[30]≧θ3, and HaVL[30]<θ4; HaVR[30]<θ1, HV6[4]≧θ2, HI[30]≧θ3, HaVL[30]≧θ4, HV3[4]≧θ5, and HIII[4]<θ6; and HaVR[30]<θ1; HV6[4]θ2, HI[30]<θ3, HV6[30]≧θ7, and HV3[30]<θ8 is indicative of the presence of the diabetic disease or disorder.
In some embodiments, the method further comprises determining a secondary factor such as the subject's age or whether the subject suffers from dyslipidemia. Thus, in some embodiments, a combination of distribution functions as follows: HaVR[30]≧θ1; HaVR[30]<θ1; age≧θ2, HV6[30]≧θ3, HI[30]≧θ4; and HII[4]≧θ5; HaVR[30]<θ1, age≧θ2, HV6[30]≧θ3, HI[30]≧θ4, HII[4]<θ5; and HaVF[4]<θ6; HaVR[30]<θ1, age<θ2, and HV6[4]<θ7; and HaVR[30]<θ1, age≧θ2, HV6[30]<θ3, and HV6[4]≧θ8 is indicative of the absence of the diabetic disease or disorder. In some embodiments, a combination distribution functions as follows: HaVR[30]<θ1; age≧θ2; HV6[30]θ3; and HI[30]<θ4, HaVR[30]<θ1, age≧θ2, HV6[30]≧θ3, HI[30]≧θ4, HII[4]<θ5, and HaVF[4]≧θ6; HaVR[30]<θ1, age<θ2, and HV6[4]≧θ7; and HaVR[30]<θ1, age≧θ2, HV6[30]<θ3, and HV6[4]<θ8 is indicative of the presence of the diabetic disease or disorder.
In some embodiments, a combination of distribution functions as follows: HaVR[30]<θ1, age≧θ2, HV6[30]≧θ3, and HI[30]≧θ4; HaVR[30]<θ1, age<θ2, and HV4[30]≧θ5; HaVR[30]<θ1, age≧θ2, HV6[30]<θ3, and HV6[4]≧θ6; and HaVR[30]≧θ1, age<θ7, and dyslipidemia is negative is indicative of the absence of the diabetic disease or disorder. In some embodiments, a combination of distribution functions as follows: HaVR[30]<θ1, age≧θ2, HV6[30]≧θ3, and HI[30]<θ4; HaVR[30]<θ1, age<θ2, and HV4[30]<θ5; HaVR[30]<θ1, age≧θ2, HV6[30]<θ3, and HV6[4]<θ6; HaVR[30]≧θ1 and age≧θ7; and HaVR[30]≧θ1, age<θ7, and dyslipidemia is positive is indicative of the presence of the diabetic disease or disorder.
In some embodiments, a function of distribution functions as follows: c3,1=[1+exp(−Σl=118c2,lg2,1,l−g2,1,0)]−1≦0.5, where c2,l=[1+exp(−Σm=133c1,mg1,l,m−g1,l,0)]−1 for l=1, 2, . . . , 18, where c1,m=[1+exp(−Qm−g0,m,0)]−1 for m=1, 2, . . . , 33, where Qm=HI[4]g0,m,1+HII[4]g0,m,2+HIII[4]g0,m,3+HaVR[4]g0,m,4+HaVL[4]g0,m,5+HaVF[4]g0,m,6+HV1[4]g0,m,7+HV2[4]g0,m,8+HV3[4]g0,m,9+HV4[4]g0,m,10+HV5[4]g0,m,11+HV6[4]g0,m,12+HI[30]g0,m,13+HII[30]g0,m,14+HIII[30]g0,m,15+HaVR[30]g0,m,16+HaVL[30]g0,m,17+HaVF[30]g0,m,18+HV1[30]g0,m,19+HV2[30]g0,m,20+HV3[30]g0,m,21+HV4[30]g0,m,22+HV5[30]g0,m,23+HV6[30]g0,m,24, for m=1, 2, . . . , 33 is indicative of the absence of the diabetic disease or disorder. In some embodiments, a function of distribution functions as follows: c3,1=[1+exp(−Σl=118c2,lg2,1,l−g2,1,0)]−1>0.5, where c2,l=[1+exp(−Σm=133c1,mg1,l,m−g1,l,0)]−1 for l=1, 2, . . . , 18, where c1,m=[1+exp(−Qm−g0,m,0)]−1 for m=1, 2, . . . , 33, where Qm=HI[4]g0,m,1+HII[4]g0,m,2+HIII[4]g0,m,3+HaVR[4]g0,m,4+HaVL[4]g0,m,5+HaVF[4]g0,m,6+HV1[4]g0,m,7+HV2[4]g0,m,8+HV3[4]g0,m,9+HV4[4]g0,m,10+HV5[4]g0,m,11+HV6[4]g0,m,12+HI[30]g0,m,13+HII[30]g0,m,14+HIII[30]g0,m,15+HaVR[30]g0,m,16+HaVL[30]g0,m,17+HaVF[30]g0,m,18+HV1[30]g0,m,19+HV2[30]g0,m,20+HV3[30]g0,m,21+HV4[30]g0,m,22+HV5[30]g0,m,23+HV6[30]g0,m,24, for m=1, 2, . . . , 33 is indicative of the presence of the diabetic disease or disorder.
In some embodiments, the method further comprises determining a secondary factor such as the subject's age or whether the subject suffers from dyslipidemia. Thus, in some embodiments, a function of distribution functions as follows: c3,1=[1+exp(−Σl=120c2,lg2,1,l−g2,1,0)]−1≦0.5, where c2,l=[1+exp(−Σm=133c1,mg1,l,m−g1,l,0)]−1 for l=1, 2, . . . , 20, where c1,m=[1+exp(−Qm−g0,m,0)]−1 for m=1, 2, . . . , 50, where Qm=HI[4]g0,m,1+HII[4]g0,m,2+HIII[4]g0,m,3+HaVR[4]g0,m,4+HaVL[4]g0,m,5+HaVF[4]g0,m,6+HV1[4]g0,m,7+HV2[4]g0,m,8+HV3[4]g0,m,9+HV4[4]g0,m,10+HV5[4]g0,m,11+HV6[4]g0,m,12+HI[30]g0,m,13+HII[30]g0,m,14+HIII[30]g0,m,15+HaVR[30]g0,m,16+HaVL[30]g0,m,17+HaVF[30]g0,m,18+HV1[30]g0,m,19+HV2[30]g0,m,20+HV3[30]g0,m,21+HV4[30]g0,m,22+HV5[30]g0,m,23+HV6[30]g0,m,24+(age)g0,m,25+(dyslipidemia)g0,m,26 for m=1, 2, . . . , 50, where age is the age in years, and dyslipidemia=1 if there is presence of dyslipidemia, and dyslipidemia=0 if there is no presence of dyslipidemia is indicative of the absence of the diabetic disease or disorder. In some embodiments, a function of distribution functions as follows: c3,1=[1+exp(−Σl=120c2,lg2,1,l−g2,1,0)]−1>0.5, where c2,l=[1+exp(−Σm=150c1,mg1,l,m−g1,l,0)]−1 for l=1, 2, . . . , 20, where c1,m=[1+exp(−Qm−g0,m,0)]−1 for m=1, 2, . . . , 50, where Qm=HI[4]g0,m,1+HII[4]g0,m,2+HIII[4]g0,m,3+HaVR[4]g0,m,4+HaVL[4]g0,m,5+HaVF[4]g0,m,6+HV1[4]g0,m,7+HV2[4]g0,m,8+HV3[4]g0,m,9+HV4[4]g0,m,10+HV5[4]g0,m,11+HV6[4]g0,m,12+HI[30]g0,m,13+HII[30]g0,m,14+HIII[30]g0,m,15+HaVR[30]g0,m,16+HaVL[30]g0,m,17+HaVF[30]g0,m,18+HV1[30]g0,m,19+HV2[30]g0,m,20+HV3[30]g0,m,21+HV4[30]g0,m,22+HV5[30]g0,m,23+HV6[30]g0,m,24+(age)g0,m,25+(dyslipidemia)g0,m,26 for m=1, 2, . . . , 50, where age is the age in years, and dyslipidemia=1 if there is presence of dyslipidemia, and dyslipidemia=0 if there is no presence of dyslipidemia is indicative of the presence of the diabetic disease or disorder. In some embodiments, a function of distribution functions as follows: c2,1=[1+exp(−Σm=175c1,mg1,1,m−g1,1,0)]−1≦0.5, where c2,1=[1+exp(−Σm=175c1,mg1,1,m−g1,1,0]−1≦0.5, where c1,m=[1+exp(−Qm−g0,m,0)]−1 for m=1, 2, . . . , 75, where Qm=HI[4]g0,m,1+HII[4]g0,m,2+HaVR[4]g0,m,3+HaVL[4]g0,m,4+HV1[4]g0,m,5+HV4[4]g0,m,6+HV5[4]g0,m,7+HV6[4]g0,m,8+HI[30]g0,m,9+HII[30]g0,m,10+HaVR[30]g0,m,11+HaVL[30]g0,m,12+HV1[30]g0,m,13+HV4[30]g0,m,14+HV5[30]g0,m,15+HV6[30]g0,m,16 for m=1, 2, . . . , 75 is indicative of the absence of the diabetic disease or disorder. In some embodiments, a function of distribution functions as follows: c2,1=[1+exp(−Σm=175c1,mg1,1,m−g1,1,0)]−1>0.5, where c1,m=[1+exp(−Qm−g0,m,0)]−1 for m=1, 2, . . . , 75, where c2,1=[1+exp(−Σm=175c1,mg1,1,m−g1,1,0)]−1>0.5, where c1,m=[1+exp(−Qm−g0,m,0)]−1 for m=1, 2, . . . , 75, where Qm=HI[4]g0,m,1+HII[4]g0,m,2+HaVR[4]g0,m,3+HaVL[4]g0,m,4+HV1[4]g0,m,5+HV4[4]g0,m,6+HV5[4]g0,m,7+HV6[4]g0,m,8+HI[30]g0,m,9+HII[30]g0,m,10+HaVR[30]g0,m,11+HaVL[30]g0,m,12+HV1[30]g0,m,13+HV4[30]g0,m,14+HV5[30]g0,m,15+HV6[30]g0,m,16 for m=1, 2, . . . , 75 is indicative of the absence of the diabetic disease or disorder.
In some embodiments, the present invention provides a system or device for detecting or diagnosing a subject as suffering from a diabetic disease or disorder comprising an electrocardiograph for obtaining a raw electrocardiogram from the subject; a data acquisition module for converting the raw electrocardiogram into a raw digital electrocardiogram; a prime electrocardiogram converter for converting the raw digital electrocardiogram into a prime electrocardiogram; and a distribution function computer to calculate at least one distribution function of the prime electrocardiogram.
In some embodiments, the present invention provides a system or device for detecting or diagnosing a subject as suffering from a diabetic disease or disorder comprising means for obtaining a raw electrocardiogram from the subject; means for converting the raw electrocardiogram into a raw digital electrocardiogram; means for converting the raw digital electrocardiogram into a prime electrocardiogram; and means for calculating at least one distribution function of the prime electrocardiogram.
Both the foregoing general description and the following detailed description are exemplary and explanatory only and are intended to provide further explanation of the invention as claimed. The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute part of this specification, illustrate several embodiments of the invention, and together with the description serve to explain the principles of the invention.



DESCRIPTION OF THE DRAWINGS
This invention is further understood by reference to the drawings wherein:
FIG. 1A shows the energy spectral density (ESD) of an ECG with low frequency domain dispersion for the best case scenario of a prior art method.
FIG. 1B shows the ESD of an ECG with severe frequency domain dispersion for the worst case scenario of a prior art method.
FIG. 2A shows 20 seconds of an ideal impulse train at a sampling rate of 1000 samples per second and spaced 1120 milliseconds (ms) apart.
FIG. 2B shows the ESD of the impulse train of FIG. 2A from 0 to 40 Hertz (Hz).
FIG. 3A shows an impulse train with windowing leakage which was created by taking the ideal impulse shown in FIG. 2A and removing the first 400 ms.
FIG. 3B shows the ESD of the impulse train of FIG. 3A from 0 to 40 Hz.
FIG. 4A shows an impulse train with rate variability which was created by taking an ECG sampled at 1000 samples per second and making all of its deflections zero except for its R peak locations, which were set to a deflection of one. The mean period between beats of this ECG is 1.12 seconds, and the standard deviation of its periods is 0.021 s.
FIG. 4B shows the ESD of the impulse train of FIG. 4A from 0 to 40 Hz.
FIG. 5A shows an ideal ECG which was created by taking one beat of an ECG sampled at 1000 samples per second and repeating it 60 times.
FIG. 5B shows the ESD of the ECG of FIG. 5A. The harmonics of the ECG of FIG. 5A are shown to be evenly-spaced, with all zero ESD in between.
FIG. 5C shows an aligned ECG which was created by taking a characteristic window comprising most of the PQRST interval of the ECG used in FIG. 5A with the beat marker representing the R-peak.
FIG. 5D shows the ESD of the ECG of FIG. 5C. The harmonics of the ECG of FIG. 5C are shown to be evenly-spaced, with comparably low ESD in between.
FIG. 6A shows an example of a characteristic segment. It is a group of length-512 (512 time units) JT characteristic segment from 60 beats of lead V5 of an ECG sampled at 1000 samples per second.
FIG. 6B shows an example of a characteristic window. It is a group of length-859 (859 ms) PQRST characteristic window from 60 beats of V5 of an ECG sampled at 1000 samples per second.
FIG. 7A shows JT as the characteristic segment in series which was created by arranging the group of JT characteristic segment of FIG. 6A in even-symmetric series.
FIG. 7B shows PQRST as the characteristic window in series which was created by arranging the group of PQRST characteristic window of FIG. 6B in even-symmetric series.
FIG. 8A shows the JT segment average which was created by taking the average of the deflections of the JT characteristic segment of FIG. 6A at each time unit.
FIG. 8B shows the PQRST window average which was created by taking the average of the deflections of the PQRST characteristic window of FIG. 6B at each millisecond.
FIG. 9A shows 3072 time units of the JT segment average in even-symmetric series which was created by taking the JT segment average of FIG. 8A and repeating it 50 times.
FIG. 9B shows 5154 ms of the PQRST window average in even-symmetric series which was created by taking the PQRST window average of FIG. 8B and repeating it 50 times.
FIG. 10A shows the magnitude of the discrete cosine transform of the JT characteristic segment in series of FIG. 7A from 0 to 30 frequency units.
FIG. 10B shows the magnitude of the discrete cosine transform of the PQRST characteristic window in series of FIG. 7B from 0 to 30 Hz.
FIG. 11A shows the magnitude of the discrete cosine transform of the JT characteristic segment average of FIG. 8A from 0 to 30 frequency units.
FIG. 11B shows the magnitude of the discrete cosine transform of the PQRST characteristic window average of FIG. 8B from 0 to 30 Hz.
FIG. 12A shows the magnitude of the discrete cosine transform of the JT characteristic segment average in series of FIG. 9A from 0 to 30 frequency units.
FIG. 12B shows the magnitude of the discrete cosine transform of the PQRST characteristic window average in series of FIG. 9B from 0 to 30 Hz.
FIG. 13A shows 0.5 second of an ideal impulse train at a sampling rate of 1000 samples per second and spaced 100 ms apart.
FIG. 13B shows the magnitude of the discrete Fourier transform of the ideal impulse train of FIG. 13A from 0 to 300 Hz.
FIG. 13C shows 0.5 seconds of an ideal sine wave at a sampling rate of 1000 samples per second, at a magnitude of one and period of 100 ms.
FIG. 13D shows the magnitude of the discrete Fourier transform of the ideal sine wave of FIG. 13C from 0 to 300 Hz.
FIG. 13E shows an ideal square wave at a sampling rate of 1000 samples per second, at a magnitude of one and period of 100 ms.
FIG. 13F shows the magnitude of the discrete Fourier transform of the ideal square wave of FIG. 13E from 0 to 300 Hz.
FIG. 13G shows an ideal triangle wave. FIG. 13E shows an ideal triangle wave at a sampling rate of 1000 samples per second, at a magnitude of 5 and period of 100 ms.
FIG. 13H shows the magnitude of the discrete Fourier transform of the ideal triangle wave of FIG. 13G from 0 to 300 Hz.
FIG. 14 shows an impulse train of a waveform window which was created by taking an ECG sampled at 1000 samples per second and making all of its deflections zero except for its R peak locations, which are set to a deflection of one.
FIG. 15 shows a sine waveform segment which was created by taking the same ECG of FIG. 14 and replacing each beat with one period (0 ̃27π) of the sine wave with magnitude one.
FIG. 16 shows the magnitude of the discrete Fourier transform of the impulse train of the waveform window of FIG. 14 from 0 to 10 Hz.
FIG. 17 shows the magnitude of the discrete Fourier transform of the sine waveform segment of FIG. 15 from 0 to 10 Hz.
FIG. 18A schematically shows a method for obtaining the density function of the prime morphological ECG of a subject.
FIG. 18A1 schematically shows the steps for calculating the 12-lead ECG and identifying the beat marker.
FIG. 18A2 schematically shows obtaining the characteristic segment.
FIG. 18A3 schematically shows refining the characteristic segment and obtaining the density and distribution of a prime morphological ECG.
FIG. 18B outlines the steps in FIGS. 18A and 18A1 to 18A3.
FIG. 19 is an example of a statistical decision tree using distribution functions of a prime morphological ECG for classifying or diagnosing a subject as suffering from a diabetic disease or disorder.
FIG. 20 is an example of a statistical decision tree using distribution functions of a prime morphological ECG and age for classifying or diagnosing a subject as suffering from a diabetic disease or disorder.
FIG. 21 is an example of a statistical decision tree using distribution functions of a prime morphological ECG, age, and the presence or absence of dyslipidemia for classifying or diagnosing a subject as suffering from a diabetic disease or disorder.
FIG. 22 is an example of an artificial neural network system of two processing layers using distribution functions of a prime morphological ECG for classifying or diagnosing a subject as suffering from a diabetic disease or disorder.
FIG. 23 is an example of an artificial neural network system of two processing layers using distribution functions of a prime morphological ECG, age, and the presence or absence of dyslipidemia for classifying or diagnosing a subject as suffering from a diabetic disease or disorder.



DETAILED DESCRIPTION OF THE INVENTION
The present invention provides methods and devices for detecting and diagnosing diabetic diseases and disorders in a subject based on an electrocardiogram (ECG) obtained from the subject. Specifically, the present invention relates to methods and devices for analyzing the morphology of an ECG to diagnose diabetic diseases and disorders, such as diabetes (Type 1 or Type 2), prediabetes, diabetic heart disease, metabolic syndrome, and the like. In some embodiments, the present invention provides methods and devices for analyzing the morphology of the systolic cycle (e.g., JT segment) of the beats of an ECG to detect or diagnose diabetic diseases and disorders in subjects.
Prior art methods of ESD analysis attempt to detect and diagnose myocardial ion exchange abnormalities by examining multiple periods (10 seconds) of an ECG, x, that is directly transformed into the frequency domain and expressed in terms of its energy spectral density, |X(f)|2 and then correlates the energy spectral density to heart disease. See e.g., ESD methods U.S. Pat. No. 6,638,232, U.S. Pat. No. 6,148,228, and U.S. Pat. No. 5,649,544, which are herein incorporated by reference.
Unfortunately, prior art ESD methods and analysis are difficult to interpret and correlate to morphology consistently. Specifically, prior art ESD analysis does not account for the disintegration of the harmonics due to one or more aperiodicities of an ECG. For example, the method of Fang et al. (U.S. Pat. Nos. 6,638,232 and 6,148,228) attempts to detect abnormalities by calculating the area under the curve (AUC) of the ESD. However, Fang et al. fails to adequately correlate the area under the curve to diabetic disease because harmonic disintegration is not addressed. Thus, the method of Fang et al. cannot adequately correlate ESD of an ECG to diabetic diseases and disorders.
A harmonic is the spectral energy that is an integer multiple of a fundamental frequency of an ECG signal. As used herein, “harmonic disintegration” refers to a distortion of the height and shape of a harmonic due to the dispersion of the harmonic energy from the harmonic frequency to neighboring frequencies by aperiodicities. As used herein, “aperiodicities” include arrhythmological aperiodicities, such as leakage due to aperiodic windowing and periodic rate variability, and morphological aperiodicities, such as beat morphological variations, sub-fundamental frequency oscillations and white noise.
For example, the ESDs of electrocardiograms from over 400 patients were determined according to prior art ESD methods. The best case ESD was taken from an electrocardiogram having the smallest amount of aperiodicities exhibited distinct harmonics until about the 8th or 9th harmonic. The best case ESD is shown in FIG. 1A wherein harmonic disintegration is observable (as peaks that are less distinct than the peaks at the first few harmonics) at about the 8th or 9th harmonic. The worst case ESD was taken from an electrocardiogram exhibiting the largest amount of aperiodicities severe arrhythmia and heart rate variability (HRV). The worst case ESD is shown in FIG. 1B wherein distinct harmonics are not present.
As disclosed herein, the present invention addresses the problem of harmonic disintegration in ESD of an ECG, thereby enabling the analysis of morphological data that can be accurately correlated to the presence or absence of diabetic disease.
Unless otherwise indicated, all ECGs were sampled at 1000 Hz with a 12-bit resolution. As used herein, a “raw” ECG refers an electrocardiogram obtained from a subject with an electrocardiograph which has not been modified or manipulated, e.g., a conventional ECG obtained using electrocardiographs known in the art.
Aperiodicities
There are two types of aperiodicities. The first is “arrhythmological aperiodicity” which is a condition where the time to complete a cardiac cycle varies from beat to beat. The second is “morphological aperiodicity” which is a condition where the shape of amplitude deflections at an instantaneous point along the time trajectory varies from beat to beat.
1. Arrhythmological Aperiodicities
Arrhythmological aperiodicities include leakage due to aperiodic windowing and periodic rate variability. Leakage due to aperiodic windowing is leakage of the spectral energy from a harmonic due to incorporation of an incomplete period (a portion of a beat of an ECG). Periodic rate variability includes heart rate variability and arrhythmias.
a. Leakage Due to Aperiodic Windowing
Harmonic disintegration due to leakage due to aperiodic windowing may be exemplified by the following:
First, an ideal impulse train is obtained. As used herein, an “ideal impulse train” refers to an impulse train having impulses uniformly spaced in time and identical in magnitude. An impulse train (Dirac comb) is a series of impulses alternating with periods in the time domain, wherein the impulses have magnitudes of one and the periods have magnitudes of zero. Specifically, the ideal impulse train was obtained by first calculating the average of the beat periods of an ECG, identifying the number of beats and then generating a train of impulses having a number of impulses that is the same as the number of beats, giving each impulse a magnitude of one which alternate with periods having magnitudes of zero, and separating the impulses by the average of the beat periods. Then, aperiodic windowing of the ideal impulse train is created by removing a portion of the last period of the ideal impulse train.
To observe the effect of leakage due to aperiodic windowing, the discrete Fourier transform (DFT) of the ideal impulse train and the aperiodic windowed ideal impulse train were taken to obtain the ESDs. FIG. 2A shows the ideal impulse train and its ESD is shown in FIG. 2B. FIG. 3A shows the aperiodic windowed ideal impulse train and its ESD is shown in FIG. 3B.
A comparison of FIG. 2B and FIG. 3B shows that leakage due to aperiodic windowing results in harmonics of varying magnitudes thereby illustrating harmonic disintegration.
b. Periodic Rate Variability
Harmonic disintegration due to periodic rate variability may be exemplified by the following:
First, an impulse train having impulses at locations in the time domain corresponding to the R peaks of an ECG with heart rate variability (HRV) was obtained.
To observe the effect of periodic rate variability, the discrete Fourier transform (DFT) of the impulse train was taken to obtain the ESD. FIG. 4A shows the impulse train and its ESD is shown in FIG. 4B.
A comparison of FIG. 2B and FIG. 4B shows that periodic rate variability results in harmonics which are indistinguishable at increasing frequencies thereby illustrating harmonic disintegration.
2. Morphological Aperiodicities
Morphological aperiodicities include beat morphology variations, sub-fundamental frequency oscillations, and white noise. Beat morphological variations refer to the differences in shape between different beats in the same lead of the same ECG. Sub-fundamental frequency oscillations are oscillations that occur at frequencies that are lower than the fundamental frequency (frequency of an ECG is the average heart rate). White noise, or more commonly known as additive white Gaussian noise (AWGN), is a random signal with a flat power spectral density.
a. Beat Morphological Variations
Harmonic disintegration due to beat morphological variations may be illustrated by the following:
First, the periods and the deflections of the beats of an ECG were made to be identical in length and shape to obtain an ideal ECG and the beat periods of an ECG were made to be identical in length while maintaining the different shapes of the beats to obtain an ECG having beat morphological variations. Then, the DFTs of the ideal ECG and the ECG having beat morphological variations were taken. FIG. 5A shows the ideal ECG and its ESD is shown in FIG. 5B. FIG. 5C shows the ECG having beat morphological variations and its ESD is shown in FIG. 5D.
A comparison of FIG. 5B and FIG. 5D shows that beat morphological variations results in some harmonic disintegration which is provided at the baseline of FIG. 5D.
b. Sub-Fundamental Frequency Oscillations
Sub-fundamental frequency oscillations are due to breathing, movement, surface muscle contraction, and interference from electrical activity of other organs. In some embodiments of the present invention, sub-fundamental frequency oscillations may be filtered out using low corner frequency high-pass filters and methods known in the art.
c. White Noise
White noise is caused by friction and other thermal noise and environmental noise. In some embodiments of the present invention, the effects of white noise may be reduced by signal averaging or optimizing hardware design using methods known in the art.
Thus, the present invention addresses the problem of harmonic disintegration in ESDs of ECGs due to aperiodicities. Specifically, the present invention provides a method of determining the distribution functions of a prime ECG which may be used to detect and diagnose diabetic diseases and disorders such as diabetes.
I. Creation of a Prime ECG
As used herein, a “prime ECG” refers to an ECG which is modified such that certain information of each beat in the ECG is made to be constant. A prime ECG includes a prime morphological ECG and a prime arrhythmological ECG. As used herein, a “prime morphological ECG” refers to an ECG which is modified such that the arrhythmological information of each beat is made to be constant. As used herein, a “prime arrhythmological ECG” refers to an ECG which is modified such that the morphological information of each beat is made to be constant.
Before a prime ECG is created, an ECG must be obtained from a subject. The ECG may be obtained with a device, such as an electrocardiograph, that measures electrical potentials caused by heart activity. There are a variety of methods and devices known in the art for obtaining an ECG, such devices include the QED 1000® available from Dynacardia, Inc. (Azusa, Calif.), the CAM-14® available from General Electric Healthcare (Milwaukee, Wis.), the UNIVERSAL ECGTM available from QRS Diagnostic (Plymouth, Minn.), the CARDIO-CARD® available from Nasiff Associates (Brewerton, N.Y.), and the like. Preferably, the ECG is accessible in computer readable form, e.g., recorded and/or stored as electronic data, which allows one to readily manipulate the data mathematically.
Conventional methods and devices employing the 12 lead system may be used in accordance with the present invention. In these embodiments, the computation of the lead data for the 12 lead system (Leads I, II, III, aVR, aVL, aVF, V1, V2, V3, V4, V5, V6) acquired from the 10 electrodes (RA, LA, RL, LL, C1, C2, C3, C4, C5, C6) is done by the device or algorithms known in the art. See Malmivuo & Plonsey (1995) BIOELECTROMAGNETISM Oxford: New York, which is herein incorporated by reference.
In other embodiments, alternative lead systems may be used in accordance with the present invention. Alternative lead systems include the 15 lead system, the 16 lead system, the 30 lead system, the 32 lead system, the 9 lead system, the 3 lead systems (including EASI and Frank leads), and the like. See Lux et al. (1979) Circulation 59(2): 356, Brady et al. (2000) Amer. J. of Emergency Medicine 18(3): 239, Sgarbossa et al. (2001) Amer. Heart J. 141(4): 507, Dower et al. (1988) J. of Electrocardiology Suppl: S182, and Edenbrandt et al. (1988) J. of Electrocardiology 21(4): 361, which are herein incorporated by reference. For example, in accordance with the present invention, an ECG may be obtained with one of these alternative lead systems rather than with the conventional 12 lead system.
A. Prime Morphological ECG
Once the ECG is obtained, a prime morphological ECG is made by isolating the morphological information of beats from the ECG by making the arrhythmological information constant, and may further include refining the morphological information.
1. Isolating Morphological Information
Once the ECG is obtained, then a beat marker for the beats is selected. As used herein a “beat marker” refers to a characteristic point that corresponds to a desired electrical state in a cardiac cycle, such as the P-peak, the Q-peak, the R-peak, the S-peak, the J-point, the T-peak, and the like. A beat marker may readily be identified using methods known in the art. See Hague et al. (2002) 2nd Int'l Conf. Elec. & Comp Engr. and Afonso et al. (1999) IEEE Trans. on Biomed Eng. 46(2):192, which are herein incorporated by reference.
As exemplified herein, the beat markers were identified using a vectorcardiogram (VCG). First, VCG with an orthogonal lead system using the Levkov transform was obtained using methods known in the art. See Augustyniak (2001) Proc. of 10th Int'l Conf. on System-Modelling-Control, p. 51 and Levkov (1987) Med & Biol Engr & Computing, March, p. 155, which are herein incorporated by reference. Then the first and second differences of the VCG were taken and a representative maximum distance from the point of origin of the first derivative over the entire VCG was determined. The durations in the first difference of the entire VCG which exceeded more than half of the maximum distance were detected and a point in each of the durations which had the lowest second difference was found.
For example, a beat marker representing the R-peak for an ECG sampled at 1000 samples per second was identified by:

    
    
        Calculating the length-N VCG (x,y,z) from the length-N 12-lead ECG (I, II, III, aVR, aVL, aVF, V1, V2, V3, V4, V5, V6) using the Levkov transform:
        
            x=0.0592I−0.0877II−0.1761V1−0.0771V2+0.1228V3+0.2432V4+0.2560V5+0.2078V6
            y=0.3827I+0.4563II−0.0179V1−0.0436V2−0.0490V3+0.0165V4+0.0541V5+0.0555V6
            z=0.0638I+0.0258II−0.2389V1−0.3140V2−0.2389V3−0.0550V4+0.0614V5+0.1138V6
        
        
        Calculating the first-order differences of the VCG (dx, dy, dz), and the second-order differences of the VCG (d2x, d2y, d2z):
        
            dx[n]=x[n]−x[n−1] for n=2, 3, . . . , N
            dy[n]=y[n]−y[n−1] for n=2, 3, . . . , N
            dz[n]=z[n]−z[n−1] for n=2, 3, . . . , N
            d2x[n]=x[n+1]−2x[n]+x[n−1] for n=2, 3, . . . , N−1
            d2y[n]=y[n+1]−2y[n]+y[n−1] for n=2, 3, . . . , N−1
            d2z[n]=z[n+1]−2z[n]+z[n−1] for n=2, 3, . . . , N−1
        
        
        Calculating the first-order difference square norms of the VCG (da2), and the second-order difference square norms of the VCG (d2a2):
        
            da2[n]=dx2[n]+dy2[n]+dz2[n] for n=2, 3, . . . , N
            d2a2[n]=d2x2[n]+d2y2[n]+d2z2[n] for n=2, 3, . . . , N−1
        
        
        Finding the maxima of {da2[n]:n=5000i+1,5000i+2, . . . , 5000 (i+1)}, where 0≦i<N/5000−1, letting a threshold (θQRS) be one-half of the minimum of these maxima.
        Identifying beats (b) by scanning da2[n] from n=31 to n=N−100, such that each time θQRS is exceeded by da2[n] an R-peak beat marker is located at bR[i]=arg maxm{d2a2[m]:m=n−30, n−29, . . . , n+100}, i=1, 2, . . . , and scanning is resumed at n+100.

a. Characteristic Segment

    
    


After the beat marker is selected, a segment may be chosen. A segment includes the conventional segments commonly used in ECG analysis, such as the PR segment, the PR interval, the QRS complex, the ST segment, and the QT interval, and other segments, such as the RT segment which is the segment from the R-peak to the T-peak, the RT stop segment which is the segment from the R-peak to the end of the T, the JT segment which is the segment from the J-point to the T-peak, the PQ segment which is the segment from the P-peak to the Q-peak, the complete segment which is the segment that begins at the PR interval to the end of the QT interval, the complete point segment, which is the segment from one point in a cardiac cycle to the corresponding point in the next cardiac cycle (e.g., the RR interval), and the like.
The choice of the segment depends on the type of diabetic disease or disorder desired to be detected. For example, if one is interested in detecting ischemia, one would select the RT segment as data in these segments is known to be important the detection of ischemia. See Camm, et al., eds. (2006) THE ESC TEXTBOOK OF CARDIOVASCULAR MEDICINE, Blackwell, which is herein incorporated by reference. Similarly, if one is interested in detecting atrial diseases or disorders, one would select the PR segment as data in this segment is known to be important in detection of such diseases and disorders including atrioventricular blocks, pericarditis, and atrial infarction. See Camm, et al., eds. (2006) THE ESC TEXTBOOK OF CARDIOVASCULAR MEDICINE, Blackwell, which is herein incorporated by reference. However, the instant inventor surprisingly discovered that the JT segment may be used to detect and diagnose a diabetic disease or disorder. Nevertheless, those skilled in the art may readily select a segment suitable for detecting and diagnosing a desired diabetic disease or condition in accordance with the present invention.
Once chosen, the segments are resampled to a given fixed length so that each resampled segment is identical in length to give a characteristic segment. Methods and devices known in the art may be used to resample the segment in accordance with the present invention. In some embodiments, resampling is conducted according to the classic Oppenheim & Schafer upsample-filter-downsample algorithm. See Oppenheim et al. (1989) DISCRETE-TIME SIGNAL PROCESSING, Prentice, which is herein incorporated by reference.
As exemplified herein, the characteristic segments were identified using a running average of a vectorcardiogram (VCG) and a beat marker. First, a VCG with an orthogonal lead system using the Levkov transform was obtained using methods known in the art. See Augustyniak (2001) Proc. of 10th Int'l Conf. on System-Modelling-Control, p. 51 and Levkov (1987) Med & Biol Engr & Computing, March p. 155, which are herein incorporated by reference. Then a running average of the VCG was taken. Characteristic points at the ends of the segment of the running average of the VCG were detected relative to the beat marker as some maxima of the running average of the VCG. Each beat's segment was resampled to a fixed length. Since the characteristic segment is the result of resampling ECG segment of an arbitrary length (q) into a common length (p), it is not on a conventional time index such as an index of milliseconds. Consequently, the frequency-domain transform of the characteristic segment is not on a conventional frequency index such as an index of Hertz. As used herein, a “time unit” refers to time-domain index of the characteristic segment. And as used herein, a “frequency unit” refers to frequency-domain index of the characteristic segment. The time unit and the frequency unit retain the same inverse relationship as the relationship between the second and the Hertz.
For example, a characteristic segment representing the JT segment for an ECG sampled at 512 samples per second, with a beat marker representing the R-peak, was identified by:

    Calculating the length-N VCG (x,y,z) from the length-N 12-lead ECG (I, II, III, aVR, aVL, aVF, V1, V2, V3, V4, V5, V6) using the Levkov transform:
    
        x=0.0592I−0.0877II−0.1761V1−0.0771V2+0.1228V3+0.2432V4+0.2560V5+0.2078V6
        y=0.3827I+0.4563I−0.0179V1−0.0436V2−0.0490V3+0.0165V4+0.0541V5+0.0555V6
        z=0.0638I+0.0258II−0.2389V1−0.3140V2−0.2389V3−0.0550V4+0.0614V5+0.1138V6
    
    
    Calculating a smoothened VCG (sx,sy,sz) by taking running averages:





  
    
      
        s
        x
      
      ⁡
      
        [
        n
        ]
      
    
    =
    
      {
      
        
          
            
              
                
                  ∑
                  
                    m
                    =
                    
                      n
                      -
                      4
                    
                  
                  
                    n
                    +
                    4
                  
                
                ⁢
                
                  
                    x
                    ⁡
                    
                      [
                      m
                      ]
                    
                  
                  /
                  9
                
              
              ,
            
          
          
            
              
                n
                =
                5
              
              ,
              6
              ,
              ...
              ⁢
              
                
              
              ,
              
                N
                -
                5
              
              ,
              
                N
                -
                4
              
            
          
        
        
          
            
              0
              ,
            
          
          
            
              
                n
                =
                1
              
              ,
              2
              ,
              3
              ,
              4
              ,
              
                N
                -
                3
              
              ,
              
                N
                -
                2
              
              ,
              
                N
                -
                1
              
              ,
              N
            
          
        
      
      }
    
  




  
    
      
        s
        y
      
      ⁡
      
        [
        n
        ]
      
    
    =
    
      {
      
        
          
            
              
                
                  ∑
                  
                    m
                    =
                    
                      n
                      -
                      4
                    
                  
                  
                    n
                    +
                    4
                  
                
                ⁢
                
                  
                    y
                    ⁡
                    
                      [
                      m
                      ]
                    
                  
                  /
                  9
                
              
              ,
            
          
          
            
              
                n
                =
                5
              
              ,
              6
              ,
              ...
              ⁢
              
                
              
              ,
              
                N
                -
                5
              
              ,
              
                N
                -
                4
              
            
          
        
        
          
            
              0
              ,
            
          
          
            
              
                n
                =
                1
              
              ,
              2
              ,
              3
              ,
              4
              ,
              
                N
                -
                3
              
              ,
              
                N
                -
                2
              
              ,
              
                N
                -
                1
              
              ,
              N
            
          
        
      
      }
    
  




  
    
      
        s
        z
      
      ⁡
      
        [
        n
        ]
      
    
    =
    
      {
      
        
          
            
              
                
                  ∑
                  
                    m
                    =
                    
                      n
                      -
                      4
                    
                  
                  
                    n
                    +
                    4
                  
                
                ⁢
                
                  
                    z
                    ⁡
                    
                      [
                      m
                      ]
                    
                  
                  /
                  9
                
              
              ,
            
          
          
            
              
                n
                =
                5
              
              ,
              6
              ,
              ...
              ⁢
              
                
              
              ,
              
                N
                -
                5
              
              ,
              
                N
                -
                4
              
            
          
        
        
          
            
              0
              ,
            
          
          
            
              
                n
                =
                1
              
              ,
              2
              ,
              3
              ,
              4
              ,
              
                N
                -
                3
              
              ,
              
                N
                -
                2
              
              ,
              
                N
                -
                1
              
              ,
              N
            
          
        
      
      }
    
  



    Identifying the segment R-peak locations (nR0) using a beat marker representing the R-peak (bR[i], i=1, 2, . . . , Nb0), for beats i=1, 2, . . . , Nb0: nR0[i]=arg maxn{max(sx[n], sy[n], sz[n]): n=bR[i]−20, bR[i]−19, . . . , bR[i]+20}.
    Calculating the derivatives of the smoothened VCG (dsx, dsy, dsz) by taking derivatives:





  
    
      
        ds
        x
      
      ⁡
      
        [
        n
        ]
      
    
    =
    
      {
      
        
          
            
              
                
                  
                    s
                    x
                  
                  ⁡
                  
                    [
                    
                      n
                      +
                      1
                    
                    ]
                  
                
                -
                
                  
                    s
                    x
                  
                  ⁡
                  
                    [
                    
                      n
                      -
                      1
                    
                    ]
                  
                
              
              ,
            
          
          
            
              
                n
                =
                2
              
              ,
              3
              ,
              ...
              ⁢
              
                
              
              ,
              
                
              
              ⁢
              
                N
                -
                1
              
            
          
        
        
          
            
              0
              ,
            
          
          
            
              
                n
                =
                1
              
              ,
              N
            
          
        
      
      }
    
  




  
    
      
        ds
        y
      
      ⁡
      
        [
        n
        ]
      
    
    =
    
      {
      
        
          
            
              
                
                  
                    s
                    y
                  
                  ⁡
                  
                    [
                    
                      n
                      +
                      1
                    
                    ]
                  
                
                -
                
                  
                    s
                    y
                  
                  ⁡
                  
                    [
                    
                      n
                      -
                      1
                    
                    ]
                  
                
              
              ,
            
          
          
            
              
                n
                =
                2
              
              ,
              3
              ,
              ...
              ⁢
              
                
              
              ,
              
                N
                -
                1
              
            
          
        
        
          
            
              0
              ,
            
          
          
            
              
                n
                =
                1
              
              ,
              N
            
          
        
      
      }
    
  




  
    
      
        ds
        z
      
      ⁡
      
        [
        n
        ]
      
    
    =
    
      {
      
        
          
            
              
                
                  
                    s
                    z
                  
                  ⁡
                  
                    [
                    
                      n
                      +
                      1
                    
                    ]
                  
                
                -
                
                  
                    s
                    z
                  
                  ⁡
                  
                    [
                    
                      n
                      -
                      1
                    
                    ]
                  
                
              
              ,
            
          
          
            
              
                n
                =
                2
              
              ,
              3
              ,
              ...
              ⁢
              
                
              
              ,
              
                N
                -
                1
              
            
          
        
        
          
            
              0
              ,
            
          
          
            
              
                n
                =
                1
              
              ,
              N
            
          
        
      
      }
    
  



    Calculating the square distance between the derivatives of the smoothened VCG (ads) by squaring the distances: ads[n]=(dsx[n]−dsy[n])2+(dsy[n]−dsz[n])2+(dsz[n]−dsx[n])2 
    Calculating the maxima of square distances between the derivatives of the smoothened VCG near each beat (âds) by finding the maxima of ads[n] in running windows: âds[i]=max{ads[bR[i]], . . . , ads[bR[i]+99]}, i=1, 2, . . . Nb0 
    Identify the segment J-point locations (nJ0) using the square distance between the derivatives of the smoothened VCG (ads), the maxima of square distances between the derivatives of the smoothened VCG near each beat (âds), for beats i=1, 2, . . . , Nb0−1: nJ0[i]=arg minn{ads[n]−0.05âds[i]: n=bR[i]+15, bR[i]+16, . . . , bR[i]+99}.
    Calculating the average beat period (mdb) by using a beat marker representing the R-peak (bR[i], i=1, 2, . . . , Nb0): mdb=Σi=1Nb0−1 (bR[i+1]−bR[i])/(Nb0−1)
    Identifying the segment T-peak locations (nT0) using a beat marker representing the R-peak (bR[i], i=1, 2, . . . , Nb0), the segment R-peak locations nR0, and the average beat period mdb, for beats i=1, 2, . . . , Nb0−1: nT0[i]=arg maxn{max(|sx[n]|, |sy[n]|, |sz[n]|): n=nR0+150, nR0+150, . . . , nR0+0.5 mdb}.
    Selecting segment representing the JT segment ({nJ, nT}) by calculating the segment periods (dnRT0) for each of the Nb0−1 beats, dnRT0[i]=nT0[i]−nR0[i], dnJT0[i]=nT0[i]−nJ0[i], calculating the mean (μRT) (μJT) and standard deviation (σRT) (σJT) of dnJT0, and selecting the segment in beats such that: {nJ, nT}={nJ0[i], nT0[i]: μJT−σJT<nT0[i]−nJ0[i]<μJT+σJT}, for any i=1, 2, . . . , Nb0−1.
    Resampling the Nb selected segment representing the JT segment (in locations {nJ[i], nT[i]}, i=1, 2, . . . , Nb, for all leads) from its corresponding segment lengths (dnJT[i]=nT[i]−nJ[i], i=1, 2, . . . , Nb) to a fixed length of 512 by using the Oppenheim and Schafer algorithm as follows:
    
        Given a length-q original sequence (v[n]), n=1, 2, . . . , q, representing a segment of an ECG lead that is to be resampled to length-p resampled sequence (w[n]), n=1, 2, . . . , p:
        (a) Pre-process v such that the first and last value of the signal to be resampled are zero by creating a length-2q pre-processed original sequence (v0) where:
    
    






  
    
      
        v
        0
      
      ⁡
      
        [
        n
        ]
      
    
    =
    
      {
      
        
          
            
              
                
                  v
                  ⁡
                  
                    [
                    
                      q
                      -
                      n
                      +
                      1
                    
                    ]
                  
                
                -
                
                  v
                  ⁡
                  
                    [
                    q
                    ]
                  
                
              
              ,
            
          
          
            
              
                n
                =
                1
              
              ,
              2
              ,
              ...
              ⁢
              
                
              
              ,
              q
            
          
        
        
          
            
              
                
                  v
                  ⁡
                  
                    [
                    
                      n
                      -
                      q
                    
                    ]
                  
                
                -
                
                  v
                  ⁡
                  
                    [
                    q
                    ]
                  
                
              
              ,
            
          
          
            
              
                n
                =
                
                  q
                  +
                  1
                
              
              ,
              
                q
                +
                2
              
              ,
              ...
              ⁢
              
                
              
              ,
              
                2
                ⁢
                q
              
            
          
        
      
      }
    
  
  ,




    
    
        (b) upsample v0[n] by factor of p by zero-filling to create a length-2pq upsampled sequence (u0) where:
    
    






  
    
      
        u
        0
      
      ⁡
      
        [
        n
        ]
      
    
    =
    
      {
      
        
          
            
              
                
                  v
                  0
                
                ⁡
                
                  [
                  
                    
                      
                        (
                        
                          n
                          -
                          1
                        
                        )
                      
                      /
                      p
                    
                    +
                    1
                  
                  ]
                
              
              ,
            
          
          
            
              
                n
                =
                1
              
              ,
              
                p
                +
                1
              
              ,
              
                
                  2
                  ⁢
                  p
                
                +
                2
              
              ,
              ...
              ⁢
              
                
              
              ,
            
          
        
        
          
            
              
            
          
          
            
              
                
                  (
                  
                    
                      2
                      ⁢
                      q
                    
                    -
                    1
                  
                  )
                
                ⁢
                p
              
              +
              1
            
          
        
        
          
            
              0
              ,
            
          
          
            else
          
        
      
      }
    
  
  ,




    
    
        (c) filter with any low pass filter with a gain of p and a cut-off frequency of π/p to get a length-2pq filtered upsampled sequence (ū0):
        (d) downsample ū0 by factor of q by sampling to create a length-2p pre-processed resampled sequence (w0) where:

w0[n]=ū0[(n−1)q+1], for n=1,2, . . . ,2p 

        (e) post-process w0 to recover the resampled sequence by creating a length-p resampled sequence (w) where:

w[n]=w0[p+n]+v[q], for n=1,2, . . . ,p 

b. Characteristic Window

    
    


After the beat marker is selected, a window may be chosen. A window comprises the conventional intervals commonly used in ECG analysis, the PR segment, the PR interval, the QRS complex, the ST segment, the JT segment, and the QT interval, and other intervals, such as the R wave which comprises all of the R wave, the T wave which comprises all of the T wave, the PQRST interval, which is an interval that overlaps with the interval from the start of the P wave to the end of the T wave, and the like. The choice of the window depends on the type of diabetic disease or disorder desired to be detected. For example, if one is interested in detecting diabetes, one would select a window that includes the T-wave as data in the T-wave has been discovered by the instant inventor to be useful in the detection of diabetes.
A characteristic window is obtained by selecting a portion of a cardiac cycle of interest which may be consistently identified by its relation to the beat marker. The start and end of a characteristic window have fixed-length distances in time relative to the beat marker. For example, a characteristic window comprising most of or all of the PQRST interval may be obtained by selecting the R-peak as the beat marker, selecting beats for which the RR interval fall within one standard deviation of the mean of the RR interval of the ECG, then for the selected beats designating a fixed length that is less than the minimum length of the RR interval of the selected beats such that the characteristic window overlaps with the PQRST interval, and the start and end of the characteristic window have fixed-length relations to the beat marker.
For example, the characteristic window comprising most of or all of the PQRST interval for an ECG sampled at 1000 samples per second, with a beat marker representing the R-peak, may be identified by:

    Calculating the beat periods by using a beat marker representing the R-peak (bR[i], i=1, 2, . . . , Nb0): dnb0[i]=bR[i+1]−bR[i], for beats i=1, 2, . . . , Nb0−1
    Selecting non-arrhythmic beats by calculating the mean (μb0) and standard deviation (σb0) of dnb0, and selecting the beats such that the set of Nb selected beat markers (bRs) is: bRs={bR[i]: μb0−σb0<dnb0[i]<μb0+σb0}, for any 2, 3, . . . , Nb0−1
    Calculating the minimum beat periods (NRR) using the beat marker: NRR=mini{bR[i+1]−bR[i]: bR[i]εbRs}.
    Setting the characteristic window start points at n=bR[i]-0.3NRR for the selected beats (bR[i]εbRs)
    Setting the characteristic window end points at n=bR[i]+0.6NRR for the selected beats (bR[i]εbRs)

2. Creating the Prime Morphological ECG



After the characteristic segments or the characteristic windows are identified, prime morphological ECG is then obtained by isolating the characteristic segments or the characteristic windows in the ECG by removing information extraneous to the characteristic segments or characteristic windows.
Characteristic segments or windows may be identified and isolated. As exemplified herein, a characteristic segment representing the JT segment is isolated from 12-lead ECG (sampled at 1000 samples per second) by identifying and isolating all selected RT segments. FIG. 6A shows an example of a group of JT characteristic segment from 50 beats of lead V5 of an ECG, in which the overlapping characteristic segment of the 50 beats appear substantially similar but not identical.
Similarly, characteristic windows may be identified and isolated. For example, a length-859 characteristic window representing the PQRST window is isolated from 12-lead ECG (sampled at 1000 samples per second) by identifying and isolating all selected PQRST windows. FIG. 6B shows an example of a group of PQRST characteristic window from 50 beats of lead V5 of an ECG, in which the overlapping characteristic window of the 50 beats appear substantially similar but not identical.
The isolated characteristic segment or the isolated characteristic segment has a fixed length from beat to beat, therefore arrhythmological information (arrhythmological aperiodicities such as leakage due to aperiodic windowing and periodic rate variability) is removed.
As exemplified herein, the characteristic segment comprising the JT characteristic segment of length-p of an ECG lead ({rJT,i[1], rJT,i[2], . . . , rJT,i[p]}), for selected beats i=1, 2, . . . , Nb, is created by arranging in series the JT characteristic segment into a length-pNb even-symmetric sequence:




  
    r
    JT
  
  =
  
    
      {
      
        
          
            
              
                
                  r
                  
                    JT
                    ,
                    1
                  
                
                ⁡
                
                  [
                  1
                  ]
                
              
              ,
              
                ...
                ⁢
                
                  
                
                ⁢
                
                  
                    r
                    
                      JT
                      ,
                      1
                    
                  
                  ⁡
                  
                    [
                    p
                    ]
                  
                
                ⁢
                
                  
                  
                    
                      
                        r
                        
                          JT
                          ,
                          2
                        
                      
                      ⁡
                      
                        [
                        p
                        ]
                      
                    
                    ,
                    ...
                    ⁢
                    
                      
                    
                    ,
                    
                      
                        r
                        
                          JT
                          ,
                          2
                        
                      
                      ⁡
                      
                        [
                        1
                        ]
                      
                    
                  
                  
                
                ⁢
                
                  
                
                ⁢
                ...
              
            
          
        
        
          
            
              
                
                  
                  
                    
                      
                        r
                        
                          JT
                          ,
                          
                            
                              N
                              b
                            
                            -
                            1
                          
                        
                      
                      ⁡
                      
                        [
                        1
                        ]
                      
                    
                    ,
                    ...
                    ⁢
                    
                      
                    
                    ,
                    
                      
                        r
                        
                          JT
                          ,
                          
                            N
                            
                              b
                              -
                              1
                            
                          
                        
                      
                      ⁡
                      
                        [
                        p
                        ]
                      
                    
                  
                  
                
                ⁢
                
                  
                    r
                    
                      JT
                      ,
                      
                        N
                        b
                      
                    
                  
                  ⁡
                  
                    [
                    p
                    ]
                  
                
              
              ,
              ...
              ⁢
              
                
              
              ,
              
                
                  r
                  
                    JT
                    ,
                    
                      N
                      b
                    
                  
                
                ⁡
                
                  [
                  1
                  ]
                
              
            
          
        
      
      }
    
    .
  




FIG. 7A shows an example of a length-512 (p=512) JT characteristic segment of 50 selected beats in series.
Similarly, an example of the characteristic window comprising the PQRST characteristic window of length-q of an ECG lead ({rPQRST,i[1], rPQRST,i[2], . . . , rPQRST,i[q]}) sampled at 1000 samples per second, for selected beats i=1, 2, . . . , Nb, is created by isolating and arranging in series the PQRST characteristic segment into a length-qNb even-symmetric sequence:




  
    r
    PQRST
  
  =
  
    
      {
      
        
          
            
              
                
                  r
                  
                    PQRST
                    ,
                    1
                  
                
                ⁡
                
                  [
                  1
                  ]
                
              
              ,
              
                ...
                ⁢
                
                  
                
                ⁢
                
                  
                    r
                    
                      PQRST
                      ,
                      1
                    
                  
                  ⁡
                  
                    [
                    p
                    ]
                  
                
                ⁢
                
                  
                  
                    
                      
                        r
                        
                          PQRST
                          ,
                          2
                        
                      
                      ⁡
                      
                        [
                        p
                        ]
                      
                    
                    ,
                    ...
                    ⁢
                    
                      
                    
                    ,
                    
                      
                        r
                        
                          PQRST
                          ,
                          2
                        
                      
                      ⁡
                      
                        [
                        1
                        ]
                      
                    
                  
                  
                
                ⁢
                
                  
                
                ⁢
                ...
              
            
          
        
        
          
            
              
                
                  
                  
                    
                      
                        r
                        
                          PQRST
                          ,
                          
                            
                              N
                              b
                            
                            -
                            1
                          
                        
                      
                      ⁡
                      
                        [
                        1
                        ]
                      
                    
                    ,
                    ...
                    ⁢
                    
                      
                    
                    ,
                    
                      
                        r
                        
                          PQRST
                          ,
                          
                            N
                            
                              b
                              -
                              1
                            
                          
                        
                      
                      ⁡
                      
                        [
                        p
                        ]
                      
                    
                  
                  
                
                ⁢
                
                  
                    r
                    
                      PQRST
                      ,
                      
                        N
                        b
                      
                    
                  
                  ⁡
                  
                    [
                    p
                    ]
                  
                
              
              ,
              ...
              ⁢
              
                
              
              ,
              
                
                  r
                  
                    PQRST
                    ,
                    
                      N
                      b
                    
                  
                
                ⁡
                
                  [
                  1
                  ]
                
              
            
          
        
      
      }
    
    .
  




FIG. 7B shows an example of a length-859 (q=859) PQRST characteristic window of 50 selected beats in even-symmetric series.
3. Refining the Characteristic Segment or Characteristic Window
Prior to creating the prime morphological ECG, the characteristic segment or the characteristic window may be refined by averaging the characteristic segment or the characteristic window. After removing the arrhythmological aperiodicities, the effects of morphological aperiodicities such as beat morphological variations, sub-fundamental frequency oscillations, and white noise may be reduced or removed by averaging.
The averaging of an ECG is a technique known in the art to reduce noise. The signal-averaged ECG (SAECG) is used in detection of sustained ventricular arrhythmias or sudden cardiac death in post-infarction patients, as well as in predicting cardiac and arrhythmic mortality. See Sierra et al. (1997) Proc. 19th Int'l Conf. IEEE/EMBS: 76, and Camm, et al., eds. (2006) THE ESC TEXTBOOK OF CARDIOVASCULAR MEDICINE, Blackwell, which are herein incorporated by reference.
As exemplified herein, the averaged JT characteristic segment ( rJT) of length-p of an ECG lead {rJT,i[1], rJT,i[2], . . . , rJT,i[p]}, for selected beats i=1, 2, . . . , Nb, is created by taking the average:




  
    
      
        
          r
          _
        
        JT
      
      ⁡
      
        [
        n
        ]
      
    
    =
    
      
        1
        
          N
          b
        
      
      ⁢
      
        
          ∑
          
            i
            =
            1
          
          
            N
            b
          
        
        ⁢
        
          
            r
            
              JT
              ,
              i
            
          
          ⁡
          
            [
            n
            ]
          
        
      
    
  
  ,




n=1, 2, . . . , p. FIG. 8A shows an example of the averaged JT characteristic segment of length-512 of lead V5 of an ECG.

Similarly, an example that finds the averaged PQRST characteristic window ( rPQRST) of length-q of an ECG lead {rPQRST,i[1], rPQRST,i[2], . . . , rPQRST,i[q]}, for selected beats i=1, 2, . . . , Nb, is created by taking the average:




  
    
      
        
          r
          _
        
        PQRST
      
      ⁡
      
        [
        n
        ]
      
    
    =
    
      
        1
        
          N
          b
        
      
      ⁢
      
        
          ∑
          
            i
            =
            1
          
          
            N
            b
          
        
        ⁢
        
          
            r
            
              PQRST
              ,
              i
            
          
          ⁡
          
            [
            n
            ]
          
        
      
    
  
  ,




n=1, 2, . . . , q. FIG. 8B shows an example of the averaged PQRST characteristic window of length-859 of lead V5 of an ECG.

Alternatively, after averaging, the averaged characteristic segment or averaged characteristic window may be repeated by any positive integer number of times to give the same morphological information as the averaged characteristic segment or averaged characteristic window. For example, the averaged characteristic segment comprising the JT characteristic segment of length-p of an ECG lead rJT={ rJT[1], rJT[2], . . . , rJT[p]}, is repeated several times in an even-symmetric series to form a repeated averaged JT segment: JT={ rJT[1], . . . , rJT[p]| rJT[p], . . . , rJT[1]| . . . , | rJT[1], . . . rJT[p]| rJT[p], . . . , rJT[1]}. FIG. 9A shows an example of the averaged JT characteristic segment of length-1000 of lead V5 of an ECG repeated 6 times. Similarly, for example, the averaged characteristic segment comprising the PQRST characteristic window of length-q of an ECG lead rPQRST={ rPQRST[1], rPQRST[2], . . . , rPQRST[q]}, is repeated several times in an even-symmetric series to form a repeated averaged PQRST window:





  
    
      r
      ⃛
    
    PQRST
  
  =
  
    
      {
      
        
          
            
              
                
                  
                    r
                    _
                  
                  PQRST
                
                ⁡
                
                  [
                  1
                  ]
                
              
              ,
              ...
              ⁢
              
                
              
              ,
              
                
                  
                    
                      r
                      _
                    
                    PQRST
                  
                  ⁡
                  
                    [
                    q
                    ]
                  
                
                ⁢
                
                  
                  
                    
                      
                        
                          r
                          _
                        
                        PQRST
                      
                      ⁡
                      
                        [
                        q
                        ]
                      
                    
                    ,
                    ...
                    ⁢
                    
                      
                    
                    ,
                    
                      
                        
                          r
                          _
                        
                        PQRST
                      
                      ⁡
                      
                        [
                        1
                        ]
                      
                    
                  
                  
                
                ⁢
                
                  
                
                ⁢
                ...
              
            
          
        
        
          
            
              
                
                  
                  
                    
                      
                        
                          r
                          _
                        
                        PQRST
                      
                      ⁡
                      
                        [
                        1
                        ]
                      
                    
                    ,
                    ...
                    ⁢
                    
                      
                    
                    ,
                    
                      
                        
                          r
                          _
                        
                        PQRST
                      
                      ⁡
                      
                        [
                        q
                        ]
                      
                    
                  
                  
                
                ⁢
                
                  
                    
                      r
                      _
                    
                    PQRST
                  
                  ⁡
                  
                    [
                    q
                    ]
                  
                
              
              ,
              ...
              ⁢
              
                
              
              ,
              
                
                  
                    r
                    _
                  
                  PQRST
                
                ⁡
                
                  [
                  1
                  ]
                
              
            
          
        
      
      }
    
    .
  




FIG. 9B shows an example of the averaged PQRST characteristic window of length-859 of lead V5 of an ECG repeated 6 times.

4. Density Function of a Prime Morphological ECG

After the time-domain expression of a prime morphological ECG is obtained, morphological information of beats from the prime morphological ECG may be expressed as a density function. “Density” as applied to a prime morphological ECG is the harmonic peak energy (magnitude) of the discrete Fourier transform of the prime morphological ECG. “Density function” as applied to a prime morphological ECG is the density at a frequency (for a characteristic window) or a frequency unit (for a characteristic segment) equal to the sampling rate multiplied by the ordered number of the harmonic peak divided by the length of the period of the prime morphological ECG.
As exemplified herein, the discrete cosine transform (DCT) of the prime morphological ECG, which includes (1) isolated characteristic segment or isolated characteristic window in series, (2) averaged characteristic segment or characteristic window, and (3) repetitions of averaged characteristic segment or characteristic window, is taken. The magnitude of the DCT of the prime morphological ECG at the harmonic frequencies or frequency locations of the prime morphological ECG are grouped and indexed to form the density function. Since the cosine transform of a real sequence is symmetric, the distinct harmonics that form the density function is half of the total number of harmonics of the sequence in the frequency domain. See Oppenheim et al. (2006) SIGNALS AND SYSTEMS, Prentice, which is herein incorporated by reference.
Harmonics may be observed by taking the DCT of the isolated characteristic segment or isolated characteristic window in series. An isolated characteristic segment or characteristic window in series is created by identifying, isolating, and arranging in series the characteristic segment or the characteristic window of ECG. To observe the harmonics, first the magnitude of the DCT is taken of the isolated characteristic segment in series or the isolated characteristic window in series. Then the harmonic powers at the harmonic locations are grouped and indexed into the density function. As exemplified herein, the harmonics of a length-pNb isolated characteristic segment comprising the RT characteristic segment of length-p of an ECG lead in even-symmetric series




  (
  
    
      r
      JT
    
    =
    
      {
      
        
          
            
              
                
                  r
                  
                    JT
                    ,
                    1
                  
                
                ⁡
                
                  [
                  1
                  ]
                
              
              ,
              ...
              ⁢
              
                
              
              ,
              
                
              
              ⁢
              
                
                  
                    r
                    
                      JT
                      ,
                      1
                    
                  
                  ⁡
                  
                    [
                    p
                    ]
                  
                
                ⁢
                
                  
                  
                    
                      
                        r
                        
                          JT
                          ,
                          2
                        
                      
                      ⁡
                      
                        [
                        p
                        ]
                      
                    
                    ,
                    ...
                    ⁢
                    
                      
                    
                    ,
                    
                      
                        r
                        
                          JT
                          ,
                          2
                        
                      
                      ⁡
                      
                        [
                        1
                        ]
                      
                    
                  
                  
                
                ⁢
                
                  
                
                ⁢
                ...
              
            
          
        
        
          
            
              
                
                  
                    
                    
                      
                        
                          r
                          
                            JT
                            ,
                            
                              
                                N
                                b
                              
                              -
                              1
                            
                          
                        
                        ⁡
                        
                          [
                          1
                          ]
                        
                      
                      ,
                      ...
                      ⁢
                      
                        
                      
                      ,
                      
                        
                          r
                          
                            JT
                            ,
                            
                              N
                              
                                b
                                -
                                1
                              
                            
                          
                        
                        ⁡
                        
                          [
                          p
                          ]
                        
                      
                    
                    
                  
                  ⁢
                  
                    
                      r
                      
                        JT
                        ,
                        
                          N
                          b
                        
                      
                    
                    ⁡
                    
                      [
                      p
                      ]
                    
                  
                
                ,
                ...
                ⁢
                
                  
                
                ,
                
                  
                    r
                    
                      JT
                      ,
                      
                        N
                        b
                      
                    
                  
                  ⁡
                  
                    [
                    1
                    ]
                  
                
              
              
            
          
        
      
      }
    
  
  )




is computed by:

    
    
        1. Taking the magnitude (RRT) of the DFT of rJT:
    
    






  
    
      
        R
        JT
      
      ⁡
      
        [
        k
        ]
      
    
    =
    
      
      
        
          ∑
          
            n
            =
            1
          
          
            pN
            b
          
        
        ⁢
        
          
            
              r
              JT
            
            ⁡
            
              [
              n
              ]
            
          
          ⁢
          
            cos
            ⁡
            
              [
              
                
                  π
                  N
                
                ⁢
                
                  (
                  
                    n
                    +
                    
                      1
                      2
                    
                  
                  )
                
                ⁢
                k
              
              ]
            
          
        
      
      
    
  
  ,




k=0, 1, . . . , pNb−1

    
    
        2. Grouping and indexing the harmonics into the density function (hJT) by isolating the RJT at positive integer multiples of Nb:

hJT[k]=RJT[kNb], k=1,2, . . . ,p/2−1

    
    


The frequency unit ({tilde over (f)}) of the isolated characteristic segment in series is defined as an integer multiple of the quotient the sampling rate (fS), and the length of the isolated characteristic segment in series (pNb): {tilde over (f)}(k)=fSk/pNb, k=0, 1, . . . , pNb−1.
FIG. 10A shows an example of the magnitude of the DFT of a length-1000 (p=1000) JT characteristic segment resampled to 512 samples per second (fS=512) of 60 selected beats in series, in which the 1st harmonic peak is located at {tilde over (f)}=fS(Nb)/pNb=1, the 2nd harmonic peak is located at {tilde over (f)}=fS(2Nb)/pNb=2, the 3rd harmonic peak is located at {tilde over (f)}=fS(3Nb)/pNb=3, and so on.
Similarly, an example of the harmonics of a length-qNb isolated characteristic window comprising the PQRST characteristic window of length-q of an ECG lead in even-symmetric series




  
    r
    PQRST
  
  =
  
    {
    
      
        
          
            
              
                r
                
                  PQRST
                  ,
                  1
                
              
              ⁡
              
                [
                1
                ]
              
            
            ,
            ...
            ⁢
            
              
            
            ,
            
              
                
                  r
                  
                    PQRST
                    ,
                    1
                  
                
                ⁡
                
                  [
                  q
                  ]
                
              
              ⁢
              
                
                
                  
                    
                      r
                      
                        PQRST
                        ,
                        2
                      
                    
                    ⁡
                    
                      [
                      q
                      ]
                    
                  
                  ,
                  ...
                  ⁢
                  
                    
                  
                  ,
                  
                    
                      r
                      
                        PQRST
                        ,
                        2
                      
                    
                    ⁡
                    
                      [
                      1
                      ]
                    
                  
                
                
              
              ⁢
              
                
              
              ⁢
              ...
            
          
        
      
      
        
          
            
              
                
                
                  
                    
                      r
                      
                        PQRST
                        ,
                        
                          
                            N
                            b
                          
                          -
                          1
                        
                      
                    
                    ⁡
                    
                      [
                      1
                      ]
                    
                  
                  ,
                  ...
                  ⁢
                  
                    
                  
                  ,
                  
                    
                      r
                      
                        PQRST
                        ,
                        
                          
                            N
                            b
                          
                          -
                          1
                        
                      
                    
                    ⁡
                    
                      [
                      q
                      ]
                    
                  
                
                
              
              ⁢
              
                
                  r
                  
                    PQRST
                    ,
                    
                      N
                      b
                    
                  
                
                ⁡
                
                  [
                  q
                  ]
                
              
            
            ,
            ...
            ⁢
            
              
            
            ,
            
              
                r
                
                  PQRST
                  ,
                  
                    N
                    b
                  
                
              
              ⁡
              
                [
                1
                ]
              
            
          
        
      
    
    }
  




computed by:

    
    
        1. Taking the magnitude (RPQRST) of the DCT of rPQRST:
    
    






  
    
      
        R
        PQRST
      
      ⁡
      
        [
        k
        ]
      
    
    =
    
      
      
        
          ∑
          
            n
            =
            1
          
          
            pN
            b
          
        
        ⁢
        
          
            
              r
              PQRST
            
            ⁡
            
              [
              n
              ]
            
          
          ⁢
          
            cos
            ⁡
            
              [
              
                
                  π
                  N
                
                ⁢
                
                  (
                  
                    n
                    +
                    
                      1
                      2
                    
                  
                  )
                
                ⁢
                k
              
              ]
            
          
        
      
      
    
  
  ,




k=0, 1, . . . , qNb−1

    
    
        2. Grouping and indexing the harmonics into the density function (hPQRST):

hPQRST[k]=RPQRST[kNb], k=1,2, . . . ,q/2−1

    
    


FIG. 10B shows an example of the magnitude of the DCT of a length-859 (q=859) PQRST characteristic window sampled at 1000 samples per second (fS=1000) of 50 selected beats in series, in which the 1st harmonic peak is located at




  
    f
    =
    
      
        
          (
          
            fs
            q
          
          )
        
        ⁢
        
          (
          1
          )
        
      
      =
      
        1000
        ⁢
        
          /
        
        ⁢
        859
        ⁢
        
          
        
        ⁢
        Hz
      
    
  
  ,




the 2nd harmonic peak is located at





  
    f
    =
    
      
        
          (
          
            fs
            q
          
          )
        
        ⁢
        
          (
          2
          )
        
      
      =
      
        2000
        ⁢
        
          /
        
        ⁢
        859
        ⁢
        
          
        
        ⁢
        Hz
      
    
  
  ,




the 3rd harmonic peak is located at





  
    f
    =
    
      
        
          (
          
            fs
            q
          
          )
        
        ⁢
        
          (
          3
          )
        
      
      =
      
        3000
        ⁢
        
          /
        
        ⁢
        859
        ⁢
        
          
        
        ⁢
        Hz
      
    
  
  ,




and so on.

Harmonics may be observed by taking the DCT of the averaged characteristic segment or averaged characteristic window. An averaged characteristic segment or characteristic window is created by identifying, isolating, and averaging the characteristic segment or the characteristic window of ECG. To observe the harmonics, first the magnitude of the DCT is taken of the averaged characteristic segment or the averaged characteristic window. Then the harmonic powers at the harmonic locations are grouped and indexed into the density function.
As exemplified herein, the harmonics of an averaged characteristic segment comprising the RT characteristic segment of length-p of an ECG lead ( rJT={ rJT[1], rJT[2], . . . , rJT[p]}) is computed by:

    
    
        1. Taking the magnitude ( RJT) of the point DCT of rJT:
    
    






  
    
      
        
          R
          _
        
        JT
      
      ⁡
      
        [
        k
        ]
      
    
    =
    
      
      
        
          ∑
          
            n
            =
            1
          
          p
        
        ⁢
        
          
            
              
                r
                _
              
              JT
            
            ⁡
            
              [
              n
              ]
            
          
          ⁢
          
            cos
            ⁡
            
              [
              
                
                  π
                  N
                
                ⁢
                
                  (
                  
                    n
                    +
                    
                      1
                      2
                    
                  
                  )
                
                ⁢
                k
              
              ]
            
          
        
      
      
    
  
  ,




k=0, 1, . . . , p−1

    
    
        2. Grouping and indexing the harmonics into the density function ( hJT):

 hJT[k]= RJT[k], k=1,2, . . . ,p/2−1

    
    


The frequency unit ( {tilde over (f)}) of the averaged characteristic segment is defined as an integer multiple of the quotient the sampling rate (fS), and the length of the isolated characteristic segment in series (p): {tilde over (f)}(k)=fSk/p, {tilde over (f)}(k)=fSk/pNb.
FIG. 11A shows an example of the magnitude of the DCT of a length-512 (p=512) averaged JT characteristic segment resampled to 512 samples per second (fS=512), in which the 1st harmonic peak is located at {tilde over (f)}=fS(1)/p=1, the 2nd harmonic peak is located at {tilde over (f)}=fS(2)/p=2, the 3rd harmonic peak is located at {tilde over (f)}=fS(3)/p=3, and so on.
Similarly, an example of the harmonics of an averaged characteristic window comprising the PQRST characteristic window of length-q of an ECG lead ( rPQRST=( rPQRST[1], rPQRST[2], . . . , rPQRST[q]) is computed by:

    
    
        1. Taking the magnitude ( RPQRST) of the DCT of rPQRST:
    
    






  
    
      
        
          R
          _
        
        PQRST
      
      ⁡
      
        [
        k
        ]
      
    
    =
    
      
      
        
          ∑
          
            n
            =
            1
          
          p
        
        ⁢
        
          
            
              
                r
                _
              
              PQRST
            
            ⁡
            
              [
              n
              ]
            
          
          ⁢
          
            cos
            ⁡
            
              [
              
                
                  π
                  N
                
                ⁢
                
                  (
                  
                    n
                    +
                    
                      1
                      2
                    
                  
                  )
                
                ⁢
                k
              
              ]
            
          
        
      
      
    
  
  ,




k=0, 1, . . . , q−1

    
    
        2. Grouping and indexing the harmonics into the density function ( hPQRST):

 hPQRST[k]= RPQRST[k], k=1,2, . . . ,q/2−1

    
    


FIG. 11B shows an example of the magnitude of the DCT of a length-859 (q=859) averaged PQRST characteristic window sampled at 1000 samples per second (fS=1000), in which the 1st harmonic peak is located at f=(fS/q)(1)=1000/859 Hz, the 2nd harmonic peak is located at f=(fS/q)(2)=2000/859 Hz, the 3rd harmonic peak is located at f=(fS/q)(3)=3000/859 Hz, and so on.
Harmonics may be observed by taking the DCT of the repeated averaged characteristic segment or repeated averaged characteristic window. A repeated averaged characteristic segment or characteristic window is created by repeating the averaged characteristic segment or the averaged characteristic window of ECG. To observe the harmonics, first the magnitude of the DCT is taken of the repeated averaged characteristic segment or the repeated averaged characteristic window. Then the harmonic powers at the harmonic locations are grouped and indexed into the density function.
As exemplified herein, the harmonics of an averaged characteristic segment comprising the RT characteristic segment of length-p of an ECG lead and repeated NM times




  (
  
    
      
        
          r
          ⃛
        
        JT
      
      =
      
        {
        
          
            
              
                
                  
                    
                      r
                      _
                    
                    JT
                  
                  ⁡
                  
                    [
                    1
                    ]
                  
                
                ,
                ...
                ⁢
                
                  
                
                ,
                
                  
                    
                      
                        r
                        _
                      
                      JT
                    
                    ⁡
                    
                      [
                      p
                      ]
                    
                  
                  ⁢
                  
                    
                    
                      
                        
                          
                            r
                            _
                          
                          JT
                        
                        ⁡
                        
                          [
                          p
                          ]
                        
                      
                      ,
                      ...
                      ⁢
                      
                        
                      
                      ,
                      
                        
                          
                            r
                            _
                          
                          JT
                        
                        ⁡
                        
                          [
                          1
                          ]
                        
                      
                    
                    
                  
                  ⁢
                  
                    
                  
                  ⁢
                  ...
                
              
            
          
          
            
              
                
                
                  
                    
                      
                        r
                        _
                      
                      JT
                    
                    ⁡
                    
                      [
                      1
                      ]
                    
                  
                  ,
                  ...
                  ⁢
                  
                    
                  
                  ,
                  
                    
                      
                        
                          r
                          _
                        
                        JT
                      
                      ⁡
                      
                        [
                        p
                        ]
                      
                    
                    ⁢
                    
                      
                      
                        
                          
                            
                              r
                              _
                            
                            JT
                          
                          ⁡
                          
                            [
                            p
                            ]
                          
                        
                        ,
                        ...
                        ⁢
                        
                          
                        
                        ,
                        
                          
                            
                              r
                              _
                            
                            JT
                          
                          ⁡
                          
                            [
                            1
                            ]
                          
                        
                      
                    
                  
                
              
            
          
        
        }
      
    
    ,
  




length-pNM) is computed by:

    
    
        1. Taking the magnitude (JT) of the DFT of JT:
    
    






  
    
      
        
          R
          ⃛
        
        JT
      
      ⁡
      
        [
        k
        ]
      
    
    =
    
      
      
        
          ∑
          
            n
            =
            1
          
          
            pN
            M
          
        
        ⁢
        
          
            
              
                r
                ⃛
              
              JT
            
            ⁡
            
              [
              n
              ]
            
          
          ⁢
          
            cos
            ⁡
            
              [
              
                
                  π
                  N
                
                ⁢
                
                  (
                  
                    n
                    +
                    
                      1
                      2
                    
                  
                  )
                
                ⁢
                k
              
              ]
            
          
        
      
      
    
  
  ,




k=0, 1, . . . , pNM−1

    
    
        2. Grouping and indexing the harmonics into the density function (JT):

JT[k]=JT[kNM], k=1,2, . . . ,p/2−1

    
    


The frequency unit () of the repeated averaged characteristic segment is defined as an integer multiple of the quotient the sampling rate (fS), and the length of the isolated characteristic segment in series (pNM): (k)=fSk/pNM, k=0, 1, . . . , pNM−1.
FIG. 12A shows an example of the magnitude of the DCT of a length-512 (p=512) averaged JT characteristic segment resampled to 512 samples per second (fS=512) repeated 6 times (NM=6), in which the 1st harmonic peak is located at




  
    
      
        f
        ⃛
      
      ~
    
    =
    
      
        
          fs
          ⁡
          
            (
            
              N
              M
            
            )
          
        
        
          pN
          M
        
      
      =
      1
    
  
  ,




the 2nd harmonic peak is located at





  
    
      
        f
        ⃛
      
      ~
    
    =
    
      
        
          fs
          ⁡
          
            (
            
              2
              ⁢
              
                N
                M
              
            
            )
          
        
        
          pN
          M
        
      
      =
      2
    
  
  ,




the 3rd harmonic peak is located at





  
    
      
        f
        ⃛
      
      ~
    
    =
    
      
        
          fs
          ⁡
          
            (
            
              3
              ⁢
              
                N
                M
              
            
            )
          
        
        
          pN
          M
        
      
      =
      3
    
  
  ,




and so on.

Similarly, an example of the harmonics of an averaged characteristic segment comprising the PQRST characteristic window of length-q of an ECG lead and repeated NM times




  (
  
    
      
        
          r
          ⃛
        
        PQRST
      
      =
      
        {
        
          
            
              
                
                  
                    
                      r
                      _
                    
                    PQRST
                  
                  ⁡
                  
                    [
                    1
                    ]
                  
                
                ,
                ...
                ⁢
                
                  
                
                ,
                
                  
                    
                      
                        r
                        _
                      
                      PQRST
                    
                    ⁡
                    
                      [
                      q
                      ]
                    
                  
                  ⁢
                  
                    
                    
                      
                        
                          
                            r
                            _
                          
                          PQRST
                        
                        ⁡
                        
                          [
                          q
                          ]
                        
                      
                      ,
                      ...
                      ⁢
                      
                        
                      
                      ,
                      
                        
                          
                            r
                            _
                          
                          PQRST
                        
                        ⁡
                        
                          [
                          1
                          ]
                        
                      
                    
                    
                  
                  ⁢
                  
                    
                  
                  ⁢
                  ...
                
              
            
          
          
            
              
                
                
                  
                    
                      
                        r
                        _
                      
                      PQRST
                    
                    ⁡
                    
                      [
                      1
                      ]
                    
                  
                  ,
                  ...
                  ⁢
                  
                    
                  
                  ,
                  
                    
                      
                        
                          r
                          _
                        
                        PQRST
                      
                      ⁡
                      
                        [
                        q
                        ]
                      
                    
                    ⁢
                    
                      
                      
                        
                          
                            
                              r
                              _
                            
                            PQRST
                          
                          ⁡
                          
                            [
                            q
                            ]
                          
                        
                        ,
                        ...
                        ⁢
                        
                          
                        
                        ,
                        
                          
                            
                              r
                              _
                            
                            PQRST
                          
                          ⁡
                          
                            [
                            1
                            ]
                          
                        
                      
                    
                  
                
              
            
          
        
        }
      
    
    ,
  




length-qNM) is computed by:

    
    
        1. Taking the magnitude ( RPQRST) of the qNM-point DCT of rPQRST:
    
    






  
    
      
        
          R
          ⃛
        
        PQRST
      
      ⁡
      
        [
        k
        ]
      
    
    =
    
      
      
        
          ∑
          
            n
            =
            1
          
          
            qN
            M
          
        
        ⁢
        
          
            
              
                r
                ⃛
              
              PQRST
            
            ⁡
            
              [
              n
              ]
            
          
          ⁢
          
            cos
            ⁡
            
              [
              
                
                  π
                  N
                
                ⁢
                
                  (
                  
                    n
                    +
                    
                      1
                      2
                    
                  
                  )
                
                ⁢
                k
              
              ]
            
          
        
      
      
    
  
  ,




k=0, 1, . . . , qNM−1

    
    
        2. Grouping and indexing the harmonics into the density function (PQRST):

PQRST[k]=PQRST[kNM], k=1,2, . . . ,q/2−1

    
    


FIG. 12B shows an example of the magnitude of the DFT of a length-859 (q=859) averaged PQRST characteristic window sampled at 1000 samples per second (fS=1000) repeated 6 times (NM=6), in which the 1st harmonic peak is located at




  
    f
    =
    
      
        
          (
          
            fs
            q
          
          )
        
        ⁢
        
          (
          1
          )
        
      
      =
      
        1000
        ⁢
        
          /
        
        ⁢
        859
        ⁢
        
          
        
        ⁢
        Hz
      
    
  
  ,




the 2nd harmonic peak is located at





  
    f
    =
    
      
        
          (
          
            fs
            q
          
          )
        
        ⁢
        
          (
          2
          )
        
      
      =
      
        2000
        ⁢
        
          /
        
        ⁢
        859
        ⁢
        
          
        
        ⁢
        Hz
      
    
  
  ,




the 3rd harmonic peak is located at





  
    f
    =
    
      
        
          (
          
            fs
            q
          
          )
        
        ⁢
        
          (
          3
          )
        
      
      =
      
        3000
        ⁢
        
          /
        
        ⁢
        859
        ⁢
        
          
        
        ⁢
        Hz
      
    
  
  ,




and so on.

The above examples (hJT, hJT, JT, hPQRST, hPQRST, PQRST) show that, regardless of how many distinct or similar (averaged) characteristic segments or characteristic windows are used or repeated in the creation of the density function, the length of the density function is half the length of one characteristic segment or one characteristic window.
5. Distribution Function of a Prime Morphological ECG
After the density function is obtained, an accounting of the distribution of the energy of the harmonics may be calculated. “Distribution” as applied to a prime morphological ECG is the sum of the density from zero to a given frequency (for a characteristic window) or a frequency unit (for a characteristic segment) equal to the sampling rate multiplied by the ordered number of the harmonic peak divided by the length of the period of the prime morphological ECG. “Distribution function” as applied to a prime morphological ECG is the sum of the density functions over a given range of harmonics. In some embodiments, the sum is a weighted sum. Those skilled in the art may readily optimize the weight a sum is given for a desired application.
As exemplified herein, the distribution function (H) of a density function (hJT[k], k=1, 2, . . . , p/2−1) of a prime morphological ECG created from a JT characteristic segment of length-p of an ECG lead, is computed by: H[k]=Σl=1khJT[l], for k=1, 2, . . . , p/2−1.
Similarly, an example of the distribution function (H) of a density function (hPQRST[k], k=1, 2, . . . , q/2−1) of a prime morphological ECG created from a PQRST characteristic window of length-q of an ECG lead, is computed by: H[k]=Σl=1hPQRST[l], for k=1, 2, . . . , q/2−1.
The lead of the harmonic distribution function is denoted by the subscript. For example, HaVL[k] is the harmonic distribution of lead a VL.
B. Prime Arrhythmological ECG
Once the ECG is obtained, a prime arrhythmological ECG is made by isolating the arrhythmological information of beats from the ECG by making the morphological information constant, and may further include refining the arrhythmological information.
There are a variety of methods known in the art for isolating arrhythmological information, such as normal-to-normal (NN) interval variability methods that include the RR interval variability analysis and the like, and time interval variability methods that include QT interval variability analysis, JT interval variability analysis, RT interval variability analysis, and the like. See Kurths et al. (1995) Chaos 5(1):88, Berger et al. (1997) Circulation 96(5):1557, and Sosnowski et al. (2001) Europace 3:39, which are herein incorporated by reference. There are a variety of devices known in the art for isolating arrhythmological information based on these prior art methods, such devices include the HOLTER MONITORING SYSTEM® available from Philips (Amsterdam, Netherlands), the CARDIO HOLTER ECG SYSTEM® available from Nasiff Associates (Brewerton, N.Y.), and the like.
Unfortunately, prior art interval variability methods provide limited arrhythmological information for the analysis of harmonic disintegration caused by arrhythmological aperiodicities such as leakage due to aperiodic windowing and periodic rate variability.
As provided herein, a prime arrhythmological ECG is made by a waveform train. A “waveform train” is a series of waveforms over time periods in the time domain, wherein all the waveforms have the same morphology over these time periods, and wherein no partial period is present. An ideal waveform train is a waveform train in which all waveforms are spaced equidistant from each other. A waveform train based on an ECG is a waveform train in which the waveform at each beat is placed in relation to a beat marker of the ECG.
1. Isolating Arrhythmological Information
Once the ECG is obtained, then beat markers for the beats are selected as disclosed herein.
2. Creating the Prime Arrhythmological ECG
After the beat marker is selected and the arrhythmological information is isolated, a waveform train may be created based on the beat markers. Waveforms trains known in the art include the impulse train (Dirac comb), the square wave, the triangular wave, the sawtooth wave, the sine wave, the cosine wave, and the like. See Oppenheim et al. (2006) SIGNALS AND SYSTEMS, Prentice, which is herein incorporated by reference.
The choice of the waveform for the waveform train depends on the desired transform domain response. Transform domain response may be observed by taking a transform of the ideal discrete-time waveform train. For example, an ideal discrete-time impulse train has a frequency-domain response of a train of impulses of equal heights. An ideal discrete-time sine wave has a frequency-domain response of a single impulse. An ideal discrete-time square wave has a frequency-domain response of a train of impulses logarithmically decreasing with an increase in frequency. See Oppenheim et al. (2006) SIGNALS AND SYSTEMS, Prentice, which is herein incorporated by reference.
FIG. 13A shows an example of an ideal impulse train and FIG. 13B its frequency-domain transform. FIG. 13C shows an example of an ideal sine wave train and FIG. 13D its frequency-domain transform. FIG. 13E shows an example of an ideal square wave train and FIG. 13F its frequency-domain transform. FIG. 13G shows an example of an ideal triangular wave train and FIG. 13H its frequency-domain transform.
As exemplified herein, an impulse train based on a beat marker of an ECG representing the R-peak was created by first identifying a beat marker representing the R-peak for all beats. An impulse train of the same length as the ECG in which the value at the beat marker for each beat is 1, and the value at all other time locations for each beat was zero, is created. Then any partial beat at the start or the end of the impulse train was removed. An impulse train based on a beat marker representing the R-peak (bR[i], i=1, 2, . . . , Nb0), for beats i=1, 2, . . . , Nb0 for a length-N ECG sampled at 1000 samples per second is created by:

    
    
        1. Creating a sequence of zeros (aI0) of length N: aI0[n]={0: n=1, 2, . . . , N}
        2. Changing the values of aI0 at beat marker locations to 1: aI0[n]={1: n=bR[1], bR[2], . . . , b[Nb0]}.
        3. Removing any partial beats to create the impulse train (aI): aI[n]=aI0[n+bR[1]−1], n=1, 2, . . . , bR[Nb0]−bR[1]
    
    


FIG. 14 shows an example of the impulse train based on an R-wave beat marker of an ECG sampled at 1000 samples per second.
3. Refining the Prime Arrhythmological ECG
Prior to creating the prime arrhythmological ECG, the waveform train may be refined by using a waveform that is specific to the type of transform to be taken for subsequent transform-domain analysis. Time-domain simplicity does not imply transform-domain simplicity. For example, the impulse train, which represents the simplest waveform train in the time-domain, has the appearance of an impulse train in the frequency domain, as shown in FIG. 13B. In contrast, the sine wave, being of a higher complexity compared to the impulse train, has the appearance of a single impulse in the frequency domain, as shown in FIG. 13D.
The choice of the waveform for the refinement of the waveform train depends on the type of transform to be taken. For example, if one is interested in using a discrete sinusoidal transform such as the discrete Fourier transform or the discrete cosine transform (DCT), one would select the a sinusoid such as a sine wave or a cosine wave, as sinusoids form the basis for sinusoidal transforms. See Oppenheim et al. (2006) SIGNALS AND SYSTEMS, Prentice, which is herein incorporated by reference. Similarly, if one is interested in using a discrete wavelet transform such as a Daubechies transform, one would select a wavelet such as a Daubechies wavelet as wavelets form the basis for wavelet transforms. See Stark (2005) WAVELETS AND SIGNAL PROCESSING, Springer, which is herein incorporated by reference.
For example, a discrete sine wave based on a beat marker of an ECG representing the R-peak was created by first identifying a beat marker representing the R-peak for all beats. The beat periods in between the beat marker of the identified beats were then computed. Then for each beat the sine function was taken of the range of zero to 2π([0,2π]) divided over the beat period, and was placed into the beat in place of the ECG. Then any partial beat at the start or the end of the impulse train was excluded.
For example, a sine wave of the range [0,2π], based on a beat marker representing the R-peak (bR[i], i=1, 2, . . . , Nb0), for beats i=1, 2, . . . , Nb0 for a length-N ECG sampled at 1000 samples per second is created by:

    
    
        1. Computing the beat periods (dnb0): dnb0[i]=bR[i+1]−bR[i], for beats i=1, 2, . . . , Nb0−1
        2. Dividing the range [0,2π] over each beat period dnb0[i](i=1, 2, . . . , Nb0−1) to get a time sequence (ti) at each beat:
    
    






  
    
      t
      i
    
    ⁡
    
      [
      n
      ]
    
  
  =
  
    
      
        
          2
          ⁢
          π
          ⁢
          
            
          
          ⁢
          n
        
        
          
            dn
            
              b
              ⁢
              
                
              
              ⁢
              0
            
          
          ⁡
          
            [
            i
            ]
          
        
      
      ⁢
      
        
          t
          i
        
        ⁡
        
          [
          n
          ]
        
      
    
    =
    
      2
      ⁢
      π
      ⁢
      
        
      
      ⁢
      n
      ⁢
      
        /
      
      ⁢
      
        
          
            dn
            
              b
              ⁢
              
                
              
              ⁢
              0
            
          
          ⁡
          
            [
            i
            ]
          
        
        .
      
    
  




n=1, 2, . . . , dnb0[i].

    
    
        3. Computing the sine function of ti[n] for each beat period, and replacing the ECG of this period with the sine function to form the length-N−bR[NR]−bR[1] waveform train (aS):
    
    






  
    a
    s
  
  =
  
    
      {
      
        
          
            
              
                sin
                ⁡
                
                  (
                  
                    
                      t
                      1
                    
                    ⁡
                    
                      [
                      1
                      ]
                    
                  
                  )
                
              
              ,
              ...
              ⁢
              
                
              
              ,
              
                
                  sin
                  ⁡
                  
                    (
                    
                      
                        t
                        1
                      
                      ⁡
                      
                        [
                        
                          
                            dn
                            
                              b
                              ⁢
                              
                                
                              
                              ⁢
                              0
                            
                          
                          ⁡
                          
                            [
                            1
                            ]
                          
                        
                        ]
                      
                    
                    )
                  
                
                
              
            
          
        
        
          
            
              
                sin
                ⁡
                
                  (
                  
                    
                      t
                      1
                    
                    ⁡
                    
                      [
                      1
                      ]
                    
                  
                  )
                
              
              ,
              ...
              ⁢
              
                
              
              ,
              
                
                  sin
                  ⁡
                  
                    (
                    
                      
                        t
                        2
                      
                      ⁡
                      
                        [
                        
                          
                            dn
                            
                              b
                              ⁢
                              
                                
                              
                              ⁢
                              0
                            
                          
                          ⁡
                          
                            [
                            2
                            ]
                          
                        
                        ]
                      
                    
                    )
                  
                
                
              
            
          
        
        
          
            
              
                sin
                ⁡
                
                  (
                  
                    
                      t
                      1
                    
                    ⁡
                    
                      [
                      1
                      ]
                    
                  
                  )
                
              
              ,
              ...
              ⁢
              
                
              
              ,
              
                sin
                ⁡
                
                  (
                  
                    
                      t
                      
                        N
                        b
                      
                    
                    ⁡
                    
                      [
                      
                        
                          dn
                          
                            b
                            ⁢
                            
                              
                            
                            ⁢
                            0
                          
                        
                        ⁡
                        
                          [
                          
                            
                              N
                              b
                            
                            -
                            1
                          
                          ]
                        
                      
                      ]
                    
                  
                  )
                
              
            
          
        
      
      }
    
    .
  




FIG. 15 shows an example of the sine waveform train based on an R-wave beat marker of an ECG sampled at 1000 samples per second. This is an example of frequency modulation (FM), in which sinusoids of a constant magnitude but varying frequencies are arranged in series in time to convey information. See Proakis (2000) DIGITAL COMMUNICATIONS, McGraw-Hill, which is herein incorporated by reference.
4. Density Function of a Prime Arrhythmological ECG
After the time-domain expression of a prime arrhythmological ECG is obtained, arrhythmological information of beats from the ECG may also be expressed as a density function. “Density” as applied to a prime arrhythmological ECG is the spectral energy attributable to each harmonic. “Density function” as applied to a prime arrhythmological ECG is the spectral energy at a range of frequencies relative to the frequency of a harmonic.
The density may be obtained by taking the discrete Fourier transform (DFT) of an impulse train based on a beat marker represented by the R-peak of an ECG. First, an impulse train based on an ECG is created. Then the magnitude of the DFT is taken of the impulse train to compute the density.
For example, the density of a length-NI impulse train based on a beat marker representing by the R-peak of an ECG (aI[n]), n=1, 2, . . . , NI, is computed by taking magnitude of the DFT of the impulse train (mI): mI[k]=|Σn=1NIaI[n]e−j2πk(n-1)/qNI|, k=1, 2, N/2−1.
FIG. 16 shows an example of the density of an impulse train based on an R-wave beat marker of an ECG sampled at 1000 samples per second.
The density may also be obtained by taking the DFT of a sine waveform train based on a beat marker represented by the R-peak of an ECG. First, a sine waveform train based on an ECG is created. Then the magnitude of the DFT is taken of the sine waveform train to compute the density.
For example, the density of a length-NS waveform train based on a beat marker representing by the R-peak of an ECG (aS[n]), n=1, 2, . . . , NS is computed by taking magnitude of the DFT of the waveform train (mS): mS[k]=|Σn=1NSaS[n]e−j2πk(n-1)/qNS|, k=1, 2, N/2−1.
FIG. 17 shows an example of the density of a sine waveform train based on an R-wave beat marker of an ECG sampled at 1000 samples per second.
5. Distribution Function of a Prime Arrhythmological ECG
After the density function is obtained, an accounting of the distribution of the energy of the density may be calculated. “Distribution” as applied to a prime arrhythmological ECG is the sum of the density from a range of frequencies. “Distribution function” as applied to a prime arrhythmological ECG is the sum of the density functions over a given range of frequencies. In some embodiments, the sum is a weighted sum. Those skilled in the art may readily optimize the weight a sum is given for a desired application.
As exemplified herein, the distribution function (M) of a density function (m[k]), k=1, 2, . . . , N/2−1) of a prime arrhythmological ECG, is computed by: M[k]=Σl=1km[l], for k=1, 2, . . . , N/2−1.
III. Applications—Correlating to Diabetic Disease and Disorders
After a prime ECG is created, it may be correlated to diabetic conditions using statistical pattern recognition techniques and used to classify or diagnose a subject as having a given diabetic condition. There are two approaches to pattern recognition: statistical pattern recognition and syntactic pattern recognition. The statistical approach classifies patterns based on the assumption that the relationship between pattern and classification is probabilistic. Syntactic pattern recognition classifies patterns based on a priori knowledge (syntax) of the relationship between patterns and classification. See Jain et al. (2000) IEEE Trans. on Pattern Analysis and Machine Intelligence 22(1): 4, which is herein incorporated by reference.
Statistical pattern recognition is done by (1) obtaining multiple sets of patterns and their corresponding classifications (the training sets), and then (2) by determining the classification boundaries in the space spanned by the patterns that correspond to the training set classifications. See Jain et al. (2000) IEEE Trans. on Pattern Analysis and Machine Intelligence 22(1): 4, which is herein incorporated by reference. The determination of classification boundaries in the space spanned by the patterns may be done using any number of statistical pattern recognition methods such as analysis of variance between groups (ANOVA), analysis of covariance (ANCOVA) between groups, autoregressive moving average (ARMA) models, neural networks, Kalman filter, and other methods known in the art. The determination of classification boundaries in the space spanned by the patterns may also be done using commercially available statistical software such as Statistica® available from StatSoft, Inc. (Tulsa, Okla.), SPSS® available from SPSS Inc. (Chicago, Ill.), and Matlab® available from The MathWorks, Inc. (Natick, Mass.).
As exemplified herein, multiple sets of patterns and their corresponding classification are obtained. First, patterns formed from resource-limited observations (RLO), such as various lead systems of ECG, such as the Frank-lead, EASI lead, 12-lead, and the like, and basic patient data such as age, gender, body mass index, conditions of dyslipidemia, smoking, hypertension, and the like were collected from more than about 1000 subjects having a diverse array of clinically diagnosed diabetic conditions. Classifications of the same 1000 subjects were diagnosed by experienced cardiologists using prior art resource-rich observation (RRO) methods known in the art including glucose testing, high density lipoprotein testing, low density lipoprotein testing, and a combination thereof, to diagnose diabetic diseases or disorders that included the presence or absence of diabetes, metabolic syndrome, and the like. The subjects were further classified into one of two groups, “normal” and “diabetic,” by experienced physicians using diagnostic methods known in the art. As exemplified herein, the determination of the classification boundaries of diabetes in the space spanned by the patterns was done using the numerical simulation software Matlab® available from The MathWorks, Inc. (Natick, Mass.).
A. Density of Prime Morphological ECG
FIG. 18A schematically shows a method for obtaining the density function of the prime morphological ECG of a subject. FIG. 18A1 schematically shows the steps for calculating the 12-lead ECG and identifying the beat marker. FIG. 18A2 schematically shows obtaining the characteristic segment. FIG. 18A3 schematically shows refining the characteristic segment and obtaining the density and distribution. FIG. 18B outlines the steps in FIGS. 18A and 18A1 to 18A3. After the prime morphological ECG is created, ECG may be correlated to diabetic conditions using statistical pattern recognition techniques.
As exemplified herein, application for the classification of the presence or absence of diabetes was created using the distribution function of length-512 characteristic segment of the JT segment of ECG sampled at 1000 Hz. Observations of density functions of JT characteristic segment of about 400 subjects showed that the amount of total harmonic energy already allocated at or before the 4th harmonic (or the 6th distribution) is consistently about 30%, with a standard deviation of about 7%, and that the amount of the total harmonic energy already allocated at or before the 30th harmonic (or the 30th distribution) is consistently about 95%, with a standard deviation of about 3%.
Although the 4th distribution function, the 30th distribution function and the 512th distribution function are exemplified herein, distribution functions of other harmonics may be used to classify or diagnose a subject as suffering from a diabetic disease or disorder in accordance with the present invention.
Employing the distribution (S) of the prime morphological ECG of various leads of a 12-lead ECG, various system models, such as linear systems, basis function systems, polynomial systems, clustering techniques, decision trees, Bayesian networks, neural network systems, fuzzy logic systems, evolutionary algorithms, and other methods known in the art, may be used to classify the ECG of a subject for the presence or absence of diabetic disease or disorders. See Nelles (2000) NONLINEAR SYSTEM IDENTIFICATION, Springer: Berlin, which is herein incorporated by reference.
As exemplified herein, statistical decision trees and artificial neural network systems were created to classify the ECG of a subject for the presence or absence of diabetes. Training sets comprises more than about 1000 subjects having a diverse array of clinically diagnosed diabetic conditions. Each training set comprises inputs comprising the computed ECG distribution functions and other resource-limited observation (RLO) of the subject, and of a desired output comprising the diagnosis of the presence or absence of diabetes based on diagnosis by experienced physicians using prior art resource-rich observation (RRO) methods.
Statistical Decision Trees
Since a statistical decision tree is an algorithm or a formal stepwise process used in coming to a conclusion or making a judgment, it is suitable for classifying the ECG of a subject for the presence or absence of diabetes in accordance with the present invention.
Thus, in some embodiments, as outlined in FIG. 19, a subject is classified as being normal or diabetic as follows:

    1. An ECG of a subject is considered “normal” (characterized as not suffering from a diabetic disease or disorder) if:
    
        a) HaVR[30]≧θ1;
        b) HaVR[30]<θ1, HV6[4]≧θ2, HI[30]≧θ3, HaVL[30]≧θ4, and HV3[4]<θ5;
        c) HaVR[30]<θ1, HV6[4]≧θ2, HI[30]≧θ3, HaVL[30]≧θ4, HV3[4]≧θ5, and HIII[4]≧θ6;
        d) HaVR[30]<θ1, HV6[4]≧θ2, HI[30]<θ3, and HV6[30]<θ7; and
        e) HaVR[30]<θ1, HV6[4]≧θ2, HI[30]<θ3, HV6[30]≧θ7, and HV3[30]≧θ8 
    
    
    2. An ECG of a subject is considered “diabetic” (characterized as suffering from a diabetic disease or disorder such as diabetes) if:
    
        a) HaVR[30]<θ1, and HV6[4]<θ2;
        b) HaVR[30]<θ1, HV6[4]≧θ2, HI[30]≧θ3, and HaVL[30]<θ4;
        c) HaVR[30]<θ1, HV6[4]≧θ2, HI[30]≧θ3, HaVL[30]≧θ4, HV3[4]≧θ5, and HIII[4]<θ6; and
        d) HaVR[30]<θ1, HV6[4]≧θ2, HI[30]<θ3, HV6[30]≧θ7, and HV3[30]<θ8 
    
    


The structure and threshold values (θ) of the statistical decision tree may be readily obtained from the training of the input set and the desired output set by one skilled in the art using the statistical simulation software Matlab® available from The MathWorks, Inc. (Natick, Mass.) and methods known in the art.
In addition to distribution, other secondary factors, such as age or the presence or absence of a disease such as dyslipidemia, may be used. Other secondary factors include hypertension, smoking, and the like. Thus, in some embodiments, as outlined in FIG. 20, a subject is classified as being normal or diabetic as follows:

    1. An ECG of a subject is considered “normal” (characterized as not suffering from a diabetic disease or disorder) if:
    
        a) HaVR[30]≧θ1;
        b) HaVR[30]<θ1, age≧θ2, HV6[30]≧θ3, HI[30]≧θ4, and HII[4]≧θ5;
        c) HaVR[30]<θ1, age≧θ2, HV6[30]≧θ3, HI[30]≧θ4, HII[4]<θ5, and HaVF[4]<θ6;
        d) HaVR[30]<θ1, age<θ2, and HV6[4]<θ7, and
        e) HaVR[30]<θ1, age≧θ2, HV6[30]<θ3, and HV6[4]≧θ8 
    
    
    2. An ECG of a subject is considered “diabetic” (characterized as suffering from a diabetic disease or disorder such as diabetes) if:
    
        a) HaVR[30]<θ1, age≧θ2, HV6[30]≧θ3, and HI[30]<θ4;
        b) HaVR[30]<θ1, age≧θ2, HV6[30]≧θ3, HI[30]≧θ4, HII[4]<θ5, and HaVF[4]≧θ6;
        c) HaVR[30]<θ1, age<θ2, and HV6[4]≧θ7, and
        d) HaVR[30]<θ1, age≧θ2, HV6[30]<θ3, and HV6[4]<θ8 
    
    


The structure and threshold values (θ) of the statistical decision tree may be readily obtained from the training of the input set and the desired output set by one skilled in the art using the numerical simulation software Matlab® available from The MathWorks, Inc. (Natick, Mass.) and methods known in the art.
Alternatively, as shown in FIG. 21, a subject is classified as being normal or diabetic as follows:

    1. An ECG of a subject is considered “normal” (characterized as not suffering from a diabetic disease or disorder) if:
    
        a) HaVR[30]<θ1, age≧θ2, HV6[30]≧θ3, and HI[30]≧θ4;
        b) HaVR[30]<θ1, age<θ2, and HV4[30]≧θ5;
        c) HaVR[30]<θ1, age≧θ2, HV6[30]<θ3, and HV6[4]≧θ6; and
        d) HaVR[30]≧θ1, age<θ7, and dyslipidemia is negative
    
    
    2. An ECG of a subject is considered “diabetic” (characterized as suffering from a diabetic disease or disorder such as diabetes) if:
    
        a) HaVR[30]<θ1, age≧θ2, HV6[30]≧θ3, and HI[30]<θ4;
        b) HaVR[30]<θ1, age<θ2, and HV4[30]<θ5;
        c) HaVR[30]<θ1, age≧θ2, HV6[30]<θ3, and HV6[4]<θ6;
        d) HaVR[30]≧θ1, and age≧θ7; and
        e) HaVR[30]≧θ1, age<θ7, and dyslipidemia is positive
    
    


The structure and threshold values (θ) of the statistical decision tree may be readily obtained from the training of the input set and the desired output set by one skilled in the art using the numerical simulation software Matlab® available from The MathWorks, Inc. (Natick, Mass.) and methods known in the art.
Artificial Neural Network Systems
Since artificial neural networks is a computer architecture in which a number of processors are interconnected in a manner suggestive of the connections between neurons in a human brain and which is able to learn by a process of trial and error, it is suitable for classifying the ECG of a subject for the presence or absence of diabetes. Variations of neural network systems include the multi-layer preceptron, radial basis systems, associative maps, and Hopfield networks. See Gurney (1997) AN INTRODUCTION TO NEURAL NETWORKS, CRC, which is herein incorporated by reference.
In some embodiments, using a multi-layer perceptron as set forth in FIG. 22 a subject is classified as being normal or diabetic as follows:

    1. An ECG of a subject is considered “normal” (characterized as not suffering from a diabetic disease or disorder) if:
    
        c3,1=[1+exp(−Σl=118c2,lg2,1,l−g2,1,0)]−1≦0.5, where c2,l=[1+exp(−Σm=133c1,mg1,l,m−g1,l,0)]−1 for l=1, 2, . . . , 18, where c1,m=[1+exp(−Qm−g0,m,0)]−1 for m=1, 2, . . . , 33, where Qm=HI[4]g0,m,1+HII[4]g0,m,2+HIII[4]g0,m,3+HaVR[4]g0,m,4+HaVL[4]g0,m,5+HaVF[4]g0,m,6+HV1[4]g0,m,7+HV2[4]g0,m,8+HV3[4]g0,m,9+HV4[4]g0,m,10+HV5[4]g0,m,11+HV6[4]g0,m,12+HI[30]g0,m,13+HII[30]g0,m,14+HIII[30]g0,m,15+HaVR[30]g0,m,16+HaVL[30]g0,m,17+HaVF[30]g0,m,18+HV1[30]g0,m,19+HV2[30]g0,m,20+HV3[30]g0,m,21+HV4[30]g0,m,22+HV5[30]g0,m,23+H6[30]g0,m,24 for m=1, 2, . . . , 33.
    
    
    2. An ECG of a subject is considered “diabetic” (characterized as suffering from a diabetic disease or disorder such as diabetes) if:
    
        c3,1=[1+exp(−Σl=118c2,lg2,1,l−g2,1,0)]−1>0.5, where c2,l=[1+exp(−Σm=133c1,mg1,l,m−g1,l,0)]−1 for l=1, 2, . . . , 18, where c1,m=[1+exp(−Qm−g0,m,0)]−1 for m=1, 2, . . . , 33, where Qm=HI[4]g0,m,1+HII[4]g0,m,2+HIII[4]g0,m,3+HaVR[4]g0,m,4+HaVL[4]g0,m,5+HaVF[4]g0,m,6+HV1[4]g0,m,7+HV2[4]g0,m,8+HV3[4]g0,m,9+HV4[4]g0,m,10+HV5[4]g0,m,11+HV6[4]g0,m,12+HI[30]g0,m,13+HII[30]g0,m,14+HIII[30]g0,m,15+HaVR[30]g0,m,16+HaVL[30]g0,m,17+HaVF[30]g0,m,18+HV1[30]g0,m,19+HV2[30]g0,m,20+HV3[30]g0,m,21+HV4[30]g0,m,22+HV5[30]g0,m,23+HV6[30]g0,m,24 for m=1, 2, . . . , 33.
    
    


The architecture and weight values (g) of the multi-layer perceptron may be readily obtained from the training of the input set and the desired output set by one skilled in the art using the numerical simulation software Matlab® available from The MathWorks, Inc. (Matlab, Mass.) and methods known in the art.
In addition to distribution, other secondary factors, such as age or the presence or absence of a disease such as dyslipidemia, may be used. Other secondary factors include hypertension, smoking, and the like. Thus, in some embodiments, using a multi-layer preceptron as outlined in FIG. 23, a subject is classified as being normal or diabetic as follows:

    1. An ECG of a subject is considered “normal” (characterized as not suffering from a diabetic disease or disorder) if:
    
        c3,1=[1+exp(−Σl=120c2,lg2,1,l−g2,1,0)]−1≦0.5, where c2,l=[1+exp(−Σm=150c1,mg1,l,m−g1,l,0)]−1 for l=1, 2, . . . , 20, where c1,m=[1+exp(−Qm−g0,m,0)]−1 for m=1, 2, . . . , 50, where Qm=HI[4]g0,m,1+HII[4]g0,m,2+HIII[4]g0m,3+HaVR[4]g0,m,4+HaVL[4]g0,m,5+HaVF[4]g0,m,6+HV1[4]g0,m,7+HV2[4]g0,m,8+HV3[4]g0,m,9+HV4[4]g0,m,10+HV5[4]g0,m,11+HV6[4]g0,m,12+HI[30]g0,m,13+HII[30]g0,m,14+HIII[30]g0,m,15+HaVR[30]g0,m,16+HaVL[30]g0,m,17+HaVF[30]g0,m,18+HV1[30]g0,m,19+HV2[30]g0,m,20+HV3[30]g0,m,21+HV4[30]g0,m,22+HV5[30]g0,m,23+HV6[30]g0,m,24+(age)g0,m,25+(dyslipidemia)g0,m,26, where age is the age in years, and dyslipidemia=1 if there is presence of dyslipidemia, and dyslipidemia=0 if there is no presence of dyslipidemia.
    
    
    2. An ECG of a subject is considered “diabetic” (characterized as suffering from a diabetic disease or disorder such as diabetes) if:
    
        c3,1=[1+exp(−Σl=120c2,lg2,1,l−g2,1,0)]−1>0.5, where c2,l=[1+exp(−Σm=150c1,mg1,l,m−g1,l,0)]−1 for l=1, 2, . . . , 20, where c1,m=[1+exp(−Qm−g0,m,0)]−1 for m=1, 2, . . . , 50, where Qm=HI[4]g0,m,1+HII[4]g0,m,2+HIII[4]g0,m,3+HaVR[4]g0,m,4+HaVL[4]g0,m,5+HaVF[4]g0,m,6+HV1[4]g0,m,7+HV2[4]g0,m,8+HV3[4]g0,m,9+HV4[4]g0,m,10+HV5[4]g0,m,11+HV6[4]g0,m,12+HI[30]g0,m,13+HII[30]g0,m,14+HIII[30]g0,m,15+HaVR[30]g0,m,16+HaVL[30]g0,m,17+HaVF[30]g0,m,18+HV1[30]g0,m,19+HV2[30]g0,m,20+HV3[30]g0,m,21+HV4[30]g0,m,22+HV5[30]g0,m,23+HV6[30]g0,m,24+(age)g0,m,25+(dyslipidemia)g0,m,26, where age is the age in years, and dyslipidemia=1 if there is presence of dyslipidemia, and dyslipidemia=0 if there is no presence of dyslipidemia.
    
    


The architecture and weight values (g) of the multi-layer perceptron may be readily obtained from the training of the input set and the desired output set by one skilled in the art using the numerical simulation software Matlab® available from The MathWorks, Inc. (Natick, Mass.) and methods known in the art.
Alternatively, a subject is classified using a multi-layer preceptron with a different structure as being normal or diabetic as follows:

    1. An ECG of a subject is considered “normal” (characterized as not suffering from a diabetic disease or disorder) if:
    
        c2,1=[1+exp(−Σm=175c1,mg1,l,m−g1,1,0)]−1≦0.5, where c1,m=[1+exp(−Qm−g0,m,0)]−1 for m=1, 2, . . . , 75, where Qm=HI[4]g0,m,1+HII[4]g0,m,2+HaVR[4]g0,m,3+HaVL[4]g0,m,4+HV1[4]g0,m,5+HV4[4]g0,m,6+HV5[4]g0,m,7+HV6[4]g0,m,8+HI[30]g0,m,9+HII[30]g0,m,10+HaVR[30]g0,m,11+HaVL[30]g0,m,12+HV1[30]g0,m,13+HV4[30]g0,m,14+HV5[30]g0,m,15+HV6[30]g0,m,16 for m=1, 2, . . . , 75.
    
    
    2. An ECG of a subject is considered “diabetic” (characterized as suffering from a diabetic disease or disorder such as diabetes) if:
    
        c2,1=[1+exp(−Σm=175c1,mg1,1,m−g1,1,0)]−1>0.5, where c1,m=[1+exp(−Qm−g0,m,0)]−1 for m=1, 2, . . . , 75, where Qm=HI[4]g0,m,1+HII[4]g0,m,2+HaVR[4]g0,m,3+HaVL[4]g0,m,4+HV1[4]g0,m,5+HV4[4]g0,m,6+HV5[4]g0,m,7+HV6[4]g0,m,8+HI[30]g0,m,9+HII[30]g0,m,10+HaVR[30]g0,m,11+HaVL[30]g0,m,12+HV1[30]g0,m,13+HV4[30]g0,m,14+HV5[30]g0,m,15+HV6[30]g0,m,16 for m=1, 2, . . . , 75.
    
    


The architecture and weight values (g) of the multi-layer perceptron may be readily obtained from the training of the input set and the desired output set by one skilled in the art using the numerical simulation software Matlab® available from The MathWorks, Inc. (Natick, Mass.) and methods known in the art.
B. Density of a Prime Arrhythmological ECG
After the prime arrhythmological ECG is created, ECG may be correlated to diabetic conditions using statistical pattern recognition techniques. Since the prime arrhythmological ECG only contains arrhythmological information, it is suitable for the classification of diabetic diseases and disorders conventionally associated with ECG arrhythmology, such as conduction abnormalities, sinus arrhythmias, ischemia, infarction, and the like. See Thaler et al. (2003) THE ONLY EKG BOOK YOU'LL EVER NEED, Lippincott Williams & Wilkins, which is herein incorporated by reference.
For example, application for the classification of the presence or absence of an onset of myocardial infarction may be created using the distribution function of a sine waveform train, computed using the sinusoidal transform function the discrete Fourier transform. For example, there is correlation between the frequency-domain expression of arrhythmological information and the parasympathetic effect on the sinoatrial node. See Goldberger et al. (2001) Circulation 103(15): 1977, which is herein incorporated by reference. Parasympathetic effect is an indicator and predictor for sudden cardiac death. See Kannenkeril et al. (2002) Am J Physiol Heart Circ Physiol 282: H2091, which is herein incorporated by reference. Hence, a statistical decision tree or an artificial neural network system may be similarly created that correlates between the frequency-domain distribution of a sine waveform train based on an ECG and the onset of sudden cardiac death.
IV. Device Structure
An ECG device known in the art may be used. In some embodiments, an ECG device is capable of providing at least 9 differential-input (DI) channels, a sampling rate of about 1000 Hz, a frequency response of about 150 Hz, an amplification factor of about 1000 times, a bit resolution of about 12 bits, a differential amplifier design, or a combination thereof. An example of a commercially available ECG device which may be employed in the methods and devices of the present invention is the QED 1000 (Dynacardia, Inc., Azusa, Calif.). Peripheral equipment and components such as ECG clamps, electrodes and cables known in the art may be used in accordance with the present invention.
In accordance with the present invention, any ECG device with the following specifications may be used:

    
    
        9 differential input (DI) channels or 10 single-ended (SE) channels
        A sampling rate of about 1000 Hz or greater
        A frequency response up to 150 Hz or greater
        A resolution (combination of signal amplification and signal bit representation) such that the voltage resolution is equal to or smaller than about 0.005 mV
        A Common Mode Rejection Ratio (CMRR) of about 100 dB or more
        An ECG electrode patient interface
        An ability to acquire about a 10-second sample of the simultaneous 10-channel data from a human subject and store into memory
    
    


For example, the devices and systems of the present invention comprise a data acquisition module, a prime electrocardiogram converter and a computer which calculates at least one distribution function of a prime electrocardiogram. The data acquisition module receives an analog signal, magnifies the signal, samples the signal in time, and quantities the magnitude of the signal to provide a digital signal) comprises a lead ECG electrode patient interface (e.g., a 12-lead, a 16 lead, and the like), and differential input channels or single-ended channels (e.g., 9 or 15 differential input channels, 10 single-ended channels, and the like). The prime ECG converter and the distribution function computer each comprise a processor chip which provides a single-precision floating-point computation or a double-precision floating-point computation. The prime ECG converter or the distribution function computer may further comprise storage memory.
By solving the problem of harmonic disintegration and isolating the prime ECG, and by generating a statistical decision tree or an artificial neural network system that classifies a subject's prime ECG distributions, the present invention provides methods, systems and devices for detecting and diagnosing diabetic diseases and disorders. An overview of the method of the present invention is as follows:

    
    
        1. Acquiring and calculating the 12-lead ECG
        2. Identifying ECG beats and beat periods
        3. Creating the prime ECG
        4. Computing transform-domain densities
        5. Computing transform-domain distributions
        6. Classifying transform-domain distributions by diabetic condition
    
    


For example, the artificial neural network system may comprise a multi-layer perceptron written in the C Sharp computer language and compiled on Microsoft Visual C Studio available from Microsoft Corporation (Redmond, Wash.). Alternatively, the artificial neural network system may comprise the Fast Artificial Neural Network Library written in the C computer language available open-source from WorldWideWeb.leenissen.dk, wherein “WorldWideWeb” is “www”.
In the prior art, diabetic diseases or disorders are detected using a fasting blood sugar test, which requires about 12 hours of fasting beforehand, a blood draw, and laboratory analysis time afterwards. According to the present invention, a 12-lead resting electrocardiogram (ECG) may be used to detect and/or diagnose a diabetic disease or disorder without the fasting, blood draws, and wait times commonly associated with the prior art blood sugar tests. Further, the methods and devices of the present invention may readily be implemented in telemedicine and other remote medical practices where the subject being tested is at a location that is different from the diagnostician, e.g., physician.
Applicant notes nowhere in the prior art is it taught or suggested that an ECG may be used to detect or diagnose a subject as having a diabetic disease or disorder. With this in mind, Applicants note that the provisional application which this application claims the benefit was based on a prior application for the detection of ischemia and in addition to changing the formulas and density functions, a global find and replace by the inventor was used to change words like “ischemia” to “diabetes”. Thus, the inventor and Applicant of the instant invention explicitly state that they did not intend to make any type of admission that ECGs have been used to detect and diagnose diabetic diseases and disorders prior to the instant invention. In fact, the inventor and Applicant hereby explicitly state that to the best of their knowledge and understanding, nowhere does the prior art teach or suggest the invention as disclosed herein and as set forth in the claims.
To the extent necessary to understand or complete the disclosure of the present invention, all publications, patents, and patent applications mentioned herein are expressly incorporated by reference therein to the same extent as though each were individually so incorporated.
Having thus described exemplary embodiments of the present invention, it should be noted by those skilled in the art that the within disclosures are exemplary only and that various other alternatives, adaptations, and modifications may be made within the scope of the present invention. Accordingly, the present invention is not limited to the specific embodiments as illustrated herein, but is only limited by the following claims.

## Claims

1. A method for diagnosing or detecting a diabetic disease or disorder in a subject which comprises
creating a prime electrocardiogram from a raw electrocardiogram of the subject,
obtaining harmonics from the prime electrocardiogram by performing discrete cosine transform analysis;
obtaining a plurality of density functions for the harmonics in a range of harmonics of the prime electrocardiogram, wherein the density function refers to the sampling rate multiplied by the harmonic peak energy divided by the length of the period of the prime electrocardiogram;
summing the plurality of density functions to give at least one distribution function; and
determining the presence or absence of the diabetic disease or disorder based on whether the distribution function is indicative of the diabetic disease or disorder.

2. The method of claim 1, wherein the prime electrocardiogram is a prime morphological electrocardiogram.

3. The method of claim 2, wherein the prime morphological electrocardiogram is obtained by
acquiring a raw electrocardiogram as electronic data from the subject;
selecting at least one characteristic segment or at least one characteristic window; and
isolating the characteristic segment or the characteristic window by removing information extraneous to the characteristic segment or the characteristic window.

4. The method of claim 3, wherein the characteristic segment is a QT segment, an RT segment, a JT segment, or a PR segment.

5. The method of claim 3, wherein the characteristic window includes part or all of a T-wave or part or all of a PQRST interval.

6. The method of claim 3, which further comprises refining the characteristic segment or the characteristic window by averaging the characteristic segment or the characteristic window.

7. The method of claim 6, which further comprises repeating the averaged characteristic window or the averaged characteristic segment by N times, wherein N is any positive integer.

8. The method of claim 3, wherein the isolated characteristic segment is a plurality of isolated characteristic segments in series or the isolated characteristic window is a plurality of isolated characteristic windows in series.

9. The method of claim 1, wherein the prime electrocardiogram is created using a beat marker.

10. The method of claim 9, wherein the beat marker is selected using a vectorcardiogram.

11. The method of claim 1, wherein a statistical decision tree is used for classifying the ECG of a subject for the presence or absence of diabetes.

12. The method of claim 11, wherein a combination of the following distribution functions
a) HaVR[30]≧θ1;
b) HaVR[30]<θ1, HV6[4]≧θ2, HI[30]≧θ3, HaVL[30]≧θ4, and HV3[4]<θ5;
c) HaVR[30]<θ1, HV6[4]≧θ2, HI[30]≧θ3, HaVL[30]≧θ4, HV3[4]≧θ5, and HIII[4]≧θ6;
d) HaVR[30]<θ1, HV6[4]≧θ2, HI[30]<θ3, and HV6[30]<θ7; and
e) HaVR[30]<θ1, HV6[4]≧θ2, HI[30]<θ3, HV6[30]≧θ7, and HV3[30]≧θ8 

is indicative of the absence of the diabetic disease or disorder, or
a combination of the following distribution functions
a) HaVR[30]<θ1, and HV6[4]<θ2;
b) HaVR[30]<θ1, HV6[4]≧θ2, HI[30]≧θ3, and HaVL[30]<θ4;
c) HaVR[30]<θ1, HV6[4]≧θ2, HI[30]≧θ3, HaVL[30]≧θ4, HV3[4]≧θ5, and HIII[4]<θ6; and
d) HaVR[30]<θ1, HV6[4]≧θ2, HI[30]<θ3, HV6[30]≧θ7, and HV3[30]<θ8 

is indicative of the presence of the diabetic disease or disorder.

13. The method of claim 11, which further comprises determining a secondary factor.

14. The method of claim 13, wherein the secondary factor is the subject's age or whether the subject suffers from dyslipidemia.

15. The method of claim 14, wherein one of the following combinations of distribution functions
I)
a) HavR[30]≧θ1;
b) HavR[30]<θ1, age≧θ2, HV6[30]≧θ3, HI[30]≧θ4, and HII[4]≧θ5;
c) HavR[30]<θ1, age≧θ2, HV6[30]≧θ3, HI[30]≧θ4, HII[4]<θ5, and HavF[4]<θ6;
d) HaVR[30]<θ1, age<θ2, and HV6[4]<θ7, and
e) HaVR[30]<θ1, age≧θ2, HV6[30]<θ3, and HV6[4]≧θ8 
is indicative of the absence of the diabetic disease or disorder;

II)
a) HaVR[30]<θ1, age≧θ2, HV6[30]≧θ3, and HI[30]<θ4;
b) HaVR[30]<θ1, age≧θ2, HV6[30]≧θ3, HI[30]≧θ4, HII[4]<θ5, and HavF[4]≧θ6;
c) HaVR[30]<θ1, age<θ2, and HV6[4]≧θ7, and
d) HavR[30]<θ1, age≧θ2, HV6[30]<θ3, and HV6[4]<θ8 
is indicative of the presence of the diabetic disease or disorder;

III)
a) HavR[30]<θ1, age≧θ2, HV6[30]≧θ3, and HI[30]≧θ4;
b) HavR[30]<θ1, age<θ2, and HV4[30]≧θ5;
c) HavR[30]<θ1, age≧θ2, HV6[30]<θ3, and HV6[4]≧θ6; and
d) HavR[30]≧θ1, age<θ7, and dyslipidemia is negative
is indicative of the absence of the diabetic disease or disorder; or

IV)
a) HaVR[30]<θ1, age≧θ2, HV6[30]≧θ3, and HI[30]<θ4;
b) HaVR[30]<θ1, age<θ2, and HV4[30]<θ5;
c) HavR[30]<θ1, age≧θ2, HV6[30]<θ3, and HV6[4]<θ6;
d) HaVR[30]≧θ1, and age≧θ7; and
e) HaVR[30]≧θ1, age<θ7, and dyslipidemia is positive;

is indicative of the presence of the diabetic disease or disorder.

16. The method of claim 1, wherein an artificial neural network system is used for classifying the ECG of a subject for the presence or absence of diabetes.

17. The method of claim 16, wherein a function of distribution functions as follows
I)
c3,1=[1+exp(−Σl=118c2,lg2,1,l−g2,1,0)]−1≦0.5, where c2,l=[1+exp(−Σm=133c1,mg1,l,m−g1,l,0)]−1 for l=1, 2, . . . , 18, where c1,m=[1+exp(−Qm−g0,m,0)]−1 for m=1, 2, . . . , 33, where Qm=HI[4]g0,m,1+HII[4]g0,m,2+HIII[4]g0,m,3+HaVR[4]g0,m,4+HaVL[4]g0,m,5+HaVF[4]g0,m,6+HV1[4]g0,m,7+HV2[4]g0,m,8+HV3[4]g0,m,9+HV4[4]g0,m,10+HV5[4]g0,m,11+HV6[4]g0,m,12+HI[30]g0,m,13+HII[30]g0,m,14+HIII[30]g0,m,15+HaVR[30]g0,m,16+HaVL[30]g0,m,17+HaVF[30]g0,m,18+HV1[30]g0,m,19+HV2[30]g0,m,20+HV3[30]g0,m,21+HV4[30]g0,m,22+HV5[30]g0,m,23+H6[30]g0,m,24 for m=1, 2, . . . , 33
is indicative of the absence of the diabetic disease or disorder;


II)
c3,1=[1+exp(−Σl=118c2,lg2,1,l−g2,1,0)]−1≦0.5, where c2,l=[1+exp(−Σm=133c1,mg1,l,m−g1,l,0)]−1 for l=1, 2, . . . , 18, where c1,m=[1+exp(−Qm−g0,m,0)]−1 for m=1, 2, . . . , 33, where Qm=HI[4]g0,m,1+HII[4]g0,m,2+HIII[4]g0,m,3+HaVR[4]g0,m,4+HaVL[4]g0,m,5+HaVF[4]g0,m,6+HV1[4]g0,m,7+HV2[4]g0,m,8+HV3[4]g0,m,9+HV4[4]g0,m,10+HV5[4]g0,m,11+HV6[4]g0,m,12+HI[30]g0,m,13+HII[30]g0,m,14+HIII[30]g0,m,15+HaVR[30]g0,m,16+HaVL[30]g0,m,17+HaVF[30]g0,m,18+HV1[30]g0,m,19+HV2[30]g0,m,20+HV3[30]g0,m,21+HV4[30]g0,m,22+HV5[30]g0,m,23+H6[30]g0,m,24 for m=1, 2, . . . , 33
is indicative of the presence of the diabetic disease or disorder;


III)
c3,1=[1+exp(−Σl=120c2,lg2,1,l−g2,1,0)]−1≦0.5, where c2,l=[1+exp(−Σm=150c1,mg1,l,m−g1,l,0)]−1 for l=1, 2, . . . , 20, where c1,m=[1+exp(−Qm−g0,m,0)]−1 for m=1, 2, . . . , 50, where Qm=HI[4]g0,m,1+HII[4]g0,m,2+HIII[4]g0,m,3+HaVR[4]g0,m,4+HaVL[4]g0,m,5+HaVF[4]g0,m,6+HV1[4]g0,m,7+HV2[4]g0,m,8+HV3[4]g0,m,9+HV4[4]g0,m,10+HV5[4]g0,m,11+HV6[4]g0,m,12+HI[30]g0,m,13+HII[30]g0,m,14+HIII[30]g0,m,15+HaVR[30]g0,m,16+HaVL[30]g0,m,17+HaVF[30]g0,m,18+HV1[30]g0,m,19+HV2[30]g0,m,20+HV3[30]g0,m,21+HV4[30]g0,m,22+HV5[30]g0,m,23+H6[30]g0,m,24 (age)g0,m,25+(dyslipidemia)g0,m,26 for m=1, 2, . . . , 50, where age is the age in years, and dyslipidemia=1 if there is presence of dyslipidemia, and dyslipidemia=0 if there is no presence of dyslipidemia
is indicative of the absence of the diabetic disease or disorder;


IV)
c3,1=[1+exp(−Σl=120c2,lg2,1,l−g2,1,0)]−1>0.5, where c2,l=[1+exp(−Σm=150c1,mg1,l,m−g1,l,0)]−1 for l=1, 2, . . . , 20, where c1,m=[1+exp(−Qm−g0,m,0)]−1 for m=1, 2, . . . , 50, where Qm=HI[4]g0,m,1+HII[4]g0,m,2+HIII[4]g0,m,3+HaVR[4]g0,m,4+HaVL[4]g0,m,5+HaVF[4]g0,m,6+HV1[4]g0,m,7+HV2[4]g0,m,8+HV3[4]g0,m,9+HV4[4]g0,m,10+HV5[4]g0,m,11+HV6[4]g0,m,12+HI[30]g0,m,13+HII[30]g0,m,14+HIII[30]g0,m,15+HaVR[30]g0,m,16+HaVL[30]g0,m,17+HaVF[30]g0,m,18+HV1[30]g0,m,19+HV2[30]g0,m,20+HV3[30]g0,m,21+HV4[30]g0,m,22+HV5[30]g0,m,23+H6[30]g0,m,24 (age)g0,m,25+(dyslipidemia)g0,m,26 for m=1, 2, . . . , 50, where age is the age in years, and dyslipidemia=1 if there is presence of dyslipidemia, and dyslipidemia=0 if there is no presence of dyslipidemia
is indicative of the presence of the diabetic disease or disorder;


V)
c2,1=[1+exp(−Σm=175c1,mg1,1,m−g1,1,0)]−1≦0.5, where c1,m=[1+exp(−Qm−g0,m,0)]−1 for m=1, 2, . . . , 75, where Qm=HI[4]g0,m,1+HII[4]g0,m,2+HaVR[4]g0,m,3+HaVL[4]g0,m,4+HV1[4]g0,m,5+HV4[4]g0,m,6+HV5[4]g0,m,7+HV6[4]g0,m,8+HI[4]g0,m,9+HII[4]g0,m,10+HaVR[4]g0,m,11+HaVL[4]g0,m,12+HV1[30]g0,m,13+HV4[30]g0,m,14+HV5[30]g0,m,15+HV6[30]g0,m,16 for m=1, 2, . . . , 75
is indicative of the absence of the diabetic disease or disorder; or


VI)
c2,1=[1+exp(−Σm=175c1,mg1,1,m−g1,1,0)]−1>0.5, where c1,m=[1+exp(−Qm−g0,m,0)]−1 for m=1, 2, . . . , 75, where Qm=HI[4]g0,m,1+HII[4]g0,m,2+HaVR[4]g0,m,3+HaVL[4]g0,m,4+HV1[4]g0,m,5+HV4[4]g0,m,6+HV5[4]g0,m,7+HV6[4]g0,m,8+HI[4]g0,m,9+HII[4]g0,m,10+HaVR[4]g0,m,11+HaVL[4]g0,m,12+HV1[30]g0,m,13+HV4[30]g0,m,14+HV5[30]g0,m,15+HV6[30]g0,m,16 for m=1, 2, . . . , 75
is indicative of the absence of the diabetic disease or disorder.

18. The method according to claim 1, wherein the diabetic disease or disorder is diabetes, e.g., Type 1 diabetes or Type 2 diabetes, preferably Type 2 diabetes.

19. The method according to claim 1, and further comprising diagnosing the subject as having the diabetic disease or disorder based on whether the distribution function is indicative of the diabetic disease or disorder.

20. The method according to claim 1, and further comprising treating the subject for the diabetic disease or disorder where the distribution function is indicative of the presence of the diabetic disease or disorder.

21. The method according to claim 1, wherein
the raw electrocardiogram is obtained from the subject using an electrocardiograph machine;
a data acquisition module is used to convert the raw electrocardiogram into a raw digital electrocardiogram;
a prime electrocardiogram converter is used to convert the raw digital electrocardiogram into a prime electrocardiogram; and
a computer is used to calculate at least one distribution function of the prime electrocardiogram.

22. The method of claim 21, wherein the prime electrocardiogram converter converts the raw electrocardiogram into the prime electrocardiogram using a beat marker that was identified using a vectorcardiogram.