Unmanned aerial vehicle detection positioning method based on STM32 and small microphone array
By employing a detection method based on STM32 and a small microphone array, combined with FFT, improved harmonic detection, and GCC-PHAT algorithms, and utilizing a distributed microphone array and orthocentric positioning algorithm, the accuracy and speed issues of UAV detection and positioning were solved, achieving fast, real-time, and accurate UAV positioning.
Patent Information
- Application Number
- CN202211628718.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-18
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2042-12-18
AI Technical Summary
Existing drone detection methods are weak in complex environments and long-distance positioning capabilities, making it difficult to achieve efficient and accurate drone detection and positioning, especially for low-speed and small drones.
A detection method based on STM32 and a small microphone array is adopted. The sound signal is processed by the FFT algorithm, and the time delay is estimated by combining the improved harmonic detection algorithm and the GCC-PHAT algorithm. The UAV coordinates are calculated by the distributed microphone array system and the orthocentric positioning algorithm.
It achieves fast, real-time, and accurate UAV detection and positioning, improves positioning accuracy and precision, reduces the error of a single microphone array, and enhances detection capabilities in complex environments.
Smart Images

Figure CN116008913B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of sound signal detection and positioning, and particularly relates to a UAV detection and positioning method based on an STM32 and a small microphone array. BACKGROUND
[0002] With the gradual reduction of the price of UAVs, the access threshold for using UAVs is gradually reduced, which has caused the current situation of chaos in the application of UAVs worldwide and difficulties in regulation, resulting in frequent UAV "flying disorderly" and "flying blackly" incidents, which seriously affect public safety and social stability. If the UAV carries a bomb at that time, it will cause unpredictable serious consequences. At present, the domestic regulation of UAVs mainly reflects the introduction of relevant UAV flight restriction policies, including the Civil Aviation Law, the Interim Provisions on Issues Related to the Management of Civil UAVs, the General Aviation Flight Control Regulations and other regulations, which limit the phenomenon of UAVs flying disorderly to a certain extent through laws, and anti-UAV technology also becomes an effective means to prevent UAVs from flying disorderly and flying blackly.
[0003] In the problem of UAV detection, the current main UAV detection methods include radar detection, radio signal detection, sound signal detection, image detection and cooperative detection of multiple means. Civil UAVs are usually "low, slow and small UAVs", that is, UAVs with low flight height, slow speed and small size. As the mainstream air target detection means, radar is not ideal when targeting UAVs, because low, slow and small UAVs are mostly made of non-metallic materials and have small geometric size and slow flight speed, so it is difficult for air surveillance radars to capture targets in time at a long distance; radio detection technology is difficult to detect radio-silent UAVs and has low detection performance in areas with complex radio signals. When UAVs are blocked by walls and buildings, the accuracy of image detection methods will be greatly reduced, which limits its application. At present, civil UAVs are mainly rotary-wing UAVs, and the cutting of air flow by propellers and the rotation of motors will emit some noise, which cannot be completely eliminated, so sound signal detection is a very feasible UAV detection method.
[0004] So far, the sound source positioning technology based on microphone array can be roughly divided into three categories: sound source positioning technology based on controllable beam forming, sound source positioning technology based on signal time difference and sound source positioning technology based on spatial spectrum estimation. The application of a sound source positioning system and method based on a double microphone array (application number: 202111208034.6 application date: 2021-10-18) establishes a double microphone array coordinate axis, measures the azimuth angle and the distance between the first microphone array and the second microphone array, calculates the distance of the sound source in different quadrant positions from the first microphone array, and calculates the position coordinates of the sound source in the double microphone array coordinate axis. However, its positioning ability for complex environment and long distance sound source is weak, and it cannot efficiently and accurately detect and position the unmanned aerial vehicle. The application of a sound source positioning system and method based on a double microphone array (application number: 202010272248.9 application date: 2020-04-09) uses a microphone array composed of n microphone elements to collect sound source signals; a microphone in the microphone array is used as a reference microphone, and the cross-correlation function of the microphone pair formed by the remaining microphones and the reference microphone is calculated; the first N maximum peak values of each microphone pair cross-correlation function are extracted as candidate quantities of real peak values, and the wave path difference corresponding to the peak value candidates is substituted into the mathematical relationship for solving the sound source coordinates in different permutation and combination forms, and the sound source coordinates obtained by the sound source signal under the direct path are searched locally by using the l2 norm to set the objective function, thereby improving the positioning accuracy of the actual sound source signal and reducing the influence of multipath and noise on the algorithm direction finding performance. However, the sound source determination and long distance positioning ability are weak, and it cannot be applied to the monitoring and positioning of unmanned aerial vehicles. SUMMARY
[0005] The purpose of the present application is to provide a method for detecting and positioning unmanned aerial vehicles quickly, in real time, with high accuracy.
[0006] The technical solution for achieving the purpose of the present application is a method for detecting and positioning unmanned aerial vehicles based on STM32 and small microphone arrays, comprising the following steps:
[0007] Step 1: Collecting sound signals using a sound sensor;
[0008] Step 2: Processing the collected signals using an FFT algorithm;
[0009] Step 3: Judging the data processed in step 2 using an improved harmonic detection algorithm;
[0010] Step 4: If it is judged as a UAV signal, estimating the time delay of different elements using the GCC-PHAT algorithm;
[0011] Step 5, according to the delay estimation obtained in step 4 and the microphone array geometry relationship, the coordinates of the three microphone arrays in the different unmanned aerial vehicles are calculated;
[0012] Step 6, using the microphone coordinates obtained in step 5, the coordinates of the unmanned aerial vehicle are further accurately estimated by using the center positioning algorithm.
[0013] Further, the STM32 adopts a chip with model STM32H743XIT6.
[0014] Further, the sound signal collected by the sound sensor in step 1 is as follows:
[0015] Step 1.1, arrange the sound sensor according to the predetermined geometric position to form a microphone array, connect it to the STM32 development board, and determine that the sound signal can be collected;
[0016] Step 1.2, arrange three groups of microphone arrays according to the predetermined geometric position to form a distributed microphone array system;
[0017] Step 1.3, use the distributed microphone array system to collect and detect the unmanned aerial vehicle sound signal, if the unmanned aerial vehicle sound signal is detected, then the three microphone arrays respectively locate the coordinates of the unmanned aerial vehicle;
[0018] Step 1.4, the three microphone arrays respectively transmit the results into the total processing STM32;
[0019] Step 1.5, use the ADC conversion module of STM32 to convert analog voltage into digital quantity and store it in the array.
[0020] Further, the signal collected in step 2 is processed by using the FFT algorithm, which is as follows:
[0021] Step 2.1, adopt the method of library transplantation, transplant the DSP library to STM32, select the library arm_cortexM7lfdp_math.lib, add the library file arm_cortexM7lfdp_math.lib to the project, then add the required header file path of DSP, and ensure the project can be compiled;
[0022] Step 2.2, start FPU hardware acceleration to perform high-speed floating point operation, and perform FFT operation on the collected sound signal data;
[0023] When FPU_PRESENT=1 and FPU_USED=1, the code for starting FPU is added at compile time, simple addition, subtraction, multiplication and division are performed using FPU, arm_math.h provided by firmware library is used, and the function method used is determined according to the compile control item; if FPU is not used, the function defined in the standard math.h header file of Keil is called; if FPU is used, the optimized function provided by the firmware library is used;
[0024] In order to use arm_math.h of STM32H7, ARM_MATH_CM7 needs to be defined; if the library of CMSIS is not used, the math.h provided by Keil is called; in addition, the control item CC_ARM needs to be defined in some mathematical functions to use the VSQRT instruction, so the macro definition ARM_MATH_CM4, CC_ARM needs to be added; if the file of the DSP library function is used, #include"arm_math.h" needs to be added to call the API of the DSP library.
[0025] Further, the improved harmonic detection algorithm is used to judge the data processed in step 2, and the specific steps are as follows:
[0026] Step 3.1, the frequency of the unmanned aerial vehicle signal in 0-1000Hz is divided into five characteristic frequency bands, which are [65, 195], [195, 325], [325, 455], [455, 585] and [585, 715];
[0027] Step 3.2, using the method of feature points, the frequency of the maximum two maximum values in the characteristic frequency band is averaged, and the value obtained is the frequency of the feature point;
[0028] Step 3.3, if the signal base frequency center is near 130Hz, and the feature points in each characteristic frequency band are approximately integer multiples of the base frequency, it is determined that the sound signal is an unmanned aerial vehicle signal.
[0029] Further, when it is determined in step 3.3 that the sound signal is an unmanned aerial vehicle signal, due to too little data and signal fluctuation, it is easy to have a feature point not near the integer multiple of the base frequency, so in actual application, the existence of a bad point is allowed;
[0030] Since only 4096 sampling points are used for judgment, at a sampling rate of 44100Hz, ten judgments per second will be performed, and due to too many judgment times, if not handled, the accuracy of the judgment will be affected, so five groups of continuous data are taken for continuous judgment, if three groups or more than three groups meet the characteristics of the unmanned aerial vehicle sound signal, it is judged that there is an unmanned aerial vehicle signal, otherwise it is judged that there is no unmanned aerial vehicle signal.
[0031] Further, if the UAV signal is determined in step 4, the GCC-PHAT algorithm is used to estimate the time delay of different array elements, as follows:
[0032] Step 4.1, if the UAV signal is determined, the signals received by the two microphone array elements m1, m2 and x1(t), x2(t) are Fourier transformed, and then multiplied to obtain the cross-power spectrum, as follows:
[0033] Let the signals received by the two microphone array elements m1, m2 at time t be:
[0034]
[0035] Let the noise v1(t) and v2(t) be uncorrelated Gaussian white noise, τ1 and τ2 be the time delays of the sound source signal to m1 and m2, a1 and a2 be the attenuation factors in the process of sound source signal propagation to m1 and m2, and s(t) be the sound source signal. Let the sound source signal and the noise signal be independent of each other, and the cross-correlation function of the sound signals received by the two microphone array elements be:
[0036] R 12 (τ)=E[x1(t)x2(t-τ)]
[0037] According to the above two formulas, the cross-correlation function can be obtained as follows:
[0038]
[0039] Because the noise v1(t) and v2(t) are uncorrelated Gaussian white noise, the sound source signal x(t) is a wide stationary random signal and is independent of the noise, so the cross-correlation function expression can be simplified as:
[0040] R 12 (τ)=a1a2E[x(t-τ1)x(t-τ2-τ)]=a1a2R ss (τ-(τ1-τ2))
[0041] It can be seen that when τ=(τ1-τ2), i.e. τ takes the value of the time delay between the two microphone array elements m1 and m2, R 12 (τ) reaches the maximum value. From the traditional cross-correlation function, it can be seen that the time delay between the signals obtained by the two microphone array elements can be represented as:
[0042] τ 12 =arg max τ R 12 (τ)
[0043] Step 4.2, on the basis of the basic mutual correlation, add the PHAT weighting function, reduce the interference of noise on the time delay estimation, increase the accuracy of the time delay estimation, the formula is:
[0044]
[0045] Further, step 5, according to the time delay estimation obtained in step 4 and the geometric relationship of the microphone array, the coordinates of the different unmanned aerial vehicles in the three microphone arrays are calculated, which are as follows:
[0046] Step 5.1, the distance of the sound source is estimated to obtain:
[0047]
[0048] Where R is the distance from the sound source to the microphone array, c is the sound speed, the time delay difference of the unmanned aerial vehicle sound source reaching the microphone m i ,m j is τ ij (i,j=1,2,3,4).
[0049] Step 5.2, the pitch angle is estimated to obtain:
[0050]
[0051] Step 5.3, the coordinate estimation is obtained:
[0052]
[0053] Further, step 6, using the microphone coordinates obtained by the three microphone arrays in step 5, using the center positioning algorithm to further accurately estimate the coordinates of the unmanned aerial vehicle, which are as follows:
[0054] Step 6.1, three groups of four-element cross microphone arrays M1, M2, M3 form a distributed microphone array system, and the three groups of four-element cross microphone arrays are respectively located at M1(D, 0, 0), M2(-D, 0, 0), M3(0, D, 0), and the coordinates of the unmanned aerial vehicle sound source in the system are S(x, y, z);
[0055] Step 6.2, according to step 5, three microphone arrays obtain three groups of coordinates (x1, y1, z1), (x2, y2, z2) and (x3, y3, z3); Because the three groups of four-element cross microphone arrays have different coordinates in the system, the coordinates of the unmanned aerial vehicle sound source obtained in the respective coordinate systems are converted to the system coordinate system to obtain:
[0056]
[0057] Step 6.3: According to the orthocenter positioning algorithm, by finding the two points D and E of the perpendicular foot, the equations of lines AD and BE are established, and the intersection of AD and BE is the coordinate of the orthocenter S.
[0058] Further, in step 6.3, based on the orthocenter positioning algorithm, by finding the perpendicular feet D and E, the equations of lines AD and BE are established, and the intersection of AD and BE is obtained as the coordinates of the orthocenter S, as detailed below:
[0059] Step 6.3.1, the equation of line BC is:
[0060]
[0061] in Therefore, the above formula can be expressed as:
[0062]
[0063] Since AD⊥BC, D is the point closest to edge BC from A. The distance from A to BC is:
[0064]
[0065] Let d A-BC Minimum, that is We can obtain:
[0066]
[0067] Then D(x) D ,y D ,z D The coordinates of the point are:
[0068]
[0069] Step 6.3.2, similarly, E(x) can be obtained. E ,y E ,z E Point coordinate expression;
[0070] Step 6.3.3, the equations of perpendicular lines AD and BE are:
[0071]
[0072] Step 6.3.4: Find the intersection of the two perpendicular lines AD and BE, which is the orthocenter of ΔABC, i.e., the coordinates (x, y, z) of the UAV sound source S:
[0073]
[0074] Compared with the prior art, the present application has the following advantages: (1) the present application adopts the design of a distributed microphone array system, uses three microphone arrays to simultaneously locate, then performs data fusion, and further accurately locates the coordinates of the unmanned aerial vehicle by using the center of gravity positioning algorithm, thereby increasing the hardware requirement and improving the positioning accuracy; (2) the FPU is used to perform floating point operation, thereby improving the speed of the STM32 when performing FFT; (3) the number of sampling points required for judgment is reduced, the concept of feature point is proposed, and the detection time is reduced while ensuring the accuracy of detection; (4) multiple microphone arrays are used to form a distributed microphone array system, and the positioning results of the three microphone arrays are simultaneously used by using the center of gravity positioning algorithm, thereby reducing the error of a single microphone array when positioning. BRIEF DESCRIPTION OF DRAWINGS
[0075] Figure 1 is a flowchart of the unmanned aerial vehicle detection and positioning method based on STM32 and small microphone array of the present application.
[0076] Figure 2 is a spectrum diagram obtained by 4096-point sampling FFT of the sound signal of the unmanned aerial vehicle in the embodiment of the present application.
[0077] Figure 3 is a basic cross-correlation time delay estimation diagram with added noise in the embodiment of the present application.
[0078] Figure 4 is a GCC-PHAT time delay estimation diagram with added noise in the embodiment of the present application.
[0079] Figure 5 is a schematic diagram of the distributed microphone array system in the embodiment of the present application. DETAILED DESCRIPTION
[0080] The present application will be further described in detail below in combination with the drawings and specific embodiments.
[0081] In combination with Figure 1 , the unmanned aerial vehicle detection and positioning method based on STM32 and small microphone array of the present application comprises the following steps:
[0082] Step 1, collect sound signals by using sound sensors, specifically as follows:
[0083] Step 1.1, arrange the sound sensors according to predetermined geometric positions to form microphone arrays, and connect them to the STM32 development board to determine that sound signals can be collected; the STM32 uses a chip with the model number STM32H743XIT6;
[0084] Step 1.2, arrange three groups of microphone arrays according to predetermined geometric positions to form a distributed microphone array system;
[0085] Step 1.3, using a distributed microphone array system to collect and detect the drone sound signal, if the drone sound signal is detected, the three microphone arrays respectively locate the coordinates of the drone;
[0086] Step 1.4, the three microphone arrays respectively transmit the results into the total processing STM32;
[0087] Step 1.5, using the ADC conversion module of STM32, convert the analog voltage into digital quantity and store it in the array.
[0088] Step 2, using FFT algorithm to process the collected signal, as follows:
[0089] Step 2.1, using library transplantation method, transplanting DSP library to STM32, selecting library arm_cortexM7lfdp_math.lib, adding library file arm_cortexM7lfdp_math.lib to project, then adding the required header file path of DSP, to ensure the project can be compiled;
[0090] Step 2.2, start FPU hardware acceleration, perform high-speed floating-point operation, and perform FFT operation on the collected sound signal data;
[0091] When FPU_PRESENT = 1 and FPU_USED = 1, add the code to start FPU during compilation, use FPU to perform simple addition, subtraction, multiplication and division, use arm_math.h provided by firmware library, and determine the function method according to the compilation control item; if FPU is not used, call the function defined in the standard math.h header file of Keil; if FPU is used, use the optimized function provided by firmware library;
[0092] In order to use arm_math.h of STM32H7, ARM_MATH_CM7 needs to be defined; if CMSIS library is not used, call the math.h provided by Keil; in addition, the control item CC_ARM needs to be defined in some mathematical functions VSQRT instruction, so the macro definition ARM_MATH_CM4, CC_ARM needs to be added; if the file of DSP library function is used, #include"arm_math.h" needs to be added to call the API of DSP library.
[0093] Step 3, using improved harmonic detection algorithm to judge the data processed in step 2, as follows:
[0094] Step 3.1, the frequency of the UAV signal in 0-1000Hz is divided into five characteristic frequency bands, respectively [65, 195], [195, 325], [325, 455], [455, 585], [585, 715];
[0095] Step 3.2, using the method of feature points, the frequency of the largest two maxima in the characteristic frequency band is averaged, and the value obtained is the frequency of the feature point;
[0096] Step 3.3, if the center of the signal base frequency is around 130Hz, and each characteristic frequency band is approximately an integer multiple of the base frequency, then the sound signal is determined to be a UAV signal.
[0097] Further, in step 3.3, when the sound signal is determined to be a UAV signal, due to insufficient data and signal fluctuations, it is easy to have a characteristic point not near an integer multiple of the base frequency, so in actual application, the existence of one bad point is allowed;
[0098] Since only 4096 sampling points are used for judgment, at a sampling rate of 44100Hz, ten judgments per second will be made. Due to the large number of judgments, if not handled, it will affect the accuracy of the judgment, so take five groups of continuous data for continuous judgment, if three or more groups meet the characteristics of the UAV sound signal, it is judged as having a UAV signal, otherwise it is judged as not having a UAV signal.
[0099] Step 4, if it is determined to be a UAV signal, then use the GCC-PHAT algorithm to estimate the time delay of different elements, as follows:
[0100] Step 4.1, if it is determined to be a UAV signal, then Fourier transform the signals x1(t) and x2(t) received by the two microphone elements m1 and m2, and then multiply them to obtain the cross power spectrum, as follows:
[0101] Let the signals received by the two microphone elements m1 and m2 at time t be:
[0102]
[0103] Let the noise v1(t) and v2(t) be uncorrelated Gaussian white noise, τ1 and τ2 be the time delay of the sound source signal to m1 and m2, a1 and a2 be the attenuation factor of the sound source signal during propagation to m1 and m2, and s(t) be the sound source signal. It is assumed that the sound source signal and the noise signal are independent of each other, and the cross-correlation function of the sound signals received by the two microphone elements is:
[0104] R 12 (τ)=E[x1(t)x2(t-τ)]
[0105] According to the above two formulas, the cross-correlation function can be obtained as follows:
[0106]
[0107] Because the noise v1(t) and v2(t) are uncorrelated Gaussian white noise, the sound source signal x(t) is a wide stationary random signal and is not correlated with the noise, so the cross-correlation function expression can be simplified as:
[0108] R 12 (τ)=a1a2E[x(t-τ1)x(t-τ2-τ)]=a1a2R ss (τ-(τ1-τ2))
[0109] It can be seen that when τ=(τ1-τ2), that is, τ takes the time delay between the two microphone array elements m1 and m2, R 12 (τ) reaches the maximum value; it can be known from the traditional cross-correlation function that the time delay between the signals obtained by the two microphone array elements can be expressed as:
[0110] τ 12 =arg max τ R 12 (τ)
[0111] Step 4.2, on the basis of the basic cross-correlation, add the PHAT weighting function, reduce the interference of noise on the time delay estimation, and increase the accuracy of the time delay estimation, the formula is:
[0112]
[0113] Step 5, according to the time delay estimation obtained in step 4 and the geometric relationship of the microphone array, the coordinates of different unmanned aerial vehicles in the three microphone arrays are calculated, which are as follows:
[0114] Step 5.1, the distance of the sound source is estimated to obtain:
[0115]
[0116] Where R is the distance from the sound source to the microphone array, c is the sound speed, and the time delay difference between the unmanned aerial vehicle sound source reaching the microphones m i ,m j is τ ij (i,j=1,2,3,4);
[0117] Step 5.2, the pitch angle is estimated to obtain:
[0118]
[0119] Step 5.3, the coordinate estimation is obtained:
[0120]
[0121] Step 6, using the microphone coordinates obtained by the three microphone arrays in step 5, further accurately estimate the coordinates of the unmanned aerial vehicle using the orthocenter positioning algorithm, as follows:
[0122] Step 6.1, take three groups of four-element cross microphone arrays M1, M2, M3 to form a distributed microphone array system, and the three groups of four-element cross microphone arrays are located at M1(D, 0, 0), M2(-D, 0, 0), M3(0, D, 0) respectively, and the unmanned aerial vehicle sound source is at the coordinates of the system S(x, y, z);
[0123] Step 6.2, according to step 5, three microphone arrays obtain three groups of coordinates (x1, y1, z1), (x2, y2, z2) and (x3, y3, z3); Because the three groups of four-element cross microphone arrays have different coordinates in the system, the coordinates of the unmanned aerial vehicle sound source obtained in the respective coordinate systems are converted to the system coordinate system to obtain:
[0124]
[0125] Step 6.3, according to the orthocenter positioning algorithm, the coordinates of the orthocenter S are obtained by finding the foot points D and E, establishing the equations of the straight lines AD and BE, and solving the intersection point of AD and BE, as follows:
[0126] Step 6.3.1, the equation of straight line BC is:
[0127]
[0128] Where Therefore, the above formula can be expressed as:
[0129]
[0130] Because AD⊥BC, D is the nearest point of A to edge BC, and the distance from A to BC is:
[0131]
[0132] Let d A-BC be the minimum, that is Therefore:
[0133]
[0134] Then the coordinates of point D(x D , y D , z D ) are:
[0135]
[0136] Step 6.3.2, E(x E ,y E ,z E ) point coordinate expression can be obtained by the same reason;
[0137] Step 6.3.3, the equation of the perpendicular AD, BE is:
[0138]
[0139] Step 6.3.4, the intersection of two perpendicular lines AD, BE is the orthocenter of triangle ABC, that is, the coordinates (x, y, z) of the unmanned aerial vehicle sound source S:
[0140]
[0141] Example 1
[0142] The embodiment arranges a distributed microphone array system as shown in Figure 5 , and detects and locates the unmanned aerial vehicle signal. Figure 2 is the frequency spectrum diagram obtained by FFT of 4096 point sampling of the unmanned aerial vehicle sound signal, Figure 3 is the basic cross-correlation time delay estimation diagram added with noise, Figure 4 is the GCC-PHAT time delay estimation diagram added with noise. Table 1 is an unmanned aerial vehicle sound source detection error table, and table 2 is an unmanned aerial vehicle sound source positioning error table.
[0143] Table 1
[0144]
[0145] Table 2
[0146]
[0147] From table 1 and table 2, it can be known that the unmanned aerial vehicle detection and positioning method based on STM32 and small microphone array of the application uses three microphone arrays to locate at the same time, then carries out data fusion, and further accurately positions the coordinates of the unmanned aerial vehicle by using the orthocenter positioning algorithm, increases the hardware requirement, reduces the error of a single microphone array in positioning, and improves the detection and positioning precision.
Claims
1. A method for detecting and locating a UAV based on STM32 and a small microphone array, characterized in that, The method comprises the following steps: Step 1, collecting sound signals by using a sound sensor; Step 2, processing the collected signals by using an FFT algorithm; Step 3, judging the data processed in step 2 by using an improved harmonic detection algorithm, specifically as follows: Step 3.1, dividing the frequency of the unmanned aerial vehicle signal within 0-1000Hz into five characteristic frequency bands, namely [65, 195], [195, 325], [325, 455], [455, 585] and [585, 715]; Step 3.2, using the method of characteristic points, averaging the frequencies of the largest two maximum values in the characteristic frequency band to obtain the frequency of the characteristic point; Step 3.3, if the center of the signal base frequency is near 130Hz and the characteristic points in each characteristic frequency band are near the integer multiple of the base frequency, it is determined that the sound signal is an unmanned aerial vehicle signal; In step 3.3, when it is determined that the sound signal is an unmanned aerial vehicle signal, due to too few data and signal fluctuations, it is easy to have a characteristic point not near the integer multiple of the base frequency, so in actual application, the existence of one bad point is allowed; Since only 4096 sampling points are used for judgment, when the sampling rate is 44100Hz, five groups of continuous data are taken for continuous judgment, if three groups or more than three groups meet the characteristics of the unmanned aerial vehicle sound signal, it is judged that there is an unmanned aerial vehicle signal, otherwise it is judged that there is no unmanned aerial vehicle signal; Step 4, if it is judged that it is an unmanned aerial vehicle signal, the time delay estimation of different array elements is carried out by using the GCC-PHAT algorithm; Step 5, according to the time delay estimation obtained in step 4 and the geometric relationship of the microphone array, the coordinates of different unmanned aerial vehicles in the three microphone arrays are calculated; Step 6, using the microphone coordinates obtained in step 5 in the three microphone arrays, the coordinates of the unmanned aerial vehicle are further accurately estimated by using the center positioning algorithm.
2. The method of claim 1, wherein the STM32 and small microphone array based UAV detection and positioning method is characterized by, The STM32 adopts a chip with the model number STM32H743XIT6. 3.The method of claim 1, wherein, The sound signals are collected by using the sound sensor in step 1, specifically as follows: Step 1.1, arrange the sound sensors according to the predetermined geometric position to form a microphone array, and connect them to the STM32 development board to determine that the sound signals can be collected; Step 1.2, arrange three groups of microphone arrays according to the predetermined geometric position to form a distributed microphone array system; Step 1.3, use the distributed microphone array system to collect and detect the unmanned aerial vehicle sound signals, if the unmanned aerial vehicle sound signals are detected, the three microphone arrays respectively perform coordinate positioning on the unmanned aerial vehicle; Step 1.4, the three microphone arrays respectively transmit the results into the STM32 for overall processing; Step 1.5, use the ADC conversion module of the STM32 to convert the analog voltage into digital quantity and store it in the array.
4. The method of claim 1, wherein the STM32 and small microphone array based UAV detection and positioning method is characterized by, The collected signals are processed by using the FFT algorithm in step 2, specifically as follows: Step 2.1, transplant the DSP library to STM32 using the library transplantation method, select the library arm_cortexM7lfdp_math.lib, add the library file arm_cortexM7lfdp_math.lib to the project, and then add the required header file path of the DSP to ensure that the project can be compiled; Step 2.2, start FPU hardware acceleration and perform high-speed floating-point operations on the collected sound signal data; When FPU_PRESENT=1 and FPU_USED=1, add the code to start FPU during compilation, use FPU for simple addition, subtraction, multiplication and division, use the arm_math.h provided by the firmware library, and determine the function method according to the compilation control item; If FPU is not used, call the function defined in the standard math.h header file of Keil; If FPU is used, use the optimized function provided by the firmware library; In order to use arm_math.h of STM32H7, ARM_MATH_CM7 needs to be defined; If CMSIS library is not used, call math.h provided by Keil; In addition, the control item CC_ARM needs to be defined when VSQRT instruction is used in some mathematical functions, so ARM_MATH_CM4 and CC_ARM need to be added macro definition; If the file of DSP library function is used, #include "arm_math.h" needs to be added to call the API of DSP library.
5. The method of claim 1, wherein, Step 4, if it is judged that the unmanned aerial vehicle signal, GCC-PHAT algorithm is used to estimate the time delay of different array elements, as follows: Step 4.1, if judging as a drone signal, then multiplying the two microphone elements the received signals and performing Fourier transform, then multiplying, the result is the cross power spectrum, as follows: Setting two microphone elements In The signal received at time t is: ; Set noise and are independent Gaussian white noises, are the time delays of the sound source signals to , respectively, are the attenuation factors of the sound source signals propagating to , respectively, is the sound source signal; set the sound source signal and the noise signal are independent of each other, then the cross-correlation function of the sound signals received by the two microphone array elements is: ; According to the above two formulas, the cross-correlation function is as follows: ; Because of noise and The sound source signal is uncorrelated white Gaussian noise. Since it is a wide-range stationary random signal and uncorrelated with noise, the cross-correlation function expression simplifies to: ; See when ,Right now The value is taken from two microphone array elements. The time delay between, Reaching its maximum value; the time delay between the signals obtained by the two microphone elements, as determined by the cross-correlation function, is expressed as: ; Step 4.2, on the basis of basic cross-correlation, add PHAT weighting function to reduce the interference of noise on time delay estimation and increase the accuracy of time delay estimation, the formula is: 。 6.The method of claim 1, wherein, Step 5, according to the time delay estimation obtained in step 4 and the geometric relationship of microphone array, the coordinates of different unmanned aerial vehicles in three microphone arrays are calculated, as follows: Step 5.1, the four-element cross microphone array is used to estimate the distance of sound source: ; where R is the distance from the sound source to the microphone array, c is the speed of sound, and the time delay difference between the arrival of the drone sound source at the microphone ; Step 5.2, the pitch angle is estimated as: ; Step 5.3, the coordinate estimation is obtained: 。 7. The method of claim 1, wherein, Step 6, using the microphone coordinates obtained by three microphone arrays in step 5, using the orthocenter positioning algorithm to further accurately estimate the coordinates of the unmanned aerial vehicle, as follows: Step 6.1, take three groups of four-element cross microphone array The distributed microphone array system is composed of three groups of four-element cross microphone arrays respectively located at , , The coordinates of the unmanned aerial vehicle sound source in the system are ; Step 6.
2. Three sets of coordinates are obtained from the three microphone arrays according to step 5 , and ; since the three sets of four-element cross microphone arrays have different coordinates in the system, the coordinates of the unmanned aerial vehicle sound source obtained in the respective coordinate systems are converted to the system coordinate system: ; Step 6.3, according to the orthocenter positioning algorithm, find the foot points D and E, establish the equations of straight lines AD and BE, and the intersection point of AD and BE is the coordinates of the orthocenter S.
8. The method of claim 7, wherein the STM32 and small microphone array based drone detection and positioning method is characterized by, Step 6.3, according to the orthocenter positioning algorithm, find the foot points D and E, establish the equations of straight lines AD and BE, and the intersection point of AD and BE is the coordinates of the orthocenter S, as follows: Step 6.3.1, the equation of straight line BC is: ; wherein , so that the above formula is expressed as: ; Because , D is the closest point to side BC from A, and the distance from A to BC is: ; Let min, i.e. , we obtain: ; Then Point coordinates are: ; Step 6.3.2, by analogy Point coordinate expression; Step 6.3.3, the equations of vertical lines AD and BE are: ; Step 6. The intersection of the two perpendiculars AD, BE is the orthocenter of , i.e. the coordinates of the drone sound source S : 。
Citation Information
Patent Citations
Sound source positioning method based on microphone array in multipath environment
CN111474521A
Sound source positioning system and method based on double-microphone array
CN113900064A