Unmanned aerial vehicle intelligent dynamic obstacle avoidance method and system based on ultrasonic frequency self-adaption
By integrating ultrasonic sensor and IMU data and utilizing CNN-AE and DQN networks for environmental perception and obstacle avoidance decision-making, the obstacle avoidance method for UAVs using ultrasonic frequency adaptation and deep learning solves the ranging error and robustness problems of near-field obstacle avoidance in complex environments, achieving efficient and safe obstacle avoidance.
Patent Information
- Application Number
- CN202511547291.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-28
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2045-10-28
AI Technical Summary
In existing near-field obstacle avoidance technologies for lightweight UAVs in complex environments, fixed-frequency ultrasonic sensors are easily affected by Doppler frequency shift, sensor crosstalk, and multipath echo, leading to ranging errors, false alarms, or missed detections. Furthermore, multimodal perception solutions such as vision and lidar are not robust enough under conditions such as low light and heavy fog and rain, making it difficult to promote them on small platforms.
An intelligent dynamic obstacle avoidance method for UAVs based on ultrasonic frequency adaptation is adopted. Narrow pulse or linear sweep frequency signals are emitted by a digital direct synthesis (DDS) drive device, and echo processing and feature extraction are performed by combining a convolutional neural network (CNN-AE). A deep Q network is used to generate compound actions, and a long short-term memory (LSTM) network is combined for path prediction and obstacle avoidance decision-making. Ultrasonic sensor, IMU and GPS data are integrated for environmental perception and obstacle avoidance.
It significantly improves the near-field perception accuracy and anti-interference capability of UAVs in complex environments, enhances the real-time performance and flight safety of the system, increases obstacle avoidance success rate by 23%, reduces mission time by 38%, reduces energy consumption by 42.9%, and achieves a path tracking error of only 0.23m.
Smart Images

Figure CN121028836A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of unmanned aerial vehicle flight control, and particularly relates to an intelligent dynamic obstacle avoidance method and system for unmanned aerial vehicles based on ultrasonic frequency adaptation. BACKGROUND
[0002] With the wide application of unmanned aerial vehicles in scenarios such as logistics distribution, pipeline inspection and disaster rescue, the demand for safe autonomous flight in complex environments is increasingly prominent. Currently, fixed 40kHz ceramic ultrasonic sensors are generally used for near-field obstacle avoidance of light and small unmanned aerial vehicles, but this fixed frequency scheme is easily affected by Doppler shift, sensor crosstalk and multipath echoes in high-speed flight or multi-vehicle dense scenarios, resulting in ranging errors, false alarms or missed detections. Although multi-modal perception schemes such as vision and laser radar can expand the environmental perception range, they are not easy to popularize on small platforms due to hardware costs, power consumption and insufficient robustness in low light, heavy fog and rain conditions.
[0003] Therefore, it is of great significance to improve the flight safety of light and small unmanned aerial vehicles in complex environments by studying an unmanned aerial vehicle dynamic obstacle avoidance method based on frequency adaptive ultrasonic and deep learning, which can significantly improve the near-field perception accuracy, anti-interference ability and system real-time performance without increasing additional sensors. SUMMARY
[0004] The application provides an unmanned aerial vehicle intelligent dynamic obstacle avoidance method and system based on ultrasonic frequency adaptation, which can significantly improve the near-field perception accuracy, anti-interference ability and system real-time performance without increasing additional sensors, and improve the flight safety of light and small unmanned aerial vehicles in complex environments, in order to overcome the problems in the prior art that the multi-modal perception schemes such as vision and laser radar used in the near-field obstacle avoidance technology of light and small unmanned aerial vehicles are prone to cause insufficient robustness in low light, heavy fog and rain conditions and are not easy to popularize on small platforms due to hardware costs and power consumption.
[0005] In order to achieve the above application purposes, the application adopts the following technical scheme: The unmanned aerial vehicle intelligent dynamic obstacle avoidance method based on ultrasonic frequency adaptation comprises the following steps: S1, when the unmanned aerial vehicle flies along the preset flight route, the flight control system first reads the center frequency output by the deep Q network in the last decision cycle, and triggers the digital direct synthesis DDS driving device to simultaneously emit narrow pulse or linear sweep signal to four wideband ultrasonic transducers; the echo received by the wideband ultrasonic transducer is sampled by an analog-to-digital converter and immediately sent to a convolutional neural network CNN-AE for denoising, enhancement and cross-correlation feature extraction, and the output result is output; the output result is returned to the flight control system with a time stamp as one of the current decision cycle state inputs; the output result contains two key indicators of "closest obstacle distance" and "echo signal-to-noise ratio"; S2, the attitude recognition module synchronously outputs the fused attitude angle, heading angle, velocity and acceleration data. The long short-term memory network makes short-term predictions of the UAV's travel path to obtain the future attitude change trend. The deep Q network integrates the detected ultrasonic features and the future attitude change trend to divide the safe zone, deceleration zone and emergency stop zone, and generates a composite action. The composite action includes the next launch center frequency, a fine yaw angle adjustment amount and a velocity scaling factor. S3, when entering the emergency stop zone, immediately performs braking or climbing maneuvers; when entering the deceleration zone, it reduces speed and detours according to yaw instructions; when in the safe zone, it maintains cruise while feeding back the latest status to the deep learning decision layer of the deep Q network to complete the closed-loop update.
[0006] Preferably, step S1 further includes the following steps: Even minute deviations in the speed of sound (SST) are amplified by the round-trip time difference, directly affecting the accuracy of distance calculation. Therefore, the flight control system needs to read the temperature (T) and relative humidity (H) in each ranging cycle. The speed of sound is then calculated empirically. ; After the transducer is triggered, the timer records the rising edge; when the echo energy exceeds the threshold, an interrupt is triggered, and the timer reading is the round-trip time difference. Substitute the compensated speed of sound (r) into the following formula: ; This will give you the slant distance from the corresponding channel to the obstacle. .
[0007] Left and right ultrasonic sensors are installed on the machine body The baseline length is in both positive and negative directions of the axis. If the slope distances of the two channels are respectively and The lateral coordinates of the obstacle in the plane of the machine can be obtained by the following formula for the intersection of two circles: ; When the UAV is pitching or rolling, the attitude angles provided by the IMU can be used for coordinate rotation correction to prevent geometric calculations from being distorted due to attitude deformation.
[0008] The two ultrasonic sensors are located at the front and rear Positive and negative directions of the axis, baseline Corresponding slope distance , By combining the equations, we can obtain: ; By simultaneously incorporating four ranging equations into a least-squares framework, redundant observations are used to suppress occasional errors in single channels, thereby achieving more stable planar positioning.
[0009] Solving a heading angle Performing attitude decoupling: .
[0010] As preferred, step S1 further comprises the following steps: In the AirSim-PX4 simulation environment, typical scenes such as straight corridors, forests and urban canyons are built, 0.2m-6m near-field obstacles are randomly arranged, and different wind speeds and noise conditions are injected to generate 2000 flight trajectories. Along the trajectory, three types of original sequences are synchronously collected: ultrasonic wave original echo (center frequency automatically switched with distance label); IMU / GPS attitude-velocity data; environment true value label (obstacle distance, collision mark, energy consumption).
[0011] To improve the robustness of the model, ±6dB noise and ±2kHz carrier frequency drift are randomly superimposed on the ultrasonic wave sequence in the offline stage, and ±5% measurement drift and random frame drop are inserted into the attitude-velocity sequence: ; ; Finally, it is expanded to 1.2×10 7 frame data set.
[0012] As preferred, in step S1, the echo received by the wideband ultrasonic transducer is immediately sent to the convolutional neural network CNN-AE for denoising, enhancement and cross-correlation feature extraction after being sampled by an analog-to-digital converter, and the output results include the following steps: The convolutional auto-encoding network CNN-AE is pre-trained using enhanced data, and the network input is an echo window labeled with a dynamic center frequency, and the output is a denoised cross-correlation feature and a distance true value; A "reconstruction error + spectral consistency" joint loss is used: ; wherein, is the overall joint loss, is the number of divided echo windows, is the reconstruction result of the model for the nth echo window, is the weight coefficient of the spectral consistency loss; denotes the L2 norm of the frequency domain amplitude difference.
[0013] After training, the encoding layer is frozen and quantized to FP16 to ensure that the on-board inference delay is less than 5ms. Through the "frequency label-feature alignment" method, the encoder can stably extract effective ranging features in different frequency bands, providing a unified representation for subsequent DQN decision-making.
[0014] The converted data is preprocessed to obtain the current attitude of the unmanned aerial vehicle, autonomously avoid obstacles, and optimize the path.
[0015] The application of the data preprocessing in the unmanned aerial vehicle obstacle avoidance system can significantly improve the data processing effect, enable the system to better process data from different sensors, respond to environmental changes in a timely manner, and improve the safety and stability of the unmanned aerial vehicle flight.
[0016] The six-tuple attitude-velocity data including the fusion of accelerometer, gyroscope, magnetometer, barometer, ultrasonic feature and GPS is input into the double-layer LSTM to predict the attitude change trend in the future 0.5s, and the forget gate judges which historical features are meaningful: ; The typical input gate is updated as follows: ; Through the output gate Expose the information most relevant to safety risks as : ; After offline training for 30 rounds, the same quantization and clipping are performed to control the prediction reasoning delay within 3ms and keep the angle error RMS less than 1.5°.
[0017] The flight control system performs hard synchronization on the ultrasonic and IMU sequences before the data enters the network: ; Ensure the timestamp error ; then use complementary filtering to eliminate low-frequency drift and high-frequency noise: ; And use extended Kalman filter (EKF) to output unified body position and velocity estimation to provide high consistency state quantity for the strategy network.
[0018] As preferred, in step S2, the long short-term memory network performs short-term prediction on the unmanned aerial vehicle travel path to obtain the future attitude change trend, including the following steps: Compress the historical noisy ultrasonic echo into high-dimensional features , ultrasonic measurement distance , signal-to-noise ratio , attitude quaternion, body velocity v and acceleration a, and input them into the long short-term memory network LSTM at the same time, and the forget gate judges the meaningful historical features: ; Among them is the forget gate output, is a Sigmoid activation function, is an input weight matrix, is a recurrent weight matrix, is an output of the LSTM unit at the previous time step, is a bias vector.
[0019] through the output gate exposing the information most relevant to the safety risk as : ; where is the output gate unit state.
[0020] The most useful obstacle avoidance information is automatically refined by using a gating mechanism, so that the DQN (Deep Q Network) has foresight when generating the center frequency and maneuvering instructions.
[0021] As a preferred, in step S2, in the generation process of the composite action, the deep Q network follows the following experience strategy to preliminarily screen the center frequency and fine-tune the network: When the distance between the UAV and the obstacle is greater than 10m, a low frequency band is preferentially selected, which is used to expand the ranging range; the low frequency band refers to 30kHz to 300kHz; When the distance between the UAV and the obstacle is in the range of 1m-10m, the frequency of the ultrasonic wave emitted by the frequency-adjustable ultrasonic driving device gradually increases in a linear interpolation manner with the distance, so as to balance the range and resolution; When the distance between the UAV and the obstacle is in the range of 0.5m-1m, the frequency of the ultrasonic wave emitted by the frequency-adjustable ultrasonic driving device is fixedly used as the highest frequency, and a deceleration or emergency stop instruction is output at the same time, so as to ensure the millimeter-level ranging accuracy and flight safety.
[0022] As a preferred, step S2 further includes the following steps: The UAV is measured in real time by an inertial measurement unit (IMU) to obtain three-axis acceleration and angular velocity of the UAV, and a quaternion integration algorithm is used to calculate the attitude angle of the UAV; the attitude angle includes a pitch angle , a roll angle , and a yaw angle , and the specific formula is as follows: ; ; where is a quaternion derivative, is a quaternion. is a quaternion multiplication. is a quaternion scalar part, , , is a quaternion vector part.
[0023] As preferred, in step S2, the deep Q network adopts a double network structure, including a policy network and a target network; the weight update rule of the policy network and the target network is: ; wherein, is the policy network weight; is the target network weight; is a soft update coefficient.
[0024] As preferred, in step S2, the deep Q network maps the received sensor data to a state vector in the offline stage, and the specific formula is as follows: ; wherein, each parameter is normalized to the interval [0, 1], is the maximum detection distance of the ultrasonic sensor, is the signal-to-noise ratio, is a hidden feature vector, is the remaining battery energy, is the rated battery energy, is the center frequency of the ultrasonic emission used at the last time.
[0025] As preferred, in step S2, the deep Q network is a fully connected neural network, the input layer has 6 nodes (corresponding to the dimension of the state vector), the hidden layer has 128 nodes (ReLU activation), and the output layer has 7 nodes (corresponding to 7 actions) Input layer: 6-dimensional state vector s t → fully connected layer (128 neurons, ReLU activation); Hidden layer: fully connected layer (64 neurons, ReLU activation); Output layer: 7-dimensional action Q value: (corresponding to the action: forward, backward, left, right, up, down, hover).
[0026] The Q value calculation formula is: ; wherein W i , b i are network weights and biases, is the ReLU function.
[0027] As preferred, in the simulation environment construction, the dynamic obstacle motion trajectory is simulated in Gazebo to generate a training data set , and the action is selected using the ε-greedy strategy: ; wherein The initial value is 0.5, and is exponentially attenuated to 0.01 with the training round.
[0028] Performing an action After that, the UAV enters a new state , the sensor reacquires data, and the next decision cycle is started.
[0029] As a preferred, step S2 further comprises the following steps: The reward function is defined as follows: ; wherein, is the immediate reward at time t, , , All are dynamic weights, is the reward for approaching the target point, is the three-axis acceleration of the UAV at the current time; wherein, , , All are dynamic weights, is the reward for approaching the target point; The weights of the dynamic reward function According to the distance of the obstacle Dynamic adjustment is performed to reward the obstacle avoidance behavior to different degrees in different distance ranges to guide the UAV to make optimal decisions in the flight process; the weights of the dynamic reward function are defined as follows: .
[0030] As a preferred, the method further comprises the following steps: S4, when the UAV communication is interrupted, the UAV cannot access the reinforcement learning model of the cloud or the ground station, and needs to rely on the locally stored Q value table to make real-time decisions, the optimal action is selected according to the local Q value table, and the Q value data and the optimal selection formula are as follows: ; .
[0031] wherein is the learning rate, is the maximum expected value of the next state, is the action element, is the best emergency action, is the action memory structure.
[0032] The application also provides an intelligent dynamic obstacle avoidance system for a UAV based on ultrasonic frequency adaptation, comprising: The ultrasonic ranging module includes four ultrasonic ranging sensors and an ultrasonic driving device for driving the emission of ultrasonic waves at different frequencies, with adjustable frequencies. The four ultrasonic ranging sensors are located at the center of the front, rear, left, and right sides of the UAV and are used to read the distance between the UAV and obstacles. They are all electrically connected to the ultrasonic driving device. The attitude recognition module integrates an accelerometer, gyroscope, magnetometer, barometer, and GPS. The accelerometer outputs the component signals of gravity along the three axes of the aircraft coordinate system; the gyroscope outputs the angular velocity signals of the aircraft's rotation around the three axes; the magnetometer outputs the component signals of magnetic field strength along the three axes; and the barometer is used to obtain the UAV's flight altitude. The flight control module is electrically connected to the ultrasonic ranging module and the attitude recognition module. The flight control module includes an embedded microcontroller and a ground station, which are used to process the flight status data measured by the sensors, judge, control and monitor the flight status of the UAV, output control commands to the actuators, and realize the control of various flight modes in the UAV and the management of mission equipment. The emergency control module is used to trigger local decisions based on the Q-value table when communication is interrupted, enabling the drone to fly safely in abnormal situations.
[0033] Compared with the prior art, the present application has the beneficial effects that: (1) the present application constructs a "near-field distance-pose-velocity" three-flow data channel by integrating ultrasonic sensors, global positioning system (GPS) and inertial measurement unit (IMU) and other various sensor data, and realizes comprehensive perception of the surrounding environment of the unmanned aerial vehicle; the data collected are filtered, time stamp aligned and coordinate system unified by using the data preprocessing layer, so that the data quality is effectively improved, and accurate basis is provided for subsequent obstacle avoidance decision; the process uses ultrasonic frequency hopping to suppress co-frequency interference and Doppler shift, so that high-precision ranging can be maintained in the near-field range without laser radar or visual sensor, and the perception reliability and anti-interference ability in complex environment are significantly improved; (2) the ultrasonic ranging sequence in the present application is first denoised, main lobe enhanced and cross-correlation spectrum compressed by CNN-AE, and two types of high-confidence features, "closest obstacle distance" and "echo signal-to-noise ratio", are directly output, so as to provide unified and scale-invariant near-field representation for the subsequent decision; the network can adaptively extract effective information under different transmission frequency bands and background noise conditions, avoiding the dependence of traditional threshold or cross-correlation algorithm on manual parameter adjustment, so as to ensure the stability of ranging in various complex acoustic environments; the denoising ranging and signal-to-noise ratio output by CNN-AE are spliced into the input sequence of LSTM, and are driven together with the body acceleration, angular velocity, heading and position data to drive the double-layer circulation unit; LSTM explicitly remembers the short history by means of the gating structure, continuously perceives the obstacle approaching rate while predicting the evolution of the next period of pose and velocity, and realizes the integrated time coding of "motion trend + near-field risk"; the prediction vector and the current ultrasonic feature are jointly input into the deep Q network to generate a composite action containing the next transmission frequency, yaw angle fine adjustment and velocity scaling, so that the obstacle avoidance strategy can be adjusted smoothly in advance; (3) by the information flow of CNN-AE→LSTM→DQN, high-quality environment representation, forward-looking maneuver prediction and adaptive frequency scheduling can be obtained without introducing laser radar or visual sensor, and the autonomous obstacle avoidance safety and task completion efficiency of the light and small unmanned aerial vehicle in the complex near-field environment are significantly improved. BRIEF DESCRIPTION OF DRAWINGS
[0034] Figure 1 A structural flowchart of the unmanned aerial vehicle dynamic obstacle avoidance method in the present application; Figure 2 A schematic diagram of the sound field distribution of ultrasonic waves of different frequencies and the spatial range that can be detected; Figure 3 A path optimization diagram of the unmanned aerial vehicle dynamic obstacle avoidance method in the present application; Figure 4 A performance comparison diagram of the method of the present application and the traditional method. DETAILED DESCRIPTION
[0035] In order to more clearly illustrate the embodiments of the present application, the specific embodiments of the present application will be described below with reference to the drawings. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained according to these drawings and other embodiments can also be obtained without creative labor for those skilled in the art.
[0036] As shown in the drawings, Figure 1 The present application provides an unmanned aerial vehicle intelligent dynamic obstacle avoidance method based on ultrasonic frequency adaptation, comprising the following steps: Step one, real-time monitoring of the position and distance of static obstacles by ultrasonic sensors, adjusting the frequency of ultrasonic emission. Using barometer equipment to detect the environment of the unmanned aerial vehicle in real time, and providing the attitude, acceleration and angular velocity of the unmanned aerial vehicle through the inertial sensor, realizing the comprehensive perception of the environment around the unmanned aerial vehicle and pre-processing the data.
[0037] Step two, two-stage mode of offline training and online updating by CNN-AE and LSTM decision engine, generating obstacle avoidance path, dynamically adjusting flight strategy according to real-time environment.
[0038] Step three, through the dynamic priority reward function, the reward weight is adaptively adjusted according to the distance of the obstacle, guiding the unmanned aerial vehicle to make the optimal decision and path optimization in the flight process.
[0039] Step four, through the emergency control module, triggering local decision based on Q value table when communication is interrupted, ensuring that the unmanned aerial vehicle can still fly safely in abnormal conditions.
[0040] In step one, one TDK CH-201 (working bandwidth 18kHz-100kHz, maximum range 5m) is used in front and back, and one SensComp 600-1120 (center 120kHz, narrow beam high resolution) is used in left and right. Four transducers are driven by AnalogDevices AD9833 12-bit DDS chip, which can continuously sweep frequency between 16kHz-130kHz; In step one, BMI088 six-axis IMU is used, with accelerometer range ±8g, angular velocity meter range ±2000° / s, and sampling frequency 200Hz.
[0041] In step one, BMP388 barometer (resolution 0.01hPa, height accuracy ±0.5m).
[0042] In step one, the slight deviation of sound speed c will be amplified by the round-trip time difference and directly affect the distance calculation accuracy. Therefore, the flight control needs to read the temperature T and relative humidity H at the beginning of each ranging period. Then the sound speed is calculated according to the empirical formula: ; In step one, the timer records the rising edge after the transducer is triggered; the echo energy crosses the threshold to trigger an interrupt, and the timer reading is the round-trip time . Substitute the compensated sound speed c into the following formula: ; The slant range of the corresponding channel to the obstacle can be obtained.
[0043] The left and right ultrasonic sensors are installed on the body axis in positive and negative directions, with a baseline length of . If the slant ranges of the two channels are and , the lateral coordinates of the obstacle in the body plane can be obtained from the intersection of the following two circles: ; When the UAV has pitch or roll, the attitude angle given by the IMU can be used for coordinate rotation correction to prevent geometric solution from distortion due to attitude deformation.
[0044] The front and rear ultrasonic sensors are located on the axis in positive and negative directions, with a baseline . The corresponding slant ranges are , Solving the equations simultaneously gives: ; Put the four ranging equations into the least squares framework at the same time, use redundant observations to suppress single-channel accidental errors, and realize more stable plane positioning.
[0045] Solve the heading angle to decouple the attitude: ; In step one, the HC-SR04 ultrasonic sensor (range 0.02-4m, accuracy ±2cm) and BMP388 barometer (resolution 0.01hPa, height accuracy ±0.5m) are used in the ultrasonic and barometer height fusion sensor.
[0046] In step one, the data preprocessing of the ultrasonic and barometer height fusion sensor uses the fusion formula: ; where is the confidence weight, is the fusion with barometer data, is the barometer data fusion, is the ultrasonic data collection.
[0047] Further, the confidence weight satisfies the following conditions: ; In step one, the ultrasonic wave and the barometer height fusion sensor measured the true height of 1.5m, the ultrasonic wave measured 1.48m, the barometer measured 1.6m, and the fusion value was 1.51m (error <0.7%); In step one, BMI088 six-axis IMU was used, with an accelerometer range of ±8g, an angular velocity range of ±2000° / s, and a sampling frequency of 200Hz.
[0048] In step one, the IMU measured the three-axis acceleration and angular velocity of the unmanned aerial vehicle in real time. The attitude angle of the unmanned aerial vehicle was calculated by means of quaternion integral algorithm, including pitch angle , roll angle , and yaw angle , and the specific formula was as follows: ; In step one, the IMU measured the actual pitch angle of the unmanned aerial vehicle as 10°, and the IMU calculated value was 9.8° (error <2%).
[0049] In step one, the state positioning of the unmanned aerial vehicle was carried out by Kalman filter, and the state vector was obtained by state prediction (IMU pre-integration): ; Among them is the process noise .
[0050] In step two, the wideband ultrasonic array transmitted narrow pulse or sweep signal under the center frequency f t given by the flight control module, and the echo was sampled by the analog-to-digital converter and input into the convolution auto-encoding network (CAE). After multi-layer convolution-pooling, the latent vector was obtained: ; ; The "reconstruction error + spectral consistency" joint loss was used: ; The network outputs the nearest obstacle distance and echo signal-to-noise ratio .
[0051] In step two, the inertial measurement unit (IMU) collected three-axis acceleration and angular velocity in real time. The sensor time stamp was synchronized by hardware and met the following requirements: ; Mahony filter closes the error loop between the "fast loop" attitude integrated from angular velocity and the "slow loop" attitude calculated from acceleration / magnetic force sensor in quaternion domain: ; The compensated angular velocity is used to quaternion differentiation: ; The new attitude quaternion is obtained after integration and forced to be normalized to eliminate numerical drift.
[0052] The state and covariance are corrected using extended Kalman filter (EKF): ; The position, velocity and attitude in the unified coordinate system are obtained by fusing Mahony filter and EKF. The attitude angle is calculated by quaternion integration, and the pitch angle formula is as follows: ; In step two, denoising distance dultra, signal-to-noise ratio And IMU / GPS six-tuple form an 11-dimensional sequence xt, input double-layer long short-term memory network (LSTM).
[0053] The gating calculation of double-layer LSTM at time step t: ; Similarly, forget gate , output gate , candidate memory ; internal state and output: ; And the CNN-AE network output hidden vector ht is spliced to represent the future short-time attitude and near-field trend. Then the state vector is constructed: ; In step two, the distance of the test scene obstacle is 15m, the speed is 5m / s, the remaining power is 6000mAh, and the target point deviation is 50m. The state vector is obtained: ; In step two, as shown in Figure 2 , when the distance between the unmanned aerial vehicle and the obstacle is greater than 10m (corresponding to the position a in Figure 2 ), the low frequency band is preferentially selected to expand the ranging range; the low frequency band refers to 30kHz to 300kHz; When the distance between the unmanned aerial vehicle and the obstacle is in the range of 1m-10m (corresponding to Figure 2The frequency of the ultrasonic wave emitted by the frequency-adjustable ultrasonic driving device gradually increases in a linear interpolation manner with the distance, so as to balance the range and resolution. When the distance between the UAV and the obstacle is in the range of 0.5m-1m (corresponding to the c position in FIG. 6) Figure 2 The frequency of the ultrasonic wave emitted by the frequency-adjustable ultrasonic driving device is the highest frequency, and a deceleration or emergency stop command is output at the same time, so as to ensure the millimeter-level ranging accuracy and flight safety.
[0054] In step three, the deep Q network takes as the input and outputs a composite action . Among them the next period transducer frequency hopping is driven by DDS; and vscale is written into the flight control module to complete the heading and speed fine tuning. The flight control module continuously compares with the safety threshold: if it enters the emergency stop area, it will brake or climb immediately, if it is in the deceleration area, it will smoothly bypass, and if it is in the safety area, it will keep cruising.
[0055] In step three, the reward function design equation is: ; Among them, , , are dynamic weights, and the reward for approaching the target point.
[0056] Further, the reward function dynamic weight adjustment rule is as follows: ; In step three, the near-distance obstacle scene test is performed: d obs =1.5m, the reward r t =2.0 / 1.5-0.1*1.2+0.3*0.3=1.21. The UAV selects the emergency climbing action and successfully avoids obstacles.
[0057] Further, the long-distance target approach scene test is performed: =20m, the reward r t =0.5 / 10-0.1*0.5+0.3*0.2=0.06. The UAV prefers to fly straight, and the path efficiency is improved by 15%.
[0058] In step three, the execution result and the immediate reward r tThe data is written into an experience replay pool for periodic fine-tuning of the policy network weights, enabling online adaptation. A dynamic priority reward function guides the UAV to make optimal decisions and optimize paths during flight. Implementation status input: 8ms processing time per frame. IMU: 200Hz, attitude calculation latency 1ms. Decision-to-execution latency is 22ms (meeting the ≤50ms requirement). In a 10Hz sudden obstacle test, the obstacle avoidance success rate is 98.7%.
[0059] In step four, the emergency module communication interruption detection and mode switching trigger conditions are: no heartbeat signal is received from the ground station for 5 consecutive communication cycles (cycle = 100ms), and the 4G / 5G signal strength is < -100dBm.
[0060] Further, construct and query the local Q-value table: ; ; Furthermore, local path replanning, Q-value-guided path generation: starting from the current state s t Starting from the beginning, search the Q-value table for a sequence of actions to be taken in the next 3 steps {a}. t ,a t+1 ,a t+2 Choose the path with the highest cumulative reward: ; Ultimately, to obtain Figure 3 The path optimization results shown clearly demonstrate that the optimized path is shorter than the original path, improving flight efficiency, reducing mission time, and also reducing energy consumption.
[0061] In addition, the present invention also provides an intelligent dynamic obstacle avoidance system for unmanned aerial vehicles based on ultrasonic frequency adaptation, comprising: The ultrasonic ranging module includes four ultrasonic ranging sensors and an ultrasonic driving device for driving the emission of ultrasonic waves at different frequencies, with adjustable frequencies. The four ultrasonic ranging sensors are located at the center of the front, rear, left, and right sides of the UAV and are used to read the distance between the UAV and obstacles. They are all electrically connected to the ultrasonic driving device. The attitude recognition module integrates an accelerometer, gyroscope, magnetometer, barometer, and GPS. The accelerometer outputs the component signals of gravity along the three axes of the aircraft coordinate system; the gyroscope outputs the angular velocity signals of the aircraft's rotation around the three axes; the magnetometer outputs the component signals of magnetic field strength along the three axes; and the barometer is used to obtain the UAV's flight altitude. The flight control module is electrically connected with the ultrasonic ranging module and the attitude recognition module respectively; the flight control module comprises an embedded single-chip microcomputer and a ground station, is used for processing flight state data measured by sensors, judging, controlling and monitoring flight conditions of the unmanned aerial vehicle, outputting control instructions to an executing mechanism, and realizing control of various flight modes in the unmanned aerial vehicle and management of a task device. The emergency control module is used for triggering local decision based on a Q value table when communication is interrupted, so that the unmanned aerial vehicle can fly safely under abnormal conditions.
[0062] The application provides a kind of unmanned aerial vehicle dynamic obstacle avoidance method based on frequency adaptation and deep learning, realizes efficient autonomous obstacle avoidance by multi-source sensor fusion and double network DQN architecture. The system adopts ultrasonic sensor and IMU data to construct normalized state vector, uses CNN-AE to complete end-to-end denoising and cross-correlation enhancement on original echo, and outputs near-field distance and signal-to-noise ratio. Then, with the help of Mahony complementary filter and multiplication type EKF, inertial, magnetic and satellite data are fused to obtain high confidence attitude and speed estimation. Combined with dynamic weight reward function, the balance of obstacle avoidance safety, path efficiency and energy optimization. Double network structure (policy network + target network) improves training stability through soft update, as shown in Figure 4 The measured obstacle avoidance success rate of the application reaches 96.2%, which is 23% higher than that of the traditional method. The online decision-making stage delay is ≤22ms, the task time is shortened by 38%, the energy consumption is reduced by 42.9%, and the path tracking error is only 0.23m. The scheme has high robustness, real-time and energy efficiency, and provides a reliable unmanned aerial vehicle flight obstacle avoidance solution for logistics, inspection and other fields.
[0063] The above only describes the preferred embodiments and principles of the application in detail. For ordinary skilled persons in the art, according to the idea provided by the application, there will be changes in specific implementation, and these changes should be regarded as the protection scope of the application.
Claims
1. A method for intelligent dynamic obstacle avoidance of unmanned aerial vehicles based on ultrasonic frequency adaptation, characterized in that, Includes the following steps; S1. When the UAV flies along the preset route, the flight control system first reads the center frequency of the deep Q network output in the previous decision cycle and triggers the digital direct synthesis (DDS) drive device to simultaneously transmit narrow pulse or linear sweep frequency signals to four broadband ultrasonic transducers. The echoes received by the broadband ultrasonic transducers are sampled by the analog-to-digital converter and immediately sent to the convolutional neural network CNN-AE to complete denoising, enhancement and cross-correlation feature extraction, and output the results. S2, the attitude recognition module synchronously outputs the fused attitude angle, heading angle, velocity and acceleration data, the long short-term memory network makes short-term predictions of the UAV's travel path to obtain the future attitude change trend; the deep Q network integrates the detected ultrasonic features and the future attitude change trend to divide the safe zone, deceleration zone and emergency stop zone, and generate compound actions; S3, when entering the emergency stop zone, immediately performs braking or climbing maneuvers; when entering the deceleration zone, it reduces speed and detours according to yaw instructions; when in the safe zone, it maintains cruise while feeding back the latest status to the deep learning decision layer of the deep Q network to complete the closed-loop update.
2. The intelligent dynamic obstacle avoidance method for unmanned aerial vehicles based on ultrasonic frequency adaptation according to claim 1, characterized in that, In step S1, the echo received by the broadband ultrasonic transducer is sampled by an analog-to-digital converter and immediately fed into a convolutional neural network (CNN-AE) to complete denoising, enhancement, and cross-correlation feature extraction, and the output results include the following steps: The convolutional autoencoder network CNN-AE is pre-trained using augmented data. The network input is an echo window with a dynamic center frequency label, and the output is denoised cross-correlation features and ground truth distance values. Using a combined loss of "reconstruction error + spectral consistency": ; in, For the overall joint loss, The number of echo windows after division. This represents the reconstruction result of the model for the nth echo window. These are the weighting coefficients for the spectral consistency loss; The L2 norm represents the amplitude difference in the frequency domain.
3. The intelligent dynamic obstacle avoidance method for unmanned aerial vehicles based on ultrasonic frequency adaptation according to claim 2, characterized in that, In step S2, the Long Short-Term Memory network makes short-term predictions of the UAV's travel path to obtain future attitude change trends, including the following steps: Compressing historically noisy ultrasound echoes into high-dimensional features Ultrasonic distance measurement Signal-to-noise ratio The attitude quaternion, the body velocity v, and the acceleration a are simultaneously input into the Long Short-Term Memory (LSTM) network, and meaningful historical features are identified through the forget gate. ; in, Output for the forget gate. It is the Sigmoid activation function. For the input weight matrix, This is a cyclic weight matrix. This is the output of the LSTM unit from the previous moment. It is the bias vector; Through the output gate Expose the information most relevant to security risks : ; in, This indicates the output gate unit state.
4. The intelligent dynamic obstacle avoidance method for unmanned aerial vehicles based on ultrasonic frequency adaptation according to claim 3, characterized in that, In step S2, during the generation of compound actions, the deep Q-network follows the following empirical strategy to perform initial screening of the center frequency and fine-tuning of the network: When the distance between the drone and the obstacle is greater than 10m, the low frequency band is selected first to expand the ranging range; the low frequency band refers to 30kHz to 300kHz. When the distance between the drone and the obstacle is in the range of 1m-10m, the frequency of the ultrasonic wave emitted by the frequency-adjustable ultrasonic drive device gradually increases with the distance in a linear interpolation manner. When the distance between the drone and the obstacle is within the range of 0.5m-1m, the frequency-adjustable ultrasonic drive device emits sound waves at the fixed highest frequency and simultaneously outputs deceleration or emergency stop commands.
5. The intelligent dynamic obstacle avoidance method for unmanned aerial vehicles based on ultrasonic frequency adaptation according to claim 4, characterized in that, Step S2 also includes the following steps: Real-time measurements of the UAV's three-axis acceleration are obtained using an inertial measurement unit (IMU). With angular velocity The attitude angles of the UAV are calculated using a quaternion integration algorithm; these attitude angles include pitch angles. Roll angle Yaw angle .
6. The intelligent dynamic obstacle avoidance method for unmanned aerial vehicles based on ultrasonic frequency adaptation according to claim 5, characterized in that, In step S2, the deep Q-network adopts a dual-network structure, including a policy network and a target network; the weight update rules for the policy network and the target network are as follows: ; in, For policy network weights; For target network weights; This is the soft update coefficient.
7. The intelligent dynamic obstacle avoidance method for unmanned aerial vehicles based on ultrasonic frequency adaptation according to claim 6, characterized in that, In step S2, the deep Q-network maps the received sensor data into state vectors during the offline phase. The specific formula is as follows: ; Among them, each parameter is normalized to the [0,1] interval. This represents the maximum detection distance of the ultrasonic sensor. For signal-to-noise ratio, To hide the feature vector, For the remaining energy of the battery, For the battery's rated energy, The frequency of the ultrasonic transmission center used in the previous moment.
8. The intelligent dynamic obstacle avoidance method for unmanned aerial vehicles based on ultrasonic frequency adaptation according to claim 7, characterized in that, Step S2 also includes the following steps: The reward function is defined as follows: ; in, The instant reward at time t, , , All are dynamic weights. The reward is for getting closer to the target point. The three-axis acceleration of the drone at the current moment; Weights of the dynamic reward function Based on the distance between the drone and the obstacle Dynamic adjustments are made to reward obstacle avoidance behavior at different distances, thereby guiding the drone to make optimal decisions during flight.
9. The intelligent dynamic obstacle avoidance method for unmanned aerial vehicles based on ultrasonic frequency adaptation according to claim 8, characterized in that, It also includes the following steps: S4. When drone communication is interrupted, select the optimal action based on the local Q-value table. The Q-value data and the optimal selection formula are as follows: ; ; in, For learning rate, This represents the maximum expected value of the next state. For optimal emergency response, It is a motor memory structure.
10. An intelligent dynamic obstacle avoidance system for unmanned aerial vehicles (UAVs) based on ultrasonic frequency adaptation, used to implement the intelligent dynamic obstacle avoidance method for UAVs based on ultrasonic frequency adaptation as described in any one of claims 1-9, characterized in that, The ultrasonic frequency adaptive unmanned aerial vehicle (UAV) intelligent dynamic obstacle avoidance system includes: The ultrasonic ranging module includes four ultrasonic ranging sensors and an ultrasonic driving device for driving the emission of ultrasonic waves at different frequencies, with adjustable frequencies. The four ultrasonic ranging sensors are located at the center of the front, rear, left, and right sides of the UAV and are used to read the distance between the UAV and obstacles. They are all electrically connected to the ultrasonic driving device. The attitude recognition module integrates an accelerometer, gyroscope, magnetometer, barometer, and GPS. The accelerometer outputs the component signals of gravity along the three axes of the aircraft coordinate system; the gyroscope outputs the angular velocity signals of the aircraft's rotation around the three axes; the magnetometer outputs the component signals of magnetic field strength along the three axes; and the barometer is used to obtain the UAV's flight altitude. The flight control module is electrically connected to the ultrasonic ranging module and the attitude recognition module. The flight control module includes an embedded microcontroller and a ground station, which are used to process the flight status data measured by the sensors, judge, control and monitor the flight status of the UAV, output control commands to the actuators, and realize the control of various flight modes in the UAV and the management of mission equipment. The emergency control module is used to trigger local decisions based on the Q-value table when communication is interrupted, enabling the drone to fly safely in abnormal situations.
Citation Information
Patent Citations
Unmanned aerial vehicle flight control system and method with precise positioning and autonomous obstacle avoidance
CN120255563A
Electric power unmanned aerial vehicle obstacle avoidance method and system based on multi-modal perception and reinforcement learning
CN120610568A
Bionic-vision multi-source-information unmanned intelligent sensing platform
WO2024109002A1
Cited By
Mooring unmanned aerial vehicle based on ultrasonic positioning and control method thereof
CN121254873A
A tethered unmanned aerial vehicle based on ultrasonic positioning and a control method thereof
CN121254873B
Unmanned aerial vehicle self-noise dynamic cancellation and target sound enhancement method based on diffusion model
CN121617380A
Unmanned aerial vehicle self-noise dynamic cancellation and target sound enhancement method based on diffusion model
CN121617380B
Agricultural machine chassis attitude dynamic estimation system based on multi-sensor fusion
CN121657726A
