WO2023077252A1 - Fxlms structure-based active noise reduction system, method, and device - Google Patents
Fxlms structure-based active noise reduction system, method, and device Download PDFInfo
- Publication number
- WO2023077252A1 WO2023077252A1 PCT/CN2021/128037 CN2021128037W WO2023077252A1 WO 2023077252 A1 WO2023077252 A1 WO 2023077252A1 CN 2021128037 W CN2021128037 W CN 2021128037W WO 2023077252 A1 WO2023077252 A1 WO 2023077252A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- signal
- filter
- adaptive filter
- secondary path
- noise reduction
- Prior art date
Links
- 230000009467 reduction Effects 0.000 title claims abstract description 153
- 238000000034 method Methods 0.000 title claims abstract description 88
- 230000003044 adaptive effect Effects 0.000 claims abstract description 193
- 238000005070 sampling Methods 0.000 claims description 55
- 238000004422 calculation algorithm Methods 0.000 claims description 20
- 230000006870 function Effects 0.000 claims description 20
- 238000004364 calculation method Methods 0.000 claims description 17
- 238000004590 computer program Methods 0.000 claims description 3
- 230000008569 process Effects 0.000 abstract description 11
- 238000010586 diagram Methods 0.000 description 36
- 238000000354 decomposition reaction Methods 0.000 description 19
- 239000003016 pheromone Substances 0.000 description 11
- 238000012545 processing Methods 0.000 description 11
- 230000015572 biosynthetic process Effects 0.000 description 9
- 230000000694 effects Effects 0.000 description 9
- 238000003786 synthesis reaction Methods 0.000 description 9
- 241000257303 Hymenoptera Species 0.000 description 7
- 230000005236 sound signal Effects 0.000 description 7
- 108010076504 Protein Sorting Signals Proteins 0.000 description 5
- 238000006243 chemical reaction Methods 0.000 description 4
- 238000001914 filtration Methods 0.000 description 4
- 238000005457 optimization Methods 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 238000013459 approach Methods 0.000 description 2
- 238000013528 artificial neural network Methods 0.000 description 2
- 210000000988 bone and bone Anatomy 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000014759 maintenance of location Effects 0.000 description 2
- 230000037361 pathway Effects 0.000 description 2
- 238000001228 spectrum Methods 0.000 description 2
- 230000002087 whitening effect Effects 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 238000013398 bayesian method Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 230000000052 comparative effect Effects 0.000 description 1
- 239000012141 concentrate Substances 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000008030 elimination Effects 0.000 description 1
- 238000003379 elimination reaction Methods 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 238000012067 mathematical method Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000008054 signal transmission Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 238000012549 training Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10K—SOUND-PRODUCING DEVICES; METHODS OR DEVICES FOR PROTECTING AGAINST, OR FOR DAMPING, NOISE OR OTHER ACOUSTIC WAVES IN GENERAL; ACOUSTICS NOT OTHERWISE PROVIDED FOR
- G10K11/00—Methods or devices for transmitting, conducting or directing sound in general; Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
- G10K11/16—Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
- G10K11/175—Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound
- G10K11/178—Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound by electro-acoustically regenerating the original acoustic waves in anti-phase
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R1/00—Details of transducers, loudspeakers or microphones
- H04R1/10—Earpieces; Attachments therefor ; Earphones; Monophonic headphones
Definitions
- the present application relates to the field of audio processing, and in particular to an active noise reduction system, method and device based on an FxLMS structure.
- noise reduction systems also called noise reduction devices
- noise reduction devices are mainly divided into three types according to different working positions: noise reduction at the sound source, noise reduction during transmission, and noise reduction at the human ear.
- active noise cancellation technology, which eliminates the noise in the environment by generating a signal opposite to the noise near the human ear.
- the principle is to generate reverse sound waves equal to the external noise through the noise reduction system to neutralize the noise, thereby achieving noise reduction.
- active noise reduction equipment such as noise reduction headphones
- D ⁇ A digital-to-analog conversion
- a ⁇ D analog-to-digital conversion
- filter circuits speakers, microphones and other electronic equipment and speakers
- the combination of physical channels such as the actual pipes between the microphones and the microphones is called the secondary channel.
- a typical noise reduction system adopts the structure of X-filtered least mean square error (filtered-X least mean square, FxLMS) algorithm (which can be referred to as FxLMS structure or FxLMS algorithm).
- FxLMS filtered-X least mean square
- the FxLMS structure includes the primary path adaptive filter W(z), the secondary path adaptive filter (for simulating the secondary path), and the connection/computation relationship between the two has been determined, as shown in the block diagram in Figure 1, where the meanings of the symbols are x(n): noise signal; P(z): primary path, also called primary path; d(n): primary noise signal of error microphone; S(z): secondary path, also called secondary path; y(n): primary The output signal of the channel adaptive filter W(z); y'(n): the secondary noise signal through the secondary channel; x'(n): the noise signal generated by the estimated secondary channel, which can also be called Estimated signal; e(n): error signal of the system.
- the existing FxLMS structure first uses white noise to model the secondary path offline, and then directly uses the modeled secondary path coefficients (ie, the filter coefficients of the secondary path adaptive filter) to remove music and other processing. , and then perform adaptive LMS adjustment for noise reduction on the primary channel.
- the secondary channel is not fixed, but will change according to the wearer's wearing method and wearing time, and offline design in advance will affect the noise reduction effect.
- the FxLMS structure is not effective for high-frequency noise reduction, because the high-frequency audio signal propagates faster, and the filter processing time is too long compared to the propagation time, so that it is impossible to play the reverse sound wave that can offset the external noise. Therefore, for High-frequency noise cancellation is poor.
- the embodiment of the present application provides an active noise reduction system, method and device based on the FxLMS structure.
- the noise reduction system adds a sub-band filter bank on the basis of the existing FxLMS structure, so that the active noise reduction device (such as , noise-canceling earphones) in the process of playing the target sound (such as music signal), the sub-band filter bank is used to whiten the target sound to eliminate its correlation (this is because the correlation of the music signal is strong, and the eigenvalue close to zero, the step size needs to be set smaller, which seriously affects the convergence speed of the adaptive filter) to obtain the filter coefficients of the real-time secondary path adaptive filter, compared with the off-line method of using white noise for secondary path modeling , directly using the target playback sound to model in real time on-line improves user comfort, is more practical, and can be adjusted dynamically in real time.
- the embodiment of the present application first provides an active noise reduction system based on the FxLMS structure, which can be used in the field of active noise reduction.
- the system includes: primary path adaptive filter W(z), secondary path adaptive filter device and a subband filter bank, wherein the subband filter bank includes M bandpass filters, and different bandpass filters have different passbands, which can be called G 0 (z), G 1 (z), G 1 (z), ..., G M-1 (z), M ⁇ 1.
- the primary path adaptive filter W(z) is used to simulate the primary path, wherein the primary path represents the transmission of the external ambient sound (which may be called the first signal) at the reference microphone of the active noise reduction device to the active noise reduction
- the physical path through which the loudspeaker of the device passes, so this primary path can also be called the air path
- the secondary path adaptive filter Used to simulate the secondary path, where the secondary path represents the circuit path through which the second signal is transmitted to the loudspeaker, and the second signal is the output signal of the primary path adaptive filter W(z) and the target playback sound (such as a headphone Played music) calculated signal, for example, the operation can be the output signal of the primary path adaptive filter W(z) and the target playback sound
- the subband filter bank is used to adjust the sub-band based on the target playback sound stage path adaptive filter filter coefficients.
- the noise reduction system provided by the embodiment of the present application is based on the existing FxLMS structure, and a sub-band filter bank is added, so that the target sound can be played on the active noise reduction device (such as noise reduction headphones) (e.g., music signal), use the sub-band filter bank to whitenize the target playing sound to obtain the filter coefficients of the real-time secondary path adaptive filter, compared with using white noise for the secondary path
- the active noise reduction device such as noise reduction headphones
- the offline mode of modeling directly uses the target playback sound to model online in real time, which improves user comfort, is more practical, and can be adjusted dynamically in real time.
- the active noise reduction system may further include a sampling module, which can perform up-sampling or down-sampling on the signal, specifically, it can be used to: (1) filter the sub-band The output signal of each band-pass filter in the filter group is down-sampled to obtain a down-sampled signal. Assuming that there are M band-pass filters, a total of M down-sampled signals are obtained, and the obtained M down-sampled signals are used as secondary channel adaptive filter input signal. (2) Adaptive filter for the secondary path The output signal is up-sampled to obtain an up-sampled signal. One up-sampled signal corresponds to one down-sampled signal. Assuming that there are M band-pass filters, there are M down-sampled signals and M up-sampled signals.
- a sampling module which can perform up-sampling or down-sampling on the signal, specifically, it can be used to: (1) filter the sub-band The output signal of each band-pass filter in the filter group is down-sampled
- the active noise reduction system provided in the embodiment of the present application further includes a sampling module for down-sampling and/or up-sampling.
- a sampling module for down-sampling and/or up-sampling.
- the purpose of upsampling is the opposite operation to downsampling, in order to restore the broadened frequency band to facilitate subsequent calculations.
- the input signals of the sub-band filter bank may include the following types: the target playing sound, the up-sampling signal output by the sampling module, and the system error signal.
- the input signals of the sub-band filter bank can be different input signals, that is, different signals can share the same sub-band filter bank, which is flexible, and Saves hardware cost.
- the sampling module when the input signal of the sub-band filter bank is the target playing sound, the sampling module is specifically configured to:
- the signal (which may be referred to as the first output signal) is down-sampled, for example, m times of down-sampling is performed to obtain a down-sampled signal (which may be referred to as the first down-sampled signal), wherein one first output signal corresponds to one first Downsampling signal, assuming that the sub-band filter bank includes M bandpass filters, namely G 0 (z), G 1 (z), ..., G M-1 (z), then there are M band-pass filters in total An output signal and M first downsampling signals.
- the obtained M first downsampled signals are used as the secondary path adaptive filter
- the output signal obtained based on the input signal may be referred to as a second output signal, and M second output signals can be obtained accordingly, and the second output signal is used to adjust the error signal of the entire system.
- the sampling module is specifically configured to: filter each bandpass in the subband filter bank
- the signal (may be referred to as the third output signal) output by the device is down-sampled, for example, m times of down-sampling is performed to obtain a down-sampled signal (may be referred to as the second down-sampled signal), wherein one third output signal corresponds to one
- the second down-sampling signal, the obtained M second down-sampling signals are used as the secondary path adaptive filter
- the output signal obtained based on the input signal can be called the fourth output signal, and M fourth output signals can be obtained accordingly, and the fourth output signal is used to adjust the secondary path adaptive filter
- the filter coefficients of that is, the coefficients used to estimate the secondary path.
- the function of the output signal of the subband filter bank that is, for estimating the secondary channel coefficient, is specifically explained. It is achievable.
- the error signal of the whole system is based on each band in the sub-band filter bank
- the signal output by the pass filter (which may be referred to as the fifth output signal) and the third signal are calculated, wherein the third signal is a combination of the first signal (i.e. external noise) and the second signal (i.e. target playback sound and primary
- the output signal of the channel adaptive filter W(z) after calculation) is a signal obtained by calculation.
- the error signal of the system is not only related to the external noise, but also related to the real-time playing target sound. Online modeling improves user comfort.
- the adjustment method of the filter coefficients of each band-pass filter in the sub-band filter bank may be an ant colony algorithm, or a gradient update method. No limit.
- the embodiment of the present application also provides an active noise reduction method based on the FxLMS structure, which is applied to an active noise reduction device.
- the method may include: first, the active noise reduction device obtains a first signal through a primary path, and the first The signal is used to represent the ambient sound at the reference microphone of the active noise reduction device, and the primary path represents a physical path through which the first signal is transmitted to the speaker of the active noise reduction device, which may also be called an air path.
- the active noise reduction device also needs to obtain the estimated signal corresponding to the first signal through the secondary path adaptive filter, that is, in this case, the first signal is used as the input signal of the secondary path adaptive filter, and the estimated signal As the output signal of the secondary path adaptive filter, the secondary path adaptive filter is used to simulate the secondary path, and the filter coefficients of the secondary path adaptive filter (ie, the secondary path coefficients) are determined by the The band filter bank is adjusted based on the target playing sound (eg, playing music signal).
- the target playing sound eg, playing music signal
- the active noise reduction device After the active noise reduction device obtains the first signal and the estimated signal, it will further obtain the second signal through the secondary path, wherein the secondary path represents the circuit path through which the second signal is transmitted to the speaker of the active noise reduction device, and the second The signal is the output signal of the primary path adaptive filter and the signal after the operation of the target playback sound.
- the primary path adaptive filter is used to simulate the primary path, and the feedback signal of the primary path adaptive filter is obtained from the error signal and the estimated signal.
- the active noise reduction device After obtaining the first signal and the second signal, the active noise reduction device performs calculations on the first signal and the second signal to obtain a third signal, and finally, the third signal is played through a speaker of the active noise reduction device.
- the process of the active noise reduction method based on the FxLMS structure is described in detail.
- the method uses a sub-band filter bank to play the target Sound white noise, eliminating its correlation to obtain real-time filter coefficients of the secondary channel adaptive filter, compared with the offline method of using white noise for secondary channel modeling, directly using the target playback sound to improve real-time online modeling It improves user comfort, is more practical, and can be adjusted dynamically in real time.
- the subband filter bank includes M bandpass filters, M ⁇ 1, and the method may further include: for each bandpass filter in the subband filter bank The output signal is down-sampled to obtain a down-sampled signal. Assuming that there are M band-pass filters, a total of M down-sampled signals are obtained, and the obtained M down-sampled signals are used as the input signal of the secondary channel adaptive filter. And/or, upsampling the output signal of the secondary path adaptive filter to obtain an upsampling signal, one upsampling signal corresponds to one downsampling signal, assuming that there are M bandpass filters, there are also M downsampling signal and M upsampled signals.
- the input signals of the subband filter bank may include the following types: the target playing sound, the up-sampling signal output by the sampling module, and the system error signal.
- the input signals of the sub-band filter bank can be different input signals, that is, different signals can share the same sub-band filter bank, which is flexible, and Saves hardware cost.
- the output signal of each bandpass filter in the sub-band filter bank is down-sampled is specifically: downsampling the signal output by each bandpass filter in the subband filter bank (which may be referred to as the first output signal), for example, performing m times downsampling to obtain the downsampling signal (may be referred to as the first down-sampling signal), wherein one first output signal corresponds to one first down-sampling signal, assuming that the sub-band filter bank includes M band-pass filters, respectively G 0 (z), G 1 (z), . . .
- M first output signals there are M first output signals and M first downsampling signals in total.
- the obtained M first downsampled signals are used as input signals of the secondary path adaptive filter, and the output signal obtained by the secondary path adaptive filter based on the input signals may be It is called the second output signal, and M second output signals can be obtained accordingly, and the second output signals are used to adjust the error signal of the entire system.
- the output signal of each bandpass filter in the subband filter bank is Downsampling to obtain the downsampling signal is specifically: downsampling the signal (which may be referred to as the third output signal) output by each bandpass filter in the subband filter bank, for example, performing m times downsampling to obtain the downsampling
- the sampling signal (may be referred to as the second downsampling signal), wherein one third output signal corresponds to one second downsampling signal, and the obtained M second downsampling signals are used as the input signal of the secondary path adaptive filter
- the output signal obtained by the secondary path adaptive filter based on the input signal can be called the fourth output signal, and M fourth output signals can be obtained accordingly, and the fourth output signal is used to adjust the secondary path adaptive filter
- the filter coefficients of the filter that is, the coefficients used to estimate the secondary path.
- the function of the output signal of the subband filter bank that is, for estimating the secondary channel coefficient, is specifically explained. It is achievable.
- the error signal of the whole system is based on each band in the sub-band filter bank
- the signal output by the pass filter (which may be referred to as the fifth output signal) and the third signal are calculated, wherein the third signal is a combination of the first signal (i.e. external noise) and the second signal (i.e. target playback sound and primary The signal obtained by calculating the output signal of the channel adaptive filter).
- the error signal of the system is not only related to the external noise, but also related to the real-time playing target sound. Online modeling improves user comfort.
- the adjustment method of the filter coefficients of each bandpass filter in the subband filter bank may be an ant colony algorithm, or a gradient update method. No limit.
- a third aspect of the embodiments of the present application provides an active noise reduction device, and the device has a function of implementing the method of the second aspect or any possible implementation manner of the second aspect.
- This function may be implemented by hardware, or may be implemented by executing corresponding software on the hardware.
- the hardware or software includes one or more modules corresponding to the above functions.
- the fourth aspect of the embodiment of the present application provides an active noise reduction device, which may include a memory, a processor, and a bus system, wherein the memory is used to store programs, and the processor is used to call the programs stored in the memory to execute the first embodiment of the present application.
- the second aspect or any one of the possible implementation methods of the second aspect.
- the fifth aspect of the embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium stores instructions, and when it is run on a computer, the computer can execute any one of the above-mentioned second aspect or the second aspect. method of possible implementation.
- the sixth aspect of the embodiments of the present application provides a computer program, which, when running on a computer, causes the computer to execute the method of the above-mentioned second aspect or any possible implementation manner of the second aspect.
- the seventh aspect of the embodiment of the present application provides a chip, the chip includes at least one processor and at least one interface circuit, the interface circuit is coupled to the processor, and the at least one interface circuit is used to perform the function of sending and receiving, and send instructions to At least one processor, at least one processor is used to run computer programs or instructions, which has the function of realizing the method of the second aspect or any possible implementation mode of the second aspect above, and this function can be realized by hardware or by software Realization can also be achieved through a combination of hardware and software, where the hardware or software includes one or more modules corresponding to the above functions.
- the interface circuit is used to communicate with other modules outside the chip.
- Fig. 1 is a schematic diagram of the block diagram of the current mainstream FxLMS structure
- FIG. 2 is a schematic diagram of the architecture of the active noise reduction device provided by the embodiment of the present application.
- FIG. 3 is a schematic diagram of an active noise reduction device that can deploy an active noise reduction system based on the FxLMS structure provided by the embodiment of the present application;
- FIG. 4 is another schematic diagram of an active noise reduction device that can deploy an active noise reduction system based on the FxLMS structure provided by the embodiment of the present application;
- FIG. 5 is a schematic block diagram of an active noise reduction device provided by an embodiment of the present application.
- FIG. 6 is a schematic diagram of an active noise reduction system based on the FxLMS structure provided by the embodiment of the present application.
- FIG. 7 is a schematic diagram of the primary channel adaptive filter W(z) provided by the embodiment of the present application.
- FIG. 8 is a schematic diagram of the principle of an adaptive filter for estimating primary channel coefficients provided by an embodiment of the present application.
- Figure 9 shows the existing secondary path adaptive filter A block diagram of
- Figure 10 is the secondary path adaptive filter provided by the embodiment of the present application A structure diagram of
- FIG. 11 is a schematic diagram of a subband filter bank adjustment method provided in an embodiment of the present application.
- Fig. 12 is a schematic flow chart of the ant colony algorithm provided by the embodiment of the present application.
- FIG. 13 is a schematic flowchart of an active noise reduction method based on the FxLMS structure provided by the embodiment of the present application.
- FIG. 14 is a comparison diagram of a noise reduction result between the active noise reduction method provided by the embodiment of the present application and the traditional FxLMS method;
- Fig. 15 is a schematic diagram of the original signal adjusted and optimized by the ant colony algorithm
- Fig. 16 is a schematic diagram of a signal obtained after subband decomposition and synthesis without an adjustment filter
- Fig. 17 is a schematic diagram of a signal obtained after filter subband decomposition and synthesis
- FIG. 18 is a schematic diagram of a computer-readable storage medium provided by an embodiment of the present application.
- FIG. 19 is a schematic structural diagram of an active noise reduction system based on an FxLMS structure provided by an embodiment of the present application.
- the embodiment of the present application provides an active noise reduction system, method and device based on the FxLMS structure.
- the noise reduction system adds a sub-band filter bank on the basis of the existing FxLMS structure, so that the active noise reduction device (such as , noise-canceling earphones) in the process of playing the target sound (such as music signal), the sub-band filter bank is used to whiten the target sound to eliminate its correlation (this is because the correlation of the music signal is strong, and the eigenvalue close to zero, the step size needs to be set smaller, which seriously affects the convergence speed of the adaptive filter) to obtain the filter coefficients of the real-time secondary path adaptive filter, compared with the off-line method of using white noise for secondary path modeling , directly using the target playback sound to model in real time on-line improves user comfort, is more practical, and can be adjusted dynamically in real time.
- the embodiment of the present application involves a lot of relevant knowledge about filters, noise reduction, etc.
- the following first introduces related terms and concepts that may be involved in the embodiment of the present application. It should be understood that the interpretation of related concepts may be limited due to the specific conditions of the embodiment of the application, but it does not mean that the application is limited to the specific conditions, and there may be differences in the specific conditions of different embodiments. Specifically, there is no limitation here.
- An adaptive filter refers to a filter that uses an adaptive algorithm to change the parameters and structure of the filter according to changes in the environment.
- the structure of the adaptive filter is not changed.
- the coefficients of the adaptive filter are time-varying coefficients updated by the adaptive algorithm. That is, its coefficients are automatically and continuously adapted to a given signal to obtain the desired response.
- the most important feature of an adaptive filter is its ability to work effectively in unknown environments and to track the time-varying characteristics of the input signal.
- Adaptive filters can be either continuous or discrete.
- the discrete domain adaptive filter is composed of a group of tapped delay lines, variable weight coefficients and mechanisms for automatically adjusting coefficients.
- the adaptive filter updates and adjusts the weighting coefficients according to a specific algorithm, so that the average value of the output signal sequence y(n) compared with the expected output signal sequence d(n)
- the square error is the minimum, that is, the output signal sequence y(n) is close to the expected signal sequence d(n).
- Adaptive filters can be applied to automatic equalization, echo cancellation, antenna array beamforming in the communication field, and parameter identification, noise elimination, and spectrum estimation of signal processing in other related fields. For different applications, only the added input signal and the expected signal are different, but the basic principle is the same.
- a filter bank is a set of filters that share a common input signal or have a common output signal. For example, assuming that the filter bank is a filter bank with a common input signal s(n), then after s(n) passes through this set of filters (assuming that there are M filters), the obtained y 0 (n) , y 1 (n), . . . , y M-1 (n) are sub-band signals, and their frequency spectrums are ideally non-overlapping.
- an analysis filter bank With a common input signal, the one that obtains M subband signals is called an analysis filter bank (assuming it includes M filters).
- microphone refers to a device for collecting sound and converting it into a corresponding electrical signal.
- Speaker means a device used to convert electrical signals into sound based on audio data.
- environment sound herein refers to the sound existing in the external environment where the active noise reduction device is located and collected by the active noise reduction device, which may be a combination of one or more sounds, such as speech, music, noise, etc. .
- FIG. 2 is a schematic diagram of the architecture of the active noise reduction device provided by the embodiment of the present application.
- a microphone referred to as a reference microphone
- an error microphone referred to as an error microphone
- a speaker referred to as a speaker
- an active noise reduction system that is, the ANC described in Figure 2, which is the active noise reduction system based on the FxLMS structure provided by the embodiment of the present application ), where the reference microphone is installed close to the sound source, and the error microphone is installed close to the human ear.
- FIG. 3 shows a schematic diagram of an active noise reduction device 10 that can deploy the active noise reduction system based on the FxLMS structure provided by the embodiment of the present application.
- the active noise reduction device 10 may be, for example, an audio playback device that is in contact with the ear, such as a true wireless stereo (true wireless stereo, TWS) earphone.
- the active noise reduction device 10 may include a pair of earphones, and the two earphones 11 and 12 are configured substantially identically to each other. Therefore, only one earphone 11 is schematically described.
- the earphone 11 includes an external reference microphone 13, a processor 17 inside the earphone 11, a first ear-in or ear-contacting part inside the earphone 11 (relative to the external reference microphone 13 exposed to the environment). Loudspeaker 15 and residual microphone 14.
- the reference microphone 13 is configured to detect or collect sounds of the external environment.
- the two earphones 11 and 12 may only have one processor 17, and wireless signals are transmitted through wireless transmission methods such as Bluetooth signal transmission to realize the pairing of the two earphones 11 and 12 to a single processor. 17 shares.
- the two earphones 11 and 12 can also share a single reference microphone 13 .
- the external reference microphone 13 of the active noise reduction device 10 collects ambient sound, and performs acoustic-electric conversion to generate a continuous electrical signal and transmits it to the processor 17 .
- the processor 17 predicts or estimates the ambient sound at a subsequent time based on the received signal, and generates an inverse signal representing the ambient sound at the subsequent time and transmits it to the first speaker 15 .
- inverted signal refers to a signal that is manipulated after inverting the audio signal, eg by directly inverting the sign of the audio sample point or by further processing.
- a signal that is not inverted may be referred to as a "normal phase signal".
- the out-of-phase signal played by the speaker is used to cancel the direct sound (in-phase sound) directly inside the active noise reduction device 10 to a certain extent, so as to reduce the sound perceived by the ear.
- the first loudspeaker 15 plays the anti-phase sound based on the received anti-phase signal, so as to offset the direct ambient sound directly from the environment to the ANC device 10 at a subsequent moment, so as to achieve the effect of noise reduction.
- FIG. 3 a schematic configuration of the active noise reduction device 10 is shown in FIG. 3 as a TWS earphone, it is understood that the scope of the present disclosure is not limited thereto.
- FIG. 4 another possible configuration of an active noise reduction device is illustrated in FIG. 4 as a headset, namely around-ear headphones.
- the active noise reduction device 20 may include a pair of ear cup parts, and the two ear cup parts are configured substantially identically to each other. Therefore, only one cap part is schematically depicted.
- the earmuff part includes an external first microphone 13, a second microphone 19 and a processor 17 inside the earmuff part.
- the ear cup portion also includes a first residual microphone 14, a second residual microphone 16, a first loudspeaker 15 and a second residual microphone 14 located inside the ear cup portion (relative to the first microphone 13 and the second microphone 19 exposed to the environment).
- Two loudspeakers 18 Both the first microphone 13 and the second microphone 19 are configured to detect or collect the sound of the external environment, and the first microphone 13 and the second microphone 19 may operate simultaneously or alternately and may collect the same or different sounds.
- the first microphone 13 may have an internal first filter to only collect the sound of the first frequency
- the second microphone 19 may have an internal second filter to only collect the sound of the second frequency.
- the first frequency is a low frequency and the second frequency is a mid to high frequency.
- the external first microphone 13 and second microphone 19 of the active noise reduction device 20 collect ambient sound, and perform acoustic-electric conversion to generate a continuous electrical signal and transmit it to the processor 17 .
- the processor 17 predicts or estimates the ambient sound at a subsequent time based on the received signal, and generates an inverse signal representing the ambient sound at a subsequent time and transmits it to the built-in first speaker 15 and second speaker 18 .
- the first speaker 15 and the second speaker 18 play the anti-phase sound based on the received anti-phase signal to offset the direct ambient sound from the environment directly to the active noise reduction device 20 at a subsequent moment, so as to achieve the effect of noise reduction.
- the active noise reduction device can also be other types of active noise reduction devices that transmit audio through bone conduction.
- the application does not give an example.
- FIG. 5 also shows a schematic block diagram of the active noise reduction device provided by the present application.
- the active noise reduction device 100 shown in FIG. 5 is only exemplary, for example, to illustrate a possible implementation of the active noise reduction device 10 in FIG.
- a possible implementation of the noise reduction device 20 should not constitute any limitation on the functions and scope of the implementation described in this application.
- the active noise reduction device 100 may include a processor 110, a wireless communication module 160, an antenna 1, an audio module 170, a speaker module 170A, a microphone module 170C, buttons 190, An internal memory 121 , a universal serial bus (universal serial bus, USB) interface 130 , a charging management module 140 , and a power management module 141 .
- USB universal serial bus
- the processor 110 may be, for example, the processor 17 in FIG. 3 , and may include one or more processing units.
- the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor ( graphics processing unit (GPU), image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor and/or neural network processor ( neural-network processing unit, NPU), etc.
- the different processing units may be separate devices.
- different processing units can also be integrated in one or more processors.
- the controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
- a memory may also be provided in the processor 110 for storing instructions and data.
- the internal memory 121 may be used to store computer-executable program codes including instructions.
- the internal memory 121 may include an area for storing programs and an area for storing data.
- the processor 110 executes various functional applications and data processing of the active noise reduction device 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
- the active noise reduction device 100 may implement audio functions through the audio module 170 , the speaker module 170A, the microphone module 170C, an application processor, and the like. Such as music playback, recording, etc.
- the audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal.
- the audio module 170 may also be used to encode and decode audio signals.
- the audio module 170 may be set in the processor 110 , or some functional modules of the audio module 170 may be set in the processor 110 .
- the speaker module 170A also referred to as a "horn", is used to convert audio electrical signals into sound signals.
- the active noise reduction device 100 can listen to music through the speaker module 170A, or listen to a hands-free call.
- the microphone module 170C is also called “microphone” or “microphone”. When making a call or sending a voice message, the user can approach the microphone module 170C to make a sound through the mouth, and input the sound signal to the microphone module 170C.
- the active noise reduction device 100 may further include an antenna 2 and a mobile communication module 150 .
- the active noise reduction device 100 may also include an external memory interface 120, a battery 142, a receiver 170B, an earphone interface 170D, a sensor module 180, a motor 191, an indicator 192, and a camera 193, which are shown in dotted lines and dotted lines. , a display screen 194, and one or more of a subscriber identification module (subscriber identification module, SIM) card interface 195.
- SIM subscriber identification module
- the sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor One or more of 180L and bone conduction sensor 180M.
- the sensor module 180 may also include other types of sensors not listed.
- the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the active noise reduction device 100 .
- the active noise reduction device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange different components.
- the illustrated components can be realized in hardware, software or a combination of software and hardware.
- a schematic diagram of the active noise reduction system of which is applied to active noise reduction equipment, and may specifically include: primary path adaptive filter W(z)601, secondary path adaptive filter 602 and a subband filter bank 603, wherein the subband filter bank 603 includes M bandpass filters, and different bandpass filters have different passbands, which can be called G 0 (z), G 1 ( z), ..., G M-1 (z), M ⁇ 1.
- the primary path adaptive filter W(z) 601 is used to simulate the primary path, where the primary path represents the external ambient sound (which may be called the first signal) at the reference microphone of the active noise reduction device is transmitted to the active noise reduction device.
- the physical path passed by the loudspeaker of the noisy device, so the primary path can also be called the air path;
- the secondary path adaptive filter 602 used to simulate the secondary path, wherein the secondary path represents the circuit path through which the second signal is transmitted to the speaker, and the second signal is the output signal of the primary path adaptive filter W(z) 601 and the target playback sound
- the calculated signal of the music played by the earphones for example, the calculation can be the addition of the output signal of the primary path adaptive filter W(z) 601 and the target playback sound;
- the subband filter bank 603 is used to Target Playback Sound Adjustment Secondary Path Adaptive Filter 602 filter coefficients.
- the active noise reduction system may further include a sampling module 604, and the sampling module 604 may perform up-sampling or down-sampling on the signal, specifically, it may be used for:
- the output signal of each band-pass filter in the sub-band filter bank 603 is down-sampled to obtain a down-sampled signal. Assuming that there are M band-pass filters, M down-sampled signals are obtained in total, and the obtained M down-sampled signals The signal is then used as a secondary path adaptive filter 602 input signal.
- Adaptive filter for secondary path The output signal of 602 is up-sampled to obtain an up-sampled signal.
- One up-sampled signal corresponds to one down-sampled signal. Assuming that there are M band-pass filters, there are M down-sampled signals and M up-sampled signals.
- the primary path adaptive filter W(z) and the secondary path adaptive filter included in the active noise reduction system are as follows:
- the subband filter bank is described in detail:
- FIG. 7 is a schematic diagram of the primary path adaptive filter W(z) provided by the embodiment of the present application.
- the primary path adaptive filter W(z) can be a FIR filter (other filtering
- the device can also be used, this application is not limited to this, it is only shown here), the role is to characterize the estimated real primary path P(z) (including the passive noise reduction material of the active noise reduction device and the connection between the earmuffs and the speaker The air passage between them) for subsequent noise reduction steps, the order can be set to 128 (other orders are also possible, this application does not limit this, here is only for illustration), assuming the actual primary passage order At about tens of orders, the filter order that is redundantly set during estimation will approach 0 after operation.
- the primary path adaptive filter W(z) is an adaptive filter based on the LMS algorithm, and the LMS adaptive filter
- the schematic diagram of the circuit breaker is shown in Figure 7, x(n) is the input signal (that is, the first signal mentioned above, that is, external noise), and y(n) is the output result of the primary path adaptive filter W(z) , used for subsequent noise reduction operations, d(n) is the output signal of the real primary channel, that is, the signal to be denoised, and e(n) is the error signal, used to adjust the filter coefficients, that is, the primary channel from
- the filter coefficients of the adaptive filter W(z) can be updated according to the following formula (1), and repeated iterations make the final error signal e(n) as small as possible.
- w(n) is the filter coefficient of the primary channel adaptive filter W(z) of the nth round
- w(n+1) is the filter coefficient of the primary channel adaptive filter W(z) of the n+1th round Filter coefficient
- ⁇ is the step size coefficient.
- secondary path adaptive filter for the nth round s(n) is the coefficient of the actual secondary path (i.e. electrical path)
- w(n) is the filter coefficient of the nth round primary path adaptive filter W(z)
- w(n +1) is the filter coefficient of the primary path adaptive filter W(z) of the n+1th round
- ⁇ is the step size coefficient.
- y(n) is the output signal of the adaptive filter W(z) in the primary channel
- d(n) is the signal to be de-noised obtained by passing the external noise through the primary channel
- S(z) is the secondary channel (i.e. path)
- e 1 (n) is the residual error signal received by the loudspeaker
- e 2 (n) the overall filter coefficient adjustment signal (ie error signal)
- ⁇ is the step factor
- Secondary path adaptive filter for round n+1 The filter coefficients of s(n) are the coefficients of the actual secondary path (ie, the electrical path).
- the basic framework of the FxLMS structure is used to construct the active noise reduction system, before the input signal passes through the main filter (that is, the primary path adaptive filter W(z)), it must first pass through the moved secondary path adaptive filter Since the main filter and the secondary path adaptive filter The adjustment process will affect each other, which will greatly affect the accuracy of the adjustment.
- both the secondary pathway and the primary pathway exist objectively, and both require adaptive estimation.
- the current general practice is to set the secondary path adaptive filter
- the filter coefficients i.e., the secondary channel coefficients
- the main filter is adjusted, or a period of white noise is passed through the system to obtain the secondary channel coefficients, and then the secondary channel coefficients are kept fixed, or when When the stage path changes, a section of white noise is passed into the system to model again.
- the constant setting will affect the active noise reduction effect, so online modeling is required.
- the best modeling signal is white noise, because when modeling as a full-band signal, the applicability of the secondary path to signals of all frequencies that are allowed to pass can be fully considered sex.
- the actually used modeling signal is the music signal played by the user.
- music signals are characterized by rich harmonics, high energy at harmonics, and low energy at non-harmonics, and the adjustment principle of the adaptive filter is that the selection of the step size during adjustment is related to the characteristic value of the input signal.
- the update of the filter coefficients of the two adaptive filters is adjusted by using the error signal, and due to the reverse in-phase sound wave cancellation of the speaker playback and external noise, when the cancellation effect is good
- the residual noise obtained by referring to the microphone is the error used to update the filter coefficients, and the overall principle of the system is to reduce the error signal by adjusting the adaptive filter coefficients.
- the secondary path adaptive filter The update formula of is shown in the following formula (4):
- e(n) is the error signal
- x(ni) is the input music signal
- the expected gradient is simplified, and the adaptive filter update function can be obtained
- the music signal and the error signal in practical applications are not completely irrelevant, so using the simplified update function will cause the filter coefficients of the adaptive filter to be updated inaccurately.
- the active noise reduction system based on the FxLMS structure is not suitable for direct modeling with music signals. Therefore, in the embodiment of this application, the music signal is whitened by sub-band decomposition, and its correlation is eliminated to better
- the secondary path modeling is carried out, so in the embodiment of this application, the secondary path adaptive filter
- Figure 10 is the secondary path adaptive filter provided by the embodiment of the present application and the subband filter bank (G 0 (z), G 1 (z), ..., G M-1 (z)), the structural block diagram between the sampling module, in Fig.
- the subband filter bank ( G 0 (z), G 1 (z), ..., G M-1 (z)) can decompose the input broadband signal into corresponding frequency bands; and in order to achieve white noise, the embodiment of the present application adopts The module down-samples the output signal of each band-pass filter in the sub-band filter bank, that is, to widen the specific frequency band passed by each band-pass filter to achieve white noise.
- the white-noise signal is used for Tuning Secondary Path Adaptive Filters The coefficient; at the same time, the downsampling operation can also reduce the secondary path adaptive filter calculation amount.
- the signals on the respective frequency bands can be considered to be similar to white noise (white noise is not directly used for synchronization, because what the user listens to is the target playback sound, directly playing white noise will cause user experience Not good), and then pass the signals of each frequency band through the same secondary channel adaptive filter in sequence
- the filtered signals of each frequency band are respectively obtained, and then the sampling module performs up-sampling to restore the original sampling rate, and then passes through the same band-pass filter and sums to restore the decomposed frequency bands.
- the result is The target playback sound after the adaptive filtering of the simulated secondary channel coefficients is calculated with e 1 (n) to obtain the error signal e 2 (n) used to adjust the whole system, because it is used to pass through the secondary channel adaptive filter
- the target playback sound is decomposed and downsampled, so the error e 2 (n) used to adjust the filter should also be operated in the same way.
- the input signals of the sub-band filter bank may include the following types: target playback sound, up-sampling signal output by the sampling module, and system error signal.
- target playback sound may include the following types: up-sampling signal output by the sampling module, and system error signal.
- system error signal may include the following types:
- the sampling module is used for: down-sampling the output signal (which may be referred to as the first output signal) of each band-pass filter in the sub-band filter bank Sampling, for example, performing m-fold downsampling to obtain a downsampled signal (which may be referred to as a first downsampled signal), wherein one first output signal corresponds to one first downsampled signal, assuming that the subband filter bank includes a band There are M pass filters, respectively G 0 (z), G 1 (z), ..., G M-1 (z), and there are M first output signals and M first downsampling signals in total.
- the obtained M first downsampled signals are used as the secondary path adaptive filter
- the output signal obtained based on the input signal can be called the second output signal, and M second output signals can be obtained accordingly, and the second output signal is used to adjust the error signal e 2 (n) of the whole system.
- the sampling module is used to: output the signal of each band-pass filter in the sub-band filter bank (which can be referred to as The third output signal) is down-sampled, for example, down-sampled by m times to obtain a down-sampled signal (which may be referred to as a second down-sampled signal), wherein a third output signal corresponds to a second down-sampled signal, and the obtained
- the M second downsampled signals are used as the secondary path adaptive filter
- the output signal obtained based on the input signal can be called the fourth output signal, and M fourth output signals can be obtained accordingly, and the fourth output signal is used to adjust the secondary path adaptive filter
- the filter coefficients of that is, the coefficients used to estimate the secondary path.
- the error signal e 2 (n) of the whole system is based on the signal output by each bandpass filter in the subband filter bank (which can be It is called the fifth output signal) and the third signal to obtain, wherein, the third signal is the first signal (i.e. external noise) and the second signal (i.e. the target playing sound and the primary path adaptive filter W(z ) The output signal of the calculated signal) The signal obtained by performing the calculation.
- the active noise reduction system can simultaneously adjust the filter coefficients of the primary path adaptive filter W(z) and the secondary path adaptive filter.
- directly using the target playback sound modeling to be listened to by the user improves user comfort and is more practical.
- the subband filter bank divides the frequency band to be processed into equal intervals through M bandpass filter banks G 0 (z), G 1 (z), ..., G M-1 (z)
- M the initial value of the filter is a physically realizable filter bank generated by the formula, but the overlapping process between the filter banks is not flat at the junction of the frequency and the frequency by using a mathematical method. That is, there is a loss of energy at the frequency junction. That is, after the target playback sound is decomposed and synthesized by the sub-band filter bank, a certain distortion is generated.
- a certain adjustment of the sub-band filter bank is considered.
- the block diagram of the adjustment method can be shown in Figure 11. Based on the block diagram in Figure 11, the following formula (5) can be used for fine-tuning:
- x(n) is the input of the standard target playing sound (such as music) (at this time, x(n) is different from the external noise signal above), err(n) and out(n) are fine-tuned
- the difference of the target playback sound obtained after the decomposition and synthesis of the band filter bank is used to compare with the err(n) obtained after the decomposition and synthesis of the sub-band filter bank without fine-tuning.
- the comparison method can be based on the following formula (6):
- the basic idea of applying the ant colony algorithm to solve the optimization problem is as follows: the walking path of the ants represents the feasible solution of the problem to be optimized, and all the paths of the entire ant colony constitute the solution space of the problem to be optimized, and the path is relatively short.
- the amount of pheromone released by the ants is more, as time goes on, the concentration of pheromone accumulated on the shorter path gradually increases, and the number of ants who choose this path is also increasing.
- the entire ants will concentrate on the best path under the action of positive feedback, which corresponds to the optimal solution of the problem to be optimized.
- the specific algorithm flow can be shown in Figure 12, where one ant is used to represent a feasible solution, and the information contained in one ant includes the values of various variables.
- First preset the iteration period, and second, determine the number of ants.
- the specific process is as follows: 1 randomly initialize the ant colony according to the existing excellent initial value, and record the optimal solution in the ant colony; 2 enter the ant colony cycle iteration, and divide the initialized ants into two types, as follows:
- x i is the position of ant i
- n is the number of ants
- w is the update step size
- L is the fixed update length
- the other is a non-optimal solution. Random search moves, and there is a certain probability to optimize to the optimal solution. The optimization probability is obtained by calculating the pheromone concentration of the optimal ant and the pheromone concentration of the current ant, which is used to update the pheromone, which can be used.
- the following formula (8) expresses:
- mess best is the pheromone concentration of the optimal solution ant
- mess i is the pheromone concentration of the current ant.
- p is the pheromone decay factor
- f(X) is the cost function
- x i is the position of ant i
- dx is the update length
- mess i is the pheromone concentration of the current ant
- u is the non-optimal solution step coefficient
- x best is the optimal solution obtained in the previous step
- k is the pheromone update coefficient
- a is the update speed.
- the adjustment method of the filter coefficients of each bandpass filter in the subband filter bank can adopt other methods besides the above-mentioned ant colony algorithm,
- the gradient update method which is not limited in this application.
- the whitening of the target playback sound can also be performed by using a whitening filter, or by using statistical
- the Bayesian method performs white noise, which is not limited in this application.
- FIG. 13 is a schematic flowchart of an active noise reduction method based on the FxLMS structure provided by the embodiment of the present application. The method is applied to an active noise reduction device, and may specifically include the following steps:
- the active noise reduction device obtains a first signal through a primary path, the first signal is used to represent the ambient sound at the reference microphone of the active noise reduction device, and the primary path represents the location where the first signal is transmitted to the speaker of the active noise reduction device
- the physical path also known as the air path.
- the active noise reduction device also needs to obtain the estimated signal corresponding to the first signal through the secondary path adaptive filter, that is, in this case, the first signal is used as the input signal of the secondary path adaptive filter, and the estimated signal As the output signal of the secondary path adaptive filter, the secondary path adaptive filter is used to simulate the secondary path, and the filter coefficients of the secondary path adaptive filter (ie, the secondary path coefficients) are determined by the The band filter bank is adjusted based on the target playing sound (eg, playing music signal).
- the target playing sound eg, playing music signal
- step 1301 can be executed first, and then step 1302 can be executed, or step 1302 can be executed first, and then step 1301 can be executed. It is also possible to execute step 1301 and step 1302 at the same time, which is not limited in this application.
- the secondary path indicates the circuit path through which the second signal is transmitted to the speaker
- the second signal is the signal obtained by calculating the output signal of the adaptive filter of the primary path and the target playback sound
- the primary path adaptive filter is used to simulate the primary path
- the feedback signal of the primary path adaptive filter is obtained from the error signal and the estimated signal.
- the active noise reduction device After the active noise reduction device obtains the first signal and the estimated signal, it will further obtain the second signal through the secondary path, wherein the secondary path represents the circuit path through which the second signal is transmitted to the speaker of the active noise reduction device, and the second The signal is the output signal of the primary path adaptive filter and the signal after the operation of the target playback sound.
- the primary path adaptive filter is used to simulate the primary path, and the feedback signal of the primary path adaptive filter is obtained from the error signal and the estimated signal.
- the active noise reduction device After obtaining the first signal and the second signal, the active noise reduction device performs calculations on the first signal and the second signal to obtain a third signal, and finally, the third signal is played through a speaker of the active noise reduction device.
- the subband filter bank includes M bandpass filters, M ⁇ 1, and the method may further include: filtering each bandpass filter in the subband filter bank The output signal of the filter is down-sampled to obtain a down-sampled signal. Assuming that there are M band-pass filters, a total of M down-sampled signals are obtained, and the obtained M down-sampled signals are used as the input signal of the secondary channel adaptive filter .
- one upsampling signal corresponds to one downsampling signal, assuming that there are M bandpass filters, there are also M downsampling signal and M upsampled signals.
- the input signals of the sub-band filter bank may include the following types: the target playback sound, the up-sampled signal output by the sampling module, and the system error signal.
- the target playback sound the up-sampled signal output by the sampling module
- the system error signal the system error signal
- the output signal of each bandpass filter in the subband filter bank is down-sampled, and the down-sampling signal is obtained as follows: for the sub-band filter
- the signal output by each bandpass filter in the group (may be referred to as the first output signal) is down-sampled, for example, m times of down-sampling is performed to obtain a down-sampled signal (may be referred to as the first down-sampled signal), wherein, A first output signal corresponds to a first downsampling signal, assuming that the sub-band filter bank includes M bandpass filters, respectively G 0 (z), G 1 (z), ..., G M-1 (z), then there are M first output signals and M first downsampled signals in total.
- the obtained M first downsampled signals are used as input signals of the secondary path adaptive filter, and the output signal obtained by the secondary path adaptive filter based on the input signals may be It is called the second output signal, and M second output signals can be obtained accordingly, and the second output signals are used to adjust the error signal of the entire system.
- the output signal of each bandpass filter in the sub-band filter bank is down-sampled, and the down-sampled signal is obtained as follows: for the sub-band
- the signal output by each bandpass filter in the filter bank (may be referred to as the third output signal) is down-sampled, for example, m times of down-sampling is performed to obtain a down-sampled signal (may be called the second down-sampled signal),
- a third output signal corresponds to a second downsampling signal
- the obtained M second downsampling signals are used as input signals of the secondary path adaptive filter
- the secondary path adaptive filter obtains the
- the output signal can be called the fourth output signal, and M fourth output signals can be obtained accordingly, and the fourth output signal is used to adjust the filter coefficient of the secondary path adaptive filter, that is, to estimate the secondary path access coefficient.
- the error signal of the whole system is based on the signal output by each bandpass filter in the subband filter bank (which may be referred to as the fifth output signal) and the third signal are calculated, wherein the third signal is the first signal (i.e. the external noise) and the second signal (i.e. the target playback sound and the signal after the output signal of the primary path adaptive filter) The signal obtained by performing the operation.
- the third signal is the first signal (i.e. the external noise) and the second signal (i.e. the target playback sound and the signal after the output signal of the primary path adaptive filter)
- the active noise reduction method based on the FxLMS structure can simultaneously adjust the filter coefficients of the primary path adaptive filter and the filter coefficients of the secondary path adaptive filter.
- white Noise is used for secondary channel modeling, and the target playback sound modeling is directly used by the user to listen to, which improves user comfort and is more practical.
- the adjustment method of the filter coefficients of each bandpass filter in the subband filter bank may be an ant colony algorithm (for details, please refer to the corresponding embodiment in FIG. 12 above).
- the process described above it may also be a gradient update method, which is not limited in this application.
- the sampling frequency of this application is 16KHz
- there are 16 band-pass filters in the sub-band filter bank the frequency range of each band-pass filter is 500Hz
- the sub-band filter is a 128-order low-pass filter .
- the primary path coefficient and the secondary path coefficient can be adjusted at the same time.
- the primary path adopts a step size of 0.001
- the secondary path adopts a step size of 0.1.
- the simulated real primary path is 41
- the simulated real secondary path is 41.
- the main adaptive filter used is 128th order and 16th order.
- the frequency boundary of babble noise and cafe noise is about 4000Hz.
- the babble noise 0-1000Hz sub-band decomposition method can be reduced by 11dB on average, and the FxLMS method can be reduced by 10dB on average.
- the 1000-2000Hz sub-band decomposition method has an average reduction of 11dB, and the FxLMS method has an average reduction of 6dB.
- the 2000-3000H sub-band decomposition method has an average drop of 7dB, and the FxLMS method has an average drop of 5dB.
- the 3000-4000H sub-band decomposition method has an average drop of 7dB, and the FxLMS method has an average drop of 8dB.
- the cafe noise 0-1000Hz sub-band decomposition method reduces by 10dB on average
- the FxLMS method reduces by 10dB on average
- 8dB the FxLMS method will drop 4dB on average
- the 3000-4000H sub-band decomposition method will drop 9dB on average
- the FxLMS method will drop 3dB on average.
- the subband decomposition method has a certain noise reduction benefit compared with the traditional FxLMS method.
- the original signal adjusted and optimized by the ant colony algorithm that is, the time-domain waveform of white noise, is shown in Figure 15.
- the signal obtained after sub-band decomposition and synthesis without adjustment filter is shown in Figure 16, and the signal obtained after sub-band decomposition and synthesis of the filter is shown as Figure 17 shows.
- the signal similarity between the decomposed and synthesized signal and the original signal is 0.9582 (the maximum similarity is 1, that is, the same waveform).
- the maximum similarity is 1, that is, the same waveform.
- r x,out is the similarity between the input signal x and the output signal out
- x i is the point-by-point value of the original signal is the mean value of the original signal
- out i is the point-by-point value of the output signal after decomposition and synthesis, is the average value of the output signal.
- FIG. 18 is a schematic diagram of a computer-readable storage medium 900 provided by an embodiment of the present application.
- the computer-readable storage medium 900 is, for example, the cache memory in the processor 17 in FIG. 3 , the internal memory 121 in FIG. 5 , and the like.
- the computer-readable storage medium 900 stores one or more programs 902 . . . 906 configured to be executed by one or more processors of the active noise reduction device.
- One or more programs 902 . . . 906 may individually or collectively include instructions that are executable by processor 17 to implement the methods or processes described herein. It can be understood that the computer-readable storage medium 900 may also include programs for implementing other methods and steps.
- FIG. 19 is a schematic structural diagram of an active noise reduction system 1900 based on the FxLMS structure provided by an embodiment of the present application.
- the active noise reduction system 1900 can be applied to active noise reduction equipment.
- the active noise reduction system 1900 includes: an acquisition module 1901, used to pass The primary path acquires a first signal, the first signal represents the ambient sound at the reference microphone of the active noise reduction device, and the primary path represents a physical path through which the first signal is transmitted to the speaker of the active noise reduction device ;
- An acquisition module 1902 configured to obtain an estimated signal corresponding to the first signal through a secondary path adaptive filter, the secondary path adaptive filter is used to simulate a secondary path, and the secondary path adaptive filter
- the filter coefficients of the filter are adjusted based on the target playback sound by the sub-band filter bank;
- the electrical path module 1903 is used to obtain the second signal through the secondary path, and the secondary path represents that the second signal is transmitted to the loudspeaker through the circuit path, the second signal is the output signal of the primary path adaptive filter and
- the active noise reduction system 1900 may also include corresponding modules for performing the steps in the above-mentioned embodiment corresponding to FIG. 13 .
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Acoustics & Sound (AREA)
- Multimedia (AREA)
- Soundproofing, Sound Blocking, And Sound Damping (AREA)
Abstract
The present application discloses an FxLMS structure-based active noise reduction system, a method, and a device. The device comprises: a primary path adaptive filter, a secondary path adaptive filter, and a subband filter set, the subband filter set being used to adjust a filter coefficient of the secondary path adaptive filter on the basis of a target playback sound. On the basis of an existing FxLMS structure, a subband filter set is added to the system, so that, in a process during which an active noise reduction device plays a target sound (such as a music signal), the subband filter set is used to whiten the target playback sound to eliminate correlation (this is due to the fact that the correlation in a music signal is strong, an eigenvalue is close to zero, a step size needs to be set smaller, and therefore a convergence speed of the adaptive filter is severely affected), so as to obtain a real-time filter coefficient of the secondary path adaptive filter. Compared with an offline method for modeling a secondary path using white noise, real-time online modeling is performed directly using target playback sound, improving user comfort. The method is more practical, and can be dynamically and automatically adjusted in real time.
Description
本申请涉及音频处理领域,尤其涉及一种基于FxLMS结构的主动降噪系统、方法及设备。The present application relates to the field of audio processing, and in particular to an active noise reduction system, method and device based on an FxLMS structure.
常用降噪系统(也可称为降噪装置)根据工作位置的不同,主要分为三种:在声源处降噪、在传播过程中降噪、在人耳处降噪。为了主动地消除噪声,在耳机降噪中,人们提出了“有源消噪”技术,通过在人耳附近产生与噪声反向的信号来消除环境中的噪声。原理是通过降噪系统产生与外界噪音相等的反向声波,将噪声中和,从而实现降噪。在主动降噪设备(如,降噪耳机)中,要涉及到将数模转换(D\A)、信号电路、模数转换(A\D)、滤波电路、扬声器、传声器等电子设备以及扬声器到传声器之间的实际管道等物理通道的组合,这些物理通道的组合将其称之为次级通路。Commonly used noise reduction systems (also called noise reduction devices) are mainly divided into three types according to different working positions: noise reduction at the sound source, noise reduction during transmission, and noise reduction at the human ear. In order to actively eliminate noise, in the noise reduction of headphones, people have proposed "active noise cancellation" technology, which eliminates the noise in the environment by generating a signal opposite to the noise near the human ear. The principle is to generate reverse sound waves equal to the external noise through the noise reduction system to neutralize the noise, thereby achieving noise reduction. In active noise reduction equipment (such as noise reduction headphones), it involves digital-to-analog conversion (D\A), signal circuits, analog-to-digital conversion (A\D), filter circuits, speakers, microphones and other electronic equipment and speakers The combination of physical channels such as the actual pipes between the microphones and the microphones is called the secondary channel.
由于每个人头部大小不一,佩戴降噪设备的角度不一,所处的环境不一,其降噪效果必然受到这些诸多因素的影响。近些年,随着降噪耳机和其他主动降噪设备的飞速发展,建立一个合适的在线建模模型已经越来越急迫。一种典型的降噪系统是采用X-滤波最小均方误差(filtered-X least mean square,FxLMS)算法的结构(可简称FxLMS结构或FxLMS算法),目前主流的FxLMS结构的框图如图1所示,FxLMS结构包括初级通路自适应滤波器W(z)、次级通路自适应滤波器
(用于模拟次级通路),且两者之间的连接/计算关系都是已经确定好的,具体如图1中的框图所示,其中的符号含义分别为x(n):噪声信号;P(z):初级通路,也可称为初级路径;d(n):误差麦克风的初级噪声信号;S(z):次级通路,也可称为次级路径;y(n):初级通路自适应滤波器W(z)的输出信号;y'(n):通过次级通路的次级噪声信号;x'(n):通过估计的次级通路产生的噪声信号,也可称为估计信号;e(n):系统的误差信号。
Since everyone has different head sizes, different angles of wearing noise reduction equipment, and different environments, the noise reduction effect will inevitably be affected by these factors. In recent years, with the rapid development of noise-canceling headphones and other active noise-canceling devices, it has become more and more urgent to establish a suitable online modeling model. A typical noise reduction system adopts the structure of X-filtered least mean square error (filtered-X least mean square, FxLMS) algorithm (which can be referred to as FxLMS structure or FxLMS algorithm). The block diagram of the current mainstream FxLMS structure is shown in Figure 1 As shown, the FxLMS structure includes the primary path adaptive filter W(z), the secondary path adaptive filter (for simulating the secondary path), and the connection/computation relationship between the two has been determined, as shown in the block diagram in Figure 1, where the meanings of the symbols are x(n): noise signal; P(z): primary path, also called primary path; d(n): primary noise signal of error microphone; S(z): secondary path, also called secondary path; y(n): primary The output signal of the channel adaptive filter W(z); y'(n): the secondary noise signal through the secondary channel; x'(n): the noise signal generated by the estimated secondary channel, which can also be called Estimated signal; e(n): error signal of the system.
但现有的FxLMS结构是先对次级通路利用白噪声进行离线建模,然后直接利用建模好的次级通路系数(即次级通路自适应滤波器的滤波器系数)进行去除音乐等处理,再对初级通路进行自适应LMS调整降噪。但是实际中次级通路并不是固定不变的,而是会根据佩戴者佩戴方式以及佩戴时间进行变化,提前离线设计好会影响降噪效果。此外FxLMS结构对于高频降噪效果不佳,因为高频的音频信号传播更快,滤波器处理时间相比传播时间过长,从而无法播放出与外界噪声正好可以抵消的反向声波,因此针对高频降噪效果不佳。However, the existing FxLMS structure first uses white noise to model the secondary path offline, and then directly uses the modeled secondary path coefficients (ie, the filter coefficients of the secondary path adaptive filter) to remove music and other processing. , and then perform adaptive LMS adjustment for noise reduction on the primary channel. However, in practice, the secondary channel is not fixed, but will change according to the wearer's wearing method and wearing time, and offline design in advance will affect the noise reduction effect. In addition, the FxLMS structure is not effective for high-frequency noise reduction, because the high-frequency audio signal propagates faster, and the filter processing time is too long compared to the propagation time, so that it is impossible to play the reverse sound wave that can offset the external noise. Therefore, for High-frequency noise cancellation is poor.
发明内容Contents of the invention
本申请实施例提供了一种基于FxLMS结构的主动降噪系统、方法及设备,该降噪系统在现有的FxLMS结构的基础上,增加子带滤波器组,使得在主动降噪设备(如,降噪耳机)播放目标声音(如,音乐信号)的过程中,利用子带滤波器组将该目标播放声音白噪声化,消除其相关性(这是因为音乐信号的相关性强,特征值接近零,步长需设得较小,严重影 响自适应滤波器收敛速度)以得到实时的次级通路自适应滤波器的滤波器系数,比起利用白噪声进行次级通路建模的离线方式,直接利用目标播放声音实时在线建模提高了用户舒适度,更具有实用性,且能实时动态自行调整。The embodiment of the present application provides an active noise reduction system, method and device based on the FxLMS structure. The noise reduction system adds a sub-band filter bank on the basis of the existing FxLMS structure, so that the active noise reduction device (such as , noise-canceling earphones) in the process of playing the target sound (such as music signal), the sub-band filter bank is used to whiten the target sound to eliminate its correlation (this is because the correlation of the music signal is strong, and the eigenvalue close to zero, the step size needs to be set smaller, which seriously affects the convergence speed of the adaptive filter) to obtain the filter coefficients of the real-time secondary path adaptive filter, compared with the off-line method of using white noise for secondary path modeling , directly using the target playback sound to model in real time on-line improves user comfort, is more practical, and can be adjusted dynamically in real time.
基于此,本申请实施例提供以下技术方案:Based on this, the embodiment of the present application provides the following technical solutions:
第一方面,本申请实施例首先提供一种基于FxLMS结构的主动降噪系统,可用于主动降噪领域中,该系统包括:初级通路自适应滤波器W(z)、次级通路自适应滤波器
以及子带滤波器组,其中,子带滤波器组包括M个带通滤波器,不同的带通滤波器具有不同的通带,可分别称为G
0(z)、G
1(z)、……、G
M-1(z),M≥1。具体地,初级通路自适应滤波器W(z),用于模拟初级通路,其中,初级通路表示主动降噪设备的参考麦克风处的外界环境声音(可称为第一信号)传输到主动降噪设备的扬声器处所通过的物理路径,因此该初级通路也可称为空气通路;次级通路自适应滤波器
用于模拟次级通路,其中,次级通路表示第二信号传输到扬声器处所通过的电路路径,第二信号为初级通路自适应滤波器W(z)的输出信号与目标播放声音(如,耳机播放的音乐)运算后的信号,例如,该运算可以是初级通路自适应滤波器W(z)的输出信号与目标播放声音进行相加;子带滤波器组,用于基于目标播放声音调整次级通路自适应滤波器
的滤波器系数。
In the first aspect, the embodiment of the present application first provides an active noise reduction system based on the FxLMS structure, which can be used in the field of active noise reduction. The system includes: primary path adaptive filter W(z), secondary path adaptive filter device and a subband filter bank, wherein the subband filter bank includes M bandpass filters, and different bandpass filters have different passbands, which can be called G 0 (z), G 1 (z), G 1 (z), ..., G M-1 (z), M≥1. Specifically, the primary path adaptive filter W(z) is used to simulate the primary path, wherein the primary path represents the transmission of the external ambient sound (which may be called the first signal) at the reference microphone of the active noise reduction device to the active noise reduction The physical path through which the loudspeaker of the device passes, so this primary path can also be called the air path; the secondary path adaptive filter Used to simulate the secondary path, where the secondary path represents the circuit path through which the second signal is transmitted to the loudspeaker, and the second signal is the output signal of the primary path adaptive filter W(z) and the target playback sound (such as a headphone Played music) calculated signal, for example, the operation can be the output signal of the primary path adaptive filter W(z) and the target playback sound; the subband filter bank is used to adjust the sub-band based on the target playback sound stage path adaptive filter filter coefficients.
在本申请上述实施方式中,本申请实施例提供的降噪系统在现有的FxLMS结构的基础上,增加子带滤波器组,使得在主动降噪设备(如,降噪耳机)播放目标声音(如,音乐信号)的过程中,利用子带滤波器组将该目标播放声音白噪声化,以得到实时的次级通路自适应滤波器的滤波器系数,比起利用白噪声进行次级通路建模的离线方式,直接利用目标播放声音实时在线建模提高了用户舒适度,更具有实用性,且能实时动态自行调整。In the above-mentioned embodiments of the present application, the noise reduction system provided by the embodiment of the present application is based on the existing FxLMS structure, and a sub-band filter bank is added, so that the target sound can be played on the active noise reduction device (such as noise reduction headphones) (e.g., music signal), use the sub-band filter bank to whitenize the target playing sound to obtain the filter coefficients of the real-time secondary path adaptive filter, compared with using white noise for the secondary path The offline mode of modeling directly uses the target playback sound to model online in real time, which improves user comfort, is more practical, and can be adjusted dynamically in real time.
在第一方面的一种可能的实现方式中,该主动降噪系统还可以包括采样模块,采样模块可对信号进行上采样或下采样,具体地,可以用于:(1)对子带滤波器组中每个带通滤波器的输出信号进行下采样,得到下采样信号,假设有M个带通滤波器,则共得到M个下采样信号,得到的M个下采样信号再作为次级通路自适应滤波器
的输入信号。(2)对次级通路自适应滤波器
的输出信号进行上采样,得到上采样信号,一个上采样信号对应一个下采样信号,假设有M个带通滤波器,也就有M个下采样信号和M个上采样信号。
In a possible implementation of the first aspect, the active noise reduction system may further include a sampling module, which can perform up-sampling or down-sampling on the signal, specifically, it can be used to: (1) filter the sub-band The output signal of each band-pass filter in the filter group is down-sampled to obtain a down-sampled signal. Assuming that there are M band-pass filters, a total of M down-sampled signals are obtained, and the obtained M down-sampled signals are used as secondary channel adaptive filter input signal. (2) Adaptive filter for the secondary path The output signal is up-sampled to obtain an up-sampled signal. One up-sampled signal corresponds to one down-sampled signal. Assuming that there are M band-pass filters, there are M down-sampled signals and M up-sampled signals.
在本申请上述实施方式中,本申请实施例提供的主动降噪系统还包括采样模块,用于进行下采样和/或上采样,在本申请实施例中,下采样的目的有2个:1、将每个带通滤波器各自通过的特定频段展宽,实现白噪声化,白噪声化的信号是为了用于调整次级通路自适应滤波器
的系数;2、降低次级通路自适应滤波器
的计算量。上采样的目的则是与下采样相反的操作,是为了将展宽的频段恢复回去,便于后续运算。
In the above embodiments of the present application, the active noise reduction system provided in the embodiment of the present application further includes a sampling module for down-sampling and/or up-sampling. In the embodiment of the present application, there are two purposes of down-sampling: 1 , Broaden the specific frequency bands passed by each bandpass filter to achieve white noise, and the white noise signal is used to adjust the secondary channel adaptive filter coefficient; 2, reduce the secondary path adaptive filter calculation amount. The purpose of upsampling is the opposite operation to downsampling, in order to restore the broadened frequency band to facilitate subsequent calculations.
在第一方面的一种可能的实现方式中,子带滤波器组的输入信号可以包括如下几种:目标播放声音、采样模块输出的上采样信号、系统的误差信号。In a possible implementation manner of the first aspect, the input signals of the sub-band filter bank may include the following types: the target playing sound, the up-sampling signal output by the sampling module, and the system error signal.
在本申请上述实施方式中,具体阐述了在不同的阶段,子带滤波器组的输入信号可以是不同的输入信号,即不同的信号可以共用相同的子带滤波器组,具备灵活性,且节省了硬件成本。In the above embodiments of the present application, it is specifically stated that at different stages, the input signals of the sub-band filter bank can be different input signals, that is, different signals can share the same sub-band filter bank, which is flexible, and Saves hardware cost.
在第一方面的一种可能的实现方式中,在子带滤波器组的输入信号为目标播放声音的情况下,采样模块具体用于:对子带滤波器组中每个带通滤波器输出的信号(可称为第一输出信号)进行下采样,例如,进行m倍的下采样,得到下采样信号(可称为第一下采样信号),其中,一个第一输出信号对应一个第一下采样信号,假设子带滤波器组包括的带通滤波器为M个,分别为G
0(z)、G
1(z)、……、G
M-1(z),则共有M个第一输出信号以及M个第一下采样信号。需要注意的是,在本申请实施例中,得到的M个第一下采样信号就作为次级通路自适应滤波器
的输入信号,次级通路自适应滤波器
基于该输入信号得到的输出信号可称为第二输出信号,据此就可以得到M个第二输出信号,该第二输出信号就用于调整整个系统的误差信号。
In a possible implementation of the first aspect, when the input signal of the sub-band filter bank is the target playing sound, the sampling module is specifically configured to: The signal (which may be referred to as the first output signal) is down-sampled, for example, m times of down-sampling is performed to obtain a down-sampled signal (which may be referred to as the first down-sampled signal), wherein one first output signal corresponds to one first Downsampling signal, assuming that the sub-band filter bank includes M bandpass filters, namely G 0 (z), G 1 (z), ..., G M-1 (z), then there are M band-pass filters in total An output signal and M first downsampling signals. It should be noted that, in the embodiment of this application, the obtained M first downsampled signals are used as the secondary path adaptive filter The input signal, the secondary path adaptive filter The output signal obtained based on the input signal may be referred to as a second output signal, and M second output signals can be obtained accordingly, and the second output signal is used to adjust the error signal of the entire system.
在本申请上述实施方式中,具体阐述了在子带滤波器组的输入信号为目标播放声音的情况下,子带滤波器组的输出信号的作用,即用于调整整个系统的误差信号,具备可实现性。In the above-mentioned embodiments of the present application, it has been specifically explained that in the case where the input signal of the sub-band filter bank is to play sound, the function of the output signal of the sub-band filter bank, that is, for adjusting the error signal of the entire system, has Realizability.
在第一方面的一种可能的实现方式中,在子带滤波器组的输入信号为整个系统的误差信号的情况下,采样模块具体用于:对子带滤波器组中每个带通滤波器输出的信号(可称为第三输出信号)进行下采样,例如,进行m倍的下采样,得到下采样信号(可称为第二下采样信号),其中,一个第三输出信号对应一个第二下采样信号,得到的M个第二下采样信号就作为次级通路自适应滤波器
的输入信号,次级通路自适应滤波器
基于该输入信号得到的输出信号可称为第四输出信号,据此就可以得到M个第四输出信号,该第四输出信号就用于调整次级通路自适应滤波器
的滤波器系数,也就是用于估计次级通路系数。
In a possible implementation of the first aspect, when the input signal of the subband filter bank is the error signal of the entire system, the sampling module is specifically configured to: filter each bandpass in the subband filter bank The signal (may be referred to as the third output signal) output by the device is down-sampled, for example, m times of down-sampling is performed to obtain a down-sampled signal (may be referred to as the second down-sampled signal), wherein one third output signal corresponds to one The second down-sampling signal, the obtained M second down-sampling signals are used as the secondary path adaptive filter The input signal, the secondary path adaptive filter The output signal obtained based on the input signal can be called the fourth output signal, and M fourth output signals can be obtained accordingly, and the fourth output signal is used to adjust the secondary path adaptive filter The filter coefficients of , that is, the coefficients used to estimate the secondary path.
在本申请上述实施方式中,具体阐述了在子带滤波器组的输入信号为整个系统的误差信号的情况下,子带滤波器组的输出信号的作用,即用于估计次级通路系数,具备可实现性。In the above embodiments of the present application, in the case that the input signal of the subband filter bank is the error signal of the whole system, the function of the output signal of the subband filter bank, that is, for estimating the secondary channel coefficient, is specifically explained. It is achievable.
在第一方面的一种可能的实现方式中,在子带滤波器组的输入信号为采样模块输出的上采样信号的情况下,整个系统的误差信号是基于子带滤波器组中每个带通滤波器输出的信号(可称为第五输出信号)与第三信号进行运算得到,其中,该第三信号为对第一信号(即外界噪声)和第二信号(即目标播放声音与初级通路自适应滤波器W(z)的输出信号运算后的信号)进行运算得到的信号。In a possible implementation of the first aspect, when the input signal of the sub-band filter bank is the up-sampled signal output by the sampling module, the error signal of the whole system is based on each band in the sub-band filter bank The signal output by the pass filter (which may be referred to as the fifth output signal) and the third signal are calculated, wherein the third signal is a combination of the first signal (i.e. external noise) and the second signal (i.e. target playback sound and primary The output signal of the channel adaptive filter W(z) after calculation) is a signal obtained by calculation.
在本申请上述实施方式中,系统的误差信号不仅与外界噪声相关,也跟实时播放的目标播放声音相关,相比于利用白噪声进行次级通路建模的离线方式,直接利用目标播放声音实时在线建模提高了用户舒适度。In the above-mentioned embodiments of the present application, the error signal of the system is not only related to the external noise, but also related to the real-time playing target sound. Online modeling improves user comfort.
在第一方面的一种可能的实现方式中,子带滤波器组中每个带通滤波器的滤波器系数的调整方式可以是蚁群算法,也可以是梯度更新方法,具体本申请对此不做限定。In a possible implementation of the first aspect, the adjustment method of the filter coefficients of each band-pass filter in the sub-band filter bank may be an ant colony algorithm, or a gradient update method. No limit.
在本申请上述实施方式中,子带滤波器组中每个带通滤波器的滤波器系数的调整方式可以有多种实现方式,具备灵活性和广泛适用性。In the above implementation manners of the present application, there may be multiple implementation manners for adjusting the filter coefficients of each bandpass filter in the subband filter bank, which have flexibility and wide applicability.
第二方面,本申请实施例还提供一种基于FxLMS结构的主动降噪方法,应用于主动降噪设备,该方法可以包括:首先,主动降噪设备通过初级通路获取第一信号,该第一信号 用于表示主动降噪设备的参考麦克风处的环境声音,该初级通路表示第一信号传输到主动降噪设备的扬声器处所通过的物理路径,也可以称为空气通路。此外,主动降噪设备还要通过次级通路自适应滤波器得到与第一信号对应的估计信号,即在这种情况下,第一信号作为次级通路自适应滤波器的输入信号,估计信号作为次级通路自适应滤波器的输出信号,该次级通路自适应滤波器就用于模拟次级通路,并且该次级通路自适应滤波器的滤波器系数(即次级通路系数)是由子带滤波器组基于目标播放声音(如,播放的音乐信号)调整得到的。主动降噪设备在获得第一信号以及估计信号之后,会进一步通过次级通路获取第二信号,其中,次级通路表示第二信号传输到主动降噪设备的扬声器处所通过的电路路径,第二信号为初级通路自适应滤波器的输出信号与目标播放声音运算后的信号,初级通路自适应滤波器用于模拟初级通路,初级通路自适应滤波器的反馈信号根据误差信号以及估计信号得到。在得到第一信号以及第二信号之后,主动降噪设备对第一信号和第二信号进行运算,得到第三信号,最后,通过主动降噪设备的扬声器将该第三信号进行播放。In the second aspect, the embodiment of the present application also provides an active noise reduction method based on the FxLMS structure, which is applied to an active noise reduction device. The method may include: first, the active noise reduction device obtains a first signal through a primary path, and the first The signal is used to represent the ambient sound at the reference microphone of the active noise reduction device, and the primary path represents a physical path through which the first signal is transmitted to the speaker of the active noise reduction device, which may also be called an air path. In addition, the active noise reduction device also needs to obtain the estimated signal corresponding to the first signal through the secondary path adaptive filter, that is, in this case, the first signal is used as the input signal of the secondary path adaptive filter, and the estimated signal As the output signal of the secondary path adaptive filter, the secondary path adaptive filter is used to simulate the secondary path, and the filter coefficients of the secondary path adaptive filter (ie, the secondary path coefficients) are determined by the The band filter bank is adjusted based on the target playing sound (eg, playing music signal). After the active noise reduction device obtains the first signal and the estimated signal, it will further obtain the second signal through the secondary path, wherein the secondary path represents the circuit path through which the second signal is transmitted to the speaker of the active noise reduction device, and the second The signal is the output signal of the primary path adaptive filter and the signal after the operation of the target playback sound. The primary path adaptive filter is used to simulate the primary path, and the feedback signal of the primary path adaptive filter is obtained from the error signal and the estimated signal. After obtaining the first signal and the second signal, the active noise reduction device performs calculations on the first signal and the second signal to obtain a third signal, and finally, the third signal is played through a speaker of the active noise reduction device.
在本申请上述实施方式中,具体阐述了在基于FxLMS结构的主动降噪系统的基础上,基于FxLMS结构的主动降噪方法的过程是怎样的,该方法利用子带滤波器组将该目标播放声音白噪声化,消除其相关性以得到实时的次级通路自适应滤波器的滤波器系数,比起利用白噪声进行次级通路建模的离线方式,直接利用目标播放声音实时在线建模提高了用户舒适度,更具有实用性,且能实时动态自行调整。In the above-mentioned embodiments of the present application, on the basis of the active noise reduction system based on the FxLMS structure, the process of the active noise reduction method based on the FxLMS structure is described in detail. The method uses a sub-band filter bank to play the target Sound white noise, eliminating its correlation to obtain real-time filter coefficients of the secondary channel adaptive filter, compared with the offline method of using white noise for secondary channel modeling, directly using the target playback sound to improve real-time online modeling It improves user comfort, is more practical, and can be adjusted dynamically in real time.
在第二方面的一种可能的实现方式中,子带滤波器组包括M个带通滤波器,M≥1,所述方法还可以包括:对子带滤波器组中每个带通滤波器的输出信号进行下采样,得到下采样信号,假设有M个带通滤波器,则共得到M个下采样信号,得到的M个下采样信号再作为次级通路自适应滤波器的输入信号。和/或,对次级通路自适应滤波器的输出信号进行上采样,得到上采样信号,一个上采样信号对应一个下采样信号,假设有M个带通滤波器,也就有M个下采样信号和M个上采样信号。In a possible implementation manner of the second aspect, the subband filter bank includes M bandpass filters, M≥1, and the method may further include: for each bandpass filter in the subband filter bank The output signal is down-sampled to obtain a down-sampled signal. Assuming that there are M band-pass filters, a total of M down-sampled signals are obtained, and the obtained M down-sampled signals are used as the input signal of the secondary channel adaptive filter. And/or, upsampling the output signal of the secondary path adaptive filter to obtain an upsampling signal, one upsampling signal corresponds to one downsampling signal, assuming that there are M bandpass filters, there are also M downsampling signal and M upsampled signals.
在本申请上述实施方式中,下采样的目的有2个:1、将每个带通滤波器各自通过的特定频段展宽,实现白噪声化,白噪声化的信号是为了用于调整次级通路自适应滤波器的系数;2、降低次级通路自适应滤波器的计算量。上采样的目的则是与下采样相反的操作,是为了将展宽的频段恢复回去,便于后续运算。In the above-mentioned embodiments of the present application, there are two purposes of downsampling: 1. To widen the specific frequency bands passed by each bandpass filter to achieve white noise. The white noise signal is used to adjust the secondary channel The coefficient of the adaptive filter; 2. Reduce the calculation amount of the secondary path adaptive filter. The purpose of upsampling is the opposite operation to downsampling, in order to restore the broadened frequency band to facilitate subsequent calculations.
在第二方面的一种可能的实现方式中,子带滤波器组的输入信号可以包括如下几种:目标播放声音、采样模块输出的上采样信号、系统的误差信号。In a possible implementation manner of the second aspect, the input signals of the subband filter bank may include the following types: the target playing sound, the up-sampling signal output by the sampling module, and the system error signal.
在本申请上述实施方式中,具体阐述了在不同的阶段,子带滤波器组的输入信号可以是不同的输入信号,即不同的信号可以共用相同的子带滤波器组,具备灵活性,且节省了硬件成本。In the above embodiments of the present application, it is specifically stated that at different stages, the input signals of the sub-band filter bank can be different input signals, that is, different signals can share the same sub-band filter bank, which is flexible, and Saves hardware cost.
在第二方面的一种可能的实现方式中,在子带滤波器组的输入信号为目标播放声音的情况下,则对子带滤波器组中每个带通滤波器的输出信号进行下采样,得到下采样信号具体为:对子带滤波器组中每个带通滤波器输出的信号(可称为第一输出信号)进行下采样,例如,进行m倍的下采样,得到下采样信号(可称为第一下采样信号),其中,一个第一输出信号对应一个第一下采样信号,假设子带滤波器组包括的带通滤波器为M个,分别为 G
0(z)、G
1(z)、……、G
M-1(z),则共有M个第一输出信号以及M个第一下采样信号。需要注意的是,在本申请实施例中,得到的M个第一下采样信号就作为次级通路自适应滤波器的输入信号,次级通路自适应滤波器基于该输入信号得到的输出信号可称为第二输出信号,据此就可以得到M个第二输出信号,该第二输出信号就用于调整整个系统的误差信号。
In a possible implementation of the second aspect, when the input signal of the sub-band filter bank is the target playback sound, the output signal of each bandpass filter in the sub-band filter bank is down-sampled , to obtain the downsampling signal is specifically: downsampling the signal output by each bandpass filter in the subband filter bank (which may be referred to as the first output signal), for example, performing m times downsampling to obtain the downsampling signal (may be referred to as the first down-sampling signal), wherein one first output signal corresponds to one first down-sampling signal, assuming that the sub-band filter bank includes M band-pass filters, respectively G 0 (z), G 1 (z), . . . , G M-1 (z), there are M first output signals and M first downsampling signals in total. It should be noted that in the embodiment of the present application, the obtained M first downsampled signals are used as input signals of the secondary path adaptive filter, and the output signal obtained by the secondary path adaptive filter based on the input signals may be It is called the second output signal, and M second output signals can be obtained accordingly, and the second output signals are used to adjust the error signal of the entire system.
在本申请上述实施方式中,具体阐述了在子带滤波器组的输入信号为目标播放声音的情况下,子带滤波器组的输出信号的作用,即用于调整整个系统的误差信号,具备可实现性。In the above-mentioned embodiments of the present application, it has been specifically explained that in the case where the input signal of the sub-band filter bank is to play sound, the function of the output signal of the sub-band filter bank, that is, for adjusting the error signal of the entire system, has Realizability.
在第二方面的一种可能的实现方式中,在子带滤波器组的输入信号为整个系统的误差信号的情况下,则对子带滤波器组中每个带通滤波器的输出信号进行下采样,得到下采样信号具体为:对子带滤波器组中每个带通滤波器输出的信号(可称为第三输出信号)进行下采样,例如,进行m倍的下采样,得到下采样信号(可称为第二下采样信号),其中,一个第三输出信号对应一个第二下采样信号,得到的M个第二下采样信号就作为次级通路自适应滤波器的输入信号,次级通路自适应滤波器基于该输入信号得到的输出信号可称为第四输出信号,据此就可以得到M个第四输出信号,该第四输出信号就用于调整次级通路自适应滤波器的滤波器系数,也就是用于估计次级通路系数。In a possible implementation of the second aspect, when the input signal of the subband filter bank is the error signal of the entire system, the output signal of each bandpass filter in the subband filter bank is Downsampling to obtain the downsampling signal is specifically: downsampling the signal (which may be referred to as the third output signal) output by each bandpass filter in the subband filter bank, for example, performing m times downsampling to obtain the downsampling The sampling signal (may be referred to as the second downsampling signal), wherein one third output signal corresponds to one second downsampling signal, and the obtained M second downsampling signals are used as the input signal of the secondary path adaptive filter, The output signal obtained by the secondary path adaptive filter based on the input signal can be called the fourth output signal, and M fourth output signals can be obtained accordingly, and the fourth output signal is used to adjust the secondary path adaptive filter The filter coefficients of the filter, that is, the coefficients used to estimate the secondary path.
在本申请上述实施方式中,具体阐述了在子带滤波器组的输入信号为整个系统的误差信号的情况下,子带滤波器组的输出信号的作用,即用于估计次级通路系数,具备可实现性。In the above embodiments of the present application, in the case that the input signal of the subband filter bank is the error signal of the whole system, the function of the output signal of the subband filter bank, that is, for estimating the secondary channel coefficient, is specifically explained. It is achievable.
在第二方面的一种可能的实现方式中,在子带滤波器组的输入信号为采样模块输出的上采样信号的情况下,整个系统的误差信号是基于子带滤波器组中每个带通滤波器输出的信号(可称为第五输出信号)与第三信号进行运算得到,其中,该第三信号为对第一信号(即外界噪声)和第二信号(即目标播放声音与初级通路自适应滤波器的输出信号运算后的信号)进行运算得到的信号。In a possible implementation of the second aspect, when the input signal of the sub-band filter bank is the up-sampled signal output by the sampling module, the error signal of the whole system is based on each band in the sub-band filter bank The signal output by the pass filter (which may be referred to as the fifth output signal) and the third signal are calculated, wherein the third signal is a combination of the first signal (i.e. external noise) and the second signal (i.e. target playback sound and primary The signal obtained by calculating the output signal of the channel adaptive filter).
在本申请上述实施方式中,系统的误差信号不仅与外界噪声相关,也跟实时播放的目标播放声音相关,相比于利用白噪声进行次级通路建模的离线方式,直接利用目标播放声音实时在线建模提高了用户舒适度。In the above-mentioned embodiments of the present application, the error signal of the system is not only related to the external noise, but also related to the real-time playing target sound. Online modeling improves user comfort.
在第二方面的一种可能的实现方式中,子带滤波器组中每个带通滤波器的滤波器系数的调整方式可以是蚁群算法,也可以是梯度更新方法,具体本申请对此不做限定。In a possible implementation of the second aspect, the adjustment method of the filter coefficients of each bandpass filter in the subband filter bank may be an ant colony algorithm, or a gradient update method. No limit.
在本申请上述实施方式中,子带滤波器组中每个带通滤波器的滤波器系数的调整方式可以有多种实现方式,具备灵活性和广泛适用性。In the above implementation manners of the present application, there may be multiple implementation manners for adjusting the filter coefficients of each bandpass filter in the subband filter bank, which have flexibility and wide applicability.
本申请实施例第三方面提供一种主动降噪设备,该设备具有实现上述第二方面或第二方面任意一种可能实现方式的方法的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。A third aspect of the embodiments of the present application provides an active noise reduction device, and the device has a function of implementing the method of the second aspect or any possible implementation manner of the second aspect. This function may be implemented by hardware, or may be implemented by executing corresponding software on the hardware. The hardware or software includes one or more modules corresponding to the above functions.
本申请实施例第四方面提供一种主动降噪设备,可以包括存储器、处理器以及总线系统,其中,存储器用于存储程序,处理器用于调用该存储器中存储的程序以执行本申请实施例第二方面或第二方面任意一种可能实现方式的方法。The fourth aspect of the embodiment of the present application provides an active noise reduction device, which may include a memory, a processor, and a bus system, wherein the memory is used to store programs, and the processor is used to call the programs stored in the memory to execute the first embodiment of the present application. The second aspect or any one of the possible implementation methods of the second aspect.
本申请实施例第五方面提供一种计算机可读存储介质,该计算机可读存储介质中存储 有指令,当其在计算机上运行时,使得计算机可以执行上述第二方面或第二方面任意一种可能实现方式的方法。The fifth aspect of the embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium stores instructions, and when it is run on a computer, the computer can execute any one of the above-mentioned second aspect or the second aspect. method of possible implementation.
本申请实施例第六方面提供了一种计算机程序,当其在计算机上运行时,使得计算机执行上述第二方面或第二方面任意一种可能实现方式的方法。The sixth aspect of the embodiments of the present application provides a computer program, which, when running on a computer, causes the computer to execute the method of the above-mentioned second aspect or any possible implementation manner of the second aspect.
本申请实施例第七方面提供了一种芯片,该芯片包括至少一个处理器和至少一个接口电路,该接口电路和该处理器耦合,至少一个接口电路用于执行收发功能,并将指令发送给至少一个处理器,至少一个处理器用于运行计算机程序或指令,其具有实现如上述第二方面或第二方面任意一种可能实现方式的方法的功能,该功能可以通过硬件实现,也可以通过软件实现,还可以通过硬件和软件组合实现,该硬件或软件包括一个或多个与上述功能相对应的模块。此外,该接口电路用于与该芯片之外的其它模块进行通信。The seventh aspect of the embodiment of the present application provides a chip, the chip includes at least one processor and at least one interface circuit, the interface circuit is coupled to the processor, and the at least one interface circuit is used to perform the function of sending and receiving, and send instructions to At least one processor, at least one processor is used to run computer programs or instructions, which has the function of realizing the method of the second aspect or any possible implementation mode of the second aspect above, and this function can be realized by hardware or by software Realization can also be achieved through a combination of hardware and software, where the hardware or software includes one or more modules corresponding to the above functions. In addition, the interface circuit is used to communicate with other modules outside the chip.
图1为目前主流的FxLMS结构的框图的一个示意图;Fig. 1 is a schematic diagram of the block diagram of the current mainstream FxLMS structure;
图2为本申请实施例提供的主动降噪设备的架构的一个示意图;FIG. 2 is a schematic diagram of the architecture of the active noise reduction device provided by the embodiment of the present application;
图3为本申请实施例提供的可以部署基于FxLMS结构的主动降噪系统的主动降噪设备的一个示意图;FIG. 3 is a schematic diagram of an active noise reduction device that can deploy an active noise reduction system based on the FxLMS structure provided by the embodiment of the present application;
图4为本申请实施例提供的可以部署基于FxLMS结构的主动降噪系统的主动降噪设备的另一示意图;FIG. 4 is another schematic diagram of an active noise reduction device that can deploy an active noise reduction system based on the FxLMS structure provided by the embodiment of the present application;
图5为本申请实施例提供的主动降噪设备的示意框图;FIG. 5 is a schematic block diagram of an active noise reduction device provided by an embodiment of the present application;
图6为本申请实施例提供的基于FxLMS结构的主动降噪系统的一个示意图;FIG. 6 is a schematic diagram of an active noise reduction system based on the FxLMS structure provided by the embodiment of the present application;
图7为本申请实施例提供的初级通路自适应滤波器W(z)的一个示意图;FIG. 7 is a schematic diagram of the primary channel adaptive filter W(z) provided by the embodiment of the present application;
图8为本申请实施例提供的估计初级通路系数的自适应滤波器原理的一个示意图;FIG. 8 is a schematic diagram of the principle of an adaptive filter for estimating primary channel coefficients provided by an embodiment of the present application;
图9为已有的次级通路自适应滤波器
的一个框图;
Figure 9 shows the existing secondary path adaptive filter A block diagram of;
图10为本申请实施例提供的次级通路自适应滤波器
的一个结构图;
Figure 10 is the secondary path adaptive filter provided by the embodiment of the present application A structure diagram of
图11为本申请实施例提供的子带滤波器组调整方式的一个示意图;FIG. 11 is a schematic diagram of a subband filter bank adjustment method provided in an embodiment of the present application;
图12为本申请实施例提供的蚁群算法的一个流程示意图;Fig. 12 is a schematic flow chart of the ant colony algorithm provided by the embodiment of the present application;
图13为本申请实施例提供的基于FxLMS结构的主动降噪方法的一个流程示意图;FIG. 13 is a schematic flowchart of an active noise reduction method based on the FxLMS structure provided by the embodiment of the present application;
图14为本申请实施例提供的主动降噪方法与传统的FxLMS方法的一个降噪结果的对比图;FIG. 14 is a comparison diagram of a noise reduction result between the active noise reduction method provided by the embodiment of the present application and the traditional FxLMS method;
图15为进行蚁群算法调整优化的原始信号的一个示意图;Fig. 15 is a schematic diagram of the original signal adjusted and optimized by the ant colony algorithm;
图16为无调整滤波器子带分解合成后得到信号的一个示意图;Fig. 16 is a schematic diagram of a signal obtained after subband decomposition and synthesis without an adjustment filter;
图17为滤波器子带分解合成后得到信号的一个示意图;Fig. 17 is a schematic diagram of a signal obtained after filter subband decomposition and synthesis;
图18为本申请实施例提供的计算机可读存储介质的一个示意图;FIG. 18 is a schematic diagram of a computer-readable storage medium provided by an embodiment of the present application;
图19为本申请实施例提供的基于FxLMS结构的主动降噪系统的一个结构示意图。FIG. 19 is a schematic structural diagram of an active noise reduction system based on an FxLMS structure provided by an embodiment of the present application.
本申请实施例提供了一种基于FxLMS结构的主动降噪系统、方法及设备,该降噪系统 在现有的FxLMS结构的基础上,增加子带滤波器组,使得在主动降噪设备(如,降噪耳机)播放目标声音(如,音乐信号)的过程中,利用子带滤波器组将该目标播放声音白噪声化,消除其相关性(这是因为音乐信号的相关性强,特征值接近零,步长需设得较小,严重影响自适应滤波器收敛速度)以得到实时的次级通路自适应滤波器的滤波器系数,比起利用白噪声进行次级通路建模的离线方式,直接利用目标播放声音实时在线建模提高了用户舒适度,更具有实用性,且能实时动态自行调整。The embodiment of the present application provides an active noise reduction system, method and device based on the FxLMS structure. The noise reduction system adds a sub-band filter bank on the basis of the existing FxLMS structure, so that the active noise reduction device (such as , noise-canceling earphones) in the process of playing the target sound (such as music signal), the sub-band filter bank is used to whiten the target sound to eliminate its correlation (this is because the correlation of the music signal is strong, and the eigenvalue close to zero, the step size needs to be set smaller, which seriously affects the convergence speed of the adaptive filter) to obtain the filter coefficients of the real-time secondary path adaptive filter, compared with the off-line method of using white noise for secondary path modeling , directly using the target playback sound to model in real time on-line improves user comfort, is more practical, and can be adjusted dynamically in real time.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,这仅仅是描述本申请的实施例中对相同属性的对象在描述时所采用的区分方式。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,以便包含一系列单元的过程、方法、系统、产品或设备不必限于那些单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它单元。The terms "first", "second" and the like in the specification and claims of the present application and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence. It should be understood that the terms used in this way can be interchanged under appropriate circumstances, and this is merely a description of the manner in which objects with the same attribute are described in the embodiments of the present application. Furthermore, the terms "comprising" and "having", as well as any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, product, or apparatus comprising a series of elements is not necessarily limited to those elements, but may include elements not expressly included. Other elements listed explicitly or inherent to the process, method, product, or apparatus.
本申请实施例涉及了许多关于滤波器、降噪等的相关知识,为了更好地理解本申请实施例的方案,下面先对本申请实施例可能涉及的相关术语和概念进行介绍。应理解的是,相关的概念解释可能会因为本申请实施例的具体情况有所限制,但并不代表本申请仅能局限于该具体情况,在不同实施例的具体情况可能也会存在差异,具体此处不做限定。The embodiment of the present application involves a lot of relevant knowledge about filters, noise reduction, etc. In order to better understand the solution of the embodiment of the present application, the following first introduces related terms and concepts that may be involved in the embodiment of the present application. It should be understood that the interpretation of related concepts may be limited due to the specific conditions of the embodiment of the application, but it does not mean that the application is limited to the specific conditions, and there may be differences in the specific conditions of different embodiments. Specifically, there is no limitation here.
(1)自适应滤波器(adaptive filter)(1) Adaptive filter (adaptive filter)
自适应滤波器是指根据环境的改变,使用自适应算法来改变滤波器的参数和结构的滤波器。一般情况下,不改变自适应滤波器的结构。而自适应滤波器的系数是由自适应算法更新的时变系数。即其系数自动连续地适应于给定信号,以获得期望响应。自适应滤波器的最重要的特征就在于它能够在未知环境中有效工作,并能够跟踪输入信号的时变特征。An adaptive filter refers to a filter that uses an adaptive algorithm to change the parameters and structure of the filter according to changes in the environment. In general, the structure of the adaptive filter is not changed. The coefficients of the adaptive filter are time-varying coefficients updated by the adaptive algorithm. That is, its coefficients are automatically and continuously adapted to a given signal to obtain the desired response. The most important feature of an adaptive filter is its ability to work effectively in unknown environments and to track the time-varying characteristics of the input signal.
自适应滤波器的数学原理为:以输入和输出信号的统计特性的估计为依据,采取特定算法自动地调整滤波器系数,使其达到最佳滤波特性的一种算法或装置。自适应滤波器可以是连续域的或是离散域的。离散域自适应滤波器由一组抽头延迟线、可变加权系数和自动调整系数的机构组成。自适应滤波器对输入信号序列x(n)的每一个样值,按特定的算法,更新、调整加权系数,使输出信号序列y(n)与期望输出信号序列d(n)相比较的均方误差为最小,即输出信号序列y(n)逼近期望信号序列d(n)。The mathematical principle of the adaptive filter is: based on the estimation of the statistical characteristics of the input and output signals, a specific algorithm is adopted to automatically adjust the filter coefficients to achieve an algorithm or device with the best filtering characteristics. Adaptive filters can be either continuous or discrete. The discrete domain adaptive filter is composed of a group of tapped delay lines, variable weight coefficients and mechanisms for automatically adjusting coefficients. For each sample value of the input signal sequence x(n), the adaptive filter updates and adjusts the weighting coefficients according to a specific algorithm, so that the average value of the output signal sequence y(n) compared with the expected output signal sequence d(n) The square error is the minimum, that is, the output signal sequence y(n) is close to the expected signal sequence d(n).
自适应滤波器可以应用于通信领域的自动均衡、回波消除、天线阵波束形成,以及其他有关领域信号处理的参数识别、噪声消除、谱估计等方面。对于不同的应用,只是所加输入信号和期望信号不同,基本原理则是相同的。Adaptive filters can be applied to automatic equalization, echo cancellation, antenna array beamforming in the communication field, and parameter identification, noise elimination, and spectrum estimation of signal processing in other related fields. For different applications, only the added input signal and the expected signal are different, but the basic principle is the same.
(2)滤波器组(2) filter bank
滤波器组是指一组滤波器,它们有着共同的输入信号,或有着共同的输出信号。例如,假设滤波器组为有着共同的输入信号s(n)的滤波器组,那么s(n)通过这一组滤波器(假设包括有M个滤波器)后,得到的y
0(n)、y
1(n)、……、y
M-1(n)是其子带信号,它们的频谱在理想情况下是没有交叠的。
A filter bank is a set of filters that share a common input signal or have a common output signal. For example, assuming that the filter bank is a filter bank with a common input signal s(n), then after s(n) passes through this set of filters (assuming that there are M filters), the obtained y 0 (n) , y 1 (n), . . . , y M-1 (n) are sub-band signals, and their frequency spectrums are ideally non-overlapping.
(3)分析滤波器组(3) Analysis filter bank
具有共同的输入信号,获得M个子带信号的称为分析滤波器组(假设包括M个滤波 器)。With a common input signal, the one that obtains M subband signals is called an analysis filter bank (assuming it includes M filters).
(4)子带信号(4) Sub-band signal
参考通信领域的频分多路复用,假设在60kHZ和72kHZ间,有3个信道所占据的频率范围分别为60-64kHZ、64-68kHZ、68-72kHZ,那么这3个信道所占据的频率范围就称为子带。Referring to frequency division multiplexing in the communication field, assuming that between 60kHZ and 72kHZ, there are three channels occupying the frequency ranges of 60-64kHZ, 64-68kHZ, and 68-72kHZ, then the frequencies occupied by these three channels The ranges are called subbands.
这里需要说明的是,在本文中,“麦克风”是指用于采集声音并且将其转换为对应的电信号的设备。“扬声器”是指用于基于音频数据将电信号转换为声音的设备。术语“环境声音”在本文中指示主动降噪设备所处的外部环境中存在并且被主动降噪设备采集到的声音,其可以是一种或多种声音的组合,例如语音、音乐、噪声等。It should be noted here that, in this article, "microphone" refers to a device for collecting sound and converting it into a corresponding electrical signal. "Speaker" means a device used to convert electrical signals into sound based on audio data. The term "environmental sound" herein refers to the sound existing in the external environment where the active noise reduction device is located and collected by the active noise reduction device, which may be a combination of one or more sounds, such as speech, music, noise, etc. .
下面结合附图,对本申请的实施例进行描述。本领域普通技术人员可知,随着技术的发展和新场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。Embodiments of the present application are described below in conjunction with the accompanying drawings. Those of ordinary skill in the art know that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
首先,对本申请实施例所涉及的主动降噪设备的架构进行说明,具体请参阅图2,图2为本申请实施例提供的主动降噪设备的架构的一个示意图,该主动降噪设备包括参考麦克风(可简称参考麦)、误差麦克风(可简称误差麦)、扬声器以及主动降噪系统(即图2中所述的ANC,也就是本申请实施例所提供的基于FxLMS结构的主动降噪系统),其中,参考麦靠近声源处安装,误差麦靠近人耳处安装。First, the architecture of the active noise reduction device involved in the embodiment of the present application will be described. For details, please refer to FIG. 2. FIG. 2 is a schematic diagram of the architecture of the active noise reduction device provided by the embodiment of the present application. A microphone (referred to as a reference microphone), an error microphone (referred to as an error microphone), a speaker, and an active noise reduction system (that is, the ANC described in Figure 2, which is the active noise reduction system based on the FxLMS structure provided by the embodiment of the present application ), where the reference microphone is installed close to the sound source, and the error microphone is installed close to the human ear.
为进一步理解本申请实施例所述的主动降噪设备,图3示出了可以部署本申请实施例提供的基于FxLMS结构的主动降噪系统的主动降噪设备10的示意图。在一个实施例中,主动降噪设备10例如可以是诸如真无线立体声(true wireless stereo,TWS)耳机之类的与耳朵接触的音频播放设备。主动降噪设备10可以包括一对耳机,并且两个耳机11和12彼此基本上被相同地配置。因此仅以一个耳机11进行示意性描述。耳机11包括外置的参考麦克风13、位于耳机11内部的处理器17、位于耳机11内部(相对于暴露于环境的外置的参考麦克风13而言)的入耳部或与耳朵接触部的第一扬声器15以及残差麦克风14。参考麦克风13被配置为检测或采集外部环境的声音。To further understand the active noise reduction device described in the embodiment of the present application, FIG. 3 shows a schematic diagram of an active noise reduction device 10 that can deploy the active noise reduction system based on the FxLMS structure provided by the embodiment of the present application. In one embodiment, the active noise reduction device 10 may be, for example, an audio playback device that is in contact with the ear, such as a true wireless stereo (true wireless stereo, TWS) earphone. The active noise reduction device 10 may include a pair of earphones, and the two earphones 11 and 12 are configured substantially identically to each other. Therefore, only one earphone 11 is schematically described. The earphone 11 includes an external reference microphone 13, a processor 17 inside the earphone 11, a first ear-in or ear-contacting part inside the earphone 11 (relative to the external reference microphone 13 exposed to the environment). Loudspeaker 15 and residual microphone 14. The reference microphone 13 is configured to detect or collect sounds of the external environment.
虽然在图3中示出了主动降噪设备10的可能配置,但是这仅是示意而非对本公开的范围进行限制。例如,在一些实施例中,两个耳机11和12可以仅具有一个处理器17,并且通过诸如蓝牙信号传输之类的无线传输方式来传输无线信号以实现两个耳机11和12对单个处理器17的共享。在另一实施例中,两个耳机11和12也可以共享单个的参考麦克风13。Although a possible configuration of the active noise reduction device 10 is shown in FIG. 3 , this is illustrative only and does not limit the scope of the present disclosure. For example, in some embodiments, the two earphones 11 and 12 may only have one processor 17, and wireless signals are transmitted through wireless transmission methods such as Bluetooth signal transmission to realize the pairing of the two earphones 11 and 12 to a single processor. 17 shares. In another embodiment, the two earphones 11 and 12 can also share a single reference microphone 13 .
在一个实施例中,主动降噪设备10外置的参考麦克风13对环境声音进行采集,并且进行声电转换以生成连续的电信号并且传输至处理器17。处理器17基于所接收的信号来预测或估计后续时刻的环境声音,并且生成表示后续时刻的环境声音的反相信号并将其传输至第一扬声器15。在本文中,“反相信号”表示对音频信号进行反相操作之后操作的信号,例如通过对音频采样点的符号直接取反或是进一步处理。与之相对的,未被反相的信号可以被称为“正相信号”。扬声器播放的反相信号用于与直达主动降噪设备10内部的直达声音(正相声音)在一定程度上相互抵消以降低耳朵内部感知到的声音。第一扬声器15基于所接收的反相信号来播放反相声音,以与后续时刻的从环境直达主动降噪设备10内的直达环境声音进行抵消,从而实现降噪的效果。In one embodiment, the external reference microphone 13 of the active noise reduction device 10 collects ambient sound, and performs acoustic-electric conversion to generate a continuous electrical signal and transmits it to the processor 17 . The processor 17 predicts or estimates the ambient sound at a subsequent time based on the received signal, and generates an inverse signal representing the ambient sound at the subsequent time and transmits it to the first speaker 15 . In this context, "inverted signal" refers to a signal that is manipulated after inverting the audio signal, eg by directly inverting the sign of the audio sample point or by further processing. In contrast, a signal that is not inverted may be referred to as a "normal phase signal". The out-of-phase signal played by the speaker is used to cancel the direct sound (in-phase sound) directly inside the active noise reduction device 10 to a certain extent, so as to reduce the sound perceived by the ear. The first loudspeaker 15 plays the anti-phase sound based on the received anti-phase signal, so as to offset the direct ambient sound directly from the environment to the ANC device 10 at a subsequent moment, so as to achieve the effect of noise reduction.
虽然在图3中以TWS耳机示出了主动降噪设备10的示意配置,但是可以理解本公开的范围不限于此。例如,在图4中以头戴式耳机示出了主动降噪设备的另一可能配置,即耳罩式耳机。如图4所示,主动降噪设备20可以包括一对耳罩部分,并且两个耳罩部分彼此基本上被相同地配置。因此仅以一个耳罩部分进行示意性描述。耳罩部分包括外置的第一麦克风13、第二麦克风19和位于耳罩部分内部的处理器17。耳罩部分还包括位于耳罩部分内部(相对于暴露于环境的第一麦克风13和第二麦克风19而言)的第一残差麦克风14、第二残差麦克风16、第一扬声器15和第二扬声器18。第一麦克风13和第二麦克风19均被配置为检测或采集外部环境的声音,并且第一麦克风13和第二麦克风19可以同时操作或交替操作并且可以采集相同或不同的声音。在一个实施例中,第一麦克风13可以具有内部的第一滤波器以仅采集第一频率的声音,并且第二麦克风19可以具有内部的第二滤波器以仅采集第二频率的声音。例如,第一频率是低频,并且第二频率是中高频。通过针对不同频率来捕捉声音,可以获得更多的环境声音细节以实现更好的声音估计,从而获得更好的降噪宽度和降噪深度。Although a schematic configuration of the active noise reduction device 10 is shown in FIG. 3 as a TWS earphone, it is understood that the scope of the present disclosure is not limited thereto. For example, another possible configuration of an active noise reduction device is illustrated in FIG. 4 as a headset, namely around-ear headphones. As shown in FIG. 4 , the active noise reduction device 20 may include a pair of ear cup parts, and the two ear cup parts are configured substantially identically to each other. Therefore, only one cap part is schematically depicted. The earmuff part includes an external first microphone 13, a second microphone 19 and a processor 17 inside the earmuff part. The ear cup portion also includes a first residual microphone 14, a second residual microphone 16, a first loudspeaker 15 and a second residual microphone 14 located inside the ear cup portion (relative to the first microphone 13 and the second microphone 19 exposed to the environment). Two loudspeakers 18 . Both the first microphone 13 and the second microphone 19 are configured to detect or collect the sound of the external environment, and the first microphone 13 and the second microphone 19 may operate simultaneously or alternately and may collect the same or different sounds. In one embodiment, the first microphone 13 may have an internal first filter to only collect the sound of the first frequency, and the second microphone 19 may have an internal second filter to only collect the sound of the second frequency. For example, the first frequency is a low frequency and the second frequency is a mid to high frequency. By capturing sounds for different frequencies, more ambient sound details can be obtained for better sound estimation, resulting in better noise reduction width and depth.
在一个实施例中,主动降噪设备20的外置的第一麦克风13和第二麦克风19对环境声音进行采集,并且进行声电转换以生成连续的电信号并且传输至处理器17。处理器17基于所接收的信号来预测或估计后续时刻的环境声音,并且生成表示后续时刻的环境声音的反相信号并将其传输至内置的第一扬声器15和第二扬声器18。第一扬声器15和第二扬声器18基于所接收的反相信号来播放反相声音以与后续时刻的从环境直达主动降噪设备20内的直达环境声音进行抵消,从而实现降噪的效果。In one embodiment, the external first microphone 13 and second microphone 19 of the active noise reduction device 20 collect ambient sound, and perform acoustic-electric conversion to generate a continuous electrical signal and transmit it to the processor 17 . The processor 17 predicts or estimates the ambient sound at a subsequent time based on the received signal, and generates an inverse signal representing the ambient sound at a subsequent time and transmits it to the built-in first speaker 15 and second speaker 18 . The first speaker 15 and the second speaker 18 play the anti-phase sound based on the received anti-phase signal to offset the direct ambient sound from the environment directly to the active noise reduction device 20 at a subsequent moment, so as to achieve the effect of noise reduction.
备选地,主动降噪设备除了可以是如上述所述的主动降噪设备10、主动降噪设备20意外,例如还可以是通过骨传导来传递音频的其他类型的主动降噪设备,具体本申请不再举例示意。Alternatively, besides the active noise reduction device 10 and the active noise reduction device 20 as described above, the active noise reduction device can also be other types of active noise reduction devices that transmit audio through bone conduction. The application does not give an example.
此外,图5还示出了本申请提供的主动降噪设备的示意框图。应当理解,图5所示出的主动降噪设备100仅仅是示例性的,例如用于示出图3的主动降噪设备10的一种可能实现方式,或,用于示出图4的主动降噪设备20的一种可能实现方式,而不应当构成对本申请所描述的实现的功能和范围的任何限制。在一个实施例中,主动降噪设备100可以包括以实线框和实线示出的处理器110、无线通信模块160、天线1、音频模块170、扬声器模块170A、麦克风模块170C、按键190、内部存储器121、通用串行总线(universal serial bus,USB)接口130、充电管理模块140、电源管理模块141。In addition, FIG. 5 also shows a schematic block diagram of the active noise reduction device provided by the present application. It should be understood that the active noise reduction device 100 shown in FIG. 5 is only exemplary, for example, to illustrate a possible implementation of the active noise reduction device 10 in FIG. A possible implementation of the noise reduction device 20 should not constitute any limitation on the functions and scope of the implementation described in this application. In one embodiment, the active noise reduction device 100 may include a processor 110, a wireless communication module 160, an antenna 1, an audio module 170, a speaker module 170A, a microphone module 170C, buttons 190, An internal memory 121 , a universal serial bus (universal serial bus, USB) interface 130 , a charging management module 140 , and a power management module 141 .
处理器110例如可以是图3的处理器17,并且可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP)、调制解调处理器、图形处理器(graphics processing unit,GPU)、图像信号处理器(image signal processor,ISP)、控制器、视频编解码器、数字信号处理器(digital signal processor,DSP)、基带处理器和/或神经网络处理器(neural-network processing unit,NPU)等。在一些实施例中,不同的处理单元可以是独立的器件。在另一些实施例中,不同的处理单元也可以集成在一个或多个处理器中。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The processor 110 may be, for example, the processor 17 in FIG. 3 , and may include one or more processing units. For example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor ( graphics processing unit (GPU), image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor and/or neural network processor ( neural-network processing unit, NPU), etc. In some embodiments, the different processing units may be separate devices. In other embodiments, different processing units can also be integrated in one or more processors. The controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
处理器110中还可以设置存储器,用于存储指令和数据。内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行主动降噪设备100的各种功能应用以及数据处理。A memory may also be provided in the processor 110 for storing instructions and data. The internal memory 121 may be used to store computer-executable program codes including instructions. The internal memory 121 may include an area for storing programs and an area for storing data. The processor 110 executes various functional applications and data processing of the active noise reduction device 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
主动降噪设备100可以通过音频模块170、扬声器模块170A、麦克风模块170C以及应用处理器等实现音频功能。例如音乐播放,录音等。音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The active noise reduction device 100 may implement audio functions through the audio module 170 , the speaker module 170A, the microphone module 170C, an application processor, and the like. Such as music playback, recording, etc. The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be set in the processor 110 , or some functional modules of the audio module 170 may be set in the processor 110 .
扬声器模块170A,也称“喇叭”,用于将音频电信号转换为声音信号。主动降噪设备100可以通过扬声器模块170A收听音乐,或收听免提通话。麦克风模块170C,也称“话筒”、“传声器”。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风模块170C发声,将声音信号输入到麦克风模块170C。The speaker module 170A, also referred to as a "horn", is used to convert audio electrical signals into sound signals. The active noise reduction device 100 can listen to music through the speaker module 170A, or listen to a hands-free call. The microphone module 170C is also called "microphone" or "microphone". When making a call or sending a voice message, the user can approach the microphone module 170C to make a sound through the mouth, and input the sound signal to the microphone module 170C.
在另一些实施例中,主动降噪设备100还可以包括天线2和移动通信模块150。除了上述部件之外,主动降噪设备100还可以包括以虚线和虚线框示出的外部存储器接口120、电池142、受话器170B、耳机接口170D、传感器模块180、马达191、指示器192、摄像头193、显示屏194、以及用户标识模块(subscriber identification module,SIM)卡接口195中的一项或多项。传感器模块180可以包括压力传感器180A、陀螺仪传感器180B、气压传感器180C、磁传感器180D、加速度传感器180E、距离传感器180F、接近光传感器180G、指纹传感器180H、温度传感器180J、触摸传感器180K、环境光传感器180L、骨传导传感器180M中的一项或多项。传感器模块180还可以包括其它被未列出的其它类型的传感器。In some other embodiments, the active noise reduction device 100 may further include an antenna 2 and a mobile communication module 150 . In addition to the above components, the active noise reduction device 100 may also include an external memory interface 120, a battery 142, a receiver 170B, an earphone interface 170D, a sensor module 180, a motor 191, an indicator 192, and a camera 193, which are shown in dotted lines and dotted lines. , a display screen 194, and one or more of a subscriber identification module (subscriber identification module, SIM) card interface 195. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor One or more of 180L and bone conduction sensor 180M. The sensor module 180 may also include other types of sensors not listed.
可以理解的是,本发明实施例示意的结构并不构成对主动降噪设备100的具体限定。在本申请另一些实施例中,主动降噪设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the active noise reduction device 100 . In other embodiments of the present application, the active noise reduction device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange different components. The illustrated components can be realized in hardware, software or a combination of software and hardware.
在上述所述的主动降噪设备的基础上,接下来对本申请实施例提供的基于FxLMS结构的主动降噪系统进行说明,具体请参阅图6,图6为本申请实施例提供的基于FxLMS结构的主动降噪系统的一个示意图,该系统应用于主动降噪设备,具体可以包括:初级通路自适应滤波器W(z)601、次级通路自适应滤波器
602以及子带滤波器组603,其中,子带滤波器组603包括M个带通滤波器,不同的带通滤波器具有不同的通带,可分别称为G
0(z)、G
1(z)、……、G
M-1(z),M≥1。
On the basis of the above-mentioned active noise reduction equipment, the active noise reduction system based on the FxLMS structure provided by the embodiment of the present application will be described next. Please refer to Figure 6 for details. A schematic diagram of the active noise reduction system of , which is applied to active noise reduction equipment, and may specifically include: primary path adaptive filter W(z)601, secondary path adaptive filter 602 and a subband filter bank 603, wherein the subband filter bank 603 includes M bandpass filters, and different bandpass filters have different passbands, which can be called G 0 (z), G 1 ( z), ..., G M-1 (z), M≥1.
具体地,初级通路自适应滤波器W(z)601,用于模拟初级通路,其中,初级通路表示主动降噪设备的参考麦克风处的外界环境声音(可称为第一信号)传输到主动降噪设备的扬声器处所通过的物理路径,因此该初级通路也可称为空气通路;次级通路自适应滤波器
602,用于模拟次级通路,其中,次级通路表示第二信号传输到扬声器处所通过的电路路径,第二信号为初级通路自适应滤波器W(z)601的输出信号与目标播放声音(如,耳机播放的音乐)运算后的信号,例如,该运算可以是初级通路自适应滤波器W(z)601的输 出信号与目标播放声音进行相加;子带滤波器组603,用于基于目标播放声音调整次级通路自适应滤波器
602的滤波器系数。
Specifically, the primary path adaptive filter W(z) 601 is used to simulate the primary path, where the primary path represents the external ambient sound (which may be called the first signal) at the reference microphone of the active noise reduction device is transmitted to the active noise reduction device. The physical path passed by the loudspeaker of the noisy device, so the primary path can also be called the air path; the secondary path adaptive filter 602, used to simulate the secondary path, wherein the secondary path represents the circuit path through which the second signal is transmitted to the speaker, and the second signal is the output signal of the primary path adaptive filter W(z) 601 and the target playback sound ( For example, the calculated signal of the music played by the earphones, for example, the calculation can be the addition of the output signal of the primary path adaptive filter W(z) 601 and the target playback sound; the subband filter bank 603 is used to Target Playback Sound Adjustment Secondary Path Adaptive Filter 602 filter coefficients.
需要说明的是,在本申请的一些实施方式中,该主动降噪系统还可以包括采样模块604,采样模块604可对信号进行上采样或下采样,具体地,可以用于:It should be noted that, in some embodiments of the present application, the active noise reduction system may further include a sampling module 604, and the sampling module 604 may perform up-sampling or down-sampling on the signal, specifically, it may be used for:
(1)对子带滤波器组603中每个带通滤波器的输出信号进行下采样。(1) Downsampling the output signal of each bandpass filter in the subband filter bank 603 .
对子带滤波器组603中每个带通滤波器的输出信号进行下采样,得到下采样信号,假设有M个带通滤波器,则共得到M个下采样信号,得到的M个下采样信号再作为次级通路自适应滤波器
602的输入信号。
The output signal of each band-pass filter in the sub-band filter bank 603 is down-sampled to obtain a down-sampled signal. Assuming that there are M band-pass filters, M down-sampled signals are obtained in total, and the obtained M down-sampled signals The signal is then used as a secondary path adaptive filter 602 input signal.
在本申请实施例中,下采样的目的有2个:1、将每个带通滤波器各自通过的特定频段展宽,实现白噪声化,白噪声化的信号是为了用于调整次级通路自适应滤波器
的系数;2、降低次级通路自适应滤波器
的计算量。
In the embodiment of the present application, there are two purposes of downsampling: 1. Broaden the specific frequency band passed by each bandpass filter to realize white noise. The white noise signal is used to adjust the secondary channel self- adaptive filter coefficient; 2, reduce the secondary path adaptive filter calculation amount.
(2)对次级通路自适应滤波器
602的输出信号进行上采样。
(2) Adaptive filter for the secondary path The output signal of 602 is up-sampled.
对次级通路自适应滤波器
602的输出信号进行上采样,得到上采样信号,一个上采样信号对应一个下采样信号,假设有M个带通滤波器,也就有M个下采样信号和M个上采样信号。
Adaptive filter for secondary path The output signal of 602 is up-sampled to obtain an up-sampled signal. One up-sampled signal corresponds to one down-sampled signal. Assuming that there are M band-pass filters, there are M down-sampled signals and M up-sampled signals.
为便于理解本申请实施例所提供的基于FxLMS结构的主动降噪系统,下面分别对该主动降噪系统所包括的初级通路自适应滤波器W(z)、次级通路自适应滤波器
子带滤波器组进行详细说明:
In order to facilitate the understanding of the active noise reduction system based on the FxLMS structure provided by the embodiment of the present application, the primary path adaptive filter W(z) and the secondary path adaptive filter included in the active noise reduction system are as follows: The subband filter bank is described in detail:
一、初级通路自适应滤波器W(z)1. Primary path adaptive filter W(z)
具体请参阅图7,图7为本申请实施例提供的初级通路自适应滤波器W(z)的一个示意图,该初级通路自适应滤波器W(z)可以是一个FIR滤波器(别的滤波器也可以,本申请对此不做限定,此处仅为示意),作用是用于表征估计的真实初级通路P(z)(包括主动降噪设备的被动降噪材料以及耳罩和扬声器之间的空气通路),以进行后续降噪步骤,其阶数可以设定为128阶(其他阶数也可以,本申请对此不做限定,此处仅为示意),假定实际初级通路阶数在几十阶左右,估计时多余设定的滤波器阶数会在运算后逼近于0,该初级通路自适应滤波器W(z)是一个基于LMS算法的自适应滤波器,LMS自适应滤波器原理图如图7所示,x(n)为输入信号(即上述所述的第一信号,也就是外界噪声),y(n)为初级通路自适应滤波器W(z)的输出结果,用于进行后续降噪操作,d(n)为经过真实的初级通路的输出信号,即待降噪信号,e(n)为误差信号,用于对滤波器系数进行调整,即初级通路自适应滤波器W(z)的滤波器系数可以根据下列式(1)进行更新,反复迭代使得最后得到的误差信号e(n)尽量小。Please refer to FIG. 7 for details. FIG. 7 is a schematic diagram of the primary path adaptive filter W(z) provided by the embodiment of the present application. The primary path adaptive filter W(z) can be a FIR filter (other filtering The device can also be used, this application is not limited to this, it is only shown here), the role is to characterize the estimated real primary path P(z) (including the passive noise reduction material of the active noise reduction device and the connection between the earmuffs and the speaker The air passage between them) for subsequent noise reduction steps, the order can be set to 128 (other orders are also possible, this application does not limit this, here is only for illustration), assuming the actual primary passage order At about tens of orders, the filter order that is redundantly set during estimation will approach 0 after operation. The primary path adaptive filter W(z) is an adaptive filter based on the LMS algorithm, and the LMS adaptive filter The schematic diagram of the circuit breaker is shown in Figure 7, x(n) is the input signal (that is, the first signal mentioned above, that is, external noise), and y(n) is the output result of the primary path adaptive filter W(z) , used for subsequent noise reduction operations, d(n) is the output signal of the real primary channel, that is, the signal to be denoised, and e(n) is the error signal, used to adjust the filter coefficients, that is, the primary channel from The filter coefficients of the adaptive filter W(z) can be updated according to the following formula (1), and repeated iterations make the final error signal e(n) as small as possible.
y(n)=x(n)*w(n)y(n)=x(n)*w(n)
e(n)=y(n)-d(n) (1)e(n)=y(n)-d(n) (1)
w(n+1)=w(n)+μe(n)x(n)w(n+1)=w(n)+μe(n)x(n)
其中,w(n)为第n轮次初级通路自适应滤波器W(z)的滤波器系数,w(n+1)为第n+1轮次初级通路自适应滤波器W(z)的滤波器系数,μ为步长系数。Among them, w(n) is the filter coefficient of the primary channel adaptive filter W(z) of the nth round, and w(n+1) is the filter coefficient of the primary channel adaptive filter W(z) of the n+1th round Filter coefficient, μ is the step size coefficient.
需要说明的是,在本申请实施例中,由于通过降噪滤波器W(z)后的信号会再经过次级 通路S(z)后通过扬声器播放出来,如果不考虑这部分的影响,可能会造成调整的初级通路自适应滤波器W(z)的滤波器系数(也可称为初级通路系数)得到的反向声波幅值和相位与外界噪声经过初级通路到达扬声器后的值有所区别,影响抵消效果,因此为了抵消次级通路对于降噪的干扰作用,把估算得到的次级通路自适应滤波器
的滤波器系数(也可称为次级通路系数)放置于初级通路自适应滤波器W(z)部分,具体如图8所示,图8为本申请实施例提供的估计初级通路系数的自适应滤波器原理的一个示意图,此时初级通路自适应滤波器W(z)的更新公式如下式(2)所示:
It should be noted that, in the embodiment of this application, since the signal after passing through the noise reduction filter W(z) will pass through the secondary channel S(z) and then be played out through the speaker, if the influence of this part is not considered, it may It will cause the adjusted filter coefficient of the primary path adaptive filter W(z) (also known as the primary path coefficient) to obtain a reverse sound wave amplitude and phase that are different from the value of the external noise after reaching the speaker through the primary path , which affects the cancellation effect, so in order to counteract the interference effect of the secondary channel on noise reduction, the estimated secondary channel adaptive filter The filter coefficients (also referred to as secondary path coefficients) are placed in the primary path adaptive filter W(z) part, specifically as shown in Figure 8, Figure 8 is the self-assessment of primary path coefficients provided by the embodiment of the present application A schematic diagram of the adaptive filter principle. At this time, the update formula of the primary channel adaptive filter W(z) is shown in the following formula (2):
y(n)=x(n)*w(n)y(n)=x(n)*w(n)
e(n)=y(n)*s(n)-d(n) (2)e(n)=y(n)*s(n)-d(n) (2)
其中,
为第n轮次次级通路自适应滤波器
的滤波器系数,s(n)是实际的次级通路(即电通路)的系数,w(n)为第n轮次初级通路自适应滤波器W(z)的滤波器系数,w(n+1)为第n+1轮次初级通路自适应滤波器W(z)的滤波器系数,μ为步长系数。
in, secondary path adaptive filter for the nth round s(n) is the coefficient of the actual secondary path (i.e. electrical path), w(n) is the filter coefficient of the nth round primary path adaptive filter W(z), w(n +1) is the filter coefficient of the primary path adaptive filter W(z) of the n+1th round, and μ is the step size coefficient.
为便于理解本申请实施例所述的次级通路自适应滤波器
先对已知的次级通路自适应滤波器的框图进行介绍,具体请参阅图9,图9为已有的次级通路自适应滤波器
的框图,在图9所示的框图下,次级通路自适应滤波器
的滤波器系数采用如下式(3)进行调整:
In order to facilitate the understanding of the secondary path adaptive filter described in the embodiment of the present application First introduce the block diagram of the known secondary path adaptive filter, please refer to Figure 9 for details, and Figure 9 shows the existing secondary path adaptive filter The block diagram, under the block diagram shown in Figure 9, the secondary path adaptive filter The filter coefficients of are adjusted using the following formula (3):
e
1(n)=d(n)+y(n)*s(n)
e 1 (n)=d(n)+y(n)*s(n)
其中,y(n)是经过初级通路自适应滤波器W(z)的输出信号,d(n)是外界噪声经过初级通路所得到待降噪信号,S(z)是次级通路(即电通路),
是被搬移到初级通路的次级通路自适应滤波器,e
1(n)是扬声器接收到的残留误差信号,e
2(n)整体滤波器系数调整信号(即误差信号),music(n)为目标播放声音,μ为步长系数,
为第n轮次次级通路自适应滤波器
的滤波器系数,
为第n+1轮次次级通路自适应滤波器
的滤波器系数,s(n)是实际的次级通路(即电通路)的系数。
Among them, y(n) is the output signal of the adaptive filter W(z) in the primary channel, d(n) is the signal to be de-noised obtained by passing the external noise through the primary channel, and S(z) is the secondary channel (i.e. path), is the secondary path adaptive filter moved to the primary path, e 1 (n) is the residual error signal received by the loudspeaker, e 2 (n) the overall filter coefficient adjustment signal (ie error signal), music(n) Play the sound for the target, μ is the step factor, secondary path adaptive filter for the nth round filter coefficients, Secondary path adaptive filter for round n+ 1 The filter coefficients of s(n) are the coefficients of the actual secondary path (ie, the electrical path).
因为采用FxLMS结构的基础框架进行主动降噪系统构建,在输入信号通过主滤波器(即初级通路自适应滤波器W(z))前,先要通过搬移过来的次级通路自适应滤波器
由于主滤波器和次级通路自适应滤波器
调整过程中会相互影响,进而会极大影响调整的准确度。但次级通路和初级通路都是客观存在的,二者均需要进行自适应估计。目前一般的做法是设定次级通路自适应滤波器
的滤波器系数(即次级通路系数)已知,然后只调整主滤波器,或先给系统通入一段白噪声获得次级通路系数,然后次级通路系数设定一直保持固定,或当次级通路发生改变时再给系统通入一段白噪声再次进行建模。考虑到实际系统中次级通路是时变的,设定不变会影响主动降噪效果,因此需要在线建模。
Because the basic framework of the FxLMS structure is used to construct the active noise reduction system, before the input signal passes through the main filter (that is, the primary path adaptive filter W(z)), it must first pass through the moved secondary path adaptive filter Since the main filter and the secondary path adaptive filter The adjustment process will affect each other, which will greatly affect the accuracy of the adjustment. However, both the secondary pathway and the primary pathway exist objectively, and both require adaptive estimation. The current general practice is to set the secondary path adaptive filter The filter coefficients (i.e., the secondary channel coefficients) are known, and then only the main filter is adjusted, or a period of white noise is passed through the system to obtain the secondary channel coefficients, and then the secondary channel coefficients are kept fixed, or when When the stage path changes, a section of white noise is passed into the system to model again. Considering that the secondary path in the actual system is time-varying, the constant setting will affect the active noise reduction effect, so online modeling is required.
而在对次级通路建模需要合适的建模信号,最好的建模信号是白噪声,因为作为全频段信号建模时可以充分考虑到次级通路对所有允许通过的频率的信号的适用性。但是在实 际使用中,由于建模信号会通过扬声器播放被麦克风接收,考虑到用户体验的舒适度,实际使用的建模信号是用户播放的音乐信号。但是音乐信号的特点是谐波处丰富,且谐波处能量大,非谐波处能量低,而自适应滤波器的调整原理即调整时的步长选择与输入信号的特征值有关,由于音乐信号的相关性强,特征值接近零,步长需设得较小,严重影响自适应滤波器收敛速度。此外,根据LMS的原理,两个自适应滤波器的滤波器系数的更新都是采用误差信号来进行调整的,而由于扬声器播放和外界噪声反向同相位声波抵消,在抵消效果好的情况下参考麦克得到残留噪声即为用来更新滤波器系数的误差,而系统整体原理是通过调整自适应滤波器系数使得这个误差信号变小。根据LMS算法原理,次级通路自适应滤波器
的更新公式为下述式(4)所示:
While modeling the secondary path requires a suitable modeling signal, the best modeling signal is white noise, because when modeling as a full-band signal, the applicability of the secondary path to signals of all frequencies that are allowed to pass can be fully considered sex. However, in actual use, since the modeling signal will be played by the speaker and received by the microphone, considering the comfort of the user experience, the actually used modeling signal is the music signal played by the user. However, music signals are characterized by rich harmonics, high energy at harmonics, and low energy at non-harmonics, and the adjustment principle of the adaptive filter is that the selection of the step size during adjustment is related to the characteristic value of the input signal. The correlation of the signal is strong, the eigenvalue is close to zero, and the step size needs to be set small, which seriously affects the convergence speed of the adaptive filter. In addition, according to the principle of LMS, the update of the filter coefficients of the two adaptive filters is adjusted by using the error signal, and due to the reverse in-phase sound wave cancellation of the speaker playback and external noise, when the cancellation effect is good The residual noise obtained by referring to the microphone is the error used to update the filter coefficients, and the overall principle of the system is to reduce the error signal by adjusting the adaptive filter coefficients. According to the principle of LMS algorithm, the secondary path adaptive filter The update formula of is shown in the following formula (4):
其中,e(n)为误差信号,x(n-i)为输入的音乐信号,将求期望的梯度简化,自适应滤波器更新函数可得
实际应用中的音乐信号和误差信号并非完全不相关,因此使用简化后的更新函数,会导致自适应滤波器的滤波器系数更新得并不准确。
Among them, e(n) is the error signal, x(ni) is the input music signal, the expected gradient is simplified, and the adaptive filter update function can be obtained The music signal and the error signal in practical applications are not completely irrelevant, so using the simplified update function will cause the filter coefficients of the adaptive filter to be updated inaccurately.
综上所述,基于FxLMS结构的主动降噪系统不适合直接用音乐信号建模,因此在本申请实施例中,采用子带分解的方式将音乐信号白噪声化,消除其相关性以更好的进行次级通路建模,因此在本申请实施例中,次级通路自适应滤波器
采取的实际结构如图10所示,图10为本申请实施例提供的次级通路自适应滤波器
与子带滤波器组(G
0(z)、G
1(z)、……、G
M-1(z))、采样模块之间的结构框图,在图10中,子带滤波器组(G
0(z)、G
1(z)、……、G
M-1(z))可以把输入的宽频带信号分解到对应的频带上;并且为了实现白噪声化,本申请实施例采用采用模块对子带滤波器组中每个带通滤波器的输出信号进行下采样,即将每个带通滤波器各自通过的特定频段展宽,以实现白噪声化,白噪声化的信号是为了用于调整次级通路自适应滤波器
的系数;同时下采样操作还可以降低次级通路自适应滤波器
的计算量。经过上述子带分解和下采样操作后在各自频带上的信号,可以认为近似于白噪声(不直接用白噪声是为了同步,因为用户听的就是目标播放声音,直接播放白噪声会造成用户体验不好),然后把各频带信号顺次通过同一次级通路自适应滤波器
分别得到各频带经过滤波之后的信号,之后,再由采样模块对其进行上采样恢复原采样率,再经过同样的带通滤波器并求和,即将各个分解的频带还原,理论上得到的是经过模拟次级通路系数的自适应滤波的目标播放声音,与e
1(n)进行运算之后得到用于调整全系统的误差信号e
2(n),因为用于通过次级通路自适应滤波器
的目标播放声音分解并下采样后的,因此用于调整滤波器的误差e
2(n)也要进行同样的操作。
To sum up, the active noise reduction system based on the FxLMS structure is not suitable for direct modeling with music signals. Therefore, in the embodiment of this application, the music signal is whitened by sub-band decomposition, and its correlation is eliminated to better The secondary path modeling is carried out, so in the embodiment of this application, the secondary path adaptive filter The actual structure adopted is shown in Figure 10, and Figure 10 is the secondary path adaptive filter provided by the embodiment of the present application and the subband filter bank (G 0 (z), G 1 (z), ..., G M-1 (z)), the structural block diagram between the sampling module, in Fig. 10, the subband filter bank ( G 0 (z), G 1 (z), ..., G M-1 (z)) can decompose the input broadband signal into corresponding frequency bands; and in order to achieve white noise, the embodiment of the present application adopts The module down-samples the output signal of each band-pass filter in the sub-band filter bank, that is, to widen the specific frequency band passed by each band-pass filter to achieve white noise. The white-noise signal is used for Tuning Secondary Path Adaptive Filters The coefficient; at the same time, the downsampling operation can also reduce the secondary path adaptive filter calculation amount. After the above sub-band decomposition and down-sampling operations, the signals on the respective frequency bands can be considered to be similar to white noise (white noise is not directly used for synchronization, because what the user listens to is the target playback sound, directly playing white noise will cause user experience Not good), and then pass the signals of each frequency band through the same secondary channel adaptive filter in sequence The filtered signals of each frequency band are respectively obtained, and then the sampling module performs up-sampling to restore the original sampling rate, and then passes through the same band-pass filter and sums to restore the decomposed frequency bands. Theoretically, the result is The target playback sound after the adaptive filtering of the simulated secondary channel coefficients is calculated with e 1 (n) to obtain the error signal e 2 (n) used to adjust the whole system, because it is used to pass through the secondary channel adaptive filter The target playback sound is decomposed and downsampled, so the error e 2 (n) used to adjust the filter should also be operated in the same way.
需要说明的是,由图10的系统框图可知,子带滤波器组的输入信号可以包括如下几种:目标播放声音、采样模块输出的上采样信号、系统的误差信号。下面基于不同的情况分别进行说明:It should be noted that, as can be seen from the system block diagram in FIG. 10 , the input signals of the sub-band filter bank may include the following types: target playback sound, up-sampling signal output by the sampling module, and system error signal. The following is an explanation based on different situations:
(1)子带滤波器组的输入信号为目标播放声音的情况(1) When the input signal of the subband filter bank is the target playback sound
在子带滤波器组的输入信号为目标播放声音的情况下,采样模块则用于:对子带滤波器组中每个带通滤波器输出的信号(可称为第一输出信号)进行下采样,例如,进行m倍的下采样,得到下采样信号(可称为第一下采样信号),其中,一个第一输出信号对应一个 第一下采样信号,假设子带滤波器组包括的带通滤波器为M个,分别为G
0(z)、G
1(z)、……、G
M-1(z),则共有M个第一输出信号以及M个第一下采样信号。需要注意的是,在本申请实施例中,得到的M个第一下采样信号就作为次级通路自适应滤波器
的输入信号,次级通路自适应滤波器
基于该输入信号得到的输出信号可称为第二输出信号,据此就可以得到M个第二输出信号,该第二输出信号就用于调整整个系统的误差信号e
2(n)。
In the case that the input signal of the sub-band filter bank is the target playing sound, the sampling module is used for: down-sampling the output signal (which may be referred to as the first output signal) of each band-pass filter in the sub-band filter bank Sampling, for example, performing m-fold downsampling to obtain a downsampled signal (which may be referred to as a first downsampled signal), wherein one first output signal corresponds to one first downsampled signal, assuming that the subband filter bank includes a band There are M pass filters, respectively G 0 (z), G 1 (z), ..., G M-1 (z), and there are M first output signals and M first downsampling signals in total. It should be noted that, in the embodiment of this application, the obtained M first downsampled signals are used as the secondary path adaptive filter The input signal, the secondary path adaptive filter The output signal obtained based on the input signal can be called the second output signal, and M second output signals can be obtained accordingly, and the second output signal is used to adjust the error signal e 2 (n) of the whole system.
(2)子带滤波器组的输入信号为采样模块输出的上采样信号的情况(2) When the input signal of the subband filter bank is the upsampling signal output by the sampling module
在子带滤波器组的输入信号为整个系统的误差信号e
2(n)的情况下,采样模块则用于:对子带滤波器组中每个带通滤波器输出的信号(可称为第三输出信号)进行下采样,例如,进行m倍的下采样,得到下采样信号(可称为第二下采样信号),其中,一个第三输出信号对应一个第二下采样信号,得到的M个第二下采样信号就作为次级通路自适应滤波器
的输入信号,次级通路自适应滤波器
基于该输入信号得到的输出信号可称为第四输出信号,据此就可以得到M个第四输出信号,该第四输出信号就用于调整次级通路自适应滤波器
的滤波器系数,也就是用于估计次级通路系数。
In the case that the input signal of the sub-band filter bank is the error signal e 2 (n) of the whole system, the sampling module is used to: output the signal of each band-pass filter in the sub-band filter bank (which can be referred to as The third output signal) is down-sampled, for example, down-sampled by m times to obtain a down-sampled signal (which may be referred to as a second down-sampled signal), wherein a third output signal corresponds to a second down-sampled signal, and the obtained The M second downsampled signals are used as the secondary path adaptive filter The input signal, the secondary path adaptive filter The output signal obtained based on the input signal can be called the fourth output signal, and M fourth output signals can be obtained accordingly, and the fourth output signal is used to adjust the secondary path adaptive filter The filter coefficients of , that is, the coefficients used to estimate the secondary path.
(3)子带滤波器组的输入信号为系统的误差信号的情况(3) The case where the input signal of the subband filter bank is the error signal of the system
在子带滤波器组的输入信号为采样模块输出的上采样信号的情况下,整个系统的误差信号e
2(n)是基于子带滤波器组中每个带通滤波器输出的信号(可称为第五输出信号)与第三信号进行运算得到,其中,该第三信号为对第一信号(即外界噪声)和第二信号(即目标播放声音与初级通路自适应滤波器W(z)的输出信号运算后的信号)进行运算得到的信号。
In the case that the input signal of the subband filter bank is the upsampling signal output by the sampling module, the error signal e 2 (n) of the whole system is based on the signal output by each bandpass filter in the subband filter bank (which can be It is called the fifth output signal) and the third signal to obtain, wherein, the third signal is the first signal (i.e. external noise) and the second signal (i.e. the target playing sound and the primary path adaptive filter W(z ) The output signal of the calculated signal) The signal obtained by performing the calculation.
在本申请实施上述实施方式中,该主动降噪系统可以同时调整初级通路自适应滤波器W(z)的滤波器系数和次级通路自适应滤波器
的滤波器系数,此外,比起利用白噪声进行次级通路建模,直接利用用户待收听的目标播放声音建模提高了用户舒适度,更具有实用性。
In the implementation of the above embodiments in this application, the active noise reduction system can simultaneously adjust the filter coefficients of the primary path adaptive filter W(z) and the secondary path adaptive filter In addition, compared with using white noise for secondary channel modeling, directly using the target playback sound modeling to be listened to by the user improves user comfort and is more practical.
(4)子带滤波器组(4) Subband filter bank
在本申请实施例中,子带滤波器组是通过M个带通滤波器组G
0(z)、G
1(z)、……、G
M-1(z)把待处理频段分成等间隔小频率段,M≥1,滤波器初始值是采用公式生成的物理可实现滤波器组,但是采取数学方法进行滤波器组间重叠处理在频率和频率的交界处并不是平坦的。即在频率交界处存在能量的损失。即目标播放声音通过子带滤波器组进行分解合成后产生了一定的畸变,为了使得目标播放声音在经过子带分解/合成后能不产生畸变,考虑采用对子带滤波器组进行一定调整,调整方式的框图可以如图11所示,基于图11的框图,可利用下述式(5)进行微调:
In the embodiment of the present application, the subband filter bank divides the frequency band to be processed into equal intervals through M bandpass filter banks G 0 (z), G 1 (z), ..., G M-1 (z) For small frequency bands, M≥1, the initial value of the filter is a physically realizable filter bank generated by the formula, but the overlapping process between the filter banks is not flat at the junction of the frequency and the frequency by using a mathematical method. That is, there is a loss of energy at the frequency junction. That is, after the target playback sound is decomposed and synthesized by the sub-band filter bank, a certain distortion is generated. In order to prevent the target playback sound from being distorted after sub-band decomposition/synthesis, a certain adjustment of the sub-band filter bank is considered. The block diagram of the adjustment method can be shown in Figure 11. Based on the block diagram in Figure 11, the following formula (5) can be used for fine-tuning:
err(n)=x(n)-out(n) (5)err(n)=x(n)-out(n) (5)
其中,x(n)是标准的目标播放声音(如,音乐)的输入(此时x(n)跟上面的外界噪声信号不一样),err(n)和out(n)经过微调后的子带滤波器组分解合成后得到的目标播放声音的差值,用于和没有经过微调的子带滤波器组分解合成后得到的err(n)进行对比,对比方式可基于如下式(6):Among them, x(n) is the input of the standard target playing sound (such as music) (at this time, x(n) is different from the external noise signal above), err(n) and out(n) are fine-tuned The difference of the target playback sound obtained after the decomposition and synthesis of the band filter bank is used to compare with the err(n) obtained after the decomposition and synthesis of the sub-band filter bank without fine-tuning. The comparison method can be based on the following formula (6):
在本申请实施例中,将蚁群算法应用于解决优化问题的基本思路为:蚂蚁的行走路径表示待优化问题的可行解,整个蚂蚁群体的所有路径构成待优化问题的解空间,路径较短的蚂蚁释放的信息素量较多,随着时间的推进,较短的路径上累积的信息素浓度逐渐增高,选择该路径的蚂蚁个数也愈来愈多。最终,整个蚂蚁会在正反馈的作用下集中到最佳的路径上,此时对应的便是待优化问题的最优解。具体的算法流程可如图12所示,其中,用一个蚂蚁代表一个可行解,一个蚂蚁包含的信息包括各变量值。首先,预设迭代周期,其次,确定蚂蚁数。具体过程如下:①根据已有的优秀初始值随机初始化蚁群,记录蚁群中最优解;②进入蚁群循环迭代,把已经初始化的蚂蚁分为两种,分别如下:In the embodiment of this application, the basic idea of applying the ant colony algorithm to solve the optimization problem is as follows: the walking path of the ants represents the feasible solution of the problem to be optimized, and all the paths of the entire ant colony constitute the solution space of the problem to be optimized, and the path is relatively short The amount of pheromone released by the ants is more, as time goes on, the concentration of pheromone accumulated on the shorter path gradually increases, and the number of ants who choose this path is also increasing. In the end, the entire ants will concentrate on the best path under the action of positive feedback, which corresponds to the optimal solution of the problem to be optimized. The specific algorithm flow can be shown in Figure 12, where one ant is used to represent a feasible solution, and the information contained in one ant includes the values of various variables. First, preset the iteration period, and second, determine the number of ants. The specific process is as follows: ① randomly initialize the ant colony according to the existing excellent initial value, and record the optimal solution in the ant colony; ② enter the ant colony cycle iteration, and divide the initialized ants into two types, as follows:
a、一种是上一次蚁群中的最优解,在最优解附近搜素,根据下式上下搜索,搜索后计算代价函数值是否减小,减小保留,增大舍弃,每次循环后步长系数w减小,可用如下式(7)表示:a. One is the optimal solution in the ant colony last time. Search near the optimal solution. Search up and down according to the following formula. After searching, calculate whether the value of the cost function is reduced, reduce retention, increase discarding, each cycle The post-step coefficient w decreases, which can be expressed by the following formula (7):
X={x
1,x
2,...,x
n}
X={x 1 ,x 2 ,...,x n }
x
i=x
i+w*L (7)
x i = x i +w*L (7)
x
i=x
i-w*L
x i = x i -w*L
其中,x
i是蚂蚁i的位置,n是蚂蚁数量,w是更新步长,L是固定更新长度。
Among them, x i is the position of ant i, n is the number of ants, w is the update step size, and L is the fixed update length.
b、另一种是非最优解,随机搜索移动,有一定概率向最优解优化,通过计算最优蚂蚁的信息素浓度和当前蚂蚁的信息素浓度得到优化概率,用于更新信息素,可用如下式(8)表示:b. The other is a non-optimal solution. Random search moves, and there is a certain probability to optimize to the optimal solution. The optimization probability is obtained by calculating the pheromone concentration of the optimal ant and the pheromone concentration of the current ant, which is used to update the pheromone, which can be used The following formula (8) expresses:
其中,mess
best为最优解蚂蚁的信息素浓度,mess
i为当前蚂蚁的信息素浓度。
Among them, mess best is the pheromone concentration of the optimal solution ant, and mess i is the pheromone concentration of the current ant.
向最优解移动则为:x
i=x
i+u*(x
best-x
i);
Moving to the optimal solution is: x i = xi +u*(x best -xi );
随机搜索移动则为:x
i=x
i+dx*rand(-1,1);
The random search movement is: x i = xi +dx*rand(-1,1);
更新信息素则为:mess
i=(1-p)*mess
i+k*a
-f(X)。
The update pheromone is: mess i =(1-p)*mess i +k*a -f(X) .
其中,p为信息素衰退因子,f(X)为代价函数,x
i是蚂蚁i的位置,dx是更新长度,mess
i是当前蚂蚁的信息素浓度,u是非最优解步长系数,x
best是上一步得到的最优解,k是信息素更新系数,a是更新速度。
Among them, p is the pheromone decay factor, f(X) is the cost function, x i is the position of ant i, dx is the update length, mess i is the pheromone concentration of the current ant, u is the non-optimal solution step coefficient, x best is the optimal solution obtained in the previous step, k is the pheromone update coefficient, and a is the update speed.
需要说明的是,在本申请的一些实施方式中,子带滤波器组中每个带通滤波器的滤波器系数的调整方式除了可以采用上述所述的蚁群算法,也可以采用其他方法,如,梯度更新方法,具体本申请对此不做限定。It should be noted that, in some implementations of the present application, the adjustment method of the filter coefficients of each bandpass filter in the subband filter bank can adopt other methods besides the above-mentioned ant colony algorithm, For example, the gradient update method, which is not limited in this application.
还需要说明的是,在本申请的另一些实施方式中,对目标播放声音进行白噪声化除了可以基于子带分解的方法之外,也可以采用白化滤波器进行白噪声化,还可以采用统计贝叶斯方法进行白噪声化,具体本申请对此不做限定。It should also be noted that, in other embodiments of the present application, in addition to the method based on subband decomposition, the whitening of the target playback sound can also be performed by using a whitening filter, or by using statistical The Bayesian method performs white noise, which is not limited in this application.
还需要说明的是,基于上述图6至图11对应实施例所述的基于FxLMS结构的主动降噪系统,本申请实施例还可以提供一种基于FxLMS结构的主动降噪方法,具体请参阅图13,图13为本申请实施例提供的基于FxLMS结构的主动降噪方法的一个流程示意图,该方法应用于主动降噪设备,具体可以包括如下步骤:It should also be noted that, based on the ANC system based on the FxLMS structure described in the above-mentioned embodiments corresponding to FIG. 6 to FIG. 13. FIG. 13 is a schematic flowchart of an active noise reduction method based on the FxLMS structure provided by the embodiment of the present application. The method is applied to an active noise reduction device, and may specifically include the following steps:
1301、通过初级通路获取第一信号,第一信号表示主动降噪设备的参考麦克风处的环境声音。1301. Acquire a first signal through a primary path, where the first signal represents ambient sound at a reference microphone of an active noise reduction device.
首先,主动降噪设备通过初级通路获取第一信号,该第一信号用于表示主动降噪设备的参考麦克风处的环境声音,该初级通路表示第一信号传输到主动降噪设备的扬声器处所通过的物理路径,也可以称为空气通路。First, the active noise reduction device obtains a first signal through a primary path, the first signal is used to represent the ambient sound at the reference microphone of the active noise reduction device, and the primary path represents the location where the first signal is transmitted to the speaker of the active noise reduction device The physical path, also known as the air path.
1302、通过次级通路自适应滤波器得到与第一信号对应的估计信号,该次级通路自适应滤波器用于模拟次级通路,次级通路自适应滤波器的滤波器系数由子带滤波器组基于目标播放声音调整。1302. Obtain an estimated signal corresponding to the first signal through a secondary path adaptive filter, the secondary path adaptive filter is used to simulate the secondary path, and the filter coefficients of the secondary path adaptive filter are determined by the subband filter bank Play sound adjustments based on the target.
此外,主动降噪设备还要通过次级通路自适应滤波器得到与第一信号对应的估计信号,即在这种情况下,第一信号作为次级通路自适应滤波器的输入信号,估计信号作为次级通路自适应滤波器的输出信号,该次级通路自适应滤波器就用于模拟次级通路,并且该次级通路自适应滤波器的滤波器系数(即次级通路系数)是由子带滤波器组基于目标播放声音(如,播放的音乐信号)调整得到的。In addition, the active noise reduction device also needs to obtain the estimated signal corresponding to the first signal through the secondary path adaptive filter, that is, in this case, the first signal is used as the input signal of the secondary path adaptive filter, and the estimated signal As the output signal of the secondary path adaptive filter, the secondary path adaptive filter is used to simulate the secondary path, and the filter coefficients of the secondary path adaptive filter (ie, the secondary path coefficients) are determined by the The band filter bank is adjusted based on the target playing sound (eg, playing music signal).
需要注意的是,在本申请实施例中,步骤1301与步骤1302之间没有执行顺序上的先后关系,可以先执行步骤1301,再执行步骤1302,也可以先执行步骤1302,再执行步骤1301,还可以同时执行步骤1301和步骤1302,具体本申请对此不做限定。It should be noted that, in this embodiment of the application, there is no sequential relationship between step 1301 and step 1302. Step 1301 can be executed first, and then step 1302 can be executed, or step 1302 can be executed first, and then step 1301 can be executed. It is also possible to execute step 1301 and step 1302 at the same time, which is not limited in this application.
1303、通过次级通路获取第二信号,该次级通路表示第二信号传输到扬声器处所通过的电路路径,第二信号为初级通路自适应滤波器的输出信号与目标播放声音运算后的信号,初级通路自适应滤波器用于模拟初级通路,初级通路自适应滤波器的反馈信号根据误差信号以及估计信号得到。1303. Obtain the second signal through the secondary path, where the secondary path indicates the circuit path through which the second signal is transmitted to the speaker, and the second signal is the signal obtained by calculating the output signal of the adaptive filter of the primary path and the target playback sound, The primary path adaptive filter is used to simulate the primary path, and the feedback signal of the primary path adaptive filter is obtained from the error signal and the estimated signal.
主动降噪设备在获得第一信号以及估计信号之后,会进一步通过次级通路获取第二信号,其中,次级通路表示第二信号传输到主动降噪设备的扬声器处所通过的电路路径,第二信号为初级通路自适应滤波器的输出信号与目标播放声音运算后的信号,初级通路自适应滤波器用于模拟初级通路,初级通路自适应滤波器的反馈信号根据误差信号以及估计信号得到。After the active noise reduction device obtains the first signal and the estimated signal, it will further obtain the second signal through the secondary path, wherein the secondary path represents the circuit path through which the second signal is transmitted to the speaker of the active noise reduction device, and the second The signal is the output signal of the primary path adaptive filter and the signal after the operation of the target playback sound. The primary path adaptive filter is used to simulate the primary path, and the feedback signal of the primary path adaptive filter is obtained from the error signal and the estimated signal.
1304、通过扬声器获取第三信号,第三信号为对第一信号和第二信号进行运算得到的信号。1304. Acquire a third signal through a loudspeaker, where the third signal is a signal obtained by performing operations on the first signal and the second signal.
在得到第一信号以及第二信号之后,主动降噪设备对第一信号和第二信号进行运算,得到第三信号,最后,通过主动降噪设备的扬声器将该第三信号进行播放。After obtaining the first signal and the second signal, the active noise reduction device performs calculations on the first signal and the second signal to obtain a third signal, and finally, the third signal is played through a speaker of the active noise reduction device.
需要说明的是,在本申请的一些实施方式中,子带滤波器组包括M个带通滤波器,M≥1,所述方法还可以包括:对子带滤波器组中每个带通滤波器的输出信号进行下采样,得到下采样信号,假设有M个带通滤波器,则共得到M个下采样信号,得到的M个下采样信号再作为次级通路自适应滤波器的输入信号。在本申请实施例中,下采样的目的有2个:1、 将每个带通滤波器各自通过的特定频段展宽,实现白噪声化,白噪声化的信号是为了用于调整次级通路自适应滤波器的系数;2、降低次级通路自适应滤波器的计算量。和/或,对次级通路自适应滤波器的输出信号进行上采样,得到上采样信号,一个上采样信号对应一个下采样信号,假设有M个带通滤波器,也就有M个下采样信号和M个上采样信号。It should be noted that, in some embodiments of the present application, the subband filter bank includes M bandpass filters, M≥1, and the method may further include: filtering each bandpass filter in the subband filter bank The output signal of the filter is down-sampled to obtain a down-sampled signal. Assuming that there are M band-pass filters, a total of M down-sampled signals are obtained, and the obtained M down-sampled signals are used as the input signal of the secondary channel adaptive filter . In the embodiment of the present application, there are two purposes of downsampling: 1. Broaden the specific frequency band passed by each bandpass filter to realize white noise, and the white noise signal is used to adjust the secondary channel self- Coefficients of the adaptive filter; 2. Reduce the calculation amount of the secondary path adaptive filter. And/or, upsampling the output signal of the secondary path adaptive filter to obtain an upsampling signal, one upsampling signal corresponds to one downsampling signal, assuming that there are M bandpass filters, there are also M downsampling signal and M upsampled signals.
还需要说明的是,在本申请的一些实施方式中,子带滤波器组的输入信号可以包括如下几种:目标播放声音、采样模块输出的上采样信号、系统的误差信号。下面基于不同的情况分别进行说明:It should also be noted that, in some embodiments of the present application, the input signals of the sub-band filter bank may include the following types: the target playback sound, the up-sampled signal output by the sampling module, and the system error signal. The following is an explanation based on different situations:
(1)子带滤波器组的输入信号为目标播放声音的情况(1) When the input signal of the subband filter bank is the target playback sound
在子带滤波器组的输入信号为目标播放声音的情况下,则对子带滤波器组中每个带通滤波器的输出信号进行下采样,得到下采样信号具体为:对子带滤波器组中每个带通滤波器输出的信号(可称为第一输出信号)进行下采样,例如,进行m倍的下采样,得到下采样信号(可称为第一下采样信号),其中,一个第一输出信号对应一个第一下采样信号,假设子带滤波器组包括的带通滤波器为M个,分别为G
0(z)、G
1(z)、……、G
M-1(z),则共有M个第一输出信号以及M个第一下采样信号。需要注意的是,在本申请实施例中,得到的M个第一下采样信号就作为次级通路自适应滤波器的输入信号,次级通路自适应滤波器基于该输入信号得到的输出信号可称为第二输出信号,据此就可以得到M个第二输出信号,该第二输出信号就用于调整整个系统的误差信号。
In the case that the input signal of the subband filter bank is the target playback sound, the output signal of each bandpass filter in the subband filter bank is down-sampled, and the down-sampling signal is obtained as follows: for the sub-band filter The signal output by each bandpass filter in the group (may be referred to as the first output signal) is down-sampled, for example, m times of down-sampling is performed to obtain a down-sampled signal (may be referred to as the first down-sampled signal), wherein, A first output signal corresponds to a first downsampling signal, assuming that the sub-band filter bank includes M bandpass filters, respectively G 0 (z), G 1 (z), ..., G M-1 (z), then there are M first output signals and M first downsampled signals in total. It should be noted that in the embodiment of the present application, the obtained M first downsampled signals are used as input signals of the secondary path adaptive filter, and the output signal obtained by the secondary path adaptive filter based on the input signals may be It is called the second output signal, and M second output signals can be obtained accordingly, and the second output signals are used to adjust the error signal of the entire system.
(2)子带滤波器组的输入信号为采样模块输出的上采样信号的情况(2) When the input signal of the subband filter bank is the upsampling signal output by the sampling module
在子带滤波器组的输入信号为整个系统的误差信号的情况下,则对子带滤波器组中每个带通滤波器的输出信号进行下采样,得到下采样信号具体为:对子带滤波器组中每个带通滤波器输出的信号(可称为第三输出信号)进行下采样,例如,进行m倍的下采样,得到下采样信号(可称为第二下采样信号),其中,一个第三输出信号对应一个第二下采样信号,得到的M个第二下采样信号就作为次级通路自适应滤波器的输入信号,次级通路自适应滤波器基于该输入信号得到的输出信号可称为第四输出信号,据此就可以得到M个第四输出信号,该第四输出信号就用于调整次级通路自适应滤波器的滤波器系数,也就是用于估计次级通路系数。In the case that the input signal of the sub-band filter bank is the error signal of the whole system, the output signal of each bandpass filter in the sub-band filter bank is down-sampled, and the down-sampled signal is obtained as follows: for the sub-band The signal output by each bandpass filter in the filter bank (may be referred to as the third output signal) is down-sampled, for example, m times of down-sampling is performed to obtain a down-sampled signal (may be called the second down-sampled signal), Wherein, a third output signal corresponds to a second downsampling signal, and the obtained M second downsampling signals are used as input signals of the secondary path adaptive filter, and the secondary path adaptive filter obtains the The output signal can be called the fourth output signal, and M fourth output signals can be obtained accordingly, and the fourth output signal is used to adjust the filter coefficient of the secondary path adaptive filter, that is, to estimate the secondary path access coefficient.
(3)子带滤波器组的输入信号为系统的误差信号的情况(3) The case where the input signal of the subband filter bank is the error signal of the system
在子带滤波器组的输入信号为采样模块输出的上采样信号的情况下,整个系统的误差信号是基于子带滤波器组中每个带通滤波器输出的信号(可称为第五输出信号)与第三信号进行运算得到,其中,该第三信号为对第一信号(即外界噪声)和第二信号(即目标播放声音与初级通路自适应滤波器的输出信号运算后的信号)进行运算得到的信号。In the case where the input signal of the subband filter bank is the upsampled signal output by the sampling module, the error signal of the whole system is based on the signal output by each bandpass filter in the subband filter bank (which may be referred to as the fifth output signal) and the third signal are calculated, wherein the third signal is the first signal (i.e. the external noise) and the second signal (i.e. the target playback sound and the signal after the output signal of the primary path adaptive filter) The signal obtained by performing the operation.
在本申请实施上述实施方式中,该基于FxLMS结构的主动降噪方法可以同时调整初级通路自适应滤波器的滤波器系数和次级通路自适应滤波器的滤波器系数,此外,比起利用白噪声进行次级通路建模,直接利用用户待收听的目标播放声音建模提高了用户舒适度,更具有实用性。In the implementation of the above embodiments in this application, the active noise reduction method based on the FxLMS structure can simultaneously adjust the filter coefficients of the primary path adaptive filter and the filter coefficients of the secondary path adaptive filter. In addition, compared with using white Noise is used for secondary channel modeling, and the target playback sound modeling is directly used by the user to listen to, which improves user comfort and is more practical.
还需要说明的是,在本申请的一些实施方式中,子带滤波器组中每个带通滤波器的滤波器系数的调整方式可以是蚁群算法(具体请参阅上述图12对应实施例所述的过程),也 可以是梯度更新方法,具体本申请对此不做限定。It should also be noted that, in some implementations of the present application, the adjustment method of the filter coefficients of each bandpass filter in the subband filter bank may be an ant colony algorithm (for details, please refer to the corresponding embodiment in FIG. 12 above). The process described above), it may also be a gradient update method, which is not limited in this application.
为了对本申请实施例所带来的有益效果有更为直观的认识,以下对本申请实施例所带来的技术效果作进一步的对比。作为一个示例,本申请的采样频率为16KHz,子带滤波器组中的带通滤波器共16个,每个带通滤波器的频率范围为500Hz,子带滤波器为128阶低通滤波器。此时初级通路系数和次级通路系数可以同时调整,初级通路采用步长为0.001,次级通路采用步长为0.1,模拟的真实初级通路为41阶,模拟的真实次级通路为41阶,采用的主自适应滤波器为128阶和16阶。和对应的FxLMS结构的初级通路、次级通路同时调整对比,降噪和音乐保留结果如下:In order to have a more intuitive understanding of the beneficial effects brought by the embodiments of the present application, the technical effects brought by the embodiments of the present application are further compared below. As an example, the sampling frequency of this application is 16KHz, there are 16 band-pass filters in the sub-band filter bank, the frequency range of each band-pass filter is 500Hz, and the sub-band filter is a 128-order low-pass filter . At this time, the primary path coefficient and the secondary path coefficient can be adjusted at the same time. The primary path adopts a step size of 0.001, and the secondary path adopts a step size of 0.1. The simulated real primary path is 41, and the simulated real secondary path is 41. The main adaptive filter used is 128th order and 16th order. Compared with the primary channel and secondary channel of the corresponding FxLMS structure, the results of noise reduction and music retention are as follows:
由图14可见,babble噪声和cafe噪声频率边界大概为4000Hz。经计算可得babble噪声0-1000Hz子带分解方法平均降11dB,FxLMS方法平均降10dB。1000-2000Hz子带分解方法平均降11dB,FxLMS方法平均降6dB。2000-3000H子带分解方法平均降7dB,FxLMS方法平均降5dB。3000-4000H子带分解方法平均降7dB,FxLMS方法平均降8dB。It can be seen from Figure 14 that the frequency boundary of babble noise and cafe noise is about 4000Hz. After calculation, the babble noise 0-1000Hz sub-band decomposition method can be reduced by 11dB on average, and the FxLMS method can be reduced by 10dB on average. The 1000-2000Hz sub-band decomposition method has an average reduction of 11dB, and the FxLMS method has an average reduction of 6dB. The 2000-3000H sub-band decomposition method has an average drop of 7dB, and the FxLMS method has an average drop of 5dB. The 3000-4000H sub-band decomposition method has an average drop of 7dB, and the FxLMS method has an average drop of 8dB.
同样,经计算可得cafe噪声0-1000Hz子带分解方法平均降10dB,FxLMS方法平均降10dB;1000-2000Hz子带分解方法平均降9dB,FxLMS方法平均降5dB;2000-3000H子带分解方法平均降8dB,FxLMS方法平均降4dB;3000-4000H子带分解方法平均降9dB,FxLMS方法平均降3dB。Similarly, it can be calculated that the cafe noise 0-1000Hz sub-band decomposition method reduces by 10dB on average, and the FxLMS method reduces by 10dB on average; 8dB, the FxLMS method will drop 4dB on average; the 3000-4000H sub-band decomposition method will drop 9dB on average, and the FxLMS method will drop 3dB on average.
可以看出,除了3500HZ左右的的高频部分之外,采用子带分解的方法相比较传统的FxLMS方法有一定的降噪收益。It can be seen that, except for the high frequency part around 3500HZ, the subband decomposition method has a certain noise reduction benefit compared with the traditional FxLMS method.
而进行蚁群算法调整优化的原始信号即白噪声时域波形图如图15所示,无调整滤波器子带分解合成后得到信号如图16所示,滤波器子带分解合成后得到信号如图17所示。The original signal adjusted and optimized by the ant colony algorithm, that is, the time-domain waveform of white noise, is shown in Figure 15. The signal obtained after sub-band decomposition and synthesis without adjustment filter is shown in Figure 16, and the signal obtained after sub-band decomposition and synthesis of the filter is shown as Figure 17 shows.
优化后分解合成后与原信号的信号相似度为0.9582(相似度为1最大,即同一波形),用白噪声进行训练,明显看出,经过调整的子带滤波器得到的时域波形更接近原信号。After optimization, the signal similarity between the decomposed and synthesized signal and the original signal is 0.9582 (the maximum similarity is 1, that is, the same waveform). Using white noise for training, it is obvious that the time domain waveform obtained by the adjusted subband filter is closer to original signal.
计算相似度得到:优化前分解合成后与原信号相似度为0.8661,公式如下式(9)所示:Calculate the similarity to get: the similarity with the original signal after decomposition and synthesis before optimization is 0.8661, the formula is shown in the following formula (9):
其中,r
x,out是输入信号x和输出信号out相似度,x
i是原信号逐点值
是原信号均值,out
i是经过分解合成后的输出信号逐点值,
是输出信号的平均值。
Among them, r x,out is the similarity between the input signal x and the output signal out, and x i is the point-by-point value of the original signal is the mean value of the original signal, out i is the point-by-point value of the output signal after decomposition and synthesis, is the average value of the output signal.
以上比较性测试均显示了本申请实施例提供的主动降噪系统良好鲁棒性和良好的工作稳定性。The above comparative tests all show that the active noise reduction system provided by the embodiment of the present application has good robustness and good working stability.
图18为本申请实施例提供的计算机可读存储介质900的一个示意图。计算机可读存储介质900例如是图3中的处理器17中的高速缓存、图5中的内部存储器121等。计算机可读存储介质900存储有一个或多个程序902…..906,一个或多个程序902…..906被配置为由主动降噪设备的一个或多个处理器执行。一个或多个程序902…..906可以单独或共同地包括指令,该指令可以由处理器17执行以实施本文中所描述的方法或过程。可以理解,计 算机可读存储介质900还可以包括用于实施其它方法和步骤的程序。FIG. 18 is a schematic diagram of a computer-readable storage medium 900 provided by an embodiment of the present application. The computer-readable storage medium 900 is, for example, the cache memory in the processor 17 in FIG. 3 , the internal memory 121 in FIG. 5 , and the like. The computer-readable storage medium 900 stores one or more programs 902 . . . 906 configured to be executed by one or more processors of the active noise reduction device. One or more programs 902 . . . 906 may individually or collectively include instructions that are executable by processor 17 to implement the methods or processes described herein. It can be understood that the computer-readable storage medium 900 may also include programs for implementing other methods and steps.
图19是本申请实施例提供的基于FxLMS结构的主动降噪系统1900的一个结构示意图,主动降噪系统1900可以应用于主动降噪设备,主动降噪系统1900包括:采集模块1901,用于通过初级通路获取第一信号,所述第一信号表示主动降噪设备的参考麦克风处的环境声音,所述初级通路表示所述第一信号传输到所述主动降噪设备的扬声器处所通过的物理路径;获取模块1902,用于通过次级通路自适应滤波器得到与所述第一信号对应的估计信号,所述次级通路自适应滤波器用于模拟次级通路,所述次级通路自适应滤波器的滤波器系数由子带滤波器组基于目标播放声音调整;电通路模块1903,用于通过次级通路获取第二信号,所述次级通路表示所述第二信号传输到所述扬声器处所通过的电路路径,所述第二信号为初级通路自适应滤波器的输出信号与目标播放声音运算后的信号,所述初级通路自适应滤波器用于模拟初级通路,所述初级通路自适应滤波器的反馈信号根据误差信号以及所述估计信号得到;运算模块1904,用于通过所述扬声器获取第三信号,所述第三信号为对所述第一信号和所述第二信号进行运算得到的信号。FIG. 19 is a schematic structural diagram of an active noise reduction system 1900 based on the FxLMS structure provided by an embodiment of the present application. The active noise reduction system 1900 can be applied to active noise reduction equipment. The active noise reduction system 1900 includes: an acquisition module 1901, used to pass The primary path acquires a first signal, the first signal represents the ambient sound at the reference microphone of the active noise reduction device, and the primary path represents a physical path through which the first signal is transmitted to the speaker of the active noise reduction device ; An acquisition module 1902, configured to obtain an estimated signal corresponding to the first signal through a secondary path adaptive filter, the secondary path adaptive filter is used to simulate a secondary path, and the secondary path adaptive filter The filter coefficients of the filter are adjusted based on the target playback sound by the sub-band filter bank; the electrical path module 1903 is used to obtain the second signal through the secondary path, and the secondary path represents that the second signal is transmitted to the loudspeaker through the circuit path, the second signal is the output signal of the primary path adaptive filter and the signal after the target playback sound calculation, the primary path adaptive filter is used to simulate the primary path, the primary path adaptive filter The feedback signal is obtained according to the error signal and the estimated signal; the operation module 1904 is configured to obtain a third signal through the speaker, and the third signal is a signal obtained by operating the first signal and the second signal .
虽然在图19中仅示出了四个模块,但是可以理解这仅是示意而非对本公开的范围进行限制。主动降噪系统1900还可以包括用于执行上述的图13对应实施例中的各个步骤的相应模块。Although only four modules are shown in FIG. 19 , it is understood that this is illustrative only and does not limit the scope of the present disclosure. The active noise reduction system 1900 may also include corresponding modules for performing the steps in the above-mentioned embodiment corresponding to FIG. 13 .
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
Claims (19)
- 一种基于FxLMS结构的主动降噪系统,应用于主动降噪设备,其特征在于,包括:An active noise reduction system based on the FxLMS structure, applied to active noise reduction equipment, is characterized in that it includes:初级通路自适应滤波器、次级通路自适应滤波器以及子带滤波器组;a primary path adaptive filter, a secondary path adaptive filter, and a subband filter bank;所述初级通路自适应滤波器,用于模拟初级通路,所述初级通路表示第一信号从所述主动降噪设备的参考麦克风处传输到所述主动降噪设备的扬声器处所通过的物理路径;The primary path adaptive filter is used to simulate a primary path, and the primary path represents a physical path through which the first signal is transmitted from the reference microphone of the active noise reduction device to the speaker of the active noise reduction device;所述次级通路自适应滤波器,用于模拟次级通路,所述次级通路表示第二信号传输到所述扬声器处所通过的电路路径,所述第二信号为所述初级通路自适应滤波器的输出信号与目标播放声音运算后的信号;The secondary path adaptive filter is used to simulate a secondary path, the secondary path represents a circuit path through which a second signal is transmitted to the loudspeaker, and the second signal is the primary path adaptive filter The output signal of the device and the signal after the target playback sound operation;所述子带滤波器组,用于基于所述目标播放声音调整所述次级通路自适应滤波器的滤波器系数。The subband filter bank is configured to adjust filter coefficients of the secondary path adaptive filter based on the target playback sound.
- 根据权利要求1所述的系统,其特征在于,所述系统还包括采样模块,用于:The system according to claim 1, wherein the system also includes a sampling module for:对所述子带滤波器组中每个带通滤波器的输出信号进行下采样,得到下采样信号,所述下采样信号作为所述次级通路自适应滤波器的输入信号,不同的带通滤波器具有不同的通带;Downsampling the output signal of each bandpass filter in the subband filter bank to obtain a downsampling signal, the downsampling signal is used as the input signal of the secondary path adaptive filter, different bandpass Filters have different passbands;和/或,and / or,对所述次级通路自适应滤波器的输出信号进行上采样,得到上采样信号,一个上采样信号对应一个下采样信号。Upsampling is performed on the output signal of the secondary path adaptive filter to obtain an upsampling signal, and one upsampling signal corresponds to one downsampling signal.
- 根据权利要求2所述的系统,其特征在于,所述子带滤波器组的输入信号包括:The system according to claim 2, wherein the input signal of the subband filter bank comprises:所述目标播放声音,或,所述上采样信号,或,误差信号。The target playback sound, or, the upsampled signal, or, an error signal.
- 根据权利要求3所述的系统,其特征在于,所述采样模块,具体用于:The system according to claim 3, wherein the sampling module is specifically used for:在所述子带滤波器组的输入信号为所述目标播放声音的情况下,对所述子带滤波器组中每个带通滤波器输出的第一输出信号进行下采样,得到第一下采样信号,一个第一输出信号对应一个第一下采样信号,所述第一下采样信号作为所述次级通路自适应滤波器的输入信号,得到的所述次级通路自适应滤波器输出的第二输出信号用于调整所述误差信号。In the case that the input signal of the sub-band filter bank is the target playback sound, the first output signal output by each bandpass filter in the sub-band filter bank is down-sampled to obtain the first lower Sampling signal, a first output signal corresponds to a first down-sampling signal, the first down-sampling signal is used as the input signal of the secondary path adaptive filter, and the obtained output of the secondary path adaptive filter is The second output signal is used to adjust the error signal.
- 根据权利要求3-4中任一项所述的系统,其特征在于,所述采样模块,具体还用于:The system according to any one of claims 3-4, wherein the sampling module is specifically further used for:在所述子带滤波器组的输入信号为所述误差信号的情况下,对所述子带滤波器组中每个带通滤波器输出的第三输出信号进行下采样,得到第二下采样信号,一个第三输出信号对应一个第二下采样信号,所述第二下采样信号作为所述次级通路自适应滤波器的输入信号,得到的所述次级通路自适应滤波器输出的第四输出信号用于调整所述次级通路自适应滤波器的滤波器系数。When the input signal of the subband filter bank is the error signal, downsampling is performed on the third output signal output by each bandpass filter in the subband filter bank to obtain the second downsampling signal, a third output signal corresponds to a second downsampling signal, and the second downsampling signal is used as the input signal of the secondary path adaptive filter, and the obtained second output of the secondary path adaptive filter Four output signals are used to adjust the filter coefficients of the secondary path adaptive filter.
- 根据权利要求3-5中任一项所述的系统,其特征在于,A system according to any one of claims 3-5, characterized in that,在所述子带滤波器组的输入信号为所述上采样信号的情况下,所述误差信号基于所述子带滤波器组中每个带通滤波器输出的第五输出信号与第三信号进行运算得到,所述第三信号为对所述第一信号和所述第二信号进行运算得到的信号。In the case where the input signal of the subband filter bank is the upsampling signal, the error signal is based on the fifth output signal and the third signal output by each bandpass filter in the subband filter bank Obtained by performing calculations, the third signal is a signal obtained by performing calculations on the first signal and the second signal.
- 根据权利要求1-6中任一项所述的系统,其特征在于,所述子带滤波器组中每个带通滤波器的滤波器系数的调整方式至少包括如下任意一种:The system according to any one of claims 1-6, wherein the adjustment mode of the filter coefficients of each bandpass filter in the subband filter bank includes at least any of the following:蚁群算法、梯度更新方法。Ant colony algorithm, gradient update method.
- 一种基于FxLMS结构的主动降噪方法,应用于主动降噪设备,其特征在于,包括:A kind of active noise reduction method based on FxLMS structure, is applied to active noise reduction equipment, is characterized in that, comprises:通过初级通路获取第一信号,所述第一信号表示主动降噪设备的参考麦克风处的环境声音,所述初级通路表示所述第一信号传输到所述主动降噪设备的扬声器处所通过的物理路径;Obtain a first signal through a primary path, the first signal represents the ambient sound at the reference microphone of the active noise reduction device, and the primary path represents the physical path through which the first signal is transmitted to the speaker of the active noise reduction device path;通过次级通路自适应滤波器得到与所述第一信号对应的估计信号,所述次级通路自适应滤波器用于模拟次级通路,所述次级通路自适应滤波器的滤波器系数由子带滤波器组基于目标播放声音调整;The estimated signal corresponding to the first signal is obtained through a secondary path adaptive filter, the secondary path adaptive filter is used to simulate the secondary path, and the filter coefficient of the secondary path adaptive filter is determined by the subband Filter banks are tuned based on the target playback sound;通过次级通路获取第二信号,所述次级通路表示所述第二信号传输到所述扬声器处所通过的电路路径,所述第二信号为初级通路自适应滤波器的输出信号与目标播放声音运算后的信号,所述初级通路自适应滤波器用于模拟初级通路,所述初级通路自适应滤波器的反馈信号根据误差信号以及所述估计信号得到;Obtain the second signal through the secondary path, the secondary path represents the circuit path through which the second signal is transmitted to the loudspeaker, the second signal is the output signal of the primary path adaptive filter and the target playback sound The calculated signal, the primary path adaptive filter is used to simulate the primary path, and the feedback signal of the primary path adaptive filter is obtained according to the error signal and the estimated signal;通过所述扬声器获取第三信号,所述第三信号为对所述第一信号和所述第二信号进行运算得到的信号。Obtaining a third signal through the loudspeaker, where the third signal is a signal obtained by computing the first signal and the second signal.
- 根据权利要求8所述的方法,其特征在于,所述子带滤波器组包括M个带通滤波器,M≥1,所述方法还包括:The method according to claim 8, wherein the subband filter bank comprises M bandpass filters, M≥1, and the method further comprises:对所述子带滤波器组中每个带通滤波器的输出信号进行下采样,得到下采样信号,所述下采样信号作为所述次级通路自适应滤波器的输入信号,不同的带通滤波器具有不同的通带;Downsampling the output signal of each bandpass filter in the subband filter bank to obtain a downsampling signal, the downsampling signal is used as the input signal of the secondary path adaptive filter, different bandpass Filters have different passbands;和/或,and / or,对所述次级通路自适应滤波器的输出信号进行上采样,得到上采样信号,一个上采样信号对应一个下采样信号。Upsampling is performed on the output signal of the secondary path adaptive filter to obtain an upsampling signal, and one upsampling signal corresponds to one downsampling signal.
- 根据权利要求9所述的方法,其特征在于,所述子带滤波器组的输入信号包括:The method according to claim 9, wherein the input signal of the subband filter bank comprises:所述目标播放声音,或,所述上采样信号,或,所述误差信号。The target playback sound, or, the upsampled signal, or, the error signal.
- 根据权利要求10所述的方法,其特征在于,所述对所述子带滤波器组中每个带通滤波器的输出信号进行下采样,得到下采样信号包括:The method according to claim 10, wherein said down-sampling the output signal of each band-pass filter in the sub-band filter bank to obtain a down-sampled signal comprises:在所述子带滤波器组的输入信号为所述目标播放声音的情况下,对所述子带滤波器组中每个带通滤波器输出的第一输出信号进行下采样,得到第一下采样信号,一个第一输出信号对应一个第一下采样信号,得到的所述次级通路自适应滤波器输出的第二输出信号用于调整所述误差信号。In the case that the input signal of the sub-band filter bank is the target playback sound, the first output signal output by each bandpass filter in the sub-band filter bank is down-sampled to obtain the first lower For sampling signals, one first output signal corresponds to one first downsampled signal, and the obtained second output signal output by the secondary path adaptive filter is used to adjust the error signal.
- 根据权利要求10-11中任一项所述的方法,其特征在于,所述对所述子带滤波器组中每个带通滤波器的输出信号进行下采样,得到下采样信号包括:The method according to any one of claims 10-11, wherein said downsampling the output signal of each bandpass filter in said subband filter bank, and obtaining the downsampled signal comprises:在所述子带滤波器组的输入信号为所述误差信号的情况下,对所述子带滤波器组中每个带通滤波器输出的第三输出信号进行下采样,得到第二下采样信号,一个第三输出信号对应一个第二下采样信号,得到的所述次级通路自适应滤波器输出的第四输出信号用于调整所述次级通路自适应滤波器的滤波器系数。When the input signal of the subband filter bank is the error signal, downsampling is performed on the third output signal output by each bandpass filter in the subband filter bank to obtain the second downsampling signal, a third output signal corresponds to a second downsampled signal, and the obtained fourth output signal output by the secondary path adaptive filter is used to adjust the filter coefficient of the secondary path adaptive filter.
- 根据权利要求10-12中任一项所述的方法,其特征在于,The method according to any one of claims 10-12, characterized in that,在所述子带滤波器组的输入信号为所述上采样信号的情况下,所述误差信号基于所述 子带滤波器组中每个带通滤波器输出的第五输出信号与所述第三信号进行运算得到。When the input signal of the sub-band filter bank is the up-sampling signal, the error signal is based on the fifth output signal output by each bandpass filter in the sub-band filter bank and the first The three signals are obtained by operation.
- 根据权利要求8-13中任一项所述的方法,其特征在于,所述子带滤波器组中每个带通滤波器的滤波器系数的调整方式至少包括如下任意一种:The method according to any one of claims 8-13, wherein the adjustment mode of the filter coefficients of each bandpass filter in the subband filter bank includes at least any of the following:蚁群算法、梯度更新方法。Ant colony algorithm, gradient update method.
- 一种主动降噪设备,所述设备具有实现权利要求8-14中任一项所述方法的功能,所述功能通过硬件或通过硬件执行相应的软件实现,所述硬件或所述软件包括一个或多个与所述功能相对应的模块。An active noise reduction device, the device has the function of implementing the method according to any one of claims 8-14, the function is realized by hardware or by executing corresponding software through hardware, and the hardware or the software includes a or multiple modules corresponding to the functions described.
- 一种主动降噪设备,包括处理器和存储器,所述处理器与所述存储器耦合,其特征在于,An active noise reduction device, including a processor and a memory, the processor is coupled to the memory, characterized in that,所述存储器,用于存储程序;The memory is used to store programs;所述处理器,用于执行所述存储器中的程序,使得所述设备执行如权利要求8-14中任一项所述的方法。The processor is configured to execute the program in the memory, so that the device executes the method according to any one of claims 8-14.
- 一种计算机可读存储介质,包括程序,当其在计算机上运行时,使得计算机执行如权利要求8-14中任一项所述的方法。A computer-readable storage medium, including a program, which, when run on a computer, causes the computer to execute the method according to any one of claims 8-14.
- 一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行如权利要求8-14中任一项所述的方法。A computer program product comprising instructions which, when run on a computer, cause the computer to perform the method according to any one of claims 8-14.
- 一种芯片,所述芯片包括处理器与数据接口,所述处理器通过所述数据接口读取存储器上存储的指令,执行如权利要求8-14中任一项所述的方法。A chip, the chip includes a processor and a data interface, the processor reads instructions stored in the memory through the data interface, and executes the method according to any one of claims 8-14.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202180103653.0A CN118251717A (en) | 2021-11-02 | 2021-11-02 | Active noise reduction system, method and equipment based on FxLMS structure |
PCT/CN2021/128037 WO2023077252A1 (en) | 2021-11-02 | 2021-11-02 | Fxlms structure-based active noise reduction system, method, and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2021/128037 WO2023077252A1 (en) | 2021-11-02 | 2021-11-02 | Fxlms structure-based active noise reduction system, method, and device |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023077252A1 true WO2023077252A1 (en) | 2023-05-11 |
Family
ID=86240369
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2021/128037 WO2023077252A1 (en) | 2021-11-02 | 2021-11-02 | Fxlms structure-based active noise reduction system, method, and device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN118251717A (en) |
WO (1) | WO2023077252A1 (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101354885A (en) * | 2007-01-16 | 2009-01-28 | 哈曼贝克自动系统股份有限公司 | Active noise control system |
US20120170766A1 (en) * | 2011-01-05 | 2012-07-05 | Cambridge Silicon Radio Limited | ANC For BT Headphones |
US20130094657A1 (en) * | 2011-10-12 | 2013-04-18 | University Of Connecticut | Method and device for improving the audibility, localization and intelligibility of sounds, and comfort of communication devices worn on or in the ear |
US20130204617A1 (en) * | 2007-12-07 | 2013-08-08 | Board Of Trustees Of Northern Illinois University | Apparatus, system and method for noise cancellation and communication for incubators and related devices |
US20130259253A1 (en) * | 2012-03-29 | 2013-10-03 | Rogerio Guedes Alves | Controllers for active noise control systems |
CN106169294A (en) * | 2015-05-20 | 2016-11-30 | 联发科技股份有限公司 | The automatic selecting method of the secondary path estimation filter modeling of active noise control system |
CN109074800A (en) * | 2016-03-30 | 2018-12-21 | 伯斯有限公司 | The adaptive modeling of secondary path in active noise control system |
WO2021005145A1 (en) * | 2019-07-11 | 2021-01-14 | Faurecia Creo Ab | Method and apparatus for selecting a subset of a plurality of inputs of a multiple-input-multiple-output system |
-
2021
- 2021-11-02 WO PCT/CN2021/128037 patent/WO2023077252A1/en active Application Filing
- 2021-11-02 CN CN202180103653.0A patent/CN118251717A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101354885A (en) * | 2007-01-16 | 2009-01-28 | 哈曼贝克自动系统股份有限公司 | Active noise control system |
US20130204617A1 (en) * | 2007-12-07 | 2013-08-08 | Board Of Trustees Of Northern Illinois University | Apparatus, system and method for noise cancellation and communication for incubators and related devices |
US20120170766A1 (en) * | 2011-01-05 | 2012-07-05 | Cambridge Silicon Radio Limited | ANC For BT Headphones |
US20130094657A1 (en) * | 2011-10-12 | 2013-04-18 | University Of Connecticut | Method and device for improving the audibility, localization and intelligibility of sounds, and comfort of communication devices worn on or in the ear |
US20130259253A1 (en) * | 2012-03-29 | 2013-10-03 | Rogerio Guedes Alves | Controllers for active noise control systems |
CN106169294A (en) * | 2015-05-20 | 2016-11-30 | 联发科技股份有限公司 | The automatic selecting method of the secondary path estimation filter modeling of active noise control system |
CN109074800A (en) * | 2016-03-30 | 2018-12-21 | 伯斯有限公司 | The adaptive modeling of secondary path in active noise control system |
WO2021005145A1 (en) * | 2019-07-11 | 2021-01-14 | Faurecia Creo Ab | Method and apparatus for selecting a subset of a plurality of inputs of a multiple-input-multiple-output system |
Also Published As
Publication number | Publication date |
---|---|
CN118251717A (en) | 2024-06-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
AU2017272228B2 (en) | Signal Enhancement Using Wireless Streaming | |
US8682658B2 (en) | Audio equipment including means for de-noising a speech signal by fractional delay filtering, in particular for a “hands-free” telephony system | |
CN104602163B (en) | Active noise reduction earphone and method for noise reduction control and system applied to the earphone | |
CN111833896B (en) | Voice enhancement method, system, device and storage medium for fusing feedback signals | |
US8611552B1 (en) | Direction-aware active noise cancellation system | |
US8751224B2 (en) | Combined microphone and earphone audio headset having means for denoising a near speech signal, in particular for a “hands-free” telephony system | |
CA2805491C (en) | Method of signal processing in a hearing aid system and a hearing aid system | |
CN109493877B (en) | Voice enhancement method and device of hearing aid device | |
CN111131947A (en) | Earphone signal processing method and system and earphone | |
WO2020248164A1 (en) | Active noise reduction method, device and chip, and active control system and storage medium | |
CN108600894A (en) | A kind of earphone adaptive active noise control system and method | |
CN115474121A (en) | Active noise reduction method, device, chip, earphone and storage medium | |
WO2022256577A1 (en) | A method of speech enhancement and a mobile computing device implementing the method | |
TWI827009B (en) | Hearing compensation device and hearing compensation method | |
WO2023077252A1 (en) | Fxlms structure-based active noise reduction system, method, and device | |
WO2022198538A1 (en) | Active noise reduction audio device, and method for active noise reduction | |
WO2021129196A1 (en) | Voice signal processing method and device | |
US11812224B2 (en) | Hearing device comprising a delayless adaptive filter | |
US11790882B2 (en) | Active noise cancellation filter adaptation with ear cavity frequency response compensation | |
US20240331716A1 (en) | Low-latency noise suppression | |
TW202247142A (en) | Method, device, composite microphone of the device, computer program and computer readable medium for automatically or freely selecting an independent voice target | |
AU2011278648B2 (en) | Method of signal processing in a hearing aid system and a hearing aid system | |
WO2024206050A1 (en) | Low-latency noise suppression | |
TW202406367A (en) | Earphone device, compensation method thereof and computer program product | |
KR20100025140A (en) | Method of voice source separation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21962776 Country of ref document: EP Kind code of ref document: A1 |
|
WWE | Wipo information: entry into national phase |
Ref document number: 202180103653.0 Country of ref document: CN |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 21962776 Country of ref document: EP Kind code of ref document: A1 |