LABVIEW based expert system for Detection of heart abnormalities Saket Jain Piyush Kumar Monica Subashini.M School of Electrical Engineering VIT University, Vellore - 632014, Tamil Nadu, India Email address: saketjain16@gmail.com, droliapiyush@gmail.com, monicasubashini.m@vit.ac.in Abstract: The proposed method deals with the study and analysis of ECG signal and thereafter the detection of heart abnormalities using LabVIEW Biomedical toolkit effectively. In the first phase, ECG signal is acquired which is then followed by filtering the raw ECG signal to remove unwanted noises. The next phase focuses on extracting the features from the acquired signal. Finally, different types of abnormalities particularly Sinus Bradycardia, Sinus Tachycardia, Supraventricular Tachycardia (SVT) Abnormal, Atrial Flutter and 1 st degree AV Block are detected on the basis of features obtained. Thus the developed system predicts the heart abnormalities of a person, even before him/her consulting a doctor (preliminary investigation). The technique is user-friendly, low cost and hence anyone skeptic of heart problem can analyze his/her ECG using this efficient method. Keywords: ECG Signal, LabVIEW, ECG features, Bio signal filtering, Tachycardia, Bradycardia. I. INTRODUCTION The expert system developed involves the analysis of ECG signal [1] and detection of heart abnormalities by means of LabVIEW Biomedical toolkit effectively [2]. Analysis of ECG signal includes filtering the raw ECG signal to remove unwanted noises [5] and examining the filtered signal for any abnormalities (mainly Arrhythmias) using an efficient algorithm. The list of abnormalities which we focused upon was Sinus Bradycardia, Sinus Tachycardia, Supraventricular Tachycardia (SVT) Abnormal, Atrial Flutter and 1 st degree AV Block. A. Waveform of normal ECG and the abnormal waves of the diseases Normal Sinus Rhythm Sinus Tachycardia Fig.2. Sinus Tachycardia In the abnormality shown in Fig.2, the heart rate of the person is less than 60 BPM (beats per minute)[3].this rate is normal for a healthy athletic person, but for others it can be caused due to increased vagal tone from drug abuse, hypoglycaemia and brain injury with increase intracranial pressure (ICP). Superventricular tachycardia (SVT) Fig.3. Superventricular tachycardia (SVT) This narrow complex tachycardia or atrial tachycardia shown in Fig.3, originates in the 'atria' but is not under direct control from the SA node. This abnormality can occur in person of all the age group. Sinus bradycardia Fig.1. Normal Sinus Rhythm Fig.4. Sinus bradycardia
The heart rate of a person exceeds 100 BPM which results in an abnormality known as Sinus bradycardia highlighted in Fig.4. It originates from the SA node and occurs mainly due to stress,anxiety,infirmity and exercise. No wonder if it occurs beacause of response to dogmatic changes e.g. shock. But if Shock is not the case then medication is the best way to suppress this abormal rhythm. Artrialflutter Atrial flutter (AFL) which is an abnormal heart rhythm depicted in Fig.5 occurs in the atria of the heart as referred from [4]. This rhythm occurs most often in individuals with cardiovascular disease (e.g. hypertension, coronary artery disease, and cardiomyopathy) and diabetes, it may also occur spontaneously in people with otherwise normal hearts. Fig.5. Artrial flutter 1st degree AV blockage Depicted in Fig. 6. is 1st Degree AV block caused by a conduction delay through the AV node but all electrical signals reach the ventricles. This rarely causes any problems by itself and often trained athletes can be seen to have it. Fig.7. Flow Diagram of the system A. Acquiring of ECG signal The Read Bio signal tool shown in Fig.8 is used to take the file path which holds the ECG signal file in TDMS format. It gives the bio signal as the output which is fed to the subsequent stages. Fig.6. 1 st degree AV blockage II. METHODOLOGY The solution for the abnormality detection problem comprises of four important phases-first phase is the acquiring of signal, here we use the stored ECG signal in the system and give to our program for the analysis. Second phase is the filtering of the raw ECG signal [7] to do away with unwanted noises. Third comes the main phase of extracting the features from the signal i.e. the actual analysis of ECG signal in terms of its parameters. The last is the detection of different types of abnormalities on the basis of different values of parameters obtained. But one more important thing which many a time gets missed in the course of analyzing ECG signal is base line wandering, this paper also tries to address this as well. The detail of each phase is given below as a flow diagram in Fig.7. Fig.8. Read Biosignal Toolkit B. Filtering and Rectification of ECG signal Virtual Instrument depicted in Fig.9 filters bio signals with classical stop filters, as well as notch filter and comb filter. We can choose the filter type as low pass, high pass, band pass, or bandstop. We can select different filters, such as low pass, high pass, band pass, band design type like chebyshev, butterworth etc. By trial and error we found the best one for
our application was Dolph-Chebyshev Window. Then using Biosignal Average Rectified Value Virtual Instrument, shown in Fig. 10 helped us in ruling out minor changes which occurred during the acquisition of ECG signal. offset P onset T offset T onset P offset R Returns the onset time of the P It is also the beat start time. Returns the offset time of the T It is also the beat end time. Returns the onset time of the T Returns the offset time of the P Returns the time of the R ` Fig. 9. Biosignal filtering After the extraction of these features, they cannot be directly used for analysis so we find the mean and standard deviation value of each feature and convert it to proper ECG parameter using a virtual instrument (VI) shown in Fig.12. These parameters are now given to the different case structures to detect the different heart abnormalities. Fig. 10. Biosignal Average Rectified Value Virtual Instrument C. ECG Feature Extraction ECG Feature Extractor as shown in Fig.11 detects QRS waves and extracts features from electrocardiogram (ECG) signals. This instrument needs signals of a complete heart beat cycle to extract features, but this extractor needs only the QRS part to detect QRS waves. Thus, the ECG features output might delay from the QRS time and peak output, according to different input block sizes. Fig.12. Virtual Instrument to convert ECG features to required ECG parameter Fig.11. ECG feature extractor ECG features returns the detected features in the ECG signal. Each array element contains the features of a single cycle of the ECG signal. TABLE I. PARAMETERS IN ECG FEATURE EXTRACTOR Output features amplitude iso level QRS onset QRS Their significance Returns the amplitude of the QRS wave Returns the isoelectric level. Returns the onset time of the QRS Returns the offset time of the QRS D. Base line wandering Baseline wandering is actually the effect when the base axis (X-axis) of any signal viewed on a screen (like CRO) appears to move up and down rather than being straight. This results in shifting of entire signal from its normal base. Generally, it is caused due to improper electrode (like rusted, or broken) or from the gross movements of patients or from the mechanical strain on the electrode wires. It can also occur because of improper application of gel between electrode and skin. It is very prominent while taking the ECG (Electro Cardio Gram) of the heart and thus may cause incorrect results, so we must take extra precautions in the machine to eliminate the baseline wander by using different techniques. It can be said to occur when the axis of ECG signal is not fixed to a zero level, rather
it varies with time due to motion artifact. It is detected when the QRS amplitude crosses a threshold value more than a required number of times, during a fixed period. The peak detector shown in Fig. 14 is used for this above mentioned purpose. The ECG waveform is first converted into its components to give the input to peak detector where a threshold is set and the number of times waveform crosses the threshold value is noted if the number seems very large. The user is told to take the measurement again predicted as a warning (error message) shown in Fig. 13. Supraventricular Tachycardia Abnormal (SVT) 140-220 One another arrhythmia atrial flutter is detected by using the condition of inability in measurement of P-R interval i.e. when P-R interval is not determined it could be a case of atrial flutter. 1 st degree AV blockage is detected if P-R interval turns out to be greater than 0.20 second. The front panel of the expert system displays the abnormality based on the features of the received ECG signal. The screen is highlighted in Fig. 15. Fig.13. Error message Fig.14.Peak Detector III. RESULTS The major heart abnormalities detected by our method are : Sinus Tachycardia Superventricular tachycardia (SVT) abnormalities Sinus bradycardia Artrial flutter 1 st degree AV blockage The main determining factor of the different arythmia s in the expert system is the Heart Rate (HR) calculated for the given ECG signal. The ranges are tabulated in Table 2. TABLE 2: HEART RATE RANGES FOR DIFFERENT ARRITHMIA CONDITIONS Arythmia Heart Rate Normal Sinus Rhythm 60 100 Sinus Bradycardia <60 Sinus Tachycardia 100-140 Fig.15. Front Panel IV. CONCLUSION AND FUTURE SCOPE In the proposed work, we have analyzed different ECG signals from normal to highly abnormal comprising of different arrhythmia and blockages. After the complete analysis of all the different types of signal, we were able to determine and calculate the parameters with high precision and use these parameters to detect and confirm heart abnormalities. We also checked for baseline wandering due to motion artifact, so that we do not come out with wrong measurements due to movement of electrodes. Hence the analysis is a very efficient method and much faster than the existing technology. This method can be used for basic abnormalities detection at early stage, it is less expensive, very less time consuming and can
be done without any expert. Therefore we can term this method as life saving system. We have efficiently calculated the different ECG signal parameters but they could be used more effectively to find more heart abnormalities with higher accuracies using the more complex case structures. We can also study and analyze the ECG patterns of different diseases using the parameters found above which may help in determining better algorithms for heart diseases. We have focused only on Software design but the work could be extended as portable hardware design which a user can wear always and instantly sees the heart condition. ACKNOWLEDGMENT The work is supported by School of Electrical Engineering, VIT University, Vellore, India. REFERENCES [1] M. K. Islam, A. N. M. M. Haque, G. Tangim, T. Ahammad, and M. R. H. Khondokar, Member, IACSIT, Study and Analysis of ECG Signal Using MATLAB &LABVIEW as Effective Tools, International Journal of Computer and Electrical Engineering, Vol. 4, No. 3, June 2012. [2] Halley McLaren, The Development of an Exercise Monitor Prototype for the Detection of Arrhythmia Using the Virtual Instrumentation Capabilities of LabVIEW, McMaster University, 4-Jan-2010. [3] The PTB Diagnostic ECG DATABASE [http://www.physionet.org/physiobank/database/ptbdb/]. [4] ECG RHYTHYMS ambulance technician study.[http://www.ambulancetechnicianstudy.co.uk/rhythms.html#.utc _-DDLPAY] [5] S. Correia, J. Miranda, L. Silva, and A. Barreto, LabVIEW and Matlab for ECG Acquisition, Filtering and Processing, 3rd International Conference on Integrity, Reliability and Failure, Porto/Portugal, pp.20-24, 2009. [6]Wikipedia Electrocardiography [http://en.wikipedia.org/wiki/electrocardi ography]. [7] Cory L. Clark, LabVIEW Digital Signal Processing and Digital Communication, Tata McGRAW-HILL EDITION, 2005.