Improved generalized cross-correlation time delay estimation positioning method based on microphone array
Through the improved generalized cross-correlation delay estimation method, the problem of degradation of sound source positioning accuracy caused by microphone array position deviation is solved, self-calibration of microphone array and high-precision sound source positioning are realized, and the positioning performance of the array is improved.
Patent Information
- Application Number
- CN202411062338.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-05
- Publication Date
- 2024-12-13
AI Technical Summary
During the installation process, the microphone array may have position deviations, resulting in reduced sound source positioning accuracy and performance, and difficulty in dynamic calibration and time-consuming.
Using an improved generalized cross-correlation delay estimation positioning method, by establishing a quaternary square planar microphone array, selecting the reference microphone as the coordinate origin, using a movable sound source to transmit signals to calculate the phase difference, estimation speed and delay, and then calculating the microphone position. Reconstruct the coordinate system to locate the sound source.
The calibration accuracy of microphone position in the microphone array and the accuracy of sound source positioning are improved, artificial measurement errors are reduced, and the self-calibration efficiency of the array is improved.
Smart Images

Figure CN119126022A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of microphone sound source localization, and in particular to an improved generalized cross-correlation time delay estimation localization method based on a microphone array. Background Art
[0002] Sound source localization technology has been widely used in many fields, including conference systems, remote communications, virtual reality, and sound field reconstruction. The main goal of this technology is to accurately estimate the location and direction of the sound source, thereby providing key support and performance improvements for related application scenarios and enhancing user experience. This technology is mainly based on the principle of microphone arrays, which are composed of multiple microphone elements and can collect sound signals from different directions, providing higher signal-to-noise ratio and spatial resolution.
[0003] However, during the actual installation process, the microphone array may be affected by some uncertain factors, resulting in deviations between the actual microphone position and the designed value. First, the processing of the array bracket may introduce errors, and the installation position of the microphone element may not be consistent with the expected position. For dynamically repositionable microphone arrays, it may not be easy to recalibrate the array to solve these problems, and it may take a lot of time and manpower to accurately measure the actual position of each microphone element. These uncertain factors will reduce the estimation accuracy and performance of the sound source localization algorithm. Summary of the invention
[0004] In view of the problem of sound source localization caused by the deviation of the position of the existing microphone array, the present invention is proposed.
[0005] Therefore, the problem to be solved by the present invention is how to calibrate the positions of microphones in a microphone array and improve the generalized cross-correlation delay estimation positioning method.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0007] In the first aspect, an embodiment of the present invention provides an improved generalized cross-correlation time delay estimation and positioning method based on a microphone array, which includes establishing a four-element square planar microphone array, selecting one of the microphones as a reference microphone, and establishing a three-dimensional rectangular coordinate system with the position of the reference microphone as the coordinate origin; using a movable sound source to transmit sound source signals of the same frequency at two different positions, receiving these sound source signals through the reference microphone, and calculating the phase difference between the two received signals to infer the sound speed in the environment at that time; based on the improved generalized cross-correlation time delay estimation algorithm, estimating the time delay between the reference microphone and other microphones in the array to calculate the position coordinates of each microphone in the array; determining the center position coordinates of the array based on the calculated position coordinates of each microphone, and reconstructing the three-dimensional space coordinate system with the center position coordinates as the new origin to calculate the sound source position coordinates.
[0008] As a preferred solution of the improved generalized cross-correlation time delay estimation positioning method based on microphone array described in the present invention, wherein: calculating the phase difference of two received signals includes the following steps: obtaining the sound speed c of the test environment; using a movable sound source to transmit a first sound source signal with a frequency of f at position A, where this position is not in the same plane as the microphone array and the direction is perpendicular to the array plane; using a movable sound source to transmit a second sound source signal with the same frequency f at position B, and the distance between position A and position B is d 0 ; The reference microphone receives the first sound source signal emitted by position A and the second sound source signal emitted by position B, and calculates the phase difference between the first sound source signal and the second sound source signal received by the reference microphone; the other microphones in the array also receive the first sound source signal emitted by position A and the second sound source signal emitted by position B respectively; calculate the phase difference between the first sound source signal and the second sound source signal received by the other microphones; the specific formula of the phase difference value θ is as follows:
[0009]
[0010] Where c is the speed of sound in the test environment, d 0 is the distance between position A and position B, f is the transmission frequency, is the initial phase.
[0011] As a preferred solution of the improved generalized cross-correlation time delay estimation positioning method based on microphone array of the present invention, wherein: calculating the position coordinates of each microphone in the array comprises the following steps: obtaining the reference microphone x and the i-th array microphone x i The received time domain signals x(n) and x i (n), and perform preprocessing; calculate the time domain signals x(n) and x i(n) to reflect the similarity between the two signals at different time delays; according to the properties of Fourier transform, the cross-correlation function and its cross-power spectrum density are Fourier transform pairs, and the cross-power spectrum is weighted and inverse Fourier transformed to obtain the time domain signals x(n) and x i (n) is the generalized cross-correlation function R(τ); in an interpolation interval near the peak point of the generalized cross-correlation function R(τ) [x i ,x i+1 ], using local spline interpolation to obtain smooth and continuous delay estimation results; using the peak point of the interpolated generalized cross-correlation function to calculate the improved delay estimation τ; using the phase difference formula to calculate the speed of sound c in the test environment, combined with the improved delay estimation τ, calculate the distance value d between the reference microphone and each array microphone i ; Using the distance value between the reference microphone and each array microphone, combined with the coordinates of the reference microphone, the position coordinates of each array microphone are determined through a multi-view ranging positioning algorithm.
[0012] As a preferred solution of the improved generalized cross-correlation time delay estimation positioning method based on microphone array of the present invention, wherein: the time domain signals x(n) and x i The generalized cross-correlation function R(τ) of (n) is as follows:
[0013]
[0014] Among them, G xxi (w) represents the cross power spectrum, ψ(ω) is the weighting function, ω represents the angular frequency, τ represents the time difference between the reference microphone and the i-th array microphone receiving the signal, and i represents the array microphone number.
[0015] As a preferred solution of the improved generalized cross-correlation time delay estimation positioning method based on microphone array of the present invention, wherein: the distance value d between the reference microphone and each array microphone is calculated. i , the specific formula is as follows:
[0016] d i =cτ
[0017] Where c represents the speed of sound in the test environment, and τ represents the improved delay estimate.
[0018] As a preferred solution of the improved generalized cross-correlation time delay estimation and positioning method based on microphone array described in the present invention, the calculation of the sound source position coordinates includes the following steps: calculating the average value of the position coordinates of all microphones to obtain the center position coordinates of the microphone array; reconstructing the three-dimensional space coordinate system with the center position coordinates of the array as the new origin so that the distance from each microphone to the origin is equal; establishing a distance equation group according to the position of each microphone in the new coordinate system and the distance to the sound source; establishing a relationship equation group between the time difference and the distance difference by using the time difference and the sound speed of the microphone receiving signal; introducing a polar coordinate expression, expressing the sound source position with polar coordinates, and establishing a conversion relationship with the rectangular coordinate system; simplifying the expression of the distance from the microphone to the sound source, and performing algebraic operations and quadratic simplification on the simplified equation group to obtain a calculation formula for the polar coordinate parameters of the sound source; using the obtained calculation formula, combined with the known time difference, sound speed and microphone position information, to calculate the polar coordinate parameters of the sound source; substituting the calculated polar coordinate parameters into the conversion relationship between polar coordinates and rectangular coordinates to obtain the sound source position coordinates.
[0019] As a preferred solution of the improved generalized cross-correlation time delay estimation positioning method based on microphone array described in the present invention, the calculation formula of the sound source position coordinates is as follows:
[0020]
[0021] Among them, τ 10 , τ 20 , τ 30 Respectively represent microphones M 0 With microphone M 1 、M 2 、M 3 The time difference of receiving the signal, r 0 、r 1 、r 2 、r 3 represents the distance from the four microphones to the sound source, θ, They represent the pitch angle and phase angle respectively, c represents the sound speed of the test environment, d represents the distance from the microphone to the coordinate origin, and (x, y, z) represents the coordinates of the sound source.
[0022] In a second aspect, an embodiment of the present invention provides an improved generalized cross-correlation time delay estimation and positioning system based on a microphone array, which includes a microphone array construction module, which is used to establish a four-element square planar microphone array, select one of the microphones as a reference microphone, and establish a three-dimensional rectangular coordinate system with the position of the reference microphone as the coordinate origin; a sound speed measurement module, which is used to use a movable sound source to transmit sound source signals of the same frequency at two different positions, receive these sound source signals through the reference microphone, and calculate the phase difference between the two received signals to infer the sound speed in the environment at that time; a delay estimation module, which is used to estimate the time delay between the reference microphone and other microphones in the array based on an improved generalized cross-correlation time delay estimation algorithm, so as to calculate the position coordinates of each microphone in the array; a sound source localization module, which is used to determine the center position coordinates of the array according to the calculated position coordinates of each microphone, and reconstruct the three-dimensional space coordinate system with the center position coordinates as the new origin to calculate the sound source position coordinates.
[0023] In a third aspect, an embodiment of the present invention provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program instructions are executed by the processor, the steps of the improved generalized cross-correlation delay estimation positioning method based on microphone array as described in the first aspect of the present invention are implemented.
[0024] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program instructions are executed by a processor, the steps of the improved generalized cross-correlation delay estimation and positioning method based on a microphone array as described in the first aspect of the present invention are implemented.
[0025] The beneficial effects of the present invention are as follows: by improving the generalized cross-correlation delay estimation method, the present invention can improve the delay estimation accuracy between microphone pairs, thereby calibrating and adjusting the positions of microphones in the microphone array, thereby improving the accuracy of sound source positioning of the microphone array. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0027] Figure 1 This is a flow chart of the improved generalized cross-correlation delay estimation positioning method based on microphone array.
[0028] Figure 2 A four-element microphone array for an improved generalized cross-correlation time delay estimation positioning method based on microphone array.
[0029] Figure 3 An improved generalized cross-correlation delay estimation algorithm is provided for an improved generalized cross-correlation delay estimation positioning method based on microphone array.
[0030] Figure 4 This is the sound source localization diagram of the improved generalized cross-correlation time delay estimation localization method based on microphone array. DETAILED DESCRIPTION
[0031] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.
[0032] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0033] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0034] Example 1
[0035] Reference Figure 1 to Figure 4 , which is the first embodiment of the present invention, and provides an improved generalized cross-correlation delay estimation positioning method based on a microphone array, comprising:
[0036] S1: Establish a four-element square planar microphone array, select one of the microphones as a reference microphone, and establish a three-dimensional rectangular coordinate system with the position of the reference microphone as the coordinate origin.
[0037] Specifically, establish Figure 2 In the four-element square microphone array shown, the microphone in the lower left corner is selected as the reference microphone, and the coordinates are set to (0,0,0). The sound signal received by the reference microphone is used as the reference signal output by other microphones. A three-dimensional rectangular coordinate system is established with the reference microphone as the origin. Since all microphone arrays are in the same plane, the plane is set to the xOy plane, and the z coordinates of all microphones are 0.
[0038] S2: Use a movable sound source to transmit sound source signals of the same frequency at two different locations, receive these sound source signals through a reference microphone, and calculate the phase difference between the two received signals to deduce the speed of sound in the environment at that time.
[0039] Specifically, obtain the sound speed c of the test environment; use a movable sound source to transmit a first sound source signal with a frequency of f at position A, which is not in the same plane as the microphone array and is perpendicular to the array plane; use a movable sound source to transmit a second sound source signal with the same frequency f at position B (A and B are two different positions), and the distance between position A and position B is d 0 ; The reference microphone receives the first sound source signal emitted by position A and the second sound source signal emitted by position B, and calculates the phase difference between the first sound source signal and the second sound source signal received by the reference microphone; the other microphones in the array also receive the first sound source signal emitted by position A and the second sound source signal emitted by position B respectively; calculate the phase difference between the first sound source signal and the second sound source signal received by the other microphones.
[0040] It should be noted that the specific formula of the phase difference value θ is as follows:
[0041]
[0042] Where c is the speed of sound in the test environment, d 0 is the distance between position A and position B, f is the transmission frequency, is the initial phase.
[0043] It should be noted that the initial phase can be obtained by collecting the signal emitted by the sound source through the microphone to obtain discrete time series data, and the sampled signal is Fourier transformed to obtain the signal representation in the frequency domain. The phase of the emission frequency f is extracted from the frequency domain, so the sound speed of the test environment c = 2πfd 0 / θ.
[0044] S3: Based on the improved generalized cross-correlation delay estimation algorithm, the time delay between the reference microphone and other microphones in the array is estimated to calculate the position coordinates of each microphone in the array.
[0045] It should be noted that when the microphones are in the same sound field, the collected time domain signals will have a time delay. By calculating the peak position of the cross-correlation function, the time delay between the two microphones can be obtained. Figure 3 The generalized cross-correlation function delay estimation algorithm improved by the present invention has two main causes of delay estimation errors: one is the quantization error introduced by replacing the theoretical value with the estimated value of the correlation function, and the other is the peak estimation error caused by the influence of environmental noise. The present invention interpolates near the peak point and performs secondary peak detection to obtain a more accurate delay estimation result.
[0046] Usually, due to the influence of environmental noise, the signal received by the sensor will be superimposed with some interference signals on the basis of the original signal, causing the peak of the correlation function to be expanded, so the delay estimation result obtained will have a large error. Therefore, it is necessary to estimate the delay between the reference microphone and other microphones in the array based on the improved generalized cross-correlation delay estimation algorithm, and calculate the position coordinates of each microphone in the array.
[0047] Specifically, the following steps are included:
[0048] S3.1: Get the reference microphone x and the i-th array microphone x i The received time domain signals x(n) and x i (n), and perform preprocessing.
[0049] Specifically, in the improved generalized cross-correlation delay estimation algorithm, the reference microphone x and the i-th array microphone x are obtained. i The received time domain signals x(n) and x i (n) (the time domain signal is also the signal emitted by the movable sound source), and the time domain signals x(n) and x are filtered using an adaptive filtering algorithm (LMS algorithm). i (n) Perform preprocessing to remove environmental noise.
[0050] Specifically, the time domain signals x(n) and x i The specific formula of (n) is as follows:
[0051]
[0052] Among them, s(n) represents the sound signal, w(n), w i (n) represents the independent Gaussian white noise in the environment, τx, τx i Represents the sound reaching the reference microphone x and the array microphone x respectively i The duration of , n represents the time index.
[0053] It should be noted that in the whole system, it is assumed that the sound source signal s(n) and the noise w(n), w i (n) is a random stationary signal, and the two are unrelated. And since the sound reaches the reference microphone x and the array microphone x i The durations are τx, τx respectively. i , so the specific formula for the time difference τ of the two microphones receiving signals can be expressed as:
[0054] τxx i =τx-τx i
[0055] Among them, τx, τx i Represents the sound reaching the reference microphone x and the array microphone x respectivelyi Length of time.
[0056] S3.2: Calculate the time domain signals x(n) and x i (n) to reflect the similarity between the two signals at different time delays.
[0057] Specifically, the time domain signals x(n) and x i The cross-correlation function R(τ) of (n) is:
[0058] R(τ)=E{x(n)x i (n-τ)}=E{s(n-τx)s(n-τx i -τ)}+E{s(n-τx)w i (n-τ)}
[0059] +E{w(n)s(n-τx i -τ)}+E{w(n)w i (n-τ)}
[0060] Among them, x(n) and x i (n) represents the time domain signal received by the reference microphone and the i-th array microphone, τ represents the time difference between the reference microphone and the i-th array microphone receiving signal, s(n) represents the sound signal, w(n), w i (n) represents the independent Gaussian white noise in the environment, τx, τx i Represents the sound reaching the reference microphone x and the array microphone x respectively i duration, E{} represents the mathematical expectation, and n represents the index of discrete time.
[0061] Furthermore, since the sound source signal and the Gaussian white noise signal are uncorrelated,
[0062] E{s(n-τx)w i (n-τ)}=0
[0063] E{w(n)s(n-τx i -τ)}=0
[0064] E{w(n)w i (n-τ)}=0
[0065] So the cross-correlation function R(τ) can be simplified as:
[0066] R(τ)=E{x(n)x i (n-τ)}=E{s(n-τx)s(n-τx i -τ)}
[0067] And because the sound signal s(n) is a random stationary process, the autocorrelation function only depends on the time difference, that is:
[0068] R(τ)=R ss (τ+τx-τx i )
[0069] For the convenience of expression, τx-τx i Denoted as τxx i , so we get:
[0070] R(τ)=R ss (τ+τxx i )
[0071] Among them, R ss (·) represents the cross-correlation function of the two microphone signals, τxx i It represents the time difference between the reference microphone and the i-th array microphone receiving signal.
[0072] S3.3: According to the properties of Fourier transform, the cross-correlation function and its cross-power spectrum density are a Fourier transform pair. The cross-power spectrum is weighted and inverse Fourier transformed to obtain the time domain signals x(n) and x i (n) is the generalized cross-correlation function R(τ).
[0073] Furthermore, when τ+τxx i When it is 0, it means that the time alignment of the signals received by the two microphones is optimal, and the obtained cross-correlation function takes the maximum value, and its corresponding value is the time delay between the two microphones. According to the Wiener-Khinchin theorem, the cross-correlation function and its power spectrum density are Fourier transform pairs, so by weighting the cross power spectrum and then performing an inverse Fourier transform, we can get the generalized cross-correlation function R(τ), and the specific formula is as follows:
[0074]
[0075] in, represents the cross power spectrum, ψ(ω) is the weighting function, ω represents the angular frequency, τ represents the time difference between the reference microphone and the i-th array microphone receiving the signal, and i represents the array microphone number.
[0076] It should be noted that, usually, due to the influence of environmental noise, the signal received by the sensor will have some interference signals superimposed on the original signal, causing the peak of the correlation function to be expanded, and the delay value obtained will produce a large error.
[0077] S3.4: In an interpolation interval [x i ,x i+1], local spline interpolation is used to optimize peak detection and obtain smooth and continuous delay estimation results.
[0078] Furthermore, local spline interpolation is used near the peak point (where the cross-correlation function takes the maximum value) of the generalized cross-correlation function R(τ) to obtain a smoother and more continuous delay estimation result. i ,x i+1 ]Construct the interpolation equation Y(x):
[0079] Y(x)=a i +b i (xx i )+c i (xx i ) 2 +d i (xx i ) 3
[0080] Among them, a i , b i 、c i ,d i represent the coefficients of the cubic spline interpolation equation, x, x i represent the independent variable and the starting point of the interpolation interval respectively.
[0081] It should be noted that according to the local spline interpolation conditions, the spline function must satisfy the given function value at each interpolation point, so the first constraint condition is as follows:
[0082] Y i (x i )=y i
[0083] Y i (x i+1 )=y i+1
[0084] Among them, Y i (·) represents the interpolation function, x i 、x i+1 ,y i ,y i+1 Represent the starting point, end point and x of the interpolation interval respectively. i 、x i+1 The function value at .
[0085] According to the continuity at the boundary, the second constraint condition can be obtained. The specific formula is as follows:
[0086] Y i ′(x i+1 ) = Y′ i+1 (xi+1 )
[0087] Y i ″(x i+1 )=Y″ i+1 (x i+1 )
[0088] Among them, Y i '(·),Y i "(·) represents the first-order derivative and second-order derivative of the interpolation equation, x i+1 Indicates the end point of the interpolation interval.
[0089] Furthermore, a first linear equation is constructed according to the first constraint condition and the second constraint condition, as follows:
[0090]
[0091] Among them, x i ,y i 、h i They respectively represent the horizontal coordinate of the interpolation node, the function value of the interpolation node, and the distance (step size) between adjacent interpolation nodes.
[0092] Furthermore, solving the first linear equation yields the second-order derivative m i , thereby calculating the polynomial coefficient a for each interval i , b i 、c i ,d i , the specific formula is as follows:
[0093]
[0094] Among them, m i represents the second-order derivative, x i ,y i 、h i It represents the horizontal coordinate of the interpolation node, the function value of the interpolation node, and the distance (step size) between adjacent interpolation nodes.
[0095] S3.5: Calculate the improved delay estimate τ using the peak point of the interpolated generalized cross-correlation function.
[0096] S3.6: Use the phase difference formula to calculate the speed of sound c in the test environment, and combine it with the improved delay estimate τ to calculate the distance value d between the reference microphone and each array microphone i .
[0097] Furthermore, through the phase difference formula in S2, θ = 2πfd 0 / c, calculate the speed of sound in the test environment c = 2πfd 0 / θ and the improved delay estimate τ, thus calculating di , the specific formula is as follows:
[0098] d i =cτ
[0099] Where c represents the speed of sound in the test environment, and τ represents the improved delay estimate.
[0100] S3.7: Using the distance value between the reference microphone and each array microphone, combined with the coordinates of the reference microphone, the position coordinates of each array microphone are determined through a multi-view ranging positioning algorithm.
[0101] S4: Determine the center position coordinates of the array according to the calculated position coordinates of each microphone, and reconstruct the three-dimensional space coordinate system with the center position coordinates as the new origin to calculate the sound source position coordinates.
[0102] Specifically, the center coordinates of the microphone array are obtained by calculating the average value of the position coordinates of all microphones, and the three-dimensional space coordinate system is reconstructed with the center coordinates of the array as the new origin so that the distance from each microphone to the origin is equal.
[0103] Furthermore, according to the position of each microphone in the new coordinate system and the distance to the sound source, a distance equation group is established, such as Figure 4 Redefine the four microphones M 0 、M 1 、M 2 、M 3 The coordinates in the xOy coordinate system (x 0 ,y 0 ,0)、(x 1 ,y 1 ,0)、(x 2 ,y 2 ,0)、(x 3 ,y 3 ,0), the distance from the sound source to the origin is r, the coordinates are (x,y,z), and the distances from the four microphones to the sound source are r 0 、r 1 、r 2 、r 3 , the distance from the microphone to the sound source can be listed as the following equations:
[0104]
[0105] Furthermore, the time difference of the microphone receiving the signal and the speed of sound are used to establish the relationship equation group between the time difference and the distance difference:
[0106]
[0107] Among them, r 0 、r1 、r 2 、r 3 represents the distance from the four microphones to the sound source, c represents the speed of sound in the test environment, τ 10 , τ 20 , τ 30 Respectively represent microphones M 0 With microphone M 1 、M 2 、M 3 The time difference of receiving the signal.
[0108] Furthermore, the polar coordinate expression is introduced to express the sound source position in polar coordinates. Indicates that the transformation relationship with the rectangular coordinate system is established:
[0109]
[0110] Among them, θ, They represent the pitch angle and phase angle respectively, and (x, y, z) represents the coordinates of the sound source.
[0111] Furthermore, according to the distance difference equation from the microphone to the sound source, the relationship between the distance from the microphone to the sound source and the reference microphone can be obtained:
[0112]
[0113] Among them, t 0 Indicates that the sound source reaches the microphone M 0 Since the coordinates of each microphone are determined and the distance to the origin is the same, we substitute it into the distance formula from the microphone to the sound source to get the time t 0 The expression is as follows:
[0114]
[0115] Among them, r 0 、r 1 、r 2 、r 3 represents the distance from the four microphones to the sound source, (x 0 ,y 0 ,0)、(x 1 ,y 1 ,0)、(x 2 ,y 2 ,0)、(x 3 ,y 3 ,0) represent the coordinates of the four microphones in the xOy coordinate system, r represents the coordinates from the sound source to the origin of the coordinate system (x, y, z) represents the coordinates of the sound source, τ 10 , τ 20 , τ 30 Respectively represent microphones M0 With microphone M 1 、M 2 、M 3 The time difference of receiving the signal.
[0116] Furthermore, since the position coordinates of the microphone array are known, according to r 0 =t 0 c can be obtained from the above formula as a 0 The equation for the time delay τ between and the microphone, and because the time delay τ has been obtained from S3.
[0117] Furthermore, the expression of the distance from the microphone to the sound source is simplified, and the simplified equation group is subjected to algebraic operations and quadratic simplification to obtain the calculation formula for the polar coordinate parameters of the sound source; the obtained calculation formula is used in combination with the known time difference, sound speed and microphone position information to calculate the polar coordinate parameters of the sound source; the calculated polar coordinate parameters are substituted into the conversion relationship between polar coordinates and rectangular coordinates to obtain the precise position coordinates of the sound source in the rectangular coordinate system.
[0118] Specifically, in order to simplify the equation, it is assumed that the microphone positions are located on the x-axis and y-axis respectively, and the distance from the origin of the coordinate axis is d, so the microphone array coordinates can be simplified to (d, 0, 0), (0, d, 0), (-d, 0, 0), (0, -d, 0), simplifying the equation group of the distance from the microphone to the sound source:
[0119]
[0120] Substituting the distance difference from the microphone to the sound source into the above formula, we can get the following set of equations:
[0121]
[0122] By adding and subtracting the equations in the above system of equations, we can get the following system of equations:
[0123]
[0124] Therefore, it can be concluded
[0125] Furthermore, the relationship between the distance from the microphone to the sound source and the reference microphone is substituted into the distance difference from the microphone to the sound source to obtain:
[0126]
[0127] Simplifying, we can get:
[0128]
[0129] Because r 0 =t 0c, c is the speed of sound, and r 0 Substitution It can be concluded that
[0130] Furthermore, tanψ, r, r 0 Substituting -xd, -yd into the polar coordinate equation, we can get The conclusion is:
[0131]
[0132] Among them, τ 10 , τ 20 , τ 30 Respectively represent microphones M 0 With microphone M 1 、M 2 、M 3 The time difference of receiving the signal, r 0 、r 1 、r 2 、r 3 represents the distance from the four microphones to the sound source, θ, They represent the pitch angle and phase angle respectively, c represents the sound speed of the test environment, d represents the distance from the microphone to the coordinate origin, and (x, y, z) represents the coordinates of the sound source.
[0133] Furthermore, the present embodiment also provides an improved generalized cross-correlation time delay estimation and positioning system based on a microphone array, including a microphone array construction module, which is used to establish a four-element square planar microphone array, select one of the microphones as a reference microphone, and establish a three-dimensional rectangular coordinate system with the position of the reference microphone as the coordinate origin; a sound speed measurement module, which is used to use a movable sound source to transmit sound source signals of the same frequency at two different positions, receive these sound source signals through the reference microphone, and calculate the phase difference between the two received signals to infer the sound speed in the environment at that time; a time delay estimation module, which is used to estimate the time delay between the reference microphone and other microphones in the array based on the improved generalized cross-correlation time delay estimation algorithm, so as to calculate the position coordinates of each microphone in the array; a sound source localization module, which is used to determine the center position coordinates of the array according to the calculated position coordinates of each microphone, and reconstruct the three-dimensional space coordinate system with the center position coordinates as the new origin to calculate the sound source position coordinates.
[0134] This embodiment also provides a computer device, which is suitable for the case of an improved generalized cross-correlation time delay estimation and positioning method based on a microphone array, and includes a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute computer-executable instructions to implement the improved generalized cross-correlation time delay estimation and positioning method based on a microphone array as proposed in the above embodiment.
[0135] The computer device may be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covering the display screen, or a key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.
[0136] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the improved generalized cross-correlation delay estimation and positioning method based on a microphone array as proposed in the above embodiment is implemented.
[0137] In summary, the present invention adopts an improved generalized cross-correlation delay estimation algorithm, which effectively reduces the impact of environmental noise and quantization errors by performing local spline interpolation and secondary peak detection near the peak point, thereby obtaining a more accurate delay estimation result. An adaptive filtering algorithm is used to remove environmental noise in the signal preprocessing stage, which improves the signal quality and reliability of subsequent processing. Through the improved delay estimation and multi-view ranging positioning algorithm, this method can accurately calculate the actual position coordinates of each microphone in the microphone array, realize the self-calibration of the array, and avoid human measurement errors.
[0138] Example 2
[0139] Reference Figure 1 to Figure 4 , which is the second embodiment of the present invention, provides an improved generalized cross-correlation delay estimation and positioning method based on a microphone array. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiments.
[0140] Specifically, in order to verify the effectiveness of the proposed sound source localization method, a simulation experiment in an indoor environment was designed and performed. The experimental scene was set as a 10m×8m×3m rectangular room, and a four-element square microphone array was placed in the center of the room with a side length of 0.5m. An audio device with a sampling rate of 44.1kHz was used in the experiment, and a 1kHz sine wave was selected as the sound source signal. To simulate the real environment, 20dB Gaussian white noise was superimposed on the original signal.
[0141] The experiment first measured the ambient sound speed. Sound source transmitters were placed at two locations 2m and 3m away from the center of the array, emitting 1kHz signals of the same frequency. By calculating the phase difference between the two signals received by the reference microphone, the ambient sound speed was obtained to be 343.2m / s, which is very close to the theoretical value of 343m / s, with an error within 0.06%. This accurate sound speed value laid the foundation for subsequent positioning calculations.
[0142] Next, the microphone array was self-calibrated. The time delay between the reference microphone and the other three microphones was calculated using an improved generalized cross-correlation delay estimation algorithm. After local spline interpolation and secondary peak detection, the delay estimation results were about 40% less than the error of the traditional method. Based on these delay values and the previously measured sound speed, the precise coordinates of each microphone were calculated using a multi-view ranging positioning algorithm. The calculation results showed that the maximum deviation between the actual position of the microphone and the theoretical position did not exceed 2mm, proving the high accuracy of this method in array self-calibration.
[0143] Finally, a sound source localization experiment was conducted. 10 locations were randomly selected in the room to place the sound source, and the test was repeated 5 times at each location. The experimental results show that in 90% of the tests, the error between the calculated sound source position and the actual position is within 10cm. In the best case, the positioning error can reach about 3cm. The experiment also found that when the sound source is far away from the array (>5m), the positioning accuracy decreases, but the error can still be controlled within 20cm. These results fully demonstrate the effectiveness and accuracy of this method for sound source localization in indoor environments. Through comparative experiments, it is found that this method is about 30% higher in accuracy than the traditional delay-based sound source localization method, especially in the presence of noise interference, it shows stronger robustness.
[0144] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. An improved generalized cross-correlation delay estimation positioning method based on microphone array, characterized by: include, Establish a four-element square planar microphone array, select one of the microphones as a reference microphone, and establish a three-dimensional rectangular coordinate system with the position of the reference microphone as the coordinate origin; Use a movable sound source to transmit sound source signals of the same frequency at two different locations, receive these sound source signals through a reference microphone, and calculate the phase difference between the two received signals to deduce the speed of sound in the environment at that time; Based on the improved generalized cross-correlation delay estimation algorithm, the time delay between the reference microphone and other microphones in the array is estimated to calculate the position coordinates of each microphone in the array; The center coordinates of the array are determined based on the calculated position coordinates of each microphone, and the three-dimensional space coordinate system is reconstructed with the center coordinates as the new origin to calculate the sound source position coordinates.
2. The improved generalized cross-correlation time delay estimation positioning method based on microphone array according to claim 1, characterized in that: The step of calculating the phase difference between two received signals comprises the following steps: Get the sound speed c of the test environment; A movable sound source is used to transmit a first sound source signal with a frequency of f at position A, where the position is not in the same plane as the microphone array and the direction is perpendicular to the array plane; A movable sound source is used to transmit a second sound source signal of the same frequency f at position B, and the distance between position A and position B is d0; The reference microphone receives a first sound source signal emitted by position A and a second sound source signal emitted by position B, and calculates a phase difference between the first sound source signal and the second sound source signal received by the reference microphone; Other microphones in the array also receive the first sound source signal emitted by position A and the second sound source signal emitted by position B respectively; Calculate the phase difference between the first sound source signal and the second sound source signal received by other microphones; The specific formula of the phase difference value θ is as follows: Where c is the sound speed of the test environment, d0 is the distance between position A and position B, f is the transmission frequency, is the initial phase.
3. The improved generalized cross-correlation delay estimation positioning method based on microphone array as claimed in claim 1, characterized in that: The calculation of the position coordinates of each microphone in the array comprises the following steps: Get the reference microphone x and the i-th array microphone x i The received time domain signals x(n) and x i (n), and preprocessing; Calculate the time domain signals x(n) and x i (n) to reflect the similarity between two signals at different time delays; According to the properties of Fourier transform, the cross-correlation function and its cross-power spectrum density are a Fourier transform pair. The cross-power spectrum is weighted and inverse Fourier transformed to obtain the time domain signals x(n) and x i The generalized cross-correlation function R(τ) of (n); In an interpolation interval near the peak point of the generalized cross-correlation function R(τ) [x i ,x i+1 ], using local spline interpolation, a smooth and continuous delay estimation result is obtained; Using the peak point of the interpolated generalized cross-correlation function, calculate the improved time delay estimate τ; The phase difference formula is used to calculate the speed of sound c in the test environment, and the distance value d between the reference microphone and each array microphone is calculated by combining the improved delay estimation τ. i ; The distance value between the reference microphone and each array microphone is used in combination with the coordinates of the reference microphone to determine the position coordinates of each array microphone through a multi-view ranging positioning algorithm.
4. The improved generalized cross-correlation time delay estimation positioning method based on microphone array as claimed in claim 3, characterized in that: The time domain signals x(n) and x i The generalized cross-correlation function R(τ) of (n) is as follows: in, represents the cross power spectrum, ψ(ω) is the weighting function, ω represents the angular frequency, τ represents the time difference between the reference microphone and the i-th array microphone receiving the signal, and i represents the array microphone number.
5. The improved generalized cross-correlation time delay estimation positioning method based on microphone array as claimed in claim 3, characterized in that: The distance value d between the reference microphone and each array microphone is calculated. i , the specific formula is as follows: d i =cτ Where c represents the speed of sound in the test environment, and τ represents the improved delay estimate.
6. The improved generalized cross-correlation time delay estimation positioning method based on microphone array according to claim 1, characterized in that: The calculation of the sound source position coordinates comprises the following steps: The center position coordinates of the microphone array are obtained by calculating the average value of all microphone position coordinates; The coordinates of the center position of the array are used as the new origin, and the three-dimensional space coordinate system is reconstructed so that the distance from each microphone to the origin is equal; According to the position of each microphone in the new coordinate system and the distance to the sound source, a distance equation group is established; Using the time difference of the microphone receiving the signal and the speed of sound, a relationship equation group between the time difference and the distance difference is established; Introduce polar coordinate expression, express the sound source position with polar coordinates, and establish the conversion relationship with the rectangular coordinate system; Simplify the expression of the distance from the microphone to the sound source, and perform algebraic operations and quadratic simplification on the simplified equations to obtain the calculation formula for the polar coordinate parameters of the sound source; The obtained calculation formula is used to calculate the polar coordinate parameters of the sound source in combination with the known time difference, sound speed and microphone position information; Substitute the calculated polar coordinate parameters into the conversion formula between polar coordinates and rectangular coordinates to obtain the coordinates of the sound source position.
7. The improved generalized cross-correlation time delay estimation positioning method based on microphone array according to claim 6, characterized in that: The calculation formula of the sound source position coordinates is as follows: Among them, τ 10 , τ 20 , τ 30 They represent the time difference between microphone M0 and microphones M1, M2, and M3 receiving signals, r0, r1, r2, and r3 represent the distances from the four microphones to the sound source, and θ, They represent the pitch angle and phase angle respectively, c represents the sound speed of the test environment, d represents the distance from the microphone to the coordinate origin, and (x, y, z) represents the coordinates of the sound source.
8. An improved generalized cross-correlation time delay estimation positioning system based on microphone array, based on the improved generalized cross-correlation time delay estimation positioning method based on microphone array according to any one of claims 1 to 7, characterized in that: Also includes, A microphone array construction module is used to establish a four-element square planar microphone array, select one of the microphones as a reference microphone, and establish a three-dimensional rectangular coordinate system with the position of the reference microphone as the coordinate origin; The sound speed measurement module is used to use a movable sound source to transmit sound source signals of the same frequency at two different locations, receive these sound source signals through a reference microphone, and calculate the phase difference between the two received signals to deduce the sound speed in the environment at that time; A time delay estimation module, used to estimate the time delay between the reference microphone and other microphones in the array based on an improved generalized cross-correlation time delay estimation algorithm, so as to calculate the position coordinates of each microphone in the array; The sound source localization module is used to determine the center position coordinates of the array based on the calculated position coordinates of each microphone, and to reconstruct the three-dimensional space coordinate system with the center position coordinates as the new origin to calculate the sound source position coordinates.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the improved generalized cross-correlation time delay estimation positioning method based on microphone array according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the improved generalized cross-correlation time delay estimation positioning method based on microphone array according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Sound source localization method and device based on improved generalized cross-correlation algorithm, and medium
CN120722282A
Sound source localization method using time delay and dead reckoning
CN121027996A
Azimuth intersection and delay inequality fusion positioning method based on inverse variance adaptive weighting
CN122546144A
