Performance of Adaptive Noise Cancellation with Normalized Last-Mean-Square Based on the Signal-to-Noise Ratio of Lung and Heart Sound Separation

The adaptive algorithm satisfies the present needs on technology for diagnosis biosignals as lung sound signals (LSSs) and accurate techniques for the separation of heart sound signals (HSSs) and other background noise from LSS. This study investigates an improved adaptive noise cancellation (ANC) based on normalized last-mean-square (NLMS) algorithm. The parameters of ANC-NLMS algorithm are the filter length (Lj) parameter, which is determined in 2n sequence of 2, 4, 8, 16,…, 2048, and the step size (μn), which is automatically randomly identified using variable μn (VSS) optimization. Initially, the algorithm is subjected experimentally to identify the optimal μn range that works with 11 Lj values as a specific case. This case is used to study the improved performance of the proposed method based on the signal-to-noise ratio and mean square error. Moreover, the performance is evaluated four times for four μn values, each of which with all Lj to obtain the output SNRout matrix (4 × 11). The improvement level is estimated and compared with the SNRin prior to the application of the proposed algorithm and after SNRouts. The proposed method achieves high-performance ANC-NLMS algorithm by optimizing VSS when it is close to zero at determining Lj, at which the algorithm shows the capability to separate HSS from LSS. Furthermore, the SNRout of normal LSS starts to improve at Lj of 64 and Lj limit of 1024. The SNRout of abnormal LSS starts from a Lj value of 512 to more than 2048 for all determined μn. Results revealed that the SNRout of the abnormal LSS is small (negative value), whereas that in the normal LSS is large (reaches a positive value). Finally, the designed ANC-NLMS algorithm can separate HSS from LSS. This algorithm can also achieve a good performance by optimizing VSS at the determined 11 Lj values. Additionally, the steps of the proposed method and the obtained SNRout may be used to classify LSS by using a computer.


Introduction
Lung sound signals (LSSs) exhibit nonperiodicity and low frequency; these signals also contain symptoms of many diseases and interfere with frequency components (50-2500 Hz) with heart sound signal (HSS) frequency in the range of 20-600 Hz [1]. Furthermore, the interference between LSS and HSS is high due to the nearby positions and physiological recording points of the two signal sources. erefore, the keeping symptoms on LSS overlap and the increase in difficulty of separating HSS and other noise from LSS. ey require modern and highly accurate tools for filtering and separation. e adaptive filter (AF) satisfies the LSS purification requirements, and it is an effective tool used to filter LSS from other interference signals or noises. e adaptive noise canceller (ANC) used in this study is a type of AF.
Many works have widely investigated the filtering and separation of LSS by using the ANC or the adaptive line enhancement (ALE) with the last-mean-square (LMS) and normalized last-mean-square (NLMS) algorithms [2][3][4][5][6][7]. NLMS algorithm can be used to separate HSS from LSS [3,4] because it can deal with two signals recorded in real time. In general, previous studies have focused on the main parameters of AF, including the filter length (L), constant step size (μ n ), filter type (such as ALE or ANC), and algorithm (such as NLMS or LMS) to obtain improved AF performance. However, these parameters and combination of techniques have been used with several limitations. e effect and estimating performance of the designed method were studied using power spectrum density (PSD), which is based on monitoring the concentration of an average power frequency. e PSD graphic shows the comparison before and after signal separation [4][5][6]. A few studies have also investigated the effects of separating different biosignals from noises, such as LSS, ECG, and myoelectric signals, on the signal-to-noise ratio (SNR) at specified requirement outputs [3,[8][9][10][11]. e present study evaluates the estimation performance of ANC based on NLMS algorithm to separate HSS from contaminated LSS on the SNR and the behavior of mean square error (MSE). Moreover, the improvement in performance level is studied under four values of the optimal variable μ n (VSS) and 11 determined L j values in the following 2 n sequence: j � 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048. erefore, the performance for one separation is processed 44 times (4μ n × 11), that is, the SNR is calculated to obtain 4 × 11 matrix of the output SNR out values. Such combination of the proposed algorithm overcomes the limitations of previous studies in addition to the following: the use of NLMS algorithm instead of LMS algorithm because LMS algorithm cannot be adopted with two long signals and the use of ANC instead of ALE. e VSS initially is studied to identify the optimal range that can work with 11 L j . e level of performance improvement is estimated by comparing the SNR before and after applying the proposed method. e proposed method is carried out and processed using a code program on the MATLAB platform. e proposed method can deal with large data, process repeatedly according to the number of the L j values, and calculate the SNR out values.
Results revealed the ability of the designed ANC-NLMS algorithm to separate HSS from LSS successfully and showed the increasing performance with increasing L j value. e improved SNR of the normal and abnormal LSSs is particularly achieved at the L j range of 64-1024 and 512-2048, respectively, at the determined μ n . e comparison of SNR in with the obtained matrix of the SNR out aids in exploring the existence of distinguishable characteristics between normal and abnormal LSSs, which can be used in computerized LSS classification.

Materials.
Required signals of heart and lung sounds used for experiments are obtained from the laboratory of the Biomedical Engineering Department at University of Science and Technology, Yemen. LSS and HSS are recorded using two-channel electronic stethoscopes and stored in wav format [4]. Both signals are recorded with sampling frequency of 44100 Hz. HSS recording is carried out on the down anterior region of the chest. e HSS used in this study is normal, which consists of the first heart sound (S1) and murmurs (shown in Figure 1). e lung sound auscultation is performed on the left down posterior and right anterior regions of the chest. e lung sounds considered in this study are described in Table 1.

ANC Algorithm Architecture.
e present study investigates on the performance of the combination of ANC with NLMS to separate HSS from LSS. e NLMS is more stable than the LMS in terms of dealing with more than one signal in real-time applications; the NLMS algorithm also displays higher and faster rate of convergence than that of LMS [12]. According to the stated abilities, NLMS algorithm is used in this case study. e original input of ANC is used for contaminated LSS, and the reference input is used for the noise HSS. Figure 2 illustrates the main components of ANC-NLMS algorithm architecture. e inputs of ANC-NLMS represent two wave files, each of which is recorded by an individual channel. e original signal X i (n) is contaminated by the reference signal h i (n) during the recording process. e original input signal X i (n) can be described as follows: where d i (n) is the desired pure lung sound (LSS), h i0 (n) is the interfered HSS in X i (n) that represents noise, and i is a corresponding order number of the signal.
(i) e reference input signal, that is, h i (n), is assumed almost correlated with h i0 (n).
e filter output Y i (n) is defined as follows: where L j is the filter length, and j is the value determined from the 2 n sequence of 2,4,8,16,32,64,128,256,512,1024,2048, at which the designed algorithm performance is examined. Additionally, k is a number of iteration, x(n) � [x(n)· x(n − 1) . . . x(n − L − 1)] T is the input vector of time delayed input values, and w(n) � [w 0 (n) · w 1 (n − 1) . . . w L−1 (n)] T is the weight vector at the time n that can be minimized, as shown in ‖w(n)‖ 2 � ‖w(n + 1) · · · w(n)‖ 2 .
(ii) e μ n value for the input vector is calculated as follows: where β is a small positive constant used to avoid division by zero when the input vector X n is zero. us, the problem on obtaining a gradient noise amplification in tap weights is solved. Furthermore, α is the adaptation positive constant that is commonly less than 1 (0 < α < 1) [12,13].

NLMS Optimization.
NLMS optimization is a principal method for minimal disturbance presented in [13], where the error signal e i (n) is defined as the difference between the desired signal and the filter output in (2). Hence, the error is minimized in magnitude and rearranged as follows: e NLMS algorithm recursion obtains the constrained optimization criterion. e tap weight is as follows: NLMS algorithm is an indication of the minimal disturbance among iterations [13,14]. Table 2 summarizes the NLMS algorithm.

NLMS μ n .
e μ n parameter should be optimized to ensure the reliability of the designed algorithm [15] at 11 L j values (determined previously) as a case study. e optimal μ n is obtained through the following steps. First, most ideal VSS is randomly searched. Results from the first step are used in the second step. Such results include the implementation and automation of the algorithm work. Both steps are described in further detail in the following paragraphs.
(i) First step: random search for the most ideal possible μ n μ n presents two main parameters, namely, α and β, which can affect the overall performance of the algorithm. is aspect is the motivation for the VSS approaches, that is, two parameters (α and β) will be controlled to satisfy the required performance. e experiments are carried out with consideration of the following: (a) e adaptation constant α is changed within the range of 0 < α < 1, and the small positive constant β is changed within the range 0.1-0.009 [12]. (b) e VSS is studied within the range of 0-1 at the determined L j value. (c) e influence on the overall performance is monitored on the minimization of MSE, SNR out behavior, and algorithm output graphics.
(ii) Second step: auto-optimum VSS e proposed idea here is a modified method from pseudorandom number generator μ n for NLMS algorithm [16]. e main parameters α and β are changed randomly into variable value from random numbers of distribution from 0 to 1 at each iteration time. μ n is obtained within a fixed optimal range of 0 ≥ μ n � 0.1, which is explored experimentally from the first step. e proposed idea is implemented, as shown in Table 3; it achieves the optimum solution of NLMS in Section 2.3.

Performance Analysis
MSE is a performance function of AF, and its target is the low MSE value for it to achieve a proper performance [13]. erefore, the values and graph of this   Input: Tap-weight vector, w(n), Input vector, x(n), and desired output, d(n) Output: Filter output, y(n), tap-weight vector update, w(n + 1) 1. Filtering output signal: Tap weight and step size parameters adaptation: quantity are essential to evaluate the performance of the AF. e formula for MSE is given by the following equation: where E[·] denotes the statistical expectation, and e is the estimated error of AF. e MSE is calculated for the evolution of AF performance during searching for the optimal VSS, as shown in Table 4.

SNR Evaluation.
SNR is used as a metric to estimate the performance of the proposed method, and it is defined as the ratio of the amount of signal to the amount of noise [17].
In the present study, SNR is calculated before and after applying the ANC-NLMS algorithm to compare their values for the same signals at the determining condition. e input SNR (SNR in ) of the recording signal is measured in amplitudes; thus, SNR in must be squared to be proportional to power, as expressed in (8) [18,19].
where X i (n) is the original signal defined in (1) and considered the signal, h i (n) is the reference signal and considered the noise, and i refers to the same number of pair signals.
Moreover, E(·) denotes operations in calculating the expectation calculation in the time domain. According to the proposed method, (8) is suitable for SNR calculation because h i (n) is correlated with existing noise (h 0 (n)) in X i (n). e output SNR out value after applying ANC-NLMS is given by the following equation: where Y i (n) is the output (pure LSS) of ANC-NLMS and considered the signal, and e 0 i (n) is the estimated error (noise measurement) of ANC-NLMS and considered the noise. e higher output SNR (SNR out ) than that of SNR in indicates the pureness of the obtained LSS and success of the noise removal and consequently improves the performance of ANC-NLMS.
e improvement level is estimated as follows:

Output Graphics.
Visual graphics are used as metrics in observing the change in input and output graphics. ese graphics will illustrate the input signals (original and reference) in two windows and two other windows for output signals (pure LSS and estimated error). Accordingly, the change can be easily observed. e experiment is carried out using MATLAB platform, in which an algorithm code is designed to obtain the main output signals, their graphic matrix (SNR out ) (11) SNR in , and other input parameters.

SNR out
SNR out is used as one of metrics for the improvement of AF performance during searching for the optimal VSS. e obtained SNR is shown in Table 5.

Experiment Procedures.
e experiment procedures are summarized as follows: (i) Create the coding program. (ii) Unite the frequency sampling (8000 Hz). (iii) e maximum duration of studied signal is 3.5 s, that is, one completed breathing cycle, which is equal to 28000 samples.  N (1, . . . , 4)

the number of step size
Tap-weight vector, w(n), Filter output, y(n) Tap-weight vector update, w(n + 1) Step size calculation If m(j) > mu max m(j) � mu max If m(j) < mu min m(j) � mu min End End 4. Tap weight and step size parameters adaptation Journal of Healthcare Engineering (iv) Experimentally identify the optimal μ n range as stated in Section 2.5. (v) Procedure is performed with μ 1 for each L j value (i.e., 11 times according to the j values) to calculate and obtain the SNR out 11 times at each L j value. (vi) e procedure is repeated similarly with each μ n value, that is, four values within the determined optimal μ n value, to obtain 44 total processing for signal at (μ n · L j ), where j � 2, 4, 8, 16, . . . , 2048. erefore, SNR out is calculated 44 times and updated with each μ ni to obtain the matrix shown in (11). (vii) e experiment is carried out on MATLAB platform, in which an algorithm code is designed to obtain the main output signals and performance analysis tools.

Results
To obtain reliable results during all procedures, including the searching for the optimal VSS, the number of samples and L j were considered because of their effects on the performance of the designed algorithm. Figure 3 shows the MSE of μ n with a value of 0.06, which displays faster convergence rate than those of others. Additionally, the AF became steady after approximately 200 iterations at steady state error of approximately −24 dB. e other MSE tools needed a long time to converge and became steady after approximately 400 iterations at steady state errors of approximately −26 dB for μ n � 0.033 and −25.5 dB for μ n � 0.028 and 0.0085. us, the steady state errors were small. Figure 4 illustrates the results for large VSS that results in unstable performance and unsatisfied results. According to the comparison between Figures 3 and 4, the performance was good when VSS was small and close to zero. e same conclusion was observed in the changes in MSE and SNR out values; they improved gradually with decreasing μ n and when they became close to zero, as shown in Tables 4 and 5.
Searching for the optimal VSS identified the VSS optimal range of 0 ≥ μ n � 0.1. us, the designed algorithm lost its  is result showed an increase in the algorithm number of computation windows and minimization of error, as well as MSE, which is considered a function of NLMS performance. erefore, NLMS optimization achieved minimal disturbance, and the designed algorithm accurately adapted and converged to separate HSS from the original signal (Section 2.3). e auto-optimal algorithm of identifying VSS has been used to evaluate the separation of HSS from the original signal that consists of contaminated LSS and HSS based on SNR, as well as the performance of ANC and NLMS algorithm combination. Table 6 shows the SNR out values calculated from the AF outputs for the abnormal LSS case. Results of the comparison of the SNR in values shown in Table 1 and the SNR out values shown in Table 6 indicated that the SNR in values were located from −14.4 dB to −53 dB in an abnormal case. is result suggested that the abnormal LSS included high amount of noise, and the SNR out values changed according to the L j and determined VSS. Figure 6 demonstrates the visual difference before and after applying the proposed method at the determined parameters where the original signal (graphic 1, Figure 6(a)) showed higher frequency components than that of pure LSS (graphic 3, Figure 6(c)). In addition to the improved level of SNR out , these results indicated the separation of the noise components from the desired LSS. Table 7 shows the improved performance level of separating signals on normal LSS case by observing SNR out that started from L j � 64 and increased with increased L j value. e improvement level based on SNR out also increased with increased L j value and obtained small change at different VSS.
e SNR in values of normal LSS ranged from −3.93 dB to −7.78 dB (Table 1). e SNR out values changed according to the L j and determined μ n ( Table 7). Figure 7 exhibits the signal obtained by the designed algorithm, with the visual difference between the original signal (graphic 1, Figure 7(a)) and the pure LSS (graphic 3, Figure 7(c)). In general, the frequency components were low in the subjected original signal and decreased after applying AF on the pure LSS (graphic 3, Figure 7(c)).

Discussions
e optimized results of the designed algorithm determined the optimal VSS range of 0 ≥ μ n � 0.1; in this range, the AF became highly stable with nonstationary biosignals, such LSS, where the performance of the proposed method showed the most ideal trade-off between convergence speed and low steady error on the basis of the appropriately autoselected µ [7,15]. is achievement approved the proper work of the designed algorithm and its capability to separate signals by identifying the VSS range on NLMS algorithm, which is in agreement with the results of several works [20][21][22]. e SNR out values improved progressively at determined μ n and L j values for abnormal and normal lung sounds, as shown in Tables 6 and 7, respectively. e SNR out matrix indicated that the performance level in the normal and abnormal LSSs started improving from the L j values of 64,128 and 256,512, respectively. Moreover, L j�1024 can be the upper limit at which the AF may work stably with normal LSS and obtain accurate outputs. AF can work at L more than 2048 with abnormal LSS. is result can be due to that it consists of normal LSS for low-frequency components, and the abnormal LSS consists of high-frequency components. e SNR out values revealed several distinct markers between LSSs; the normal LSS shows high SNR values, that is, the SNR value reaches close to 0 or the positive axis. By contrast, the SNR values of the abnormal LSS are considerably small in the negative axis. erefore, these characteristics may reveal clear difference that can differentiate between both LSS types whether in terms of SNR in or SNR out values.
e performance estimation of ANC-NLMS algorithm combination based on automatic identification of the optimal VSS validated the correctness of the proposed method and its sequence steps in separating HSS from LSS. Additionally, such estimation explored the distinct features differentiating normal LSS from abnormal LSS,  and these characteristic may be used as primary features to classify LSS.

Conclusions
is study investigated an effective method of ANC-NLMS algorithm based on automatic identification of the optimal VSS for 11 L j values to separate HSS from LSS. e performance of the designed algorithm evaluated at determined conditions showed good result by reducing and minimizing the error gradually to zero after the convergence time.
e effectiveness of the designed algorithm to separate HSS from contaminated LSS estimated based on the SNR out illustrated a progressive performance improvement level  Journal of Healthcare Engineering with increasing L j and significantly improved separation of HSS from LSS. is SNR out explored a novel method to differentiate between normal and abnormal LSSs. is method may be used as basis in developing computerized diagnosis and automating LSS calcification. e proposed approach clarified the correctness of the combined designed algorithm and achieved significant performance. e proposed method may be subject for further study on LSS under different settings and durations.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that they have no conflicts of interest. Journal of Healthcare Engineering 9