Abstract
Lung sound (LS) signals are a vital source of information for the identification of pulmonary disorders. Heart sound (HS) is the most common contaminant of lung sounds during auscultation from the chest walls. This directly affects the efficiency of lung sound processing in diagnosing lung diseases. In this work, Adaptive Variational Mode Decomposition (AVMD) technique is proposed to remove heart sound contaminants from lung sounds. The proposed AVMD method initially breakdown the noisy lung sound signal into a collective of bandlimited modes called variational mode functions (VMF). Then, based on the frequency spectrum, the HS is filtered out from the LS. The real time lung sound data is collected from 95 participants and the performance of VMD technique is evaluated using the statistical metrics measures. Thus, the proposed topology exhibits Higher SNR (29.6587dB, lowest Root Mean Square (RMSE) of 0.0102, lowest normalized Mean Absolute Error (nMAE) of 0.0336, and highest percentage in correlation coefficient Factor (CCF) of 99.79% respectively. These experimental results are found to be superior and outperform all other recently proposed techniques.
Introduction
Auscultation of lung sounds (LS) is a crucial clinical procedure for diagnosing lung disorders. It involves listening to the sounds produced by airflow within the airways during inhalation and exhalation [1]. However, heart sounds (HS) often occur concurrently during recordings and act as noise, significantly obstructing the analysis of LS [2, 3]. Even with the use of electronic stethoscopes, the frequency range of lung sounds (20–2000 Hz) overlaps with that of heart sounds, making it challenging to separate them during recording, particularly at low flow rates [4]. Previous attempts to remove HS using a high pass filter (HPF) with a frequency band of 70 to 100 Hz have been found to be ineffective [5, 6]. Researchers have explored various filtering such as linear adaptive filtering etc., to detach HS from LS [7–10]. However, these methodologies exhibit limitations when confronted with significant signal frequency aliasing. This can manifest as either incomplete decomposition or distortion in the processed signals. Apart from this, a preprocessing topologies including Hilbert Huang transform (HHT), singular spectrum analysis have been carried out for extracting HS from LS. To achieve the separation of LS from Hs.
Li et al., (2013) proposed a technique that utilizes the shorttime cyclic frequency spectrum to estimate the Instantaneous Cycle Frequency (ICF) of heart sounds, which corresponds to the frequency of the heartbeat. This estimated ICF is used to detect and identify the heart sounds present in a lung sound record. The methods described above face challenges, leading to either insufficient decomposition or excessive decomposition, inevitably influencing the ultimate outcomes.
Thus this work introduced a highly effective Adaptive Variational Mode Decomposition (AVMD) algorithm to eliminate LS from HS in comparison with VMD. This proposed algorithm constructs a frequency constrained model to enhance the extraction process.
Related works
A novel noise reduction technique for lung sound signals using Wavelet based filtering techniques has been proposed [12]. The objective evaluation measures and the acceptance of medical professionals, the proposed noise reduction technique demonstrates its potential in effectively reducing noise in lung sound signals while maintaining the integrity of the underlying information.
The empirical mode decomposition (EMD) method is a powerful technique that enables the decomposition of complex data sets into a finite and often small number of “intrinsic mode functions” (IMFs). These IMFs exhibit well behaved Hilbert transforms, making them useful for analysis purposes. The EMD method is adaptive, making it highly efficient in extracting intrinsic components [13]. But this may result in the creation of spurious IMFs, which could compromise the reliability of the decomposition outcomes. To overcome this shortcoming, Akbari et al., [14] have explored the identification of normal and depression EEG signals using VMD.
VMD method can be utilised for the classification of seizure and seizure free signals. Unlike other techniques such as EMD, VMD utilizes a variational non recursive approach. This non recursive decomposition is advantageous as it makes the analysis less susceptible to noise and variations in sampling rates [15]. Even though, VMD is superior from the other existing topology, the modes obtained through VMD may not always have a clear physical interpretation.
In [16], the authors addressed noise reduction in a biomedical image using VMD and found that the mode number used in VMD was consistent with that of EMD. However, this consistency with EMD is not necessarily convenient for VMD.
To overcome this inconvenience and improve the determination of the mode number in VMD, Liu et al. proposed the use of mutual information as a criterion to enhance the iterative stopping conditions [17]. By incorporating mutual information, the stopping criteria can be more objectively defined, allowing for better automation and adaptability in determining the mode number.
Additionally, Tang et al. introduced an optimization index based on the ratio of residual energy to the original energy of a signal [18]. The mode number was selected when this ratio fell below a specified threshold. This approach provides a quantitative criterion to guide the determination of the mode number, ensuring that the decomposition captures the essential signal components while minimizing the residual energy.
Wang employed a CPSO (Chaos Particle Swarm Optimization) algorithm to optimize both the penalty parameter and mode number in VMD. While this method can yield suitable parameters, it is considered inefficient due to the more number of iterative trials [19].
Mou et al. [20] utilised ratio of frequencies existing between the neighboring modes as an indicator for automatically determining the mode number. By analyzing the frequency ratios, the mode number can be determined without the need for an exhaustive search or iterative optimization process.
Liu et al. proposed a Detrended Fluctuation Analysis (DFA) to choose the decomposition level in VMD. Although this criterion is focused on the decomposition level rather than the mode number specifically, it provides a means to determine the appropriate level of decomposition that minimizes internal mode mixing within each mode [21].
Li introduced an independence oriented VMD method [22]. This method selects the initial mode number and also identifies the suitable number by employing similarity principle and peak searching. By considering the independence and distinctiveness of the modes, this approach aims to overcome issues related to mode mixing and improve the fidelity of the decomposition results.
Thus, from the literature survey, it can be concluded that to improve the modes detection topology in VMD analysis, numerous topology have been adopted. However, this results indicates that the due to this adaptability, the computational cost of an algorithm in terms of the time remains high.
In response to the limitations of the above discussed topologies, this work proposed a novel a method called Adaptive Variational Mode Decomposition (AVMD) to determine the mode number automatically which is based on the characteristics of IMF. By analyzing the indicators, AVMD can dynamically regulate the mode number (K) and reanalyze the signal until a proper K value is obtained. This can save time and effort in the analysis process, especially in applications where finding optimal parameters can be challenging. Figure 1 depicts the block diagram of the proposed topology.

Block diagram for removal of HS signal from LS signal using VMD method.
VMD algorithm
VMD is a nonrecursive and adaptive signal decomposition method. It breaks down complex signals into a discrete set of K modes, where each mode, represented as uk, is densely centered around a specific frequency with a limited bandwidth. The decomposition process in VMD is iterative and aims to decompose the raw signal into Klimit bandwidth Variational Mode Functions (VMFs). These VMFs capture the underlying components of the signal at different frequency scales.
Where
φk(t) –Instantaneous frequency of u k (t)
A k (t) –Instantaneous amplitude of u k (t).
The bandwidth of each mode is predicted using the H1 (Gauss smoothness of the demodulated signal). The resulting constrained variational problem can be expressed as follows:
Where
∂(t) –Partial derivative of t
{uk} = {u1, u2, … uk} –VMF component’s center frequency
α –penalty term, are used to reduce the unconstrained problem. The
λ –Lagrangian multiplier (LM)
Thus, an ideal solution of the variation model can be
By performing Equation (4), the suitable solution can be identified. In the frequency response model, the updated centre frequency and assessed modes cab be derived as follows
Thus, Fig. 2 depicts the flowchart of the proposed VMD.

Flowchart of VMD technique.
In the VMD denoising algorithm, k is the number of modes chosen for decomposition and it is an important factor to consider when preprocessing LS. Selecting too few modes can result in under segmentation, On the other hand, choosing too many modes can capture excessive noise or cause duplication of modes. To determine the appropriate number of modes, multiple trials are typically conducted in the VMD algorithm. The number of modes is gradually adjusted to achieve the best decomposition level and obtain optimal results for denoising. In addition to the number of modes, other important parameters in the VMD algorithm includes
It influences the smoothness of the decomposed modes. It controls the tradeoff between fitting the data accurately and promoting smoothness in the modes.
The noise tolerance parameter determines the level of noise that can be present in the modes. It helps in distinguishing between signal components and noise.
The convergence tolerance criterion specifies the stopping criteria for the iterative optimization process in VMD. It determines the level of accuracy required for convergence.
The denoising process using the Variational Mode Decomposition (VMD) approach involves three main steps.
Step 1: Decomposition of LS signal
The corrupted LS signal is decomposed into K number of modes, represented as uk(t). Each mode represents a different component of the signal, including both the LS and the interfering heart sounds (HS).
Step 2: Identification and filtering of HS
In this step, the mode composer is used to identify the noise sources (HS) present in the decomposed signal. The identified HS modes are then summed together and filtered in the next stage. A Butterworth low-pass filter with a cut-off frequency of 150Hz is applied to the HS modes. Subsequently, the Hilbert transform is used to obtain the Hilbert envelope, which provides a representation of the instantaneous amplitude of the HS. The envelope is then smoothed to detect peaks in the HS slices and estimate their boundaries.
Step 3: Reconstruction of LS signal
After removing the HS section, the missing LS segments are estimated and summed by the mode composer to reconstruct the original LS signals. This step aims to restore the vital content of the LS signal by separating it from the interfering HS components.
However, choosing the optimal values for these parameters can be challenging and often requires manual tuning. Improper parameter selection can result in suboptimal decomposition and affect the accuracy of the results. However, the time-frequency resolution of the IMFs is limited by their bandwidths. Narrowband components may be adequately represented, but signals with rapidly varying or wideband characteristics may not be accurately captured by the IMFs, leading to information loss. Hence, this work formulated Adaptive VMD for separation of HS from LS.
The AVMD is an advanced signal processing technique used for decomposing nonstationary signals into a set of intrinsic mode functions (IMFs). It is an extension of the VMD method that incorporates adaptivity to better handle signals with time-varying properties.
The adaptivity in AVMD is achieved by introducing a penalty term in the VMD optimization problem, which encourages the decomposition to adapt to the signal’s instantaneous properties.
The AVMD algorithm can be summarized as follows:
Define the input signal to be decomposed. Initialize the VMD parameters, including the number of IMFs, penalty parameter, and convergence criteria. Start an iterative process:
Decompose the signal using VMD with the current set of parameters. Compute the penalty term based on the current IMFs. Update the parameters using an optimization method that minimizes the cost function consisting of the VMD reconstruction error and the penalty term. Check the convergence criteria, and if satisfied, proceed to the next step. Otherwise, go back to step a. Once the convergence criteria are met, the final set of IMFs represents the decomposed components of the input signal.
The adaptivity in AVMD allows it to effectively capture the time varying properties of non stationary signals, making it suitable for applications such as biomedical signal analysis.
In this topology, finding an appropriate combination of K and α is transformed into a submodular or super modular optimization problem. By leveraging the properties of sub and super modularity, the Adaptive Multiresolution Mode Extraction (AMME) and Resolution Enhancement (RE) methods finds the value of K and α. Thus, for each and every K and α combinations, Corresponding AMME and RE is calculated and appropriate Kα value with minimum error is chosen. Figure 3 represents the flow chart of the proposed AVMD.

Flowchart of Adaptive VMD.
Dataset
The dataset required for this analysis were collected from the Department of Thoracic Medicine at Government Medical College, Tamilnadu, India. The collection of these signals was done after obtaining the necessary ethical clearance from the Institutional Ethical Committee. The dataset consists of 95 patients, out of which 49 are healthy and 46 are with the symptoms of Wheezes. All participants included in the study were non-smokers and had no history of drug addiction. Furthermore, the patients refrained from taking any medication for a minimum of three to six hours before the data recording process. Thus, the details of the database is shown in Table 1.
Dataset details
Dataset details
According to the CORSA guidelines, LS data are typically recorded from subjects in a sitting position under the supervision of a senior medical officer at the hospital. In this particular work, a single channel stethoscope (3M Littmann: model 3200) was utilized for collecting the LS data. The sampling frequency was about 4 kHz and were recorded for a duration of 20 seconds using the Littmann Steth Assist software.
To evaluate the performance of the algorithm, the following measures are considered.
The RMSE quantifies the average difference between the denoised and the original signal
Where
Xi –original –LS signal, Si –HS removed signal and L –Length of the signal.
The CCF measures the correlation between the two signals and provides a measure of how well the filtering technique preserves the characteristics of the original lung sound.
The CCF metric is typically defined using the following equation:
The original’s similarity to the filtered results is assessed using nMAE,
The signal to noise ratio, or SNR, measures the strength of the signal.
In order to examine the efficiency of the proposed system, the acquired LS signals m are sliced into segments at 1.5 seconds duration. The number of decomposition modes (k) in VMD is a significant parameter. Choosing too few modes may result in insufficient data segmentation, making it impossible to isolate noise completely. On the other hand, selecting too many modes leads to increased computational complexity. Thus, the decomposition level for the AVMD algorithm was experimented with and fixed at k = 4. This means that the decomposition process stops at VMF4, which generates frequency components exceeding 1kHz. Hence, the decomposition level for the VMD algorithm is set to k = 4 according AMME and RE calculation.
Figure 4 displays the VMF generated using AVMD algorithm.

VMF components generated using AVMD algorithm (Frequency Spectrum).
In general, the AVMD technique decomposes the signal from the minimum frequency component to the maximum frequency component as depicted in Fig. 4. From the figure, it is found that VMF1 generates the HS with frequency component of 150 Hz whereas VMF2 generates the LS whose frequency ranges from 150 Hz to 250 Hz and VMF3 from 250 Hz to 500 Hz. Then after generating VMF, a 10th-order Butterworth low-pass filter with a cut-off frequency of 150 Hz is incorporated. As a result, the HS segments are identified and filtered, removed from the noisy LS signals. Then it is fed into the mode composer for signal reconstruction. As each Variational Mode Function (VMF) generated by AVMD produces unique frequency components, there is no mode aliasing effect.
Table 2 displays the performance metric parameters obtained from the AVMD approach for assessing the effectiveness of a denonising algorithm.
Performance metrics measures
Performance metrics measures
Based on the values presented in Table 2, the AVMD technique achieved an nMAE of 0.0336, signifies a closer match between the denoised and original signals. It is very lower when compared with the results obtained using the VMD technique. This proves effectiveness of the proposed process, providing valuable insights into how well the technique preserves the essential characteristics of the signal during the denoising operation.
The attainment of a maximum CCF around 99.79% with AVMD, in contrast to the 92.89% achieved by VMD, highlights the superior ability of the AVMD technique to preserve signal characteristics. This substantial difference in correlation coefficients suggests that AVMD outperforms VMD in maintaining a higher similarity between the original and denoised signals. The higher CCF reflects the efficacy of AVMD in accurately capturing and retaining essential features of the signal during the denoising process.
From the above figure, the AVMD technique demonstrated an impressive denoising performance, evident in the high SNR value of 29.6587 dB, surpassing the performance of VMD. Furthermore, AVMD depicts a lower RMSE compared to VMD, emphasizing its efficacy in minimizing discrepancies between the denoised and original signals.
The Table 2 illustrates that as SNR levels decrease, the nMAE increases, while the CCF and SNR decrease accordingly. This algorithm generates erroneous values due to the prominent presence of noisy components, particularly at low SNR values. The visual representation of these statistical results can be observed in Fig. 5 for SNR values of –8 dB and +8 dB, respectively.

Performance metrics (a) SNR (b) RMSE.
The following graphs shown in Fig. 6 is the power spectral density analysis of the HS separated from LS using VMD and AVMD algorithms. From the Fig. 6, the PSD of the recovered HS are different from EMD. So the proposed topology demonstrates its superiority over VMD.

PSD –HS Separated from LS (Blue- VMD, Green- AVMD).
Table 3 provides a comparison of the proposed technique LS denoising with various other techniques.
Comparison analysis
Savitzky-Golay filters [24] were employed for denoising lung sounds. Nevertheless, these filters have a tendency to overly smooth the waveform and necessitate manual parameter adjustment. In a more recent approach, denoising of LS was carried out using EMD, Hurst analysis, and Spectral Subtraction, although the specific implementation details of Spectral Subtraction and Hurst analysis were not clearly outlined [23]. Despite achieving a SNR of approximately 27.32 dB, some signals could not be adequately reconstructed. Evaluation based on performance measures such as SNR indicates that the proposed method outperforms other existing techniques in effectively separating LS and HS during denoising.
The execution time is displayed in Table 4. From the analysis, it found that the time complexity of the proposed method is 0.1523 which is lesser than that of DFA–VMD.
Execution time of proposed methods
This work introduces a novel technique that focuses on the separation of heart sounds from lung sounds while preserving the original content of the lung sounds. The method leverages the AVMD approach, which allows for a comprehensive analysis of the signal by decomposing it into its constituent VMD components. The proposed filtering technique has been applied to real-time datasets, demonstrating reliable denoising results.
The performance evaluation of the proposed technique reveals its superiority compared to other existing methods. It achieves the highest Signal-to-Noise ratio of 29.6587 dB and the highest correlation coefficient of 99.79%. These results highlight the effectiveness of the VMD-based filtering technique in preserving the original content of lung sounds while effectively separating heart sounds.
Funding statement
The authors received no specific funding for this study.
Conflicts of interest
The authors declare that they have no conflicts of interest to report regarding the present study.
