Filter coefficient determination method and device, equipment, vehicle and storage medium

By using the impulse response and Fourier transform technology of multiple sets of measurement equipment in the sound field equalization method, the frequency domain weight matrix is ​​generated and the filter coefficients of the loudspeaker are calculated, which solves the problem that it is difficult to achieve the optimal solution for sound field equalization in the existing technology. , improving the effect and accuracy of sound field equalization.

CN119363071APending Publication Date: 2025-01-24XIAOMI EV TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310912853.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-24
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

When determining the filter coefficients, the existing acoustic field equalization method is difficult to achieve the optimal solution for acoustic field equalization, and has high requirements for microphone position accuracy.

Method used

By obtaining multiple impulse responses measured by multiple sets of measuring equipment in the same space, Fourier transform is performed to obtain the transfer function, a transfer function matrix is ​​formed, and the target amplitude-frequency response vector is determined. Based on this, a frequency domain weight matrix is ​​generated, and the inverse The Fourier transform obtains the filter coefficients for each speaker.

Benefits of technology

It reduces the difficulty of sound field balance, improves the accuracy of the filter coefficient, and achieves a better sound field balance effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119363071A_ABST
    Figure CN119363071A_ABST
Patent Text Reader

Abstract

The invention provides a filter coefficient determination method and device, equipment, a vehicle and a storage medium, and relates to the technical field of acoustics. According to the specific implementation scheme, multiple impulse responses measured in the same space are determined; forming a transfer function matrix based on transfer functions corresponding to the multiple impulse responses; determining a target amplitude-frequency response vector under each frequency; based on the transfer function matrix and the target amplitude-frequency response vector, calculating a corresponding frequency domain weight matrix when a preset function is minimum; and performing inverse Fourier transform on each row vector in the frequency domain weight matrix to obtain a filter coefficient corresponding to each loudspeaker. Therefore, the difficulty of sound field equalization is reduced, the accuracy of the obtained filter coefficient is improved, and the effect of sound field equalization is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of acoustic technology, and in particular to a method, device, equipment, vehicle and storage medium for determining filter coefficients. Background Art

[0002] In the field of sound field reconstruction, existing sound field equalization methods usually use plane waves as the desired frequency response, and then calculate the filter coefficients corresponding to each speaker when the desired frequency response is achieved.

[0003] This sound field equalization method has high requirements on the position accuracy of the microphone (control point), and it is difficult to achieve the optimal solution for sound field equalization. Summary of the invention

[0004] The present disclosure provides a method, device, electronic device, storage medium and computer program product for determining filter coefficients.

[0005] According to a first aspect of the present disclosure, a method for determining a filter coefficient is provided, comprising:

[0006] Acquire multiple impulse responses measured by multiple groups of measurement devices in the same space, wherein each impulse response corresponds to a group of measurement devices, each group of measurement devices includes a speaker and a microphone, and the impulse response represents a change in amplitude over time;

[0007] Convert each impulse response from time domain to frequency domain according to a Fourier transform algorithm to obtain a transfer function corresponding to each impulse response, wherein the transfer function represents the change of amplitude with frequency;

[0008] forming a transfer function matrix based on the transfer functions corresponding to the plurality of impulse responses;

[0009] Determine a target amplitude-frequency response vector at each frequency, wherein the target amplitude-frequency response vector includes the target amplitude-frequency response of each microphone at the frequency;

[0010] Based on the transfer function matrix and the target amplitude-frequency response vector, determining a frequency domain weight matrix corresponding to a minimum value of a preset function;

[0011] Perform an inverse Fourier transform on each row vector in the frequency domain weight matrix to obtain a filter coefficient corresponding to each of the loudspeakers.

[0012] According to a second aspect of the present disclosure, there is provided a device for determining filter coefficients, comprising:

[0013] A first acquisition module is used to acquire multiple impulse responses measured by multiple groups of measurement devices in the same space, wherein each impulse response corresponds to a group of measurement devices, each group of measurement devices includes a speaker and a microphone, and the impulse response represents the change of amplitude over time;

[0014] A first processing module, configured to convert each impulse response from the time domain to the frequency domain according to a Fourier transform algorithm to obtain a transfer function corresponding to each impulse response, wherein the transfer function represents a change in amplitude with frequency;

[0015] The first processing module is further configured to form a transfer function matrix based on the transfer functions corresponding to the plurality of impulse responses;

[0016] A first determination module is used to determine a target amplitude-frequency response vector at each frequency, wherein the target amplitude-frequency response vector includes a target amplitude-frequency response of each microphone at the frequency;

[0017] A second determination module is used to determine a frequency domain weight matrix corresponding to a minimum value of a preset function based on the transfer function matrix and the target amplitude-frequency response vector;

[0018] The second processing module is used to transform each row vector in the frequency domain weight matrix to obtain a filter coefficient corresponding to each of the speakers.

[0019] According to a third aspect of the present disclosure, there is provided a vehicle, comprising: a vehicle body, a filter, a speaker and a microphone arranged in a driving compartment of the vehicle body, and a processor and a memory;

[0020] Wherein, the speaker is used to play the audio signal filtered by the filter;

[0021] The microphone is used to collect the audio signal played by the speaker and send the collected audio signal to the processor;

[0022] The processor is used to call the instructions stored in the memory based on the audio signal played by the speaker and the audio signal collected by the microphone to execute the method according to any one of claims 1 to 9.

[0023] According to a fourth aspect of the present disclosure, there is provided an electronic device, including:

[0024] at least one processor;

[0025] and a memory communicatively coupled to the at least one processor;

[0026] The memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor so that the at least one processor can execute the method for determining the filter coefficients as described in the first aspect.

[0027] According to a fifth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, where the computer instructions are used to enable a computer to execute the method for determining filter coefficients as described in the first aspect.

[0028] According to a sixth aspect of the present disclosure, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the method for determining filter coefficients as described in the first aspect.

[0029] In the present disclosure, after first determining multiple impulse responses in the same space, they are Fourier transformed to obtain a transfer function matrix at each frequency, and then the target amplitude-frequency response vector at each frequency is determined, and then a frequency domain weight matrix is ​​generated based on the transfer function matrix and the target amplitude-frequency response vector, and then each row vector in the frequency domain weight matrix is ​​inversely Fourier transformed to obtain the filter coefficient corresponding to each speaker. Thus, not only the difficulty of sound field equalization is reduced, but also the accuracy of the obtained filter coefficient is improved, and the effect of sound field equalization is improved.

[0030] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0032] Figure 1 is a flowchart of a method for determining filter coefficients proposed in an embodiment of the present disclosure;

[0033] Figure 2 is a schematic diagram of a sound playback scenario provided by the present disclosure;

[0034] Figure 3 is a flowchart of another method for determining filter coefficients proposed in an embodiment of the present disclosure;

[0035] Figure 4 is a structural block diagram of a device for determining filter coefficients proposed in an embodiment of the present disclosure;

[0036] Figure 5A is a structural schematic diagram of a vehicle proposed in an embodiment of the present disclosure;

[0037] Figure 5BA schematic block diagram of an electronic device that can be used to implement an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0038] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0039] In the related art, when a plane wave is used as the expected frequency response, for each microphone, it is necessary to design a plane wave that satisfies the plane wave in combination with its position, which may result in the plane wave determined for each microphone not being the optimal solution for sound field equalization, thereby making the obtained filter coefficient less accurate. In the method for determining the filter coefficient provided by the present disclosure, only the target amplitude-frequency response vector is determined for each microphone, and the filter coefficient corresponding to each speaker is calculated based on the target amplitude-frequency response vector, which not only reduces the difficulty of sound field equalization, but also ensures that the filter coefficient corresponding to each speaker determined can achieve sound field equalization.

[0040] The determination of the filter coefficients in the embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0041] Figure 1 A flowchart of a method for determining filter coefficients provided in an embodiment of the present disclosure.

[0042] like Figure 1 As shown, the method includes:

[0043] Step 101: Acquire multiple impulse responses measured by multiple groups of measurement devices in the same space.

[0044] Each impulse response corresponds to a set of measurement equipment, each set of measurement equipment includes a speaker and a microphone, and the impulse response represents the change of amplitude over time.

[0045] The same space in the present disclosure may be any space that includes both a loudspeaker and a microphone, such as a small listening room, a car or other enclosed space, and is not limited thereto.

[0046] Figure 2 Schematic diagram of the sound playback scene provided by the present disclosure. Figure 2 As shown in the figure, the space contains L loudspeakers and M control points, and the impulse response g from each loudspeaker to each microphone can be measured separately. ml[t], m = 1, 2, ..., M, l = 1, 2, ..., L, where m is the number of microphones and l is the number of loudspeakers.

[0047] In the present disclosure, a first frequency sweep signal played by a first loudspeaker (such as loudspeaker 1) in the preset space can be first obtained; then a first microphone (such as microphone 1) in the preset space can be used to collect the first frequency sweep signal to obtain a first collection signal; then, the first frequency sweep signal and the first collection signal are deconvolved to obtain an impulse response corresponding to a first group of measurement equipment, wherein the first group of measurement equipment includes a first loudspeaker and a first microphone.

[0048] It can be understood that when the first speaker plays the first sweep frequency signal, while the first microphone is collecting, other microphones are also collecting at the same time, for example, the second microphone (such as microphone 2) is also collecting the sweep frequency signal at the same time to obtain the second collection signal. At this time, the first speaker and the second microphone constitute a second group of measurement equipment; deconvolution calculation is performed based on the first sweep frequency signal and the second collection signal to obtain the impulse response corresponding to the second group of measurement equipment. By analogy, multiple impulse responses corresponding to multiple measurement equipment constituted by the first speaker and each microphone in the preset space can be obtained.

[0049] In the same way, the impulse response corresponding to the measurement device composed of each loudspeaker and each microphone can be obtained.

[0050] Step 102: Convert each impulse response from the time domain to the frequency domain according to the Fourier transform algorithm to obtain a transfer function corresponding to each impulse response.

[0051] Here, the transfer function represents the variation of amplitude with frequency.

[0052] Step 103: forming a transfer function matrix based on the transfer functions corresponding to the plurality of impulse responses.

[0053] In some possible implementation forms, the impulse response g from each loudspeaker to each microphone in the previous step can be ml [t] Through Fourier transform, the corresponding frequency domain transfer function G can be obtained ml (f). Then, based on the various frequency domain transfer functions, for each frequency f, a transfer function matrix can be determined: Wherein, L is the total number of loudspeakers included in the scene, and M is the total number of microphones included in the scene.

[0054] Step 104: determine a target amplitude-frequency response vector at each frequency, wherein the target amplitude-frequency response vector includes a target amplitude-frequency response of each microphone at the frequency.

[0055] In some possible implementations, when determining the target amplitude-frequency response vector at a certain frequency, the expected amplitude-frequency response of each microphone at the frequency can be determined first. ( represents a positive real number), and then the expected amplitude-frequency responses of all microphones at this frequency are combined into an expected response real vector (This vector is an M-dimensional real vector), then this expected response real vector is the target amplitude-frequency response vector at this frequency.

[0056] Since the purpose of sound field equalization is to make the sound pressure levels at each microphone as equal as possible, in the embodiment of the present disclosure, the preset vector can also be determined as the target amplitude-frequency response vector at each frequency, wherein the preset vector is a vector composed of constant values, and the sizes of the various constant values ​​in the vector can be the same or different, and there is no limitation on this.

[0057] In some embodiments, the size of the constant value contained in the preset vector can be determined based on the requirements of the space. For example, if the space has a higher requirement for sound pressure, the constant value contained in the preset vector can be set to a relatively large value. If the space has a lower requirement for sound, the constant value contained in the preset vector can be set to a relatively small value, and so on. The present disclosure does not limit this.

[0058] Step 105 , based on the transfer function matrix and the target amplitude-frequency response vector, determine the frequency domain weight matrix corresponding to when the preset function takes the minimum value.

[0059] The preset function may be any function that can be used to measure the difference between the actual amplitude-frequency response at the microphone and the target amplitude-frequency response. For example, the preset function may be any one of the following two functions:

[0060]

[0061]

[0062] Where G is the transfer function matrix at any frequency, and w is the frequency domain weight vector at any frequency to be calculated. p d is the target amplitude-frequency response vector at any frequency.

[0063] After determining G and p at each frequency d After that, through the above formula (1) or (2), the frequency domain weight vector w that makes the formula take the minimum value can be calculated.

[0064] In some possible implementation forms, since the above equation (1) or (2) is a nonlinear least squares equation, a related nonlinear least squares method can be used to solve it to obtain a frequency domain weight matrix corresponding to each frequency.

[0065] Then, based on the obtained frequency domain weight vector w(f) corresponding to each frequency, the frequency domain weight matrix corresponding to all frequency points f is calculated (a matrix of L rows and K columns, K is the number of frequency points).

[0066] It should be noted that each column vector in the generated frequency domain weight matrix is ​​a frequency domain weight vector corresponding to a frequency, and each row vector is a frequency domain weight vector corresponding to a loudspeaker at each frequency.

[0067] Step 106: Perform an inverse Fourier transform on each row vector in the frequency domain weight matrix to obtain a filter coefficient corresponding to each loudspeaker.

[0068] In the present disclosure, the frequency domain weight matrix obtained in the above steps is By performing an inverse Fourier transform on each row vector in (a matrix of L rows and K columns, where L is the number of speakers), the filter coefficient corresponding to each speaker can be obtained.

[0069] It should be noted that in the embodiment of the present disclosure, there is no need to consider the frequency response and the position of each microphone. Instead, sound field equalization is performed based on the target amplitude-frequency response to solve the frequency domain weight matrix that minimizes the value of the preset function. This not only reduces the difficulty of calculation, but also ensures that the obtained frequency domain weight matrix can make the sound pressure at each microphone as equal as possible, thereby improving the effect of sound field equalization.

[0070] In the disclosed embodiment, multiple impulse responses in the same space are first determined, and then the multiple impulse responses are Fourier transformed respectively to obtain a transfer function matrix, and then the target amplitude-frequency response vector at each frequency is determined, and then a frequency domain weight matrix is ​​generated based on the transfer function matrix and the target amplitude-frequency response vector, and then each row vector in the frequency domain weight matrix is ​​inversely Fourier transformed to obtain the filter coefficient corresponding to each speaker. In this way, not only the difficulty of sound field equalization is reduced, but also the accuracy of the obtained filter coefficient is improved, and the effect of sound field equalization is improved.

[0071] Figure 3 A flowchart of another method for determining filter coefficients provided in an embodiment of the present disclosure.

[0072] like Figure 3 As shown, the method includes:

[0073] Step 301 : obtaining multiple impulse responses measured by multiple groups of measurement equipment in the same space, wherein each impulse response corresponds to a group of measurement equipment, and each group of measurement equipment includes a loudspeaker and a microphone.

[0074] The impulse response represents the change in amplitude over time.

[0075] Step 302: Convert each impulse response from the time domain to the frequency domain according to the Fourier transform algorithm to obtain a transfer function corresponding to each impulse response.

[0076] Among them, the transfer function represents the change of amplitude with frequency;

[0077] Step 303: forming a transfer function matrix based on the transfer functions corresponding to the plurality of impulse responses.

[0078] The specific implementation process of the above steps 301 to 303 can be found in the detailed description of any embodiment of the present disclosure, and will not be repeated here.

[0079] Step 304: Fusing the transfer functions between each microphone and each loudspeaker at the same frequency to obtain the target amplitude-frequency response of each microphone at the frequency.

[0080] Since the sound pressure level at each microphone is affected by each loudspeaker, the embodiment of the present disclosure determines the target amplitude-frequency response of each microphone at the frequency by fusing the transfer function between each microphone and each loudspeaker at the same frequency.

[0081] In some possible implementation forms, the amplitude-frequency response between the second microphone and each speaker at the first frequency can be determined first according to the transfer function between the second microphone and each speaker at the first frequency, and then the average of the amplitude-frequency responses between the second microphone and each speaker at the first frequency can be determined as the target amplitude-frequency response of the second microphone at the corresponding frequency. The second microphone can be any microphone in the space, and the first frequency can be any frequency.

[0082] For example, the transfer function between the ith microphone and each loudspeaker at frequency k can be modulo-measured to determine the amplitude-frequency response between the ith microphone and each loudspeaker at frequency k, and then multiple amplitude-frequency responses of the ith microphone at frequency k can be averaged to obtain the target amplitude-frequency response corresponding to the ith microphone at frequency k, where i and k are positive integers.

[0083] In addition, in order to avoid the influence of noise in the obtained target amplitude-frequency response, in the embodiment of the present disclosure, before determining the target amplitude-frequency response of the microphone at each frequency, the amplitude-frequency response between the microphone and each loudspeaker may be smoothed.

[0084] In some possible implementation forms, the amplitude-frequency response between the third microphone and each speaker at the second frequency can be first determined based on the transfer function between the third microphone and each speaker at the second frequency; then, the average of the amplitude-frequency responses between the third microphone and each speaker at the second frequency can be determined as the reference amplitude-frequency response of the third microphone at the second frequency; and then, the reference amplitude-frequency response can be smoothed by a specified octave to obtain the target amplitude-frequency response of the third microphone at the second frequency.

[0085] Among them, performing a specified octave smoothing process on the reference amplitude-frequency response means smoothing each frequency point in the reference amplitude-frequency response with a Hanning window of a specified octave width, that is, taking a weighted average of the amplitude-frequency responses of all frequency points within the Hanning window range corresponding to each frequency point, and finally obtaining the smoothed amplitude-frequency response corresponding to the frequency point. Among them, the width of the Hanning window can be set as needed, such as the Hanning window width of 10 Hz, 5 Hz, 1 Hz, etc., which is not limited in the present disclosure.

[0086] In some possible implementations, the amplitude-frequency response between the third microphone and the loudspeaker at the second frequency may be first smoothed by a specified octave, and then the multiple smoothed amplitude-frequency responses may be fused to obtain the target amplitude-frequency response of the third microphone at the second frequency.

[0087] For example, there are 10 microphones and 5 loudspeakers in the current scene. For each microphone, its amplitude-frequency response with the 5 loudspeakers at each frequency can be smoothed by a specified octave to obtain 5 smoothed amplitude-frequency responses. The 5 smoothed amplitude-frequency responses at the same frequency can then be averaged to obtain the target amplitude-frequency response at that frequency.

[0088] The specified octave may be selected as needed, for example, 2 octave, 1 octave, or one-third octave, etc. In the disclosed embodiment, in order to ensure the accuracy of the determined filter coefficients, one-third octave may be selected.

[0089] Step 305 : Based on the transfer function matrix and the target amplitude-frequency response vector, determine the frequency domain weight matrix corresponding to when the preset function takes the minimum value.

[0090] Step 306: Perform an inverse Fourier transform on each row vector in the frequency domain weight matrix to obtain a filter coefficient corresponding to each loudspeaker.

[0091] The specific implementation process of the above steps 305 and 306 can be found in the detailed description of any embodiment of the present disclosure, and will not be repeated here.

[0092] In the disclosed embodiment, multiple impulse responses in the same space are first determined, and then each impulse response is Fourier transformed to obtain a transfer function matrix, and then each impulse response is Fourier transformed to determine the transfer function between each microphone and each loudspeaker at each frequency, and then the transfer function between each microphone and each loudspeaker at each frequency is fused to obtain the target amplitude-frequency response corresponding to each microphone at each frequency, and then based on the transfer function matrix and the target amplitude-frequency response vector, the frequency domain weight matrix corresponding to the minimum value of the preset function is calculated, and finally each row vector in the frequency domain weight matrix is ​​inversely Fourier transformed to obtain the filter coefficient corresponding to each loudspeaker. As a result, not only the difficulty of sound field equalization is reduced, but also because the target amplitude-frequency response matches the current scene, the accuracy of the determined filter coefficient is further improved, and the effect of sound field equalization is improved.

[0093] In order to implement the above embodiment, the embodiment of the present disclosure further proposes a device for determining filter coefficients.

[0094] Figure 4 A schematic diagram of the structure of a device for determining filter coefficients provided in an embodiment of the present disclosure.

[0095] like Figure 4 As shown, the filter coefficient determination device 400 includes: a first acquisition module 401 , a first processing module 402 , a first determination module 403 , a second determination module 404 , and a second processing module 405 .

[0096] A first acquisition module 401 acquires multiple impulse responses measured by multiple groups of measurement devices in the same space, wherein each impulse response corresponds to a group of measurement devices, each group of measurement devices includes a speaker and a microphone, and the impulse response represents a change in amplitude over time;

[0097] A first processing module 402 is used to convert each impulse response from the time domain to the frequency domain according to a Fourier transform algorithm to obtain a transfer function corresponding to each impulse response, wherein the transfer function represents a change in amplitude with frequency;

[0098] The first processing module 402 is further configured to form a transfer function matrix based on the transfer functions corresponding to the plurality of impulse responses;

[0099] A first determination module 403 is used to determine a target amplitude-frequency response vector at each frequency, wherein the target amplitude-frequency response vector includes a target amplitude-frequency response of each microphone at the frequency;

[0100] A second determination module 404 is used to determine a frequency domain weight matrix corresponding to a minimum value of a preset function based on the transfer function matrix and the target amplitude-frequency response vector;

[0101] The second processing module 405 is used to transform each row vector in the frequency domain weight matrix to obtain a filter coefficient corresponding to each speaker.

[0102] Optionally, the first acquisition module 401 is specifically configured to:

[0103] Acquire a first frequency sweep signal played by a first speaker in a preset space;

[0104] Acquire a first acquisition signal by collecting the first frequency sweep signal with a first microphone in the preset space;

[0105] Deconvolution calculation is performed on the first frequency sweep signal and the first acquisition signal to obtain impulse responses corresponding to a first group of measurement equipment, wherein the first group of measurement equipment includes the first speaker and the first microphone.

[0106] Optionally, the first determining module 403 is specifically configured to:

[0107] The transfer functions between each microphone and each loudspeaker at the same frequency are fused to obtain the target amplitude-frequency response corresponding to each microphone at the frequency.

[0108] Optionally, the first determining module 403 is specifically configured to:

[0109] determining an amplitude-frequency response between the second microphone and each of the speakers at the first frequency according to a transfer function between the second microphone and each of the speakers at the first frequency;

[0110] An average value of the amplitude-frequency response between the second microphone and each of the loudspeakers at the first frequency is determined as a target amplitude-frequency response of the second microphone at the first frequency.

[0111] Optionally, the first determining module 403 is specifically configured to:

[0112] determining an amplitude-frequency response between the third microphone and each of the speakers at the second frequency according to a transfer function between the third microphone and each of the speakers at the second frequency;

[0113] Determine the average of the amplitude-frequency responses of the third microphone with each of the loudspeakers at the second frequency as the reference amplitude-frequency response of the third microphone at the second frequency;

[0114] The reference amplitude-frequency response is smoothed by a specified octave to obtain a target amplitude-frequency response of the third microphone at the second frequency.

[0115] Optionally, specify octave bands as one-third octave bands.

[0116] Optionally, the first determining module 403 is specifically configured to:

[0117] The preset vector is determined as the target amplitude-frequency response vector at each frequency.

[0118] Optionally, the second determining module 404 is specifically configured to:

[0119] Based on the transfer function matrix and the target amplitude-frequency response vector at each frequency, the frequency domain weight vector corresponding to the minimum value of the preset function at the frequency is calculated;

[0120] Based on the frequency domain weight vectors corresponding to each frequency, a frequency domain weight matrix is ​​generated, wherein each column vector in the frequency domain weight matrix is ​​a frequency domain weight vector corresponding to a frequency.

[0121] Optionally, the preset function is any one of the following two functions:

[0122]

[0123]

[0124] Where G is the transfer function matrix at any frequency, w is the frequency domain weight vector at any frequency to be calculated, and p d is the target amplitude-frequency response vector at any frequency.

[0125] In the disclosed embodiment, multiple impulse responses in the same space are first determined, and then Fourier transform is performed on them to obtain a transfer function matrix, and then the target amplitude-frequency response vector at each frequency is determined, and then a frequency domain weight matrix is ​​generated based on the transfer function matrix and the target amplitude-frequency response vector, and then each row vector in the frequency domain weight matrix is ​​inversely Fourier transformed to obtain the filter coefficient corresponding to each speaker. In this way, not only the difficulty of sound field equalization is reduced, but also the accuracy of the obtained filter coefficient is improved, and the effect of sound field equalization is improved.

[0126] In order to implement the above embodiments, the present disclosure also proposes an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in the above method embodiments is implemented.

[0127] In order to implement the above embodiments, the present disclosure further proposes a non-temporary computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method described in the above method embodiments is implemented.

[0128] In order to implement the above embodiments, the present disclosure further proposes a computer program product on which a computer program is stored. When the computer program is executed by a processor, the method described in the above method embodiments is implemented.

[0129] Figure 5A Schematic diagram of the structure of a vehicle according to an embodiment of the present disclosure. Figure 5A As shown, the vehicle 50 includes a vehicle body 51 , a filter 52 , a speaker 53 , and a microphone 54 , and a processor 55 and a memory 56 , which are arranged in a driving compartment of the vehicle body 51 .

[0130] The speaker 53 is used to play the audio signal filtered by the filter 52;

[0131] A microphone 54 is used to collect audio signals played by the speaker 53 and send the collected audio signals to the processor 55;

[0132] The processor 55 is used to call the instructions stored in the memory 56 based on the audio signal played by the speaker 53 and the audio signal collected by the microphone 54, so as to execute the method for determining the filter coefficient provided in the embodiment of the present disclosure.

[0133] The microphone 54 can also be called a microphone.

[0134] The processor 55 can obtain the audio signal played by the speaker 53 and the audio signal collected by the microphone 54 through the bus, and obtain the instructions to be executed from the memory 56 through the bus.

[0135] The vehicle provided by the embodiment of the present disclosure determines the filter coefficients by processing the audio signals played by the speakers and the audio signals collected by the microphones, which not only reduces the difficulty of sound field equalization in the cockpit, but also improves the accuracy of the obtained filter coefficients and improves the effect of sound field equalization in the cockpit.

[0136] Figure 5B This is a block diagram of an electronic device provided by an embodiment of the present disclosure. For example, the electronic device 500 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, a vehicle, etc.

[0137] Reference Figure 5B, the electronic device 500 may include one or more of the following components: a processing component 502 , a memory 504 , a power component 506 , a multimedia component 508 , an audio component 510 , an input / output (I / O) interface 512 , a sensor component 514 , and a communication component 516 .

[0138] The processing component 502 generally controls the overall operation of the electronic device 500, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 502 may include one or more processors 520 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 502 may include one or more modules to facilitate the interaction between the processing component 502 and other components. For example, the processing component 502 may include a multimedia module to facilitate the interaction between the multimedia component 508 and the processing component 502.

[0139] The memory 504 is configured to store various types of data to support operations on the electronic device 500. Examples of such data include instructions for any application or method operating on the electronic device 500, contact data, phone book data, messages, pictures, videos, etc. The memory 504 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0140] The power component 506 provides power to the various components of the electronic device 500. The power component 506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 500.

[0141] The multimedia component 508 includes a screen that provides an output interface between the electronic device 500 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 508 includes a front camera and / or a rear camera. When the electronic device 500 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0142] The audio component 510 is configured to output and / or input audio signals. For example, the audio component 510 includes a microphone (MIC), and when the electronic device 500 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 504 or sent via the communication component 516. In some embodiments, the audio component 510 also includes a speaker for outputting audio signals.

[0143] I / O interface 512 provides an interface between processing component 502 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0144] The sensor assembly 514 includes one or more sensors for providing various aspects of status assessment for the electronic device 500. For example, the sensor assembly 514 can detect the open / closed state of the electronic device 500, the relative positioning of components, such as the display and keypad of the electronic device 500, and the sensor assembly 514 can also detect the position change of the electronic device 500 or a component of the electronic device 500, the presence or absence of user contact with the electronic device 500, the orientation or acceleration / deceleration of the electronic device 500, and the temperature change of the electronic device 500. The sensor assembly 514 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 514 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 514 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0145] The communication component 516 is configured to facilitate wired or wireless communication between the electronic device 500 and other devices. The electronic device 500 can access a wireless network based on a communication standard, such as WiFi, 4G or 5G, or a combination thereof. In an exemplary embodiment, the communication component 516 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 516 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0146] In an exemplary embodiment, the electronic device 500 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0147] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 504 including instructions, and the instructions can be executed by a processor 520 of an electronic device 500 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0148] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0149] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, "plurality" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0150] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present disclosure includes additional implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present disclosure belong.

[0151] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic devices), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0152] It should be understood that the various parts of the present disclosure can be implemented in hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used to implement: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0153] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0154] In addition, each functional unit in each embodiment of the present disclosure may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0155] The storage medium mentioned above may be a read-only memory, a disk or an optical disk, etc. Although the embodiments of the present disclosure have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations of the present disclosure. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present disclosure.

Claims

1. A method for determining filter coefficients, characterized in that: include: Acquire multiple impulse responses measured by multiple groups of measurement devices in the same space, wherein each impulse response corresponds to a group of measurement devices, each group of measurement devices includes a speaker and a microphone, and the impulse response represents a change in amplitude over time; Convert each impulse response from time domain to frequency domain according to a Fourier transform algorithm to obtain a transfer function corresponding to each impulse response, wherein the transfer function represents the change of amplitude with frequency; forming a transfer function matrix based on the transfer functions corresponding to the plurality of impulse responses; Determine a target amplitude-frequency response vector at each frequency, wherein the target amplitude-frequency response vector includes the target amplitude-frequency response of each microphone at the frequency; Based on the transfer function matrix and the target amplitude-frequency response vector, determining a frequency domain weight matrix corresponding to a minimum value of a preset function; Perform an inverse Fourier transform on each row vector in the frequency domain weight matrix to obtain a filter coefficient corresponding to each of the loudspeakers.

2. The method according to claim 1, characterized in that Get multiple impulse responses from multiple measurement devices in the same space, including: Acquire a first frequency sweep signal played by a first speaker in a preset space; Acquire a first acquisition signal by collecting the first frequency sweep signal with a first microphone in the preset space; Deconvolution calculation is performed on the first frequency sweep signal and the first acquisition signal to obtain impulse responses corresponding to a first group of measurement equipment, wherein the first group of measurement equipment includes the first speaker and the first microphone.

3. The method according to claim 1, characterized in that The step of determining a target amplitude-frequency response vector at each frequency includes: The transfer functions between each of the microphones and each of the loudspeakers at the same frequency are fused to obtain the target amplitude-frequency response of each of the microphones at the frequency.

4. The method according to claim 3, characterized in that The step of fusing the transfer functions between each of the microphones and each of the loudspeakers at the same frequency to obtain a target amplitude-frequency response corresponding to each of the microphones at the frequency includes: determining an amplitude-frequency response between the second microphone and each of the speakers at the first frequency according to a transfer function between the second microphone and each of the speakers at the first frequency; An average value of the amplitude-frequency response between the second microphone and each of the loudspeakers at the first frequency is determined as a target amplitude-frequency response of the second microphone at the first frequency.

5. The method according to claim 3, characterized in that The step of fusing the transfer functions between each of the microphones and each of the loudspeakers at the same frequency to obtain a target amplitude-frequency response corresponding to each of the microphones at the frequency includes: determining an amplitude-frequency response between the third microphone and each of the speakers at the second frequency according to a transfer function between the third microphone and each of the speakers at the second frequency; Determine the average of the amplitude-frequency responses of the third microphone with each of the loudspeakers at the second frequency as the reference amplitude-frequency response of the third microphone at the second frequency; The reference amplitude-frequency response is smoothed by a specified octave to obtain a target amplitude-frequency response of the third microphone at the second frequency.

6. The method according to claim 5, characterized in that The specified octave bands are one-third octave bands.

7. The method according to claim 1, characterized in that The step of determining a target amplitude-frequency response vector at each frequency includes: The preset vector is determined as the target amplitude-frequency response vector at each frequency.

8. The method according to any one of claims 1 to 7, characterized in that: The step of determining a frequency domain weight matrix corresponding to a minimum value of a preset function based on the transfer function matrix and the target amplitude-frequency response vector includes: Based on the transfer function matrix and the target amplitude-frequency response vector at each frequency, a frequency domain weight vector corresponding to when the preset function takes a minimum value at the frequency is calculated; The frequency domain weight matrix is ​​generated based on the frequency domain weight vectors corresponding to each frequency, wherein each column vector in the frequency domain weight matrix is ​​a frequency domain weight vector corresponding to a frequency.

9. The method according to claim 8, characterized in that The preset function is any one of the following two functions: Where G is the transfer function matrix at any frequency, w is the frequency domain weight vector at any frequency to be calculated, and p d is the target amplitude-frequency response vector at any frequency.

10. A device for determining filter coefficients, characterized in that: include: A first acquisition module is used to acquire multiple impulse responses measured by multiple groups of measurement devices in the same space, wherein each impulse response corresponds to a group of measurement devices, each group of measurement devices includes a speaker and a microphone, and the impulse response represents the change of amplitude over time; A first processing module, configured to convert each impulse response from the time domain to the frequency domain according to a Fourier transform algorithm to obtain a transfer function corresponding to each impulse response, wherein the transfer function represents a change in amplitude with frequency; The first processing module is further configured to form a transfer function matrix based on the transfer functions corresponding to the plurality of impulse responses; A first determination module is used to determine a target amplitude-frequency response vector at each frequency, wherein the target amplitude-frequency response vector includes a target amplitude-frequency response of each microphone at the frequency; A second determination module is used to determine a frequency domain weight matrix corresponding to a minimum value of a preset function based on the transfer function matrix and the target amplitude-frequency response vector; The second processing module is used to transform each row vector in the frequency domain weight matrix to obtain a filter coefficient corresponding to each of the speakers.

11. A vehicle, characterized in that: include: A vehicle body, a filter, a speaker and a microphone, and a processor and a memory arranged in a driving compartment of the vehicle body; Wherein, the speaker is used to play the audio signal filtered by the filter; The microphone is used to collect the audio signal played by the speaker and send the collected audio signal to the processor; The processor is used to call the instructions stored in the memory based on the audio signal played by the speaker and the audio signal collected by the microphone to execute the method according to any one of claims 1 to 9.

12. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 9.

13. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-9.

14. A computer program product comprising a computer program, characterized in that The computer program implements the method according to any one of claims 1 to 9 when executed by a processor.