1 Introduction

The problems associated with noise in medical instrument inside the Neo natal Intensive Care Unit (NICU) creates a number of harmful effects on the infant’s health and hence the noise control has been an important issue to investigate. In NICU the premature infants are kept in incubators until their oxygen systems are fully developed.

The infant incubator monitoring devices and motor create electromagnetic interferences (EMI). The EMI generated by incubators have the ability to influence newborns heart rate variability (HRV), showing an influence on their autonomous nervous system. While measuring the ECG of premature babies, the signals are contaminated due to the electromagnetic interferences produced by the incubator devices.

The purpose of active noise cancellation (ANC) is to filter out an interference component by identifying a model between the measurable noise source and the corresponding non measurable interferences (Widrow et al. 1975). Many researchers have implemented the Filtered Extended Least Mean Square (FXLMS) algorithm to design the active noise cancellation (ANC) system, owing to its simplicity. The FXLMS algorithms use the gradient method to update the coefficient of the adaptive filter for the active noise control (Liu et al. 2008). The FXLMS algorithm may also lead to local minima problem.

Das and Panda (2004) proposed a ANC structure based on Filtered-S Least Mean Square (FSLMS) algorithm. This fast implemented FSLMS algorithm reduces the number of operations compared to the FXLMS algorithm for nonlinear multichannel active noise control. A linear model does not perform well for situations where nonlinear phenomena take place. Hence there is a need for adaptive nonlinear filtering approach. Neural network is the best structure for dealing with nonlinear behavior.

Krukowicz (2010) proposed the active noise control method based on a multi layer neural network algorithm with a nonlinear primary path. The error back-propagation rule is used to update the neural network. In addition, in Ngia and Sjoberg (2000) proposed the training of neural network for adaptive filtering using Levenberg–Marquardt algorithm (LM). Regarding off-line application the LM algorithm is superior for the purpose of non linear adaptive filtering.

Besides, in Zhang (2001) has developed a thresholding neural network (TNN) for adaptive noise reduction. Gradient based learning algorithm is used for finding the mean square error. This algorithm includes supervised and unsupervised batch and stochastic learning. The TNN based nonlinear adaptive filtering outperforms the noise reduction.

Tang et al. (1996) has introduced a genetic optimization algorithm, which has been used as a powerful optimizer to develop an ANC and signal processing applications. The adaptive genetic algorithm (AGA) has been used as an alternative learning algorithm to develop an ANC without the use of secondary path estimation. The genetic algorithm (GA) using adaptive infinite impulse response filter is used for ANC applications (Chang and Chen 2010; Beligiannis et al. 2005; Russo and Sicuranza 2007).

Recently, PSO has been proposed as a powerful optimizer alternative to GA and is applied in many practical applications. PSO algorithm was first proposed by Kennedy and Eberhart (1995). Rout et al. (2012) presented the conditional reinitialized PSO algorithms for developing an efficient ANC without the use of secondary path estimation and are used for the time-varying plants of the ANC system.

This paper develops a systematic hybrid swarm intelligent algorithm trained by LM algorithm used for the electromagnetic interference cancellation in infant incubator ECG signals. Using the proposed swarm algorithm, the performance criterions, i.e. the mean squared error is minimized to its global value.

2 Related works

In this section some works related to ECG domain and concerning the use of various algorithms to detect the abnormal EGG and the various types of arrhythmia are reported. Waseem et al. (2011) has proposed an evolutionary algorithm to detect the abnormal ECG from the normal ECG and detect the various types of arrhythmia. The authors combine ontologies and Type-2 FML based fuzzy logic controllers in order to infer the human nervous level.

A hybrid scheme genetic algorithm and wavelet transform is used for denoising the corrupted ECG signal (El-Sayed and El-Dahshan 2011). In this hybrid noise elimination method, the optimal wavelet denoising parameters have been selected by genetic algorithm. The hybrid scheme performance is evaluated using percentage root mean square difference and signal to noise ratio.

Acampora et al. (2012), the authors have proposed soft computing techniques for evaluating cardiac health using HRV (Heart Rate Variability) analysis. The system is designed using ontologies and type-2 fuzzy logic system methods. On the other hand, a fast fourier transform (FFT) method to identify the peaks in ECG signal and neural networks are used to identify the diseases. The network is trained by Levenberg–Marquardt back-propagation algorithm. These methods are used to find the arrhythmias (Gothwal et al. 2011).

Thakar and Zhu (1998) have proposed a least mean square (LMS) adaptive recurrent filter structure for acquiring the impulse response of the normal QRS complex and this method is also applied to several arrhythmia detection problems. Hamilton (1996) has investigated the relative performance of an adaptive and nonadaptive 50/60 Hz notch filter applied to an ECG signal. Elimination of electro magnetic interference on ECG signals is a demanding problem by virtue of the fact that the frequency of such EMI may change with time. A nonlinear adaptive EMI filter is proposed by Ziarani (2002) to tackle this problem.

Notch filters and adaptive cancellers have been suggested to annihilate electromagnetic interferences. An improved adaptive canceller is used for the diminution of the fundamental power line interference component and harmonics in electrocardiogram recordings (Martennns et al. 2006). Lin and Hu (2008) proposed a power line interference (PLI) detector that exerts an optimal linear discriminant analysis (LDA) algorithm to make a decision for the PLI presence.

The proposed method is to combine swarm intelligent and Levenberg–Marquardt algorithm for interference cancellation in infant ECG signals inorder to obtain the noise free ECG signal.

3 Incubator ANC systems

The incubator is generally used to provide a closed, safe and controlled environment for newborn infants by circulating heated air over the skin of the premature infant. Some infants are nursed in incubators for weeks or many months after birth. The high noise levels in infant incubators should be considered a prenatal risk factor which may result in cochlear damage (Etzel et al. 1997). Incubator noise is suggested as a possible contributive factor in the cause of deafness.

The development of auditory visual and central nervous systems is occurring in the last stages when the premature baby is in the incubator. Electromagnetic interference is emitted by incubator devices that generate electromagnetic field, which covers the area where the baby lies (Bearer 1994). In incubators unwanted reception of this electromagnetic radiation affect the premature infants. All medical equipment generates some EMI.

Incubator noise is typically broadband and is generated by equipment such as pumps, fans, alarms sounds, blowers, nebulizers, humidifiers, heating machinery and ventilators. It can be broadly characterized into three types: broadband equipment hum, equipment hum interspersed with high amplitude random impulses and equipment hum interspersed with low-amplitude periodic impulses.

In 1974, the American Academy of Pediatrics (AAP) suggested that noise in the NICU should be below 45 dB. High amplitude impulses (40–50 dB) are caused mainly due to human activities like banging of metal cabinet doors below the incubator or closing of incubator portholes and low amplitude impulses (10 dB) are caused due to machinery that aid in respiration. The common NICU noise sources are pump alarms (70 dB), Oximeter alarm (85 dB), respiratory tubes (80 dB), finger tapping (72 dB) and loud voices (\(>\)100 dB).

The ANC systems can be used to cancel this high-power wideband noise. ANC is based on the principle of utilizing destructive interference to cancel unwanted noise. The objective of an ANC system is to generate antinoise to cancel the primary noise. Canceling this broadband noise can be made effective by utilizing an ANC system. The feed forward ANC system with reference microphone is required to cancel the broadband incubator noise.

A single channel ANC system uses a reference microphone, a secondary loud speaker and an error microphone. The primary noise from the incubator noise source is picked up by the reference microphone, processed by the ANC system to generate the anti-noise, which is sent to the secondary source of the loud speaker for canceling the interference noise. The error microphone measures the residual noise, which is used for updating coefficients of the neural network adaptive filter.

The FXLMS algorithm is used to cancel the interference noise inside the incubator. Thanigai et al. (2007) have presented an audio integrated approach for achieving active noise control in incubators. The nonlinear Filtered- X Least Mean M-estimate algorithm used for achieving the active noise control for reducing impulse interference in incubators.

The electromagnetic interference is the source of interference in bio potential measurement and it corrupts the infant EGG, which are extremely important for the diagnosis of premature infants. It is hard to find out the problem because the frequency range of ECG signal is nearly the same as the frequency of interference caused by the magnetic field.

Several methods for the removal of interference have been expressed. Mainly, adaptive filters are used to eliminate the interference. In this work a multilayer feedforward neural network trained by Levenberg-Marquardt algorithm is used for the interference cancellation in infant ECG signal.

4 Proposed biologically inspired swarm intelligent algorithm for interference cancellation

In incubator systems, noise is the only parameter that cannot be eliminated completely. The electrocardiography machine picks up the electrical activity from the infant heart and also the incubator equipment such as pumps, fans, ventilator and motors. The extraction of infant electrocardiography signals contaminated with interference noise is an important issue to investigate. Figure 1 shows the block diagram for interference cancellation in infant EGG signal using swarm intelligent optimization algorithm.

Fig. 1
figure 1

Block diagram for interference cancellation in infant ECG signal

When doctors analyze an incubator baby on-line to review the electrocardiography of the premature baby, the infant’s electrocardiography signal is contaminated by electromagnetic interferences of incubator devices. To view the best signal a neural network adaptive filter trained by LM algorithm needs to be developed to eliminate the contamination signal in order to obtain the infant electrocardiography data better.

The neural network adaptive filter essentially minimizes the mean-squared error between a primary input, which is the noisy cardiac signal, and a reference input, which is either noise that is correlated in some way with the noise in the primary input or a signal that is correlated only with cardiac signal in the primary input.

The objective of the optimization intelligent algorithm is to minimize the mean square error which represents the fitness of each particle. The swarm initially has a randomly generated population. Each potential solution, called a particle has a position represented by a position vector and is given a moving velocity represented by a velocity vector and is flown through the problem space. At each step, a new velocity for particle is updated by using the individual best position and global best position.

The synthetic premature infant electrocardiography signal is corrupted by the noise source. Additive noise effects can be modelled by adding white Gaussian noise to it to produce the contaminated electrocardiography signal measured when the premature infant is inside the incubator.

The primary signal is the contaminated signal contains desired infant electrocardiography signal and electromagnetic interference signal. The primary signal output is given by

$$\begin{aligned} P(n)=d(n)+X(n) \end{aligned}$$
(1)

where, \(d(n)\) is the desired infant electrocardiography signal, \(X(n)\) is the electromagnetic interference signal.

The artificial neural network is trained using noisy interference as its input signal, with clear electrocardiography signal is the desired target. The interference caused by the incubator is estimated using the artificial neural network algorithm.

The secondary signal output of the adaptive filter is

$$\begin{aligned} Y(n)=W^{T}(n)X(n) \end{aligned}$$
(2)

The adaptive filter the weight update equation is

$$\begin{aligned} W({n+1})=W(n)+\mu e(n)x(n) \end{aligned}$$
(3)

where, \(\mu \) is the convergence factor, \(W^T(n)\) is the coefficient weight vector of the adaptive filter W(z), \(X(n)\) is the reference input signal.

The error signal is the difference between the generated primary signal and output of the adaptive filter

The residual error is

$$\begin{aligned}&e(n)=P(n)-y(n)\end{aligned}$$
(4)
$$\begin{aligned}&e(n)=d(n)+X(n)-W^{T}(n)X(n) \end{aligned}$$
(5)

The error signal output is used as the input to the swarm optimization algorithm for removing the interference signal. Swarm optimization algorithm is basically a robust stochastic based algorithm to minimize the mean square error signals. The swarm initially has a randomly generated population. Each potential solution, called a particle has a position represented by a position vector and given a moving velocity represented by a velocity vector.

The positions and velocities of all the particles are updated according to Eqs. (6) and (7). At each time step, a new velocity and position for particle is updated by using the individual best position, and global best position. The objective of the proposed algorithm is to minimize the mean square error which represents the fitness of each particle.

The swarm intelligent algorithm updates the particle velocity and position according to the following update equations.

Velocity updation

$$\begin{aligned} Vi({n+1})&= \varpi .Vi( n)+C_1 r1\left[ {pbest_i -Pi( n)} \right] \nonumber \\&\quad +C_2 r2\left[ {gbest_i -Pi( n)} \right] \end{aligned}$$
(6)

where \(V\) is the velocity of individual i, \(K\) is pointer of iterations, \(\varpi \) is the inertia weight, \(C_1 ,C_2\) are the acceleration constant, \(r1,r2\) are the random numbers between 0 and 1, \(Pbest\) is the positional best position of individual of the particle i \(gbest\) is the global best position of the swarm of the particles.

Position of the particle is

$$\begin{aligned} Pi({n+1})=Pin+Vi(n) \end{aligned}$$
(7)

Figure 2 shows the flowchart for the proposed swarm intelligent algorithm.

Fig. 2
figure 2

Flow chart for swarm intelligent algorithm

The feed forward Levenberg–Marquardt learning algorithm takes the error signal as input and updates the filter coefficients based on the parameters. The simulated structure of the activation function in the hidden layer and output layer are shown in Figs. 3 and 4, in which p{1} represent the inputs, a{1} represents the activation output from the hidden layer, a{2} represents the activation output from the output layer, IW, LW and \(b\) indicates the inter-connection weights, layer weights and bias of the neural network respectively.

Fig. 3
figure 3

Simulated structure of hidden layer

Fig. 4
figure 4

Simulated structure of output layer

The interference cancellation is performed with learning constant varied from 0 to 1, the momentum constant varied from 0 to 1 and the number of hidden neurons varied from 21 to 200. For this training, 200 training epochs are performed.

5 Simulation results

In this section, the proposed swarm intelligent-LM algorithm is applied to interference cancellation in infant incubator ECG signal. The proposed algorithm simulation has been designed in a framework of MATLAB 7.10, which aims at developing electromagnetic interference cancellation when measuring ECG for premature infants in incubators.

For generating the synthetic electrocardiography signals the infant electrocardiography signal is synthesized using this model employing different parameters to account for different shapes and beat rates of the signal. The synthetic desired infant electrocardiography signal \(d(n)\) generated is shown in Fig. 5.

Fig. 5
figure 5

Synthetic premature infant electrocardiography signal

A noise model is done for generating the electromagnetic signals in incubators which got accumulated with the infant electrocardiography. The noise signal is processed through a system to simulate the delays and the nonlinear effects it undergoes as it travels from the incubator to the infant heart.

The synthetic premature infant electrocardiography signal is corrupted by the noise source. The electromagnetic interference signal \(X(n)\) produced from the noise source is shown in Fig. 6.

The primary signal \(P(n)\) is shown in Fig. 7. This contains electromagnetic interference noise in addition to the infant electrocardiography signal which is to be filtered by adaptive noise canceller trained by optimization algorithms.

Fig. 6
figure 6

Electromagnetic interference signal from the infant incubator

Fig. 7
figure 7

Corrupted ECG signal from the incubator

The error between the generated premature infant ECG signal and the output of the interference eliminated network is shown in following figures and is concluded from the output that the proposed algorithms effectively cancel the interference. The control parameters selected for the optimization of swarm intelligent algorithm are swarm size (\(P)\) 200, inertia factor (\(\varpi )\) 0.5, cognitive factor (\(C_1)\) 1.5, social factor (\(C_2)\) 1.5, \(W\max \) 0.8, and \(W\min \)0.5.

Using the hybrid proposed a swarm intelligent-LM algorithm an artificial neural network was achieved with \(Nh\!=\!\)109, \(Lr = \) 0.6963 and \(Mc = 0.0802\). Thus, the algorithm yielded a compact network configuration in the architecture space algorithm which automatically evolved the best solution and the residual error obtained was 0.007. Figure 8 shows the residual error signal using hybrid swarm intelligent-LM algorithm

Fig. 8
figure 8

Residual error signal using hybrid swarm algorithm

Figure 9 shows the mean square error (MSE) value from the best training performance at epoch 7. Figure 10 shows the training process to achieve the best performance with gradient 0.0006481 at epoch 7. Figure 11 shows the regression plot of the neural network training. Regression R Values measure the correlation between outputs and targets. In the proposed algorithm R value is 0.99961 this shows that a very close relation between the output and target values.

Fig. 9
figure 9

Performance plot

Fig. 10
figure 10

Training state

Fig. 11
figure 11

Regression plot of the neural network

Figure 12 shows the residual error signal using LM algorithm. For this training of 100 training epochs were performed. Using the LM algorithm an artificial neural network was achieved with \(Nh = 185\), \(Lr = \) 0.6716 and \(Mc = \) 0.5607. Thus, the LM algorithm evolved the best solution and the residual error obtained was 0.03.

Fig. 12
figure 12

Residual error signal using LM algorithm

Figure 13 shows the residual error signal using hybrid GA-LM algorithm. Using the proposed algorithm an optimized artificial neural network was achieved with \(Nh = \,\,\)75, \(Lr = \) 0.3085 and \(Mc = \) 0.7597. Thus, the genetic algorithm yielded a compact network configuration in the architecture space algorithm automatically evolved the best solution and the residual error obtained was 0.02.

Fig. 13
figure 13

Residual error signal using hybrid genetic-LM algorithm

The performance analysis of the proposed swarm intelligent-LM based noise cancellation algorithm is compared with the neural network LM algorithm and genetic-LM algorithm in terms of root mean square error (RMSE) and the proposed swarm intelligent-LM shows better performance as shown in Table 1.

Table 1 Performance analysis

Regarding the feedforward neural network training, the mostly used training algorithm is the Levenberg–Marquardt algorithm. The LM algorithm is trapped in local minima so that the back-propagation may lead to failure in finding a global optimal solution. In this work the LM algorithm has evolved the best solution and the residual error obtained was 0.03.

The genetic algorithm needs encoding operator, decoding operator and evolutionary operators. This algorithm takes more time for convergence. This Scheme integrates genetic algorithm and back propagation algorithm aims to combine the capacity of genetic algorithm in global minimum and the optimized fast execution of the back propagation algorithm. Moreover back propagation algorithm gets trapped into a local minimum, which makes the algorithm entirely dependent on the initial parameter settings. In the findings the hybrid GA-LM algorithm has evolved the best solution and the residual error obtained was 0.01.

Unlike the GA, the swarm intelligent algorithm has no evolutionary operators such as crossover and mutation. The swarm intelligent algorithm has a strong ability to find the global optimum solution. After suitably modulating the parameters for the swarm intelligent algorithm, the rate of convergence increases. In this proposed work the swarm intelligent-LM algorithm evolved the best solution and the residual error obtained was 0.007.

6 Conclusions

In this work the swarm intelligent based optimization algorithm is used for the interference cancellation in infant electrocardiography signal. The artificial neural network LM algorithm, hybrid genetic-LM algorithm, and hybrid swarm intelligent-LM algorithm are used for the optimization by selecting the optimized number of neurons in the hidden layer, learning rate and momentum factor of the neural network. The back propagation algorithm is more successful in local searching and the genetic algorithm, and swarm intelligent optimization algorithm is good at global searching and its performance is excellent. The hybrid swarm intelligent- LM algorithm plays an important role in reducing the infant electrocardiography interference signals. The swarm intelligent-LM algorithm shows good performance in cancelling the interference in the electrocardiography signal over other conventional approaches. The result analysis shows that the incubator noise can be significantly reduced with mean square error of 0.007 using the developed biologically inspired evolutionary algorithm.