ECG Analysis System

Embed Size (px)

Citation preview

  • 8/6/2019 ECG Analysis System

    1/16

    By: Vijay R ECG Analysis System

    1. Abstract

    Electrocardiograph (ECG) is a transthoracic interpretation of the electrical activity of

    the heart over time captured and externally recorded by skin electrodes.

    The ECG works mostly by detecting and amplifying the tiny electrical changes on the

    skin that are caused when the heart muscle "depolarizes" during each heart beat. At rest,

    each heart muscle cell has a charge across its outer wall, or cell membrane. Reducing this

    charge towards zero is called de-polarization, which activates the mechanisms in the cell

    that cause it to contract. During each heartbeat a healthy heart will have an orderly

    progression of a wave of depolarization that is triggered by the cells in the sanatoria node,

    spreads out through the atrium, passes through "intrinsic conduction pathways" and then

    spreads all over the ventricles. This is detected as tiny rises and falls in the voltage

    between two electrodes placed either side of the heart which is displayed as a wavy lineeither on a screen or on paper. This display indicates the overall rhythm of the heart and

    weaknesses in different parts of the heart muscle.

    Usually more than 2 electrodes are used and they can be combined into a number of pairs

    (For example: Left arm (LA), right arm (RA) and left leg (LL) electrodes form the pairs:

    LA+RA, LA+LL, RA+LL). The output from each pair is known as a lead. Each lead is

    said to look at the heart from a different angle. Different types of ECGs can be referred to

    by the number of leads that are recorded, for example 3-lead, 5-lead or 12-lead ECGs

    (sometimes simply "a 12-lead"). A 12-lead ECG is one in which 12 different electrical

    signals are recorded at approximately the same time and will often be used as a one-offrecording of an ECG, typically printed out as a paper copy. 3- and 5-lead ECGs tend to

    be monitored continuously and viewed only on the screen of an appropriate monitoring

    device, for example during an operation or whilst being transported in an ambulance.

    There may, or may not be any permanent record of a 3- or 5-lead ECG depending on the

    equipment used.

    It is the best way to measure and diagnose abnormal rhythms of the heart,particularly

    abnormal rhythms caused by damage to the conductive tissue that carries electrical

    signals, or abnormal rhythms caused by electrolyte imbalances. In a myocardial

    infarction (MI), the ECG can identify if the heart muscle has been damaged in specific

    areas, though not all areas of the heart are covered. The ECG cannot reliably measure the

    pumping ability of the heart, for which ultrasound-based (echocardiography) or nuclear

    medicine tests are used. It is possible to be in cardiac arrest with a normal ECG signal (a

    condition known as pulse less electrical activity).

    2. HISTORY

    E&C Dept. 1 VVCE, Mysore

  • 8/6/2019 ECG Analysis System

    2/16

    By: Vijay R ECG Analysis System

    An initial breakthrough came when Willem Einthoven, working in Leiden, Netherlands,

    used the string galvanometer that he invented in 1903. This device was much more

    sensitive than both the capillary electrometer that Waller used and the string

    galvanometer that had been invented separately in 1897 by the French engineer Clment

    Ader. Rather than using today's self-adhesive electrodes Einthoven's subjects would

    immerse each of their limbs into containers of salt solutions from which the ECG was

    recorded.

    Einthoven assigned the letters P, Q, R, S and T to the various deflections, and described

    the electrocardiographic features of a number of cardiovascular disorders. In 1924, he

    was awarded the Nobel Prize in Medicine for his discovery.

    Though the basic principles of that era are still in use today, there have been many

    advances in electrocardiography over the years. The instrumentation, for example, has

    evolved from a cumbersome laboratory apparatus to compact electronic systems thatoften include computerized interpretation of the electrocardiogram.

    ECG interpretation techniques were initially developed and used on mainframe

    computers in the early 1960s (Pordy et al., 1968). In those days, mainframe computers

    centrally located in computing centers performed the ECG analysis and interpretation.

    The ECGs were transmitted to the computer from remote hospital sites using a specially

    designed ECG acquisition cart that could be rolled to the patients bedside. The cart had

    three ECG amplifiers, so three leads were acquired simultaneously and transmitted over

    the voice-grade telephone network using a three-channel analog FM modem. The

    interpretation program running in the mainframe computer consisted of several hundredthousand lines of FORTRAN code. As technology evolved, minicomputers located

    within hospitals took over the role of the remote mainframes. The ECG acquisition carts

    began to include embedded microprocessors in order to facilitate ECG capture. Also,

    since the interpretation algorithms had increased failure rates if the ECG was noisy, the

    microprocessors increased the signal-to-noise ratio by performing digital signal

    preprocessing algorithms to remove baseline drift and to attenuate power line

    interference. Ultimately the ECG interpretation programs were incorporated within the

    bedside carts themselves, so that the complete process of acquisition, processing, and

    interpretation could be done at the patients bedside without transmitting any data to a

    remote computer. This technology has now evolved into stand-alone microprocessor-

    based interpretive ECG machines that can be battery powered and small enough to fit in a

    briefcase. The early ECG carts had three built-in ECG amplifiers and transmitted 2.5-

    second epochs of three simultaneous channels. In order to acquire all 12 leads, they

    sequenced through four groups of three leads each, requiring 10 seconds to send a

    complete record. Thus, the four acquired three-lead sets represented four different time

    segments of the patients cardiac activity. Since a 2.5-second interval only includes two

    E&C Dept. 2 VVCE, Mysore

  • 8/6/2019 ECG Analysis System

    3/16

    By: Vijay R ECG Analysis System

    or three heartbeats, the early algorithms had difficulty in deducing abnormalities called

    arrhythmias in which several heartbeats may be involved in a rhythm disturbance. In

    order to improve arrhythmia analysis, three additional leads, typically the VCG leads,

    were recorded for a longer period of six seconds and added to the acquired data set

    (Bonner and Schwetman, 1968).

    The modern microprocessor-based interpretive machines include eight ECG

    amplifiers so that they can simultaneously sample and store eight leadsI, II, and V1

    V6. They then synthesize the four redundant leadsIII, aVR, aVL, and aVF .These

    machines include enough memory to store all the leads for a 10-second interval at a

    clinical sampling rate of 500 sps.

    3) Interpretation of the 12-lead ECG

    Feature Extraction:

    ECG interpretation starts with feature extraction, which has two parts as shown in. The

    goals of this process are (1) waveform recognition to identify the waves in the ECG

    including the P and T waves and the QRS complex, and (2) measurement to quantify a

    E&C Dept. 3 VVCE, Mysore

  • 8/6/2019 ECG Analysis System

    4/16

    By: Vijay R ECG Analysis System

    set of amplitudes and time durations that is to be used to drive the interpretation process.

    Since the computer cannot analyze the ECG waveform image directly like the human

    eye-brain system, we must provide a relevant set of numbers on which it can operate.

    The first step in waveform recognition is to identify all the beats using a QRS detection

    algorithm. Second, the similar beats in each channel are time-aligned and an average (or

    median) beat is produced for each of the 12 leads. These 12 average beats are analyzed to

    identify additional waves and other features of the ECG, and a set of measurements is

    then made and assembled into a matrix. These measurements are analyzed by subsequentprocesses.

    The 12-lead ECG of a normal male patient

    E&C Dept. 4 VVCE, Mysore

  • 8/6/2019 ECG Analysis System

    5/16

    By: Vijay R ECG Analysis System

    There are two basic approaches for computerized interpretation of the ECG.

    The one used in modern commercial instrumentation is based on decision logic. Acomputer program mimics the human experts decision process using a rule-based expert

    system. The second approach views ECG interpretation as a pattern classification

    problem and applies a multivariate statistical pattern recognition method to solve it.

    The decision logic:

    The decision logic approach is based on a set of rules that operate on the measurement

    matrix derived from the ECG. The rules are assembled in a computer program as a large

    set of logical IF-THEN statements. For example, a typical decision rule may have the

    following format:

    Rule 0021: IF

    (1) QRS .11 sec. on any two limb leads AND

    (2) Sd. .04 sec. on lead I or aVL AND

    (3) Terminal R present lead Vl

    THEN

    (a) QRS .11 seconds; AND

    (b) Terminal QRS rightward and anterior; AND

    (c) Incomplete right bundle branch block

    One advantage of the decision logic approach is that its results and the decision processcan easily be followed by a human expert. However, since its decision rules are elicited

    indirectly from human experts rather than from the data, it is likely that such a system

    will never be improved enough to outperform human experts. Unlike human experts, the

    rule-based classifier is unable to make use of the waveforms directly. Thus, its capability

    is further limited to looking at numbers that are extracted from the waveforms that may

    include some measurement error. Also, with such an approach, it is very difficult to make

    E&C Dept. 5 VVCE, Mysore

  • 8/6/2019 ECG Analysis System

    6/16

    By: Vijay R ECG Analysis System

    minor adjustments to one or few rules so that it can be customized to a particular group of

    patients.

    Figure shows the final summary provided to the clinician by an interpretive

    ECG machine for the ECG

    3) Empirical Mode Decomposition

    A new non-linear technique, called Empirical Mode Decomposition method, has recently

    been developed by N.E.Huang et alfor adaptively representing non-stationary signals assums of zero mean AM-FM components. EMD is an adaptive, high efficient

    decomposition with which any complicated signal can be decomposed into a finite

    number of Intrinsic Mode functions (IMFs). The IMFs represent the oscillatory modes

    embedded in the signal, hence the name Intrinsic Mode Function.

    The starting point of EMD is to consider oscillations in signals at a very local level. It is

    applicable to non-linear and non-stationary signal such as ECG signal.

    An Intrinsic Mode function is a function that satisfies two conditions [6]:

    (1) The number of extreme and the number of zero crossings must differ by at most 1.

    (2) At any point the mean value of the envelope defined by maxima and the envelope

    defined by minima must be zero.

    The whole procedure can be described by the following algorithm.

    E&C Dept. 6 VVCE, Mysore

  • 8/6/2019 ECG Analysis System

    7/16

    By: Vijay R ECG Analysis System

    The ECG signal is first decomposed into IMFs. The sum of these IMFs

    should represent the signal well. The IMFs are obtained using the sifting process

    described in the earlier section.

    The first four IMFs are filtered to remove noise. We use a low pass filter as

    the noise comprises the higher frequency components. The filter used by us inprogramming is the low pass Butterworth filter. We use a Butterworth filter

    because of its inherent characteristics of having a flat frequency response.

    The 1st IMF is now eliminated. We reconstruct the enhanced signal by

    eliminating the 1st IMF and adding up the rest IMFs.

    The enhancement algorithm was then used and the SNRs of the enhanced signals were

    calculated to find the efficiency of the proposed

    Although this method is very crude it comes with some advantages.

    The unwanted effects of large peaked T and P waves are minimized. Moreover it has

    been shown to perform extremely well in the presence of noise.

    FUTURE WORK

    Empirical Mode Decomposition and Wavelet Transform are both very recent

    techniques. Hence a lot of research needs to be done on the properties so that we can

    come up with still simpler methods for ECG signal Analysis.

    Feature extraction is yet another field in ECG signal Analysis untouched by us.

    But it is very important for classification of Arrthymia. Hence our future work will be

    dedicated to feature extraction and classification.

    E&C Dept. 7 VVCE, Mysore

  • 8/6/2019 ECG Analysis System

    8/16

    By: Vijay R ECG Analysis System

    The process of enhancement can be modified using more evolved techniques.

    Research needs to be done for finding more efficient methods for signal enhancement.

    4) TYPES OF ECG(Based on number of leads)

    1 lead, 3 lead, 5lead, 6 leads, 8leads, 12 leads.

    The best type out of the above is 12 lead ECG as it is the most reliable as it gives the

    most accurate results about.

    The Leads in a 12 lead ECG are RA, LA, RL, LL, V 1, V2, V3, V4, V5, V6 and the 2 limbleads L1 and L2.

    5) ST-SEGMENT ANALYZER

    The ST-segment represents the period of the ECG just after depolarization, the QRS

    complex, and just before re-polarization, the T wave. Changes in the ST-segment of the

    ECG may indicate that there is a deficiency in the blood supply to the heart muscle. Thus,

    it is important to be able to make measurements of the ST-segment. This sectiondescribes a microprocessor-based device for analyzing the ST segment.

    ECG with several features marked. The analysis begins by detecting the QRS waveform.

    Any efficient technique can be implemented to do this. The R wave peak is then

    established by searching the interval corresponding to 60 ms before and after the QRS

    detection mark, for a point of maximal value. The Q wave is the first inflection point

    E&C Dept. 8 VVCE, Mysore

  • 8/6/2019 ECG Analysis System

    9/16

    By: Vijay R ECG Analysis System

    prior to the R wave. This inflection point is recognized by a change in the sign of slope,

    zero slopes, or a significant change in slope. The three-point difference derivative method

    is used to calculate the slope.

    If the ECG signal is noisy, a low-pass digital filter is applied to smooth the data before

    calculating the slope. The isoelectric line of the ECG must be located and measured. This

    is done by searching between the P and Q waves for a 30-ms interval of near-zero slopes.

    In order to determine the QRS duration, the S point is located as the first inflection point

    after the R wave using the same strategy as for the Q wave. Measurements of the QRS

    duration, R-peak magnitude relative to the isoelectric line, and the RR interval are then

    obtained. The J point is the first inflection point after the S point, or may be the S point

    itself in certain ECG waveforms. The onset of the T wave, defined as the T point, is

    found by first locating the T-wave peak which is the maximal absolute value, relative to

    the isoelectric line, between J + 80 ms and R + 400 ms. The onset of the T wave, the T

    point, is then found by looking for a 35-ms period on the R side of the T wave, which has

    values within one sample unit of each other. The T point is among the most difficult

    features to identify. If this point is not detected, it is assumed to be J + 120 ms.

    Having identified various ECG features, ST-segment measurements are made using a

    windowed search method. Two boundaries, the J + 20 ms and the T point, define the

    window limits. The point of maximal depression or elevation in the window is then

    identified. ST-segment levels can be expressed as the absolute change relative to theisoelectric line.

    In addition to the ST-segment level, several other parameters are calculated. The ST

    slope is defined as the amplitude difference between the ST-segment point and the T

    point divided by the corresponding time interval. The ST area is calculated by summing

    all sample values between the J and T points after subtracting the isoelectric- line value

    E&C Dept. 9 VVCE, Mysore

  • 8/6/2019 ECG Analysis System

    10/16

    By: Vijay R ECG Analysis System

    from each point. An ST index is calculated as the sum of the ST segment level and one-

    tenth of the ST slope.

    6) QRS Complex Detection Rules

    The QRS complex is the name for some of the deflections seen on a typical

    electrocardiogram (ECG). It is usually the central and most visually obvious part of the

    tracing. The QRS complex corresponds to the depolarization (depolarization is a change

    in a cell's membrane potential, making it more positive, or less negative) of the right and

    left ventricles. Classically the ECG tracing has 5 deflections, arbitrarily named P to T

    waves. The Q, R and S wave occur in rapid succession, do not all appear in all leads and

    reflect a single event so are thus normally considered as a whole complex. A Q wave is

    any downward deflection after the P-wave. An R-wave is an upward deflection and the S

    wave is any downward deflection after the R-wave.

    Software QRS detectors are an integral part of the modern computerized ECG monitoring

    system, the most use is in the ICU where the algorithm must run in real time. In

    arrhythmia monitoring system significant false positive and negative rates can cause

    faulty QRS detection.

    QRS detectors are divided into 2 components

    The Processor: Produces set of linear and non linear filtering of ECG signals.

    The Decision Logic: Used in determination of detection threshold. These are

    assembled in ad hoc fashion.

    Processor

    The processor does linear and non linear digital filtering and peak detection

    E&C Dept. 10 VVCE, Mysore

  • 8/6/2019 ECG Analysis System

    11/16

    By: Vijay R ECG Analysis System

    Filter stages

    The low pass filter along with high pass filter forms the band pass filter that can be

    implemented with integer arithmetic for real time operations. This is followed by

    differential, squaring and averaging.

    The Low pass filter is one of the one of the class filters implemented using differential

    equationy(nT)=2y(nT-T)-y(nT-2T)+x(nT)-2x(nT-6T)+x(nT-12T)

    Where T is an arbitrary value.

    The High pass filter are implemented using the differential equation

    y(nT)=2y(nT-T)-x(nT)/32+x(nT-16T)-x(nT-17T)+x(nT-32T)/32

    The differential is implemented as

    y(nT)=[2x(nT)+x(nt-T)-x(nT-3T)-2x(nT-4T)]/8

    Peak Detection

    The peak level estimation is an important performance factor in QRS detection algorithm.

    The mean peak detector detects the peak as local mean of specified number of past peaks.

    The median peak detector uses median peak values.

    The first order iterative estimator has the general form

    Estimate (n) = (1-A)*Estimate (n-1) +A*peak (n)

    Where A is a positive coefficient less than 1

    The prediction of the peak always will not be ideal and hence has errors.

    The 3 estimators were applied to the peaks derived from time averaged signal plotted.

    The median predictor has lower error than mean and iterative predictors.

    The error is less when previous 7 or 8 values are used for prediction.

    E&C Dept. 11 VVCE, Mysore

  • 8/6/2019 ECG Analysis System

    12/16

    By: Vijay R ECG Analysis System

    Peak Estimator Performance

    The ultimate performance measure is its effect on QRS detection.

    One estimate may have low peak prediction error and some may have better mean square

    error and inconsistent prediction. Hence a consistent predictor is used to have an output

    that has less positive and negative detection if proper relative threshold is used.

    Decision threshold= B*peak level estimate

    Where 0

  • 8/6/2019 ECG Analysis System

    13/16

  • 8/6/2019 ECG Analysis System

    14/16

    By: Vijay R ECG Analysis System

    The ECG of a person Acute inferior myocardial infarction (Heart Attack) :

    The change is significant.

    REFERENCES

    E&C Dept. 14 VVCE, Mysore

  • 8/6/2019 ECG Analysis System

    15/16

    By: Vijay R ECG Analysis System

    Abenstein, J. P. 1978. Algorithms for real-time ambulatory ECG monitoring.Biomed.

    Sci.

    Instrum., 14: 7379.

    Abenstein, J. P. and Thakor, N. V. 1981. A detailed design exampleambulatory ECG

    monitoring. In Tompkins, W. J. and Webster, J. G. (eds)Design of Microcomputer-

    Based

    Medical Instrumentation. Englewood Cliffs, NJ: Prentice Hall.

    Abenstein, J. P. and Tompkins, W. J. 1982. A new data reduction algorithm for real-time

    ECG

    analysis.IEEE Trans Biomed Eng., BME-29: 4348.

    Ahlstrom, M. L. and Tompkins, W. J. 1981. An inexpensive microprocessor system for

    high

    speed QRS width detection.Proc. 1st Annual IEEE Compmed. Conf., 8183.

    Ahlstrom, M. L. and Tompkins, W. J. 1983. Automated high-speed analysis of Holtertapes with

    microcomputers.IEEE Trans. Biomed. Eng., BME-30: 65157.

    Bonner, R. E. and Schwetman, H. D. 1968. Computer diagnosis of the electrocardiogram

    II.

    Comp. Biomed. Res., 1: 366.

    Furno, G. S. and Tompkins, W. J. 1982. QRS detection using automata theory in a

    batterypowered

    microprocessor system.IEEE Frontiers of Eng. in Health Care, 4: 15558.

    Klingeman, J., and Pipberger, H. V. 1967. Computer classification of electrocardiograms.

    Comp. Biomed. Res., 1: 1.

    Macfarlane, P. W., Lorimer, A. R., and Lowrie, T. D. V. 1971. 3 and 12 lead

    electrocardiogram

    interpretation by computer. A comparison in 1093 patients.Br. Heart J., 33: 226.

    Mueller, W. C. 1978. Arrhythmia detection program for an ambulatory ECG monitor.

    Biomed.

    Sci. Instrum., 14: 8185.

    Pan, J. and Tompkins, W. J. 1985. A real-time QRS detection algorithm. IEEE Trans.

    Biomed.

    Eng., BME-32(3): 23036.Pordy, L., Jaffe,H., Chesky, K. et al. 1968. Computer diagnosis of electrocardiograms,

    IV, a

    computer program for contour analysis with clinical results of rhythm and contour

    interpretation. Comp. Biomed. Res., 1: 40833.

    Thakor, N. V. 1978. Reliable R-wave detection from ambulatory subjects.Biomed. Sci.

    Instrum.,: 6772.

    E&C Dept. 15 VVCE, Mysore

  • 8/6/2019 ECG Analysis System

    16/16

    By: Vijay R ECG Analysis System

    Yan Lu, Jingyu Yan, and Yeung Yam, Model Based ECG denoising using

    empirical mode decomposition,IEEE International Conference on

    Bioinformatics and Biomedicine, pp. 191-196, 2009.

    E&C Dept. 16 VVCE, Mysore