Automatic obstacle avoidance system based on ultrasonic detection
By adopting multiple ultrasonic sensors and frequency adjustment mechanisms in the obstacle avoidance system, combined with reinforcement learning algorithms to dynamically adjust obstacle avoidance strategies, the existing obstacle avoidance system has solved the problem of low accuracy and insufficient strategy flexibility in identifying obstacles in complex environments, and achieved efficient and intelligent obstacle avoidance effects.
Patent Information
- Application Number
- CN202510536313.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2045-04-27
AI Technical Summary
The existing obstacle avoidance system is difficult to accurately identify the distance, material and orientation of obstacles in complex environments, and lacks flexibility and intelligence, resulting in low obstacle avoidance efficiency and frequent interruptions in task execution.
An automatic obstacle avoidance system based on ultrasonic detection is adopted to detect obstacles through at least three ultrasonic sensors, and the frequency adjustment mechanism is used to automatically adjust the transmission frequency of the ultrasonic signal according to the environmental noise level, and combine the reinforcement learning algorithm to generate an optimized obstacle avoidance path to dynamically adjust the obstacle avoidance strategy.
It significantly improves detection accuracy and anti-interference ability, achieves efficient and intelligent obstacle avoidance, reduces task interruption, and improves obstacle avoidance efficiency and task execution success rate.
Smart Images

Figure CN120066055A_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 a complex home environment. 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 a complex environment, and could not meet the requirements of efficient obstacle avoidance for the device. 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 when facing 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 the 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; 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, 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; The obstacle avoidance decision module is used to determine the distance, material, and orientation of the obstacles 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 obstacles; 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 obstacles.
[0005] As an optional implementation manner, the obstacle avoidance strategy includes: Determine the distance, material, and orientation of the obstacles based on the time difference and intensity difference of the ultrasonic signals; Optimize the obstacle avoidance path through a reinforcement learning algorithm in combination with environmental data; Dynamically adjust the obstacle avoidance strategy according to the type and motion state of the obstacle.
[0006] As an optional implementation, the logic for determining the distance, material, and orientation of the obstacle includes: Record the timestamps of the transmitted signal and the reflected signal, calculate the time difference of the ultrasonic signal, and calculate the distance to the obstacle based on the propagation speed of the ultrasonic signal; Measure the intensities of the transmitted signal and 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; 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.
[0007] As an optional implementation, 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 environmental noise level; Determine the action space as the set of control commands of the target device, including forward, backward, turning, and rotating in place; Design a reward function to give rewards according to the task execution efficiency and obstacle avoidance effect; Train the model through the reinforcement learning algorithm to generate an optimized obstacle avoidance path.
[0008] As an optional implementation, the logic for dynamically adjusting the obstacle avoidance strategy includes: Identify the type of the obstacle, including static obstacles, dynamic obstacles, and movable obstacles; Analyze the motion state of the obstacle, including the motion trajectory and motion speed of the obstacle; According to the type and motion state of the obstacle, select an obstacle avoidance strategy, including a detour strategy, a predicted trajectory strategy, and a user prompt strategy.
[0009] As an optional implementation, the sub-logic for identifying the type of the obstacle includes: Judge whether the obstacle position is fixed for a long time through the fusion of multiple sensor data; Detect the change amount of the obstacle position through the comparison of multi-frame sensor data, and judge whether the change amount of the obstacle position is greater than the change threshold; Judge whether there is uncertainty in the sensor data through the information entropy calculation of the sensor data.
[0010] As an optional implementation, the sub-logic for analyzing the motion state of the obstacle includes: Based on the data of multiple-frame sensors, predict the motion trajectory of obstacles through a trajectory fitting algorithm; Calculate the motion speed of the obstacle through the displacement difference and time difference of adjacent two-frame sensor data.
[0011] As an optional implementation manner, the conversion logic of the control instruction of the target device component includes: Parse the obstacle avoidance path into the differential speed value of the driving wheels to generate the control instruction of the driving wheels; Parse the obstacle avoidance path into the rotation speed parameter of the motor to generate the control instruction of the motor; Regularly receive sensor data and dynamically update the control instruction of the target device component.
[0012] As an optional implementation manner, the frequency adjustment mechanism includes: Real-time monitor the environmental noise level, perform spectrum 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 filtering and denoising processing on the received reflected signal.
[0013] As an optional implementation manner, 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.
[0014] As an optional implementation manner, the logical steps of the signal special reconstruction include: Perform normalization processing on the received reflected signal, and extract the signal features of the reflected signal to 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.
[0015] Compared with the prior art, the beneficial effect of the present 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.
[0016] The obstacle avoidance decision-making module, based on the reinforcement learning algorithm, combines environmental data and obstacle information to generate an optimized obstacle avoidance path, and can dynamically adjust the obstacle avoidance strategy according to the type and motion state of the obstacles. This 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.
[0017] 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 motors, it achieves smooth steering and efficient task execution of the target device. At the same time, it dynamically updates the control instructions 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
[0018] To more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings. Among them: Figure 1 It is the system structure diagram of an automatic obstacle avoidance system based on ultrasonic detection provided by the embodiment of the present application; 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 the present application; Figure 3 It is the logic step diagram of the reinforcement learning algorithm of an automatic obstacle avoidance system based on ultrasonic detection provided by the embodiment of the present application; Figure 4 It is the logic diagram for dynamically adjusting the obstacle avoidance strategy of an automatic obstacle avoidance system based on ultrasonic detection provided by the embodiment of the present application; Figure 5 It is the sub-logic diagram for identifying the type of obstacles of an automatic obstacle avoidance system based on ultrasonic detection provided by the embodiment of the present application. Detailed Description of the Embodiments
[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present application more obvious and understandable, the following clearly and completely describes the technical solutions in the embodiments of the present application with reference to the drawings in the specification. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments.
[0020] Such as Figure 1As shown in the figure, 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 module, a motion control module, and an energy management module.
[0021] Here, the sweeping and mopping robot is used as the target device, and the task of the target device is the cleaning task.
[0022] 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, so as to detect the distance, material, and orientation of obstacles around the target device. The ultrasonic sensors automatically adjust the emission frequency of ultrasonic signals according to the environmental noise level through a frequency adjustment mechanism.
[0023] The frequency adjustment mechanism includes: Real-time monitor the environmental noise level, and perform spectral analysis on the environmental noise data to quantify the environmental noise level and obtain the environmental noise grade; According to the environmental noise grade, dynamically adjust the emission frequency of ultrasonic signals through an adaptive algorithm; Perform signal special reconstruction on the received reflected signals.
[0024] The environmental 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 environmental noise level to dynamically adjust the emission frequency of ultrasonic signals. The environmental noise level is obtained by quantifying the environmental noise data through spectral analysis.
[0025] A digital microphone is configured on the sweeping and mopping robot, 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 sensors 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 spectral analysis and frequency adjustment.
[0026] Perform a fast Fourier transform on the acquired 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 proportions 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 according to 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, clear input parameters are provided for adaptive frequency adjustment.
[0027] 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 sweeping and mopping integrated machine. In a low-noise environment, set the transmission frequencies 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 frequencies 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 sweeping and mopping integrated machine; while in a high-noise environment, set the transmission frequencies of the ultrasonic signals of the three ultrasonic sensors (front end, left end, and right end) to 80 kHz to improve the 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: ; In the formula, represents the transmission frequency of the ultrasonic signal after adjustment, 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, The differential term representing the error refers to the error change rate.
[0028] It should be noted that: is preliminarily 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, and 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 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 proportional 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.
[0029] 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.
[0030] The logical steps of the adaptive algorithm include: Select a frequency adjustment strategy according to the environmental noise level; Through the feedback control mechanism, the transmission frequencies of the ultrasonic signals of multiple ultrasonic sensors are adjusted in real time.
[0031] 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; 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 select 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 to select the optimal frequency, the detection success rate of the combined sweeping and mopping machine in a complex environment is significantly improved.
[0032] 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.
[0033] The logical steps of signal special reconstruction include: Normalize the received reflected signal and extract the signal characteristics of the reflected signal to 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 signal special reconstruction.
[0034] 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.
[0035] 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 the reflected signal of each 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 ratios. Obstacles with different materials and shapes will produce different frequency modulation effects on the ultrasonic signal. By analyzing the signal frequency features, more information about the obstacle can be obtained. 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, shape of the obstacle, and its relative position to the ultrasonic sensor.
[0036] 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 data set. At the same time, the corresponding true obstacle information, 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 data set 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.
[0037] 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 improving 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.
[0038] Fuse the reconstructed reflected signal with the originally filtered and denoised reflected signal. The fusion method can adopt the weighted average method, and dynamically adjust the weights according to the reliability of the reconstructed reflected signal and the originally filtered and denoised reflected signal. 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 originally filtered and denoised reflected signal. 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 integrated machine.
[0039] 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, it is necessary to collect new reflected signal data again, expand and update the training data set, and retrain the signal reconstruction model to adapt to the changing environment and obstacle types, ensuring the effectiveness and stability of signal special reconstruction.
[0040] 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 signal, 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.
[0041] The obstacle avoidance strategies include: Based on the time difference and intensity difference of the ultrasonic signal, determine the distance, material, and orientation of the obstacle; In combination with environmental data, optimize the obstacle avoidance path through the reinforcement learning algorithm; Dynamically adjust the obstacle avoidance strategy according to the type and motion state of the obstacle.
[0042] The logic for determining the distance, material, and orientation of an obstacle is as follows Figure 2 shown, specifically including: Record the timestamps of the transmitted signal and 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; 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; 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.
[0043] By determining the distance, material, and orientation of the obstacle, obtain the basic information of the obstacle, and provide basic data for subsequent obstacle avoidance strategies.
[0044] The time difference of the ultrasonic signal refers to the difference between the timestamp of the transmitted ultrasonic signal and the timestamp of the received reflected signal, which is used to calculate the distance of the obstacle; the obstacle avoidance system records the timestamp of the transmitted signal and the timestamp of the reflected signal , calculates the time difference of the ultrasonic signal , according to the propagation speed of ultrasonic waves in the air , generally 340 m / s, using the formula , dividing by 2 because of the round-trip distance of the ultrasonic wave, and accurately calculates the distance of the obstacle .
[0045] The intensity difference of the ultrasonic signal 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 the obstacle; measure the intensity of the transmitted signal and the intensity of the reflected signal , calculate the intensity difference , different materials have different reflection and absorption characteristics for ultrasonic waves. By establishing a pre-set database corresponding to the material and intensity difference, compare the calculated intensity difference of the ultrasonic signal with the data in the database to identify the material of the obstacle; for example, if , it is determined as a soft material, such as a curtain, if , it is determined as a medium-hard material, such as a wooden furniture, if , it is determined as a hard material, such as a wall; through material identification, provide additional information for the obstacle avoidance strategy.
[0046] Triangulation is a method of calculating the orientation of obstacles by combining the geometric relationships between multiple ultrasonic sensors and distance data. 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 , and the azimuth angle of the obstacle is calculated using triangulation. , where , represents the baseline distance between ultrasonic sensors, such as 20 cm.
[0047] The logical steps of the reinforcement learning algorithm are as Figure 3 shown, specifically including: Determine the state space as the set of environmental data of the target device, including obstacle position, ground material, and environmental noise level; Determine the action space as the set of control commands of the target device, including forward, backward, turning, and spinning in place; Design a reward function to give rewards based on task execution efficiency and obstacle avoidance effect; Train the model through the reinforcement learning algorithm to generate an optimized obstacle avoidance path.
[0048] Based on the basic information of the obstacle (distance, material, and orientation of the obstacle), and combined with environmental data, use the reinforcement learning algorithm to optimize the obstacle avoidance path to obtain a preliminary obstacle avoidance plan.
[0049] 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 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 expressed in decibel values.
[0050] Take the set of control commands of the sweeping and mopping integrated machine as the action space, including forward, backward, turning, and spinning in place. Forward is set as forward speed and forward distance, backward is set as backward speed and backward distance, turning is set as turning angle and turning speed, and spinning in place is set as rotation angle and rotation speed. For example, the forward command can be expressed as , where is forward, is the forward speed, is the forward distance.
[0051] The design of the reward function directly affects the learning effect of the reinforcement learning algorithm. Rewards are given based on 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 for every 1% increase in the cleaning coverage rate, and a reward of +10 is given for every 1% reduction in the cleaning time. Through multi-objective optimization, the obstacle avoidance efficiency and cleaning effect are improved.
[0052] 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-values of each state-action pair, while the experience replay pool is used to store the experience data of the agent's interaction 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.
[0053] Specifically, the Q-network adopts 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 obstacle positions, ground materials, and environmental noise levels, 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 moving 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 is 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 selects to explore new actions or select the currently considered optimal actions during training.
[0054] The logic for dynamically adjusting the obstacle avoidance strategy is as Figure 4 shown, specifically including: Identify the types of obstacles, including static obstacles, dynamic obstacles, and movable obstacles; Analyze the motion states of obstacles, including the motion trajectories and motion speeds of obstacles; Select obstacle avoidance strategies according to the types and motion states of obstacles, including detour strategies, predicted trajectory strategies, and user prompt strategies.
[0055] By identifying the type of obstacles and analyzing the motion state of obstacles, the preliminary obstacle avoidance plan is dynamically adjusted, so that the preliminary obstacle avoidance plan can better adapt to the complex and changeable actual environment, thus realizing an efficient and intelligent obstacle avoidance function.
[0056] The sub-logic for identifying the type of obstacles is as Figure 5 shown, specifically including: By fusing data from multiple sensors, determine whether the position of the obstacle is fixed for a long time; By comparing multi-frame sensor data, detect the change amount of the obstacle position, and determine whether the change amount of the obstacle position is greater than the change threshold; By calculating the information entropy of the sensor data, determine whether there is uncertainty in the sensor data.
[0057] Using a data fusion algorithm, such as Kalman filtering, 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 this 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, for example, the obstacle position remains unchanged during a period longer than the set time threshold T during detection, then the obstacle is determined to be a static obstacle, such as fixed objects like furniture and walls.
[0058] 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 adjacent two frames of sensor data, calculate the change amount of the obstacle position. If the change amount of the obstacle position is greater than the set change threshold , then it is determined that the obstacle position has changed, and it is determined to be a dynamic obstacle; for example, in 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.
[0059] 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 movement 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 existence 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.
[0060] The sub-logic for analyzing the motion state of obstacles includes: Based on the data of multiple frames of sensors, predict the motion trajectory of the obstacle through a trajectory fitting algorithm; Calculate the motion speed of the obstacle through the displacement difference and time difference between two adjacent frames of sensor data.
[0061] 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 , , and fit a curve by the least squares method , and predict the position of the obstacle within a future period of time through this curve to obtain the motion trajectory of the obstacle.
[0062] 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 , so as to predict the motion of dynamic obstacles in advance and improve the obstacle avoidance success rate of the sweeping and mopping integrated machine.
[0063] Select the optimal obstacle avoidance strategy according to the type and motion state of the obstacle. For example, for static obstacles, a detour 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, an obstacle avoidance path needs to be planned 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), and if the obstacle is large or difficult to handle automatically, a user prompt strategy is adopted to prompt the user to move the obstacle away by means of voice prompts or mobile APP push messages, etc. Through dynamically adjusting the obstacle avoidance strategy, efficient obstacle avoidance is realized and task interruption is reduced.
[0064] 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 obstacle avoidance, and adjust the moving speed of the target device according to the distance of the obstacle.
[0065] The conversion logic of the control instructions for 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 rotational speed parameters of the motor to generate control instructions for the motor; Regularly receive sensor data and dynamically update the control instructions for the target device components.
[0066] 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 the speed 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 : ;
[0067] In the formula, is the four-quadrant arctangent function, which can correctly calculate the expected direction angle for the sweeping and mopping integrated machine to turn according to the coordinate difference.
[0068] Obtain the current direction of the sweeping and mopping integrated machine through a gyroscope , and then calculate the direction deviation , determine the differential speed value of the drive wheels according to the direction deviation. Through a simple proportional control relationship, set as the proportional control coefficient (such as 0.1), then the differential speed value of the drive wheels is . When , it indicates that a left turn is required. At this time, the speed of the left drive wheel decreases, and the speed of the right drive wheel increases. When , it is the opposite; convert the calculated differential speed value of the drive wheels into the duty cycle of the PWM signal of the drive wheel motors. For example, assume that the basic PWM duty cycle of the left drive wheel motor is , then the duty cycle adjustment amount corresponding to the differential speed value of the drive wheels is , then the actual PWM duty cycle of the left drive wheel motor , and the actual PWM duty cycle of the right drive wheel motor . Send these PWM duty cycle values to the driver of the drive wheel motors, so as to realize the control of the drive wheels and achieve smooth turning of the sweeping and mopping integrated machine through differential speed control.
[0069] 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 that need to be executed at the current stage, such as sweeping, mopping or edge cleaning, etc. For different cleaning tasks and floor materials, preset the corresponding motor rotational speed parameters in advance. This is because the carpet material is relatively soft, and dust and debris are easily trapped in the fibers, and greater suction and brushing intensity are required to effectively clean. 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, set the rotational speed of the sweeping motor to RPM; if it is carpet material, then set it to RPM, where , because carpet cleaning requires greater suction and brushing intensity.
[0070] Convert the selected rotational speed parameter of the motor into a control signal that the motor driver can recognize. 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, convert the target rotational speed into the corresponding PWM duty cycle , and send the duty cycle value to the motor driver. By dynamically adjusting the motor rotational speed, ensure that the task is completed on time and avoid collisions caused by too high speed.
[0071] During the obstacle avoidance process, sensor data is received regularly to dynamically update the control instructions for the drive wheels and motors to cope with environmental changes. Sensor data is received at fixed time intervals (e.g., every 100 ms) to detect the latest position and distance of obstacles. If the distance to an obstacle is less than the safety threshold (e.g., 20 cm), the target speed is reduced. The differential value of the drive wheels and the rotational speed parameters of the motors are recalculated based on the updated target speed, and new control instructions are generated. If a dynamic obstacle is detected, an emergency stop mechanism is triggered, the current task is paused, and a new path is planned. By dynamically updating the control instructions, it is ensured that the sweeping and mopping integrated machine can respond to environmental changes in real time, so as to ensure that the sweeping and mopping integrated machine can avoid obstacles safely and efficiently and complete the task. 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 integrated machine.
[0072] The energy management module is used to manage the power supply of the target device to support the target device in performing tasks; A high-capacity and long-life lithium battery is selected to power the sweeping and mopping integrated machine. 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. The lithium battery is connected 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 integrated machine.
[0073] In order to let users know the device's battery power, it is necessary to monitor the battery power in real time. The voltage signal of the battery is converted into a digital signal through an analog-to-digital converter, and the remaining battery power percentage is calculated through calculation. At the same time, the power information is displayed in real time on the display screen of the sweeping and mopping integrated machine or the mobile phone APP, which is convenient for users to reasonably arrange the use of the sweeping and mopping integrated machine.
[0074] 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%), a low-power signal is triggered and sent to the control system of the sweeping and mopping integrated machine. 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 integrated machine next time.
[0075] To protect the battery and extend its service life, when the sweeping and mopping integrated machine returns to the charging dock, the energy management module starts the charging process. By controlling the voltage and current of the charging circuit, the constant current-constant voltage charging method is adopted. First, it charges quickly with a constant current. When the battery voltage approaches the full charge state, it switches to constant voltage charging to prevent overcharging. During the charging process, the battery temperature and charging status are monitored in real time. If the temperature is too high, the charging current is reduced to ensure the battery performance and the battery life of the sweeping and mopping integrated machine.
[0076] 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 within the scope of the claims of the present application.
Claims
1. An automatic obstacle avoidance system based on ultrasonic detection, characterized in that: include: Detection and processing module, obstacle avoidance decision module and motion control module; 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 transmit ultrasonic signals and receive reflected signals to detect the distance, material and direction of obstacles around the target device. The ultrasonic sensor automatically adjusts the transmission frequency of the ultrasonic signal according to the environmental noise level through a frequency adjustment mechanism; performs signal special reconstruction on the received reflected signal, and the signal special reconstruction includes extracting the signal characteristics of the reflected signal to construct a signal vector, so as to output the reconstructed reflected signal, and combine the received reflected signal to obtain the final reflected signal; 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 signal, 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; 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 based on the intensity difference of the ultrasonic signal, and calculate the azimuth of the obstacle by arranging multiple ultrasonic sensors. Calculate the direction of the obstacle by combining the distance data of multiple sensors through triangulation. The logic of dynamically adjusting the obstacle avoidance strategy includes identifying the type of obstacle, and the obstacle type identification sub-logic includes: judging whether the obstacle position is fixed for a long time by fusing multiple sensor data; detecting the change of the obstacle position by comparing multiple frames of sensor data, and judging whether the change of the obstacle position is greater than the change threshold; judging whether there is uncertainty in the sensor data by calculating the information entropy of the sensor data; 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.
2. The automatic obstacle avoidance system based on ultrasonic detection as claimed in claim 1, characterized in that: The obstacle avoidance strategy includes: Determine the distance, material and direction of the obstacle based on the time difference and intensity difference of the ultrasonic signal; Combined with environmental data, the obstacle avoidance path is optimized through reinforcement learning algorithm; Dynamically adjust the obstacle avoidance strategy according to the type and motion state of the obstacle.
3. The automatic obstacle avoidance system based on ultrasonic detection as claimed in claim 2, characterized in that: The logic for determining the distance, material and orientation of obstacles 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 based on 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 based on the intensity difference of the ultrasonic signal; 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.
4. The automatic obstacle avoidance system based on ultrasonic detection as claimed in claim 3, characterized in that: The logical steps of the reinforcement learning algorithm include: Determine the state space as a set of environmental data of the target device, including obstacle locations, ground materials, and environmental noise levels; Determine the action space as a set of control instructions for the target device, including forward, backward, turn, and rotate on the spot; Design a reward function to reward based on task execution efficiency and obstacle avoidance effect; The model is trained through a reinforcement learning algorithm to generate an optimized obstacle avoidance path.
5. The automatic obstacle avoidance system based on ultrasonic detection as claimed in claim 4, characterized in that: The logic of dynamically adjusting the obstacle avoidance strategy includes: Identify types of obstacles, including static obstacles, dynamic obstacles, and movable obstacles; Analyze the movement state of obstacles, including their movement trajectory and movement speed; According to the type and motion state of the obstacle, an obstacle avoidance strategy is selected, including a detour strategy, a predicted trajectory strategy, and a user prompt strategy.
6. The automatic obstacle avoidance system based on ultrasonic detection as claimed in claim 5, characterized in that: The obstacle motion state analysis sub-logic includes: Based on the data of multiple frames of sensors, the movement trajectory of obstacles is predicted through trajectory fitting algorithm; The speed of the obstacle is calculated by the displacement difference and time difference of two adjacent frames of sensor data.
7. The automatic obstacle avoidance system based on ultrasonic detection as claimed in claim 6, characterized in that: The conversion logic of the control instruction of the target device component includes: Parse the obstacle avoidance path into the differential value of the driving wheel to generate the control command of the driving wheel; Parse the obstacle avoidance path into the motor speed parameter to generate the motor control command; Receive sensor data regularly and dynamically update control instructions for target equipment components.
8. The automatic obstacle avoidance system based on ultrasonic detection as claimed in claim 7, characterized in that: The frequency adjustment mechanism includes: Monitor the ambient noise level in real time, perform spectrum analysis on the ambient noise data, and quantify the ambient noise level to obtain the ambient noise grade; According to the environmental noise level, the transmission frequency of the ultrasonic signal is dynamically adjusted through an adaptive algorithm; Perform signal-specific reconstruction on the received reflected signal.
9. The automatic obstacle avoidance system based on ultrasonic detection as claimed in claim 8, characterized in that: The logical steps of the adaptive algorithm include: Select the frequency adjustment strategy according to the ambient noise level; Through the feedback control mechanism, the emission frequencies of ultrasonic signals of multiple ultrasonic sensors are adjusted in real time.
10. The automatic obstacle avoidance system based on ultrasonic detection as claimed in claim 9, characterized in that: The logic steps of the signal special reconstruction include: Normalizing the received reflected signal and extracting the signal features of the reflected signal to construct a signal vector; A signal reconstruction model is trained according to the signal vector to output a reconstructed reflection signal; The reconstructed reflection signal and the received reflection signal are merged to obtain the final reflection signal; The effectiveness of a particular reconstruction of the signal is regularly evaluated.
Citation Information
Patent Citations
Near field reflection self-interference signal offset method and device
CN103973612A
Intelligent reflector-assisted spatial modulation system reflection coefficient optimization method
CN116614165A
Flaw detection marking method and system based on ultrasonic wireless communication
CN119023806A
Vehicle-mounted ultrasonic radar detection method and device and vehicle
CN119846642A
Method for identifying a wireless signal reflected by moving object
WO2017219603A1