A VLSI Architecture for Arrhythmia Detection using Mathematical Morphology and Wavelet Transform

DOI : 10.17577/IJERTV3IS21237

Download Full-Text PDF Cite this Publication

Text Only Version

A VLSI Architecture for Arrhythmia Detection using Mathematical Morphology and Wavelet Transform

Gopika Gopal

PG student, VLSI and Embedded Systems Dept. of Electronics and Communication TKM Institute Of Technology

Kollam, Kerala, India

Abstract The major cause for increasing death rate in the world is heart related diseases. Any disorder relating to heart is termed as arrhythmia and its detection is possible by the continuous evaluation of ECG (Electro Cardio Graph) signals. ECG signal is a representative signal containing information of the heart. The main task in ECG signal analysis is the extraction and detection of QRS complex, which is the central and most visually obvious part of the tracing. Noise from different sources often pollute the signal after acquisition, and therefore necessitates signal pre-processing. The pre- processing is the conditioning of ECG signal with the help of morphological operations. The conditioned signal is passed through a transformation stage, which decomposes the ECG signal for generating the feature which facilitates arrhythmia detection. An architecture for wavelet transform using the concept of distributed arithmetic for the detection of R-R interval is to be developed, which is an efficient substitute for multipliers in DSP applications. The output of the transformation module is passed through a comparator to detect arrhythmia. The design is suitable for both batch processing of huge volume of ECG data and real time applications for portable devices. The programming language used is Verilog and is simulated using Xilinx ISE design suite 13.2.

KeywordsArrhythmia, ECG, QRS complex, Mathematical Morphology, Wavelet transform, Distributed arithmetic, R-R interval, DSP.

  1. INTRODUCTION

    Major causes of threat to life are the diseases associated with heart. Arrhythmia is one such heart disorder which is a irregularity in heart beat. In cases of arrhythmia the heart may beat either too fast or slow. When a person is arrhythmic the heart may not be able to pump sufficient blood to all body parts that is necessary for circulation. This can even cause damage to vital organs such as brain, heart etc.. of the body. So it is very crucial to detect conditions of arrhythmia and take necessary measures before it causes threat to life.

    Karthika Manilal

    Asst. Professor,

    Dept. of Electronics and Communication TKM Institute Of Technology

    Kollam, Kerala, India

    Normally the physicians diagnose arrhythmia by the continuous evaluation of the ECG (Electro Cardio Graph) signal that is obtained by placing the electrodes at appropriate body positions. The medical professionals reports arrhythmia as an abrupt and abnormal ECG beat. It is very difficult to identify the symptoms of arrhythmia from the lengthy ECG record. Information regarding this disorder can be obtained from the variations in the length and width of the QRS complex. It is also difficult to catch up the cases of arrhythmia because they are the most elusive events. They sometimes appear for a short interval of time and continue for indefinite time periods. Some of the common symptoms of arrhythmia are dizziness, fainting and on the worst it may turn out to be deadly causing ventricular fibrillation.

    In many situations, the ECG is recorded during ambulatory or strenuous conditions such that the signal is corrupted by different types of noise, sometimes originating from another physiological process of the body. Some major noises in ECG signal are electrode contact noise, baseline drift, motion artifacts and instrumentation noise, which are causing as a result of power line interference, interference of RF signals and disturbances during the ECG measurement using the electrodes. Hence, noise reduction represents another important objective of ECG signal processing; in fact, the waveforms of interest are sometimes so heavily masked by noise that their presence can only be revealed once appropriate signal processing has been applied.

    A typical ECG signal consists of five deflections, out of which the central and most visually obvious part of ECG tracing is denoted as R peak. R peak denotes heart beat of the person, whose ECG is being traced. One of the major characteristic parameter in an ECG recording is the R-R interval. It is the time duration between two consecutive R peaks in an ECG tracing. For a normal ECG, the R-R interval lies in the range 0.6 to 1.2 seconds. For an ECG having arrhythmia, the R-R interval will varies from this range, i.e, it will be either higher than this range or will be

    lower. By properly analyzing the R-R interval duration, it is possible to diagnose whether an arrhythmia is present or not.

    looking for a depressed segment between the S and T waves.

    This paper is organized as follows. Section 2 focuses on Electrocardiogram, different noise sources in ECG signal and some ECG filtering techniques applied to FPGAs and to ASICs. In Section 3, proposed method; ECG signal conditioning using the concept of mathematical morphology ie, noise suppression and baseline wander removal from the noisy input ECG signal using morphological filtering are discussed. In section 4 the simulation results of the proposed techniques were discussed. Conclusions and on going works are discussed in section 5.

  2. LITERATURE SURVEY

    1. Electrocardiogram

      The heart is an organ which pumps oxygenated blood throughout the body to important organs and deoxygenated blood to lungs. Left and right sides of the heart consist of two chambers – an atrium and a ventricle. Walls of the heart are formed by cardiac muscle (myocardium). This muscle is responsible for the mechanical work done by the heart, i.e, pumping of blood. For controlling the pumping process, specialized muscle cells that conduct electrical impulses evolved. These impulses are called action potential and they are responsible for forming the ECG waveform on the body surface. An electrocardiogram (ECG) is a device which graphically records the electrical activity of the muscles of the heart and the graphical representation is known as Electrocardiograph. It is used to identify normal and abnormal heartbeats. The electrical signals measured by the ECG have been characterized and represent various phases of a heartbeat [24]. Each time the heart beats, it produces three distinct ECG waves. The first pulse that is seen is called the P wave. This represents the atrial contraction. The next pulse is the largest signal and is called the QRS complex. This segment of the graph represents the electrical signal created by the relaxing of the atria and the contraction of the ventricles. Completing the cycle is the T wave, which signifies the relaxing, or repolarization, of the ventricles. The characteristic sound of a heartbeat corresponds to the QRS complex and the T wave. ECGs provide useful data and can help detect various problems related to heart function. One basic determination that can be made with an ECG is the heart rate, which can be determined by measuring the distance between peaks. Diagnosis of certain medical problems is also possible. For example, in patients with high blood pressure, the amplitude of the QRS complex is significantly increased. The balance of certain chemicals in the body can also be detected by an ECG, since the amplitude of the signals is related to the levels of chemicals in the body. Damage in the heart can also be observed by a deformation in the Q wave. The most useful characteristic of the ECG is its ability to detect and describe arrhythmias, or abnormal heartbeats. Finally, ECGs can be used to observe obstructions n the arteries. This is typically done by

      Figure 1: A typical ECG signal

      Figure 1 represents a typical ECG signal. It mainly consists of five deflections denoted as P, Q, R, S and T. A typical ECG tracing of the cardiac cycle (heartbeat) consists of a P wave, a QRS complex, a T wave, and a U wave, which is normally invisible in 50 to 75% of ECGs because it is hidden by the T wave and upcoming new P wave. The baseline of the electrocardiogram (the flat horizontal segments) is measured as the portion of the tracing following the T wave and preceding the next P wave and the segment between the P wave and the following QRS complex (PR segment). In a normal healthy heart, the baseline is equivalent to the isoelectric line (0mV) and represents the periods in the cardiac cycle when there are no currents flowing towards either the positive or negative ends of the ECG leads. However, in a diseased heart the baseline may be elevated or depressed relative to the isoelectric line due to injury currents flowing during the TP and PR intervals when the ventricles are at rest. The ST segment typically remains close to the isoelectric line as this is the period when the ventricles are fully depolarised and thus no currents can flow in the ECG leads. Since most ECG recordings do not indicate where the 0mV line is, baseline depression often gives the appearance of an elevation of the ST segment and conversely baseline elevation gives the appearance of depression of the ST segment.

      PR Interval : The PR interval is measured from the beginning of the P wave to the beginning of the QRS complex and has a duration of 120 – 200 milliseconds.

      PR Segment : The PR segment connects the P wave and the QRS complex and has a duration of 50 120 milliseconds.

      QRS Complex : The QRS complex reflects the rapid depolarization of the right and left ventricles. The ventricles have a large muscle mass compared to the atria, so the QRS complex usually has a much larger amplitude than the P wave. It has a duration of 80 120 milliseconds.

      ST Segment : The ST segment connects the QRS complex and the T wave. The ST segment represents the

      period when the ventricles are depolarized. It is isoelectric. It has a duration of 80 120 milliseconds.

      QT Interval : The QT interval is measured from the beginning of the QRS complex to the end of the T wave and has a duration of up to 420 milliseconds.

    2. Different Sources of Noises in ECG Signal

      ECG is the graphical recording of the electrical activity of the heart and recognized biological signal used for clinical diagnosis. The ECG signal is very sensitive in nature, and even if small noise mixed with original signal the various characteristics of the signal changes. The signal voltage level is as low as 0.5 to 5mV and is susceptible to artifacts that are larger than it. The frequency components of a human's ECG signal fall into the range of 0.05 to 100Hz and as far as the noise is concerned; the muscle movements, mains current and ambient electromagnetic interference generate it [12]. Hence filtering remains an important issue, as data corrupted with noise must either filter or discarded.

      The objectives of acquisition of ECG signal and signal processing system is to acquire the noise free signal. The major sources of noise are:

      1. Power line interference

      2. Muscle contractions

      3. Electrode contact noise

      4. Motion Artifacts

      5. Baseline wandering

      6. Noise generated by electronic devices used in signal processing circuits

      7. Electrical interference external to the subject and recording system

      8. High-frequency noises in the ECG

      9. Breath, lung, or bowel sounds contaminating the heart sounds.

    Among these, the main sources are: (1) the baseline wander (BW) mainly caused by respiration, and (2) high- frequency noise such as the electromyographic (EMG) noise caused by the muscle activity. Moreover, the motion of the patient or the leads affects both types of artifacts. There are various types of methods to extract the ECG parameters from the noisy ECG signal. First we need to analyze ECG signal to get which type of noise mesh up with the signal. In ECG enhancement, the goal is to separate the valid ECG from the undesired artifacts so as to present a signal that allows easy visual interpretation.

    B. ECG Filtering Techniques

    The filtering techniques are primarily used for pre- processing of the signal and have been implemented in a wide variety of systems for ECG analysis. Filtering of the ECG is contextual and should be performed only when the desired information remains ambiguous. Many researches have worked towards reduction of noise in ECG signal. Most types of interference that affect ECG signals may be removed by band pass filters; but the limitation with band

    pass filter is discouraging, as they do not give best result. At the same time, the filtering method depends on the type of noises in ECG signal. In some signals the noise level is very high and it is not possible to recognize it by single recording, it is important to gain a good understanding of the noise processes involved before one attempt to filter or preprocess a signal. The ECG signal is very sensitive in nature, and even if small noise mixed with original signal the characteristics of the signal changes. Data corrupted with noise must either filtered or discarded, filtering is important issue for design consideration of real time heart monitoring systems. [Himanshu, S. et al (2010)], designed amplifier using instrumentation amplifier AD620 (Analog Devices) to bring the peak value into a range of 1v; having gain of 1000. For collection of ECG signal he has used band pass filter with cutoff frequency 0.5Hz-150 Hz on NI ELVIS (National Instruments Educational Laboratory Virtual Instrumentation Suite) board as shown in Figure 2.

    Figure 2: Band pass filter

    After the filtration the output of the analog filter is fed to the NI ELVIS. It has inbuilt data acquisition card. DAQ assistant is used to collect the signal after passing through the band pass filter. The data sampled at a rate of 1 KHz. After acquiring the signal it is processed by Butterworth (IIR) 3rd order digital filter. The first digital filter is band stop filter between 49.5 to 51.4 Hz to eliminate power line interference.

    Butterworth filter having various orders, the lowest order being the best in time domain, and higher order being better in frequency domain. It is having monotonic amplitude frequency response, which is maximally flat at zero frequency response, and amplitude frequency decreases logarithmically by increasing frequency. The main source of baseline wandering is respiration. It is having the frequency range between 0.15 to 3 Hz. They used the wavelet transform to eliminate the Baseline wandering which is an effective way to remove the signal in specified sub-bands. After the removal of baseline wandering, the resulting ECG signal is more stationary and explicit than the original signal.

    Power line interference is due to improper grounding of ECG equipment and interference from nearby equipment. It is removed by using notch filter. The power line interference is more influential on the signal compared to the other types of artifact [Correia, S. et al (2009)]. The major source of such noise is electrical activity of the muscles that should be removed i.e. the noise present due to

    power line interface (50HZ) is also to be removed as shown in Figure 3. Eventhough the analog amplifier having high Common Mode Rejection Ratio (CMRR), the ECG signals is contaminated by power line interference (50 HZ in India). In order to discard the sources of noise, proper filtration is required. The suppression of Baseline Wander and Power Interference can be done using digital IIR filter.

    Figure 3: ECG corrupted due to powerline interference

    [Padma T. et al (2009)] , used adaptive noise filtering for removalof 50 Hz that is the power line interference because, the ECG signal also contains 50 Hz signal and if normal band reject filter is used, then the 50 Hz signal which is very important in the ECG signal will be lost. Therefore by opting adaptive noise filtering, the power line frequency can be eliminated at the same time retaining the 50 Hz signal in the original waveform.

    [Eduardo P. et al] demonstrated in such a way that the signal from the ECG leads is applied to the inputs of an instrumentation amplifier scheme with a high common mode rejection ratio. The amplified signal is then filtered using a set of active filters in order to increase the SNR (Butterworth 50 mHz high-pass filter (HPF) to diminish baseline wandering and slow motion interferences and Butterworth 150Hz low-pass filter (LPF) to diminish the EMG interference. For 50Hz interference a 10th order notch digital filter was implemented as part of the digital signal processing. After analog filtering, the signal is acquired by a multifunction I/O board (NI USB-6008 with 12 bit resolution and 10 kS/s maximum sampling rate). The hardware is developed in order to create a portable system based on a Laptop where the data acquisition device (DAQ) is USB bus-powered and the ECG conditioning circuits are powered using two 9V (2500mAh) batteries incorporated in the system (the lifetime of the batteries is large, as the power consumption is only of 25 mA). The active high-pass filter removes the baseline fluctuations; the implemented digital filtering block consists of a 150 Hz Bessel LPF and the 50Hz notch filter in order to obtain a better SNR. After digital filtering the digital signal is processed using an ECG analysis block.

    [Ju-Won Lee et al (2005)] used LMS adaptive filter to filter the ECG signal, but its convergence and performance cause distortions and even poor performance, depending on the environment and the patients condition. They proposed DSAF, which provided better performance in the experiment and hence suggested LMS adaptive filter (DSAF) applied to ECG signal processing.

    [Dehghani, M. J. et al (2010)] used computer based signal processing and analysis. Baseline wandering is usually in amplitude of around 15%, full-scale deflection at a frequencies wandering between 0.15 and 0.3 Hz and a high pass digital filter can only suppress it. They used a Kaiser Window FIR high pass filter to remove the baseline wandering. They found that there are still other types of noise, which still affect the ECG signal, after removing baseline wandering. Tis noise may be stochastic processes within a wideband so it cannot be removed by using traditional digital filters. For removing wide band noises, undecimated wavelet transform (UWT) is applied, which has a better balance between smoothness and accuracy than the discrete wavelet transforms (DWT).

    [Chavan M. S et al (2006)] designed equiripple notch filter having minimum order 580 and sampling frequency of 1000 Hz and performed using FDA tool in MATLAB. They found the reduction in signal power of 50 Hz is more in the equiripple and least squares methods when compared with the window method reduction. [Leif, S et al (2006)] designed a linear, time-invariant, high pass filter for removal of baseline wander involving several considerations, of which the most crucial are the choice of filter cutoff frequency and phase response characteristic. The cutoff frequency should obviously be chosen so that the clinical information in the ECG signals remains undistorted while as much as possible.

    [Pedro R. G. et al (2007)] used two Butterworth filters in ECG acquisition system for reducing the 50 Hz noise and for eliminating the DC component of the signal and to achieve the peaks P, Q, R, S, and T without noise and their correspondent position in the array.[Heyoung Lee et al (2008)] designed a 24-hour health monitoring system in a smart house using a high pass filter with cut-off frequency

    0.1 Hz. It prevents introducing drift noise in the measured signal and the notch filter removes the 60 Hz power line noise.

    [Patrick O. B. et al (2004)], used a 60Hz notch-filter, Texas Instruments UAF42, in the design of the signal acquisition hardware since the UAF42 has much better attenuation and sharp notch curve control than other technologies. This has resulted in major noise reduction while amplifying the ECG signal. [Yatindra et al (2010)] quantified relative performance analysis of different filtering methods for power line interface reduction and have discussed three approaches to remove noise and interference. Frequency – domain filtering (Notch Filter) to remove 50Hz component of ECG signal. Here the notch filter and other pass band, band stop filters are fixed filter, they used only limited resources and cannot change its performance according to their need. Wiener filter use the statistical characteristics for noise removing process like reference signal or secondary recorded ECG signal. They cannot change its parameter to get the optimal results, so they called it ad optimal filter. Adaptive filters are self- designing filters based on an algorithm which allows the filter to learn the initial input statistics and to track them, if they are time varying. The least mean square algorithm

    used to adjust the weights of the adaptive filter in order to minimize the error and estimate the deterministic component through filter output.

    [Kearney. K. et al] developed a more accurate and reproducible method of quantifying motion artifact in ECG (electrocardiogram) electrodes to assist in electrode assessment and design. It uses an algorithm developed by Sensor Technology & Devices Ltd. to reliably overcome the variation in results due to differing skin types and other causes of spurious readings such as reproducibility of movements used. The method combines a clear, concise experimental protocol with a software package and DSP algorithm to produce a transferable result for one pair of electrodes that can be used for comparison.

    Sayadi et al. [15] presented a method for ECG baseline correction using the adaptive bionic wavelet transform (BWT). In fact by the means of BWT, the resolution in the time-frequency domain can be adaptively adjusted not only by the signal frequency but also by the signal instantaneous amplitude and its first-order differential. First an estimation of the baseline wandering frequency is obtained and then the adaptation can be used only in three successive scales in which the mid-scale has the closest centre frequency to the estimated frequency. Thus the implementation is possibly time consuming. Dotsinsky et al. [20] have assessed the efficiency of notch filters and a subtraction procedure for power-line interference cancellation in electrocardiogram (ECG) signals. In contrast with the subtraction procedure, widely used digital notch filters unacceptably affect QRS complexes.

    It is difficult to deal with electrical interference since it cant be filtered without compromising the ECG complex because of its similarity to the ECG signal frequency, so it is best to monitor away from other equipment, ensuring cable and lead wires do not cross the power cables of other equipment or vent tubing. To reduce muscle tremor and patient movement, attempt to warm a shivering patient or make them more comfortable in a reclined position, if possible, rather than adjust a filter setting and then continually check lead wire-to-electrode connection and electrode-to-patients skin adhesion to ensure ECG quality and prevent false alarms. It is important to select a suitable lead that shows the largest amplitude and cleanest signal so that a QRS complex and R-wave, in particular, can be accurately detected by the monitor. Clinicians depend on the monitors they use every day to provide accurate and useful information. When it comes to ECG quality, the electrode type, electrode application, and skin preparation are factors that play an important role in sending a good ECG signal to the monitor for analysis.

  3. PROPOSED METHOD

    This sction presents the pre-processing of ECG signal for the removal of all the noise artifacts present in the signal, especially baseline wander and other high frequency noises. The pre- processing helps in conditioning the ECG

    signal and is based on the concept of mathematical morphology.

    The entire system can be broadly divided into three modules: signal conditioning module, decomposition and QRS peak detection module and arrhythmia detection module as shown in figure 4. In order to extract the information hidden in the ECG signal many types of transformations can be adopted and because of the quasi periodic nature of the non-stationary ECG signals, transformation is done using the wavelet transform. The ECG signal that is non-stationary has P, QRS complex and T waves. The duration of each of the waves signifies the electrical activity of the heart. P wave indicates the atrial contraction or depolarization. PR interval indicates the time duration for the travel of the depolarization wave from the atria to the ventricles. QRS complex indicates ventricular depolarization.ST segment shows the time between ventricular depolarization and the starting of repolarization. And the T wave shows the ventricular repolarization. For detecting the heart rate QRS complex detection is necessary. Among all the waves in the signal the QRS complex has higher amplitude. The ECG signal is captured by using electrodes attached to appropriate body positions such as chest or wrist and there is also another option of capturing the signal from the database. Here the ECG signal is taken from the MIT-BIH arrhythmia database [26]. Once the signal has been captured, filtering can be done inorder to remove any unwanted noise in the captured signal. Basic principle behind the ECG signal analysis system is to find the QRS complex. Easier method for detecting the QRS complex is to find out the R peak.

    Figure 4 : Basic block diagram of the arrhythmia detection system

    The initial process involved in processing the ECG signal is to remove such variations using appropriate filtering methods such as the morphological filtering [1]. While filtering such biomedical signals care should be taken not to alter or filter out the desired information in the signal. Once the signal is devoid of such variations it is subjected to a 4 level decomposition using the distributive arithmetic DWT that is responsible for extracting the details in the ECG signal. After extracting such informations embedded in the signal, i.e. the timing and frequency details of the waveforms it is compared with the actual signal to identify if there are conditions of arrhythmia. Generally all the arrhythmia detection systems use the usual DWT method for feature extraction. But my focus is to reduce the time taken for the DWT process as it involves many multiplication and other complex operations. I am trying to incorporate a distributive arithmetic DWT which reduces the time for calculations.

    1. Morphological Filtering

      Morphological filtering basically transforms the geometrical structure of an image. Morphological operations can be performed on both binary and grey scale images. Some of the applications of morphology are texture analysis, edge detection and skeletonization. The most important element that is necessary for a morphological operation is called a structuring element. They are used for processing an image. Structural elements are pixel windows that can be scanned over the image. The structural element can be a matrix of any size and the standard sizes are 5×5, 3×3 etc. Different types of mathematical morphology operations are dilation, erosion, opening and closing. The opening and closing operations are a combination of the basic dilation and erosion operations. The Structural element is scanned over an image and it may either fit into the object or does not fit into the object. Morphological operation transforms complex shapes into meaningful representations.

      Erosion is used for shrinking or eroding objects in an image. Amount of shrinking required depends on the size of the structural element which in turn depends on the shape of the image or signal to be processed. This operation makes the object smaller by removing the pixel from the edges. Pixels are removed from both the inner and outer boundaries of regions thereby enlarging the holes enclosed by a single region and making gaps between regions larger. They are used for removing extrusions on signal boundaries.

      Consider I(n) to be the input ECG signal, I (n)

      = {n=0,1,2,3….N-1} And B be the structural element

      B (m) = {m=0, 1 , 2M-1}

      When the input ECG signal is subjected to erosion operation the following result is obtained,

      Erosion :

      (I B)n = min {I(n- (M-1/2)+m) – B(m)}..(1)

      M=0 M-1

      n = {(M-1)/2,.N-(M+1)/2}

      Dilation is an expansion operator. Dilation is having an opposite effect to erosion and adds pixels to inner and outer boundaries of region. It is used for expanding the shape contained in the input signal. And it bridges gaps in the image. During dilation area of foreground pixels grow in size and holes within regions gets smaller from above and the result will be the lowest point reached by the structural element. These two operations are equally important for noise filtering in ECG signal as opening suppresses peaks and closing suppresses pits.

      Dilation :

      (I+B)n=max{I(n-(M-1/2)+m)+B(m)}…………(2)

      M=0 M-1

      n = {(M-1)/2,..N-(M+1)/2}

      Opening : I o B = I B + B…………………………(3)

      Closing : I B = I + B B………………….(4)

      The basic block diagram for ECG signal conditioning is shown in figure 5. Here, the input is a raw ECG signal, which is corrupted by noises. For the meaningful and accurate detection, steps have to be taken to filter out or discard all these noise sources. The major noises that may corrupt the ECG signal are baseline wander and noises. For proper removal of these, morphological filtering can be used. Morphological filtering is the method by which filtering is done using morphological operations. The noises in the input ECG signal is removed initially and the baseline drift of the noise removed ECG is estimated. This baseline drift estimate is then subtracted from the noise removed ECG to obtain the conditioned ECG signal.

      Figure 5 : Block diagram for ECG signal conditioning

      The basic block diagram of the noise suppression module is shown in figure 6. Here, the input ECG signal is subjected to concurrent opening and closing operations. The output of the opening module is then subjected to closing and the output of the closing module is subjected to opening. The results are averaged together to obtain the noise removed ECG signal. The structuring element is chosen so as to enhance the QRS complex of the ECG signal. The structural element chosen is a triangular structuring element, denoted as B. The choice of B depends on the morphological properties of the ECG signal. It retains peaks and valleys and removes noise in the signal.

      I = ½{ Ibc B + Ibc o B}…………………..(7)

      Figure 6: Block diagram for noise suppression

      1. (b)

        Figure 7: Block diagram for (a) opening operation and (b) closing operation

        Opening and closing operations are used for baseline correction and noise suppression in conditioning of ECG signal. Some sequence of both the operations are used for conditioning the signal. Different structural elements and different morphological operators are used depending on the characteristics of the ECG signal. Opening is the result of an erosion operation followed by a dilation operation and closing is the result of a dilation operation followed by an erosion operation as shown in figure 7. For noise suppression, both erosion and dilation are done using the same structuring element values. For baseline wander removal, different structuring elements are used.

        After noise suppression, the resultantnoise free signal is given to a baseline wander removal module to remove the baseline wander in the ECG signal. This baseline drift is estimated initially and is subtracted from the noise removed ECG signal to obtain the conditioned ECG signal. For the baseline correction, drift in the background signal has to be removed from the input ECG signal. The baseline correction is done using an opening operation followed by a closing operation as shown in figure 8. The opening operation is done by using a structural element B0. This removes peaks in the signal. After this, closing operation is performed using structural element Bc which is done for removing pits

        in the signal. By doing these operations the result will be the estimate of the baseline Ib.

        Figure 8: Block diagram for baseline wander removal

        The structural elements B0 and Bc are chosen to be horizontal line segments of zero amplitude and different lengths. The construction of the structural element for baseline correction depends on the duration of the characteristic wave and the ECG signal sample frequency (Fs Hz). Let Tw(s) be the width of the characteristic wave, then the number of wave samples is Tw(s) Fs . For extracting the characteristic wave the length of the structural element B0 should not be lesser than the number of wave samples Tw(s) Fs. The length of the structural element Bc should be larger than B0. Since the P, T, QRS complex of the ECG signal has a width less than 0.2 sec, the length of B0 is chosen to be 0.2 Fs and Bc to be 1.5 times the length of B0. By subtracting baseline drift signal Ib from the orginal ECG signal I0 the correction of the baseline can be performed.

        Ibc = I oB0 Bc…………………………….(5) I = ½{ (I – Ib) o B B + (I- Ib) B o B}……… (6)

    2. Distributive Arithmetic Discrete Wavelet Transform ( DA DWT)

    Transforms are used to obtain further information from the signal which may not be available from the raw signal. More of the signal information is hidden in the frequency content of the signal. Doctors usually use the time domain ECG signals to diagnose heart problems. But ECG recorders that are computerized uses the frequency information for deciding some pathological condition. Such conditions can be easily diagnosed when the frequency content of the ECG signal is analyzed. Since ECG signals are non stationary DWT are the most relevant transforms that can be used for feature extraction. DWT can be used for a wide variety of applications such as compression, decomposition, feature extraction etc. DWT is a recursive filtering process.

    Figure 9: Four level DWT architecture

    In DWT the ECG signal is passed through a series of low pass and high pass filters. DWT is used for decomposing the ECG signal so that relevant features necessary can be extracted. One of the advantages of using DWT is multi-resolution analysis capability (MRA). MRA provides good time and poor frequency resolution at high frequencies and good frequency, poor time resolutions at lower frequencies. DWT analyzes the signal at different frequency bands with different resolutions by decomposing the signal into approximation and detailed information. Using successive high pass and low pass filtering the ECG signal can be decomposed into different frequency bands. The QRS complex feature can be extracted by performing decomposition up to 4 levels. After the signal has been passed to successive low pass and high pass filters they are subjected to down sampling. The resolution of the ECG signal can be changed by filtering operations and the scale can be changed by up sampling and down sampling. Sampling rate of the signal increases with up sampling and down sampling removes some samples. When the signal is passed through low pass and high pass filters they split the frequency content of the signal into half. Therefore it seems logically for performing a downsampling with a factor of two to avoid redundancy. Downsampling operation is not invertible as it saves only the even numbered components of the filter output. This effect is called aliasing.

    DWT can also be used for denoising the ECG signal but this paper concentrates on the morphological filtering. The ECG signal is decomposed into coefficient vectors using the mother wavelet. The coefficients obtained using the four level decomposition i.e. approximation coefficients of the fourth level and the details of all the four levels are used for analyzing the ECG signal. The summations of values from the ECG signal provide the feature vector. When using DWT in feature extraction it leads to optimal frequency resolution in all frequency ranges. And also the DWT characteristics provide stable features to the ECG

    signal morphological variations. Some of the applications in which DWT can be used are motion detection and tracking, robot positioning, nonlinear adaptive wavelet controller, encoder quantization decoding, repetitive control, real time feature detection, time varying filters, identification, predictive control, audio applications, speech recognition etc.

    Distributive arithmetic DWT simplifies the operations that are done using the normal DWT operation. Normally the multiplication operation is performed by using logic elements such as adders, registers etc. The multiplication operation of two n bit numbers can be performed by using ROM tables of 22n entries. The main advantage of the DA approach is that it speeds up the multiplication process by pre computing all the possible values and they are stored in LUT in ROM. This is a memory based approach that replaces multipliers by small ROM tables. The entries in the LUT are the pre computed result of multiplication. This method is faster than the hardware multiplication if LUTs are stored on the on-chip memory. DA implementation of the wavelet filter requires a cascade of shift registers and a scaling accumulator. The speed can be further increased by increasing the number of LUT but however the complexity increases in such cases.

    Figure 10: Distributed arithmetic discrete wavelet transform

  4. SIMULATION RESULTS

    The design entry is modelled using Verilog in Xilinx ISE Design Suite 13.2 and the simulation of the design is performed using Model Sim from Xilinx ISE to validate the functionality of the design.

    ECG signal conditioning is designed using Verilog. The behavioral simulation is performed using Model Sim 5.7f design suite from Mentor Graphics. First phase design started with the design of basic modules for erosion and dilation operation. The ECG signal obtained from the database was plotted and basic operations such as erosion and dilation was performed

    on it using structuring elements having different length based on the output requirements, whose simulation results are shown in figure 11 and figure 12. Then completed simulation of the whole signal conditioning system and verified results.

    Fig 11: Simulation result of erosion module

    Fig 12: Simulation result of dilation module

    1. Noise Reduction Module

      The figure 15 shows the simulation result of concurrent opening and closing operations. The raw ECG signal corrupted by noises are subjected to an opening operation as shown in figure 13 followed by a closing operation as shown in figure 14 and concurrently performs a closing operation followed by an opening operation. The concurrent opening and closing operations performed using suitable structuring elements will results in suppression of pits and peaks in the ECG signal to obtain the enhanced QRS complex devoid of noises. A triangular structuring element of length 5 is used for this purpose.

      Fig 13: Simulation result of opening module

      Figure 16 shows the simulation result of a noise reduced ECG signal. The noise free ECG signal is obtained as a result of concurrent opening operation followed by closing operation and closing operation followed by opening operation. The results are shown in Figure 15 and the two outputs are averaged together to otained the noise reduced ECG signal as shown in Figure 16. From the figure 16, it is clear that the Q-pit, R-peak and S-pit of the ECG signal is conditioned by removing the abnormality in the shape of the input ECG signal.

      Fig 14: Simulation result of closing module

      Figure 15: Simulation result of concurrent closing and opening operations

      Figure 16: Simulation result of Noise reduced ECG signal

    2. Baseline Drift Estimate

      The baseline drift of the ECG signal is calculated using morphological filtering. Concurrent opening and closing operations are performed using two structuring elements having different lengths, 41 and 81. The structuring elements are used to perform morphological operations so as to suppress all the peaks and pits in the ECG signal to obtain the baseline drift estimate, as shown in Figure 17.

      Figure 17: Simulation result of Baseline drift estimate

    3. Conditioned ECG Signal

    The conditioned ECG signal, shown in Figure 18 is obtained by subtracting the baseline drift estimate from the noise reduced ECG signal. This ECG signal will be devoid of baseline wandering and other high frequency noises. From the figure, it is clear that the amplitude of the input ECG signal reduced from a higher voltage level of 1121 to a lower voltage level of 6. Then a distributive arithmetic DWT was done so as to extract the feature in the ECG signal .

    Figure 18: Simulation result of Conditioned ECG signal

  5. CONCLUSIONS

    This paper intends to design an arrhythmia detection system for ECG signals using mathematical morphology and wavelet transform. ECG signal is always prone to large amount of noise artifacts, mainly baseline wandering and other high frequency noises. By using the concept of mathematical morphology, significant amount of noise can be filtered by performing suitable morphological operations. The input ECG signal corrupted by noises is properly transformed using suitable morphological operations and baseline drift estimate is calculated and properly removed using suitable morphological operations to obtain conditioned ECG signal devoid of noises. Initially, the morphological filtering for noise reduction is performed and the baseline drift of the noise-reduced ECG signal is estimated. This baseline drift estimate is subtracted from the noise reduced ECG signal to obtain the conditioned ECG signal and the simulated output is obtained.

  6. FUTURE SCOPE

This paper only focuses on the ECG analysis approach concentrating on the arrhythmia detection. This can be further modified by incorporating a fuzzy logic that is used to identify what type of heart problem is associated with the abnormal variations in the ECG signal.

REFERENCES

  1. Chio-In Ieong, Mang-I Vai, Peng-Un Mak, and Pui-In Mak, ECG Heart Beat Detection via Mathematical Morphology and Quadratic Spline Wavelet Transform, IEEE Conf. on Consumer Electronics, 2011.

  2. Yao Zou, Jun Han, Xinqian Weng, Xiaoyang Zeng, An Ultra- Low Power QRS Complex Detection Algorithm Based on Down-Sampling Wavelet Transform, IEEE Trans. Signal Processing, vol. 20, pp. 515 – 518, 2013.

  3. M. Nagabushanam, Cyril Prasanna Raj , S. Ramachandran, Design and FPGA Implementation of Modified Distributive Arithmetic Based DWT IDWT Processor for Image Compression, IEEE Conference Proceedings, 2011.

  4. Dehghani M. J., Shahabinia A. R. and Safavi A. K (2010): Implementation of Wireless data transmission based on Bluetooth Technology for bio signals monitoring, World Applied Sciences Journal Vol-10, No-3,pp-287-293.

  5. Yatindra K., Malik G.K., (2010): Performance Analysis of different Filters for Power Line Interface Reduction in ECG Signal, International Journal of Computer Applications, Vol-3, No.7.

  6. Himanshu S., Kumar J. S., Ashok V., Juliet A. V. (2010): Advanced ECG Signal Processing using Virtual Instrument, International Journey. of Recent Trends in Engineering and Technology, Vol. 3, No. 2.

  7. 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.

  8. Padma T, Latha M. M., Ahmed A. (2009): ECG compression and LabVIEW implementation, Journal of Biomedical Science and Engineering, Vol-2, pp 177-183.

  9. Correia S, Miranda J, Silva L. and Barreto A. (2009): LabVIEW and MATLAB for ECG acquisition, filtering and processing, 3rd International Conference on Integrity, Reliability and Failure, Porto/Portugal, July 20-24.

  10. S. Finn, E. Jones, M. Glavin, Design of a Personal Cardiovascular Monitoring System with ECG and Stethoscopic Analysis, IEEE Conf. on Consumer Electronics, 2008.

  11. Chavan M. S., Agarwala R. A. Uplane M.D, Design and implementation of digital FIR equiripple Notch filter on ECG signal for removal of Power line interference. WSEAS Transaction on Signal Processing, April, Volume 4, Issue 4, 2008

  12. Heyoung Lee, A 24-hour health monitoring system in a smart house, www.gerontechjournal.net, January 2008, Vol7, No1, 2008

  13. Kearney K. Thomas C and McAdams E, Quantification of Motion Artifact in ECG Electrode Design IEEE Conf. on Consumer Electronics,2008.

  14. Yun-Chi Yeh, Wen -June Wang, QRS complex detection for ECG signal: The Difference Operation Method, Computer Methods and Programs in Biomedicine 9 I (2008) 245-254.

  15. Sayadi O., Mohammad B.S., ECG Baseline Correction with Adaptive Bionic Wavelet Transform, IEEE International Symposium on Signal Processing and Its Application, 2007

  16. Pedro R.,Gomes, Filomena O. Soares and Correia, J. H,ECG Self Diagnosis System at P- R Interval, Proceedings of VIPIMAGE, pp 287-290,2007

  17. Pinheiro E., Postolache O., Pereira J.M.D.( 2007 ): A Practical Approach Concerning Heart Rate Variability Measurement and Arrhythmia Detection Based on Virtual Instrumentation, Journal of Biomedical Science and Engineering pp. 112 – 115,

  18. Gonzalez R.C. and Woods R.E.(2005): Digital Image Processing 2nd ed., Pearson Education, India, 2005.

  19. S. Z. Mahmoodabadi, A. Ahmadian, and M. D. Abolhasani, ECG Feature Extraction using Daubechies Wavelets, Proceedings of the fifth IASTED International conference on Visualization, Imaging and Image Processing, pp. 343-348, 2005.

  20. Lee, J. W. and Lee, G. K (2005): Design of an Adaptive Filter with a Dynamic Structure for ECG Signal Processing.

    International Journal of Control, Automation, and Systems, Vol. 3, No. 1, pp. 137-142.

  21. S. Z. Mahmoodabadi, A .Ahmadian , M. D.Abolhasani, M. Eslami, J. H.Bidgoli, ECG Feature Extraction Based on Multiresolution Wavelet Transform, Proceedings of the 2005 IEEE, Engineering in Medicine and Biology 27th Annual Conference Shanghai, China, September 1- 4,(2005).

  22. Dotsinsky I., Stoyanov T., Power-Line Interference Cancellation in ECG Signals, Biomed Instrum Technol. 2005 Mar-Apr;39(2):155-62.

  23. Martinez J.P. and R. Almeida, A Wavelet-Based ECG Delineator: Evaluation on Standard Databases, IEEE Transaction on Biomedical Engineering, vol. 51, pp. 570-581, 2004.

  24. Patrick O. B., Electrocardiogram (EKG) Data Acquisition and Wireless Transmission. supported by a grant from U.S.

    National Science Foundation, grant # EIA-0219547, 2004

  25. Hejjel L Suppression of Power Line Interference by Analog Notch Filtering in the ECG signal for Heart Rate Variability Analysis : to do or not to do med. Science 2004 Jan; 10(1): MT 6-13.

  26. P.M. Agante and J.P.M de Sa, ECG noise filtering using wavelets using soft thresholding methods, in Proc. Comput. Cardiology 1999, pp. 535- 542.

  27. A.Barros, A.Mansour, and N.Ohnishi, Removing Artifacts from ECG signals using independent components analysis, Neuro-computing, vol.22, pp-173-186, 1998.

  28. MIT-BIH Arrhythmia Database, www.physionet.org/ physiobank/ database/ mitdb.

Leave a Reply