CN116008913A - Unmanned aerial vehicle detection positioning method based on STM32 and small microphone array - Google Patents
Unmanned aerial vehicle detection positioning method based on STM32 and small microphone array Download PDFInfo
- Publication number
- CN116008913A CN116008913A CN202211628718.6A CN202211628718A CN116008913A CN 116008913 A CN116008913 A CN 116008913A CN 202211628718 A CN202211628718 A CN 202211628718A CN 116008913 A CN116008913 A CN 116008913A
- Authority
- CN
- China
- Prior art keywords
- unmanned aerial
- aerial vehicle
- microphone array
- microphone
- signal
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 57
- 238000001514 detection method Methods 0.000 title claims abstract description 45
- 238000003491 array Methods 0.000 claims abstract description 40
- 230000005236 sound signal Effects 0.000 claims abstract description 33
- 238000012545 processing Methods 0.000 claims abstract description 9
- 238000005314 correlation function Methods 0.000 claims description 14
- 238000005070 sampling Methods 0.000 claims description 9
- 238000001228 spectrum Methods 0.000 claims description 5
- 238000012935 Averaging Methods 0.000 claims description 3
- 230000001133 acceleration Effects 0.000 claims description 3
- 238000006243 chemical reaction Methods 0.000 claims description 3
- 238000011161 development Methods 0.000 claims description 3
- 238000007620 mathematical function Methods 0.000 claims description 3
- 238000005457 optimization Methods 0.000 claims description 3
- 230000008569 process Effects 0.000 claims description 3
- 230000009466 transformation Effects 0.000 claims description 3
- 230000004807 localization Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 230000004927 fusion Effects 0.000 description 2
- RZVHIXYEVGDQDX-UHFFFAOYSA-N 9,10-anthraquinone Chemical compound C1=CC=C2C(=O)C3=CC=CC=C3C(=O)C2=C1 RZVHIXYEVGDQDX-UHFFFAOYSA-N 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 208000037265 diseases, disorders, signs and symptoms Diseases 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 239000007769 metal material Substances 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 229910052755 nonmetal Inorganic materials 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 201000009032 substance abuse Diseases 0.000 description 1
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02T—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
- Y02T10/00—Road transport of goods or passengers
- Y02T10/10—Internal combustion engine [ICE] based vehicles
- Y02T10/40—Engine management systems
Landscapes
- Measurement Of Velocity Or Position Using Acoustic Or Ultrasonic Waves (AREA)
- Circuit For Audible Band Transducer (AREA)
Abstract
The invention discloses an unmanned aerial vehicle detection positioning method based on STM32 and a small microphone array, which comprises the following steps: firstly, collecting sound signals by utilizing a sound sensor, and processing the collected signals by utilizing an FFT algorithm; then, the processed data are judged by utilizing an improved harmonic detection algorithm, and if the processed data are judged to be unmanned aerial vehicle signals, time delay estimation of different array elements is carried out by utilizing a GCC-PHAT algorithm; then, according to the obtained time delay estimation and the geometric relation of the microphone array elements, different unmanned aerial vehicle coordinates in the three microphone arrays are calculated; and finally, utilizing microphone coordinates obtained by the three microphone arrays, and utilizing a vertical center positioning algorithm to further accurately estimate the coordinates of the unmanned aerial vehicle. The invention improves the efficiency, accuracy and accuracy of unmanned aerial vehicle detection positioning.
Description
Technical Field
The invention relates to the field of sound signal detection and positioning, in particular to an unmanned aerial vehicle detection and positioning method based on STM32 and a small microphone array.
Background
Along with the gradual reduction of the price of the unmanned aerial vehicle, the admission threshold of the unmanned aerial vehicle is gradually reduced, so that the situation that the unmanned aerial vehicle is disordered to apply and difficult to supervise in the global scope is caused, and the events of disordered flight and black flight of the unmanned aerial vehicle are caused to frequently occur, thereby seriously affecting public safety and social stability. If the drone then carries a bomb, this can have unpredictable serious consequences. At present, the domestic supervision of unmanned aerial vehicles is mainly embodied in the related unmanned aerial vehicle flight limiting policies including various regulations such as civil aviation law, temporary regulations on the management of civil unmanned aerial vehicles, general aviation flight control regulations and the like, the phenomenon of unmanned aerial vehicle flying abuses is limited to a certain extent by law, and the countering technology of unmanned aerial vehicles becomes an effective means for preventing unmanned aerial vehicles from flying in disorder and flying in black.
In the unmanned aerial vehicle detection problem, the main unmanned aerial vehicle detection modes at present comprise radar detection, radio signal detection, acoustic signal detection, image detection and multiple means collaborative detection. The civil unmanned aerial vehicle is usually a 'low-speed unmanned aerial vehicle', namely an unmanned aerial vehicle with low flying height, low speed and small volume. The radar is used as a mainstream air target detection means, the effect is not ideal when aiming at the unmanned aerial vehicle target, because the low-speed unmanned aerial vehicle is mostly made of non-metal materials, the geometric dimension is small, the flying speed is low, and the target is difficult to capture in time on the air warning radar at a long distance; radio detection technology is difficult to detect a radio silent unmanned aerial vehicle, and detection performance is lower in an area with complicated radio signals. When the unmanned aerial vehicle is shielded by a wall body and a building, the accuracy of the image detection method can be greatly reduced, which limits the application of the unmanned aerial vehicle. At present, the civil unmanned aerial vehicle is mainly a rotary-wing unmanned aerial vehicle, and in flight, the propeller cuts the airflow and the motor rotates to emit some noise, and the noise cannot be completely eliminated, so that acoustic signal detection is a very feasible unmanned aerial vehicle detection means.
Heretofore, microphone array-based sound source localization techniques have been largely divided into three categories, controllable beam forming-based sound source localization techniques, signal arrival time difference-based sound source localization techniques, and spatial spectrum estimation-based sound source localization techniques. The invention discloses a sound source positioning system and a sound source positioning method based on a double microphone array (application number: 202111208034.6, application date: 2021-10-18), which are characterized in that azimuth angles and distances between a first microphone array and a second microphone array are measured by establishing a double microphone array coordinate axis, the distances between sound sources at different quadrant positions and the first microphone array are calculated by utilizing the established double microphone array coordinate axis, and the position coordinates of the sound sources in the double microphone array coordinate axis are calculated, but the positioning capability of the sound sources on complex environments and remote sound sources is weak, and the unmanned aerial vehicle cannot be detected and positioned efficiently and accurately. The invention relates to a sound source positioning system based on a double-microphone array and a method thereof (application number: 202010272248.9, application date: 2020-04-09), wherein sound source signals are acquired by utilizing a microphone array formed by n microphone array elements; taking one microphone in the microphone array as a reference microphone, and solving a cross-correlation function of microphone pairs formed by the rest microphones and the reference microphone; the first N maximum peaks of each microphone pair cross-correlation function are extracted to serve as candidate quantities of real peaks, wave path differences corresponding to the peak candidate quantities are substituted into mathematical relation formulas for solving sound source coordinates in different permutation and combination modes, the sound source coordinates obtained by the sound source signals under a direct path are locally searched out by setting an objective function through l2 norms, positioning accuracy of the actual sound source signals is improved, influence of multipath and noise on algorithm direction finding performance is reduced, but sound source determination and far field positioning capability are weak, and the method is not applicable to monitoring and positioning of unmanned aerial vehicles.
Disclosure of Invention
The invention aims to provide the unmanned aerial vehicle detection positioning method which is rapid in detection positioning, strong in real-time performance and high in accuracy.
The technical solution for realizing the purpose of the invention is as follows: an unmanned aerial vehicle detection positioning method based on STM32 and a small microphone array comprises the following steps:
step 1, collecting sound signals by utilizing a sound sensor;
step 2, processing the acquired signals by utilizing an FFT algorithm;
step 3, judging the data processed in the step 2 by utilizing an improved harmonic detection algorithm;
step 4, if the unmanned aerial vehicle signal is judged, performing delay estimation of different array elements by using a GCC-PHAT algorithm;
step 5, calculating different unmanned aerial vehicle coordinates in the three microphone arrays according to the time delay estimation and the geometric relationship of the microphone array elements obtained in the step 4;
and 6, further accurately estimating the coordinates of the unmanned aerial vehicle by using the microphone coordinates obtained by the three microphone arrays in the step 5 and using a vertical center positioning algorithm.
Further, the STM32 adopts a chip with the model number of STM32H743XIT 6.
Further, the sound signal collection by the sound sensor in step 1 is specifically as follows:
step 1.1, arranging sound sensors according to preset geometric positions to form a microphone array, connecting the microphone array to an STM32 development board, and determining that sound signals can be acquired;
step 1.2, arranging three groups of microphone arrays according to preset geometric positions to form a distributed microphone array system;
step 1.3, acquiring and detecting unmanned aerial vehicle sound signals by using a distributed microphone array system, and if the unmanned aerial vehicle sound signals are detected, respectively positioning coordinates of the unmanned aerial vehicle by using three microphone arrays;
step 1.4, respectively transmitting the results into an STM32 of the total processing by the three microphone arrays;
step 1.5, converting the analog voltage into digital quantity and storing the digital quantity in an array by using an ADC (analog to digital converter) conversion module of the STM 32.
Further, the processing of the collected signals by using the FFT algorithm in step 2 is specifically as follows:
step 2.1, a library transplanting method is adopted, a DSP library is transplanted to STM32, library arm_corexM7lfdp_math.lib is selected, library file arm_corexM7lfdp_math.lib is added to the project, and then a header file path required by the DSP is added to ensure the compilation of the project;
step 2.2, starting FPU hardware acceleration, performing high-speed floating point number operation, and performing FFT operation on collected sound signal data;
when fpu_present=1 and fpu_used=1, adding a code for starting the FPU during compiling, performing simple addition, subtraction, multiplication and division by using the FPU, determining a function method to be USED according to a compiling control item by using an arm_math.h of a firmware library, and calling a function defined in a standard math.h header file of keil if the FPU is not USED; if the FPU is used, using an optimization function carried by the firmware library;
to use arm_math.h of STM32H7, arm_math_cm7 needs to be defined; if the library of the CMSIS is not used, calling the math.h of the Keil self-contained; in addition, the definition control term CC_ARM requires the use of the VSQRT instruction in certain mathematical functions, thus requiring the addition of a macro definition ARM_MATH_CM4, CC_ARM; if a file of DSP library functions is used, then #include "arm_math.h" needs to be added to call the API of the DSP library.
Further, the method for determining the data processed in the step 2 by using the improved harmonic detection algorithm in the step 3 is specifically as follows:
step 3.1, dividing the frequency of the unmanned aerial vehicle signal within 0-1000Hz into five characteristic frequency bands which are respectively [65, 195], [195, 325], [325, 455], [455, 585], [585, 715];
step 3.2, averaging the frequencies of the largest two maxima in the characteristic frequency band by using a characteristic point method, wherein the obtained value is the frequency of the characteristic point;
and 3.3, if the fundamental frequency center of the obtained signal is around 130Hz and the characteristic points in each characteristic frequency band are about integer multiples of the fundamental frequency, judging the sound signal as an unmanned aerial vehicle signal.
Further, when the sound signal is determined to be an unmanned aerial vehicle signal in step 3.3, because the data is too small and the signal has fluctuation, a situation that a certain characteristic point is not near the integral multiple of the fundamental frequency easily occurs, so that a bad point is allowed to exist in practical application;
since only 4096 sampling points are used for judgment, ten times of judgment can be carried out every second when the sampling rate is 44100Hz, and the judgment times are too many and influence the judgment accuracy if the judgment times are not processed, five continuous groups of data are taken for continuous judgment, if three or more than three groups of data accord with the sound signal characteristics of the unmanned aerial vehicle, the unmanned aerial vehicle signal is judged to exist, and otherwise, the unmanned aerial vehicle signal is judged to exist.
Further, if the unmanned aerial vehicle signal is determined in the step 4, the delay estimation of different array elements is performed by using the GCC-phas algorithm, specifically as follows:
step 4.1, if the unmanned aerial vehicle signal is judged, two microphone array elements m are adopted 1 、m 2 Received signal sum x 1 (t)、x 2 And (t) performing Fourier transformation and then multiplying, wherein the obtained result is a cross power spectrum, and the method comprises the following steps of:
setting two microphone array elements m 1 、m 2 The signal received at time t is:
setting the noise v 1 (t) and v 2 (t) uncorrelated white gaussian noise, τ 1 、τ 2 Respectively, sound source signals to m 1 、m 2 Time delay of a) 1 、a 2 For propagation of sound source signals to m 1 、m 2 Attenuation factor in the process, s (t) is the sound source signal; setting the sound source signal and the noise signal to be mutually independent, and the cross-correlation function of sound signals received by the two microphone array elements is as follows:
R 12 (τ)=E[x 1 (t)x 2 (t-τ)]
the cross-correlation function can be obtained from the two formulas above as follows:
because of noise v 1 (t) and v 2 (t) is uncorrelated gaussian white noise, the sound source signal x (t) is a broad stationary random signal and uncorrelated with noise, so the cross correlation function expression can be reduced to:
R 12 (τ)=a 1 a 2 E[x(t-τ 1 )x(t-τ 2 -τ)]=a 1 a 2 R ss (τ-(τ 1 -τ 2 ))
it can be seen that when τ= (τ) 1 -τ 2 ) I.e. τ takes on two valuesMicrophone array element m 1 、m 2 At the time of time delay between R 12 (τ) reaches a maximum value; from the conventional cross correlation function, it can be known that the time delay between signals obtained by two microphone elements can be expressed as:
τ 12 =arg max τ R 12 (τ)
step 4.2, adding a PHAT weighting function on the basis of basic cross correlation, reducing the interference of noise on time delay estimation, and increasing the accuracy of the time delay estimation, wherein the formula is as follows:
further, in step 5, according to the time delay estimation and the geometric relationship of the microphone array elements obtained in step 4, different unmanned aerial vehicle coordinates in the three microphone arrays are calculated, which is specifically as follows:
step 5.1, estimating the sound source distance to obtain:
wherein R is the distance from the sound source to the microphone array, c is the sound velocity, and the sound source of the unmanned aerial vehicle reaches the microphone m i ,m j Is tau ij (i,j=1,2,3,4);
Step 5.2, estimating a pitch angle to obtain:
step 5.3, obtaining coordinate estimation:
further, the coordinates of the unmanned aerial vehicle obtained by using the three microphone arrays in step 5 in step 6 are further accurately estimated by using a vertical center positioning algorithm, which is specifically as follows:
step 6.1, three groups of quaternary cross microphone arrays M are adopted 1 ,M 2 ,M 3 Forms a distributed microphone array system, wherein three groups of quaternary cross microphone arrays are respectively positioned at M 1 (D,0,0),M 2 (-D,0,0),M 3 (0, D, 0), wherein the coordinates of the sound source of the unmanned aerial vehicle in the system are S (x, y, z);
step 6.2 according to step 5, three microphone arrays obtain three sets of coordinates (x 1 ,y 1 ,z 1 ),(x 2 ,y 2 ,z 2 ) And (x) 3 ,y 3 ,z 3 ) The method comprises the steps of carrying out a first treatment on the surface of the Because the coordinates of the three groups of quaternary cross microphone arrays in the system are different, the coordinate values of the sound source of the unmanned aerial vehicle obtained in the respective coordinate systems are converted into the coordinate system of the system, and the coordinate values of the sound source of the unmanned aerial vehicle are obtained:
and 6.3, according to a orthocenter positioning algorithm, by searching two points of the orthocenter D, E, determining equations of the straight lines AD and BE, and obtaining the intersection point of the AD and BE as the coordinate of the orthocenter S.
Further, in step 6.3, by searching for two points of the perpendicular foot D, E, the equation of the straight line AD and BE is established, and the intersection point of the AD and BE is obtained as the coordinate of the perpendicular center S, which is specifically as follows:
the equation of the straight line BC in step 6.3.1 is:
since AD≡BC, D is the nearest point from A to side BC, the distance from A to BC is:
then D (x) D ,y D ,z D ) The point coordinates are:
step 6.3.2, E (x) E ,y E ,z E ) A point coordinate expression;
the equation for the perpendicular lines AD, BE, step 6.3.3, is:
step 6.3.4, the intersection point of the two perpendicular lines AD and BE is obtained to BE the orthocenter of Δabc, that is, the coordinates (x, y, z) of the sound source S of the unmanned aerial vehicle:
compared with the prior art, the invention has the remarkable advantages that: (1) According to the invention, a design of a distributed microphone array system is adopted, three microphone arrays are used for simultaneous positioning, then data fusion is carried out, and a vertical center positioning algorithm is utilized to further accurately position the unmanned aerial vehicle, so that the hardware requirement is increased, and the positioning precision is improved; (2) The FPU is adopted to carry out floating point number operation, so that the speed of the STM32 in FFT is improved; (3) The number of sampling points required by judgment is reduced, the concept of characteristic points is provided, the detection time is shortened, and the detection accuracy is ensured; (4) A distributed microphone array system is formed by using a plurality of microphone arrays, and positioning results of three microphone arrays are simultaneously used by using a orthocenter positioning algorithm, so that errors of single microphone arrays in positioning are reduced.
Drawings
Fig. 1 is a flow chart of an unmanned aerial vehicle detection positioning method based on an STM32 and a small microphone array.
Fig. 2 is a spectrum diagram obtained by 4096-point sampling FFT of an acoustic signal of an unmanned aerial vehicle in an embodiment of the present invention.
Fig. 3 is a diagram of a basic cross-correlation delay estimate with noise added in an embodiment of the invention.
Fig. 4 is a graph of GCC-phas delay estimation with noise added in an embodiment of the present invention.
Fig. 5 is a schematic diagram of a distributed microphone array system in accordance with an embodiment of the invention.
Detailed Description
The invention will now be described in further detail with reference to the drawings and examples.
Referring to fig. 1, the unmanned aerial vehicle detection positioning method based on STM32 and a small microphone array provided by the invention comprises the following steps:
step 1, collecting sound signals by utilizing a sound sensor, wherein the sound signals are specifically as follows:
step 1.1, arranging sound sensors according to preset geometric positions to form a microphone array, connecting the microphone array to an STM32 development board, and determining that sound signals can be acquired; the STM32 adopts a chip with the model of STM32H743 XIT;
step 1.2, arranging three groups of microphone arrays according to preset geometric positions to form a distributed microphone array system;
step 1.3, acquiring and detecting unmanned aerial vehicle sound signals by using a distributed microphone array system, and if the unmanned aerial vehicle sound signals are detected, respectively positioning coordinates of the unmanned aerial vehicle by using three microphone arrays;
step 1.4, respectively transmitting the results into an STM32 of the total processing by the three microphone arrays;
step 1.5, converting the analog voltage into digital quantity and storing the digital quantity in an array by using an ADC (analog to digital converter) conversion module of the STM 32.
Step 2, processing the acquired signals by utilizing an FFT algorithm, wherein the method comprises the following steps:
step 2.1, a library transplanting method is adopted, a DSP library is transplanted to STM32, library arm_corexM7lfdp_math.lib is selected, library file arm_corexM7lfdp_math.lib is added to the project, and then a header file path required by the DSP is added to ensure the compilation of the project;
step 2.2, starting FPU hardware acceleration, performing high-speed floating point number operation, and performing FFT operation on collected sound signal data;
when fpu_present=1 and fpu_used=1, adding a code for starting the FPU during compiling, performing simple addition, subtraction, multiplication and division by using the FPU, determining a function method to be USED according to a compiling control item by using an arm_math.h of a firmware library, and calling a function defined in a standard math.h header file of keil if the FPU is not USED; if the FPU is used, using an optimization function carried by the firmware library;
to use arm_math.h of STM32H7, arm_math_cm7 needs to be defined; if the library of the CMSIS is not used, calling the math.h of the Keil self-contained; in addition, the definition control term CC_ARM requires the use of the VSQRT instruction in certain mathematical functions, thus requiring the addition of a macro definition ARM_MATH_CM4, CC_ARM; if a file of DSP library functions is used, then #include "arm_math.h" needs to be added to call the API of the DSP library.
And 3, judging the data processed in the step 2 by utilizing an improved harmonic detection algorithm, wherein the method comprises the following steps of:
step 3.1, dividing the frequency of the unmanned aerial vehicle signal within 0-1000Hz into five characteristic frequency bands which are respectively [65, 195], [195, 325], [325, 455], [455, 585], [585, 715];
step 3.2, averaging the frequencies of the largest two maxima in the characteristic frequency band by using a characteristic point method, wherein the obtained value is the frequency of the characteristic point;
and 3.3, if the fundamental frequency center of the obtained signal is around 130Hz and the characteristic points in each characteristic frequency band are about integer multiples of the fundamental frequency, judging the sound signal as an unmanned aerial vehicle signal.
Further, when the sound signal is determined to be an unmanned aerial vehicle signal in step 3.3, because the data is too small and the signal has fluctuation, a situation that a certain characteristic point is not near the integral multiple of the fundamental frequency easily occurs, so that a bad point is allowed to exist in practical application;
since only 4096 sampling points are used for judgment, ten times of judgment can be carried out every second when the sampling rate is 44100Hz, and the judgment times are too many and influence the judgment accuracy if the judgment times are not processed, five continuous groups of data are taken for continuous judgment, if three or more than three groups of data accord with the sound signal characteristics of the unmanned aerial vehicle, the unmanned aerial vehicle signal is judged to exist, and otherwise, the unmanned aerial vehicle signal is judged to exist.
And 4, if the unmanned aerial vehicle signal is judged, performing delay estimation of different array elements by using a GCC-PHAT algorithm, wherein the delay estimation is specifically as follows:
step 4.1, if the unmanned aerial vehicle signal is judged, two microphone array elements m are adopted 1 、m 2 Received signal sum x 1 (t)、x 2 And (t) performing Fourier transformation and then multiplying, wherein the obtained result is a cross power spectrum, and the method comprises the following steps of:
setting two microphone array elements m 1 、m 2 The signal received at time t is:
setting the noise v 1 (t) and v 2 (t) uncorrelated white gaussian noise, τ 1 、τ 2 Respectively, sound source signals to m 1 、m 2 Time delay of a) 1 、a 2 For propagation of sound source signals to m 1 、m 2 Attenuation factor in the process, s (t) is the sound source signal; setting the sound source signal and the noise signal to be mutually independent, and the cross-correlation function of sound signals received by the two microphone array elements is as follows:
R 12 (τ)=E[x 1 (t)x 2 (t-τ)]
the cross-correlation function can be obtained from the two formulas above as follows:
because of noise v 1 (t) and v 2 (t) is uncorrelated gaussian white noise, the sound source signal x (t) is a broad stationary random signal and uncorrelated with noise, so the cross correlation function expression can be reduced to:
R 12 (τ)=a 1 a 2 E[x(t-τ 1 )x(t-τ 2 -τ)]=a 1 a 2 R ss (τ-(τ 1 -τ 2 ))
it can be seen that when τ= (τ) 1 -τ 2 ) I.e. τ takes on two microphone elements m 1 、m 2 At the time of time delay between R 12 (τ) reaches a maximum value; from the conventional cross correlation function, it can be known that the time delay between signals obtained by two microphone elements can be expressed as:
τ 12 =arg max τ R 12 (τ)
step 4.2, adding a PHAT weighting function on the basis of basic cross correlation, reducing the interference of noise on time delay estimation, and increasing the accuracy of the time delay estimation, wherein the formula is as follows:
and 5, calculating different unmanned aerial vehicle coordinates in the three microphone arrays according to the time delay estimation and the geometric relationship of the microphone array elements obtained in the step 4, wherein the method comprises the following steps of:
step 5.1, estimating the sound source distance to obtain:
wherein R is the distance from the sound source to the microphone array, c is the sound velocity, and the sound source of the unmanned aerial vehicle reaches the microphone m i ,m j Is tau ij (i,j=1,2,3,4);
Step 5.2, estimating a pitch angle to obtain:
step 5.3, obtaining coordinate estimation:
and 6, further accurately estimating the coordinates of the unmanned aerial vehicle by using the microphone coordinates obtained by the three microphone arrays in the step 5 and using a orthocenter positioning algorithm, wherein the method comprises the following steps of:
step 6.1, three groups of quaternary cross microphone arrays M are adopted 1 ,M 2 ,M 3 Forms a distributed microphone array system, wherein three groups of quaternary cross microphone arrays are respectively positioned at M 1 (D,0,0),M 2 (-D,0,0),M 3 (0, D, 0), wherein the coordinates of the sound source of the unmanned aerial vehicle in the system are S (x, y, z);
step 6.2 according to step 5, three microphone arrays obtain three sets of coordinates (x 1 ,y 1 ,z 1 ),(x 2 ,y 2 ,z 2 ) And (x) 3 ,y 3 ,z 3 ) The method comprises the steps of carrying out a first treatment on the surface of the Because the coordinates of the three groups of quaternary cross microphone arrays in the system are different, the coordinate values of the sound source of the unmanned aerial vehicle obtained in the respective coordinate systems are converted into the coordinate system of the system, and the coordinate values of the sound source of the unmanned aerial vehicle are obtained:
and 6.3, according to a orthocenter positioning algorithm, by searching two points of the orthocenter D, E, establishing equations of straight lines AD and BE, and obtaining the intersection point of the AD and BE as the coordinate of the orthocenter S, wherein the coordinates are as follows:
the equation of the straight line BC in step 6.3.1 is:
since AD≡BC, D is the nearest point from A to side BC, the distance from A to BC is:
then D (x) D ,y D ,z D ) The point coordinates are:
step 6.3.2, E (x) E ,y E ,z E ) A point coordinate expression;
the equation for the perpendicular lines AD, BE, step 6.3.3, is:
step 6.3.4, the intersection point of the two perpendicular lines AD and BE is obtained to BE the orthocenter of Δabc, that is, the coordinates (x, y, z) of the sound source S of the unmanned aerial vehicle:
example 1
The distributed microphone array system shown in fig. 5 is arranged in the embodiment, and unmanned aerial vehicle signals are detected and positioned. Fig. 2 is a spectrogram obtained by 4096-point sampling FFT of an unmanned aerial vehicle sound signal, fig. 3 is a basic cross-correlation time delay estimation graph added with noise, and fig. 4 is a GCC-phas time delay estimation graph added with noise. The table is an unmanned aerial vehicle sound source detection error table, and table 2 is an unmanned aerial vehicle sound source localization error table.
TABLE 1
TABLE 2
As can be seen from tables 1 and 2, according to the unmanned aerial vehicle detection positioning method based on the STM32 and the small microphone arrays, three microphone arrays are used for simultaneous positioning, then data fusion is carried out, the vertical center positioning algorithm is utilized for further accurately positioning coordinates of the unmanned aerial vehicle, the hardware requirement is increased, the errors of single microphone arrays during positioning are reduced, and the detection and positioning accuracy is improved.
Claims (10)
1. An unmanned aerial vehicle detection positioning method based on STM32 and a small microphone array is characterized by comprising the following steps:
step 1, collecting sound signals by utilizing a sound sensor;
step 2, processing the acquired signals by utilizing an FFT algorithm;
step 3, judging the data processed in the step 2 by utilizing an improved harmonic detection algorithm;
step 4, if the unmanned aerial vehicle signal is judged, performing delay estimation of different array elements by using a GCC-PHAT algorithm;
step 5, calculating different unmanned aerial vehicle coordinates in the three microphone arrays according to the time delay estimation and the geometric relationship of the microphone array elements obtained in the step 4;
and 6, further accurately estimating the coordinates of the unmanned aerial vehicle by using the microphone coordinates obtained by the three microphone arrays in the step 5 and using a vertical center positioning algorithm.
2. The unmanned aerial vehicle detection positioning method based on the STM32 and the small microphone array according to claim 1, wherein the STM32 is a chip with the model number of STM32H743 XIT.
3. The unmanned aerial vehicle detection positioning method based on the STM32 and the small microphone array according to claim 1, wherein the sound signal acquisition by the sound sensor in the step 1 is specifically as follows:
step 1.1, arranging sound sensors according to preset geometric positions to form a microphone array, connecting the microphone array to an STM32 development board, and determining that sound signals can be acquired;
step 1.2, arranging three groups of microphone arrays according to preset geometric positions to form a distributed microphone array system;
step 1.3, acquiring and detecting unmanned aerial vehicle sound signals by using a distributed microphone array system, and if the unmanned aerial vehicle sound signals are detected, respectively positioning coordinates of the unmanned aerial vehicle by using three microphone arrays;
step 1.4, respectively transmitting the results into an STM32 of the total processing by the three microphone arrays;
step 1.5, converting the analog voltage into digital quantity and storing the digital quantity in an array by using an ADC (analog to digital converter) conversion module of the STM 32.
4. The unmanned aerial vehicle detection positioning method based on the STM32 and the small microphone array according to claim 1, wherein the processing of the collected signals by the FFT algorithm in the step 2 is specifically as follows:
step 2.1, a library transplanting method is adopted, a DSP library is transplanted to STM32, library arm_corexM7lfdp_math.lib is selected, library file arm_corexM7lfdp_math.lib is added to the project, and then a header file path required by the DSP is added to ensure the compilation of the project;
step 2.2, starting FPU hardware acceleration, performing high-speed floating point number operation, and performing FFT operation on collected sound signal data;
when fpu_present=1 and fpu_used=1, adding a code for starting the FPU during compiling, performing simple addition, subtraction, multiplication and division by using the FPU, determining a function method to be USED according to a compiling control item by using an arm_math.h of a firmware library, and calling a function defined in a standard math.h header file of keil if the FPU is not USED; if the FPU is used, using an optimization function carried by the firmware library;
to use arm_math.h of STM32H7, arm_math_cm7 needs to be defined; if the library of the CMSIS is not used, calling the math.h of the Keil self-contained; in addition, the definition control term CC_ARM requires the use of the VSQRT instruction in certain mathematical functions, thus requiring the addition of a macro definition ARM_MATH_CM4, CC_ARM; if a file of DSP library functions is used, then #include "arm_math.h" needs to be added to call the API of the DSP library.
5. The unmanned aerial vehicle detection positioning method based on the STM32 and the small microphone array according to claim 1, wherein the data processed in the step 2 is judged by using the improved harmonic detection algorithm in the step 3, specifically as follows:
step 3.1, dividing the frequency of the unmanned aerial vehicle signal within 0-1000Hz into five characteristic frequency bands which are respectively [65, 195], [195, 325], [325, 455], [455, 585], [585, 715];
step 3.2, averaging the frequencies of the largest two maxima in the characteristic frequency band by using a characteristic point method, wherein the obtained value is the frequency of the characteristic point;
and 3.3, if the fundamental frequency center of the obtained signal is around 130Hz and the characteristic points in each characteristic frequency band are about integer multiples of the fundamental frequency, judging the sound signal as an unmanned aerial vehicle signal.
6. The unmanned aerial vehicle detection positioning method based on STM32 and a small microphone array according to claim 5, wherein when the sound signal is determined to be an unmanned aerial vehicle signal in step 3.3, because the data is too small and the signal has fluctuation, a situation that a certain characteristic point is not near an integer multiple of a fundamental frequency easily occurs, so that a bad point is allowed to exist in practical application;
since only 4096 sampling points are used for judgment, ten times of judgment can be carried out every second when the sampling rate is 44100Hz, and the judgment times are too many and influence the judgment accuracy if the judgment times are not processed, five continuous groups of data are taken for continuous judgment, if three or more than three groups of data accord with the sound signal characteristics of the unmanned aerial vehicle, the unmanned aerial vehicle signal is judged to exist, and otherwise, the unmanned aerial vehicle signal is judged to exist.
7. The unmanned aerial vehicle detection positioning method based on the STM32 and the small microphone array according to claim 1, wherein if the unmanned aerial vehicle signal is determined in the step 4, the delay estimation of different array elements is performed by using a GCC-PHAT algorithm, specifically as follows:
step 4.1, if the unmanned aerial vehicle signal is judged, two microphone array elements m are adopted 1 、m 2 Received signal sum x 1 (t)、x 2 And (t) performing Fourier transformation and then multiplying, wherein the obtained result is a cross power spectrum, and the method comprises the following steps of:
setting two microphone array elements m 1 、m 2 The signal received at time t is:
setting the noise v 1 (t) and v 2 (t) uncorrelated white gaussian noise, τ 1 、τ 2 Respectively, sound source signals to m 1 、m 2 Time delay of a) 1 、a 2 For propagation of sound source signals to m 1 、m 2 The attenuation factor in the process, s (t) is the sound source signal; setting the sound source signal and the noise signal to be mutually independent, and the cross-correlation function of sound signals received by the two microphone array elements is as follows:
R 12 (τ)=E[x 1 (t)x 2 (t-τ)]
the cross-correlation function is obtained according to the two formulas above as follows:
R 12 (τ)=E{[a 1 x(t-τ 1 )+v 1 (t)][a 2 x(t-τ 2 -τ)+v 2 (t-τ)]}
=a 1 a 2 E[x(t-τ 1 )x(t-τ 2 -τ)]+a 1 E[x(t-τ 1 )v 2 (t-τ)]+a 2 E[x(t-τ 2 -τ)v 1 (t)]+E[v 1 (t)v 2 (t-τ)]
because of noise v 1 (t) and v 2 (t) is uncorrelated gaussian white noise, the sound source signal x (t) is a broad stationary random signal and uncorrelated with noise, so the cross-correlation function expression reduces to:
R 12 (τ)=a 1 a 2 E[x(t-τ 1 )x(t-τ 2 -τ)]=a 1 a 2 R ss (τ-(τ 1 -τ 2 ))
it is seen that when τ= (τ) 1 -τ 2 ) I.e. τ takes on two microphone elements m 1 、m 2 At the time of time delay between R 12 (τ) reaches a maximum value; knowing the time delay between the signals obtained by the two microphone elements from the cross correlation function is expressed as:
τ 12 =arg max τ R 12 (τ)
step 4.2, adding a PHAT weighting function on the basis of basic cross correlation, reducing the interference of noise on time delay estimation, and increasing the accuracy of the time delay estimation, wherein the formula is as follows:
8. the unmanned aerial vehicle detection positioning method based on the STM32 and the small microphone array according to claim 1, wherein the time delay estimation and the microphone array element geometric relationship obtained in the step 4 in the step 5 are used for calculating different unmanned aerial vehicle coordinates in three microphone arrays, and the method is specifically as follows:
step 5.1, estimating the sound source distance to obtain:
wherein R is the distance from the sound source to the microphone array, c is the sound velocity, and the sound source of the unmanned aerial vehicle reaches the microphone m i ,m j Is tau ij (i,j=1,2,3,4);
Step 5.2, estimating a pitch angle to obtain:
step 5.3, obtaining coordinate estimation:
9. the unmanned aerial vehicle detection positioning method based on STM32 and a small microphone array according to claim 1, wherein the microphone coordinates obtained by using the three microphone arrays in step 5 in step 6 are used for further accurately estimating the coordinates of the unmanned aerial vehicle by using a orthocenter positioning algorithm, specifically as follows:
step 6.1, three groups of quaternary cross microphone arrays M are adopted 1 ,M 2 ,M 3 Forms a distributed microphone array system, wherein three groups of quaternary cross microphone arrays are respectively positioned at M 1 (D,0,0),M 2 (-D,0,0),M 3 (0, D, 0), wherein the coordinates of the sound source of the unmanned aerial vehicle in the system are S (x, y, z);
step 6.2 according to step 5, three microphone arrays obtain three sets of coordinates (x 1 ,y 1 ,z 1 ),(x 2 ,y 2 ,z 2 ) And (x) 3 ,y 3 ,z 3 ) The method comprises the steps of carrying out a first treatment on the surface of the Because the coordinates of the three groups of quaternary cross microphone arrays in the system are different, the coordinate values of the sound source of the unmanned aerial vehicle obtained in the respective coordinate systems are converted into the coordinate system of the system to obtain the coordinate system of the unmanned aerial vehicle:
and 6.3, according to a orthocenter positioning algorithm, by searching two points of the orthocenter D, E, determining equations of the straight lines AD and BE, and obtaining the intersection point of the AD and BE as the coordinate of the orthocenter S.
10. The unmanned aerial vehicle detection positioning method based on STM32 and a small microphone array according to claim 9, wherein the method of step 6.3 is characterized in that according to a vertical positioning algorithm, by searching two points of a vertical foot D, E, an equation of a straight line AD and BE is established, and the intersection point of AD and BE is the coordinate of a vertical center S, and specifically comprises the following steps:
the equation of the straight line BC in step 6.3.1 is:
since AD≡BC, D is the nearest point from A to side BC, the distance from A to BC is:
then D (x) D ,y D ,z D ) The point coordinates are:
step 6.3.2, E (x) E ,y E ,z E ) A point coordinate expression;
the equation for the perpendicular lines AD, BE, step 6.3.3, is:
step 6.3.4, the intersection point of the two perpendicular lines AD and BE is obtained to BE the orthocenter of Δabc, that is, the coordinates (x, y, z) of the sound source S of the unmanned aerial vehicle:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211628718.6A CN116008913A (en) | 2022-12-18 | 2022-12-18 | Unmanned aerial vehicle detection positioning method based on STM32 and small microphone array |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211628718.6A CN116008913A (en) | 2022-12-18 | 2022-12-18 | Unmanned aerial vehicle detection positioning method based on STM32 and small microphone array |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116008913A true CN116008913A (en) | 2023-04-25 |
Family
ID=86033400
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211628718.6A Pending CN116008913A (en) | 2022-12-18 | 2022-12-18 | Unmanned aerial vehicle detection positioning method based on STM32 and small microphone array |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116008913A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117825898A (en) * | 2024-03-04 | 2024-04-05 | 国网浙江省电力有限公司电力科学研究院 | GIS distributed vibration and sound combined monitoring method, device and medium |
-
2022
- 2022-12-18 CN CN202211628718.6A patent/CN116008913A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117825898A (en) * | 2024-03-04 | 2024-04-05 | 国网浙江省电力有限公司电力科学研究院 | GIS distributed vibration and sound combined monitoring method, device and medium |
CN117825898B (en) * | 2024-03-04 | 2024-06-11 | 国网浙江省电力有限公司电力科学研究院 | GIS distributed vibration and sound combined monitoring method, device and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103308889B (en) | Passive sound source two-dimensional DOA (direction of arrival) estimation method under complex environment | |
CN106842128B (en) | The acoustics tracking and device of moving target | |
CN104077498B (en) | A kind of external illuminators-based radar multi-object tracking method of combining target angle | |
CN105044676A (en) | Energy-based sound source localization method | |
CN108614268B (en) | Acoustic tracking method for low-altitude high-speed flying target | |
CN103792513B (en) | A kind of thunder navigation system and method | |
CN111273265B (en) | Single-vector hydrophone autonomous ranging device and method based on DEMON spectrum | |
CN108387867A (en) | A kind of underwater source node localization method | |
CN108761387B (en) | Double-station time difference and frequency difference combined positioning method for fixed radiation source | |
CN108549052A (en) | A kind of humorous domain puppet sound intensity sound localization method of circle of time-frequency-spatial domain joint weighting | |
CN116008913A (en) | Unmanned aerial vehicle detection positioning method based on STM32 and small microphone array | |
CN106802406A (en) | A kind of radiation source correlating method for passive radar | |
CN110132281A (en) | A kind of autonomous acoustic navigation method of underwater high-speed target with high precision based on inquiry answer-mode | |
CN105445732B (en) | The targetpath initial method observed under the conditions of dense clutter using multipath | |
CN110244260B (en) | Underwater target high-precision DOA estimation method based on acoustic energy flow vector compensation | |
CN109254265A (en) | A kind of whistle vehicle positioning method based on microphone array | |
CN106772258B (en) | Radiation source association method used under cooperation of active and passive radars | |
CN111610505A (en) | Airborne bistatic radar STAP algorithm based on exponential form time-varying weighting | |
CN112710984A (en) | Passive positioning method and system based on homotopy continuation | |
RU2305297C2 (en) | Device with correlation shaper of directivity characteristics for detection of signals and determination of direction to their source | |
CN116520247A (en) | Method for estimating the position of a target sound source from hydrophones on an underwater vehicle | |
CN112255590B (en) | Low-altitude sound source inversion positioning method and device based on fuzzy function matching | |
CN110441735A (en) | A kind of low latitude unmanned plane passive acoustics detectiona device and method | |
CN113866771B (en) | Underwater target detection method | |
CN110109087A (en) | A kind of irregular investigative range display methods of sonar and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |