A method, medium, and device for denoising body sound signals based on LMS and FDC
By dynamically switching between FDC and LMS filters during auscultation, combined with adaptive frequency domain constraints and robust normalized minimum mean square algorithm, the problem of instrument alarm sound interference in the prior art is solved, achieving fast convergence and low offset environmental noise reduction effect, which is suitable for small wearable and home electronic auscultation devices.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SOUTH CHINA UNIV OF TECH
- Filing Date
- 2025-07-30
- Publication Date
- 2026-07-17
AI Technical Summary
Existing least mean square and normalized least mean square adaptive noise reduction algorithms are ineffective in processing instrument alarm sounds in hospital environments. They cannot effectively filter out narrowband noise and lack effective noise judgment and filter switching mechanisms.
A noise reduction method for body sound signals based on LMS and FDC is adopted. By judging whether the instrument alarm noise exists, the FDC filter and LMS filter are dynamically switched. The FDC filter is used to perform adaptive frequency domain constraint noise reduction during the alarm sound, and the LMS filter is used to ensure fast convergence when there is no alarm sound. The filter weights are updated by combining L0 norm constraint and robust normalized minimum mean square adaptive filtering algorithm.
It achieves rapid convergence and low-offset environmental noise reduction, and is suitable for small wearable auscultation devices and home electronic auscultation auxiliary diagnosis and treatment systems, effectively suppressing the interference of instrument alarm sounds commonly found in hospitals.
Smart Images

Figure CN120877694B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical measurement and signal processing technology, and more specifically, to a method, medium, and device for denoising body sound signals based on LMS and FDC. Background Technology
[0002] Body sounds such as heart sounds, breath sounds, and bowel sounds are weak, and their auscultation is easily interfered with by environmental noise. When collecting body sound signals for extended periods in a ward using wearable devices, interference from monitor alarm sounds must be considered. This is because the energy of alarm sounds is concentrated in the frequency range that the human ear is sensitive to, and because they are narrowband signals with high amplitude, they often cause significant interference to auscultation.
[0003] The Least Mean Square (LMS) or Normalized Least Mean Square (NLMS) adaptive noise reduction algorithms commonly used during auscultation are ineffective at reducing narrowband noise and cannot effectively filter out such interference, thus affecting the quality of auscultation sound acquisition. Therefore, it is necessary to consider using other noise reduction algorithms specifically for filtering out instrument alarm sounds.
[0004] If multiple algorithms are used to reduce noise before and after the alarm sound, there are two problems that need to be solved: ① How to determine if an alarm sound has appeared in the ambient noise; ② How to switch the filtering algorithm before and after the alarm sound. Summary of the Invention
[0005] To overcome the shortcomings and deficiencies in the existing technology, the present invention aims to provide a method, medium and device for noise reduction of body sound signals based on LMS and FDC. The method addresses the common influence of instrument alarm sounds in hospitals during auscultation by determining the rules for updating the filter weights of the system based on the environmental noise, so as to achieve a fast convergence and low-offset environmental sound noise reduction effect.
[0006] To achieve the above objectives, the present invention is implemented through the following technical solution: a body sound signal noise reduction method based on LMS and FDC, which collects the noisy body sound signal d(k) of the main channel and the environmental noise signal n(k) of the secondary channel at time k;
[0007] By determining whether instrument alarm noise exists at time k, an instrument alarm flag S is set. A Therefore, at time k, either the FDC filter or the LMS filter is set as the filter: when the instrument alarm flag S... A This indicates that an FDC filter is being used when instrument alarm noise is present; when the instrument alarm flag S... AThis indicates that when there is no instrument alarm noise, the LMS filter is set to be used; noise reduction is performed using the set filter to obtain the noise-reduced output e(k);
[0008] And when the instrument alarm sign S A When changes occur, the FDC filter weight matrix or LMS filter weight at time k-1 is saved, and the LMS filter weight or FDC filter weight matrix used at time k uses the previously saved value.
[0009] Preferably, the method for determining whether instrument alarm noise exists at time k is as follows:
[0010] The ambient noise signal n(k) of the secondary channel is bandpass filtered, and the cutoff frequencies of the bandpass filter are fk and fk respectively. l and f h And denote the signal after bandpass filtering as If k > L and kmod L = 0, where L is the length of the instrument alarm tone template o(i) and mod is the modulo operation, then the signal is calculated. The normalized cross-correlation coefficient Corr(k) between the preset instrument alarm tone template o(i) and the preset instrument alarm tone template:
[0011]
[0012] If Corr(k) > threshold Corr0, then set the instrument alarm flag S. A =1 indicates the presence of instrument alarm noise; otherwise, set the instrument alarm flag S. A =0 indicates that there is no instrument alarm noise.
[0013] Preferably, when the instrument alarm flag S A The instruction to use an FDC filter for noise reduction when instrument alarm noise is present means:
[0014] Windowing is applied to the ambient noise n(k) in the secondary channel and the noisy body sound signal d(k) in the main channel, respectively. The window length is Q = F × P, where F and P are the weight matrices W of the FDC filter. FDC k The number of rows and columns; perform discrete Fourier transforms on them respectively and express the transform results as F×P dimensional matrices N. k and D k , where N k and D k The element in row a and column b and Calculate using the following formulas respectively:
[0015]
[0016] Where j is the imaginary part of the complex number, j 2 =-1;
[0017] Calculate the main channel noise estimation matrix Y k :
[0018] Y k =W FDC k ⊙N k
[0019] Where ⊙ represents the Hadamarda accumulation.
[0020] Calculate the error signal matrix E k :
[0021] E k =D k -Y k ;
[0022] For the error signal matrix E k Performing the inverse discrete Fourier transform yields the denoised output e(k) = {e(k), e(k+1), ..., e(k+F×P-1)}, where the elements of vector e(k) are...
[0023]
[0024] Update the FDC filter weight matrix W FDC k .
[0025] Preferably, the L0 norm-constrained FDC adaptive filtering algorithm is used to weight the FDC filter weight matrix W. FDC k Updated to W FDC k+1 The updated formula is:
[0026]
[0027] Where μ1 is the FDC filter step size; λ is the FDC filter sparsity adjustment parameter.
[0028] Preferably, when the instrument alarm flag S A When there is no instrument alarm noise, setting the LMS filter to use for noise reduction means:
[0029] Calculate the estimated noise level y(k) for the main channel:
[0030]
[0031] Wherein, the LMS filter weight w LMS (k)=[wLMS (k,0),…,w LMS (k,M-1)] T ;
[0032] Calculate the error signal as the noise-reduced output e(k):
[0033] e(k) = d(k) - y(k);
[0034] Update LMS filter weights w LMS (k).
[0035] Preferably, the robust normalized least mean square adaptive filtering algorithm is used to adjust the LMS filter weights w. LMS (k) updated to w LMS (k+1); w LMS The element w of (k+1) LMS The update formula for (k+1, r) is:
[0036]
[0037] Where r∈{0,…,M-1}; n(k)=[n(k),…,n(k-M+1)]; M is the LMS filter order; μ2 is the LMS filter step size.
[0038] Preferably, before acquiring the noisy body sound signal d(k) of the main channel and the ambient noise signal n(k) of the secondary channel, an initialization step is also included:
[0039] Set instrument alarm flag S A =0;
[0040] Nyquist frequency It is divided into F frequency bands, namely (0, f1], (f1, f2], ..., (f F-1 f F ],in, f s The sampling frequencies of the main channel noisy sound signal d(k) and the secondary channel ambient noise signal n(k);
[0041] Set the current time index k = 0, and the LMS filter weight w LMS element w of (k) LMS (0, r) = 0, r ∈ {0, ..., M-1}; where M is the order of the LMS filter;
[0042] FDC filter weight matrix Among them, W FDC k The dimension is F×P.
[0043] A readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the LMS and FDC-based body sound signal noise reduction method.
[0044] A computer device includes a processor and a memory for storing a processor-executable program, wherein when the processor executes the program stored in the memory, it implements the aforementioned LMS and FDC-based body sound signal noise reduction method.
[0045] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0046] 1. This invention addresses the common impact of hospital instrument alarm sounds during auscultation by determining the rules for updating the system filter weights based on environmental noise, thereby achieving a fast-converging and low-offset environmental noise reduction effect.
[0047] 2. Since the instrument alarm sound is triggered intermittently, with a silent period between two adjacent triggers, this invention calls the FDC (Adaptive Frequency-Domain Constraint) filter after an alarm sound is detected, which can effectively suppress narrowband noise such as instrument alarm sounds. When there is no alarm sound, the LMS filter is used to ensure that the filter weights converge quickly. This invention also proposes a method for determining the existence of instrument alarm noise, which can dynamically switch between the FDC filter and the LMS filter at key time points to achieve the optimal noise reduction effect.
[0048] 3. The algorithm of this invention has low computational load, fast response speed, and low requirements for the computing power of hardware devices. It is particularly suitable for small wearable auscultation devices and small electronic stethoscopes. At the same time, the algorithm of this invention is also suitable for application in hospital and home electronic auscultation-assisted diagnosis and treatment systems. Attached Figure Description
[0049] Figure 1 This is a flowchart of the body sound signal noise reduction method based on LMS and FDC of the present invention;
[0050] Figure 2 The curves show the changes in the amplitude of the main and auxiliary channel signals over time when the stethoscope is suspended in the air. The main and auxiliary channel signals include the noise from the hall and the alarm sound of the instrument.
[0051] Figure 3 The result of applying the LMS and FDC-based body sound signal denoising method of this invention to environmental sound denoising;
[0052] Figure 4 This is a status curve of the stethoscope switching modes over time. Detailed Implementation
[0053] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.
[0054] Example 1
[0055] This embodiment presents a body sound signal noise reduction method based on LMS and FDC, such as Figure 1 As shown, it includes the following steps:
[0056] Step 1, Initialization:
[0057] Set instrument alarm flag S A =0, mode switching flag S S =0;
[0058] Nyquist frequency It is divided into F frequency bands, namely (0,f1], (f1,f2], ..., (f F-1 ,f F ],in, And f1, ..., f F-1 Determined based on the frequency band where the main energy of the alarm sound is located; f s The sampling frequencies of the main channel noisy sound signal d(k) and the secondary channel ambient noise signal n(k);
[0059] Set the current time index k = 0, and the LMS filter weight w LMS element w of (k) LMS (0,r)=0, r∈{0,…,M-1};where M is the order of the LMS filter;
[0060] FDC filter weight matrix Among them, W FDC k The dimension is F×P; preferably, F∈[3,7], P∈[128,1024]; W FDC k The element in row a and column b is denoted as
[0061] Step 2: Using sampling frequency f s The main channel noisy sound signal d(k) and the secondary channel ambient noise signal n(k) were collected at time k, respectively. The collected main and secondary channel signals are as follows: Figure 2 As shown; preferably, the sampling frequency f s ≥4KHz;
[0062] The third step is to determine whether there is instrument alarm noise at time k and set the instrument alarm flag S. A :
[0063] The ambient noise signal n(k) of the secondary channel is bandpass filtered, and the cutoff frequencies of the bandpass filter are fk and fk respectively.l and f h And denote the signal after bandpass filtering as If k > L and k mod L = 0, where L is the length of the instrument alarm tone template o(i) and mod is the modulo operation, then the signal is calculated. The normalized cross-correlation coefficient Corr(k) between the preset instrument alarm tone template o(i) and the preset instrument alarm tone template:
[0064]
[0065] If Corr(k) > threshold Corr0, then set the instrument alarm flag S. A =1 indicates the presence of instrument alarm noise; otherwise, set the instrument alarm flag S. A =0 indicates that there is no instrument alarm noise.
[0066] Preferably, the value of length L is determined by the length of the instrument's alarm sound, and is generally taken to be as close as 0.2f. s A positive integer f. l The value is set to 950Hz, f h The value is 1050Hz. The threshold Corr0∈[0.15, 0.4].
[0067] Fourth step, determine the instrument alarm sign S A Whether it changes, i.e. whether it is S A Set from 0 to 1 or from 1 to 0; if so, then the mode switching flag S S =1.
[0068] Fifth step, according to the instrument alarm sign S A At time k, the FDC filter or LMS filter is set as the filter: when the instrument alarm flag S A When = 1, the FDC filter is set to be used; when the instrument alarm flag S A When = 0, the LMS filter is set to be used.
[0069] When setting to use an FDC filter
[0070] First, determine the mode switching flag S. S It equals 1: If S S If the value is 1, the filter switches from the LMS filter used at time k-1 to the FDC filter used at time k; therefore, the LMS filter weights at time k-1 are first saved as... And read the previously saved FDC filter weight matrix. The FDC filter weight matrix used at time k uses the previously saved values, i.e. Then switch the mode to S flag. S Return to 0; if SS If the value is 0, then the FDC filter weight matrix obtained at time k-1 is used directly;
[0071] Then, an FDC filter is used for noise reduction to obtain the noise-reduced output e(k);
[0072] Windowing is applied to the ambient noise n(k) in the secondary channel and the noisy body sound signal d(k) in the main channel, respectively. The window length is Q = F × P, where F and P are the weight matrices W of the FDC filter. FDC k The number of rows and columns, F equals the number of frequency bands, and P equals the number of sampling points in each frequency band; perform discrete Fourier transforms on each and express the transform results as F×P dimensional matrices N. k and D k , where N k and D k The element in row a and column b and Calculate using the following formulas respectively:
[0073]
[0074]
[0075] Where j is the imaginary part of the complex number, j 2 =-1;
[0076] Calculate the main channel noise estimation matrix Y k :
[0077] Y k =W FDC k ⊙N k
[0078] Where ⊙ represents the Hadamard Product. W FDC k Here is the weight matrix of the FDC filter;
[0079] Calculate the error signal matrix E k :
[0080] E k =D k -Y k ;
[0081] For the error signal matrix E k Performing the inverse discrete Fourier transform yields the denoised output e(k) = {e(k), e(k+1), ..., e(k+F×P-1)}, where the elements of vector e(k) are...
[0082]
[0083] Subsequently, the FDC adaptive filtering algorithm with L0 norm constraint (L0-norm) is used to adjust the weight matrix W of the FDC filter. FDC k Updated to W FDC k+1 The updated formula is:
[0084]
[0085] Where μ1 is the FDC filter step size; λ is the FDC filter sparsity adjustment parameter. The value range of μ1 is: μ1∈[0.001, 0.1]; the value range of λ is: λ∈[0.01, 0.1].
[0086] When setting to use the LMS filter
[0087] First, determine the mode switching flag S. S It equals 1: If S S =1, then the filter switches from the FDC filter used at time k-1 to the LMS filter used at time k; therefore, the FDC filter weight matrix at time k-1 is first saved as And read the previously saved LMS filter weights. The LMS filter weights used at time k use the previously saved values, i.e. Then switch the mode to S flag. S Return to 0; if S S If the value is 0, then the LMS filter weights obtained at time k-1 are used directly;
[0088] Then, an LMS filter is used for noise reduction to obtain the noise-reduced output e(k);
[0089] Calculate the estimated noise level y(k) for the main channel:
[0090]
[0091] Wherein, the LMS filter weight w LMS (k)=[w LMS (k,0),…,w LMS (k,M-1)] T ;
[0092] Calculate the error signal as the noise-reduced output e(k):
[0093] e(k) = d(k) - y(k);
[0094] Then, the robust normalized least mean square (NLMS) adaptive filtering algorithm is used to adjust the LMS filter weights w. LMS (k) updated to w LMS (k+1); w LMS The element w of (k+1) LMS The update formula for (k+1,r) is:
[0095]
[0096] Where r∈{0,…,M-1}; n(k)=[n(k),…,n(k-M+1)]; M is the LMS filter order; μ2 is the LMS filter step size. The value range of μ2 is: μ2∈[0.001,0.1]; the value range of M is: M∈[20,300].
[0097] After completing the signal denoising at time k, the process continues with signal acquisition and denoising at the next time step until the denoising process is complete. The final filtered result is as follows: Figure 3 As shown. Combined with Figure 2 and Figure 3 This invention can filter out common hospital lobby noises and instrument alarm sounds to a low level, thereby avoiding the impact of environmental noise on auscultation.
[0098] The technical principle of the method of this invention is:
[0099] When no alarm sound is detected, assuming the ambient noise is additive, the main channel signal is a noisy body sound d(k) = s(k) + n1(k), where s(k) is the body sound signal at time k, and n1(k) is the ambient noise signal entering the main channel at time k. The ambient noise entering the secondary channel at time k is denoted as n(k), which is processed by the LMS filter of this invention to obtain the estimated noise value y(k) of the main channel and used to cancel n1(k) to achieve noise reduction. The stethoscope mode switching state curve is shown below. Figure 4 As shown, combined with Figure 2 and Figure 4 When an alarm sound is detected, the stethoscope will quickly switch to FDC state; when the alarm sound disappears, it will return to LMS state.
[0100] When the amplitude of the noise signal n(k) collected by the secondary channel in L sampling points is greater than the normalized cross-correlation coefficient Corr(k) of the preset instrument alarm tone signal o(i) by L samples, the system determines that an instrument alarm tone has been detected, activates the FDC filter, and saves the LMS filter weights.
[0101] When the instrument is in alarm mode, d(k) and n(k) are divided into frequency bands and discrete Fourier transforms are performed to obtain... and The main channel signal is noisy body sound. in Let b be the b-th sampling point of the a-th frequency band after Fourier transform of the body sound signal at time k. The b-th sampling point of the a-th frequency band of the environmental noise signal entering the main channel at time k is obtained after Fourier transform. After processing by the FDC filter of this invention, the main channel noise estimation matrix Y is obtained. k And used to offset N k 1. This achieves noise reduction.
[0102] When the amplitude of the noise signal n(k) collected by the secondary channel in L sampling points is less than or equal to the threshold Corr0 of the normalized cross-correlation coefficient Corr(k) between the preset frequency band and the preset instrument alarm sound signal o(i), the system determines that the instrument alarm sound has disappeared and closes the FDC filtering algorithm, and continues to use the LMS filter with the previously saved LMS filtering weights. And save the FDC filter weight matrix.
[0103] Under normal auscultation conditions, as shown in equation (1), the method of this invention uses the commonly used robust NLMS adaptive filtering algorithm to update the weight w. LMS (k+1,r).
[0104]
[0105] Where, e(k) = d(k) - y(k), w LMS (k+1,r) and w LMS (k,r) are the weights of the adaptive filter at time k+1 and time k, respectively, and n(k) = [n(k), ..., n(k-M+1)].
[0106] When an instrument alarm is detected, as shown in equation (2), the method of the present invention uses the L0FDC filtering algorithm to update the weight matrix W. FDC k+1 .
[0107]
[0108] Among them, E k =D k -Y k W FDC k+1 and W FDC k These are the weight matrices of the adaptive filters for the (k+1)th and kth frames, respectively.
[0109] Thus, the key to the algorithm's rapid convergence and low steady-state imbalance lies in accurately determining when an instrument alarm sound is present. As described in the background technology introduction: the instrument alarm sound has obvious periodicity and concentrated energy in the audio domain. Therefore, the normalized cross-correlation coefficient between the collected noise signal and the preset alarm sound sample in the frequency band where the energy is concentrated can be calculated to avoid interference from other noises and identify the instrument alarm sound, as shown in Equation (3).
[0110]
[0111] If the normalized cross-correlation coefficient Corr(k) is greater than the preset threshold Corr0, it can be determined that the instrument alarm sound will be activated, and the instrument alarm flag S will be set. A =1, otherwise S A =0. If S A Mode switching flag S (set from 0 to 1 or from 1 to 0) S =1, at this point the current LMS or FDC filter weights should be saved. or weight matrix This allows the filter weights to be reused during the next mode switch, enabling them to converge quickly.
[0112] Example 2
[0113] This embodiment describes a body sound signal noise reduction method based on LMS and FDC, illustrated with a specific example, including the following steps:
[0114] Step 1, Initialization:
[0115] Set instrument alarm flag S A =0, mode switching flag S S =0;
[0116] The Nyquist frequency of 4 kHz is divided into 6 bands: (0,200], (200,500], (500,850], (850,1200], (1200,1500], and (1500,4000].
[0117] Set the current time index k = 0, and the LMS filter weight w LMS Each element w of (k) LMS (0,r)=0,r∈{0,…,139};LMS filter order M is 140;
[0118] FDC filter weight matrix Among them, W FDC k The dimension is F×P; F=6, P=256; W FDC k The element in row a and column b is denoted as
[0119] Step 2: Using sampling frequency f s The main channel noisy sound signal d(k) and the secondary channel ambient noise signal n(k) are collected at time k, respectively; preferably, the sampling frequency f s ≥4KHz;
[0120] The third step is to determine whether there is instrument alarm noise at time k and set the instrument alarm flag S. A :
[0121] The ambient noise signal n(k) of the secondary channel is bandpass filtered, and the cutoff frequencies of the bandpass filter are fk and fk respectively. l =950Hz and f h =1050Hz, and denote the signal after bandpass filtering as If k > L and k mod L = 0, where L is the length of the instrument alarm tone template o(i), L = 1600, and mod is the modulo operation, then the signal is calculated. The normalized cross-correlation coefficient Corr(k) between the preset instrument alarm tone template o(i) and the preset instrument alarm tone template:
[0122]
[0123] If Corr(k) > threshold Corr0, and Corr0 = 0.25, then set the instrument alarm flag S. A =1 indicates the presence of instrument alarm noise; otherwise, set the instrument alarm flag S. A =0 indicates that there is no instrument alarm noise.
[0124] The instrument alarm tone template o(i) is determined using the following method:
[0125] The stethoscope was placed in an environment with ambient noise levels exceeding 40 dB, with the auscultatory surface in contact with the human body suspended in the air. During this time, audio simulating hospital equipment noise was played through a speaker, and the volume of the speaker was controlled so that the volume near the stethoscope was approximately 65–85 dB when the equipment alarm sounded. The secondary channel signal was acquired at a sampling frequency of 8 kHz and denoted as {n}. δ1 ,n δ2 ,…,n δ8000 Extract a complete segment of the alarm sound. δ n δ+1 ,…,n δ+L-1} is the instrument alarm sound template o(i). The instrument alarm sound used in this experiment is approximately 0.2 seconds long, corresponding to an o(i) length L = 1600.
[0126] Fourth step, determine the instrument alarm sign S AWhether it changes, i.e. whether it is S A Set from 0 to 1 or from 1 to 0; if so, then the mode switching flag S S =1.
[0127] Fifth step, according to the instrument alarm sign S A At time k, the FDC filter or LMS filter is set as the filter: when the instrument alarm flag S A When = 1, the FDC filter is set to be used; when the instrument alarm flag S A When = 0, the LMS filter is set to be used.
[0128] When setting to use an FDC filter
[0129] First, determine the mode switching flag S. S It equals 1: If S S =1, then first save the LMS filter weights at time k-1 as And read the previously saved FDC filter weight matrix. The FDC filter weight matrix used at time k uses the previously saved values, i.e. Then switch the mode to S flag. S Return to 0; if S S If the value is 0, then the FDC filter weight matrix obtained at time k-1 is used directly;
[0130] Then, an FDC filter is used for noise reduction to obtain the noise-reduced output e(k);
[0131] Window the ambient noise n(k) in the secondary channel and the noisy body sound signal d(k) in the main channel, respectively, with a window length Q = F × P = 6 × 256 = 1536; perform discrete Fourier transforms on them respectively and express the transform results as F × P dimensional matrices N. k and D k , where N k and D k The element in row a and column b and Calculate using the following formulas respectively:
[0132]
[0133] Where j is the imaginary part of the complex number, j 2 =-1;
[0134] Calculate the main channel noise estimation matrix Y k :
[0135] Y k =W FDC k ⊙N k
[0136] Where ⊙ represents the Hadamard Product.
[0137] Calculate the error signal matrix E k :
[0138] E k =D k -Y k ;
[0139] For the error signal matrix E k Performing the inverse discrete Fourier transform yields the denoised output e(k) = {e(k), e(k+2), ..., e(k+1535)}, where the elements of vector e(k) are...
[0140]
[0141] Subsequently, the FDC adaptive filtering algorithm with L0 norm constraint (L0-norm) is used to adjust the weight matrix W of the FDC filter. FDC k Updated to W FDC k+1 .
[0142] When setting to use the LMS filter
[0143] First, determine the mode switching flag S. S It equals 1: If S S =1, then the FDC filter weight matrix at time k-1 is saved as And read the previously saved LMS filter weights. The LMS filter weights used at time k use the previously saved values, i.e. Then switch the mode to S flag. S Return to 0; if S S If the value is 0, then the LMS filter weights obtained at time k-1 are used directly;
[0144] Then, an LMS filter is used for noise reduction to obtain the noise-reduced output e(k);
[0145] Calculate the estimated noise level y(k) for the main channel:
[0146]
[0147] Wherein, the LMS filter weight w LMS (k)=[w LMS (k,0),…,w LMS (k,M-1)] T ;
[0148] Calculate the error signal as the noise-reduced output e(k):
[0149] e(k) = d(k) - y(k);
[0150] Then, the robust normalized least mean square (NLMS) adaptive filtering algorithm is used to adjust the LMS filter weights w. LMS (k) updated to w LMS (k+1).
[0151] After completing the signal denoising at time k, continue to acquire and denoise the signal at the next time step until the denoising process is finished.
[0152] Example 3
[0153] This embodiment provides a readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the body sound signal noise reduction method based on LMS and FDC as described in Embodiment 1.
[0154] Example 4
[0155] This embodiment discloses a computer device, including a processor and a memory for storing processor-executable programs. When the processor executes the program stored in the memory, it implements the body sound signal noise reduction method based on LMS and FDC as described in Embodiment 1.
[0156] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of the present invention shall be considered equivalent substitutions and shall be included within the protection scope of the present invention.
Claims
1. A method for denoising body sound signals based on LMS and FDC, characterized in that: Acquire noisy body sound signal from the main channel at time k. and secondary channel ambient noise signal ; By determining whether instrument alarm noise exists at time k, an instrument alarm flag S is set. A Therefore, at time k, either the FDC filter or the LMS filter is set as the filter: when the instrument alarm flag S... A This indicates that an FDC filter is being used when instrument alarm noise is present; when the instrument alarm flag S... A This indicates that when there is no instrument alarm noise, the LMS filter is set to be used; noise reduction is performed using the set filter to obtain the noise-reduced output. ; And when the instrument alarm sign S A When changes occur, the FDC filter weight matrix or LMS filter weight at time k-1 is saved, and the LMS filter weight or FDC filter weight matrix used at time k uses the previously saved value. When the instrument alarm sign S A The instruction to use an FDC filter for noise reduction when instrument alarm noise is present means: Environmental noise of the secondary channel and main channel noisy sound signal Add a window, increase the window length Where F and P are the weight matrices of the FDC filter, respectively. The number of rows and columns; perform discrete Fourier transforms on them respectively and express the transform results as follows: dimensional matrix and ,in and No. Line number Column elements and Calculate using the following formulas respectively: ; ; Where j is the imaginary part of the complex number; Calculate the main channel noise estimation matrix : ; in, For Hadama accumulation, ; Calculate the error signal matrix : ; For the error signal matrix Perform an inverse discrete Fourier transform to obtain the noise-reduced output. , where vector The elements in are: ; Update the FDC filter weight matrix .
2. The method for denoising body sound signals based on LMS and FDC according to claim 1, characterized in that: The method for determining whether instrument alarm noise exists at time k is as follows: Environmental noise signal of the secondary channel Bandpass filtering is performed, and the cutoff frequencies of the bandpass filter are respectively... and And denote the signal after bandpass filtering as ;like and Where L is the instrument alarm sound template. The length of the signal is given by mod, where mod is the modulo operation. With preset instrument alarm sound template Normalized cross-correlation coefficient : ; like Then set the instrument alarm flag. This indicates the presence of instrument alarm noise; otherwise, set the instrument alarm flag. This indicates that there is no instrument alarm noise.
3. The method for denoising body sound signals based on LMS and FDC according to claim 1, characterized in that: The FDC adaptive filtering algorithm with L0 norm constraints uses the FDC filter weight matrix. Updated to The updated formula is: ; in, This is the step size of the FDC filter; These are the sparsity adjustment parameters for the FDC filter.
4. The body sound signal noise reduction method based on LMS and FDC according to claim 1, characterized in that: When the instrument alarm sign S A When there is no instrument alarm noise, setting the LMS filter to use for noise reduction means: Calculate the main channel noise estimate : ; Among them, LMS filter weights ; ; Calculate the error signal as the noise reduction output. : ; Update LMS filter weights .
5. The body sound signal noise reduction method based on LMS and FDC according to claim 4, characterized in that: The LMS filter weights are adjusted using a robust normalized least mean square adaptive filtering algorithm. Updated to ; elements The updated formula is: ; in, ; M is the order of the LMS filter; This is the step size of the LMS filter.
6. The body sound signal noise reduction method based on LMS and FDC according to claim 1, characterized in that: Acquiring noisy signals from the main channel and secondary channel ambient noise signal Previously, it also included an initialization step: Set instrument alarm flag S A =0; Nyquist frequency Divided into Each frequency band, namely , , , ,in, ; Main channel noisy signal and secondary channel ambient noise signal The sampling frequency; Set the current time number LMS filter weights Each element , Where M is the order of the LMS filter; FDC filter weight matrix ;in, Dimensions .
7. A readable storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, causes the processor to perform the body sound signal noise reduction method based on LMS and FDC as described in any one of claims 1-6.
8. A computer device comprising a processor and a memory for storing a processor-executable program, characterized in that, When the processor executes the program stored in the memory, it implements the body sound signal noise reduction method based on LMS and FDC as described in any one of claims 1-6.