• Users Online: 69
  • Print this page
  • Email this page

 Table of Contents  
Year : 2012  |  Volume : 2  |  Issue : 3  |  Page : 176-183

Desired accuracy estimation of noise function from ECG signal by fuzzy approach

1 Department of Electrical and Computer Engineering, Digital Signal Processing Lab, Isfahan University of Technology, Isfahan, 84156-83111, Iran
2 Medical Image and Signal Processing Research Center, Department of Physics and Biomedical Engineering, Isfahan University of Medical Sciences, Isfahan, Iran

Date of Submission07-Apr-2012
Date of Acceptance30-Jul-2012
Date of Web Publication20-Sep-2019

Correspondence Address:
Login to access the Email id

Source of Support: None, Conflict of Interest: None

DOI: 10.4103/2228-7477.112151

Rights and Permissions

Unknown noise and artifacts present in medical signals with non-linear fuzzy filter will be estimated and then removed. An adaptive neuro-fuzzy interference system which has a non-linear structure presented for the noise function prediction by before Samples. This paper is about a neuro-fuzzy method to estimate unknown noise of Electrocardiogram signal. Adaptive neural combined with Fuzzy System to construct a fuzzy Predictor. For this system setting parameters such as the number of Membership Functions for each input and output, training epochs, type of MFs for each input and output, learning algorithm and etc. is determined by learning data. At the end simulated experimental results are presented for proper validation.

Keywords: Accuracy, adaptive neuro fuzzy interference system, electrocardiogram, estimation, fuzzy neural network, membership function, noise cancelation, nonlinear filter, prediction

How to cite this article:
Vahabi Z, Kermani S. Desired accuracy estimation of noise function from ECG signal by fuzzy approach. J Med Signals Sens 2012;2:176-83

How to cite this URL:
Vahabi Z, Kermani S. Desired accuracy estimation of noise function from ECG signal by fuzzy approach. J Med Signals Sens [serial online] 2012 [cited 2022 Jun 29];2:176-83. Available from: https://www.jmssjournal.net/text.asp?2012/2/3/176/112151

  Introduction Top

During Electrocardiogram (ECG) recording the interferences can only be diminished but not eliminated by hardware. Those interferences affected clinical usefulness and present serious problems for ECG interpretation. Various efficient filtering techniques have been applied for artifacts cancellation. A linear filter cannot clean the non-linear ECG signal effectively. Therefore nonlinear adaptive filtering is good choice for artifacts cancellation one of the most efficient methods in prediction unknown functions with desired accuracy is fuzzy approach. So we will use this method to predict noise and this result helps to eliminate artifacts from ECG. The main goal of this paper is to suppress the noise from the noisy signal while preserving all useful information of ECG.

Fuzzy inference is the process of formulating the mapping from a given input to an output using fuzzy logic. The mapping then provides a basis to its appropriate membershi P value. Two well-known types are Mamdani-type and Sugeno-type. Both can be implemented in fuzzy logic. These two types differ in the way output's are determined. Mamdani-type inference expects the output membership functions (MF) to be fuzzy sets, and requires defuzzification.

A Sugeno fuzzy model has a crisp output, the overall output is obtained via weighted average, thus neglecting the time consuming process of defuzzification required in a Mamdani model [1] In practice, the weighted average operator is occasionally replaced with the weighted sum operator to reduce computation further mainly in the training of a fuzzy inference system. The process of identifying a fuzzy model is generally divided into the identification of the premises and the consequences. Each of the identifying processes is divided into the identification of the structures and the parameters.

This identifying process is time consuming and the characteristics of a fuzzy model depend heavily on the structures rather than on the parameters of the MF's. The selection of the structures is first done once in the process. The selection of the structure types is done only in the premises. [1] After the structures are selected, the fuzzy neural network (FNN) identify the parameters of fuzzy models automatically.

After extracting desired features from the signal neuro fuzzy training is performed. [2],[3] Adaptive noise cancellation method based on estimation of noise and subtraction of that noise from the corrupted signal is one of the most useful methods. [4],[5],[6] Although linear adaptive filtering gives good response when corrupted noise is the linear distortion version of source noise in adaptive noise cancellation method, but in the real situation, corrupted noise is the nonlinear distortion version of source noise. The non-stationary nature of the signal and noise in an ECG represents an obstacle in the application of these filters. A linear filter cannot whiten the non-linear ECG signal effectively. Therefore nonlinear adaptive filtering is good choice for artifacts cancellation. [7],[8]

The main aim of this paper is to suppress the noise and artifacts from the noisy information signal while preserving all useful information. [9] For this purpose Adaptive Neuro Fuzzy Interference System is implemented. ANFIS method estimates the interferences and then efficiently separate ECG signal from its noise. ANFIS is inherently non-linear models, so an ANFIS based filtering is potentially useful. [5],[6] In practical use, the ANFIS model can adapt far better than linear models. [4],[5],[6]

The power spectral density, PSD, describes how the power or variance of a time series is distributed with frequency. Power spectral density (PSD) refers to the amount of power per unit (density) of frequency as a function of the frequency. The power spectral densities of input ECG signal, reference noise signal and measured signal are shown in [Figure 1].
Figure 1: ANFIS based power spectral density plots, PSD of information signal (left), PSD of noise signal (Mid) and PSD od the measured signal (right)

Click here to view

This paper is organized as follows; section two introduces the non-linear adaptive filtering with the brief structure of ANFIS.

Section three explains structure of ANFIS and section four discuss about important training parameters like MF's. Section five and six explain about experimental results and performance evolution with changing RMSE, Number of epochs, and step-size. At last part, paper is concluded with some important assumption according to experimental results.

  Methodolgy Top

Both neural network and fuzzy logic are universal estimators. They can approximate any function to any prescribed accuracy. Gradient descent and Back propagation algorithms are used to adjust the parameters of MF's (fuzzy sets) and the weights of defuzzification (neural networks) for fuzzy neural networks.

The objective of ANFIS is to integrate the best features of fuzzy systems and neural network. The advantage of fuzzy is represented into a set of constraints to reduce the optimization research space. [4],[5],[6] For premise parameters that define MF's, ANFIS employs gradient descent algorithm to fine-tune them. For consequent parameters that define the coefficients of each equation, ANFIS uses the least squares method to identify them. This approach is thus called hybrid learning method since it combines gradient descent algorithm and least-squares method. To achieve good generalization of unseen data, the size of the training data set should be at least as big as the number of modifiable parameters in ANFIS.

Functionally there are almost no constrains on the node functions of an adaptive network except for the requirement of piecewise differentiability. The neurons in ANFIS have different structures.

  • The MF is defined by parameterized soft trapezoids
  • The rules are differentiable T-norm usually product
  • The Normalization is by Sum and arithmetic division
  • Functions are linear regressions and multiplication with w, that is, normalized weights ω, and output.

The ANFIS is a fuzzy Sugeno model put in the framework of adaptive systems to facilitate learning and adaptation. [4],[5],[6] Such framework makes the ANFIS modeling more systematic and less reliant on expert knowledge. To present the ANFIS architecture, two fuzzy if-then rules based on a first order Sugeno model are considered:

where x and y are the inputs, A i and B i are the fuzzy sets, f i's are the outputs within the fuzzy region specified by the fuzzy rule, p i, q i and r i are the design parameters that are determined during the training process. [Figure 2] illustrates the reasoning mechanism for this Sugeno model where it is the basis of the ANFIS model. [4],[5],[6]
Figure 2: A two-input first-order Sugeno fuzzy model with two rules

Click here to view

The ANFIS architecture to implement these two rules is shown in [Figure 3], in which a circle indicates a fixed node, whereas a square indicates an adaptive node. Adaptive neuro fuzzy inference system basically has a5 layer architecture and each of the function is explained in detail later.
Figure 3: ANFIS architecture

Click here to view

It can be observed that there are two adaptive layers in this ANFIS architecture, namely the first and the fourth layers. In the first layer, there are three modifiable parameters {ai, bi, ci}, which are related to the input MF's. These parameters are the so-called premise parameters. In the fourth layer, there are also three modifiable parameters {p i, q i, r i}, pertaining to the first order polynomial. These parameters are the so-called consequent parameters. [4],[5],[6] [Figure 4] shows the variation in the Sugeno model that is equivalent to a two-input first-order Sugeno fuzzy model with nine rules, where each input is assumed to have three associated MFs. The premise part of a rule defines a fuzzy region, while the consequent part specifies the output within the region.
Figure 4: Two-input first-order Sugeno fuzzy model with nine rules

Click here to view

The task of the learning algorithm for this architecture is to tune all the modifiable parameters, namely {ai, bi, ci} and {pi, qi, ri}, to make the ANFIS output match the training data. When the premise parameters ai, bi and ci of the MF are fixed, the output of the ANFIS model can be written as:

which is a linear combination of the modifiable consequent parameters p1, q1, r1, p2, q2 and r2. The least squares method can be used to identify the optimal values of these parameters easily. When the premise parameters are not fixed, the search space becomes larger and the convergence of the training becomes slower. A hybrid algorithm combining the least squares method and the gradient descent method is adopted to solve this problem. The hybrid algorithm is composed of a forward and a backward pass. The least squares method (forward pass) is used to optimize the consequent parameters with the premise parameters fixed. Once the optimal consequent parameters are found, the backward pass starts immediately. The gradient descent method (backward pass) is used to adjust optimally the premise parameters corresponding to the fuzzy sets in the input domain. The output of the ANFIS is calculated by employing the consequent parameters found in the forward pass. The output error is used to adapt the premise parameters by means of a standard back propagation algorithm. It has been proven that this hybrid algorithm is highly efficient in training the ANFIS. [4],[5],[6]

Fuzzy Inference System (FIS) is utilized for fuzzy modeling. The most important component with this modeling is the method of system modeling based on given data. MF's and fuzzy rules are constructed by known data which have significance when work with the system. This system characteristics are unknown or varying with time as in the case of motion artifacts. [7],[8]

A nolinear adaptive noise cancelltion is illustrated in [Figure 5]. Where n 2 (k) is non-linear unknown function of noise source signal n 1 (k). Adaptive filtering has two inputs: measured signal m (k) and noise source signal (reference signal) n 1 (k). Fuzzy network utilize the error signal e(i) between the m(k) and Fuzzy network's output y(i), to control and adjust the weight W which update the output of ANFIS.
Figure 5: Nonlinear adaptive noise cancellation

Click here to view

Here E[m 2 ] is not effected when fuzzy system adjusts MF's to minimize error signal during the training process. Hybrid learning algorithm is utilized for nonlinear training, which uses Least-Mean Square in the forward pass for identifying the consequent parameters for the next layer and in backward pass, error signal need to propagate in backward direction and parameters are updated using Back Propagation learning algorithm. [10],[11]

In the ANFIS architecture first layer nodes are input nodes. Two types of MF have decided for input and output are Bell MFs and Gaussian MFs.

In second layer fuzzification occurs for the given inputs. Every node in this layer is fixed and represents the firing strength of the rule. Third layer nodes are called rule nodes which represent the fuzzy rules and are also fixed node.

The output of this layer called the normalized firing strength. In layer four, grid partition occurs for structure learning and every node is an adaptive node. Layer five computes the overall output as the summation of all incoming signals then defuzzification occurs and nodes are called output nodes.

ANFIS takes the noise signal as reference signal and tries to estimate artifacts present in measured signal by training according to number of training epochs. Once the number of decided epochs reached then training will be stopped. The proposed ANFIS model uses five Gaussian MF's shown in [Figure 6].

Shape of these MF's depends on parameters, during training process parameters changes shape of MF's also changes shown in [Figure 7]. Parameters are referred to as premise parameters.
Figure 6: Membership function before ANFIS training

Click here to view
Figure 7: Membership function after ANFIS training

Click here to view

  Simulated Results Top

Finally simulation results have been shown. Adaptive nonlinear noise cancellation using the Fuzzy Logic functions has been simulated. Unfortunately, the ECG signal cannot be measured without an interference signal n 2 , which is generated from another noise source n 1 via a certain unknown nonlinear process.

The [Figure 8] shows the noise source n 1 .
Figure 8: The noise source n1

Click here to view

The interference signal n 2 that appears in the measured signal is assumed to be generated via an unknown nonlinear equation like:

The noise source n 1 and interference n 2 are shown together in [Figure 9].
Figure 9: The noise source n1 and interference n2

Click here to view

Note that n 2 is related to n 1 via the highly nonlinear process shown previously; it is hard to see if these two signals are correlated in any way. Original noise n 1 and interference n 2 are shown in [Figure 10].
Figure 10: Original noise n1 (Top) and interference n2 (Down)

Click here to view

The measured signal m is the sum of the original ECG signal and the interference n 2 . However, we do not know. The only signal available to us are the noise signal n 1 and the measured signal m, and our task is to recover the original information signal ECG. We have measured signal m that combines ECG and n 2 .

The clean and noisy ECG are shown in [Figure 11] and [Figure 12].
Figure 11: A clean ECG

Click here to view
Figure 12: A noisy measured ECG

Click here to view

We will use the function ANFIS to identify the nonlinear relationship between n 1 and n 2 . Though is not directly available, we can take m as a "contaminated非Q?version of n 2 for training. Thus ECG is treated as "noise非Q?in this kind of nonlinear fitting.

[Figure 13],[Figure 14] and [Figure 15] illustrat the simulated results of our ECG denoising method.
Figure 13: The original n2 (Top) and estimated n2 (output of ANFIS) (Down). (n2 is unknown.)

Click here to view
Figure 14: 20 s of evaluation data. Two leads of clean ECG (lead II and MCL1) with noise at different SNRs (SNR = 24, 18, 12, 6, 0 and −6 dB)

Click here to view
Figure 15: Varying no. of epochs: (a) 20; (b) 100; (c) 200; (d) 400 and training error

Click here to view

The estimated ECG signal is equal to the difference between the measured signal m and the estimated interference. The original ECG signal and the estimated ECG are plotted. Without extensive training, the ANFIS can already do a fairly good job.

Performance Analysis

An optimal computerized ECG filtering algorithm's performance mainly depends on the ability to separate the signal from artifacts without information distortion, and from the amount and nature of distortion introduced by the filter. Both guidelines are quite hard to evaluate, because the diagnosis is subjective and depends on the shape of the ECG signal.

The ECG denoising algorithm was evaluated on a large subset of the MIMIC II database. [12] The following criteria were used to determine low-noise segments of the database: ECGSQI _ 0.95 and 1 h duration, with at least one channel of ECG simultaneously present. From the 2500 patients comprising a total of 150 h of simultaneous ECG, the clean dataset included 437 subjects. ECG noise were separately added to the clean dataset at different SNRs to generate the noisy evaluation dataset. The distribution is approximately log-normal with a mean of 13.3 bpm and a standard deviation of 8.9 bpm.

The ECG noise introduced included electrode motion artifact (EM), baseline wander (BW) and muscle artifact (MA), each with two channels of simultaneously recorded data, taken from PhysioNet's NSTDB database. [2],[10]

The description of these artifacts is extensive and the analysis will be presented in a forthcoming paper. [13] If more than two channels of ECG are present, the first channel of the NSTDB is added to the odd channels and the second channel of the NSTDB is added to the even channels. Each of the three ECG noise types (MA, BW, EM) were added separately to each ECG lead of the clean dataset of varying SNRs, for every other 5 min epoch in the clean data (giving six noisy 5 min periods, each followed by 5 min of clean data in each hour). The SNR during the noisy segments was set to a value of 24, 18, 12, 6, 0 and -6 dB separately, giving a total of six different datasets (with different SNRs). [Figure 4] illustrates the clean data and noisy ECG data with differing SNR levels. [2],[10]

The MFs change after the training according to the level of noise present in signal. Increasing number of training epochs decreases root mean square error (RMSE) but after 100 epochs RMSE achieve steady state level because parameters of MFs are stable. As the type of MFs are changed according to that RMSE but the difference is not too much.

The step size of training data for all MFs are shown in [Figure 16], related with RMSE. As number of epochs increases, step size also decreases but at the certain limit that achieved at 200 epochs after that step size becomes constant like RMSE. However, RMSE oscillate the step size decreases.

In continuation the [Table 1] summarizes the comparative results of some denoising methods. In some references these methods used for another application but we simulate their method to denoising ECG. Among other methods, the proposed method performs. We remark that the ANFIS model produced more accurate results than other, because we used benefits of fuzzy systems and neural networks to have better diagnosis of noise. Which is obviously most efficient of the techniques in the past. The propose scheme reveals to be a powerful tool in the computer-aided diagnosis of noise based on ECG.
Figure 15: Varying no. of epochs: (a) 20; (b) 100; (c) 200; (d) 400 and training error

Click here to view
Table 1: Comparative results of some denoising methods

Click here to view


Noise cancellation is a basic problem which has important applications in such areas as speech processing, echo cancellation, signal enhancement, antenna array processing, biomedical signal and image processing. Noise cancellation is the extraction of a desired signal from a noisy, corrupted signal by negating the noise. ANFIS is one of the adaptive network that are functionally equivalent to fuzzy systems combined with Neural Network. In this paper, non-linear adaptive noise cancellation is applied for the noise and artifact corrupted ECG signal. As number of epochs increase then noise cancellation also improves by reducing RMSE value, ANFIS parameters are also observed for different values. Simulated results showed that hybrid learning algorithm is effective for unknown parameter adaptation.[17]

  References Top

Qin H, Yang S. Adaptive neuro-fuzzy inference system based approach to nonlinear noise cancellation for images. Vol. 23. Holland: Published by Elsevier B.V; 2007. p. 121-30.  Back to cited text no. 1
Goldberger AL, Amaral LA, Glass L, Hausdorff JM, Ivanov PC, Mark RG, et al. PhysioBank, PhysioToolkit, and PhysioNet: Components of a new research resource for complex physiologic signals. Circulation 2000;101:E215-20.  Back to cited text no. 2
Mansor M. Electrocardiogram (ECG) Classification Using Artificial Neural Networks, Master thesis, Department of Biomedical Engineering, Faculty of Engineering, Cairo. Egypt: Helwan Universty; 2007.  Back to cited text no. 3
Anuradha B, Veera R. Cardiac arhythmia classification using Fuzzy classifiers. J Theor Appl Inf Technol 2008.  Back to cited text no. 4
Qin H, Yang S. Adaptive neuro-fuzzy interference systems based on a new approach to nonlinear noise cancellation. New Jersey: Prentice- Hall; 2007.  Back to cited text no. 5
Thevaril J, Kwan H. Speech enhancement using adaptive neuro-fuzzy filtering, Proceeding of international symposium on intelligent signal processing and communication system, Hong Kong; 2005.  Back to cited text no. 6
Kezi C, Kanagasabapathy P, Selvakumar E. A survey of interference cancellation in biosignals. Vol. 7. India: International Journal of Reviews in Computing; 2011. p. 64-83.  Back to cited text no. 7
Saeed M, Lieu C, Raber G, Mark RG. MIMIC II: a massive temporal ICU patient database to support research in intelligent patient monitoring. Comput Cardiol 2002;29:641-4.  Back to cited text no. 8
Moody GB, Muldrow WK, Mark RG. A noise stress test for arrhythmia detectors. Comput Cardiol 1984;11:381-4.  Back to cited text no. 9
Kezi C, Kanagasabapathy P, Johnson S. Adaptive neuro fuzzy interference system for extraction of fECG非Q? Chennai, India: IEEE Indicon Conference; 2005.  Back to cited text no. 10
Jang J. A Survey of Interference Cancellation in Biosignals. IEEE Trans Syst Man Cybern 1993;23:665-85.  Back to cited text no. 11
Owis MI, Youssef A, Kadah Y. Characterization of electrocardiogram signals based on blind source separation非Q? Cairo. Egypt: Medical and Biological Engineering and Computing; 2002.  Back to cited text no. 12
Meng Joo Er, Li Z, Cai H. Adaptive noise cancellation using enhanced dynamic fuzzy neural networks. Vol. 13. No. 3, IEEE transaction on fuzzy system; 2005. p. 631-42.  Back to cited text no. 13
Li Q, Mark R, Clufford G. What are heart rate and blood pressure, and when are errors significant?非Q? Canada: MIT Technical, Report: 2007.  Back to cited text no. 14
Haykin S. Adaptive Filter Theory, Upper Saddle River, New Jersey: Prentice-Hall: 2001.  Back to cited text no. 15
Haykin S, Liang L. Nonlinear adaptive prediction of non stationary signals. IEEE Trans Signal Process 1995;43:165-73.  Back to cited text no. 16
Osowski S, Linh Th. ECG Beat recognition using fuzzy hybrid neural network. Poland: IEEE Transactions on Biomedical Engineering; 2001.  Back to cited text no. 17

  Authors Top

Zahra Vahabi received her B.S. and M.S. in Biomedical Engineering. She is currently pursuating Ph.D. in Electrical Engineering. Her main research of interests cover a wide range of topics in digital signal processing, digital image processing and Biomedical signal and image analysis.

Saeed Kermani obtained his BS from the Department of Electrical Engineering of Isfahan University of Technology in Isfahan, Iran, 1987, and he received the MS in Bioelectric Engineering from Sharif University of Technology, in 1992 and his PhD in Bioelectric Engineering at AmirKabir University of Technology, Tehran, Iran, in 2008. He is Assistant Professor of Medical Engineering at the Department of Medical Physics and Medical Engineering in the School of Medicine of Isfahan University of Medical Sciences, Iran. His research interests are in biomedical signal and image processing techniques.


  [Figure 1], [Figure 2], [Figure 3], [Figure 4], [Figure 5], [Figure 6], [Figure 7], [Figure 8], [Figure 9], [Figure 10], [Figure 11], [Figure 12], [Figure 13], [Figure 14], [Figure 15], [Figure 16]

  [Table 1]


Similar in PUBMED
   Search Pubmed for
   Search in Google Scholar for
 Related articles
Access Statistics
Email Alert *
Add to My List *
* Registration required (free)

  In this article
  Simulated Results
   Article Figures
   Article Tables

 Article Access Statistics
    PDF Downloaded51    
    Comments [Add]    

Recommend this journal