Microsoft Word - 39-2766_s_ETASR_V9_N4_pp4525-4529 Engineering, Technology & Applied Science Research Vol. 9, No. 4, 2019, 4525-4529 4525 www.etasr.com Hii et al.: ECG Noise Reduction with the Use of the Ant Lion Optimizer Algorithm ECG Noise Reduction with the Use of the Ant Lion Optimizer Algorithm Kiew Hui Hii Faculty of Electrical & Electronics Engineering, University of Malaysia Pahang, Pekan, Pahang, Malaysia qhui_0906@hotmail.com Vigneswaran Narayanamurthy Faculty of Electrical & Electronics Engineering, University of Malaysia Pahang, Pekan, Pahang, Malaysia vigneswaran@ump.edu.my Fahmi Samsuri Faculty of Electrical & Electronics Engineering, University of Malaysia Pahang, Pekan, Pahang, Malaysia fahmi@ump.edu.my Abstract—The electrocardiogram (ECG) signal is susceptible to noise and artifacts and it is essential to remove that noise in order to support any decision making for automatic heart disorder diagnosis systems. In this paper, the use of Ant Lion Optimizer (ALO) for optimizing and identifying the cutoff frequency of the ECG signal for low-pass filtering is investigated. Generally, the spectrums of the ECG signal are extracted from two classes: arrhythmia and supraventricular. Baseline wander is removed by a moving median filter. A dataset of the extracted features of the ECG spectrums is used to train the ALO. The performance of the ALO is investigated. The ALO-identified cutoff frequency is applied to a Finite Impulse Response (FIR) filter and the resulting signal is evaluated against the original clean and conventional filtered ECG signals. The results show that the intelligent ALO-based system successfully denoised the ECG signals more effectively than the conventional method. The accuracy percentage increased by 2%. Keywords-ant lion optimazation (ALO); electrocardiogram (ECG); finite impulse response (FIR); cutoff frequency I. INTRODUCTION The first clear electrocardiogram (ECG) signal was obtained in 1895. Since then, ECG analysis became a standard and trustworthy technique of detecting cardiac defects [1], while cardiovascular diseases (CVDs) are the world’s leading cause of death. The number of CVD victims may decrease if timely medical treatment is well organized. In telecardiology applications, it is necessary to facilitate high-resolution ECG signals for proper diagnosis [2]. ECG is an electrical signal from the heart. When the blood is pumping in the circulatory system, this mechanism generates a sequence of electrical signals. The noise in the ECG signal is important to be reduced [3], otherwise the signal’s morphology will be interrupted, the diagnosis will be harder [2] and the precision of the time and the amplitude of the measurement will be reduced [3]. It is essential to verify what kinds of noise contaminate the ECG signal so that they can be removed effectively and obtain the noise-free clear ECG morphology. As ECG is a very sensitive and low frequency heart signal, the real amplitude and duration of the signal can be changed by many different types of noise and interference. ECG signals are mostly affected by high frequency, electrode noise, muscle artifacts noise, baseline wander, composite noise and power line interference. But in this research, focus was given in high frequency since the ECG is a low frequency signal. For better analysis of ECG, the removal of noise becomes an important part of pre-processing [4]. The normal range for the frequency of the ECG is 0.01Hz- 100Hz and it is found that 90% of the spectral energy lies between 0.25Hz–35Hz. In this paper, the ant lion optimization is used to find the cutoff frequency to remove the noise of the ECG. II. BIOSIGNAL ACQUISITION AND PROCESSING TECHNIQUES There are several techniques on noise filtering. One is the electronics design and the development of the circuit. Authors in [5] worked on an automatic noise cancellation method using a 3-axis MEMS accelerometer to recover signals corrupted by body movement as one of the most significant sources of motion artifacts. The preliminary results from the bench tests and the laboratory setup demonstrate that the goal of the high- performance wearable PPG is viable and feasible. Authors in [6] used the TINA to run simulations and DC source to mimic the noise. The result of the reduction on the complexity and the power consumption showed an excellent performance. Authors in [7] described a digitally assisted noise cancellation method for a coupled electrocardiogram (ECG) sensor. This sensor using an insulated electrode could measure ECG through an insulator such as clothing without direct skin contact. They used the noise feedback method to improve the availability of a capacitive coupled ECG sensor to decrease the noise caused by body movement. Measurement results showed that the ECG noise can be suppressed. Sensor improvement is one of the solutions on noise canceling. Authors in [8] restructured the electrodes to non- contact, capacitive ECG measurements and both gradiometer designs were compared with standard ECG recording methods and showed detection mismatch employing an open source beat detection algorithm. Authors in [9] proposed the normalized signed regressor LMS (NSRLMS) algorithm to remove ECG noise. Efficient noise reduction, especially of the non- stationary noise was, achieved. Adaptive filters change their coefficients with the continuous change of signal, providing optimum noise removal features for non-stationary signals. Corresponding author: Kiew Hui Hii Engineering, Technology & Applied Science Research Vol. 9, No. 4, 2019, 4525-4529 4526 www.etasr.com Hii et al.: ECG Noise Reduction with the Use of the Ant Lion Optimizer Algorithm Authors in [10] used the adaptive filter algorithm RLS to cancel various noises in ECG signals. The simulation results depicted that RLS algorithm performed well in removing noises from the ECG signals [10]. There were many ways to try to get a clear ECG signal, starting with the design of the electronics devices of the equipment or the improvement in the structure of the electrodes and the sensors of the wearable devices. Excellent results for cancelling the noise of various artifacts have been obtained by filtering algorithms. The use of advanced signal processing techniques like ALO can help finding the cutoff frequency, which will help in canceling noise stage. The cutoff frequency is applied to a FIR filter for getting the original and clean ECG signal [11]. The advantages of stochastic algorithms like ALO are that they can avoid local solutions more easily than the deterministic algorithms and they are rather simple to implement. An adaptive filtering technique for denoising ECG signal based on Genetic algorithm (GA) and tuned Sign-Data Least Mean Square (SD-LMS) algorithm was proposed in [12]. The author used GA to optimize the step size to obtain a better SNR value. Authors in [13] worked on obtaining clean heart signals. In this work, an adaptive filter was designed with the stochastic artificial bee colony (ABC) algorithm. By using ABC an adaptive filter was designed for eliminating the distortions in the ECG signal. Authors in [14] proposed a PSO-based approach, which aims at optimizing the performances of SVM classifiers in terms of classification accuracy by detecting the best subset of available features and solving the tricky model selection issue. Automatically identifying the cutoff frequency of the ECG signal was studied in [15]. The optimum cutoff frequency was used in low-pass filtering. A dataset of the extracted features of the ECG spectrums was used to train a PSONN (Particle Swarm Optimization Neural Network) in [16]. The optimum cutoff frequency was applied to an FIR filter and the signal was evaluated against the original. As a result, it was shown that the PSONN is trustworthy and fast for automatically identifying cutoff frequency. The clean data were compared to the PSONN filtered signals showing that the proposed method was suitable for heart disorder diagnosis. In this research, the Ant lion Optimizer (ALO) Algorithm has been chosen because it performs better than other stochastic algorithms like genetic algorithm (GA) and Particle Swarm Optimizer (PSO) [17-18]. ALO also helps in saving cost by minimizing losses [11]. Authors in [19] used ALO to design antenna arrays by optimizing the excitation current amplitudes of array elements. ALO is able to get the optimum value of the cutoff frequency, and not only the values but also the location and size [20]. It mimics the hunting mechanism of the ant lion, which is a searching method to find the optimal feature set maximizing classification performance. The proposed model is evaluated using different evaluation criteria on 18 different data sets [18]. ALO approach uses less fitness function evaluations, it does not get trapped into local minima and offers promising convergence characteristics [21]. III. METHODOLOGY A. Ant Lion Optimizer ALO algorithm mimics the interaction between ant lions catching their prey and trap ants. It contains five steps to catch prey. The first stage is ant lions walking randomly, then they build their traps and make sure the ants are trapped. When the ants fail into the holes, the ant lions catch their prey. The last step is ant lions re-building traps and waiting for their prey to come again. 1) Ant Random Walks The first step of the ALO optimizer is the random walk of ants. The equation below is used to normalize and update the position by time: �� � = ��� ���×(�� �� ) (�� ��) + �� (1) where �� and �� indicate the minimum and maximum of the random walk, �� and �� are the minimum and maximum of the i-th variable at the t-iteration [22]. 2) Trapping The trapping of the ants depends on the pits of the ant lion modeled as below: �� � = �������� � + �� (2) �� � = �������� � + �� (3) where �� indicates the minimum of the t-th iteration, the vector including the maximum of all variables at t-th iteration is represent by ��. Both equations show the walking of ants around one ant lion which is selected in the form of a hyper sphere [22]. 3) Building Traps A roulette wheel is used in the ALO algorithm to build up and optimize the ant lions’ fitness. This mechanism is giving the fitter ant lion to have a higher chance on catching ants [22]. 4) Sliding Ants Towards the Ant Lions The ant lion fitter can build up better trapping pits. The deeper the trap, the easier is for ants to slide down towards the ant lion. Equations (4)-(5) indicate the radius of the pit trap. At this stage, ants try to escape when they start sliding down. Based on the mathematical modeling, the radius of the trap keeps decreasing as they go deeper [22]: � � = � � (4) � � = � � (5) where I is a ratio, � � is the minimum of all variables at t-th iteration, and � � represents the vector at the t-th iteration. 5) Catching Prey and Rebuilding the Pit As an ant reaches the bottom of the pit, the ant lion catches its prey. This is the final stage of the ant lion algorithm optimization. But an ant may escape if it is fitter. At the same time, the ant lion has to update its position to get a chance of Engineering, Technology & Applied Science Research Vol. 9, No. 4, 2019, 4525-4529 4527 www.etasr.com Hii et al.: ECG Noise Reduction with the Use of the Ant Lion Optimizer Algorithm hunting new prey [22]. This condition forms the equation as below: �������� � = ���� � � (���� �) ! ��������� �� (6) B. Elitism Elitism indicates the best ant lion in terms of fitness. The fitness of ant lion gives the best solution for the ant lion algorithm: RA and RE represent the random walk of the ant lion and the elite at the t-th iteration. Anti indicates the position at the i-th ant at the t-iteration [22]. ���� � = " � � +" # � 2 (7) To implemented the FIR filter requires the cutoff frequency (%�) and the filter order. Since the order is the width of the window, higher order brings sharper response in the signal [15]. The equation of the FIR filter is: �& = ∑ ()* �+,& - ./ 0)12 (8) where the �& is sum of the N terms, and k is the data point. C. Flow Chart Figure 1 shows this study’s flow chart. The input signal is collected from the MIT-BIH database. Two heart diseases (arrhythmia and atrial fibrillation) were put in the filtering process. In this research, 10 datasets would be used for each disease. Each of the diseases contains 1000 data points. Since the data consist of high frequency, a median filter was used to reduce the high frequency of the noisy ECG. The next step was feature extraction by Fast Fourier Transform (FFT) to convert the time domain signal into frequency domain. As the noisy ECG signal is formed in the frequency domain, the cutoff frequency can be determined. After the Fourier transform, the analysis proceeds to ALO algorithm. By implementing the equation of ant lion algorithm, the optimum cutoff frequency is obtained. The optimum result is termed as “elitism”. If the elitism does not fulfill the range of the frequency, the optimization needs to be repeated. An FIR filter is implemented with the optimized cutoff frequency on the noisy signal to get the clear ECG as a result. IV. RESULTS AND DISCUSSION The results were divided into several parts which were noisy ECG signal database pre-processing stage, median moving filter approach, transformation of the signal from time domain to frequency domain, Fourier transform, and ALO optimization. The optimized cutoff frequencies from the ALO optimization were applied on the FIR filter in order to get better ratio signal to noise ratio (SNR) values. There were two types of ECG diseases in the data: arrhythmia and atrial fibrillation were used for feature extraction of the ECG signal. The sampled data of the arrhythmia were 20000, and the first 10000 were divided into 10 sets of samples, each set containing 1000 samples. The extracted arrhythmia features are shown in Figure 2. The sampling frequency %3 for this signal was 360Hz. Fig. 1. Flow chart of the research Fig. 2. Arrhythmia ECG noisy signal Fig. 3. Time signal after filtering The cutoff frequency played an important role, because it was used into the FIR filtering. Table I shows the results of the conventional method. Ant lion algorithm helped in optimizing the best score of cutoff frequency. The FFT helped in finding the cutoff frequency which was used in filtering and the results are given in Table II. Equation (9) shows the transform: �& = ∑ ()* �+,& - ./ 0)12 (9) where Xk is sum of the N terms, and k is the data point. The main function of the median filter reduced noise on the pre-processing stage. It helped in smoothing the signal of the noisy ECG and assisted the filtering process more effectively. In Figure 4, the blue colour signal indicates the original noise Engineering, Technology & Applied Science Research Vol. 9, No. 4, 2019, 4525-4529 4528 www.etasr.com Hii et al.: ECG Noise Reduction with the Use of the Ant Lion Optimizer Algorithm signal and the green color signal is the filtered signal by the moving median filter. The original signal contained many spikes and the R-peak was high before filtering. After implementing the moving median filter, the amplitude of the R peak reduced. Fig. 4. Comparison between the filtering using median filtering. (a) Blue line: original ECG signal, (b) Green line: filtered ECG signal TABLE I. NORMALIZED CUTOFF FREQUENCY WITH SNR Data Set Signal type Normalized cutoff frequency SNR1 (dB) 1 Arrhythmia 0.16 26.9993 2 Arrhythmia 0.43 93.2363 3 Arrhythmia 0.09 23.3543 4 Arrhythmia 0.06 23.7472 5 Arrhythmia 0.07 21.5048 6 Arrhythmia 0.04 22.3169 7 Arrhythmia 0.01 24.8268 8 Arrhythmia 0.03 22.4479 9 Arrhythmia 0.02 23.5868 10 Arrhythmia 0.03 23.2509 11 Atrial Fibrillation 0.95 66.4295 12 Atrial Fibrillation 0.43 61.0999 13 Atrial Fibrillation 0.52 62.2211 14 Atrial Fibrillation 0.16 27.7318 15 Atrial Fibrillation 0.61 56.5778 16 Atrial Fibrillation 0.11 19.4273 17 Atrial Fibrillation 0.95 59.6059 18 Atrial Fibrillation 0.04 23.7628 19 Atrial Fibrillation 0.73 64.8241 20 Atrial Fibrillation 0.01 21.0842 TABLE II. OPTIMIZED CUTOFF FREQUENCY WITH SNR Data Set Signal type Normalized cutoff frequency SNR2 (dB) 1 Arrhythmia 0.1646 27.3131 2 Arrhythmia 0.4315 95.2403 3 Arrhythmia 0.0936 23.4540 4 Arrhythmia 0.0649 23.8389 5 Arrhythmia 0.0780 21.6872 6 Arrhythmia 0.0492 22.4329 7 Arrhythmia 0.0169 24.8516 8 Arrhythmia 0.0382 22.5248 9 Arrhythmia 0.0210 23.5924 10 Arrhythmia 0.0317 23.2650 11 Atrial Fibrillation 0.9560 66.8004 12 Atrial Fibrillation 0.4363 62.2693 13 Atrial Fibrillation 0.5233 62.3098 14 Atrial Fibrillation 0.1685 28.2561 15 Atrial Fibrillation 0.6115 56.7816 16 Atrial Fibrillation 0.1138 19.5668 17 Atrial Fibrillation 0.9585 60.3111 18 Atrial Fibrillation 0.0430 23.7975 19 Atrial Fibrillation 0.7329 65.8605 20 Atrial Fibrillation 0.0103 21.0850 The ant lion algorithm mimics the interaction between ants and ant lions. At the initial steps the ants are walking randomly and ant lions walk in certain areas (like the cutoff frequency was calculated in a certain range). The ant lion algorithm found the best cutoff frequency and gave a high SNR, as can be seen by comparing Tables I and II. In Figure 5 we can see the comparison of the conventional method (white) and the ALO optimization (black) in finding the actual cutoff frequency. The y-axis shows the SNR. We can see that the ALO algorithm had a higher SNR percentage. Fig. 5. SNR percentage between the conventional method and the ALO V. CONCLUSION This paper presented a newly developed method in the identification of the cutoff frequency. One of the objectives of this research was to apply a FIR filter and a moving median filter to reduce the high-frequency noise of the ECG data samples. The morphology of the ECG was maintained. The aim of this research was to identify and optimize the cutoff frequency using the ant lion algorithm. The target was achieved through ALO optimization in MATLAB. From the simulations, the optimized cutoff frequency was successfully retrieved in higher than the conventional method’s SNR. The proposed method’s cutoff frequency performance was with the conventional cutoff frequency of feature extraction of the signal. The optimum cutoff frequencies’ result shows that the proposed method reduced more noise than the conventional method. ACKNOWLEDGEMENT The authors are grateful to the University of Malaysia Pahang and the Ministry of Education of Malaysia for supporting this collaboration work under the scholarship GRS 140329. REFERENCES [1] N. Singh, S. Ayub, J. P. Saini, “Design of Digital IIR Filter for Noise Reduction in ECG Signal”, 5th International Conference and Computational Intelligence and Communication Networks, Mathura, India, September 27-29, 2013 [2] M. N. Salman, P. T. Rao, M. Z. U. Rahman, “Novel logarithmic reference free adaptive signal enhancers for ECG analysis of wireless cardiac care monitoring systems”, IEEE Access, Vol. 6, pp. 46382- 46395, 2018 [3] Y. A. Altay, A. S. Kremlev, “Analysis and Systematization of Noise Arising by Long-Term Recording of ECG Signal”, IEEE Conference of Russian Young Researchers in Electrical and Electronic Engineering, Moscow, Russia, January 29-February 1, 2018 Engineering, Technology & Applied Science Research Vol. 9, No. 4, 2019, 4525-4529 4529 www.etasr.com Hii et al.: ECG Noise Reduction with the Use of the Ant Lion Optimizer Algorithm [4] G. Singh, G. Kaur, V. Kumar, “ECG Denoising Using Adaptive Selection of IMFs Through EMD and EEMD”, International Conference on Data Science & Engineering, Kochi, India, August 26-28, 2014 [5] A. Alzahrani, S. Hu, “An Effective Solution to Reduce Motion Artefact in New Generation Reflectance Pulse Oximeter”, 2013 Saudi International Electronics, Communications and Photonics Conference, Fira, Greece, April 27-30, 2013 [6] S. Jain, S. Pathak, B. Kumar, “A Robust Design and Analysis of Analog Front End for Portable ECG Acquisition System”, IEEE Region 10 Humanitarian Technology Conference, Agra, India, December 21-23, 2017 [7] Y. Nagasato, S. Izumi, H. Kawaguchi, M. Yoshimoto, “Capacitively Coupled ECG Sensor System with Digitally Assisted Noise Cancellation for Wearable Application”, IEEE Biomedical Circuits and Systems Conference, Turin, Italy, October 19-21, 2017 [8] T. Peng, M. Trew, A. Malik, “Parametric Modeling of Electrocardiograms Using Particle Swarm Optimization”, 40th Annual International Conference of the IEEE Engineering in Medicine and Biology Society, Honolulu, USA, July 18–21, 2018 [9] M. Z. U. Rahman, R. A. Shaik, D. V. R. K. Reddy, “An Efficient Noise Cancellation Technique to Remove Noise from the ECG Signal Using Normalized Signed Regressor LMS Algorithm”, IEEE International Conference on Bioinformatics and Biomedicine, Washington, USA, November 1-4, 2009 [10] A. C. Mugdha, F. S. Rawnaque, M. U. Ahmed, “A Study of Recursive Least Squares (RLS) Adaptive Filter Algorithm in Noise Removal from ECG Signals”, International Conference on Informatics, Electronics & Vision, Fukuoka, Japan, June 15-18, 2015 [11] A. A. Tawfiq, M. A. Elhameed, A. A. Elgawad, “Antlion Optimizer for Effective Integration of Distributed Generation in Radial Electrical Distribution Networks”, Nineteenth International Middle East Power Systems Conference, Cairo, Egypt, December 19-21, 2018 [12] B. Paul, P. Mythili, “ECG Noise Removal Using GA Tuned Sign-Data Least Mean Square Algorithm”, IEEE International Conference on Advanced Communication Control and Computing Technologies, Ramanathapuram, India, August 23-25, 2012 [13] P. Agarwalla, S. Mukhopadhyay, “Efficient Coordinator Guided Particle Swarm Optimization for Real-Parameter Optimization”, 7th International Conference on Cloud Computing, Data Science & Engineering-Confluence, Noida, India, January 12-13, 2017 [14] F. Melgani, Y. Bazi, “Classification of electrocardiogram signals with support vector machines and particle swarm optimization”, IEEE Transactions on Information Technology in Biomedicine, Vol. 12, No. 5, pp. 667-677, 2008 [15] S. Moein, R. Logeswaran, “Intelligent ECG signal noise removal using PSONN”, International Journal of Computer Applications, Vol. 45, No. 6, pp. 9-17, 2012 [16] S. Kockanat, T. Koza, N. Karaboga, M. E. Erkoc, “Noise Cancellation Application of ECG Signal Using Artificial Bee Colony Algorithm”, 24th Signal Processing and Communication Application Conference, Zonguldak, Turkey, May 16-19, 2016 [17] M. Raju, L. C. Saikia, N. Sinha, D. Saha, “Application of Antlion Optimizer Technique in Restructured Automatic Generation Control of Two-Area Hydro-Thermal System Considering Governor Dead Band”, Innovations in Power and Advanced Computing Technologies, Vellore, India, April 21-22, 2017 [18] H. M. Zawbaa, E. Emary, B. Parv, “Feature Selection Based on Antlion Optimization Algorithm”, Third World Conference on Complex Systems, Marrakech, Morocco, November 23-25, 2015 [19] A. A. Amaireh, A. Alzoubi, N. I. Dib, “Design of Linear Antenna Arrays Using Antlion and Grasshopper Optimization Algorithms”, IEEE Jordan Conference on Applied Electrical Engineering and Computing Technologies, Aqaba, Jordan, Ocober 11-13, 2017 [20] H. S. E. Mansour, A. A. Abdelsalam, M. Nabil, A. A. Sallam, “Optimal Capacitor Banks Allocation in Distribution Systems with Distributed Generators Using Antlion Optimizer”, Nineteenth International Middle East Power Systems Conference, Cairo, Egypt, December 19-21, 2017 [21] S. Verma, V. Mukherjee, “Optimal real power rescheduling of generators for congestion management using a novel ant lion optimiser”, Institution of Engineering and Technology Generation, Transmission & Distribution, Vol. 10, No. 10, pp. 2548-2561, 2016 [22] S. Mirjalili, “The ant lion optimizer”, Advances in Engineering Software, Vol. 83, pp. 80–98, 2015