Flanging cleaning control method, device and equipment and storage medium

By determining the stable state in the sweeper and adjusting the angular velocity, using proportional, integral and differential control algorithms, the problems of missing sweeping and collision during cleaning of the cleaning robot along the edge are solved, and the cleaning quality and user experience are improved.

CN119247940APending Publication Date: 2025-01-03HANGZHOU EZVIZ SOFTWARE CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202410989495.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

When cleaning along the edge, existing cleaning robots are prone to missed sweeping or collision with obstacles due to calculating the slope error of the contour line.

Method used

By determining its stable state when the sweeper performs the edge cleaning task, and adjusting the angular velocity based on the preset target edge distance, motion direction and contour slope, using proportional, integral and differential control algorithms to ensure stable motion of the sweeper. Avoid sweeping and collisions.

Benefits of technology

It effectively reduces the degree of leakage and collisions of edge cleaning, and improves the quality of cleaning and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119247940A_ABST
    Figure CN119247940A_ABST
Patent Text Reader

Abstract

The invention provides a welt cleaning control method and device, equipment and a storage medium. The method is applied to the technical field of intelligent cleaning. The method comprises the steps that when the sweeper executes a welt sweeping task, whether the sweeper enters a stable state or not is determined, and if the sweeper enters the stable state, based on a preset target edge distance, a second distance, the motion direction of the sweeper at the current moment, a second contour line slope and a preset adjustment coefficient, the second contour line slope is adjusted according to the preset target edge distance, the second distance and the motion direction of the sweeper at the current moment; and determining the target angular velocity of the sweeper at the current moment, and continuing to execute the welt cleaning task based on the target angular velocity. By determining the stable state of the sweeper, the movement stability of the sweeper is ensured, and after the sweeper enters the stable state, the angular velocity of the sweeper is controlled and calculated by adopting a control mode of setting an adjustment coefficient, so that the sweeper is prevented from missing sweeping and colliding with an obstacle when executing a welt sweeping task, and the sweeping efficiency of the sweeper is improved. Therefore, the sweeping quality of the sweeper is guaranteed, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent cleaning technology, and in particular to an edge cleaning control method, device, equipment and storage medium. Background Art

[0002] With the advancement of science and technology and the development of the Internet, robot technology is becoming more and more mature. For example, cleaning service robots are gradually being widely used in daily life. Cleaning robots are intelligent machines with cleaning functions as the main function. They usually use wireless control technology and operate on rechargeable batteries. They have built-in positioning mechanisms, which enable them to avoid obstacles, know their location, and plan cleaning routes during operation.

[0003] One of the major difficulties of a cleaning robot is edge cleaning. In the prior art, edge cleaning of a cleaning robot is usually performed by setting an edge distance and controlling the cleaning robot through feedback.

[0004] However, due to the error in the calculated slope of the cleaning contour line in the above method, if the set edge distance is too large, missed scanning may occur, and if the set edge distance is too small, the equipment may scratch or collide with obstacles. Summary of the invention

[0005] The present application provides a method, device, equipment and storage medium for controlling edge cleaning, so as to solve the problem of how to avoid missed cleaning and collision in the execution of edge cleaning tasks.

[0006] In a first aspect, the present application provides a method for controlling edge cleaning, which is applied to a sweeping machine, and the method comprises:

[0007] When the sweeping machine performs the edge cleaning task, determining whether the sweeping machine enters a stable state, wherein the stable state is: a difference between a first distance between the sweeping machine and the obstacle at at least one moment before the current moment and a second distance between the sweeping machine and the obstacle at the current moment is less than a preset distance threshold, and a difference between a first contour line slope of the obstacle at the at least one moment and a second contour line slope of the obstacle at the current moment is less than a preset slope threshold;

[0008] If the sweeping machine enters a stable state, based on a preset target edge distance, the second distance, the movement direction of the sweeping machine at the current moment, the slope of the second contour line and a preset adjustment coefficient, a target angular velocity of the sweeping machine at the current moment is determined, and the adjustment coefficient is used to adjust the angular velocity of the sweeping machine;

[0009] Based on the target angular velocity, the edge cleaning task is continued.

[0010] In combination with the first aspect, in some embodiments, determining the target angular velocity of the sweeper at the current moment based on the preset target edge distance, the second distance, the movement direction of the sweeper at the current moment, the slope of the second contour line and the preset adjustment coefficient includes:

[0011] Calculate the control ratio at the current moment based on the target edge distance, the second distance, the movement direction of the sweeper at the current moment, the slope of the second contour line, the adjustment coefficient, and a preset proportional gain;

[0012] Based on the target edge distance, the second distance, the movement direction of the sweeper at the current moment, the third distance between the sweeper and the obstacle at the previous moment, the movement direction of the sweeper at the previous moment, and the third contour line slope of the obstacle at the previous moment, the adjustment coefficient and the preset integral gain, the control integral result at the current moment is calculated;

[0013] Based on the control ratio at the current moment, the control ratio at the previous moment and the preset differential gain, a control differential result at the current moment is calculated;

[0014] The target angular velocity is obtained by adding the control ratio at the current moment, the control integral result at the current moment, and the control differential result at the current moment.

[0015] In combination with the first aspect, in some embodiments, the proportional gain includes a distance proportional gain and a motion direction proportional gain, and the control ratio at the current moment is calculated based on the target edge distance, the second distance, the motion direction of the sweeper at the current moment, the slope of the second contour line, the adjustment coefficient, and the preset proportional gain, including:

[0016] Based on the target edge distance, the second distance, the distance proportional gain and the adjustment coefficient, the distance control ratio at the current moment is calculated;

[0017] Based on the movement direction of the sweeper at the current moment, the slope of the second contour line, and the movement direction proportional gain, a movement direction control ratio at the current moment is calculated;

[0018] The distance control ratio at the current moment and the movement direction control ratio at the current moment are added to obtain the control ratio at the current moment.

[0019] In combination with the first aspect, in some embodiments, the integral gain includes a distance integral gain and a motion direction integral gain, then the control integral result at the current moment is calculated based on the target edge distance, the second distance, the motion direction of the sweeper at the current moment, the third distance between the sweeper and the obstacle at the previous moment, the motion direction of the sweeper at the previous moment, and the third contour line slope of the obstacle at the previous moment, the adjustment coefficient and the preset integral gain, including:

[0020] Based on the target edge distance, the second distance, the distance integral gain, the third distance and the adjustment coefficient, a distance control integral result at the current moment is calculated;

[0021] Based on the movement direction of the sweeper at the current moment, the slope of the second contour line, the movement direction integral gain, the movement direction of the sweeper at the previous moment, and the slope of the third contour line, the movement direction control integral result at the current moment is calculated;

[0022] The distance control integral result at the current moment and the motion direction control integral result at the current moment are added together to obtain the control integral result at the current moment.

[0023] In combination with the first aspect, in some embodiments, the differential gain includes a distance differential gain and a motion direction differential gain, and the control differential result at the current moment is calculated based on the control ratio at the current moment, the control ratio at the previous moment and the preset differential gain, including:

[0024] Based on the target edge distance, the third distance, the distance proportional gain and the adjustment coefficient, the distance control ratio at the last moment is calculated;

[0025] Based on the movement direction of the sweeper at the previous moment, the slope of the third contour line, and the movement direction proportional gain, the movement direction control ratio at the previous moment is calculated;

[0026] Based on the distance control ratio at the current moment, the distance control ratio at the previous moment and the distance differential gain, a distance control differential result at the current moment is calculated;

[0027] Calculate the motion direction control differential result at the current moment based on the motion direction control ratio at the current moment, the motion direction differential gain and the motion direction control ratio at the previous moment;

[0028] The distance control differential result at the current moment and the motion direction control differential result at the current moment are added together to obtain the control differential result at the current moment.

[0029] In combination with the first aspect, in some embodiments, the method further includes:

[0030] According to the coordinate data of at least two moments before the current moment in the coordinate data set of the obstacle acquired in advance, a least square method is used to perform straight line fitting on the coordinates of the obstacle to obtain a slope of the fitting line;

[0031] According to the slope of the fitting straight line and the slope of the contour line of the obstacle at the previous moment, the obtained slope of the contour line of the obstacle at the current moment is updated through a preset slope update formula.

[0032] In combination with the first aspect, in some embodiments, determining whether the sweeping machine enters a stable state includes:

[0033] Acquire a first distance between the sweeping machine and the obstacle at at least one moment before the current moment and a first contour line slope of the obstacle at the at least one moment;

[0034] It is determined whether a difference between each first distance and the second distance is smaller than the distance threshold, and it is determined whether a difference between each first contour line slope and the second contour line slope is smaller than the slope threshold.

[0035] In a second aspect, the present application provides an edge cleaning control device, comprising:

[0036] A first determination module is used to determine whether the sweeping machine enters a stable state when the sweeping machine performs an edge cleaning task, wherein the stable state is: a difference between a first distance between the sweeping machine and the obstacle at at least one moment before the current moment and a second distance between the sweeping machine and the obstacle at the current moment is less than a preset distance threshold, and a difference between a first contour line slope of the obstacle at the at least one moment and a second contour line slope of the obstacle at the current moment is less than a preset slope threshold;

[0037] a second determination module, configured to determine, if the sweeping machine enters a stable state, a target angular velocity of the sweeping machine at a current moment based on a preset target edge distance, the second distance, the movement direction of the sweeping machine at a current moment, the slope of the second contour line, and a preset adjustment coefficient, wherein the adjustment coefficient is used to adjust the angular velocity of the sweeping machine;

[0038] The cleaning module is used to continue to perform the edge cleaning task based on the target angular velocity.

[0039] In conjunction with the second aspect, in some embodiments, the second determining module includes:

[0040] A first calculation unit, configured to calculate a control ratio at a current moment based on the target edge distance, the second distance, the movement direction of the sweeper at a current moment, the slope of the second contour line, the adjustment coefficient, and a preset proportional gain;

[0041] A second calculation unit is used to calculate the control integral result at the current moment based on the target edge distance, the second distance, the movement direction of the sweeper at the current moment, the third distance between the sweeper and the obstacle at the previous moment, the movement direction of the sweeper at the previous moment, and the third contour line slope of the obstacle at the previous moment, the adjustment coefficient and the preset integral gain;

[0042] A third calculation unit, used for calculating the control differential result at the current moment based on the control ratio at the current moment, the control ratio at the previous moment and a preset differential gain;

[0043] The fourth calculation unit is used to add the control proportion at the current moment, the control integral result at the current moment and the control differential result at the current moment to obtain the target angular velocity.

[0044] In combination with the second aspect, in some embodiments, the proportional gain includes a distance proportional gain and a motion direction proportional gain, and the first calculation unit includes:

[0045] A first calculation subunit, configured to calculate a distance control ratio at a current moment based on the target edge distance, the second distance, the distance proportional gain and the adjustment coefficient;

[0046] A second calculation subunit is used to calculate the motion direction control ratio at the current moment based on the motion direction of the sweeper at the current moment, the slope of the second contour line, and the motion direction proportional gain;

[0047] The third calculation subunit is used to add the distance control ratio at the current moment and the movement direction control ratio at the current moment to obtain the control ratio at the current moment.

[0048] In combination with the second aspect, in some embodiments, the integral gain includes a distance integral gain and a motion direction integral gain, and the second calculation unit includes:

[0049] A first calculation subunit, configured to calculate a distance control integral result at a current moment based on the target edge distance, the second distance, the distance integral gain, the third distance and the adjustment coefficient;

[0050] A second calculation subunit is used to calculate the motion direction control integral result at the current moment based on the motion direction of the sweeper at the current moment, the slope of the second contour line, the motion direction integral gain, the motion direction of the sweeper at the previous moment, and the slope of the third contour line;

[0051] The third calculation subunit is used to add the distance control integral result at the current moment and the motion direction control integral result at the current moment to obtain the control integral result at the current moment.

[0052] In combination with the second aspect, in some embodiments, the differential gain includes a distance differential gain and a motion direction differential gain, and the third calculation unit includes:

[0053] A first calculation subunit, configured to calculate the distance control ratio at the last moment based on the target edge distance, the third distance, the distance proportion gain and the adjustment coefficient;

[0054] A second calculation subunit is used to calculate the motion direction control ratio at the last moment based on the motion direction of the sweeper at the last moment, the slope of the third contour line, and the motion direction proportional gain;

[0055] a third calculation subunit, configured to calculate a distance control differential result at a current moment based on the distance control ratio at the current moment, the distance control ratio at the previous moment, and the distance differential gain;

[0056] a fourth calculation subunit, configured to calculate a motion direction control differential result at a current moment based on the motion direction control ratio at the current moment, the motion direction differential gain, and the motion direction control ratio at the previous moment;

[0057] The fifth calculation subunit is used to add the distance control differential result at the current moment and the motion direction control differential result at the current moment to obtain the control differential result at the current moment.

[0058] In conjunction with the second aspect, in some embodiments, the apparatus further includes:

[0059] A fitting module, configured to perform straight line fitting on the coordinates of the obstacle using the least squares method according to the coordinate data of at least two moments before the current moment in the coordinate data set of the obstacle acquired in advance, so as to obtain a slope of the fitting line;

[0060] The updating module is used to update the obtained slope of the contour line of the obstacle at the current moment according to the slope of the fitting straight line and the slope of the contour line of the obstacle at the previous moment through a preset slope updating formula.

[0061] In conjunction with the second aspect, in some embodiments, the first determining module includes:

[0062] an acquisition unit, configured to acquire a first distance between the sweeping machine and the obstacle at at least one moment before a current moment and a first contour line slope of the obstacle at the at least one moment;

[0063] The determination unit is used to determine whether the difference between each first distance and the second distance is smaller than the distance threshold, and determine whether the difference between each first contour line slope and the second contour line slope is smaller than the slope threshold.

[0064] In a third aspect, the present application provides a sweeping machine, comprising: a processor, and a memory communicatively connected to the processor, a laser radar sensor, a line laser sensor, and a PSD / TOF sensor;

[0065] The memory stores computer-executable instructions;

[0066] The processor executes the computer-executable instructions stored in the memory to implement the edge cleaning control method described in any one of the first aspects.

[0067] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the edge cleaning control method described in any of the aforementioned aspects.

[0068] In a fifth aspect, the present application provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the edge cleaning control method described in any of the aforementioned aspects.

[0069] The edge cleaning control method, device, equipment and storage medium provided by the present application determine whether the sweeper has entered a stable state when the sweeper performs an edge cleaning task. If the sweeper enters a stable state, the target angular velocity of the sweeper at the current moment is determined based on the preset target edge distance, the second distance, the direction of motion of the sweeper at the current moment, the slope of the second contour line and the preset adjustment coefficient, and the edge cleaning task is continued based on the target angular velocity. By determining the stable state of the sweeper, the stable motion of the sweeper is ensured, and after entering the stable state, the angular velocity of the sweeper is controlled and calculated by using a control method with a set adjustment coefficient, thereby avoiding the sweeper from missing objects when performing the edge cleaning task and colliding with obstacles, thereby ensuring the cleaning quality of the sweeper and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0071] Figure 1 An application scenario diagram of the edge cleaning control method provided in an embodiment of the present application;

[0072] Figure 2 A flow chart of the first embodiment of the edge cleaning control method provided in the embodiment of the present application;

[0073] Figure 3 A flow chart of a second embodiment of the edge cleaning control method provided in the embodiment of the present application;

[0074] Figure 4 A flow chart of a third embodiment of the edge cleaning control method provided in the embodiment of the present application;

[0075] Figure 5 A flowchart of a fourth embodiment of the edge cleaning control method provided in an embodiment of the present application;

[0076] Figure 6 A flowchart of a fifth embodiment of the edge cleaning control method provided in an embodiment of the present application;

[0077] Figure 7 A flow chart of a sixth embodiment of the edge cleaning control method provided in the embodiment of the present application;

[0078] Figure 8 A flow chart of an exemplary embodiment of an edge cleaning control method provided in an embodiment of the present application;

[0079] Fig. 9 A schematic diagram of the structure of a first embodiment of the edge cleaning control device provided in an embodiment of the present application;

[0080] Fig.10 A schematic diagram of the structure of a second embodiment of the edge cleaning control device provided in an embodiment of the present application;

[0081] Fig.11 A schematic diagram of the structure of a third embodiment of the edge cleaning control device provided in an embodiment of the present application;

[0082] Fig.12 A schematic diagram of the structure of a fourth embodiment of the edge cleaning control device provided in an embodiment of the present application;

[0083] Fig.13 A schematic diagram of the structure of a fifth embodiment of the edge cleaning control device provided in an embodiment of the present application;

[0084] Fig.14A schematic diagram of the structure of a sixth embodiment of the edge cleaning control device provided in an embodiment of the present application;

[0085] Fig.15 A structural schematic diagram of Embodiment 7 of the edge cleaning control device provided in the embodiment of the present application;

[0086] Fig.16 A schematic diagram of the structure of the sweeping machine provided in an embodiment of the present application.

[0087] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0088] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0089] A sweeping robot is a smart home appliance that can automatically vacuum the floor. Because it can detect factors such as room size, furniture placement, floor cleanliness, and rely on built-in programs to develop a reasonable cleaning route, it has a certain degree of intelligence, so it is called a robot. A sweeping robot is a type of smart home appliance that can automatically complete floor cleaning in the room with a certain degree of artificial intelligence. Generally, it uses brushing and vacuuming to absorb the debris on the ground into its own garbage collection box, thereby completing the function of floor cleaning. With the continuous improvement of science and technology, consumers' demands for sweeping robots are becoming more and more complex and diverse, so the cleaning function of sweeping robots has gradually become a goal that people continue to optimize. Especially for the edge cleaning of the sweeper, the prior art usually extracts point cloud data to fit the obstacle contour line, and then sets the edge distance, and controls the sweeper through the control algorithm to achieve edge cleaning. However, the error between the obstacle contour line and the real contour line will make the movement of the sweeper unstable. If the edge distance is set too large, the sweeping will be missed. If the edge distance is set too small, the body of the sweeper will collide with the obstacle, thereby affecting the cleaning ability of the sweeper and resulting in a poor user experience.

[0090] In response to the above problems, the present application provides a control method, device, equipment and storage medium for edge cleaning, thereby effectively reducing the degree of missed sweeps and the number of collisions when the sweeper is cleaning along the edge, and providing strong support for further improving the cleaning ability of the sweeper. Specifically, existing sweepers usually achieve edge cleaning by fitting the contour of the obstacle, and then based on the preset edge distance, through a control algorithm. However, due to the error of the contour, the sweeper will move unstably, resulting in missed sweeps or collisions. Taking these problems into consideration, the inventor studied whether it is possible to judge the stable state of the sweeper when it performs the edge cleaning task, and improve the control algorithm after the sweeper is in stable motion, and achieve extreme edge cleaning based on the improved control algorithm, thereby reducing the degree of missed sweeps and the number of collisions when the sweeper is cleaning along the edge. Based on this, the technical solution of the present application is proposed.

[0091] Figure 1 The application scenario diagram of the edge cleaning control method provided in the embodiment of the present application is as follows: Figure 1 As shown, the scene includes at least obstacles and a sweeper, wherein the sweeper is equipped with multiple sensors, for example, a laser radar sensor is installed on the top of the sweeper, a line laser sensor is installed in front, and a position sensitive detector (PSD) or a time of flight (TOF) detection sensor is installed on the right. The effective detection distance of the laser radar is far and the frame rate is low; the detection range of the line laser sensor is a fan-shaped plane, and the PSD / TOF sensor can only detect the distance of obstacles on the ray emitted from the emission point. Due to the low frame rate of the laser radar sensor and the large error in the detection of obstacle data at close range, and the detection range of the line laser sensor cannot effectively cover the obstacles with a certain height of 2cm outside the right fuselage, its detection accuracy is affected by the material and has errors. Although the detection distance of the PSD / TOF sensor is short, its stability is better, and the installation position is on the right side, which is conducive to the detection of the distance of the obstacle on the right side.

[0092] LiDAR and line laser sensors are mainly used to obtain the contour information of the wall or obstacles required for edge cleaning before edge cleaning. During the operation of the sweeper, the LiDAR sensor, line laser sensor, and PSD / TOF sensor will fill the detection data into the obstacle map in real time. Since there is no detection sensor on the left side of the sweeper, it is stipulated that the sweeper will only clean the right edge when cleaning along the edge.

[0093] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0094] Figure 2 The flowchart of the first embodiment of the edge cleaning control method provided in the present application is as follows: Figure 2 As shown, the method can be used for a sweeping machine, and the method specifically includes:

[0095] S201: When the sweeping machine performs the edge cleaning task, determine whether the sweeping machine enters a stable state.

[0096] In this step, in order to make the sweeping machine perform stable movement when performing the edge cleaning task, thereby avoiding missed sweeps and frequent collisions with obstacles, its stable state is pre-judged when it performs the edge cleaning task.

[0097] Specifically, the above-mentioned sweeping machine enters a stable state, which means that the sweeping machine moves stably during the cleaning work and does not deviate too much from the obstacle contour line to the left or right. Then, the first distance between the sweeping machine and the obstacle at at least one moment before the current moment and the first contour line slope of the obstacle at at least one moment are obtained, and then it is determined whether the difference between each first distance and the second distance is less than a preset distance threshold, and whether the difference between each first contour line slope and the second contour line slope is less than a slope threshold. If the difference between the first distance and the second distance between the sweeping machine and the obstacle at at least one moment before the current moment is less than the distance threshold, and the difference between the first contour line slope of the obstacle at at least one moment and the second contour line slope of the obstacle at the current moment is less than the slope threshold, then it is determined that the sweeping machine enters a stable state. Wherein, the second distance is the distance between the sweeping machine and the obstacle at the current moment.

[0098] S202: If the sweeping machine enters a stable state, the target angular velocity of the sweeping machine at the current moment is determined based on the preset target edge distance, the second distance, the movement direction of the sweeping machine at the current moment, the slope of the second contour line and the preset adjustment coefficient.

[0099] In this step, after determining that the sweeping machine has entered a stable state, it means that the sweeping machine has been moving stably. Therefore, the motion of the sweeping machine can be controlled according to a preset control algorithm, that is, according to the preset target edge distance, the second distance, the movement direction of the sweeping machine at the current moment, the second contour line slope and the preset adjustment coefficient, the target angular velocity of the sweeping machine at the current moment is calculated, wherein the target angular velocity includes the magnitude and direction of the angular velocity.

[0100] Specifically, based on the target edge distance, the second distance, the movement direction of the sweeper at the current moment, the slope of the second contour line, the adjustment coefficient and the preset proportional gain, the control ratio at the current moment is calculated, and then based on the target edge distance, the second distance, the movement direction of the sweeper at the current moment, the third distance between the sweeper and the obstacle at the previous moment, the movement direction of the sweeper at the previous moment, and the slope of the third contour line of the obstacle at the previous moment, the adjustment coefficient and the preset integral gain, the control integral result at the current moment is calculated, and then based on the control ratio at the current moment, the control ratio at the previous moment and the preset differential gain, the control differential result at the current moment is calculated. It is best to add the control ratio at the current moment, the control integral result at the current moment and the control differential result at the current moment to obtain the target angular velocity.

[0101] Optionally, the target angular velocity of the sweeper at time t is expressed as W t ′ , then W can be calculated by the following formula t ′ Perform the calculation:

[0102]

[0103] Among them, K pd and K pθ is the proportional gain, K Id and K Iθ is the integral gain, K Dd and K Dθ is the differential gain, ε2 is the distance along the target edge, d t is the distance between the sweeper and the obstacle at time t, θ t is the moving direction of the sweeper at time t, φ t is the slope of the obstacle contour at time t, μ and τ p is the adjustment coefficient, d t-1 is the distance between the sweeper and the obstacle at time t-1, θ t-1 is the moving direction of the sweeper at time t-1, φ t-1 It is the slope of the obstacle contour line at time t-1, wherein the target edge distance can be within 10 mm, thereby achieving extreme edge cleaning within the time limit. However, the setting of the target edge distance is also related to the actual obstacle and the configuration of the sweeper, and the embodiment of the present application does not make any specific limitation.

[0104] S203: Based on the target angular velocity, continue to perform the edge cleaning task.

[0105] In this step, after the target angular velocity is obtained through the above steps, the sweeper continues to perform the edge cleaning task based on the magnitude and direction of the target angular velocity at the current moment.

[0106] Specifically, the sweeping machine sends the target angular velocity to the motor of the sweeping machine for control, thereby performing the edge cleaning task.

[0107] It should be noted that when the sweeper is performing edge cleaning tasks, after determining that it has entered a stable state, it must calculate the target angular velocity at the current moment based on the above steps at each moment, and then move along the edge until the cleaning task is completed.

[0108] Exemplarily, the distance between the above-mentioned sweeper and the obstacle is the data collected by the PSD / TOF detection sensor installed on the right side of the sweeper. The slope of the obstacle's contour is calculated based on the data collected by the lidar sensor installed on the top and the line laser sensor directly in front. The movement direction of the sweeper is determined according to the direction of the target angular velocity at the previous moment.

[0109] In a possible implementation, the outline of the obstacle may be updated during the process of determining the stable state or may not be updated after the stable state.

[0110] Optionally, the adjustment coefficient is used to adjust the angular velocity of the sweeping machine. In the above-mentioned target angular velocity calculation process, the adjustment coefficient can be automatically adjusted in real time according to the state of the sweeping machine. When the sweeping machine is close to an obstacle along the edge and there is a risk of collision, the sweeping machine is controlled to stay away from the obstacle.

[0111] It should be noted that the adjustment coefficient can not only control the sweeper to stay away from obstacles, but also control the distance between the sweeper and obstacles to remain at the target edge distance, thereby ensuring that the sweeper does not miss any obstacles.

[0112] The edge cleaning control method provided in this embodiment determines whether the sweeping machine has entered a stable state when the sweeping machine performs the edge cleaning task. If the sweeping machine enters a stable state, the target angular velocity of the sweeping machine at the current moment is determined based on the preset target edge distance, the second distance, the movement direction of the sweeping machine at the current moment, the slope of the second contour line and the preset adjustment coefficient, and the edge cleaning task is continued based on the target angular velocity. By determining the stable state of the sweeping machine, the movement stability of the sweeping machine is ensured, and after entering the stable state, the angular velocity of the sweeping machine is controlled and calculated by using a control method with a set adjustment coefficient, thereby avoiding the sweeping machine from missing objects when performing the edge cleaning task and colliding with obstacles, thereby ensuring the cleaning quality of the sweeping machine and improving the user experience.

[0113] Figure 3 The flowchart of the second embodiment of the edge cleaning control method provided in the present application is as follows: Figure 3 As shown, based on the above embodiment, step 202 specifically includes:

[0114] S301: Calculate the control ratio at the current moment based on the target edge distance, the second distance, the movement direction of the sweeper at the current moment, the slope of the second contour line, the adjustment coefficient and the preset proportional gain.

[0115] In this step, the sweeper is accurately controlled to perform extreme edge cleaning, and its main goal is to enable the sweeper to clean along the edge of the obstacle at a constant distance. The error can be quickly reduced by calculating the control ratio at the current moment.

[0116] Specifically, since the key factors of the sweeping machine's movement include the distance from the obstacle and the direction of movement, the distance control ratio at the current moment is calculated based on the target edge distance, the second distance, the distance proportional gain and the adjustment coefficient, and then the movement direction control ratio at the current moment is calculated based on the movement direction of the sweeping machine at the current moment, the slope of the second contour line, and the movement direction proportional gain. The distance control ratio at the current moment and the movement direction control ratio at the current moment are added together to obtain the control ratio at the current moment.

[0117] S302: Based on the target edge distance, the second distance, the movement direction of the sweeper at the current moment, the third distance between the sweeper and the obstacle at the previous moment, the movement direction of the sweeper at the previous moment, and the third contour line slope of the obstacle at the previous moment, the adjustment coefficient and the preset integral gain, calculate the control integral result at the current moment.

[0118] In this step, the control ratio at the current moment is obtained by calculating the above-mentioned control ratio. However, only using the control proportional term to control the movement of the sweeping machine will cause the sweeping machine system to oscillate or become unstable. Therefore, it is also necessary to calculate the control integral term at the current moment, so as to eliminate the steady-state error, that is, the error that still exists after stabilization. The control integral term can make the control of the sweeping machine more lasting until the error is eliminated.

[0119] Specifically, based on the target edge distance, the second distance, the distance integral gain, the third distance and the adjustment coefficient, the distance control integral result at the current moment is calculated, and then based on the movement direction of the sweeper at the current moment, the slope of the second contour line, the movement direction integral gain, the movement direction of the sweeper at the previous moment, and the slope of the third contour line, the movement direction control integral result at the current moment is calculated, and finally, the distance control integral result at the current moment and the movement direction control integral result at the current moment are added to obtain the control integral result at the current moment.

[0120] S303: Based on the control ratio at the current moment, the control ratio at the previous moment and the preset differential gain, a control differential result at the current moment is calculated.

[0121] In this step, the control ratio at the current moment and the control integral result at the current moment are calculated through the above two steps. Although the control ratio and the control integral result can also be used to control the movement of the sweeper, the response speed is slow when only the control ratio and the control integral result are used for control, and the error change cannot be predicted, especially in the extreme edge cleaning task of the sweeper, which requires rapid adjustment, and causes the system response to overshoot (i.e., exceed the target value) and then oscillate. Since the control integral result will continue to accumulate errors until the error is completely eliminated, this may cause the sweeper to make unnecessary adjustments when the distance from the obstacle during movement is close to the target edge distance. Therefore, in order to predict the error change trend, improve the response speed and enhance the robustness, it is also necessary to calculate the control differential term.

[0122] Specifically, based on the target edge distance, the third distance, the distance proportional gain and the adjustment coefficient, the distance control ratio at the previous moment is calculated, and then based on the movement direction of the sweeper at the previous moment, the slope of the third contour line, and the movement direction proportional gain, the movement direction control ratio at the previous moment is calculated, and then based on the distance control ratio at the current moment, the distance control ratio at the previous moment and the distance differential gain, the distance control differential result at the current moment is calculated, and then based on the movement direction control ratio at the current moment, the movement direction differential gain and the movement direction control ratio at the previous moment, the movement direction control differential result at the current moment is calculated, and finally the distance control differential result at the current moment and the movement direction control differential result at the current moment are added to obtain the control differential result at the current moment.

[0123] S304: Add the control ratio at the current moment, the control integral result at the current moment, and the control differential result at the current moment to obtain the target angular velocity.

[0124] In this step, by calculating the control proportional term, the control integral term and the control differential term, the control proportion at the current moment, the control integral result at the current moment and the control differential result at the current moment are obtained, and finally the three are added together to obtain the target angular velocity.

[0125] The edge cleaning control method provided in this embodiment calculates the control ratio at the current moment based on the target edge distance, the second distance, the movement direction of the sweeper at the current moment, the slope of the second contour line, the adjustment coefficient and the preset proportional gain, calculates the control differential result at the current moment based on the control ratio at the current moment, the control ratio at the previous moment and the preset differential gain, calculates the control differential result at the current moment based on the control ratio at the current moment, the control ratio at the previous moment and the preset differential gain, and adds the control ratio at the current moment, the control integral result at the current moment and the control differential result at the current moment to obtain the target angular velocity. Through the above calculation of the target angular velocity based on the control ratio, control integral and control differential, not only can the control of the edge distance be accurately achieved, avoiding missed sweeps, but also the response speed is improved, and by adding the adjustment coefficient in the calculation process to adjust the motion, the collision between the sweeper and the obstacle in the case of extreme edge contact is avoided.

[0126] Figure 4 The flowchart of the third embodiment of the edge cleaning control method provided in the embodiment of the present application is as follows: Figure 4 As shown, based on the above embodiment, the proportional gain includes a distance proportional gain and a motion direction proportional gain, then step S301 specifically includes:

[0127] S401: Based on the target edge distance, the second distance, the distance proportion gain and the adjustment coefficient, the distance control proportion at the current moment is calculated.

[0128] S402: Based on the movement direction of the sweeper at the current moment, the slope of the second contour line, and the movement direction proportional gain, calculate the movement direction control ratio at the current moment.

[0129] S403: Add the distance control ratio at the current moment and the movement direction control ratio at the current moment to obtain the control ratio at the current moment.

[0130] When calculating the control ratio of the sweeper at the current moment, it can be calculated using the following formula:

[0131]

[0132] P θ,t =K pθ ·(θ t -φ t )

[0133] P′ t =P′ d,t +P θ,t

[0134] Among them, P′ d,t is the distance control ratio, Pθ,t is the motion direction control ratio, P′ t To control the ratio, K pd is the distance proportional gain, ε2 is the target edge distance, d t is the distance between the sweeper and the obstacle at time t, θ t is the moving direction of the sweeper at time t, φ t is the slope of the obstacle contour at time t.

[0135] For the very close distance adjustment items, namely μ and τ p It is the adjustment factor of the very close distance adjustment item.

[0136] When t The closer it is to 0, that is, the closer the sweeper is to the edge, the greater the adjustment item will be, which will affect the sweeper to rotate counterclockwise and stay away from obstacles to avoid collision.

[0137] The edge cleaning control method provided in this embodiment calculates the distance control ratio at the current moment based on the target edge distance, the second distance, the distance proportional gain and the adjustment coefficient, and calculates the motion direction control ratio at the current moment based on the motion direction of the sweeper at the current moment, the slope of the second contour line, and the motion direction proportional gain, and adds the distance control ratio at the current moment and the motion direction control ratio at the current moment to obtain the control ratio at the current moment. By adding the very close distance adjustment item in the control ratio calculation process, the obstacle avoidance capability of the sweeper is significantly improved, the system stability is enhanced, the cleaning effect is optimized, and the control logic is simplified.

[0138] Figure 5 The flowchart of the fourth embodiment of the edge cleaning control method provided in the embodiment of the present application is as follows: Figure 5 As shown, based on the above embodiments, the integral gain includes a distance integral gain and a motion direction integral gain, and step S302 specifically includes:

[0139] S501: Based on the target edge distance, the second distance, the distance integral gain, the third distance and the adjustment coefficient, the distance control integral result at the current moment is calculated.

[0140] S502: Based on the movement direction of the sweeper at the current moment, the slope of the second contour line, the movement direction integral gain, the movement direction of the sweeper at the previous moment, and the slope of the third contour line, calculate the movement direction control integral result at the current moment.

[0141] S503: Add the distance control integral result at the current moment and the motion direction control integral result at the current moment to obtain the control integral result at the current moment.

[0142] When calculating the control integral result of the sweeper at the current moment, it can be calculated using the following formula:

[0143]

[0144] I θ,t =K Iθ ·(θ t -φ t +θ t-1 -φ t-1 )

[0145] I t =I′ d,t +I θ,t

[0146] Among them, I′ d,t is the distance control integral result, I θ,t is the integral result of motion direction control, I t To control the integral result, K Id is the distance integral gain, K Iθ is the integral gain in the direction of motion, d t is the distance between the sweeper and the obstacle at time t, θ t is the moving direction of the sweeper at time t, φ t is the slope of the obstacle contour at time t, μ and τ p is the adjustment coefficient of the very close distance adjustment item, d t-1 is the distance between the sweeper and the obstacle at time t-1, θ t-1 is the moving direction of the sweeper at time t-1, φ t-1 is the slope of the obstacle contour at time t-1.

[0147] The edge cleaning control method provided in this embodiment calculates the distance control integral result at the current moment based on the target edge distance, the second distance, the distance integral gain, the third distance and the adjustment coefficient, and then calculates the motion direction control integral result at the current moment based on the motion direction of the sweeper at the current moment, the slope of the second contour line, the motion direction integral gain, the motion direction of the sweeper at the previous moment, and the slope of the third contour line. Finally, the distance control integral result at the current moment and the motion direction control integral result at the current moment are added to obtain the control integral result at the current moment. By adding the very close distance adjustment term in the above control integral calculation process, the cumulative effect is enhanced. As the distance between the sweeper and the obstacle continues to decrease, the adjustment term will continue to accumulate, resulting in a significant increase in the output of the integral term, thereby prompting the sweeper to adjust the motion state faster and improving stability, so that the sweeper can achieve a smoother control transition when approaching an obstacle, while suppressing the occurrence of overshoot and oscillation to a certain extent.

[0148] Figure 6 The flowchart of the fifth embodiment of the edge cleaning control method provided in the embodiment of the present application is as follows: Figure 6 As shown, based on the above embodiments, the differential gain includes a distance differential gain and a motion direction differential gain, and step S303 specifically includes:

[0149] S601: Based on the target edge distance, the third distance, the distance proportion gain and the adjustment coefficient, the distance control proportion at the previous moment is calculated.

[0150] S602: Based on the movement direction of the sweeping machine at the previous moment, the slope of the third contour line, and the movement direction proportional gain, the movement direction control ratio at the previous moment is calculated.

[0151] S603: Based on the distance control ratio at the current moment, the distance control ratio at the previous moment and the distance differential gain, a distance control differential result at the current moment is calculated.

[0152] S604: Based on the motion direction control ratio at the current moment, the motion direction differential gain and the motion direction control ratio at the previous moment, a motion direction control differential result at the current moment is calculated.

[0153] S605: Add the distance control differential result at the current moment and the motion direction control differential result at the current moment to obtain the control differential result at the current moment.

[0154] When calculating the control differential result of the sweeper at the current moment, it can be calculated by the following formula:

[0155] D′ d,t =K Dd ·(P′ d,t -P′ d,t-1 )

[0156] D θ,t =K Dθ ·(P θ,t -P θ,t-1 )

[0157] D′ t =D′ d,t +D θ,t

[0158] Among them, D′ d,t is the distance control differential result, D θ,t is the differential result of motion direction control, D′ t To control the differential result, K Dd is the distance differential gain, K Dθ is the differential gain in the direction of motion, P′ d,t is the distance control ratio at time t, P′d,t-1 is the distance control ratio at time t-1, P θ,t is the motion direction control ratio at time t, P θ,t-1 It is the motion direction control ratio at time t-1.

[0159] The edge cleaning control method provided in this embodiment calculates the distance control ratio at the last moment based on the target edge distance, the third distance, the distance proportional gain and the adjustment coefficient, calculates the motion direction control ratio at the last moment based on the motion direction of the sweeper at the last moment, the slope of the third contour line and the motion direction proportional gain, calculates the distance control differential result at the current moment based on the distance control ratio at the current moment, the distance control ratio at the last moment and the distance differential gain, calculates the motion direction control differential result at the current moment based on the motion direction control ratio at the current moment, the motion direction differential gain and the motion direction control ratio at the last moment, and adds the distance control differential result at the current moment to the motion direction control differential result at the current moment to obtain the control differential result at the current moment. By performing the control differential calculation based on the control ratio at the current moment and the previous moment, the sweeper is more sensitive to the change of the error signal. This helps to predict and respond to the changing trend of the error in advance, thereby speeding up the response speed of the sweeper, and also helps to suppress the oscillation in the response of the sweeper, especially when the error signal changes rapidly. By optimizing the adjustment coefficient of the adjustment item, the response speed and stability of the sweeper can be balanced to avoid excessive oscillation. The rate of change of the error can be evaluated more accurately and the control signal can be adjusted accordingly. This helps to reduce the steady-state error of the sweeper and improve control accuracy.

[0160] Optionally, the gains mentioned in the above embodiments can be achieved according to the actual application scenario by trial and error, Ziegler-Nichols method, optimization algorithm (such as genetic algorithm, particle swarm optimization), etc. The goal of adjusting these parameters is to make the system achieve fast response, good stability, small overshoot and small steady-state error performance.

[0161] Figure 7 The flowchart of the sixth embodiment of the edge cleaning control method provided in the present application is as follows: Figure 7 As shown, based on the above embodiments, step S201 specifically includes:

[0162] S701: Obtain a first distance between the sweeping machine and an obstacle at least at a time before the current time and a first contour line slope of the obstacle at at least a time.

[0163] S702: Determine whether the difference between each first distance and the second distance is less than a distance threshold, and determine whether the difference between each first contour line slope and the second contour line slope is less than a slope threshold.

[0164] The stable state of the sweeping machine is determined, that is, the motion state of the sweeping machine is determined. In the edge cleaning task of the sweeping machine, the sweeping machine can stably move along the edge according to the preset edge distance, which means that the sweeping machine has entered a stable state.

[0165] The stability of the sweeping machine's movement is related to the contour of the obstacle and the distance between the sweeping machine and the obstacle. The first distance between the sweeping machine and the obstacle at at least one moment before the current moment and the first contour slope of the obstacle at at least one moment are obtained, and the first distance and the second distance at each moment are compared respectively, and the first contour slope and the second contour slope at each moment are compared respectively. The distance threshold and the slope threshold are set in advance. If the difference between each first distance and the second distance is less than the distance threshold, and the difference between each first contour slope and the second contour slope is less than the slope threshold, it means that the sweeping machine is moving, and it is determined that the sweeping machine has entered a stable state.

[0166] The specific implementation method of obtaining the first distance and the first contour line slope is the same as that in the aforementioned embodiment, and will not be repeated here.

[0167] Optionally, in the process of determining whether the sweeper has entered a stable state, the slope of the obstacle's contour at the current moment can be updated in real time, thereby improving the accuracy of edge cleaning, specifically including:

[0168] According to the coordinate data of at least two moments before the current moment in the coordinate data set of the obstacle acquired in advance, the coordinates of the obstacle are fitted with a straight line using the least square method to obtain the slope of the fitting straight line.

[0169] Since there is an error between the obstacle contour line calculated from the data collected by the sensors of the sweeping machine and the actual contour line, it will affect the accuracy of the sweeping machine in performing the edge cleaning task. In the process of determining that the sweeping machine has entered a stable state, the coordinates of the obstacle can be fitted with a straight line based on the coordinate data of at least two moments before the current moment in the pre-acquired coordinate data set of the obstacle, that is, the slope of the obstacle's contour line can be fitted to obtain the slope of the fitted straight line.

[0170] Specifically, the least square method may be used to perform straight line fitting based on the collected coordinate data of the obstacle.

[0171] Exemplarily, the least squares formula is set to Ax+By+C=0, and the error is set to:

[0172]

[0173] It is necessary to determine A, B, and C so that E is minimized, so the partial derivatives of E with respect to A, B, and C are calculated respectively, and the aura is equal to 0.

[0174] For the convenience of calculation, the above least squares formula is transformed to y=mx+b, then E is transformed to:

[0175]

[0176] Taking partial derivatives of m and b and making them equal to 0, we can get:

[0177]

[0178] Solving the above system of equations, we get:

[0179]

[0180] Among them, (x i ,y i ) represents the coordinate data of the obstacle at the i-th moment.

[0181] According to the slope of the fitting line and the slope of the obstacle's contour line at the previous moment, the obtained slope of the obstacle's contour line at the current moment is updated through a preset slope update formula.

[0182] The slope of the fitted straight line is calculated in the above manner, and then the slope of the contour line at the current moment is updated according to a preset slope update formula.

[0183] The slope update formula is expressed as:

[0184]

[0185] Among them, φ t is the slope of the updated contour line at time t, φ t-1 is the slope of the contour line at time t-1, To fit the slope of the straight line, λ∈[0,1] represents the update amplitude of the slope of the obstacle contour line. When λ approaches 1, it means that the slope of the obstacle contour line is more inclined to fit the slope of the straight line.

[0186] It should be noted that a distance standard value is preset, and the coordinates of the obstacle are fitted once every distance standard value, and the slope of the contour line is updated after the fitting is successful.

[0187] The edge cleaning control method provided in this embodiment obtains the first distance between the sweeper and the obstacle at at least one moment before the current moment and the first contour line slope of the obstacle at at least one moment, determines whether the difference between each first distance and the second distance is less than the distance threshold, and determines whether the difference between each first contour line slope and the second contour line slope is less than the slope threshold. The stable state of the sweeper is determined in the above manner, and the contour line slope at each moment is updated in real time during the determination process, thereby reducing the impact of the contour line slope error on the stability of the sweeper's movement, improving the stability of the sweeper, and avoiding missed sweeps.

[0188] Figure 8 A flow chart of an exemplary embodiment of the edge cleaning control method provided in the present application is shown as follows: Figure 8 As shown, taking a wall as an obstacle as an example, the method includes two stages, and the specific implementation methods include:

[0189] Phase 1:

[0190] S801: Set the target edge distance to distance 1.

[0191] S802: Use PID control.

[0192] S803: Output the magnitude and direction of the control angular velocity.

[0193] S804: Collect PSD / TOF sensor detection data.

[0194] S805: Update the slope of the right wall line at intervals.

[0195] S806: Whether the slope is stable and whether the distance along the edge is stable at distance 1.

[0196] When the sweeper is started to perform the edge cleaning task, it first enters the first stage of the sweeper's operation, and performs a stabilization adjustment on the sweeper so that the sweeper enters a stable state.

[0197] Specifically, the target distance along the edge is set as distance 1. According to distance 1, the sweeping machine is controlled by the PID algorithm, that is, the angular velocity of the sweeping machine is calculated by the PID algorithm. During the movement of the sweeping machine, the PSD / TOF sensor installed on the right side collects the coordinate data of the obstacle in real time, and then calculates the distance between the sweeping machine and the obstacle. In this process, a certain distance is preset, and the slope of the right wall line is updated every certain distance, so as to judge in real time whether the distance along the edge during the movement of the sweeping machine is stable at distance 1, and whether the slope of the right wall line at n moments before the current moment is also within the preset error range with the slope of the right wall line at the current moment, where n is an integer greater than 2.

[0198] If the above conditions are met, the sweeper will enter the second stage, which is the extreme edge cleaning state.

[0199] Among them, the angular velocity of the sweeper can be calculated by the PID algorithm, which can be achieved in the following ways:

[0200] The PID algorithm is used to control the angular velocity and direction of the sweeper. The PID algorithm mainly consists of three parts: proportional (P) control, integral (I) control and differential (D) control.

[0201] The control of the ratio (P) of the sweeper's motion along the edge is divided into the ratio of the distance difference between the sweeper and the target edge (P d ) control and the ratio of the angle difference between the sweeper's movement direction and the wall contour direction (P θ ) control. The ratio P at time t t The calculation formula is as follows.

[0202] P d,t =K pd ·(ε1-d t )

[0203] P θ,t =K pθ ·(θ t -φ t )

[0204] P t =P d,t +P θ,t

[0205] Among them, K pd is the distance proportional gain, K pθ is the proportional gain in the direction of motion, ε1 is the distance 1, d t is the distance between the sweeper and the wall at time t, θ t is the moving direction of the sweeper at time t, φ t is the slope of the wall contour at time t.

[0206] The integral control for the sweeper's motion along the edge is divided into the integral of the distance difference between the sweeper and the target along the edge (I d ) control and the integral of the angle difference between the sweeper's motion direction and the wall contour direction (I θ ) control. The calculation formula of the integral (I) is simplified, and only the error at the previous moment is accumulated. The integral I at time t t The calculation formula is as follows.

[0207] I d,t =K Id ·(ε1-d t +ε1-d t-1 )

[0208] I θ,t =K Iθ ·(θ t -φ t +θ t-1 -φ t-1 )

[0209] I t =I d,t +I θ,t

[0210] Among them, K Id is the distance integral gain, K Iθ is the integral gain in the direction of motion, d t is the distance between the sweeper and the wall at time t, θ t is the moving direction of the sweeper at time t, φ t is the slope of the wall contour at time t, d t-1 is the distance between the sweeper and the wall at time t-1, θ t-1 is the moving direction of the sweeper at time t-1, φ t-1 is the slope of the wall contour at time t-1.

[0211] The differential (D) control for the sweeper's motion along the edge is divided into the differential (D) of the difference between the sweeper and the distance 1 d ) control and the differential of the angle difference between the sweeper's motion direction and the wall contour direction (D θ ) control. The differential D at time t t The calculation formula is as follows.

[0212] D d.t =K Dd ·(P d,t -P d,t-1 )

[0213] D θ.t =K Dθ ·(P θ,t -P θ,t-1 )

[0214] D t =D d.t +D θ.t

[0215] Among them, K Dd is the distance differential gain, K Dθ is the differential gain in the direction of motion, P d,t is the distance ratio at time t, P d,t-1 is the distance ratio at time t-1, P θ,t is the motion direction ratio at time t, P θ,t-1 is the motion direction ratio at time t-1.

[0216] Combining the above formula, the formula for calculating the angular velocity of the sweeper at time t is as follows.

[0217] W t =P t +I t +D t

[0218] Among them, W t Indicates the magnitude and direction of the angular velocity of the sweeper. When W t When >0, it means the sweeper rotates counterclockwise, otherwise it means the sweeper rotates clockwise.

[0219] Phase 2:

[0220] S807: Set the target edge distance to distance 2.

[0221] S808: Add very close distance adjustment item in PID.

[0222] S809: Use improved PID for control.

[0223] S810: Output the magnitude and direction of the control angular velocity.

[0224] After the sweeper is stable in the first stage, it will perform extreme edge cleaning in the second stage. The target edge distance is set to distance 2, where distance 2 is smaller than distance 1. Based on the PID control in the first stage, an extreme close distance adjustment item is added, and the angular velocity is adjusted by the adjustment coefficient to avoid collision with the wall on the right side of the sweeper.

[0225] The specific implementation method of this stage is the same as that of the above-mentioned embodiments, and will not be repeated here.

[0226] The edge cleaning control method provided in this embodiment, when the sweeping machine performs the edge cleaning task, controls the sweeping machine to work based on the PID algorithm by setting the distance 1, and updates the wall line slope in real time during the working process, so that the sweeping machine quickly enters the stable state. After the sweeping machine enters the stable state, the target edge distance is set to distance 2, and an extremely close distance adjustment item is added on the basis of the PID algorithm to control the sweeping machine to perform the extreme edge cleaning task. This not only meets the algorithm requirements for controlling the sweeping machine to perform extreme edge cleaning, but also significantly reduces the degree of missed sweeps and the number of collisions during the edge cleaning process of the sweeping machine, thereby achieving a stable, smooth and efficient edge cleaning effect.

[0227] It should be noted that the "previous moment" described in the aforementioned method embodiments includes, for example, the third distance between the sweeper and the obstacle at the previous moment, the direction of movement of the sweeper at the previous moment, the third contour line slope of the obstacle at the previous moment, and "at least one moment before the current moment", for example, the first distance between the sweeper and the obstacle at least one moment before the current moment, and the first contour line slope of the obstacle at at least one moment. Among them, the previous moment is a moment adjacent to the current moment in at least one moment before the current moment. For example, if the current moment is moment t, then at least one moment before the current moment is {t-1, t-2, t-3, t-4, ..., tn}, and n is an integer greater than or equal to 1, then the previous moment refers to moment t-1.

[0228] Fig. 9 The schematic diagram of the structure of the first embodiment of the edge cleaning control device provided in the present application is as follows: Fig. 9 As shown, the edge cleaning control device 900 includes:

[0229] The first determination module 901 is used to determine whether the sweeping machine enters a stable state when the sweeping machine performs a side cleaning task. The stable state is: the difference between the first distance between the sweeping machine and the obstacle at at least one moment before the current moment and the second distance between the sweeping machine and the obstacle at the current moment is less than a preset distance threshold, and the difference between the first contour line slope of the obstacle at at least one moment and the second contour line slope of the obstacle at the current moment is less than a preset slope threshold.

[0230] The second determination module 902 is used to determine the target angular velocity of the sweeping machine at the current moment if the sweeping machine enters a stable state based on a preset target edge distance, a second distance, the movement direction of the sweeping machine at the current moment, the slope of the second contour line and a preset adjustment coefficient. The adjustment coefficient is used to adjust the angular velocity of the sweeping machine.

[0231] The cleaning module 903 is used to continue to perform the edge cleaning task based on the target angular velocity.

[0232] Fig.10 The schematic diagram of the structure of the second embodiment of the edge cleaning control device provided in the embodiment of the present application is as follows: Fig.10 As shown, based on the above embodiment, the second determining module 902 includes:

[0233] The first calculation unit 1001 is used to calculate the control ratio at the current moment based on the target edge distance, the second distance, the movement direction of the sweeper at the current moment, the slope of the second contour line, the adjustment coefficient and the preset proportional gain.

[0234] The second calculation unit 1002 is used to calculate the control integral result at the current moment based on the target edge distance, the second distance, the movement direction of the sweeper at the current moment, the third distance between the sweeper and the obstacle at the previous moment, the movement direction of the sweeper at the previous moment, and the third contour line slope of the obstacle at the previous moment, the adjustment coefficient and the preset integral gain.

[0235] The third calculation unit 1003 is used to calculate the control differential result at the current moment based on the control ratio at the current moment, the control ratio at the previous moment and the preset differential gain.

[0236] The fourth calculation unit 1004 is used to add the control ratio at the current moment, the control integral result at the current moment, and the control differential result at the current moment to obtain the target angular velocity.

[0237] Fig.11 The schematic diagram of the structure of the third embodiment of the edge cleaning control device provided in the embodiment of the present application is as follows: Fig.11 As shown, based on the above embodiment, the proportional gain includes a distance proportional gain and a motion direction proportional gain, and the first calculation unit 1001 specifically includes:

[0238] The first calculation subunit 1101 is used to calculate the distance control ratio at the current moment based on the target edge distance, the second distance, the distance proportion gain and the adjustment coefficient.

[0239] The second calculation subunit 1102 is used to calculate the motion direction control ratio at the current moment based on the motion direction of the sweeper at the current moment, the slope of the second contour line, and the motion direction proportional gain.

[0240] The third calculation subunit 1103 is used to add the distance control ratio at the current moment and the movement direction control ratio at the current moment to obtain the control ratio at the current moment.

[0241] Fig.12 The schematic diagram of the structure of the fourth embodiment of the edge cleaning control device provided in the embodiment of the present application is as follows: Fig.12 As shown, based on the above embodiments, the integral gain includes a distance integral gain and a motion direction integral gain, and the second calculation unit 1002 specifically includes:

[0242] The first calculation subunit 1201 is used to calculate the distance control integral result at the current moment based on the target edge distance, the second distance, the distance integral gain, the third distance and the adjustment coefficient.

[0243] The second calculation subunit 1202 is used to calculate the current motion direction control integral result based on the current motion direction of the sweeper, the slope of the second contour line, the motion direction integral gain, the motion direction of the sweeper at the previous moment, and the slope of the third contour line.

[0244] The third calculation subunit 1203 is used to add the distance control integral result at the current moment and the motion direction control integral result at the current moment to obtain the control integral result at the current moment.

[0245] Fig.13 The schematic diagram of the structure of the fifth embodiment of the edge cleaning control device provided in the present application is as follows: Fig.13 As shown, based on the above embodiments, the differential gain includes a distance differential gain and a motion direction differential gain, and the third calculation unit 1003 specifically includes:

[0246] The first calculation subunit 1301 is used to calculate the distance control ratio at the previous moment based on the target edge distance, the third distance, the distance proportion gain and the adjustment coefficient.

[0247] The second calculation subunit 1302 is used to calculate the motion direction control ratio at the last moment based on the motion direction of the sweeper at the last moment, the slope of the third contour line, and the motion direction proportional gain.

[0248] The third calculation subunit 1303 is used to calculate the distance control differential result at the current moment based on the distance control ratio at the current moment, the distance control ratio at the previous moment and the distance differential gain.

[0249] The fourth calculation subunit 1304 is used to calculate the motion direction control differential result at the current moment based on the motion direction control ratio at the current moment, the motion direction differential gain and the motion direction control ratio at the previous moment.

[0250] The fifth calculation subunit 1305 is used to add the distance control differential result at the current moment and the motion direction control differential result at the current moment to obtain the control differential result at the current moment.

[0251] Fig.14 This is a structural diagram of Embodiment 6 of the edge cleaning control device provided in the present application, as shown in FIG. Fig.14 As shown, based on the above embodiments, the edge cleaning control device 900 further includes:

[0252] The fitting module 1401 is used to perform straight line fitting on the coordinates of the obstacle using the least square method according to the coordinate data of at least two moments before the current moment in the coordinate data set of the obstacle acquired in advance, so as to obtain the slope of the fitting line.

[0253] The updating module 1402 is used to update the obtained slope of the obstacle's contour line at the current moment according to the slope of the fitting line and the slope of the obstacle's contour line at the previous moment through a preset slope updating formula.

[0254] Fig.15 The structural diagram of the seventh embodiment of the edge cleaning control device provided in the embodiment of the present application is as follows Fig.15 As shown, based on the above embodiments, the first determining module 901 specifically includes:

[0255] The acquisition unit 1501 is used to acquire a first distance between the sweeping machine and the obstacle at at least one moment before the current moment and a first contour line slope of the obstacle at at least one moment.

[0256] The determination unit 1502 is configured to determine whether the difference between each first distance and the second distance is smaller than a distance threshold, and determine whether the difference between each first contour line slope and the second contour line slope is smaller than a slope threshold.

[0257] The edge cleaning control device provided in the above embodiment is used to execute the edge cleaning control method in any of the above method embodiments. Its implementation principle and technical effect are similar and will not be repeated here.

[0258] Fig.16 A schematic diagram of the structure of the sweeping machine provided in the embodiment of the present application is shown in FIG. Fig.16 As shown, the sweeping machine 1600 includes: a processor 1602, and a memory 1601 connected to the processor 1602 for communication, a laser radar sensor 1603, a line laser sensor 1604, and a PSD / TOF sensor 1605;

[0259] The memory 1601 stores computer executable instructions;

[0260] The processor 1602 executes the computer-executable instructions stored in the memory 1601 to implement the edge cleaning control method in any method embodiment.

[0261] The laser radar sensor 1603 and the line laser sensor 1604 are used to collect data to calculate the slope of the obstacle contour line.

[0262] The PSD / TOF sensor 1605 is used to collect coordinate data of obstacles and distance data between the sweeper 1600 and the obstacles.

[0263] An embodiment of the present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to execute the edge cleaning control methods provided in the above-mentioned various embodiments.

[0264] The computer-readable storage medium mentioned above can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory, electrically erasable programmable read-only memory, erasable programmable read-only memory, programmable read-only memory, read-only memory, magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.

[0265] Optionally, a readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.

[0266] An embodiment of the present application also provides a computer program product, which includes a computer program. The computer program is stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When at least one processor executes the computer program, the technical solution provided by any of the above method embodiments can be implemented.

[0267] In the present application, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship; in the formula, the character " / " indicates that the previous and next associated objects are in a "division" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0268] It is to be understood that the various numerical numbers involved in the embodiments of the present application are only for the convenience of description and are not intended to limit the scope of the embodiments of the present application. In the embodiments of the present application, the size of the sequence number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0269] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0270] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A method for controlling edge cleaning, characterized in that: Applied to a sweeping machine, the method comprises: When the sweeping machine performs the edge cleaning task, determining whether the sweeping machine enters a stable state, wherein the stable state is: a difference between a first distance between the sweeping machine and the obstacle at at least one moment before the current moment and a second distance between the sweeping machine and the obstacle at the current moment is less than a preset distance threshold, and a difference between a first contour line slope of the obstacle at the at least one moment and a second contour line slope of the obstacle at the current moment is less than a preset slope threshold; If the sweeping machine enters a stable state, based on a preset target edge distance, the second distance, the movement direction of the sweeping machine at the current moment, the slope of the second contour line and a preset adjustment coefficient, a target angular velocity of the sweeping machine at the current moment is determined, and the adjustment coefficient is used to adjust the angular velocity of the sweeping machine; Based on the target angular velocity, the edge cleaning task is continued.

2. The method according to claim 1, characterized in that The method of determining a target angular velocity of the sweeper at the current moment based on the preset target edge distance, the second distance, the movement direction of the sweeper at the current moment, the slope of the second contour line and the preset adjustment coefficient includes: Calculate the control ratio at the current moment based on the target edge distance, the second distance, the movement direction of the sweeper at the current moment, the slope of the second contour line, the adjustment coefficient, and a preset proportional gain; Based on the target edge distance, the second distance, the movement direction of the sweeper at the current moment, the third distance between the sweeper and the obstacle at the previous moment, the movement direction of the sweeper at the previous moment, and the third contour line slope of the obstacle at the previous moment, the adjustment coefficient and the preset integral gain, the control integral result at the current moment is calculated; Based on the control ratio at the current moment, the control ratio at the previous moment and the preset differential gain, a control differential result at the current moment is calculated; The target angular velocity is obtained by adding the control ratio at the current moment, the control integral result at the current moment, and the control differential result at the current moment.

3. The method according to claim 2, characterized in that The proportional gain includes a distance proportional gain and a motion direction proportional gain. Based on the target edge distance, the second distance, the motion direction of the sweeper at the current moment, the slope of the second contour line, the adjustment coefficient and the preset proportional gain, the control ratio at the current moment is calculated, including: Based on the target edge distance, the second distance, the distance proportional gain and the adjustment coefficient, the distance control ratio at the current moment is calculated; Based on the movement direction of the sweeper at the current moment, the slope of the second contour line, and the movement direction proportional gain, a movement direction control ratio at the current moment is calculated; The distance control ratio at the current moment and the movement direction control ratio at the current moment are added to obtain the control ratio at the current moment.

4. The method according to claim 2, characterized in that: The integral gain includes a distance integral gain and a motion direction integral gain. Based on the target edge distance, the second distance, the motion direction of the sweeper at the current moment, the third distance between the sweeper and the obstacle at the previous moment, the motion direction of the sweeper at the previous moment, and the third contour line slope of the obstacle at the previous moment, the adjustment coefficient and the preset integral gain, the control integral result at the current moment is calculated, including: Based on the target edge distance, the second distance, the distance integral gain, the third distance and the adjustment coefficient, a distance control integral result at the current moment is calculated; Based on the movement direction of the sweeper at the current moment, the slope of the second contour line, the movement direction integral gain, the movement direction of the sweeper at the previous moment, and the slope of the third contour line, the movement direction control integral result at the current moment is calculated; The distance control integral result at the current moment and the motion direction control integral result at the current moment are added together to obtain the control integral result at the current moment.

5. The method according to claim 3, characterized in that: The differential gain includes a distance differential gain and a motion direction differential gain. The control differential result at the current moment is calculated based on the control ratio at the current moment, the control ratio at the previous moment and the preset differential gain, including: Based on the target edge distance, the third distance, the distance proportional gain and the adjustment coefficient, the distance control ratio at the last moment is calculated; Based on the movement direction of the sweeper at the last moment, the slope of the third contour line, and the movement direction proportional gain, the movement direction control ratio at the last moment is calculated; Based on the distance control ratio at the current moment, the distance control ratio at the previous moment and the distance differential gain, a distance control differential result at the current moment is calculated; Calculate the motion direction control differential result at the current moment based on the motion direction control ratio at the current moment, the motion direction differential gain and the motion direction control ratio at the previous moment; The distance control differential result at the current moment and the motion direction control differential result at the current moment are added together to obtain the control differential result at the current moment.

6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: According to the coordinate data of at least two moments before the current moment in the coordinate data set of the obstacle acquired in advance, a least square method is used to perform straight line fitting on the coordinates of the obstacle to obtain a slope of the fitting line; According to the slope of the fitting straight line and the slope of the contour line of the obstacle at the previous moment, the obtained slope of the contour line of the obstacle at the current moment is updated through a preset slope update formula.

7. The method according to any one of claims 1 to 5, characterized in that: The determining whether the sweeping machine enters a stable state includes: Acquire a first distance between the sweeping machine and the obstacle at at least one moment before the current moment and a first contour line slope of the obstacle at the at least one moment; It is determined whether a difference between each first distance and the second distance is smaller than the distance threshold, and it is determined whether a difference between each first contour line slope and the second contour line slope is smaller than the slope threshold.

8. A control device for edge cleaning, characterized in that: include: A first determination module is used to determine whether the sweeping machine enters a stable state when the sweeping machine performs a close-to-edge cleaning task, wherein the stable state is: a difference between a first distance between the sweeping machine and the obstacle at at least one moment before the current moment and a second distance between the sweeping machine and the obstacle at the current moment is less than a preset distance threshold, and a difference between a first contour line slope of the obstacle at the at least one moment and a second contour line slope of the obstacle at the current moment is less than a preset slope threshold; a second determination module, configured to determine, if the sweeping machine enters a stable state, a target angular velocity of the sweeping machine at a current moment based on a preset target edge distance, the second distance, the movement direction of the sweeping machine at a current moment, the slope of the second contour line, and a preset adjustment coefficient, wherein the adjustment coefficient is used to adjust the angular velocity of the sweeping machine; The cleaning module is used to continue to perform the edge cleaning task based on the target angular velocity.

9. A sweeping machine, characterized in that: include: A processor, and a memory in communication with the processor, a lidar sensor, a line laser sensor, and a position sensitive PSD / time of flight TOF sensor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the edge cleaning control method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the edge cleaning control method according to any one of claims 1 to 7 when executed by a processor.

Citation Information

Cited By

  • Side cleaning safety protection method, device and equipment and readable storage medium

    CN120024354A

  • Control method and device of D-type floor sweeping robot and floor sweeping robot

    CN120458437A

  • Self-adaptive welt path tracking and dynamic obstacle avoidance method based on point cloud features

    CN120972925A