CN111739505A - Active noise reduction system and method - Google Patents

Active noise reduction system and method Download PDF

Info

Publication number
CN111739505A
CN111739505A CN202010783741.7A CN202010783741A CN111739505A CN 111739505 A CN111739505 A CN 111739505A CN 202010783741 A CN202010783741 A CN 202010783741A CN 111739505 A CN111739505 A CN 111739505A
Authority
CN
China
Prior art keywords
audio
stage
filtering
section
output
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010783741.7A
Other languages
Chinese (zh)
Other versions
CN111739505B (en
Inventor
水永辉
李宁
李秀冬
欧阳鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu Qingwei Intelligent Technology Co ltd
Original Assignee
Jiangsu Qingwei Intelligent Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangsu Qingwei Intelligent Technology Co ltd filed Critical Jiangsu Qingwei Intelligent Technology Co ltd
Priority to CN202010783741.7A priority Critical patent/CN111739505B/en
Publication of CN111739505A publication Critical patent/CN111739505A/en
Application granted granted Critical
Publication of CN111739505B publication Critical patent/CN111739505B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10KSOUND-PRODUCING DEVICES; METHODS OR DEVICES FOR PROTECTING AGAINST, OR FOR DAMPING, NOISE OR OTHER ACOUSTIC WAVES IN GENERAL; ACOUSTICS NOT OTHERWISE PROVIDED FOR
    • G10K11/00Methods 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/16Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
    • G10K11/175Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound
    • G10K11/178Methods 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
    • G10K11/1785Methods, e.g. algorithms; Devices
    • G10K11/17853Methods, e.g. algorithms; Devices of the filter
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • H04R1/1083Reduction of ambient noise
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10KSOUND-PRODUCING DEVICES; METHODS OR DEVICES FOR PROTECTING AGAINST, OR FOR DAMPING, NOISE OR OTHER ACOUSTIC WAVES IN GENERAL; ACOUSTICS NOT OTHERWISE PROVIDED FOR
    • G10K2210/00Details of active noise control [ANC] covered by G10K11/178 but not provided for in any of its subgroups
    • G10K2210/10Applications
    • G10K2210/108Communication systems, e.g. where useful sound is kept and noise is cancelled
    • G10K2210/1081Earphones, e.g. for telephones, ear protectors or headsets
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10KSOUND-PRODUCING DEVICES; METHODS OR DEVICES FOR PROTECTING AGAINST, OR FOR DAMPING, NOISE OR OTHER ACOUSTIC WAVES IN GENERAL; ACOUSTICS NOT OTHERWISE PROVIDED FOR
    • G10K2210/00Details of active noise control [ANC] covered by G10K11/178 but not provided for in any of its subgroups
    • G10K2210/30Means
    • G10K2210/301Computational
    • G10K2210/3023Estimation of noise, e.g. on error signals
    • G10K2210/30232Transfer functions, e.g. impulse response
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10KSOUND-PRODUCING DEVICES; METHODS OR DEVICES FOR PROTECTING AGAINST, OR FOR DAMPING, NOISE OR OTHER ACOUSTIC WAVES IN GENERAL; ACOUSTICS NOT OTHERWISE PROVIDED FOR
    • G10K2210/00Details of active noise control [ANC] covered by G10K11/178 but not provided for in any of its subgroups
    • G10K2210/30Means
    • G10K2210/301Computational
    • G10K2210/3028Filtering, e.g. Kalman filters or special analogue or digital filters

Abstract

The invention discloses an active noise reduction system and method, which comprises the following steps: the audio collector can collect a section of environmental sound audio and a section of noise sampling audio corresponding to the environmental sound audio. The first stage FIR filter filters the environmental sound audio digital quantity according to the first filter coefficient sequence and the set window function to obtain a section of first stage filter audio data. The second stage FIR filter splices a plurality of sections of first stage filtering audio data into a group of audio according to the storage sequence of the storage units. And respectively filtering multiple sections of audio in a group of audio according to the second filter coefficient of each section of first filtered audio data to obtain second-stage filtered audio data. The work of IIR filter coefficient adjustment is omitted, the fitting effect on the frequency characteristics below 1kHz is good, the fitting effect on the frequency characteristics above 1kHz is good, and the noise-reducing frequency range of random noise is enlarged.

Description

Active noise reduction system and method
Technical Field
The invention relates to the field of noise processing, in particular to an active noise reduction system and method.
Background
Active Noise Cancellation (ANC) is that an earphone sends out a sound wave with the same amplitude and opposite phase with ambient noise through a loudspeaker inside, and the sound waves of the earphone and the ambient noise are superposed and then mutually offset, so that the noise intensity heard by a wearer is reduced.
The noise reduction filter is actually fitting the frequency characteristics of an acoustic system formed by a microphone, a loudspeaker and the like, the more accurate the fitting, the better the noise reduction effect, because the frequency characteristics of the acoustic system are not necessarily smooth curves, the noise reduction filter preferably adopts a FIR structure, the FIR structure fits a non-smooth curve well, in order to obtain a good noise reduction effect, the order of the FIR filter is generally required to be very high, so that the actual implementation is very difficult, for example, when the sampling frequency is 192kHz, 4095-order FIR convolution operation is completed by a multiplication and accumulation unit, the frequency of a digital logic working clock is required to be as high as 786MHz, 4096 filter coefficients are required to be stored, and the requirement on the digital logic power consumption and the complexity are very high.
The IIR filter is good in fitting of an acoustic system with smooth frequency characteristics, but an actual acoustic system has singular points, so that the IIR filter is difficult to well fit the non-smooth frequency characteristic curve, the noise reduction effect is poor, on the other hand, the fitting effect of the IIR filter on the frequency characteristics above 1kHz is poor, repeated tests are needed for obtaining a group of good coefficients, and the coefficient adjustment difficulty of the IIR filter is large.
Disclosure of Invention
The invention aims to provide an active noise reduction system and method, which are convenient for adjusting the filter coefficient and improve the fitting effect on a fitting target with frequency characteristics more than 1 kHz.
In order to realize the purpose, the technical scheme is as follows: an active noise reduction system comprising:
and the audio collector is provided with an audio collecting end and an audio output end.
The audio acquisition end can acquire a section of environmental sound audio and a section of noise sampling audio corresponding to the environmental sound audio. The audio output end can output a section of environmental sound audio analog quantity and a section of noise sampling audio analog quantity.
An A/D converter having:
and the analog signal receiving end is connected with the audio output end and receives the environmental sound audio analog quantity and the noise sampling audio analog quantity.
A conversion unit capable of converting the environmental sound audio analog quantity into an environmental sound audio digital quantity. The conversion unit converts the noise sampling audio frequency analog quantity into a noise sampling audio frequency digital quantity. And
and the digital signal output end is capable of outputting the ambient sound audio digital quantity and the noise sampling audio digital quantity.
A first stage FIR filter has a first input, a first stage filtering unit and a first output. The first input end is connected with the digital signal output end.
The first input end obtains the audio digital quantity of the environmental sound and the audio digital quantity of the noise sample.
The first stage filter unit is capable of obtaining a first sequence of filter coefficients from the noise sampled audio digital values.
And acquiring a section of first-stage filtering audio data according to the first filtering coefficient sequence and the set audio digital quantity of the window function filtering environment sound.
And judging whether the interrupt information is received or not, and if not, acquiring the environmental sound audio and the noise sampling audio corresponding to the environmental sound audio from the audio acquisition device again. Multiple segments of first-level filtered audio data are obtained.
A first output capable of outputting a plurality of segments of first-stage filtered audio data.
And a memory connected to the first output terminal and capable of sequentially storing the plurality of pieces of first-stage filtered audio data into the storage unit.
A second stage FIR filter having a second input, a second stage filtering unit and a second output.
The second input end is connected with the storage unit to obtain multiple sections of first-stage filtering audio data.
And the second-stage filtering unit acquires a second filtering coefficient of each section of first filtering audio data according to the first filtering coefficient sequence corresponding to each section of first-stage filtering audio data.
And splicing the multiple sections of first-stage filtering audio data into a group of audio according to the storage sequence of the storage units.
And respectively filtering multiple sections of audio in a group of audio according to the second filter coefficient of each section of first filtered audio data to obtain second-stage filtered audio data.
And a D/A converter connected to the second output terminal, the D/A converter being capable of converting the second stage filtered audio data into a target analog signal.
And the loudspeaker is connected with the D/A converter, can acquire a target analog quantity signal output by the D/A converter, and generates sound waves according to the target analog quantity signal to counteract noise audio in the environmental sound audio.
Further, the first stage FIR filter is a cascade FIR filter with one, two or more stages of rectangular windows. The segments of first-stage filtered audio data are stored in a memory in a cyclically addressed manner.
The second stage FIR filter reads multiple pieces of first stage filtered audio data in memory in a circular addressing manner.
Further, the first stage FIR filter is composed of a cascade of two rectangular windows of sixteen lengths. The formula for each level of rectangular window implementation is:
Figure DEST_PATH_IMAGE002AAA
where n denotes the index of the a/D converter output data. x represents the data output by the a/D converter. x (n) represents the data output by the a/D converter denoted by n. y (n) represents the data output by the first stage FIR filter, numbered n.
Further, the buffer length of the memory is 4096 memory cells, and the bit width of each memory cell in the memory is 20 bits.
Storing segments of first-stage filtered audio data in a memory in a cyclically addressed manner, comprising:
when the memory receives a section of first-stage filtering audio data output by the first-stage FIR filter, the address pointer corresponding to the received section of first output data is increased by 1 and then written into the memory, and when the address pointer is increased to 4095, the address pointer is increased from 0.
In the reset state, the write address pointer of the memory is 0. The current most recently written memory address pointer, denoted as Pw (n), is formulated as follows:
Figure 100002_DEST_PATH_IMAGE004AAAA
wherein, PwAnd (n) is the current most recently written memory address pointer. mod represents the remainder operation.
Further, the second stage FIR filter coefficients have a length of 4096 memory cells.
Respectively filtering a plurality of audio frequencies in a group of audio frequencies according to a second filter coefficient of each section of first filtered audio data to obtain second-stage filtered audio data, and the method comprises the following steps:
s1: initializing the accumulator to 0, reading a section of audio in the group of audio newly buffered from the newly written memory address Pw (n), multiplying the section of audio by the second filter coefficient of sequence number 1, and adding the multiplied section of audio to the accumulator.
S2: reading the audio frequency in a group of audio frequencies after subtracting 16 from the read address pointer, multiplying the audio frequency by a second filter coefficient of a sequence number 17, adding the multiplied audio frequency to an accumulator, and so on, and adding 4096 when the value of the read address pointer is subtracted to a negative value;
repeating steps S1 and S2 a total of 256 times, formulated as follows:
Figure DEST_PATH_IMAGE006AAAA
wherein i is the number of operations. b () is the output of the first stage FIR filter of the read memory, h () is the non-0 coefficient of the second stage FIR filter, and z () is the output of the second stage FIR filter.
The invention also provides an active noise reduction method, which comprises the following steps:
an audio collector is configured, and the audio collector is provided with an audio collecting end and an audio output end.
The audio acquisition end can acquire a section of environmental sound audio and a section of noise sampling audio corresponding to the environmental sound audio. The audio output end can output a section of environmental sound audio analog quantity and a section of noise sampling audio analog quantity.
Configuring an A/D converter having:
and the analog signal receiving end is connected with the audio output end and receives the environmental sound audio analog quantity and the noise sampling audio analog quantity.
A conversion unit capable of converting the environmental sound audio analog quantity into an environmental sound audio digital quantity. The conversion unit converts the noise sampling audio frequency analog quantity into a noise sampling audio frequency digital quantity. And
and the digital signal output end is capable of outputting the ambient sound audio digital quantity and the noise sampling audio digital quantity.
A first stage FIR filter is provided having a first input, a first stage filtering unit and a first output. The first input end is connected with the digital signal output end.
The first input end obtains the audio digital quantity of the environmental sound and the audio digital quantity of the noise sample.
The first stage filter unit is capable of obtaining a first sequence of filter coefficients from the noise sampled audio digital values.
And acquiring a section of first-stage filtering audio data according to the first filtering coefficient sequence and the set audio digital quantity of the window function filtering environment sound.
And judging whether the interrupt information is received or not, and if not, acquiring the environmental sound audio and the noise sampling audio corresponding to the environmental sound audio from the audio acquisition device again. Multiple segments of first-level filtered audio data are obtained.
A first output capable of outputting a plurality of segments of first-stage filtered audio data.
A memory is provided which is connected to the first output terminal and is capable of sequentially storing the plurality of pieces of first-stage filtered audio data in the storage unit.
A second stage FIR filter is provided having a second input, a second stage filtering unit and a second output.
The second input end is connected with the storage unit to obtain multiple sections of first-stage filtering audio data.
And the second-stage filtering unit acquires a second filtering coefficient of each section of first filtering audio data according to the first filtering coefficient sequence corresponding to each section of first-stage filtering audio data.
And splicing the multiple sections of first-stage filtering audio data into a group of audio according to the storage sequence of the storage units.
And respectively filtering multiple sections of audio in a group of audio according to the second filter coefficient of each section of first filtered audio data to obtain second-stage filtered audio data.
A D/a converter is provided and connected to the second output, the D/a converter being capable of converting the second stage filtered audio data into a target analog signal.
And a loudspeaker connected with the D/A converter, wherein the loudspeaker can acquire a target analog quantity signal output by the D/A converter, and the loudspeaker generates sound waves according to the target analog quantity signal to counteract noise audio in the environmental sound audio.
Compared with the prior art, the invention has the technical effects that: adopt first order FIR filter and second order FIR filter cascade, with the frequency characteristic fit to acoustic system, the work of filter coefficient timing is little, the work of IIR filter coefficient timing has been saved, not only it is better to the frequency characteristic fit below 1kHz, but also better to the fitting effect of 1kHz ~3kHz, the degradable frequency range of making an uproar that has improved random noise, send a sound wave that tends to unanimity with the opposite range of noise sound wave phase through the speaker in the earphone like this, the sound wave that noise sound wave and speaker sent offsets each other after the stack, make the noise intensity that the person of wearing hears obviously reduce.
Drawings
FIG. 1 is a block diagram of an active noise reduction system of the present invention.
FIG. 2 is a schematic diagram of the first and second stages of FIR filters processing data in the present invention.
Fig. 3 is a time domain impulse response waveform diagram of a second stage FIR filter.
Fig. 4 is a time domain impulse response waveform diagram after the first stage FIR filter and the second stage FIR filter are cascaded.
Fig. 5 is a comparison graph of the results of fitting the target amplitude characteristic.
Fig. 6 is a comparison graph of the results of fitting the target phase characteristics.
Detailed Description
The following describes embodiments of the present invention with reference to the drawings.
As shown in fig. 1, an embodiment of the present invention is an active noise reduction system, including:
an audio collector 10 has an audio collecting terminal and an audio output terminal. The audio acquisition end can acquire a section of environmental sound audio and a section of noise sampling audio corresponding to the environmental sound audio. The audio output end can output a section of environmental sound audio analog quantity and a section of noise sampling audio analog quantity. The audio collector may be a Microphone (MIC), which is an energy conversion device capable of converting a sound signal into an analog signal.
An A/D converter 20 having: and the analog signal receiving end is connected with the audio output end and receives the environmental sound audio analog quantity and the noise sampling audio analog quantity.
A conversion unit capable of converting the environmental sound audio analog quantity into an environmental sound audio digital quantity. The conversion unit converts the noise sampling audio frequency analog quantity into a noise sampling audio frequency digital quantity. And the digital signal output end is capable of outputting the ambient sound audio digital quantity and the noise sampling audio digital quantity.
A first stage FIR filter 30 having a first input, a first stage filtering unit and a first output. The first input end is connected with the digital signal output end. The first input end obtains the audio digital quantity of the environmental sound and the audio digital quantity of the noise sample.
The first stage filter unit is capable of obtaining a first sequence of filter coefficients from the noise sampled audio digital values.
And acquiring a section of first-stage filtering audio data according to the first filtering coefficient sequence and the set audio digital quantity of the window function filtering environment sound. And judging whether the interrupt information is received or not, and if not, acquiring the environmental sound audio and the noise sampling audio corresponding to the environmental sound audio from the audio acquisition device again. Multiple segments of first-level filtered audio data are obtained.
A first output capable of outputting a plurality of segments of first-stage filtered audio data.
A memory 40 connected to the first output terminal and capable of sequentially storing the plurality of pieces of first-stage filtered audio data into the storage unit.
A second stage FIR filter 50 having a second input, a second stage filtering unit and a second output. The second input end is connected with the storage unit to obtain multiple sections of first-stage filtering audio data.
And the second-stage filtering unit acquires a second filtering coefficient of each section of first filtering audio data according to the first filtering coefficient sequence corresponding to each section of first-stage filtering audio data. And splicing the multiple sections of first-stage filtering audio data into a group of audio according to the storage sequence of the storage units. And respectively filtering multiple sections of audio in a group of audio according to the second filter coefficient of each section of first filtered audio data to obtain second-stage filtered audio data.
A D/a converter 60 connected to the second output terminal, the D/a converter being capable of converting the second stage filtered audio data into a target analog signal.
And a speaker 70 connected to the D/a converter 60, the speaker being capable of acquiring the target analog signal output by the D/a converter, the speaker generating sound waves according to the target analog signal to cancel noise in the ambient sound audio.
In the active noise reduction process of the earphone, a section of ambient sound audio comprises noise audio to be eliminated and audio emitted by the earphone.
The section of noise sampling audio is the noise audio to be eliminated, the audio collector 10 collects the section of noise sampling audio, and the a/D converter 20 converts the analog quantity of the noise sampling audio into the digital quantity of the noise sampling audio. The noise sample audio digital values are the targets to which first stage FIR filter 30 and second stage FIR filter 50 are fitted.
The first stage FIR filter 30 can obtain a first filtering coefficient sequence according to the noise sampling audio digital quantity, and the first stage FIR filter 30 obtains a section of first stage filtering audio data according to the first filtering coefficient sequence and the set window function filtering environmental sound audio digital quantity.
The first filter coefficient is obtained by a developer by adjusting the initial filter coefficient of the first stage FIR filter 30 according to the noise sampling audio digital quantity. The filter coefficients are weights when used to filter the data.
As shown in fig. 2, which schematically shows six pieces of first-stage filtered audio data acquired by the first-stage FIR filter 30 in fig. 2, the memory 40 can sequentially store the six pieces of first-stage filtered audio data in the storage unit.
The second stage FIR filter 50 obtains the second filter coefficient of each section of the first filtered audio data according to the first filter coefficient sequence corresponding to each section of the first stage filtered audio data. And splicing every three sections of first-stage filtering audio data into a group of audio according to the storage sequence of the storage units. And respectively filtering three sections of audio in the group of audio according to the second filter coefficients of every three sections of first filtered audio data to obtain second-stage filtered audio data. The second stage of filtered audio data is the fitted data.
In other words, the phase and amplitude of the second stage filtered audio data output by the second stage FIR filter 50 approach to the actual ambient noise, the target data can be inverted by the second stage FIR filter 50, and the inverted target data and the ambient noise have opposite phases and opposite amplitudes, which tend to be consistent. The target data is converted into a target analog quantity signal by the D/a converter 60, and the speaker 70 generates a sound wave according to the target analog quantity signal to cancel the ambient noise sound wave in the ambient sound.
The invention adopts the scheme to fit the frequency characteristics of the noise sampling audio, saves the work of IIR filter coefficient adjustment, has better fitting effect on the frequency characteristics below 1kHz and the fitting effect of 1 kHz-3 kHz, improves the noise-reducing frequency range of random noise, and thus, a sound wave with opposite phase and consistent amplitude with the environmental noise is emitted by a loudspeaker in the earphone, and the sound waves are mutually offset after being superposed, so that the noise intensity heard by a wearer is obviously reduced.
An a/D Converter (ADC) is a device capable of converting a Digital quantity into an Analog quantity. A D/a Converter (DAC), also called D/a Converter, converts Digital quantity into Analog quantity.
An fir (finite Impulse response) filter is a finite single-bit Impulse response filter, which is also called a non-recursive filter, and can ensure an arbitrary amplitude-frequency characteristic while having a strict linear phase-frequency characteristic, and the unit sampling response of the filter is finite.
On the basis of the above embodiments, the first-stage FIR filter in this embodiment is a cascaded FIR filter with one, two, or more stages of rectangular windows.
The segments of first-stage filtered audio data are stored in a memory in a cyclically addressed manner.
The second stage FIR filter reads multiple pieces of first stage filtered audio data in memory in a circular addressing manner.
The first stage FIR filter 30 of the present invention performs the first stage filtering on the sampling data outputted by the A/D converter, wherein the first stage FIR filter 30 is the cascade of the first, second or multi-stage rectangular windows, the length of the rectangular window is very small, the output of the first stage FIR filter 30 is buffered to the memory in the way of cyclic addressing, the second stage FIR filter 50 reads the data in the memory in the way of cyclic addressing to perform the second stage FIR filtering.
The second stage FIR filter 50 has a large coefficient length, but most of the coefficients are 0, the output of the second stage FIR filter 50 is sent to the D/a converter 60 for conversion, and the first stage FIR filter 30 is cascaded with the second stage FIR filter 50 through a memory to jointly complete the active noise reduction and filtering function. The invention realizes the ultra-high order FIR noise reduction filtering, has low requirements on the clock frequency of digital logic work and the storage of filter coefficients, and is easy to realize.
The memory 40 of the present invention is used to temporarily store the digital data signal, so that the first stage FIR filter 30 is buffered to the memory in a circular addressing manner, and the second stage FIR filter 50 can read the digital data signal in the memory in a circular addressing manner.
The first stage FIR filter and the second stage FIR filter are both digital filters, and the second stage FIR filter can be a "comb filter", which is characterized in that the filter coefficients generally contain more 0 s.
The buffer length refers to the number of memory cells in the memory, 4096 memory cells in the memory, and one memory cell is 20 bits.
The following is a specific implementation of the present invention.
The first stage FIR filter 30 is formed by a cascade of two rectangular windows of sixteen lengths.
The formula for each level of rectangular window implementation is:
Figure 100002_DEST_PATH_IMAGE002AAAA
where n denotes the index of the data output by the a/D converter. x represents the data output by the a/D converter. x (n) represents the data output by the a/D converter denoted by n. y (n) represents the data output by the first stage FIR filter, numbered n.
A plurality of sampling data are stored in a memory, a rectangular window realizes the sliding average, a rectangular window with the length of 16 is the weighted average of 16 sampling points, and the average value is used for calculation. The rectangular window is moved once and then a new set of data is summed and then averaged.
The coefficient sequence of the first stage FIR filter 30 after the rectangular window cascade may be: 1, 2, 3, 4, 5, 6, 7, 8,9, 10, 11, 12, 13, 14, 15, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3,2, 1.
The buffer length of the memory 40 is 4096 memory cells, and the bit width of each memory cell in the memory 40 is 20 bits.
Storing segments of first-stage filtered audio data in a memory in a cyclically addressed manner, comprising:
when the memory receives a section of first-stage filtering audio data output by the first-stage FIR filter, the address pointer corresponding to the received section of first output data is increased by 1 and then written into the memory, and when the address pointer is increased to 4095, the address pointer is increased from 0.
In the reset state, the write address pointer of the memory is 0. The current most recently written memory address pointer, denoted as Pw (n), is formulated as follows:
Figure DEST_PATH_IMAGE004AAAAA
wherein, PwAnd (n) is the current most recently written memory address pointer. mod represents the remainder operation.
The second stage FIR filter 50 coefficients are 4096 memory cells in length.
The second stage FIR filter 50 reads the data in the memory in a cyclic addressing manner, the number of non-0 coefficients in the coefficient waveform of the second stage FIR filter 50 is 256, 15 0 coefficients are uniformly complemented among the non-0 coefficients, and the serial numbers of the non-0 coefficients are 1, 17, 33 and 49 … ….
The operation of the second stage FIR filter 50 comprises the following steps:
respectively filtering a plurality of audio frequencies in a group of audio frequencies according to a second filter coefficient of each section of first filtered audio data to obtain second-stage filtered audio data, and the method comprises the following steps:
s1: initializing the accumulator to 0, reading a section of audio in the group of audio newly buffered from the newly written memory address Pw (n), multiplying the section of audio by the second filter coefficient of sequence number 1, and adding the multiplied section of audio to the accumulator.
S2: the read address pointer minus 16 reads the audio in a group of audio and multiplies the audio by the second filter coefficient of sequence number 17 and adds to the accumulator, and so on, and adds 4096 when the read address pointer value decreases to a negative value.
Repeating steps S1 and S2 a total of 256 times, formulated as follows:
Figure DEST_PATH_IMAGE006AAAAA
wherein i is the number of operations; b () is the output of the first stage FIR filter of the read memory, h () is the non-0 coefficient of the second stage FIR filter, and z () is the output of the second stage FIR filter.
Fig. 3 is a time domain impulse response waveform diagram of a second stage FIR filter, and the enlarged content of the solid line ellipse at M in fig. 3 is located in a dashed line box. The number of the equivalent filter coefficients of the first stage FIR filter and the second stage FIR filter after cascade connection is 4126, as shown in fig. 4, a time domain impulse response waveform diagram after the first stage FIR filter and the second stage FIR filter are cascade connected.
The above steps complete the operation of one sampling point of the second stage filtering, 256 times of multiply-accumulate operations are required, the update rate of each sampling point is 192kHz, when one multiply-accumulator is multiplexed, the work clock of the multiply-accumulator is required to be 49.152MHz, 256 non-0 filter coefficients are required to be stored, and the power consumption and the complexity are very low in implementation.
Fig. 5 is a graph comparing the effect of the method provided by the present invention and the method of cascading multiple IIR filters on fitting the target amplitude characteristics. Fig. 6 is a comparison of the effect of fitting to the phase characteristics of the target. The curve S1 represents a target waveform to be fitted, the curve S2 represents a waveform formed by fitting the curve S1 according to the present invention, and the curve S3 represents a waveform formed by fitting a target curve using a 6-stage 2-step cascaded IIR filter according to the related art.
The target amplitude-frequency characteristic curve S1 (a '∙' line) is not smooth in zigzag, a 6-stage 2-order IIR cascaded filter can only generate a smooth fitting curve S3 (a 'line') to approximate a curve within 1kHz, and fitting errors above 1kHz are increased rapidly. It can be seen in fig. 6 that the method provided by the present invention fits well to the phase frequency characteristic curve with frequencies in the 3kHz range.
According to the invention, the first-stage FIR filter and the second-stage FIR filter are cascaded to fit the frequency characteristics of the acoustic system, so that the work of IIR filter coefficient adjustment is omitted, the frequency characteristics below 1kHz can be well fitted, the fitting effect in the range of 1 kHz-3 kHz is better, and the noise-reducing frequency range of random noise is improved.
Another embodiment of the present invention is an active noise reduction method, including:
an audio collector 10 is provided having an audio collecting terminal and an audio output terminal. The audio acquisition end can acquire a section of environmental sound audio and a section of noise sampling audio corresponding to the environmental sound audio. The audio output end can output a section of environmental sound audio analog quantity and a section of noise sampling audio analog quantity. The audio collector may be a Microphone (MIC), which is an energy conversion device capable of converting a sound signal into an electrical signal.
An A/D converter 20 is provided, which has: and the analog signal receiving end is connected with the audio output end and receives the environmental sound audio analog quantity and the noise sampling audio analog quantity.
A conversion unit capable of converting the environmental sound audio analog quantity into an environmental sound audio digital quantity. The conversion unit converts the noise sampling audio frequency analog quantity into a noise sampling audio frequency digital quantity. And the digital signal output end is capable of outputting the ambient sound audio digital quantity and the noise sampling audio digital quantity.
A first stage FIR filter 30 is provided having a first input, a first stage filtering unit and a first output. The first input end is connected with the digital signal output end. The first input end obtains the audio digital quantity of the environmental sound and the audio digital quantity of the noise sample.
The first stage filter unit is capable of obtaining a first sequence of filter coefficients from the noise sampled audio digital values.
And acquiring a section of first-stage filtering audio data according to the first filtering coefficient sequence and the set audio digital quantity of the window function filtering environment sound. And judging whether the interrupt information is received or not, and if not, acquiring the environmental sound audio and the noise sampling audio corresponding to the environmental sound audio from the audio acquisition device again. Multiple segments of first-level filtered audio data are obtained.
A first output capable of outputting a plurality of segments of first-stage filtered audio data.
A memory 40 is provided which is connected to the first output and is capable of sequentially storing the plurality of pieces of first-stage filtered audio data in the storage unit.
A second stage FIR filter 50 is provided having a second input, a second stage filtering unit and a second output. The second input end is connected with the storage unit to obtain multiple sections of first-stage filtering audio data.
And the second-stage filtering unit acquires a second filtering coefficient of each section of first filtering audio data according to the first filtering coefficient sequence corresponding to each section of first-stage filtering audio data. And splicing the multiple sections of first-stage filtering audio data into a group of audio according to the storage sequence of the storage units. And respectively filtering multiple sections of audio in a group of audio according to the second filter coefficient of each section of first filtered audio data to obtain second-stage filtered audio data.
A D/a converter 60 is provided which is connected to the second output terminal, the D/a converter being capable of converting the second stage filtered audio data into a target analog signal.
A speaker 70 is provided and is connected to the D/a converter, the speaker being capable of acquiring the target analog signal output by the D/a converter, the speaker generating sound waves based on the target analog signal to cancel noise in the ambient sound audio.
The technical scheme of the active noise reduction method is the same as the concept of the active noise reduction system, and reference is specifically made to the description of the active noise reduction system, which is not described herein again.
The preferred embodiments and examples of the present application have been described in detail with reference to the accompanying drawings, but the present application is not limited to the embodiments and examples described above, and various changes can be made within the knowledge of those skilled in the art without departing from the concept of the present application.

Claims (6)

1. An active noise reduction system, comprising:
the audio acquisition device is provided with an audio acquisition end and an audio output end;
the audio acquisition end can acquire a section of environmental sound audio and a section of noise sampling audio corresponding to the environmental sound audio; the audio output end can output the section of the environmental sound audio analog quantity and the section of the noise sampling audio analog quantity;
an A/D converter having:
the analog signal receiving end is connected with the audio output end and receives the environmental sound audio analog quantity and the noise sampling audio analog quantity;
a conversion unit capable of converting the environmental sound audio analog quantity into an environmental sound audio digital quantity; the conversion unit converts the noise sampling audio frequency analog quantity into a noise sampling audio frequency digital quantity; and
a digital signal output capable of outputting said ambient sound audio digital quantity and said noise sample audio digital quantity;
a first stage FIR filter having a first input, a first stage filtering unit and a first output; the first input end is connected with the digital signal output end;
the first input end obtains the environmental sound audio digital quantity and the noise sampling audio digital quantity;
the first stage filtering unit can obtain a first filtering coefficient sequence according to the noise sampling audio digital quantity;
filtering the environmental sound audio digital quantity according to the first filtering coefficient sequence and a set window function to obtain a section of first-stage filtering audio data;
judging whether the interrupt information is received or not, if not, acquiring the environmental sound audio and the noise sampling audio corresponding to the environmental sound audio from the audio collector again; acquiring multiple sections of first-stage filtering audio data;
the first output end can output a plurality of sections of first-stage filtering audio data;
a memory connected to the first output terminal and capable of sequentially storing the plurality of pieces of first-stage filtered audio data in a storage unit;
a second stage FIR filter having a second input, a second stage filtering unit and a second output;
the second input end is connected with the storage unit to obtain a plurality of sections of first-stage filtering audio data;
the second-stage filtering unit acquires a second filtering coefficient of each section of first filtering audio data according to the first filtering coefficient sequence corresponding to each section of first-stage filtering audio data;
splicing a plurality of sections of first-stage filtering audio data into a group of audio according to the storage sequence of the storage unit;
respectively filtering multiple audio frequencies in the group of audio frequencies according to a second filter coefficient of each section of first filtered audio data to obtain second-stage filtered audio data;
a D/A converter connected to said second output, said D/A converter being capable of converting the second stage filtered audio data to a target analog signal;
and the loudspeaker is connected with the D/A converter and can acquire a target analog quantity signal output by the D/A converter, and the loudspeaker generates sound waves according to the target analog quantity signal to counteract noise audio in the environmental sound audio.
2. The active noise reduction system of claim 1, wherein the first stage FIR filter is a cascaded FIR filter of one, two, or more stages of rectangular windows;
storing a plurality of pieces of first-stage filtered audio data into the memory in a cyclically addressed manner;
the second stage FIR filter reads multiple segments of first stage filtered audio data in memory in a circular addressed manner.
3. The active noise reduction system of claim 2, wherein the first stage FIR filter is constructed of a cascade of two rectangular windows of sixteen lengths; the formula for each level of rectangular window implementation is:
Figure DEST_PATH_IMAGE002AAAA
wherein n represents the index of the output data of the A/D converter; x represents data output by the A/D converter; x (n) represents the data output by the a/D converter denoted by n; y (n) represents the data output by the first stage FIR filter, numbered n.
4. The active noise reduction system of claim 3, wherein the buffer length of the memory is 4096 memory cells, and the bit width of each memory cell in the memory is 20 bits;
storing segments of first-stage filtered audio data in a memory in a cyclically addressed manner, comprising:
when the memory receives a section of first-stage filtering audio data output by a first-stage FIR filter, an address pointer corresponding to the received section of first output data is increased by 1 and then written into the memory, and when the address pointer is increased to 4095, the address pointer is increased from 0;
in a reset state, a write address pointer of the memory is 0; the current most recently written memory address pointer, denoted as Pw (n), is formulated as follows:
Figure DEST_PATH_IMAGE004AAAA
wherein, Pw(n) is the current most recently written memory address pointer; mod represents the remainder operation.
5. The active noise reduction system of claim 4, wherein the second stage FIR filter coefficients are 4096 memory cells in length;
respectively filtering a plurality of audio frequencies in the group of audio frequencies according to a second filter coefficient of each section of first filtered audio data to obtain second-stage filtered audio data, and the method comprises the following steps:
s1: initializing the value of an accumulator to be 0, reading a section of audio in the group of audio which is cached latest from the latest written memory address Pw (n), multiplying the section of audio by a second filter coefficient of a sequence number 1, and adding the section of audio to the accumulator;
s2: reading the audio frequency in a group of audio frequencies after subtracting 16 from the read address pointer, multiplying the audio frequency by a second filter coefficient of a sequence number 17, adding the multiplied audio frequency to an accumulator, and so on, and adding 4096 when the value of the read address pointer is subtracted to a negative value;
repeating steps S1 and S2 a total of 256 times, formulated as follows:
Figure DEST_PATH_IMAGE006AAA
wherein i is the number of operations; b () is the output of the first stage FIR filter of the read memory, h () is the non-0 coefficient of the second stage FIR filter, and z () is the output of the second stage FIR filter.
6. An active noise reduction method, comprising:
configuring an audio collector which is provided with an audio collecting end and an audio output end;
the audio acquisition end can acquire a section of environmental sound audio and a section of noise sampling audio corresponding to the environmental sound audio; the audio output end can output the section of the environmental sound audio analog quantity and the section of the noise sampling audio analog quantity;
configuring an A/D converter having:
the analog signal receiving end is connected with the audio output end and receives the environmental sound audio analog quantity and the noise sampling audio analog quantity;
a conversion unit capable of converting the environmental sound audio analog quantity into an environmental sound audio digital quantity; the conversion unit converts the noise sampling audio frequency analog quantity into a noise sampling audio frequency digital quantity; and
a digital signal output capable of outputting said ambient sound audio digital quantity and said noise sample audio digital quantity;
configuring a first stage FIR filter having a first input terminal, a first stage filtering unit and a first output terminal; the first input end is connected with the digital signal output end;
the first input end obtains the environmental sound audio digital quantity and the noise sampling audio digital quantity;
the first stage filtering unit can obtain a first filtering coefficient sequence according to the noise sampling audio digital quantity;
filtering the environmental sound audio digital quantity according to the first filtering coefficient sequence and a set window function to obtain a section of first-stage filtering audio data;
judging whether the interrupt information is received or not, if not, acquiring the environmental sound audio and the noise sampling audio corresponding to the environmental sound audio from the audio collector again; acquiring multiple sections of first-stage filtering audio data;
the first output end can output a plurality of sections of first-stage filtering audio data;
configuring a memory connected to the first output terminal and capable of sequentially storing the plurality of pieces of first-stage filtered audio data in a storage unit;
configuring a second stage FIR filter having a second input terminal, a second stage filtering unit and a second output terminal;
the second input end is connected with the storage unit to obtain a plurality of sections of first-stage filtering audio data;
the second-stage filtering unit acquires a second filtering coefficient of each section of first filtering audio data according to the first filtering coefficient sequence corresponding to each section of first-stage filtering audio data;
splicing a plurality of sections of first-stage filtering audio data into a group of audio according to the storage sequence of the storage unit;
respectively filtering multiple audio frequencies in the group of audio frequencies according to a second filter coefficient of each section of first filtered audio data to obtain second-stage filtered audio data;
configuring a D/a converter connected to the second output terminal, the D/a converter being capable of converting the second stage filtered audio data into a target analog signal;
and configuring a loudspeaker connected with the D/A converter, wherein the loudspeaker can acquire the target analog quantity signal output by the D/A converter, and the loudspeaker generates sound waves according to the target analog quantity signal to counteract the noise audio in the environmental sound audio.
CN202010783741.7A 2020-08-06 2020-08-06 Active noise reduction system and method Active CN111739505B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010783741.7A CN111739505B (en) 2020-08-06 2020-08-06 Active noise reduction system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010783741.7A CN111739505B (en) 2020-08-06 2020-08-06 Active noise reduction system and method

Publications (2)

Publication Number Publication Date
CN111739505A true CN111739505A (en) 2020-10-02
CN111739505B CN111739505B (en) 2021-01-12

Family

ID=72658161

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010783741.7A Active CN111739505B (en) 2020-08-06 2020-08-06 Active noise reduction system and method

Country Status (1)

Country Link
CN (1) CN111739505B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1011074A (en) * 1996-06-19 1998-01-16 Toa Corp Electronic silencer
CN107731217A (en) * 2017-10-18 2018-02-23 恒玄科技(上海)有限公司 A kind of active noise reduction system and method for realizing different frequency response fitting
CN107743279A (en) * 2017-10-09 2018-02-27 维沃移动通信有限公司 A kind of earphone noise-reduction method, earphone and mobile terminal
CN107864419A (en) * 2017-10-23 2018-03-30 恒玄科技(上海)有限公司 It is a kind of for the simulating of active noise reduction, numeral mixing noise reduction system
CN109348327A (en) * 2018-08-15 2019-02-15 恒玄科技(上海)有限公司 A kind of active noise reduction system
CN110896512A (en) * 2019-12-13 2020-03-20 恒玄科技(上海)股份有限公司 Noise reduction method and system for semi-in-ear earphone and semi-in-ear earphone
CN111193977A (en) * 2019-12-13 2020-05-22 恒玄科技(上海)股份有限公司 Noise reduction method of earphone, self-adaptive FIR filter, noise removal filter bank and earphone
US10665220B1 (en) * 2019-03-05 2020-05-26 Bose Corporation Active noise reduction (ANR) system with multiple feedforward microphones and multiple controllers
CN111245401A (en) * 2020-01-10 2020-06-05 深圳大学 Sparse coefficient FIR filter design method, filter, device and medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1011074A (en) * 1996-06-19 1998-01-16 Toa Corp Electronic silencer
CN107743279A (en) * 2017-10-09 2018-02-27 维沃移动通信有限公司 A kind of earphone noise-reduction method, earphone and mobile terminal
CN107731217A (en) * 2017-10-18 2018-02-23 恒玄科技(上海)有限公司 A kind of active noise reduction system and method for realizing different frequency response fitting
CN107864419A (en) * 2017-10-23 2018-03-30 恒玄科技(上海)有限公司 It is a kind of for the simulating of active noise reduction, numeral mixing noise reduction system
CN109348327A (en) * 2018-08-15 2019-02-15 恒玄科技(上海)有限公司 A kind of active noise reduction system
US10665220B1 (en) * 2019-03-05 2020-05-26 Bose Corporation Active noise reduction (ANR) system with multiple feedforward microphones and multiple controllers
CN110896512A (en) * 2019-12-13 2020-03-20 恒玄科技(上海)股份有限公司 Noise reduction method and system for semi-in-ear earphone and semi-in-ear earphone
CN111193977A (en) * 2019-12-13 2020-05-22 恒玄科技(上海)股份有限公司 Noise reduction method of earphone, self-adaptive FIR filter, noise removal filter bank and earphone
CN111245401A (en) * 2020-01-10 2020-06-05 深圳大学 Sparse coefficient FIR filter design method, filter, device and medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王华等: "《MATLAB电子仿真与应用教程》", 30 April 2007 *

Also Published As

Publication number Publication date
CN111739505B (en) 2021-01-12

Similar Documents

Publication Publication Date Title
JP3308243B2 (en) Hearing aid and method of operating the hearing aid
US4187413A (en) Hearing aid with digital processing for: correlation of signals from plural microphones, dynamic range control, or filtering using an erasable memory
CN102648492B (en) Delay techniques in active noise cancellation circuits or other circuits that perform filtering of decimated coefficients
JP2921849B2 (en) Electroacoustic systems, hearing aids, electronic filters for use in hearing aids, and methods of operating hearing aids
US5475759A (en) Electronic filters, hearing aids and methods
CN107731217B (en) Active noise reduction system and method for realizing fitting of different frequency responses
Lai Practical digital signal processing
WO2012082361A1 (en) Adaptive noise cancellation
GB2282933A (en) Active noise controller including a lattice-type digital filter
EP3293884A1 (en) Analog-to-digital converter with noise shaping
EP0337458A2 (en) Apparatus for synthesizing analog signals in PCM
CN102194451A (en) Signal processing device and stringed instrument
CN103380628A (en) Audio processing device, audio processing method, and program
CN111988708A (en) Single-microphone-based howling suppression method and device
CN111739505B (en) Active noise reduction system and method
US20150127333A1 (en) Efficient digital microphone receiver process and system
JP2003501914A (en) Digital filters for hearing aids
CN103312911B (en) Data processing method and electronic terminal
Liu et al. A 98.6 μW acoustic signal processor for fully-implantable cochlear implants
Mustafa et al. Design and implementation of least mean square adaptive filter on Altera Cyclone II field programmable gate array for active noise control
Raj et al. Design and implementation of reconfigurable digital filter bank for hearing aid
JP3147562B2 (en) Audio speed conversion method
JP4940347B1 (en) Correction filter processing apparatus and method
SU1654983A1 (en) Adaptive device for suppressing acoustic self-excitation
CN1776805B (en) Low internal-memory-demand digital reverberation system and method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant