An automatic obstacle avoidance system based on ultrasonic detection
Through the combination of multi-frequency ultrasonic detection and reinforcement learning algorithms, efficient and intelligent obstacle avoidance in complex environments is achieved, and the detection accuracy and strategy adjustment problems of existing obstacle avoidance systems under noise interference and environmental changes are solved, and the reliability and adaptability of obstacle avoidance systems are improved.
Patent Information
- Application Number
- CN202510536313.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2045-04-27
AI Technical Summary
The existing obstacle avoidance system has low detection accuracy in complex environments, is susceptible to noise interference, and lacks flexibility and intelligence, making it difficult to dynamically adjust obstacle avoidance strategies according to obstacle type and motion state, resulting in low obstacle avoidance efficiency.
Multi-frequency ultrasonic detection technology is adopted, and the transmission frequency of ultrasonic signals is automatically adjusted according to the environmental noise level through a frequency adjustment mechanism, and combined with reinforcement learning algorithms to generate optimized obstacle avoidance paths, dynamically adjust obstacle avoidance strategies, and combine environmental data and obstacle information to generate a reliable obstacle avoidance data foundation.
It significantly improves detection accuracy and anti-interference ability, ensures efficient obstacle avoidance in complex environments, reduces task interruptions, and improves obstacle avoidance efficiency and task execution success rate.
Smart Images

Figure CN120066055B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of ultrasonic ranging, and particularly to an automatic obstacle avoidance system based on ultrasonic detection. Background Art
[0002] With the continuous development of smart home devices, autonomous mobile devices such as sweep and wash integrated machines are increasingly widely used in daily life. Such devices need to have a reliable obstacle avoidance function to successfully complete tasks in complex home environments. Early obstacle avoidance systems mostly used simple infrared sensors, which had a short detection distance, low accuracy, and were easily interfered by factors such as environmental light. It was difficult to accurately identify the distance, material, and orientation of obstacles in complex environments and could not meet the requirements of efficient obstacle avoidance for devices. Later, although there were obstacle avoidance systems using ultrasonic sensors, most of them used ultrasonic signals with a fixed frequency for detection and could not effectively adjust to ensure detection accuracy in the face of environments with different noise levels.
[0003] In addition, existing obstacle avoidance strategies often lack flexibility and intelligence. When planning an obstacle avoidance path, they do not fully consider the type, motion state of obstacles, and changes in environmental data, and it is difficult to dynamically adjust the obstacle avoidance strategy according to the actual situation, resulting in low obstacle avoidance efficiency and frequent interruption of task execution. Summary of the Invention
[0004] In view of the deficiencies of the prior art, this application provides an automatic obstacle avoidance system based on ultrasonic detection, which includes: a detection and processing module, an obstacle avoidance decision module, and a motion control module;
[0005] The detection and processing module includes at least three ultrasonic sensors, which are respectively arranged at the front end, left end, and right end of the target device, and are used to emit ultrasonic signals and receive reflected signals to detect the distance, material, and orientation of obstacles around the target device. The ultrasonic sensors automatically adjust the emission frequency of the ultrasonic signals according to the environmental noise level through a frequency adjustment mechanism;
[0006] The obstacle avoidance decision module is used to determine the distance, material, and orientation of the obstacle based on the time difference and intensity difference of the ultrasonic signals, generate an obstacle avoidance path in combination with environmental data, and dynamically adjust the obstacle avoidance strategy according to the type and motion state of the obstacle;
[0007] The motion control module is used to convert the obstacle avoidance strategy into control instructions for the components of the target device, execute the tasks of the target device during obstacle avoidance, and adjust the moving speed of the target device according to the distance of the obstacle.
[0008] As an optional implementation manner, the obstacle avoidance strategy includes:
[0009] Based on the time difference and intensity difference of the ultrasonic signals, determine the distance, material, and orientation of the obstacle;
[0010] Optimize the obstacle avoidance path by combining environmental data through a reinforcement learning algorithm;
[0011] Dynamically adjust the obstacle avoidance strategy according to the type and motion state of the obstacle.
[0012] As an alternative implementation, the logic for determining the distance, material, and orientation of the obstacle includes:
[0013] Record the timestamp of the transmitted signal and the timestamp of the reflected signal, calculate the time difference of the ultrasonic signal, and calculate the distance of the obstacle based on the propagation speed of the ultrasonic signal;
[0014] Measure the intensity of the transmitted signal and the intensity of the reflected signal, calculate the intensity difference of the ultrasonic signal, and identify the material of the obstacle based on the intensity difference of the ultrasonic signal;
[0015] Through multiple ultrasonic sensors arranged at the front end, left end, and right end of the target device, cooperate to calculate the azimuth angle of the obstacle, and calculate the orientation of the obstacle by combining the distance data of multiple sensors through triangulation.
[0016] As an alternative implementation, the logical steps of the reinforcement learning algorithm include:
[0017] Determine the state space as the environmental data set of the target device, including obstacle position, ground material, and environmental noise level;
[0018] Determine the action space as the control instruction set of the target device, including forward, backward, turning, and spinning in place;
[0019] Design a reward function to give rewards according to the task execution efficiency and obstacle avoidance effect;
[0020] Train the model through the reinforcement learning algorithm to generate an optimized obstacle avoidance path.
[0021] As an alternative implementation, the logic for dynamically adjusting the obstacle avoidance strategy includes:
[0022] Identify the type of the obstacle, including static obstacles, dynamic obstacles, and movable obstacles;
[0023] Analyze the motion state of the obstacle, including the motion trajectory and motion speed of the obstacle;
[0024] Select an obstacle avoidance strategy according to the type and motion state of the obstacle, including a detour strategy, a predicted trajectory strategy, and a user prompt strategy.
[0025] As an alternative implementation, the sub-logic for identifying the type of the obstacle includes:
[0026] Judge whether the position of the obstacle is fixed for a long time through the fusion of multiple sensor data;
[0027] Detect the change amount of the obstacle position by comparing multi-frame sensor data, and judge whether the change amount of the obstacle position is greater than the change threshold;
[0028] Judge whether there is uncertainty in the sensor data through the calculation of the information entropy of the sensor data.
[0029] As an alternative implementation, the sub-logic for analyzing the motion state of the obstacle includes:
[0030] Predict the motion trajectory of the obstacle through a trajectory fitting algorithm based on multi-frame sensor data;
[0031] Calculate the motion speed of the obstacle through the displacement difference and time difference between two adjacent frames of sensor data.
[0032] As an alternative implementation, the conversion logic of the control instruction for the target device component includes:
[0033] Analyze the obstacle avoidance path into the differential value of the drive wheel to generate a control instruction for the drive wheel;
[0034] Analyze the obstacle avoidance path into the rotation speed parameter of the motor to generate a control instruction for the motor;
[0035] Regularly receive sensor data and dynamically update the control instruction for the target device component.
[0036] As an alternative implementation, the frequency adjustment mechanism includes:
[0037] Real-time monitor the environmental noise level, perform spectral analysis on the environmental noise data, and quantify the environmental noise level to obtain the environmental noise level;
[0038] According to the environmental noise level, dynamically adjust the transmission frequency of the ultrasonic signal through an adaptive algorithm;
[0039] Filter and denoise the received reflected signal.
[0040] As an alternative implementation, the logical steps of the adaptive algorithm include:
[0041] Select a frequency adjustment strategy according to the environmental noise level;
[0042] Through a feedback control mechanism, real-time adjust the transmission frequency of the ultrasonic signals of multiple ultrasonic sensors.
[0043] As an alternative implementation, the logical steps of the signal special reconstruction include:
[0044] Normalize the received reflected signal and extract the signal features of the reflected signal to construct a signal vector;
[0045] Train a signal reconstruction model based on the signal vector to output the reconstructed reflected signal;
[0046] Fuse the reconstructed reflected signal and the received reflected signal to obtain the final reflected signal;
[0047] Regularly evaluate the effect of signal special reconstruction.
[0048] Compared with the prior art, the beneficial effect of this application is that through the frequency adjustment mechanism, the transmission frequency of the ultrasonic signal can be automatically adjusted according to the environmental noise level, and combined with the multi-frequency detection technology, the detection accuracy and anti-interference ability are significantly improved, providing a reliable data basis for accurate obstacle avoidance.
[0049] The obstacle avoidance decision module is based on the reinforcement learning algorithm, combines environmental data and obstacle information, generates an optimized obstacle avoidance path, and can dynamically adjust the obstacle avoidance strategy according to the type and motion state of the obstacle, which enables the target device to efficiently and intelligently avoid obstacles in the face of various complex situations, reduce task interruptions, and improve the obstacle avoidance efficiency and the success rate of task execution.
[0050] The motion control module can accurately convert the obstacle avoidance strategy into control instructions for the components of the target device. By adjusting the differential value of the drive wheels and the rotational speed parameters of the motor, smooth steering and efficient task execution of the target device are achieved. At the same time, the control instructions are dynamically updated according to the sensor data to form a closed-loop control, ensuring that the target device can respond to environmental changes in real time, and improving the adaptability and reliability of the target device. Brief Description of the Drawings
[0051] In order to more clearly illustrate the technical solutions of the embodiments of this application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of this application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts. Among them:
[0052] Figure 1 It is the system structure diagram of an automatic obstacle avoidance system based on ultrasonic detection provided by the embodiment of this application;
[0053] Figure 2 It is the logic diagram for determining the distance, material, and orientation of obstacles of an automatic obstacle avoidance system based on ultrasonic detection provided by the embodiment of this application;
[0054] Figure 3It is a logic step diagram of a reinforcement learning algorithm for an automatic obstacle avoidance system based on ultrasonic detection provided by an embodiment of the present application;
[0055] Figure 4 It is a logic diagram for dynamically adjusting an obstacle avoidance strategy of an automatic obstacle avoidance system based on ultrasonic detection provided by an embodiment of the present application;
[0056] Figure 5 It is a sub-logic diagram for identifying the type of obstacles of an automatic obstacle avoidance system based on ultrasonic detection provided by an embodiment of the present application. Detailed implementation manners
[0057] To make the objectives, technical solutions, and advantages of the embodiments of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings of the specification. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments.
[0058] As Figure 1 shown, an embodiment of the present application provides a system structure diagram of an automatic obstacle avoidance system based on ultrasonic detection. The system includes a detection and processing module, an obstacle avoidance decision-making module, a motion control module, and an energy management module.
[0059] Here, a floor washing and sweeping machine is used to represent the target device, and the task of the target device is a cleaning task.
[0060] The detection and processing module includes at least three ultrasonic sensors, which are respectively arranged at the front end, the left end, and the right end of the target device, and are used for transmitting ultrasonic signals and receiving reflected signals to detect the distance, material, and orientation of obstacles around the target device. The ultrasonic sensors automatically adjust the transmission frequency of the ultrasonic signals according to the ambient noise level through a frequency adjustment mechanism.
[0061] The frequency adjustment mechanism includes:
[0062] Real-time monitoring of the ambient noise level, and performing spectral analysis on the ambient noise data to quantify the ambient noise level to obtain the ambient noise grade;
[0063] According to the ambient noise grade, dynamically adjusting the transmission frequency of the ultrasonic signals through an adaptive algorithm;
[0064] Performing signal special reconstruction on the received reflected signals.
[0065] The ambient noise level refers to the intensity of interfering sound waves existing in the environment, which comes from electrical appliances, human voices, or other devices and will affect the detection accuracy of ultrasonic signals. Therefore, it is necessary to real-time monitor the ambient noise level to dynamically adjust the transmission frequency of ultrasonic signals. The ambient noise level is obtained by quantifying the ambient noise data through spectral analysis.
[0066] A digital microphone is configured on the integrated sweeping and mopping machine, with a sampling rate of 48 kHz and a dynamic range of 30 dB to 120 dB. The digital microphone works synchronously with the ultrasonic sensor to avoid signal interference, collects environmental noise data at a frequency of 10 times per second, with each sampling duration of 10 ms, and obtains environmental noise data in real time, providing a basis for subsequent spectrum analysis and frequency adjustment.
[0067] Perform a fast Fourier transform on the obtained environmental noise data, extract the main frequency components of the environmental noise data, such as 50 Hz to 10 kHz, and calculate the noise energy distribution to identify the proportion of high-frequency noise and low-frequency noise, where 5 kHz is the basis for dividing high-frequency noise and low-frequency noise; divide the environmental noise level into three environmental noise levels through the noise intensity, including low noise, medium noise, and high noise respectively. Among them, low noise refers to environmental noise data less than or equal to 60 dB, mainly low-frequency noise, medium noise refers to environmental noise data greater than 60 dB and less than 80 dB, which is a mixed frequency, and high noise refers to environmental noise data greater than or equal to 80 dB, mainly high-frequency noise. By quantifying the environmental noise level, it provides clear input parameters for adaptive frequency adjustment.
[0068] Dynamically adjust the transmission frequency of the ultrasonic signal according to the environmental noise level and the quality of the ultrasonic signal to improve the detection accuracy and anti-interference ability of the integrated sweeping and mopping machine. In a low-noise environment, set the transmission frequency of the ultrasonic signals of the three ultrasonic sensors (front end, left end, and right end) to 40 kHz to reduce power consumption and signal attenuation; in a medium-noise environment, set the transmission frequency of the ultrasonic signals of the three ultrasonic sensors (front end, left end, and right end) to 60 kHz to balance the detection accuracy and anti-interference ability of the integrated sweeping and mopping machine; while in a high-noise environment, set the transmission frequency of the ultrasonic signals of the three ultrasonic sensors (front end, left end, and right end) to 80 kHz to improve signal penetration and anti-interference ability; dynamically fine-tune the transmission frequency of the ultrasonic signal according to the signal-to-noise ratio of the received ultrasonic signal. The actual signal-to-noise ratio of the ultrasonic signal is obtained by the ratio of the intensity of the received ultrasonic signal to the noise intensity. When the signal-to-noise ratio of the ultrasonic signal is less than 20 dB, increase the transmission frequency by 10%, and when the signal-to-noise ratio of the ultrasonic signal is greater than 40 dB, reduce the transmission frequency by 5%. Implement closed-loop adjustment for the three ultrasonic sensors (front end, left end, and right end) through a PID controller. The formula for implementing closed-loop adjustment through the PID controller is as follows:
[0069] ;
[0070] In the formula, represents the transmission frequency of the adjusted ultrasonic signal, Represents the transmission frequency of the ultrasonic signal before adjustment, Represents the proportionality coefficient, which is used to adjust the influence of the error value at the current time on the frequency adjustment, Represents the error value at the current time, Represents the integral coefficient, which is used to adjust the influence of the historical error accumulation on the frequency adjustment, Represents the integral term of the error, which refers to the historical error accumulation, Represents the differential coefficient, which is used to adjust the influence of the error change rate on the frequency adjustment, Represents the differential term of the error, which refers to the error change rate.
[0071] It should be noted that: Is initially determined by the adaptive algorithm according to the environmental noise level; Is obtained by subtracting the actual signal-to-noise ratio of the ultrasonic signal from the target signal-to-noise ratio of the ultrasonic signal. The target signal-to-noise ratio of the ultrasonic signal is preset by the obstacle avoidance system, such as 40 dB, while the actual signal-to-noise ratio of the ultrasonic signal is calculated by the ratio of the intensity of the received ultrasonic signal to the noise intensity, The value range of is ±40 dB; 、 And Are the parameters of the PID controller, which are determined through experimental debugging. In order to achieve fast response while ensuring the stability of the obstacle avoidance system, generally The value range of is between 0.1 and 1.0. If the proportionality coefficient is too large, it will cause system oscillation, and if it is too small, the response will be slow. Generally The value range of is between 0.01 and 0.5. If the integral coefficient is too large, it will cause overshoot, and if it is too small, the steady-state error cannot be eliminated. Generally The value range of is between 0.05 and 0.5. If the differential coefficient is too large, it will amplify the noise, and if it is too small, it cannot suppress the oscillation.
[0072] By dynamically adjusting the transmission frequency of the ultrasonic signal, the detection accuracy and anti-interference ability of the ultrasonic signal are improved, reducing the signal loss rate in a complex environment, while the PID controller ensures the smoothness and fast response of the frequency adjustment, avoiding the oscillation of the obstacle avoidance system.
[0073] The logical steps of the adaptive algorithm include:
[0074] Select a frequency adjustment strategy according to the environmental noise level;
[0075] Through the feedback control mechanism, the transmission frequencies of the ultrasonic signals of multiple ultrasonic sensors are adjusted in real time.
[0076] Through the feedback control mechanism, the frequency adjustment strategy is optimized in real time to ensure the stability and accuracy of the obstacle avoidance system;
[0077] In a complex environment, using a single frequency to detect obstacles by a combined sweeping and mopping machine will fail. Multi-frequency detection can improve the anti-interference ability. In each detection of the combined sweeping and mopping machine, a frequency adjustment strategy is selected according to the environmental noise level, and ultrasonic signals of three frequencies, 40 kHz, 60 kHz, and 80 kHz, are sequentially emitted. Multiple ultrasonic sensors (distributed at the front end, left end, and right end of the combined sweeping and mopping machine) respectively compare the intensities of the reflected signals of different frequencies, and each selects the frequency with the highest signal-to-noise ratio as the main detection frequency of the ultrasonic sensor. The three ultrasonic sensors simultaneously emit ultrasonic signals and receive the reflected signals at their respective selected main detection frequencies. By multi-frequency detection, the optimal frequency is selected, significantly improving the detection success rate of the combined sweeping and mopping machine in a complex environment.
[0078] The frequency adjustment strategy is optimized in real time through a feedback control mechanism to ensure the stability and accuracy of the obstacle avoidance system. For example, the frequency parameters are updated every 50 ms, and the transmission frequency is dynamically adjusted according to the signal-to-noise ratio of the ultrasonic signal. When the frequency adjustment amplitude exceeds ±20%, a protection mechanism is triggered and reset to the reference frequency, which is 60 kHz; and the records of the last 10 frequency adjustments are stored for analyzing the periodic changes of the environmental noise data. Through the feedback control mechanism, the real-time performance and stability of the frequency adjustment are ensured.
[0079] The logical steps of signal special reconstruction include:
[0080] Normalize the received reflected signal and extract the signal features of the reflected signal to construct a signal vector;
[0081] Train a signal reconstruction model based on the signal vector to output the reconstructed reflected signal;
[0082] Fuse the reconstructed reflected signal and the received reflected signal to obtain the final reflected signal;
[0083] Regularly evaluate the effect of signal special reconstruction.
[0084] The reflected signal will contain environmental noise and interference components. It is necessary to extract the effective signal through filtering and denoising. A band-pass filter is used to filter out the out-of-band noise. At the same time, wavelet decomposition is performed on the reflected signal to remove the high-frequency noise components. The trend of the ultrasonic signal is predicted through Kalman filtering to reduce the influence of random noise, so as to extract a high-quality reflected signal. Then, it enters the signal special reconstruction link. The reflected signal after preliminary processing is normalized, and the amplitude range of the reflected signal is unified into the interval [0, 1] for subsequent processing and analysis, which can eliminate the influence caused by too large amplitude differences between different reflected signals and ensure that various reflected signals are reconstructed under the same standard for signal special reconstruction.
[0085] For the reflected signals received by each ultrasonic sensor, signal features of the reflected signals are extracted, where the signal features include signal peak features, signal frequency features, and signal duration features. These signal features are combined into a signal vector, and each reflected signal of an ultrasonic sensor corresponds to a signal vector. Among them, the signal peak feature records the maximum amplitude of the reflected signal and the time point at which it appears. The peak size reflects the reflection characteristics of the obstacle to a certain extent. For example, a larger peak corresponds to a hard obstacle with a smooth surface and strong reflection ability. The signal frequency feature is to perform spectral analysis on the reflected signal again to extract the main frequency components of the reflected signal and their energy proportions. Obstacles of different materials and shapes will produce different frequency modulation effects on the ultrasonic signal. More information about the obstacle can be obtained by analyzing the signal frequency feature. The signal duration feature is to calculate the time length from the start to the end of the received reflected signal. The duration of the signal is related to the size and shape of the obstacle and its relative position to the ultrasonic sensor.
[0086] Reflected signals of ultrasonic waves in a large number of different scenarios are obtained, and signal vectors are extracted according to the above steps to construct a training dataset. At the same time, the true information of the corresponding obstacle, such as the distance, material, and orientation of the obstacle, is marked for each data sample as the supervision information for training the signal reconstruction model. Among them, the signal reconstruction model is a deep learning model that combines a convolutional neural network and a long short-term memory network. The convolutional neural network can effectively capture the spatial features in the reflected signal, while the long short-term memory network can analyze the variation law of the reflected signal in the time dimension. The training dataset is input into the signal reconstruction model for training. During the training process, the signal reconstruction model takes the signal vector as the input, and by continuously adjusting the network parameters, the error between the output result (predicted obstacle information) of the signal reconstruction model and the marked true obstacle information is minimized. Here, the mean square error can be used as the loss function, and the parameters of the signal reconstruction model are updated using the optimization algorithm of stochastic gradient descent.
[0087] During the actual operation, when the ultrasonic sensor receives the reflected signal and completes the normalization process and signal feature extraction, the signal vector is input into the trained signal reconstruction model. The signal reconstruction model will output the reconstructed reflected signal according to the input signal vector. The reconstructed reflected signal has the following characteristics: the signal reconstruction model can identify and remove the redundant parts in the reflected signal that are irrelevant to obstacle detection, making the reflected signal more concise and clear to highlight the key information related to the obstacle; at the same time, for the signal features that can reflect the distance, material, and orientation of the obstacle, the signal reconstruction model will perform enhancement processing to improve the recognition rate of these signal features in the reflected signal, thereby enhancing the accuracy of subsequent detection; at the same time, if there is partial information loss in the originally received reflected signal due to noise interference or other reasons, the signal reconstruction model can make reasonable inferences and supplements based on the existing signal features to repair the missing parts and make the reconstructed reflected signal more complete.
[0088] Fuse the reconstructed reflected signal with the original reflected signal that has been filtered and denoised. The fusion method can adopt the weighted average method, and dynamically adjust the weight according to the reliability of the reconstructed reflected signal and the original reflected signal that has been filtered and denoised. For example, when the signal reconstruction model has a high confidence in the reconstructed reflected signal, appropriately increase the weight of the reconstructed signal; otherwise, increase the weight of the original reflected signal that has been filtered and denoised. The fused signal will be used as the final reflected signal for calculating the distance, material, and orientation of the subsequent obstacle, providing reliable data for the subsequent detection of obstacles by the sweeping and mopping robot.
[0089] Regularly evaluate the effect of signal special reconstruction. The evaluation indicators include detection error, detection success rate, etc. If it is found that the reconstruction effect is not good, resulting in an increase in detection error or a decrease in detection success rate, new reflected signal data needs to be collected again, the training data set needs to be expanded and updated, and the signal reconstruction model needs to be retrained to adapt to the changing environment and obstacle types, ensuring the effectiveness and stability of signal special reconstruction.
[0090] The obstacle avoidance decision-making module is used to determine the distance, material, and orientation of the obstacle based on the time difference and intensity difference of the ultrasonic signal, generate an obstacle avoidance path in combination with the environmental data, and dynamically adjust the obstacle avoidance strategy according to the type and motion state of the obstacle.
[0091] The obstacle avoidance strategies include:
[0092] Based on the time difference and intensity difference of the ultrasonic signal, determine the distance, material, and orientation of the obstacle;
[0093] In combination with the environmental data, optimize the obstacle avoidance path through the reinforcement learning algorithm;
[0094] Dynamically adjust the obstacle avoidance strategy according to the type and motion state of the obstacle.
[0095] The logic for determining the distance, material, and orientation of obstacles is as follows Figure 2 As shown, specifically including:
[0096] Record the timestamp of the transmitted signal and the timestamp of the reflected signal, calculate the time difference of the ultrasonic signal, and calculate the distance of the obstacle based on the propagation speed of the ultrasonic signal;
[0097] Measure the intensity of the transmitted signal and the intensity of the reflected signal, calculate the intensity difference of the ultrasonic signal, and identify the material of the obstacle based on the intensity difference of the ultrasonic signal;
[0098] By arranging multiple ultrasonic sensors at the front, left and right ends of the target device, the azimuth of the obstacle is calculated collaboratively, and the distance data of multiple sensors are combined through triangulation to calculate the direction of the obstacle.
[0099] By determining the distance, material and orientation of the obstacle, basic information about the obstacle can be obtained, providing basic data for subsequent obstacle avoidance strategies.
[0100] The time difference of ultrasonic signals refers to the difference between the timestamp of transmitting ultrasonic signals and the timestamp of receiving reflected signals, which is used to calculate the distance of obstacles. The obstacle avoidance system records the timestamp of transmitting signals respectively. and the timestamp of the reflected signal , calculate the time difference of the ultrasonic signal , according to the propagation speed of ultrasound in air , generally 340m / s, using the formula The reason for dividing by 2 is that the ultrasonic wave has to travel a round trip distance to accurately calculate the distance to the obstacle. .
[0101] The intensity difference of ultrasonic signals refers to the difference between the intensity of the transmitted signal and the intensity of the reflected signal, which is used to identify the material of obstacles; measure the intensity of the transmitted signal and the strength of the reflected signal , calculate the intensity difference Different materials have different reflection and absorption characteristics for ultrasound. By establishing a database corresponding to a preset material and intensity difference, the calculated intensity difference of the ultrasonic signal is compared with the data in the database to identify the material of the obstacle; for example, if , it is judged as soft material, such as curtains. , it is judged as a medium hardness material, such as wooden furniture. , it is judged as a hard material, such as a wall; through material recognition, additional information is provided for obstacle avoidance strategy.
[0102] Triangulation is a method of calculating the orientation of obstacles by combining distance data with the geometric relationship between multiple ultrasonic sensors. Multiple ultrasonic sensors are arranged at the front end, left end, and right end of the sweeping and mopping integrated machine. Assume that ultrasonic sensors A, B, and C are located at different positions of the sweeping and mopping integrated machine, and the distances from the obstacles to each ultrasonic sensor are obtained. 、 and ,the azimuth angle of the obstacle is calculated using the triangulation method. where , represents the baseline distance between ultrasonic sensors, such as 20 cm.
[0103] The logical steps of the reinforcement learning algorithm are as Figure 3 shown, specifically including:
[0104] Determine the state space as the set of environmental data of the target device, including obstacle position, ground material, and environmental noise level;
[0105] Determine the action space as the set of control commands of the target device, including forward, backward, turn, and rotate in place;
[0106] Design a reward function to give rewards according to the task execution efficiency and obstacle avoidance effect;
[0107] Train the model through the reinforcement learning algorithm to generate an optimized obstacle avoidance path.
[0108] Based on the basic information of the obstacle (distance, material, and orientation of the obstacle), and combined with the environmental data, use the reinforcement learning algorithm to optimize the obstacle avoidance path to obtain a preliminary obstacle avoidance plan.
[0109] Take the set of environmental data of the sweeping and mopping integrated machine as the state space, including obstacle position, ground material, and environmental noise level (obtained through the detection and processing module). The obstacle position is determined by the distance and orientation calculated previously, and the obstacle position can also be represented in coordinate form. The ground material is detected by sensors or marked as different types according to the pre-set area information, such as tiles, carpets, and wooden floors; while the environmental noise level is obtained through the detection and processing module, including low noise, medium noise, and high noise, and the environmental noise level is represented by decibel values.
[0110] Take the set of control commands of the sweeping and mopping integrated machine as the action space, including forward, backward, turn, and rotate in place. Forward is set as forward speed and forward distance, backward is set as backward speed and backward distance, turn is set as turn angle and turn speed, and rotate in place is set as rotation angle and rotation speed. For example, the forward command can be represented as where For forward movement, is the forward speed, is the forward distance.
[0111] The design of the reward function directly affects the learning effect of the reinforcement learning algorithm. Rewards are given according to the task execution efficiency (such as cleaning coverage rate and cleaning time) and obstacle avoidance effect (such as whether the obstacle is successfully avoided and the length of the obstacle avoidance path). For example, a reward of +100 is given when the obstacle is successfully avoided, a penalty of -50 is given when hitting an obstacle, a reward of +10 is given when the cleaning coverage rate increases by 1%, and a reward of +10 is given when the cleaning time is shortened by 1%. Through multi-objective optimization, the obstacle avoidance efficiency and cleaning effect are improved.
[0112] Select a suitable reinforcement learning algorithm, such as the Deep Q-Network (DQN). First, initialize the Q-network and the experience replay pool. Initializing the Q-network is used to estimate the Q-value of each state-action pair, while the experience replay pool is used to store the experience data of the agent interacting with the environment. In the current state, the agent selects an action to execute according to the Q-network, interacts with the environment, and obtains information about the next state, reward, and whether it ends. These experience data are stored in the experience replay pool, and then a batch of data is randomly sampled from the experience replay pool for training the Q-network. Through continuous iterative training, the Q-network gradually learns the optimal obstacle avoidance path and generates an optimized obstacle avoidance path.
[0113] Specifically, the Q-network uses a three-layer fully connected neural network. The number of neurons in the input layer is equal to the dimension of the state space. For example, if the state space includes the obstacle position, ground material, and environmental noise level, the number of neurons in the input layer is 3. Two hidden layers are set, including 64 and 32 neurons respectively, and the ReLU function is used as the activation function. The number of neurons in the output layer is equal to the dimension of the action space. For example, if the action space includes forward, backward, turning, and rotating in place, the number of neurons in the output layer is 4. The capacity of the experience replay pool is set to 10,000 pieces of experience data, which can ensure that there are enough experience data for sampling during training while avoiding occupying too much memory resources. Among them, the learning rate can be set to 0.001 to control the step size of the Q-network parameter update, the discount factor is set to 0.9 to balance the weights of the current reward and future rewards, and the initial value of the exploration rate is set to 1 and gradually decays as the training progresses, finally decaying to 0.1 to control whether the agent chooses to explore new actions or choose the currently considered optimal actions during training.
[0114] The logic for dynamically adjusting the obstacle avoidance strategy is as Figure 4 shown, specifically including:
[0115] Identify the types of obstacles, including static obstacles, dynamic obstacles, and movable obstacles;
[0116] Analyze the motion state of the obstacle, including the motion trajectory and speed of the obstacle;
[0117] Select an obstacle avoidance strategy according to the type and motion state of the obstacle, including a detour strategy, a predicted trajectory strategy, and a user prompt strategy.
[0118] Dynamically adjust the preliminary obstacle avoidance plan by identifying the type of the obstacle and analyzing the motion state of the obstacle, so that the preliminary obstacle avoidance plan can better adapt to the complex and changeable actual environment, thereby realizing an efficient and intelligent obstacle avoidance function.
[0119] The sub-logic for identifying the type of the obstacle is as Figure 5 shown, specifically including:
[0120] Judge whether the position of the obstacle is fixed for a long time through the fusion of multiple sensor data;
[0121] Detect the change amount of the obstacle position by comparing multi-frame sensor data, and judge whether the change amount of the obstacle position is greater than the change threshold;
[0122] Judge whether there is uncertainty in the sensor data through the information entropy calculation of the sensor data.
[0123] Use a data fusion algorithm, such as Kalman filtering, to fuse the data of multiple ultrasonic sensors. These ultrasonic sensors are distributed at the front end, left end, and right end of the sweeping and mopping integrated machine, and can obtain obstacle information from multiple angles. By fusing these data, a more accurate and stable estimate of the obstacle position can be obtained. If the fused sensor data shows that the obstacle position remains unchanged for a long time, such as the obstacle position remains unchanged during the detection period greater than the set time threshold T, then judge that the obstacle is a static obstacle, such as fixed objects like furniture and walls.
[0124] If it is determined through the above steps that the obstacle is not a static obstacle, continuously collect multiple frames (such as n frames) of sensor data further, and detect the change of the obstacle position through comparison to determine whether the obstacle is a dynamic obstacle. For the sensor data of two adjacent frames, calculate the change amount of the obstacle position. If the change amount of the obstacle position is greater than the set change threshold , then judge that the obstacle position has changed and determine it as a dynamic obstacle; for example, in the continuous n frames of sensor data, the obstacle position continuously moves to the right in the horizontal direction, and the distance of each movement is greater than the set change threshold , then it is determined that this is a moving dynamic obstacle, such as a walking person.
[0125] If, after the above two-step judgment, it is neither a static obstacle nor determined to be a dynamic obstacle, then the information entropy of the sensor data will be combined for calculation and analysis. Since information entropy can measure the uncertainty and disorder degree of sensor data, the information entropy of sensor data will show a specific change pattern due to the motion uncertainty of movable obstacles and the complexity of their interaction with the environment. Now, mainly count the frequencies of distance values in different directions to calculate the information entropy of sensor data. The presence of movable obstacles will make the distribution of distance data more dispersed, resulting in an increase in the information entropy value. When the information entropy of sensor data is greater than the preset information entropy threshold, it is determined to be a movable obstacle, such as a temporarily placed chair. If the information entropy of sensor data is less than the preset information entropy threshold, a re-judgment is required. This obstacle is not a typical static obstacle with a long-term fixed position or an obstacle with insignificant position changes, and it needs to be comprehensively determined by combining whether the obstacle position is fixed for a long time and the change amount of the obstacle position.
[0126] The sub-logic for analyzing the motion state of obstacles includes:
[0127] Based on the data of multiple frames of sensors, predict the motion trajectory of the obstacle through a trajectory fitting algorithm;
[0128] Calculate the motion speed of the obstacle through the displacement difference and time difference between two adjacent frames of sensor data.
[0129] Fit the positions of obstacles in the sensor data of multiple frames by the least squares method. For example, assume that the position data of the obstacle at m time points is collected , , fit a curve by the least squares method , predict the position of the obstacle within a certain period in the future through this curve, so as to obtain the motion trajectory of the obstacle.
[0130] Let the positions of the obstacle in two adjacent frames of sensor data be and , the time difference is , then the displacement difference , and the motion speed of the obstacle is , to predict the motion of dynamic obstacles in advance and improve the obstacle avoidance success rate of the sweeping and mopping robot.
[0131] Select the optimal obstacle avoidance strategy according to the type and motion state of the obstacle. For example, for static obstacles, a bypass strategy can be adopted. According to the optimized obstacle avoidance path, calculate the best path points to bypass the obstacle, and control the sweeping and mopping integrated machine to move forward and turn in sequence according to the path points to avoid the obstacle. For dynamic obstacles, it is necessary to plan the obstacle avoidance path in advance according to the predicted motion trajectory of the obstacle. For example, when it is predicted that the dynamic obstacle will intersect with the motion path of the sweeping and mopping integrated machine, calculate the time and distance for the sweeping and mopping integrated machine to avoid in advance according to the motion speed and direction of the obstacle, and adjust the motion direction and moving speed of the sweeping and mopping integrated machine to avoid the obstacle. For movable obstacles, if the obstacle is small and easy to move, the sweeping and mopping integrated machine can try to push the obstacle (under the set safety conditions), while if the obstacle is large or difficult to handle automatically, a user prompt strategy is adopted, and the user is prompted to move the obstacle away by means of voice prompts or mobile APP push messages, etc. By dynamically adjusting the obstacle avoidance strategy, efficient obstacle avoidance is realized and task interruption is reduced.
[0132] The motion control module is used to convert the obstacle avoidance strategy into control instructions for the target device components, execute the tasks of the target device during the obstacle avoidance process, and adjust the moving speed of the target device according to the distance of the obstacle.
[0133] The conversion logic of the control instructions for the target device components includes:
[0134] Analyze the obstacle avoidance path into the differential speed value of the drive wheels to generate control instructions for the drive wheels;
[0135] Analyze the obstacle avoidance path into the rotation speed parameters of the motor to generate control instructions for the motor;
[0136] Regularly receive sensor data and dynamically update the control instructions for the target device components.
[0137] By adjusting the differential speed value of the drive wheels, that is, the speed difference between the left and right drive wheels, the turning of the sweeping and mopping integrated machine can be realized. For example, when the speed of the left drive wheel is greater than that of the right drive wheel, the sweeping and mopping integrated machine will turn to the right. The obstacle avoidance path usually consists of a series of discrete path points. First, extract the information of these path points from the obstacle avoidance strategy. Each path point contains its coordinates in the two-dimensional plane and the corresponding arrival time ; according to the coordinates of the current position of the sweeping and mopping integrated machine and the coordinates of the position of the next path point , calculate the expected direction for the sweeping and mopping integrated machine to turn through the following formula :
[0138] ;
[0139] In the formula, It is a four - quadrant arctangent function that can correctly calculate the expected direction angle for the sweeping and mopping integrated machine to turn based on coordinate differences.
[0140] The current direction of the sweeping and mopping integrated machine is obtained through a gyroscope , and then the direction deviation is calculated . According to the direction deviation, the differential speed value of the driving wheels is determined. Through a simple proportional control relationship, let be the proportional control coefficient (such as 0.1), then the differential speed value of the driving wheels is . When , it indicates that a left turn is required. At this time, the speed of the left driving wheel decreases, and the speed of the right driving wheel increases. When , it is the opposite; the calculated differential speed value of the driving wheels is converted into the duty cycle of the PWM signal of the driving wheel motor. For example, assuming the basic PWM duty cycle of the left driving wheel motor is , then the duty cycle adjustment amount corresponding to the differential speed value of the driving wheels is . Then the actual PWM duty cycle of the left driving wheel motor is , and the actual PWM duty cycle of the right driving wheel motor is . These PWM duty cycle values are sent to the driver of the driving wheel motor, thereby realizing the control of the driving wheels and achieving smooth turning of the sweeping and mopping integrated machine through differential speed control.
[0141] The rotational speed parameter of the motor refers to the rotational speed of the motor per minute. Different rotational speeds can make the components driven by the motor (such as cleaning brushes and mops) work with different efficiencies; according to the obstacle - avoidance path and the task requirements of the sweeping and mopping integrated machine, determine the cleaning tasks to be performed at the current stage, such as sweeping, mopping, or edge cleaning, etc. For different cleaning tasks and floor materials, the corresponding motor rotational speed parameters are preset in advance. This is because the carpet material is relatively soft, and dust and debris are easily trapped in the fibers, requiring greater suction and brushing intensity to be effectively cleaned, while the surface of the tile material is relatively smooth, the cleaning difficulty is relatively small, and the required suction and brushing intensity are also relatively small; for example, in the sweeping mode, if the floor is made of tile material, the rotational speed of the sweeping motor is set to RPM; if it is carpet material, it is set to RPM, where , because carpet cleaning requires greater suction and brushing intensity.
[0142] The selected motor rotational speed parameter is converted into a control signal that can be recognized by the motor driver. For a DC motor, the rotational speed is usually controlled by changing the voltage applied across the motor, which can be achieved by adjusting the duty cycle of the PWM signal. For example, according to the rotational speed - voltage characteristic curve of the motor, the target rotational speed is converted into the corresponding PWM duty cycle , and send the duty cycle value to the motor driver. By dynamically adjusting the motor speed, ensure that the task is completed on time while avoiding collisions caused by excessive speed.
[0143] During the obstacle avoidance process, regularly receive sensor data and dynamically update the control instructions for the drive wheels and motors to cope with environmental changes. Receive sensor data at fixed time intervals (e.g., every 100 ms) to detect the latest position and distance of obstacles. If the distance to the obstacle is less than the safety threshold (e.g., 20 cm), reduce the target speed, recalculate the differential value of the drive wheels and the rotational speed parameters of the motors according to the updated target speed, and generate new control instructions. If a dynamic obstacle is detected, trigger the emergency stop mechanism, pause the current task, and replan the path. By dynamically updating the control instructions, ensure that the sweeping and mopping robot can respond to environmental changes in real time, so as to ensure that the sweeping and mopping robot can avoid obstacles and complete tasks safely and efficiently. The whole process forms a closed-loop control, continuously adjusting the control instructions according to the actual situation to improve the adaptability and reliability of the sweeping and mopping robot.
[0144] The energy management module is used to manage the power supply of the target device to support the target device to execute tasks;
[0145] Select a high-capacity and long-life lithium battery to power the sweeping and mopping robot. The lithium battery has the characteristics of high energy density and low self-discharge rate, and can provide power for the device stably for a long time. Connect the lithium battery to each electrical component of the device through a dedicated power management circuit to ensure the stability and safety of power transmission and guarantee the normal execution of the cleaning task by the sweeping and mopping robot.
[0146] In order to let users know the device power, it is necessary to monitor the battery power in real time. Convert the voltage signal of the battery into a digital signal through an analog-to-digital converter, calculate the remaining battery power percentage, and at the same time display the power information on the display screen of the sweeping and mopping robot or the mobile phone APP in real time to facilitate users to reasonably arrange the use of the sweeping and mopping robot.
[0147] To prevent the device from stopping due to power exhaustion during operation, it is necessary to set a power threshold. When it is detected that the battery power is lower than the set threshold (e.g., 20%), trigger a low-power signal and send this signal to the control system of the sweeping and mopping robot. The control system immediately pauses the current task, such as the cleaning task, and plans the shortest path to return to the charging dock to ensure the normal use of the sweeping and mopping robot next time.
[0148] To protect the battery and extend its service life, when the integrated sweeping and mopping machine returns to the charging dock, the energy management module starts the charging process. By controlling the voltage and current of the charging circuit, it adopts the constant current-constant voltage charging method. First, it charges quickly with a constant current. When the battery voltage is close to the full charge state, it switches to constant voltage charging to prevent overcharging. During the charging process, it monitors the battery temperature and charging status in real time. If the temperature is too high, it reduces the charging current to ensure the battery performance and the battery life of the integrated sweeping and mopping machine.
[0149] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and not to limit them. Although the present application has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present application can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present application, and they should all be covered by the scope of the claims of the present application.
Claims
1. An automatic obstacle avoidance system based on ultrasonic detection, characterized in that, Including: A detection and processing module, an obstacle avoidance decision-making module, and a motion control module; The detection and processing module includes at least three ultrasonic sensors, which are respectively arranged at the front end, the left end, and the right end of the target device, and are used to emit ultrasonic signals and receive reflected signals, detect the distance, material, and orientation of obstacles around the target device. The ultrasonic sensors automatically adjust the emission frequency of the ultrasonic signals according to the ambient noise level through a frequency adjustment mechanism; perform signal special reconstruction on the received reflected signals. The signal special reconstruction includes extracting the signal features of the reflected signals to construct signal vectors to output the reconstructed reflected signals, and combining the received reflected signals to fuse and obtain the final reflected signals; The obstacle avoidance decision-making module is used to determine the distance, material, and orientation of obstacles based on the time difference and intensity difference of ultrasonic signals, generate an obstacle avoidance path in combination with environmental data, and dynamically adjust the obstacle avoidance strategy according to the type and motion state of the obstacles; Measure the intensity of the transmitted signal and the intensity of the reflected signal, calculate the intensity difference of the ultrasonic signal, identify the material of the obstacle according to the intensity difference of the ultrasonic signal, and by arranging multiple ultrasonic sensors, cooperate to calculate the azimuth angle of the obstacle, and calculate the azimuth of the obstacle by combining the distance data of multiple sensors through triangulation; The logic for dynamically adjusting the obstacle avoidance strategy includes identifying the type of the obstacle. The sub-logic for identifying the type of the obstacle includes: judging whether the position of the obstacle is fixed for a long time through the fusion of multiple sensor data; detecting the change amount of the obstacle position through the comparison of multi-frame sensor data, and judging whether the change amount of the obstacle position is greater than the change threshold; judging whether there is uncertainty in the sensor data through the information entropy calculation of the sensor data; The motion control module is used to convert the obstacle avoidance strategy into control instructions for the components of the target device, execute the tasks of the target device during the obstacle avoidance process, and adjust the moving speed of the target device according to the distance of the obstacle.
2. The automatic obstacle avoidance system based on ultrasonic detection according to claim 1, characterized in that, The obstacle avoidance strategy includes: Based on the time difference and intensity difference of ultrasonic signals, determine the distance, material, and orientation of obstacles; In combination with environmental data, optimize the obstacle avoidance path through a reinforcement learning algorithm; Dynamically adjust the obstacle avoidance strategy according to the type and motion state of the obstacles.
3. The automatic obstacle avoidance system based on ultrasonic detection according to claim 2, wherein The logic for determining the distance, material, and orientation of the obstacle includes: Record the timestamp of the transmitted signal and the timestamp of the reflected signal, calculate the time difference of the ultrasonic signal, and calculate the distance of the obstacle according to the propagation speed of the ultrasonic signal; Measure the intensity of the transmitted signal and the intensity of the reflected signal, calculate the intensity difference of the ultrasonic signal, and identify the material of the obstacle according to the intensity difference of the ultrasonic signal; Through multiple ultrasonic sensors arranged at the front end, the left end, and the right end of the target device, cooperate to calculate the azimuth angle of the obstacle, and calculate the azimuth of the obstacle by combining the distance data of multiple sensors through triangulation.
4. An automatic obstacle avoidance system based on ultrasonic detection according to claim 3, characterized in that, The logical steps of the reinforcement learning algorithm include: Determine the state space as the set of environmental data of the target device, including obstacle position, ground material, and ambient noise level; Determine the action space as the set of control instructions of the target device, including forward, backward, turning, and rotating in place; Design a reward function to give rewards based on task execution efficiency and obstacle avoidance effect; Train the model through a reinforcement learning algorithm to generate an optimized obstacle avoidance path.
5. The automatic obstacle avoidance system based on ultrasonic detection according to claim 4, characterized in that, The logic for dynamically adjusting the obstacle avoidance strategy includes: Identify the types of obstacles, including static obstacles, dynamic obstacles, and movable obstacles; Analyze the motion state of the obstacles, including the motion trajectory and motion speed of the obstacles; Select an obstacle avoidance strategy according to the type and motion state of the obstacles, including a detour strategy, a predicted trajectory strategy, and a user prompt strategy.
6. The automatic obstacle avoidance system based on ultrasonic detection according to claim 5, wherein, The sub-logic for analyzing the motion state of the obstacles includes: Based on the data of multiple frames of sensors, predict the motion trajectory of the obstacles through a trajectory fitting algorithm; Calculate the motion speed of the obstacles through the displacement difference and time difference between two adjacent frames of sensor data.
7. The automatic obstacle avoidance system based on ultrasonic detection according to claim 6, wherein, The conversion logic for the control instructions of the target device components includes: Parse the obstacle avoidance path into the differential speed value of the drive wheels to generate control instructions for the drive wheels; Parse the obstacle avoidance path into the rotation speed parameters of the motor to generate control instructions for the motor; Regularly receive sensor data and dynamically update the control instructions of the target device components.
8. An automatic obstacle avoidance system based on ultrasonic detection according to claim 7, characterized in that The frequency adjustment mechanism includes: Real-time monitor the environmental noise level, perform spectral analysis on the environmental noise data, and quantify the environmental noise level to obtain the environmental noise level; According to the environmental noise level, dynamically adjust the transmission frequency of the ultrasonic signal through an adaptive algorithm; Perform signal special reconstruction on the received reflected signal.
9. The automatic obstacle avoidance system based on ultrasonic detection according to claim 8, characterized in that, The logical steps of the adaptive algorithm include: Select a frequency adjustment strategy according to the environmental noise level; Through a feedback control mechanism, real-time adjust the transmission frequencies of the ultrasonic signals of multiple ultrasonic sensors.
10. An automatic obstacle avoidance system based on ultrasonic detection according to claim 9, characterized in that, The logical steps of the signal special reconstruction include: Perform normalization processing on the received reflected signal, extract the signal features of the reflected signal, and construct a signal vector; Train a signal reconstruction model according to the signal vector to output the reconstructed reflected signal; Fuse the reconstructed reflected signal and the received reflected signal to obtain the final reflected signal; Regularly evaluate the effect of the signal special reconstruction.
Citation Information
Patent Citations
Intelligent reflector-assisted spatial modulation system reflection coefficient optimization method
CN116614165A
Flaw detection marking method and system based on ultrasonic wireless communication
CN119023806A