Methods for adjusting fan suction power in robots

By adjusting the PWM values ​​of the fan and drive motor in a closed loop, the suction power and walking resistance of the fan are adjusted in real time, which solves the problem of improper fan suction configuration in sweeping robots and window cleaning robots, and improves the walking stability and cleaning effect of the robots in different environments.

CN115624298BActive Publication Date: 2025-12-02AMICRO SEMICONDUCTOR CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211344137.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-31
Publication Date
2025-12-02
Estimated Expiration
2042-10-31

AI Technical Summary

Technical Problem

The existing robotic vacuum cleaners and window cleaning robots have unreasonable fan suction configurations, resulting in excessive or insufficient resistance to the drive wheels, which affects path planning and cleaning performance.

Method used

By adjusting the PWM values ​​of the robot's fan and drive motor in a closed loop, the suction force and walking resistance of the fan are adjusted in real time so that the difference between the fan suction force and the target suction force and the heading angle are within a preset range. The current value of the walking resistance current is calculated, and the fan suction force is adjusted to adapt to different walking surface conditions.

Benefits of technology

It enables dynamic adjustment of fan suction and walking resistance, improving the robot's adaptability and cleaning efficiency in complex environments, and avoiding problems such as drive wheel slippage or inability to walk due to improper suction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115624298B_ABST
    Figure CN115624298B_ABST
Patent Text Reader

Abstract

This application discloses a method for adjusting the suction power of a robot's fan, comprising: the robot performing closed-loop adjustment of the PWM value used to control the fan and obtaining the fan PWM value in real time; the robot performing closed-loop adjustment of the PWM value used to control the drive motor and obtaining the wheel PWM value in real time; the robot sampling the current signal output by the drive motor to obtain the drive wheel current sampling value; calculating the robot's current walking resistance current value and / or current relative walking resistance current value based on the drive wheel current sampling value, the wheel PWM value, and the fan PWM value; adjusting the target working suction power according to the relationship between the calculated current relative walking resistance current value and a preset relative value; or adjusting the target working suction power according to the relationship between the calculated current walking resistance current value and a preset value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of mobile robots, and more particularly to a method for adjusting the suction power of a fan. Background Technology

[0002] An improperly configured suction power configuration in robotic vacuum cleaners (for vacuuming) and window cleaning robots (for suction) can alter the resistance experienced by the drive wheels. If the vacuum cleaner's vacuum is too close to the ground and has high suction power, the wheels may become stuck due to excessive resistance. If the vacuum is set to a low setting, many heavy debris will not be cleaned. An improperly configured fan can also cause wheel slippage, affecting the vacuum's path planning. Similarly, if a window cleaning robot's fan has high suction power, the cloth's resistance may be too great, preventing the robot from moving. If the fan is set to a low setting, many stubborn stains will not be cleaned. An improperly configured fan can also cause wheel slippage, severely impacting the intelligent window cleaning robot's path planning and leading to missed areas.

[0003] On the other hand, the cleaning robot is affected by the changes in current caused by the active output torque of the drive wheel motor (mainly due to the application of variable torque, which is related to the motor speed and is one of the basic parameters of the motor). The current sampling information obtained by the cleaning robot samples the current output of the drive motor and provides feedback on the walking resistance information. This information includes not only passively applied external resistance (such as resistance caused by surface friction and collision with external obstacles), but also the current change caused by the change in the suction force of the fan (which reflects the resistance formed by the drive motor to overcome the suction force applied to the drive wheel) and the current change caused by the active output torque of the drive wheel motor (which reflects the force required for the drive wheel to start rotating). In the current sampling information, if the current change caused by the active output torque of the drive wheel motor is too large, it is easy to misjudge the external resistance information. Therefore, how to adjust the robot's fan absorption through the aforementioned current sampling information has become a technical problem that needs to be solved. Summary of the Invention

[0004] This application discloses a method for adjusting the suction power of a robot, the specific technical solution of which includes:

[0005] The method for adjusting the suction power of a robot's fan includes: drive wheels are mounted on both sides of the robot, and drive motors electrically connected to these wheels are installed inside the robot; the robot also has a fan to generate suction on its walking surface; the method for adjusting the fan suction power includes: the robot performing closed-loop adjustment of the PWM value used to control the fan, ensuring that the absolute value of the air pressure difference between the fan suction power measured in real time and the target working suction power is within a preset air pressure error range, and obtaining the fan PWM value in real time during the closed-loop adjustment process; the robot also performing closed-loop adjustment of the PWM value used to control the drive motor, ensuring that the angle difference between the robot's real-time measured heading angle and the target navigation angle is within a preset range. The absolute value is within a preset angle error range, and the wheel PWM value is obtained in real time during the closed-loop adjustment process; after transmitting the wheel PWM value to the drive motor, the robot samples the current signal output by the drive motor to obtain the drive wheel current sampling value; based on the drive wheel current sampling value, the wheel PWM value, and the fan PWM value, the robot's current walking resistance current value is calculated, and / or the current relative walking resistance current value is calculated; according to the relationship between the calculated current relative walking resistance current value of the robot and a preset relative value, the target working suction force is adjusted; or according to the relationship between the calculated current walking resistance current value of the robot and a preset value, the target working suction force is adjusted.

[0006] Furthermore, adjusting the target working suction force based on the calculated relationship between the robot's current walking resistance current value and a preset value includes: when the robot's current walking resistance current value is greater than the preset value, reducing the target working suction force to reduce the fan suction force and fan PWM value measured by the robot in real time; when the robot's current walking resistance current value is less than the preset value, increasing the target working suction force until the current walking resistance current value equals the preset value.

[0007] Furthermore, when the robot's current walking resistance current value is greater than a preset value, if the robot's current walking resistance current value increases, it is determined that the external resistance the robot experiences on the current walking surface has increased, and the reduction range of the target working suction force is set to be greater; when the robot's current walking resistance current value is less than or equal to a preset value, if the robot's current walking resistance current value decreases, it is determined that the external resistance the robot experiences on the current walking surface has decreased, and the increase range of the target working suction force is set to be greater.

[0008] Furthermore, the method for calculating the robot's current walking resistance current value based on the drive wheel current sampling value, wheel PWM value, and fan PWM value includes: after the robot starts walking on the current walking surface, the current sampling value of the drive wheel is controlled by subtracting the power change value caused by the PWM value used to control the drive motor in the closed-loop adjustment and the power change value caused by the PWM value used to control the fan in the closed-loop adjustment in sequence to obtain the robot's current walking resistance current value; wherein, the current sampling value of the drive wheel and the power change value caused by the PWM value used to control the drive motor in the closed-loop adjustment both originate from the drive wheel connected to the same drive motor, so as to obtain the current walking resistance current value of the drive wheel installed on the same side of the robot.

[0009] Furthermore, the method for calculating the robot's current walking resistance current value based on the drive wheel current sampling value, wheel PWM value, and fan PWM value specifically includes: before the robot starts walking, the robot experiences static friction relative to the walking surface it is in contact with and starts the drive motor until the robot starts walking on the current walking surface from rest to overcome the static friction; during the robot's walking on the current walking surface, the robot marks the real-time obtained wheel PWM value as the first PWM value to be measured and the real-time obtained fan PWM value as the second PWM value to be measured; the robot marks the product of the first PWM value to be measured and the first conversion coefficient as the second PWM value to be measured. The power change value caused by the PWM value of the control drive motor in the closed-loop adjustment is used to determine the power change value caused by the PWM value used to control the fan in the closed-loop adjustment. Then, the power change value caused by the PWM value used to control the drive motor in the closed-loop adjustment is subtracted from the real-time sampled value of the drive wheel current obtained by the robot control to obtain a first power difference value. The power change value caused by the PWM value used to control the fan in the closed-loop adjustment is then subtracted from the first power difference value to obtain a second power difference value. The second power difference value is then marked as the current walking resistance current value of the robot.

[0010] Furthermore, the method for calculating the robot's current walking resistance current value based on the drive wheel current sampling value, wheel PWM value, and fan PWM value specifically includes: before the robot starts walking, the robot has static friction relative to the walking surface it is in contact with and starts the drive motor until the robot starts walking on the current walking surface from rest, so that the robot's drive wheels overcome the static friction; then, within a preset sampling time, the robot calculates a first reference PWM value based on all obtained wheel PWM values, calculates a second reference PWM value based on all obtained fan PWM values, and calculates a drive wheel reference current value based on all obtained drive wheel current sampling values; the robot then calculates the first reference... The product of the PWM value and the first conversion coefficient is marked as the power change value caused by the PWM value used to control the drive motor in the closed-loop adjustment, and the product of the second reference PWM value and the second conversion coefficient is marked as the power change value caused by the PWM value used to control the fan in the closed-loop adjustment; then, the reference current value of the robot control drive wheel is subtracted from the power change value caused by the PWM value used to control the drive motor in the closed-loop adjustment to obtain the first power difference value, and then the first power difference value is subtracted from the power change value caused by the PWM value used to control the fan in the closed-loop adjustment to obtain the second power difference value, and then the second power difference value is marked as the current walking resistance current value of the robot.

[0011] Furthermore, adjusting the target working suction force based on the calculated relationship between the robot's current relative walking resistance current value and a preset relative value includes: reducing the target working suction force when the robot's current relative walking resistance current value is greater than the preset relative value, thereby reducing the fan suction force and fan PWM value measured by the robot in real time; and increasing the target working suction force when the robot's current relative walking resistance current value is less than the preset relative value, until the robot's current relative walking resistance current value equals the preset relative value.

[0012] Furthermore, adjusting the target working suction force based on the calculated relationship between the robot's current relative walking resistance current value and a preset relative value further includes: starting to adjust the target working suction force when the robot's current relative walking resistance current value is less than or equal to a preset collision current threshold; not adjusting the target working suction force when the robot's current relative walking resistance current value is greater than the preset collision current threshold, and determining that the robot is currently in a collision.

[0013] Furthermore, when the medium of the walking surface traversed by the robot within the preset sampling time is the same as the medium at the preset starting position, the robot's current relative walking resistance current value is used to represent the current value corresponding to the difference between the external resistance experienced by the robot while walking on the current walking surface and the external resistance experienced by the robot on the walking surface it contacts at the preset starting position; wherein, the robot maintains walking on the same medium walking surface within the preset sampling time. Alternatively, when the medium of the walking surface traversed by the robot within the preset sampling time is different from the medium at the preset starting position, the robot's current relative walking resistance current value is used to represent the current value corresponding to the difference between the external resistance experienced by the robot while walking on the current walking surface and the external resistance experienced by the robot on the reference walking surface; wherein, the robot maintains walking on the reference walking surface within the preset sampling time. The preset starting position is the starting position from which the robot begins walking after starting from rest, so that the robot begins to walk in a straight line from the preset starting position; the reference walking surface is the walking surface traversed by the robot within the preset sampling time.

[0014] Furthermore, the method for calculating the robot's current relative walking resistance current value based on the drive wheel current sampling value, wheel PWM value, and fan PWM value includes: after the robot starts walking on the current walking surface, controlling the relative power change value of the drive wheel current sampling value to successively subtract the relative power change value corresponding to the wheel PWM value and the relative power change value corresponding to the fan PWM value to obtain the robot's current relative walking resistance current value; wherein, the relative power change value of the drive wheel current sampling value and the relative power change value corresponding to the wheel PWM value both originate from the drive wheel connected to the same drive motor, so as to obtain the current relative walking resistance current value of the drive wheel installed on the same side of the robot; wherein, the robot's current relative walking resistance current value is expressed in terms of electrical quantity.

[0015] Furthermore, the method for calculating the robot's current relative walking resistance current value based on the drive wheel current sampling value, wheel PWM value, and fan PWM value specifically includes: before the robot starts walking, the robot experiences static friction relative to the walking surface it is in contact with and starts the drive motor until the robot starts walking on the current walking surface from rest, so that the robot's drive wheels overcome the static friction; then, within a preset sampling time, the robot calculates a first reference PWM value based on all obtained wheel PWM values, calculates a second reference PWM value based on all obtained fan PWM values, and calculates a drive wheel reference current value based on all obtained drive wheel current sampling values; after the preset sampling time, the robot marks the real-time obtained wheel PWM value as the first PWM value to be measured and the real-time obtained fan PWM value as the second PWM value to be measured. The robot obtains a value and marks the real-time drive wheel current sampling value as the drive wheel current value to be measured. Then, it marks the difference between the drive wheel current value to be measured and the drive wheel reference current value as the relative power change value of the drive wheel current sampling value. The product of the difference between the first PWM value to be measured and the first reference PWM value and the first conversion coefficient is marked as the relative power change value corresponding to the wheel PWM value. The product of the difference between the second PWM value to be measured and the second reference PWM value and the second conversion coefficient is marked as the relative power change value corresponding to the fan PWM value. Then, the robot subtracts the relative power change value corresponding to the wheel PWM value from the relative power change value of the drive wheel current sampling value to obtain a first difference. Then, the robot subtracts the relative power change value corresponding to the fan PWM value from the first difference to obtain a second difference. Finally, the second difference is marked as the robot's current relative walking resistance current value.

[0016] Further, within the preset sampling time, the method for calculating the first reference PWM value based on all obtained wheel PWM values ​​includes: averaging all obtained wheel PWM values ​​within the preset sampling time to obtain the first reference PWM value; or, selecting the wheel PWM value with the largest value from all obtained wheel PWM values ​​within the preset sampling time to obtain the first reference PWM value. Within the preset sampling time, the method for calculating the second reference PWM value based on all obtained fan PWM values ​​includes: averaging all obtained fan PWM values ​​within the preset sampling time to obtain the second reference PWM value; or, selecting the fan PWM value with the largest value from all obtained fan PWM values ​​within the preset sampling time to obtain the second reference PWM value. Within the preset sampling time, the method for calculating the drive wheel reference current value based on all obtained drive wheel current sampling values ​​includes: averaging all obtained drive wheel current sampling values ​​within the preset sampling time to obtain the drive wheel reference current value; or, selecting the drive wheel current sampling value with the largest value from all obtained drive wheel current sampling values ​​within the preset sampling time to obtain the drive wheel reference current value.

[0017] Further, the method for closed-loop adjustment of the PWM value used to control the drive motor includes: when the absolute value of the angle difference between the heading angle measured by the robot in real time and the target navigation angle in the current adjustment cycle is not within a preset angle error range, the robot configures the absolute value of the angle difference between the heading angle measured in real time and the target navigation angle in the current adjustment cycle, or configures the heading angle measured in real time as the feedback input for the next adjustment cycle, to perform PID adjustment on the PWM value used to control the drive motor, and sets the real-time feedback adjustment result of the PWM value used to control the drive motor as the wheel PWM value, and then inputs the wheel PWM value into the drive motor to adjust the robot's heading angle in real time, until the absolute value of the angle difference between the heading angle measured by the robot in real time and the target navigation angle changes within the preset angle error range or remains constant within the preset angle error range, and the latest obtained wheel PWM value is input into the drive motor to guide the robot to walk along the direction corresponding to the target navigation angle; wherein, the target navigation angle is used to guide the robot to walk along the pre-planned working path; the robot's heading angle is measured in real time by the robot's built-in gyroscope.

[0018] Furthermore, the method for closed-loop adjustment of the PWM value used to control the fan includes: when the absolute value of the air pressure difference between the fan suction force and the target working suction force measured in real time by the robot within the current adjustment cycle is not within a preset air pressure error range, the robot configures the absolute value of the air pressure difference between the fan suction force and the target working suction force within the current adjustment cycle, or the fan suction force measured in real time, as the feedback input for the next adjustment cycle, to perform PID adjustment on the PWM value used to control the fan, and sets the real-time feedback adjustment result of the PWM value used to control the fan as the fan PWM value, and then inputs the fan PWM value into the fan to adjust the fan suction force in real time, until the absolute value of the air pressure difference between the fan suction force and the target working suction force measured in real time by the robot within the current adjustment cycle changes within a preset air pressure error range or remains constant within a preset air pressure error range; wherein, an air pressure sensor is installed at the air inlet of the robot's fan to monitor the fan suction force in real time.

[0019] Regardless of whether the walking surface requires a large or small fan suction, the fan suction is adjusted based on the calculated current walking resistance current value and / or the current relative walking resistance current value. Combined with closed-loop regulation, it dynamically obtains a fan suction with a wide range of applicability. This can overcome the influence of torque interference generated by the motor and the resistance factors introduced by changes in fan suction. It can also adapt to different types of machine walking motors, main fans, mold structures, and walking surfaces with different friction, improving the robot's adaptability to complex environments and making it more efficient and intelligent.

[0020] In this application, the wheel PWM value is used to control the output torque change of the drive motor, so as to form one type of electrical change value in the drive wheel current sampling value. The fan PWM value is used to control the fan suction change generated by the fan, so as to form another type of electrical change value in the drive wheel current sampling value. In the closed-loop regulation, if the target working suction is increased, the fan suction and fan PWM value measured by the robot in real time will increase; if the target working suction is decreased, the fan suction and fan PWM value measured by the robot in real time will decrease.

[0021] The change in the target working suction force is based on the magnitude of the current walking resistance current value and / or the current relative walking resistance current value. That is, it is determined by the walking resistance current value that is not affected by the current change value actively generated by the robot (including the current change value applied by the fan suction force change and the current change value caused by the torque output change of the drive motor). It eliminates the influence of the walking resistance formed by the fan suction force applied to the drive wheel by the robot in real time, and realizes the determination of whether to adjust the fan suction force from the perspective of the external resistance that the robot is subjected to on the current walking surface. This more effectively addresses the slippage and walking resistance factors caused by the friction force constrained by the medium type of the current walking surface, allowing the robot to walk more stably on the current walking surface.

[0022] The current relative walking resistance current value can specifically determine whether the walking resistance experienced by the robot on a current medium type walking surface is greater or less than that on a previously traversed medium type walking surface. This effectively distinguishes whether the robot has traversed different medium types of walking surfaces. When the medium of the current walking surface is different from the medium at the preset starting position, the current relative walking resistance current value can further reflect the difference in external resistance between the two different medium types the robot has traversed. It at least identifies the two different medium types the robot has traversed and determines the change in external resistance (degree of obstruction) experienced by the currently traversed walking surface relative to the previously traversed walking surface, serving as a basis for adjusting the target working suction force. This allows the robot to walk more smoothly on different medium types of walking surfaces. Attached Figure Description

[0023] Figure 1 This is a flowchart illustrating a method for adjusting the suction power of a fan using a robot, according to an embodiment of the present invention. Detailed Implementation

[0024] The technical solutions of the embodiments of the present invention will be described in detail below with reference to the accompanying drawings. To further illustrate the embodiments, the present invention provides accompanying drawings. These drawings are part of the disclosure of the present invention, mainly used to illustrate the embodiments, and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these drawings, those skilled in the art should be able to understand other possible implementation methods and the advantages of the present invention.

[0025] Fully automated cleaning robots mainly include wheeled robots, suction cup robots, and tracked robots. These robots primarily include sweeping robots and window cleaning robots. If the vacuum cleaner of a sweeping robot is close to the ground and has strong suction, the drive wheels may become stuck due to excessive resistance actively applied by the robot. This could also be due to insufficient output torque of the drive motor to overcome static friction from the ground, preventing the drive wheels from rotating. In this case, the detected resistance information is not solely due to friction determined by the surface material, indicating that the robot's stagnation is not caused by the surface material or external obstacles. Similarly, if the window cleaning robot has strong suction, the increased pressure between the drive wheels and the surface creates excessive resistance from the cleaning cloth, increasing the driving resistance and preventing the robot from moving. Adjusting the suction power of the fan is necessary to ensure both normal robot movement and effective cleaning of the surface.

[0026] The external resistance disclosed in this application includes the frictional force generated by the robot's drive wheels contacting the walking surface and the externally applied abutment force, but excludes the two forces actively applied by the robot: the walking resistance formed by the change in suction force generated by the fan and the force formed by the change in output torque of the drive motor. The changes in suction force generated by the fan and the changes in output torque of the drive motor can be unified as changes in torque actively output by the robot, corresponding to changes in actively output current, to distinguish them from the current changes corresponding to resistance changes passively introduced by the external environment (the walking environment other than the fan and drive motor).

[0027] It's important to note that Pulse Width Modulation (PWM) is an abbreviation for "Pulse Width Modulation." The PWM value is the average of the sum of the on-times of the switching transistor within a single cycle. The longer the on-time, the larger the PWM value applied to the motor, resulting in a higher average DC output from the switching transistor, and the motor speed is directly proportional to the PWM value. The PWM frequency is the ratio of the on-time to the cycle time within a single cycle, usually called the duty cycle. The more times the transistor is switched on, the higher the frequency. Therefore, the basic principle of PWM speed control is to switch the power supply on and off at a fixed frequency, and then change the ratio of on-time to off-time (duty cycle) within a cycle as needed to change the "duty cycle" of the armature voltage of the DC motor, thereby changing the average voltage and controlling the motor speed.

[0028] As those skilled in the art will know, both the fan and the drive motor are powered by electric motors. Preferably, the bridge circuit is the drive circuit structure, controlling the forward and reverse rotation of the motor and outputting the drive current. The drive motor is the electric motor that controls the rotation of the drive wheels; the PWM values ​​acting on the left and right wheels are linearly related to the wheel torque, and the PWM values ​​acting on the fan are mostly sufficient for rotation. The PWM signal input to the motor is actually a rectangular pulse wave with continuously adjustable pulse width. It is provided to the motor by a modulator with a pulse current of a certain frequency and adjustable pulse width. The larger the pulse width, i.e., the larger the duty cycle, the larger the average voltage supplied to the motor, and the higher the motor speed. Conversely, the smaller the pulse width, the smaller the duty cycle, and the smaller the average voltage supplied to the motor, the lower the motor speed. Therefore, by controlling the motor output different analog voltages through the PWM signal, the motor can achieve different output speeds, which can also be regarded as changing the output torque of the motor.

[0029] The PWM signal or PWM value that regulates motor speed (can be considered to be proportional to the duty cycle) is the ratio of high level to low level in one cycle. The larger the ratio of high level, the larger the duty cycle. For a DC motor, the motor can rotate when the output pin is high. When the output pin is high, the motor will rotate, but it will gradually increase in speed. When the high level suddenly turns to low level, the motor will not stop because the inductor prevents sudden current changes, and will maintain the original speed. This process repeats, and the motor speed is the average voltage value output within the cycle. It can be linearly related to the aforementioned PWM value in a certain operating stage. Therefore, speed regulation is essentially putting the motor in a state that is neither completely stopped nor fully rotating. The average speed in one cycle is the speed adjusted by the duty cycle.

[0030] As one embodiment, a method for adjusting the suction power of a robot fan is disclosed. This method is used to adjust the target working suction power required in the closed-loop regulation based on the calculated relationship between the robot's current relative walking resistance current value and a preset relative value. This indirectly adjusts the fan PWM value adaptively so that the generated fan suction power is more stably close to the target working suction power. The main implementer of the robot's method for adjusting the suction power of the fan is a fully automated mobile robot, including wheeled robots, suction cup robots, and tracked robots. These types of robots are mainly sweeping robots and window cleaning robots, belonging to the category of cleaning robots equipped with fans and drive motors. Drive wheels are installed on both sides of the robot, typically one on each side of the chassis. Internally, the robot houses drive motors electrically connected to the drive wheels. Each drive wheel corresponds to one drive motor, thus the robot has two drive motors to control the rotational speed of the drive wheels, thereby controlling the robot's walking speed on the walking surface. The difference in rotational speed between the two drive wheels controls the robot's direction of travel. The drive wheels can contact the walking surface to generate friction that hinders the robot's movement. The robot also has a fan to generate suction on the walking surface. When the robot is a sweeping robot, the internal suction fan is used to vacuum the walking surface; when the robot is a window cleaning robot, the internal fan is used to adhere to the walking surface. The walking surface can be the cleaning medium, such as a horizontal floor, glass, or wall surface.

[0031] See Figure 1 It can be seen that the method for the robot to adjust the suction power of the fan includes the following steps S1 to S4:

[0032] Step S1: The robot performs closed-loop adjustment of the PWM value used to control the fan, so that the absolute value of the air pressure difference between the fan suction force measured by the robot in real time and the target working suction force is within the preset air pressure error range. The robot also determines that the fan PWM value is obtained in real time during the closed-loop adjustment process and is provided to the fan to adjust the fan suction force. The fan PWM value participating in the closed-loop adjustment adjusts the fan suction force in real time, so as to reduce the absolute value of the air pressure difference between the fan suction force measured by the robot in real time and the target working suction force, in order to approach or equal the target working suction force.

[0033] Step S2: The robot performs closed-loop adjustment of the PWM value used to control the drive motor, and determines that the wheel PWM value is obtained in real time during the closed-loop adjustment process. This value is provided to the drive motor to adjust the robot's walking speed. Changes in the torque or output torque of the drive current output are also fed back to the walking state of the drive wheel. The drive wheel starts to rotate with the help of torque, so the drive motor needs to actively adjust the output current. Therefore, it will actively introduce a change in current value due to the change in output torque, which is independent of external environmental factors. After transmitting the wheel PWM value to the drive motor, the robot samples the current signal of the drive motor to obtain the drive wheel current sampling value. Then, step S3 is executed.

[0034] It should be noted that steps S1 and S2 can be executed simultaneously or sequentially, i.e., step S1 can be executed first, followed by step S2. In step S2, a small-value sampling resistor is connected in series in the drive wheel control circuit (bridge circuit) inside the robot. The voltage drop across the sampling resistor is a voltage signal proportional to the output current of the drive motor, i.e., a voltage signal proportional to the current signal of the drive motor output sampled by the robot. This voltage signal is then amplified by an operational amplifier and sampled by the analog-to-digital converter of the microcontroller to obtain the drive wheel current sampling value. This drive wheel current sampling value can provide real-time feedback on the motion state of the drive wheel, including the internal and external interference factors it experiences, including actively generated forces and passively received forces. Therefore, the drive wheel current sampling value will reflect the current change value caused by the friction of the robot's walking surface, the resistance of the fan suction applied to the robot body (mainly the drive wheel), and the change in the output torque of the drive motor.

[0035] In step S2, during the closed-loop adjustment of the PWM value used to control the drive motor, the PWM value can control the speed of the drive motor. The PWM value can change the speed of the drive wheel, thereby changing the robot's walking speed. Specifically, the robot's heading angle is adjusted by controlling the relative magnitude of the torque output by the drive motors of the left and right drive wheels. When the speeds of the drive wheels on both sides of the robot are inconsistent, it causes a change in the robot's walking direction, such as turning, thus changing the robot's heading angle. Therefore, during the closed-loop adjustment, the absolute value of the angle difference between the robot's real-time measured heading angle and the target navigation angle can be adjusted to be within a preset angle error range, so that the robot walks in the predetermined direction. Specifically, the robot can adjust the PWM signal used to control the drive motor through an angle closed-loop feedback adjustment device, and apply the real-time adjusted wheel PWM value to the drive motor. The drive wheel will change its output speed, and the robot's heading angle corresponding to the changed drive wheel speed is used as the feedback input of the angle closed-loop feedback adjustment device to maintain closed-loop adjustment, and also indirectly adjust the robot's real-time measured heading angle. However, in the aforementioned closed-loop adjustment process, the real-time obtained wheel PWM value may not be stable at the target PWM value under normal operating conditions. Therefore, the real-time obtained wheel PWM value is prone to fluctuations and may cause electrical problems. Fluctuations in the motor current correspond to disturbances in the real-time torque output of the drive motor. This torque, generated internally, drives the rotation of the drive wheels, producing a necessary output current in the drive motor. This current disturbance, relative to the external resistance the robot needs to detect, is then included in the drive wheel current sampling value. Furthermore, under the control of the wheel's PWM value, excessive torque output from the drive motor (which can also be considered torque variation) will cause wheel slippage, while insufficient torque output (also considered torque variation) will prevent the drive wheels from rotating. The corresponding current variation in the drive motor's output introduces interference to the detection of external resistance. After transmitting the wheel PWM value to the drive motor, the robot samples the current signal output by the drive motor to obtain the drive wheel current sampling value. To extract the friction determined by the environmental medium of the robot's external walking surface, subsequent adjustments to the fan suction and calculations of the walking resistance current value or relative walking resistance current value require overcoming the interference from the torque variation in the drive motor's output.

[0036] In step S1, during the closed-loop adjustment of the PWM value used to control the fan, the PWM value can control the speed of the motor inside the fan. Thus, the PWM value can change the air pressure difference inside and outside the fan, i.e., change the fan suction. Therefore, during the closed-loop adjustment, the absolute value of the air pressure difference between the fan suction measured by the robot in real time and the target working suction can be adjusted to be within the preset air pressure error range, which can generate the best fan suction on the walking surface. Based on this, when the robot is used as an intelligent window cleaning robot, there will be no situation where the suction is too strong and the wheels cannot turn, or the suction is too weak and the drive wheels slip. The fan suction applied to the walking surface will also affect the movement of the drive wheels, and if necessary, resistance will be introduced. Therefore, the change in current is introduced due to the change in fan suction. The robot can adjust the PWM signal used to control the fan through a pneumatic closed-loop feedback adjustment device, and apply the real-time adjusted fan PWM value to the fan. The motor inside the fan will change its output speed, which will also result in a change in output torque. The fan suction force corresponding to the changed speed is then used as the feedback input of the pneumatic closed-loop feedback adjustment device to maintain closed-loop adjustment, and also indirectly adjust the fan suction force measured by the robot in real time. However, in the aforementioned closed-loop adjustment of the PWM value used to control the fan, the real-time obtained second PWM value tends to stabilize at the target PWM value under normal suction conditions. If it is desired to apply a larger change to the fan suction force, the target working suction force can be changed directly, and naturally the target PWM value can also be changed to adapt to the change in target working suction force. In some extreme cases, the PWM value of the fan adjusted by the robot is prone to fluctuation and causes the motor current of the fan to jump. This may result in excessive suction force generated by the fan in real time. Excessive suction force is applied to the drive wheels and increases the pressure between the drive wheels and the walking surface, resulting in increased walking resistance on both sides of the robot's drive wheels. Compared with external resistance, this application classifies this change in walking resistance as an interference factor introduced by the change in fan suction force applied inside the robot. In order to extract the friction force determined by the environmental medium of the walking surface outside the robot, and to effectively and accurately adjust the fan suction force and calculate the walking resistance current value or relative walking resistance current value, it is necessary to overcome the interference of current change value actively caused by the change in fan suction force.

[0037] Therefore, the wheel PWM value is used to control the output torque change of the drive motor, so as to form one electrical change value in the drive wheel current sampling value; the fan PWM value is used to control the fan suction change generated by the fan, so as to form another electrical change value in the drive wheel current sampling value. Specifically, after transmitting the wheel PWM value to the drive motor, the drive wheel begins to be controlled by the wheel PWM value to perform the corresponding rotation action, that is, to move on the walking surface. The robot samples the current signal of the drive motor to obtain the drive wheel current sampling value. This drive wheel current sampling value is the current sampling value verified by the drive wheel walking on the current walking surface. The drive wheel current sampling value carries the torque change information output by the drive motor, which is the current change value generated by the wheel PWM value control (the current change value actively introduced by the robot, which belongs to the interference factor of the drive motor output torque on the detection of external resistance, also known as the interference factor caused by the torque change of the drive motor output); the drive wheel current sampling value also carries the current change value caused by the suction force generated by the fan applied to the drive wheel (the current change value actively introduced by the robot, which belongs to the interference factor of the suction force output by the fan on the detection of external resistance, also known as the interference factor caused by the absorption force change generated by the fan), and the current value that needs to be output to overcome the friction force from the walking surface. When the robot uses a sampling resistor to sample the current output by the drive motor, it obtains the voltage signal across the sampling resistor. Preferably, the collected voltage signal is amplified by an operational amplifier and sampled by a microcontroller ADC, and then represented as a drive wheel current sampling value in the form of a digital signal. Thus, the drive wheel current sampling value provides feedback on the actual motion force state of the drive wheel through current sampling.

[0038] Step S3: Based on the sampled values ​​of the drive wheel current, the wheel PWM value, and the fan PWM value, calculate the robot's current walking resistance current value to reflect the external resistance the robot experiences on the current walking surface, and / or calculate the current relative walking resistance current value to reflect the differences in external resistance experienced by the robot at different positions. This ensures that the current walking resistance current value and the current relative walking resistance current value are not affected by changes in current caused by variations in the torque output of the drive motor, nor by changes in current caused by variations in suction generated by the fan on the same walking surface. Extract the robot's external resistance as the current walking resistance current value and the current relative walking resistance current value, and then proceed to step S4. The current walking resistance current value can represent the comprehensive result of the walking resistance caused by friction constrained by the medium type of the current walking surface; this comprehensive result belongs to the external resistance. Alternatively, the current relative walking resistance current value can represent the relative result of friction constrained by the medium type of the walking surface; this relative result belongs to the relative external resistance between two walking surfaces.

[0039] In step S3, the calculated walking resistance current value and relative walking resistance current value are not affected by changes in the output torque of the drive motor. This is achieved by subtracting the change in electrical charge caused by the wheel PWM value from the drive wheel current sampling value. Similarly, the calculated walking resistance current value and relative walking resistance current value are not affected by the suction force applied by the fan. This is achieved by subtracting the change in electrical charge caused by the fan PWM value from the drive wheel current sampling value. Based on this, changes in the current walking resistance current value and the current relative walking resistance current value can further determine the changes in external resistance experienced by the robot on different walking surfaces, at least the relative magnitudes of the walking resistance current values ​​experienced by the robot on the walking surfaces of the two media. In some embodiments, if the external resistance influence introduced by the robot colliding with an obstacle is considered in the drive wheel current sampling value, then the calculated current walking resistance current value and current relative walking resistance current value of the robot are... Furthermore, during unobstructed straight-line walking on the same medium, the robot's current walking resistance current value and current relative walking resistance current value are extracted from the current sampling value of the drive wheel. This value does not change with the PWM value used to control the drive motor or the PWM value used to control the fan. At this time, assuming that the robot type and its internal motor equipment have not changed, the medium type of the walking surface becomes the only factor affecting the current walking resistance current value and the current relative walking resistance current value. This allows for the reproduction of frictional force unaffected by changes in the output torque of the motor equipment during unobstructed straight-line walking. The change in frictional force on the surface that the robot has contacted can be measured through the current relative walking resistance current value, i.e., the change in external resistance is detected. This ensures that the current walking resistance current value and the current relative walking resistance current value calculated on the same medium do not change with the real-time adjusted wheel PWM value or the real-time adjusted fan PWM value, thus forming an external resistance that is faithful to the material properties of the walking surface during unobstructed walking.

[0040] Step S4: Adjust the target working suction force according to the calculated relationship between the robot's current relative walking resistance current value and the preset relative value; or adjust the target working suction force according to the calculated relationship between the robot's current walking resistance current value and the preset value. The relationship between the robot's current walking resistance current value and the preset value calculated in Step S3 refers to the numerical relationship between the two, which is obtained by comparison based on the current dimension. The preset relative value and the preset value are set under the condition that the robot is working normally on different media walking surfaces (i.e., the robot's drive wheels do not slip and can rotate). They can be derived from empirical values ​​that vary with the type and structure of the robot, or from the current sampling value of the drive wheels. Whether the target working suction force is increased or decreased, the process returns to step S1 to maintain closed-loop adjustment of the PWM value used to control the fan and the PWM value used to control the drive motor. This allows the robot on the walking surface to achieve optimal cleaning quality, walking efficiency, and cleaning coverage with the newly adjusted target working suction force, without being disturbed by changes in the current value caused by changes in the torque output of the drive motor.

[0041] As one embodiment, when a robotic vacuum cleaner or window cleaning robot needs to adjust the target suction power required by the closed-loop regulation, adjusting the target working suction power based on the calculated relationship between the robot's current walking resistance current value and a preset value includes:

[0042] When the robot's current walking resistance current value is greater than a preset value, the robot experiences significant external resistance. This external resistance can be understood as the walking resistance unaffected by the torque exerted on the drive wheels by the drive motor and the suction force exerted on the drive wheels by the fan. Therefore, the target working suction force is reduced to decrease the real-time measured fan suction force and fan PWM value, preventing the drive wheels from failing to rotate on the currently traversed walking surface. If the calculated current walking resistance current value is less than the preset value, the external resistance experienced by the robot decreases. Therefore, the target working suction force is increased to increase the real-time measured fan suction force and fan PWM value, preventing the drive wheels from slipping on the currently traversed walking surface. Correspondingly, the robot's current walking resistance current value will increase until the current relative walking resistance current value changes to the preset value. At this point, the real-time measured fan suction force may be equal to the increased target working suction force.

[0043] Based on the above embodiments, when the robot's current walking resistance current value is greater than a preset value, if the robot's current walking resistance current value increases, it is determined that the external resistance the robot experiences on the current walking surface has increased. The reduction range of the target working suction force is then set to be larger, resulting in a smaller target working suction force. When the fan suction force measured by the robot in real time approaches the reduced target working suction force, the suction force of the fan on the walking surface decreases, thus reducing the walking resistance applied to the drive wheels and preventing the drive wheels from becoming stuck. When the robot's current walking resistance current value is less than or equal to a preset value, if the robot's current walking resistance current value decreases, it is determined that the external resistance the robot experiences on the current walking surface has decreased. The increase range of the target working suction force is then set to be larger. When the fan suction force measured by the robot in real time approaches the increased target working suction force, the suction force of the fan on the walking surface changes from extremely small to very large, thus increasing the walking resistance applied to the drive wheels and preventing the drive wheels from slipping on the walking surface.

[0044] Preferably, the preset value can be set based on the current walking resistance current value calculated when the robot is working normally on walking surfaces with different friction levels. Normal robot operation means that the robot will not experience situations where the fan suction is too strong, causing the drive wheels to not rotate, or where the fan suction is too weak, causing the drive wheels to slip. The preset value can be adjusted based on the fan PWM value and wheel PWM value when the robot is working normally on walking surfaces with different friction levels. Normal robot operation means that the robot will not experience situations where the fan suction is too strong, causing the drive wheels to not rotate, or where the fan suction is too weak, causing the drive wheels to slip, nor will it experience problems where the drive wheels do not rotate or slip due to changes in the torque output of the drive motor. First, the robot is placed on a material with low friction, and the fan PWM value and wheel PWM value are adjusted vertically to ensure that the robot can work normally using the fan suction value adjusted by the aforementioned closed loop. The robot is then placed on a material with high friction, and the fan PWM value is fine-tuned to ensure normal operation using the fan suction force adjusted via the closed-loop mechanism. The robot is then tested on surfaces with varying friction levels to verify if the current fan PWM value enables normal operation. If it does, the current walking resistance current value calculated in step S3 is set as a preset value. If not, a balanced value is found to satisfy most situations encountered by the robot. Due to significant differences in drive motors, fans, and mold structures among different types of robots, the fan PWM and wheel PWM values ​​for normal operation vary for different types of robots. Therefore, it is necessary to obtain the fan PWM and wheel PWM values ​​for normal robot operation in advance.

[0045] It should be noted that a higher calculated current value of the robot's current walking resistance indicates a greater external resistance experienced by the robot on the current walking surface; conversely, a lower calculated current value indicates a smaller external resistance experienced by the robot on the current walking surface. The current walking resistance current value and the external resistance experienced by the robot on the current walking surface are positively correlated. There is a conversion relationship between the current walking resistance current value and the external resistance experienced by the robot on the current walking surface; the conversion coefficient is related to the robot type, fan, drive motor, and the size of the drive wheels, among other mechanical components. A higher calculated current value of the robot's current relative walking resistance current indicates a greater difference in external resistance experienced by the robot at different locations; conversely, a lower calculated current value of the robot's current relative walking resistance current indicates a smaller difference in external resistance experienced by the robot at different locations. The current relative walking resistance current value and the external resistance experienced by the robot at different locations are positively correlated.

[0046] As one embodiment, the method for calculating the robot's current walking resistance current value based on the drive wheel current sampling value, wheel PWM value, and fan PWM value includes: after the robot starts walking on the current walking surface, the robot can start from a starting position and walk in a fixed direction, or even walk in a straight line without obstacles. During the robot's walking process, the current sampling value of the drive wheel is controlled by subtracting the power change value caused by the PWM value used to control the drive motor in the closed-loop adjustment and the power change value caused by the PWM value used to control the fan in the closed-loop adjustment in sequence to obtain the robot's current walking resistance current value. In this application, the order of subtraction of the power change value caused by the PWM value used to control the drive motor in the closed-loop adjustment and the power change value caused by the PWM value used to control the fan in the closed-loop adjustment is not limited. In this embodiment, the robot's current walking resistance current value is represented by electrical quantity to achieve the use of digital signals to represent walking resistance information. When the change in electrical quantity is the change in current, the difference between the two values ​​yields the robot's current walking resistance current value, which is represented by either current or voltage. This can be a digital signal converted from an analog-to-digital converter. Therefore, the change in electrical quantity caused by the PWM value used to control the drive motor in closed-loop regulation is the current value converted from the real-time wheel PWM value, and the change in electrical quantity caused by the PWM value used to control the fan in closed-loop regulation is the current value converted from the real-time fan PWM value. This embodiment chooses to calculate the current walking resistance current value only after the robot has started walking to reduce the influence of current instability when the drive motor first starts rotating and the effects of external static friction. After obtaining stable current outputs from the drive motor and fan, the current walking resistance current value experienced by the robot at a certain time or on a certain section of the walking surface can be obtained by subtracting the current fluctuations caused by the PWM signal fluctuations used to control the drive motor from the real-time driven wheel current sampling value verified by the drive wheel, and then subtracting the current fluctuations caused by the fan control.

[0047] As those skilled in the art will understand, the calculated current value of walking resistance can also be converted from electrical quantity to walking resistance in terms of physical force. This can be achieved by referring to paragraph

[0023] of the specification of Chinese Invention Patent CN111852925B, which describes the method of dividing the current value by a fixed PWM value to obtain the walking resistance. Therefore, the walking resistance experienced by the robot after a preset sampling time can be represented by the current value.

[0048] It should be noted that since the robot has a drive wheel on each of its left and right sides, the current sampling value of the drive wheel and the power change value caused by the PWM value used to control the drive motor in the closed-loop regulation both originate from the drive wheel connected to the same drive motor, in order to obtain the current walking resistance current value of the drive wheel installed on the same side of the robot. The calculation method for the current relative walking resistance current value corresponding to the drive wheels on both sides of the same robot is consistent; the current relative walking resistance current value of the robot can be divided into the current relative walking resistance current values ​​corresponding to the drive wheels on both sides. For each drive motor connected to a drive wheel on each side, it is necessary to calculate the relative power change value of the drive wheel current sampling value and the relative power change value corresponding to the wheel PWM value required for the current walking resistance current value of that side's drive wheel.

[0049] As one embodiment of calculating the current walking resistance current value of a robot, the method for calculating the current walking resistance current value of the robot based on the drive wheel current sampling value, the wheel PWM value, and the fan PWM value specifically includes:

[0050] Before the robot begins to walk, it starts from a standstill, with the drive motor activated and controlled by the real-time adjusted wheel PWM value. The fan is also activated and controlled by the real-time adjusted fan PWM value. Starting from a standstill, the robot typically starts by gradually increasing the current to the drive motor. During this process, even though the robot is stationary, it has a tendency to slide relative to the walking surface. This results in static friction between the robot and the walking surface. After a preset start-up time, the robot reaches a critical state where the driving force provided by the drive motor just exceeds the static friction to overcome its influence. Under the real-time control of the wheel PWM value, the current output by the drive motor tends to stabilize, ensuring a linear relationship between the drive motor speed and the wheel PWM value (referred to as the linear phase of the motor). This confirms that the robot has completed its start-up and begun walking on the current walking surface. The robot's starting position is the preset starting point, which is the starting point after the preset start-up time and also the position the robot is at when the drive motor's output current stabilizes and enters the linear phase. In some embodiments, during the preset start-up time, the robot can also perform robot motion calibration as disclosed in Chinese Patent CN111852925B, that is, to perform motion calibration on each drive wheel of the robot, and strive to complete the motion calibration of the left and right wheels within 210ms, including the left wheel of the robot remaining stationary while the right wheel of the robot rotates forward and backward for a fixed period of time; and the right wheel of the robot remaining stationary while the left wheel of the robot rotates forward and backward for a fixed period of time. Then the current signal output by the drive motor becomes stable, that is, it enters the linear stage. The motion calibration before this is not counted as the robot walking on the current walking surface in this application.

[0051] Preferably, in order to reduce the instability of the current when the drive motor starts to rotate, the current sampling is located in the latter half of a fixed time of 360ms, using a stable current to reduce errors. For example, if the preset start time is set to 210ms, then after 210ms from when the robot starts from rest, the robot samples the wheel PWM value, fan PWM value, and drive wheel current sampling value required to calculate the robot's current walking resistance current value during the walking process.

[0052] During the robot's movement on the current walking surface, it has overcome static friction and can move in the same direction. The robot maintains closed-loop adjustment of the PWM value used to control the drive motor, and ensures that the wheel PWM value is obtained in real time during the closed-loop adjustment process. The robot also maintains closed-loop adjustment of the PWM value used to control the fan, and ensures that the fan PWM value is obtained in real time during the closed-loop adjustment process. After transmitting the real-time obtained wheel PWM values ​​to the drive motor, the robot samples the current signal of the drive motor to obtain the drive wheel current sampling value. Specifically, after the robot starts from a standstill and passes a preset start time, during the unobstructed straight-line movement on the current walking surface, the robot marks the real-time obtained wheel PWM value as the first test PWM value and the real-time obtained fan PWM value as the second test PWM value. The robot marks the product of the first PWM value to be measured and the first conversion coefficient as the power change value caused by the PWM value used to control the drive motor in the closed-loop regulation, and marks the product of the second PWM value to be measured and the second conversion coefficient as the power change value caused by the PWM value used to control the fan in the closed-loop regulation, so as to convert the dimensions of the first PWM value to be measured and the second PWM value to be measured to be the same as the dimensions of the drive wheel current sampling value. The first conversion coefficient is associated with the type of the drive motor and the type of the robot. When the type of the robot or the type of the drive motor changes, the first conversion coefficient also changes. The second conversion coefficient is associated with the type of the fan and the type of the robot. When the type of the robot or the type of the fan changes, the second conversion coefficient also changes.

[0053] In this embodiment, the current sampling value of the robot control drive wheel is subtracted from the power change value caused by the PWM value used to control the drive motor in the closed-loop adjustment to obtain a first power difference value, that is, the difference between the subtraction is the first power difference value; then the first power difference value is subtracted from the power change value caused by the PWM value used to control the fan in the closed-loop adjustment to obtain a second power difference value, that is, the difference between the first power difference value and the power change value caused by the PWM value used to control the fan in the closed-loop adjustment is the second power difference value; then the second power difference value is marked as the robot's current walking resistance current value to cover the true external walking resistance information, and is represented by the corresponding current change value. Therefore, starting from a standstill, after the robot overcomes static friction in sequence, the current sampling value of the PWM signal output by the drive motor is introduced to represent the current change value corresponding to various feedback data of the current walking surface (including actively generated resistance interference changes and passively received resistance interference changes). On this basis, the influence of the torque that hinders walking and the fan suction generated by the fan generated by the PWM value used to control the drive motor in the closed-loop regulation is eliminated. Thus, the external environmental resistance value unaffected by the torque output by the drive motor and the fan suction is calculated during the walking process. During the robot's unobstructed straight walking process, the current walking resistance current value of the robot can restore the friction caused by the material properties of the walking surface that the robot actually contacts (the net weight of the robot, without the torque changes actively generated by the motor equipment). When different types of robots contact different media walking surfaces (applying different walking resistance to the robot), the same accuracy of the walking resistance current value result can be guaranteed.

[0054] It should be noted that the robot's drive wheels contact the walking surface to allow the robot to withstand external resistance from the walking surface, where friction from the walking surface constitutes external resistance. In this embodiment, when the medium of the walking surface contacted by the robot changes, the current value of the walking resistance calculated by the robot changes. Preferably, when the robot does not collide with an obstacle, and the current value of the current walking resistance calculated by the robot changes during its movement, it is determined that the medium of the walking surface contacted by the robot has changed. This change in the medium of the walking surface contacted by the robot is determined by detecting the difference in external resistance between the two different media walking surfaces traversed by the robot. At least the two different media walking surfaces traversed by the robot can be identified, and the change in the external resistance (degree of obstruction) experienced by the currently traversed walking surface relative to the previously traversed walking surface can be determined. For example, it can be determined that the friction experienced when traversing a later walking surface is greater than the friction experienced when traversing an earlier walking surface.

[0055] The current relative walking resistance current value can specifically determine whether the walking resistance experienced by the robot on a walking surface of one type of medium is greater or less than that on a walking surface of another type of medium previously traversed. This effectively distinguishes whether the robot has traversed different mediums. When the medium of the current walking surface is different from that at the preset starting position, the current relative walking resistance current value can further reflect the difference in external resistance between the two different mediums traversed by the robot. It at least identifies the two different mediums traversed by the robot and determines the change in external resistance (degree of obstruction) experienced by the currently traversed walking surface relative to the previously traversed walking surface, serving as a basis for adjusting the target working suction force. This allows the robot to move more smoothly on walking surfaces of different media.

[0056] As another embodiment for calculating the current walking resistance current value of the robot, the method for calculating the current walking resistance current value of the robot based on the drive wheel current sampling value, the wheel PWM value, and the fan PWM value specifically includes:

[0057] Before the robot begins to walk, it starts from a standstill, activating the drive motors and receiving real-time adjusted wheel PWM values. It also activates the fan and receives real-time adjusted fan PWM values. The robot starts by gradually increasing the current to the drive motors, maintaining wheel PWM values ​​on both the drive motors and the fan during this startup process. This causes the robot to tend to slide relative to the walking surface, resulting in static friction. This continues until a preset startup time has elapsed, at which point the robot reaches a preset starting position, and the driving force provided by the drive motors at that moment just exceeds the static friction to overcome its effect. The system detects that the robot has completed its startup and begun walking on the current walking surface, allowing the robot's drive wheels to overcome static friction by rotating. Then, within a preset sampling time, the robot calculates a first reference PWM value based on all obtained wheel PWM values, a second reference PWM value based on all obtained fan PWM values, and a drive wheel reference current value based on all obtained drive wheel current sampling values. The drive wheel current sampling value is the sampling result of the current signal output by the drive motor after directly sampling the wheel PWM values ​​obtained in real time during the aforementioned closed-loop regulation within the preset sampling time, or sampling the wheel PWM values ​​obtained in real time during the aforementioned closed-loop regulation at preset time intervals and inputting them to the drive motor.

[0058] The preset start-up time and preset sampling time are two adjacent time intervals without any time gap to ensure that the preset sampling time is the linear stage after the robot overcomes static friction, i.e., the current signal output by the drive motor is relatively stable. When the robot walks to the preset starting position, the preset sampling time is started at the preset starting position. That is, the wheel PWM value required to calculate the first reference PWM value, the fan PWM value required to calculate the second reference PWM value, and the drive wheel current sampling value required to calculate the drive wheel reference current value are sampled at the preset starting position. In some embodiments, during the preset start-up time, the robot can also perform robot motion calibration disclosed in Chinese Patent CN111852925B, that is, perform motion calibration on each drive wheel of the robot, and strive to complete the motion calibration of the left and right wheels within 210ms, including the robot's left wheel not moving, and the robot's right wheel performing forward and reverse rotation for a fixed time; and the robot's right wheel not moving, and the robot's left wheel performing forward and reverse rotation for a fixed time; then the current signal output by the drive motor becomes stable, i.e., it enters the linear stage. The motion calibration before this is not counted as the robot walking on the current walking surface in this application.

[0059] Preferably, to reduce the instability of the current when the drive motor starts to rotate, the current sampling is located in the latter half of a fixed time of 360ms, using a stable current to reduce errors. For example, the preset start time is equal to 210ms, the preset sampling time is equal to 100ms, and the preset sampling time is delayed from the preset start time, starting sampling from 210ms and continuing until 310ms, for a total sampling time of 100ms. Therefore, the robot can complete the current sampling required to overcome static friction and calculate the walking resistance current value in a shorter time, making this application more practical. In order to calculate the first reference PWM value, the second reference PWM value, and the drive wheel reference current value, the robot samples the wheel PWM value, fan PWM value, and drive wheel current sampling value obtained in real time in the closed-loop regulation of the corresponding equipment according to the interrupt time of the timer. When data acquisition is allowed, the robot samples once for each timer interruption. The interrupt time of the timer is the reciprocal of the timer frequency. When the timer frequency is 1KHz, the interrupt time is 1ms, and the 100ms sampling time is used to sample 100 times.

[0060] Within a preset sampling time, the robot can walk on the current walking surface. The robot has overcome static friction and can walk in the same direction. The robot maintains closed-loop adjustment of the PWM value used to control the drive motor, and determines that the wheel PWM value is obtained in real time during the closed-loop adjustment process. The robot also maintains closed-loop adjustment of the PWM value used to control the fan, and determines that the fan PWM value is obtained in real time during the closed-loop adjustment process. After transmitting the real-time obtained wheel PWM value to the drive motor, the robot samples the current signal of the drive motor to obtain the drive wheel current sampling value. Specifically, after the robot starts from rest and passes a preset start-up time, during the process of the robot walking in a straight line on the current walking surface, the robot marks the product of the first reference PWM value and the first conversion coefficient as the value used for... The power change value caused by the PWM value of the control drive motor in the closed-loop regulation is recorded, and the product of the second reference PWM value and the second conversion coefficient is marked as the power change value caused by the PWM value used to control the fan in the closed-loop regulation. This achieves the sequential conversion of the dimensions of the first reference PWM value and the second reference PWM value to be the same as the dimensions of the drive wheel current sampling value. The dimensions of the drive wheel reference current value are the same as the dimensions of the drive wheel current sampling value. The first conversion coefficient is associated with the type of the drive motor and the type of the robot. When the type of the robot or the type of the drive motor changes, the first conversion coefficient also changes. The second conversion coefficient is associated with the type of the fan and the type of the robot. When the type of the robot or the type of the fan changes, the second conversion coefficient also changes.

[0061] In this embodiment, the reference current value of the robot control drive wheel is subtracted from the power change value caused by the PWM value used to control the drive motor in the closed-loop adjustment. The difference between the subtractions is used to obtain the first power difference value, which is used to offset the torque change interference actively generated by the drive motor. Then, the first power difference value is subtracted from the power change value caused by the PWM value used to control the fan in the closed-loop adjustment. The difference between the subtractions is used to obtain the second power difference value, which, on the basis of offsetting the torque change interference actively generated by the drive motor, continues to offset the influence of the change resistance actively introduced by the fan suction applied to the drive wheel. The second power difference value is marked as the current walking resistance current value of the robot. As can be understood by those skilled in the art, the current walking resistance current value calculated within the preset sampling time can be converted from power to walking resistance in terms of physical force. The calculation method of dividing the current value by a fixed PWM value to obtain the walking resistance can be referred to in paragraph

[0023] of the specification of Chinese invention patent CN111852925B. The current change value corresponding to the walking resistance information reflecting the external environment can be extracted, including the friction force related to the surface medium of the walking surface that is not affected by the robot's active output, so as to facilitate the robot's motion planning on the current walking surface.

[0062] As one embodiment, when a robotic vacuum cleaner or window cleaning robot needs to adjust the target fan suction power of its closed-loop regulation, adjusting the target working suction power based on the calculated relationship between the robot's current relative walking resistance current value and a preset relative value includes: when the robot's current relative walking resistance current value is greater than the preset relative value, the external resistance experienced by the robot on the currently traversed walking surface increases compared to the external resistance experienced on the previously traversed walking surface. This can be understood as an increase in the walking resistance, which is not affected by changes in the force exerted on the drive wheels due to changes in the torque output of the drive motor and changes in the resistance generated by changes in fan suction power. Therefore, the target working suction power is reduced. The target working suction force is set to reduce the real-time measured fan suction force and fan PWM value, preventing the drive wheels from failing to rotate on the currently traversed walking surface due to increased fan suction force. If the calculated current relative walking resistance current value of the robot is less than a preset relative value, the external resistance experienced by the robot on the currently traversed walking surface is reduced compared to the external resistance experienced on the previously traversed walking surface. In this case, the target working suction force is increased, and the current relative walking resistance current value of the robot may increase accordingly, until the current relative walking resistance current value of the robot equals the preset relative value, preventing the drive wheels from slipping on the currently traversed walking surface. The preset relative value can also be set based on the fan PWM value and wheel PWM value when the robot is working normally on two walking surfaces with different friction forces. Normal robot operation means that the robot will not experience situations where the fan suction force is too high, causing the drive wheels to be unable to rotate, or too low, causing the drive wheels to slip, nor will the drive wheels be unable to rotate or slip due to changes in the torque output of the drive motor. First, the robot is placed on a material with low friction. The PWM values ​​of the fan and wheels are adjusted vertically to ensure the robot can operate normally using the fan suction force adjusted via the closed loop. Then, the robot is placed on a material with high friction, and the second PWM and wheel PWM values ​​are fine-tuned to ensure the robot can operate normally using the fan suction force adjusted via the closed loop. Next, the robot is tested on surfaces with different friction levels to verify whether it operates normally using the current fan PWM value. If so, the current relative walking resistance value calculated according to step S3 is set as a preset relative value.

[0063] Preferably, when the medium of the walking surface traversed by the robot within the preset sampling time is different from the medium at the preset starting position, the robot's current relative walking resistance current value is used to represent the current value corresponding to the difference between the external resistance experienced by the robot at the current walking surface and the external resistance experienced by the robot at the reference walking surface. A preset conversion coefficient is needed to transform the difference in external resistance and the current value, such as the conversion coefficient between ground friction and current. This conversion may require the participation of the motor's output torque, and the conversion coefficient will be fine-tuned according to the model of the drive motor or fan. The walking surface traversed by the robot within the preset sampling time is defined as the reference walking surface. The reference walking surface can have the same medium as the current walking surface to detect changes in friction experienced by the robot on the same medium. Alternatively, the reference walking surface can have a different medium from the current walking surface to detect whether the robot is crossing... Different medium walking surfaces; generally, there are no obstacles at the reference walking surface; when the robot walks in a straight line without obstacles, it can be determined whether the friction force (belonging to external resistance) borne by the robot on the current walking surface of one medium type is greater or less than that on the previously traversed walking surface of another medium type. This can effectively distinguish whether the robot has walked on walking surfaces of different friction forces. When the medium of the walking surface contacted by the robot changes, the corresponding external resistance also changes. When the medium of the current walking surface is different from the medium at the preset starting position, the robot's current relative walking resistance current value can further reflect the electrical quantity value corresponding to the difference in external resistance between the two different medium walking surfaces traversed by the robot. At least the two different medium walking surfaces traversed by the robot are determined, and the change in the external resistance (degree of obstruction) borne by the currently traversed walking surface relative to the previously traversed walking surface is determined.

[0064] Preferably, when the medium of the walking surface traversed by the robot within the preset sampling time is the same as the medium at the preset starting position, the robot's current relative walking resistance current value is used to represent the current value corresponding to the difference between the external resistance experienced by the robot at the current walking surface and the external resistance experienced by the robot at the walking surface in contact with the robot at the preset starting position. The difference in external resistance and the current value need to be converted using a preset conversion coefficient, such as the conversion coefficient between ground friction and current. This conversion may require the torque output by the motor to participate in the conversion, and the conversion coefficient will be finely adjusted according to the model of the drive motor or fan. Wherein, if the robot maintains walking on the same medium walking surface within the preset sampling time, then the current walking surface, the walking surface that the robot maintains walking on within the preset sampling time, and the medium at the preset starting position are all the same. Generally, there are no obstacles at the preset starting position.

[0065] As one embodiment, adjusting the target working suction force based on the calculated relationship between the robot's current relative walking resistance current value and a preset relative value further includes: when the robot's current relative walking resistance current value is less than or equal to a preset collision current threshold, adjusting the target working suction force begins, i.e., step S4 is executed. When the robot's current relative walking resistance current value is greater than the preset collision current threshold, the target working suction force is not adjusted, and it is determined that a collision has occurred. Step S4 is not executed, but after executing step S3, the process returns to executing step S1. The preset collision current threshold can be set to be much larger than the preset relative value. In a robot collision scenario, the external resistance experienced by the robot on the current walking surface suddenly increases compared to the external resistance experienced on a walking surface where no collision has occurred.

[0066] It should be noted that the preset collision current threshold is applicable to detecting whether a collision occurs on different walking surfaces of the same type of robot, i.e., detecting collisions with obstacles on different walking surfaces. Preferably, the preset collision current threshold is used to represent the electrical charge corresponding to the minimum external resistance that the robot needs to withstand when colliding with an obstacle on walking surfaces with different friction levels. When the robot or its internal motor needs to be replaced, the preset collision current threshold will be reset; or when the friction coefficients of the walking surfaces that the robot needs to traverse differ significantly, the preset collision current threshold will also be reset. Preferably, the preset collision current threshold can be set based on the current relative walking resistance current value calculated when the robot collides with an obstacle during normal operation on walking surfaces with different friction levels. This is equivalent to setting the threshold as the difference between the current walking resistance current value calculated when the robot collides with an obstacle during normal operation and the current walking resistance current value calculated when the robot does not collide with an obstacle during normal operation. The robot operates normally as follows: when the robot is working, there will be no situation where the fan suction is too strong and the drive wheel cannot turn, nor will there be a situation where the fan suction is too weak and the drive wheel slips, nor will there be a situation where the drive wheel cannot turn due to changes in the output torque of the drive motor, i.e., the drive wheel cannot turn because it cannot overcome the torque, nor will there be a situation where the drive motor outputs too much torque and the drive wheel slips on the walking surface.

[0067] Preferably, in setting the preset collision current threshold, the robot is first placed on a material with low friction, and the first PWM value and / or the second PWM value are adjusted up and down so that the robot can work normally and collide with the preset obstacle after utilizing the fan suction force adjusted by the aforementioned closed loop. Then, the robot is placed on a material with high friction, and the first PWM value and / or the second PWM value are finely adjusted so that the robot can work normally and collide with the preset obstacle after utilizing the fan suction force adjusted by the aforementioned closed loop. Then, the robot is tested on surfaces with different frictions to verify whether it can work normally and collide with the obstacle according to the currently adjusted first PWM value and / or second PWM value. If so, the current relative walking resistance current value calculated according to step S3 above is set as the preset collision current threshold. If not, a balance value is found to meet most situations encountered by the robot. Due to the huge differences in drive motors, fans, mold structures, etc. of different types of machines, the preset collision current threshold calculated for different types of robots is also different. Therefore, it is necessary to obtain the preset collision current threshold required for the robot to judge collision with obstacles during normal operation in advance.

[0068] Based on the above embodiments, when the medium of the walking surface contacted by the robot changes, the corresponding external resistance also changes. Therefore, when the medium of the walking surface recently traversed by the robot is different from the medium at the preset starting position, the robot's current relative walking resistance current value can reflect the difference in external resistance between the two different media, that is, the difference in external resistance between the surface medium of the work area currently traversed by the robot and the surface medium of the work area traversed last time. The previously traversed work area includes the walking surface traversed by the robot within the preset sampling time and the preset starting position. It should be noted that the robot's drive wheels contact the walking surface to allow the robot to bear external resistance from the walking surface, including surface friction varying depending on the medium and the obstructive force of external obstacles, which can be collectively referred to as external walking resistance. When the robot's current relative walking resistance current value increases, it is determined that the walking resistance borne by the robot on the current walking surface is greater than the walking resistance borne by the robot at the preset starting position; when the robot's current relative walking resistance current value decreases, it is determined that the walking resistance borne by the robot on the current walking surface is less than the walking resistance borne by the robot at the preset starting position. When the robot's current relative walking resistance current value increases, it is determined that the external resistance experienced by the robot on the current walking surface increases. When the robot's current relative walking resistance current value is greater than 0, the external resistance experienced by the robot on the current walking surface is greater than the external resistance experienced by the robot at the preset starting position. When the robot's current relative walking resistance current value decreases, it is determined that the external resistance experienced by the robot on the current walking surface decreases. When the robot's current relative walking resistance current value is less than 0, the external resistance experienced by the robot on the current walking surface is less than the external resistance experienced by the robot at the preset starting position.

[0069] As one embodiment of calculating the current relative walking resistance current value of a robot, the method for calculating the current relative walking resistance current value of the robot based on the drive wheel current sampling value, the wheel PWM value, and the fan PWM value includes: after the robot starts walking on the current walking surface, the robot can start from a starting position and walk in a fixed direction, or even walk in a straight line without obstacles. During the robot's walking process, the relative power change value of the drive wheel current sampling value is successively subtracted from the relative power change value corresponding to the wheel PWM value and the relative power change value corresponding to the fan PWM value to obtain the robot's current relative walking resistance. The current value, wherein the relative power change value corresponding to the wheel PWM value can be the difference between the power change value caused by the PWM value used to control the drive motor (the wheel PWM value obtained at a certain moment) in the closed-loop regulation in one embodiment of calculating the current walking resistance current value, and a reference power change value caused by the wheel PWM value. Similarly, the relative power change value corresponding to the fan PWM value can also be the difference between the power change value caused by the PWM value used to control the fan (the fan PWM value obtained at a certain moment) in the closed-loop regulation in one embodiment of calculating the current walking resistance current value, and a reference power change value caused by the fan PWM value. In this embodiment, the order of subtraction between the relative power change values ​​corresponding to the wheel PWM value and the relative power change values ​​corresponding to the fan PWM value is not restricted. The robot's current relative walking resistance current value is represented by electrical quantity to achieve the representation of walking resistance information using digital signals. When the relative electrical quantity change value is the current change value, the robot's current relative walking resistance current value obtained by subtracting it is represented by current value or voltage value, which can be a digital signal converted by analog-to-digital converter. Therefore, the relative electrical quantity change value corresponding to the wheel PWM value and the relative electrical quantity change value corresponding to the fan PWM value are both equivalent to the current value converted from the difference between the two PWM values. In this embodiment, the current relative walking resistance current value is calculated only after the robot has started walking. This is to reduce the influence of current instability when the drive motor starts to rotate and the static friction force from the outside. After obtaining a stable current output from the drive motor and the fan, the difference between the current walking resistance current value experienced by the robot at two different times or at two different walking surfaces can be obtained by subtracting the current fluctuation of the drive wheel current sample value (obtained in real time and verified by the drive wheel) from the current fluctuation of the current change value caused by the PWM value used to control the drive motor relative to the reference PWM value, and then subtracting the current fluctuation of the current change value caused by the PWM value used to control the fan relative to the corresponding reference PWM value.

[0070] It should be noted that the relative charge change value of the drive wheel current sampling value and the relative charge change value corresponding to the wheel PWM value both originate from the drive wheel connected to the same drive motor to obtain the current relative walking resistance current value of the drive wheel installed on the same side of the robot. Therefore, for the same robot, the calculation method for the current relative walking resistance current value corresponding to the drive wheels on both sides is consistent. The current relative walking resistance current value of the robot can be divided into the current relative walking resistance current value corresponding to the drive wheels on both sides. For each drive motor connected to the drive wheel on each side, it is necessary to calculate the relative charge change value of the drive wheel current sampling value and the relative charge change value corresponding to the wheel PWM value required for the current relative walking resistance current value of that side of the drive wheel.

[0071] Based on the above embodiments, the method for calculating the robot's current relative walking resistance current value based on the drive wheel current sampling value, wheel PWM value, and fan PWM value specifically includes:

[0072] Before the robot begins to walk, it starts from a standstill, with the drive motor activated and controlled by the real-time adjusted wheel PWM value. The fan is also activated and controlled by the real-time adjusted fan PWM value. The standstill state can be the state immediately following a collision with an obstacle and braking to a stop, after which the robot begins to walk in a new direction. Starting from a standstill, the robot gradually increases the current in the drive motor to initiate movement. This causes the robot to slide relative to the contact surface, resulting in static friction. This continues until a preset start-up time has elapsed, at which point the robot is at a preset starting position. At this current moment, the driving force provided by the drive motor just exceeds the static friction to overcome its influence. The current signal output by the drive motor is then stable, ensuring the robot functions normally on different contact surfaces (contact surfaces with varying friction). This confirms that the robot has completed its start-up and begun walking on the current contact surface, allowing the drive wheels to overcome static friction. The starting position of the robot is the preset starting position, which is the starting point after the preset start-up time and also the position the robot is at when the output current of the drive motor stabilizes and enters a linear state. The preset starting position is a pre-set location on the walking surface of the medium to be cleaned, serving as the starting point for the robot to sample the current values ​​of the drive wheels. In some embodiments, within the preset start time, the robot can also perform robot motion calibration as disclosed in Chinese Patent CN111852925B, that is, perform motion calibration on each drive wheel of the robot, aiming to complete the motion calibration of the left and right wheels within 210ms, including the left wheel of the robot remaining stationary while the right wheel of the robot performs forward and reverse rotation for a fixed period of time; and the right wheel of the robot remaining stationary while the left wheel of the robot performs forward and reverse rotation for a fixed period of time. Then the current signal output by the drive motor becomes stable, that is, it enters the linear stage. The motion calibration before this point is not counted as the robot walking on the current walking surface in this application. Then, within the preset sampling time, the robot calculates a first reference PWM value based on all obtained wheel PWM values, calculates a second reference PWM value based on all obtained fan PWM values, and calculates a drive wheel reference current value based on all obtained drive wheel current sampling values.

[0073] The robot maintains its movement on the same walking surface for a preset sampling time, meaning it moves on the same medium to withstand the same surface friction (friction determined by the type of medium, unaffected by changes in the robot's fan suction or the torque output of the drive motor, and the robot's overall weight remains unchanged). During the robot's movement within the preset sampling time, the calculated first reference PWM value represents the wide-ranging variation in additional walking resistance caused by the torque output of the drive motor, preventing interference from excessively large or small PWM values ​​generated by the aforementioned closed-loop adjustment. Therefore, the first reference PWM value becomes the PWM value corresponding to the reference active interference factor brought by the drive motor. Similarly, the calculated second reference PWM value can represent the wide-ranging additional walking resistance caused by the fan suction applied to the walking surface, and can also reflect the current change value caused by the change in fan suction on the same medium, making the second reference PWM value the PWM value corresponding to the reference active interference factor brought by the fan. Similarly, the calculated reference current value of the drive wheel can represent the current sampling value corresponding to all the resistance factors existing when the drive wheel travels on the same medium surface. It can also represent the interference factors caused by the change in torque of the drive motor, the interference factors caused by the change in suction force of the fan, the friction force exerted on the drive wheel by the medium surface (related to the type of medium in a robot of the same mass), and the obstacle collision factors that may exist on the same medium surface. All these factors can be converted into current change values.

[0074] After the robot calculates the first reference PWM value, the second reference PWM value, and the reference current value of the drive wheel within a preset sampling time, and the preset sampling time has elapsed, the first reference PWM value, the second reference PWM value, and the reference current value of the drive wheel are retained as walking resistance balancing current values ​​adapted to the current walking surface. This adapts to various resistances actively generated by the drive motor and fan within the current walking surface and passively received external resistances. The current walking surface can then be set as the reference walking surface. If the preset sampling time is relatively short and the current walking surface is relatively long, the robot will continue to walk on the current walking surface after the preset sampling time, and the robot can maintain straight-line walking on the same medium walking surface. Based on this, if the reference current value of the drive wheel is subtracted sequentially from the first reference PWM value and the second reference PWM value, the result of the subtraction can be set as the reference walking resistance current value, representing the effective value of the external resistance that the robot bears on the current walking surface. This is equivalent to the calibration result of the external resistance value borne on the walking surface of the same medium within the preset sampling time, and is denoted as the calibration result of the external resistance value within the preset sampling time. This can be understood as the standard external resistance value borne by the robot on each type of walking surface. By comparing the walking resistance current value with the calibration result of the external resistance value within the preset sampling time, the walking surface with a different medium than the walking surface traversed within the preset sampling time can be distinguished. Alternatively, on the same medium, the excessively large walking resistance current value calculated in real time can be used to detect whether the robot has collided on that walking surface.

[0075] After the preset sampling time, in order to compare the real-time obtained PWM value with the reference PWM value calculated within the preset sampling time, so as to calculate the robot's current relative walking resistance current value; in this embodiment, the robot first marks the real-time obtained wheel PWM value as the first PWM value to be measured, the real-time obtained fan PWM value as the second PWM value to be measured, and the real-time obtained drive wheel current sampling value as the drive wheel current value to be measured; then, the difference between the drive wheel current value to be measured and the drive wheel reference current value is marked as the relative charge change value of the drive wheel current sampling value, which can represent the current value converted from the difference in walking resistance (which can be the total force applied to the drive wheel by the actively input walking resistance and the passively received external resistance) between the latest walking position or the walking surface and the walking surface (reference walking surface) required to calculate the drive wheel reference current value, representing the current value converted from the reference walking surface. The comparison value of the walking resistance formed by the walking surface is used; and the product of the difference between the first PWM value to be measured and the first reference PWM value and the first conversion coefficient is marked as the relative power change value corresponding to the wheel PWM value, representing the degree of difference in the current change value caused by the change in drive motor torque at the robot's latest walking position or walking surface relative to the walking surface (reference walking surface) required to calculate the second reference PWM value, used to indicate the comparison value of the active interference of the drive motor formed relative to the reference walking surface; and the product of the difference between the second PWM value to be measured and the second reference PWM value and the second conversion coefficient is marked as the relative power change value corresponding to the fan PWM value, representing the degree of difference in the current change value caused by the change in fan suction at the robot's latest walking position or walking surface relative to the walking surface (reference walking surface) required to calculate the second reference PWM value, used to indicate the comparison value of fan suction interference formed relative to the reference walking surface. The first conversion coefficient converts the dimension of the first reference PWM value to be the same as that of the drive wheel current sampling value. The second conversion coefficient converts the dimension of the second reference PWM value to be the same as that of the drive wheel current sampling value. The dimension of the drive wheel reference current value is the same as that of the drive wheel current sampling value. The first conversion coefficient is associated with the type of the drive motor and the type of the robot. When the type of the robot or the type of the drive motor changes, the first conversion coefficient also changes. The second conversion coefficient is associated with the type of the fan and the type of the robot. When the type of the robot or the type of the fan changes, the second conversion coefficient also changes.Then, the relative change in electrical charge of the robot's control drive wheel current sampling value is subtracted from the relative change in electrical charge corresponding to the wheel PWM value to obtain a first difference (the change in current corresponding to the force actively introduced by the torque output of the drive motor applied to the drive wheel), which is used to offset the active interference comparison value of the drive motor; then, the relative change in electrical charge corresponding to the fan PWM value is subtracted from the first difference to obtain a second difference (the change in force actively introduced by the fan suction applied to the drive wheel), thereby offsetting the influence of the fan suction interference comparison value on the basis of offsetting the active interference comparison value of the drive motor. The second difference is then marked as the robot's current relative walking resistance current value to reflect the difference in external resistance between the walking surfaces that the robot has walked on within the preset sampling time, i.e., the difference in external walking resistance. This corresponds to the relative resistance current information formed by the walking resistance of the external environment relative to the reference walking surface, which is used to represent the relative friction force related to the surface medium of the walking surface and not affected by the torque output of the motor, and the relative resistance caused by collisions with external obstacles (which can be the difference in walking resistance relative to the walking surface without obstacles).

[0076] As can be understood by those skilled in the art, the calculated current value of relative walking resistance can also be converted from electrical quantity into relative walking resistance in terms of physical force. The calculation method of dividing the current value by a fixed PWM value to obtain the walking resistance can be referred to in paragraph

[0023] of the specification of Chinese Invention Patent CN111852925B.

[0077] Preferably, when the medium of the walking surface that the robot walks on after the preset sampling time is of a different type of material than the medium of the walking surface that it has walked on during the preset sampling time, the same robot experiences different frictional forces on different walking surfaces. The change in frictional force (change in external resistance) experienced by the same robot outside the preset sampling time can be detected by the robot's current relative walking resistance current value. The preset sampling time is relatively short. The robot's current relative walking resistance current value, based on the same reference value, can distinguish the relative frictional force of walking surfaces with different media. It can also be further refined by setting a threshold value to distinguish whether the robot has walked on a walking surface with a new medium. The target working suction force can then be adjusted accordingly to adapt to the currently traversed walking surfaces.

[0078] In the above embodiment for calculating the current walking resistance current value and the current relative walking resistance current value, the method for calculating the first reference PWM value based on all obtained wheel PWM values ​​within the preset sampling time includes: averaging all obtained wheel PWM values ​​within the preset sampling time to obtain the first reference PWM value. Specifically, this involves summing the sequentially sampled wheel PWM values, and then averaging the sum of the wheel PWM values ​​within the preset sampling time according to the number of summations. This average value is set as the first reference PWM value to prevent interference from individual excessively large or small PWM values ​​obtained from the aforementioned closed-loop adjustment. Preferably, the robot continuously sums the sampled wheel PWM values ​​obtained from the real-time closed-loop adjustment until sampling is no longer allowed, and then divides the summation result by the number of summations to obtain the first reference PWM value. Within the preset sampling time, there is no restriction on whether the left and right drive wheels rotate clockwise or counterclockwise; or, from all the wheel PWM values ​​obtained within the preset sampling time, the wheel PWM value with the largest value is selected as the first reference PWM value. Specifically, the magnitudes of all the obtained wheel PWM values ​​are compared sequentially, and then the wheel PWM value with the largest value is set as the first reference PWM value to prevent the drive wheels from not moving; thus, within the preset sampling time, both the sampling of wheel PWM values ​​and the filtering of all the obtained wheel PWM values ​​can be completed within the same time period.

[0079] Similarly, within the preset sampling time, the method for calculating the second reference PWM value based on all obtained fan PWM values ​​includes: averaging all obtained fan PWM values ​​within the preset sampling time to obtain the second reference PWM value, so as to avoid sampling a fan PWM value that drives the fan with excessive suction (to prevent excessive pressure on the drive wheel, causing the drive wheel to fail to rotate), and also to avoid sampling a fan PWM value that drives the fan with insufficient suction (to prevent insufficient pressure on the drive wheel, which could easily cause the drive wheel to slip); or, selecting the fan PWM value with the largest value from all obtained fan PWM values ​​within the preset sampling time as the second reference PWM value. In this case, even if the largest fan PWM value is used, it will be canceled out when calculating the current travel resistance current value or the current relative travel resistance current value.

[0080] Similarly, within the preset sampling time, the method for calculating the drive wheel reference current value based on all obtained drive wheel current sampling values ​​includes: averaging all obtained drive wheel current sampling values ​​within the preset sampling time to obtain the drive wheel reference current value. The average value of the drive wheel current sampling values ​​within the preset sampling time is the drive wheel reference current value, which can be obtained after calculating the first reference PWM value to ensure the real-time performance and validity of the calculated drive wheel reference current value; or, selecting the drive wheel current sampling value with the largest value from all obtained drive wheel current sampling values ​​within the preset sampling time to obtain the drive wheel reference current value, which can also be obtained after calculating the first reference PWM value to ensure the real-time performance and validity of the calculated drive wheel reference current value. During the preset sampling time, the robot collects wheel PWM values ​​and fan PWM values ​​at preset time intervals. Therefore, the collected drive wheel current sampling values ​​are also collected at preset time intervals, thereby obtaining a limited number of first reference PWM values, second reference PWM values, and drive wheel reference current values, thus obtaining a more comprehensive set of PWM values ​​required to calculate the walking resistance current value, resulting in faster calculation speed.

[0081] In summary, regardless of whether the walking surface requires a large or small fan suction, adjustments are made based on the calculated current walking resistance current value and / or the current relative walking resistance current value. This, combined with closed-loop regulation, dynamically obtains a fan suction with a wide range of applicability. This not only overcomes the influence of torque interference actively generated by the motor and the resistance factors introduced by changes in fan suction, but also adapts to different types of machine walking motors, main fans, mold structures, and walking surfaces with different friction forces. This improves the robot's adaptability to complex environments, making it more efficient and intelligent.

[0082] In this application, the wheel PWM value is used to control the output torque change of the drive motor, so as to form one type of electrical change value in the drive wheel current sampling value. The fan PWM value is used to control the fan suction change generated by the fan, so as to form another type of electrical change value in the drive wheel current sampling value. In the closed-loop regulation, if the target working suction is increased, the fan suction and fan PWM value measured by the robot in real time will increase; if the target working suction is decreased, the fan suction and fan PWM value measured by the robot in real time will decrease.

[0083] The change in the target working suction force is based on the magnitude of the current walking resistance current value and / or the current relative walking resistance current value. That is, it is determined by the walking resistance current value that is not affected by the current change value actively generated by the robot (including the current change value applied by the fan suction force change and the current change value caused by the torque output change of the drive motor). It eliminates the influence of the walking resistance formed by the fan suction force applied to the drive wheel by the robot in real time, and realizes the determination of whether to adjust the fan suction force from the perspective of the external resistance that the robot is subjected to on the current walking surface. This more effectively addresses the slippage and walking resistance factors caused by the friction force constrained by the medium type of the current walking surface, allowing the robot to walk more stably on the current walking surface.

[0084] As one embodiment, in step S2, the robot can adjust the PWM value used to control the drive motor through the angle closed-loop feedback adjustment device, and input the real-time adjusted wheel PWM value to the drive motor. The drive motor will change the output speed, and the heading angle of the robot corresponding to the changed speed is used as the feedback input of the angle closed-loop feedback adjustment device to maintain the closed-loop adjustment, and also indirectly adjust the heading angle measured by the robot in real time. The closed-loop adjustment has a corresponding adjustment period. Therefore, the method for closed-loop adjustment of the PWM value used to control the drive motor includes: when the absolute value of the angle difference between the heading angle and the target navigation angle measured by the robot in real time within the current adjustment cycle is not within a preset angle error range, the robot uses the absolute value of the angle difference between the heading angle and the target navigation angle measured in real time within the current adjustment cycle, or the robot configures the heading angle measured in real time as the feedback input of the angle closed-loop feedback adjustment device for the next adjustment cycle, to perform PID adjustment on the PWM value used to control the drive motor. In this embodiment, the closed-loop adjustment is set as PID adjustment; and the real-time feedback adjustment result of the PWM value used to control the drive motor is set as the wheel PWM value, so that a wheel PWM value will be adjusted in each adjustment cycle and acquired externally in real time; then the wheel PWM value is input to the drive motor to adjust the robot's heading angle in real time until the heading angle measured by the robot in real time and the target navigation angle are within the preset angle error range. The absolute value of the angle difference varies within a preset angle error range or remains constant within the preset angle error range. The latest obtained wheel PWM value is input to the drive motor. By performing PID adjustment on the wheel PWM value, the robot's real-time measured heading angle is adjusted in a closed loop to approach the target navigation angle, guiding the robot to walk in the direction corresponding to the target navigation angle. The target navigation angle is pre-planned by the robot to guide it along a pre-planned work path. The target navigation angle can be modified. When the target navigation angle is modified too much or the robot stops and then restarts, steps S1 to S4 need to be re-executed. Generally, this occurs in scenarios where the robot collides with an obstacle and stops or turns around. In such cases, steps S1 to S4 need to be re-executed to recalculate the current walking resistance current value and / or the current relative walking resistance current value. The robot's heading angle is measured in real time by the robot's built-in gyroscope.

[0085] The angle closed-loop feedback control device can be divided into a first angle closed-loop feedback control device and a second angle closed-loop feedback control device. The first angle closed-loop feedback control device is used to perform PID control on the PWM value of the left drive motor, and the second angle closed-loop feedback control device is used to perform PID control on the PWM value of the right drive motor. Both the first and second angle closed-loop feedback control devices can be composed of PID controllers.

[0086] Specifically, the method for closed-loop adjustment of the PWM value used to control the drive motor includes: when the absolute value of the angle difference between the heading angle measured by the robot in real time and the target navigation angle within the current adjustment cycle is not within a preset angle error range, the robot controls a first angle closed-loop feedback adjustment device to perform PID adjustment on the PWM value used to control the left drive motor; during the PID adjustment of the PWM value used to control the left drive motor, the first angle closed-loop feedback adjustment device outputs the latest PWM value used to control the left drive motor within the current adjustment cycle. The robot configures the difference between the PWM value used to control the left drive motor and the preset left target PWM value within the current adjustment cycle as the feedback input of the first angle closed-loop feedback adjustment device for the next adjustment cycle, so as to reduce the difference between the PWM value used to control the left drive motor and the preset left target PWM value. As time increases, this difference decreases until it equals zero, allowing the first angle closed-loop feedback adjustment device to enter a steady state. Then, the heading angle measured by the robot in real time is closer to the target navigation angle. The first angle closed-loop feedback adjustment device is a closed-loop control system with negative feedback adjustment function. The robot sets the latest adjusted PWM value for controlling the left drive motor to the first PWM value, and then inputs the first PWM value into the left drive motor in real time to obtain the real-time speed of the left drive motor. The current signal output by the left drive motor can be sampled to provide feedback on the resistance experienced by the left drive wheel on the walking surface. Without considering external resistance (such as friction and collision factors), the real-time speed of the left drive motor is directly proportional to the first PWM value.

[0087] Simultaneously, if the absolute value of the angle difference between the robot's real-time measured heading angle and the target navigation angle within the current adjustment cycle is not within the preset angle error range, the robot controls the second angle closed-loop feedback adjustment device to perform PID adjustment on the PWM value used to control the right drive motor. During the PID adjustment of the PWM value used to control the left drive motor, the second angle closed-loop feedback adjustment device outputs the latest PWM value used to control the right drive motor within the current adjustment cycle. The robot configures the difference between the PWM value used to control the right drive motor and the preset right target PWM value within the current adjustment cycle as the feedback input for the next adjustment cycle, thereby reducing the difference between the PWM value used to control the right drive motor and the preset right target PWM value. As time increases, this difference decreases until it equals zero, allowing the second angle closed-loop feedback adjustment device to enter a steady state. Thus, the heading angle measured by the robot in real time is closer to the target navigation angle. The second angle closed-loop feedback adjustment device is a closed-loop control system with negative feedback adjustment function. The robot sets the newly adjusted PWM value for controlling the right drive motor to the first and second PWM values, and then inputs the first and second PWM values ​​into the right drive motor to obtain the real-time speed of the right drive motor. The current signal output by the right drive motor can be sampled to provide feedback on the resistance experienced by the right drive wheel on the walking surface. Without considering external resistance (such as friction and collision factors), the real-time speed of the right drive motor is directly proportional to the first and second PWM values.

[0088] When the difference between the PWM value used to control the left drive motor and the preset left target PWM value is less than the first preset drive wheel steady-state error, and the difference between the PWM value used to control the right drive motor and the preset right target PWM value is less than the second preset drive wheel steady-state error, the robot adjusts its walking direction based on the difference between the real-time rotational speed of the left drive motor and the real-time rotational speed of the right drive motor. The adjustment angle is determined by the difference between the real-time rotational speed of the left drive wheel and the real-time rotational speed of the right drive wheel. After the direction is adjusted, the heading angle measured by the robot in real time is configured as the feedback input of the angle closed-loop feedback adjustment device (including the first angle closed-loop feedback adjustment device and the second angle closed-loop feedback adjustment device) in the next adjustment cycle, so as to adjust the absolute value of the angle difference between the robot's heading angle and the target navigation angle to vary within the preset angle error range or remain constant within the preset angle error range during the aforementioned PID adjustment process. It should be noted that in this embodiment, the robot first measures the current heading angle in real time using a gyroscope. The real-time rotational speed of the left drive wheel is proportional to the PWM value used to control the left drive motor and has a preset conversion relationship. The real-time rotational speed of the right drive wheel is also proportional to the PWM value used to control the right drive motor and has a preset conversion relationship. The radii of the left and right drive wheels are equal and symmetrically arranged on the left and right sides of the robot, so the circumference of the left drive wheel is equal to the circumference of the right drive wheel. The robot multiplies the difference between the real-time rotational speeds of the left and right drive wheels by the circumference of the left drive wheel (or the circumference of the right drive wheel). The result of this multiplication is labeled as the walking speed of the left drive wheel. The difference between the walking speed of the right drive wheel and the walking speed of the robot is multiplied, and the ratio of the result to the robot's body width is set as the angular velocity achieved by the robot in adjusting its walking direction. The product of the angular velocity achieved by the robot in adjusting its direction and the adjustment time is set as the angle turned by the robot in adjusting its walking direction, i.e., the adjustment angle. If necessary, the calculated radian units can be converted to angle units. Under the adjustment of the angle closed-loop feedback adjustment device, this adjustment angle gradually approaches or even equals the absolute value of the angle difference between the robot's current heading angle and the target navigation angle. The preset angle error range includes the value 0, and the dimension is the same as that applicable to the angle measured by the gyroscope. Preferably, when the robot's chassis shape is a disc shape, the robot's body width is the robot's body diameter.

[0089] In the aforementioned embodiments, the wheel PWM value includes a first PWM value and a first second PWM value; the preset right target PWM value and the preset left target PWM value are collectively referred to as the first preset target PWM value. A left drive wheel is installed on the left side of the robot, and the left drive wheel is electrically connected to a left drive motor; a right drive wheel is installed on the right side of the robot, and the right drive wheel is electrically connected to a right drive motor. During closed-loop adjustment, the absolute value of the difference between the real-time speed of the left drive motor and the real-time speed of the right drive motor can be positively correlated with the absolute value of the difference between the robot's heading angle and the target navigation angle. That is, the larger the absolute value of the difference between the robot's heading angle and the target navigation angle, the larger the absolute value of the difference between the real-time speed of the left drive motor and the real-time speed of the right drive motor, and the larger the speed difference between the left and right drive wheels. However, the turning direction of the robot formed by the rotation of the left and right drive wheels is opposite to the deviation direction of the robot's walking direction relative to the direction indicated by the target navigation angle, so as to reduce the absolute value of the difference between the robot's heading angle and the target navigation angle, forming a negative feedback adjustment of the angle.

[0090] As one embodiment, in step S1, the robot can adjust the PWM value used to control the fan through the air pressure closed-loop feedback adjustment device, and apply the real-time adjusted fan PWM value to the fan. The motor inside the fan will change its output speed, and the fan suction force corresponding to the changed speed will be used as the feedback input of the air pressure closed-loop feedback adjustment device to maintain closed-loop adjustment, and also indirectly adjust the fan suction force measured by the robot in real time. Therefore, the method of closed-loop adjustment of the PWM value used to control the fan in step S1 includes:

[0091] When the absolute value of the air pressure difference between the fan suction force and the target working suction force measured by the robot in real time within the current adjustment cycle is not within the preset air pressure error range, the robot configures the absolute value of the air pressure difference between the fan suction force and the target working suction force measured in real time within the current adjustment cycle, or the real-time measured fan suction force, as the feedback input of the air pressure closed-loop feedback adjustment device in the next adjustment cycle, so as to perform PID adjustment on the PWM value used to control the fan. In this embodiment, the closed-loop adjustment is set as PID adjustment; and the real-time feedback adjustment result of the PWM value used to control the fan is set as the fan PWM value. Then, a fan PWM value will be adjusted in each adjustment cycle and acquired by the outside in real time to calculate the current walking resistance current value or the current relative walking resistance current value. The PWM value of the fan is then input into the fan to adjust the fan suction in real time until the absolute value of the air pressure difference between the fan suction measured by the robot in real time and the target working suction within the current adjustment cycle changes within a preset air pressure error range or remains constant within a preset air pressure error range. The latest obtained fan PWM value is then input into the fan, and the closed-loop adjustment of the fan suction measured by the robot in real time is promoted by PID adjustment of the fan PWM value to approach the target working suction. The target working suction can be set by the robot according to the aforementioned method for adjusting the fan suction, to adapt to the air pressure conditions of the working surface where the robot is currently located. An air pressure sensor is installed at the air inlet of the robot's fan to monitor the fan suction in real time.

[0092] Specifically, the method for closed-loop adjustment of the PWM value used to control the fan includes: when the absolute value of the air pressure difference between the fan suction force and the target working suction force measured by the robot in real time within the current adjustment cycle is not within a preset air pressure error range, the robot controls the air pressure closed-loop feedback adjustment device to perform PID adjustment on the PWM value used to control the fan; during the PID adjustment of the PWM value used to control the fan, the robot configures the difference between the PWM value used to control the fan and the second preset target PWM value within the current adjustment cycle as the feedback input of the air pressure closed-loop feedback adjustment device in the next adjustment cycle, so as to reduce the difference between the PWM value used to control the fan and the second preset target PWM value. As time increases, this difference decreases until it equals zero, which allows the air pressure closed-loop feedback adjustment device to enter a steady state, so that the fan suction force measured by the robot in real time is closer to the target working suction force. The air pressure closed-loop feedback adjustment device is a closed-loop control system with negative feedback adjustment function. The robot sets the PWM value used to control the fan to the fan's PWM value, and then inputs the fan PWM value into the fan to generate suction force, which is applied to the walking surface and drive wheels. The fan suction force is positively correlated with the fan PWM value. When the difference between the PWM value used to control the fan and the second preset target PWM value is less than the preset fan steady-state error, the absolute value of the air pressure difference between the fan suction force and the target working suction force, measured in real time by the robot, either varies within a preset air pressure error range or remains constant within the preset air pressure error range. The preset air pressure error range includes the value 0, and its dimensions are the same as those applicable to air pressure.

[0093] As one embodiment, the method for obtaining the drive wheel current sampling value by sampling the PWM signal output by the drive motor includes: the robot samples the current signal output by the left drive motor through an analog-to-digital converter to obtain the left drive wheel current sampling value to reflect the motion state of the left drive wheel; simultaneously, the robot samples the current signal output by the right drive motor through an analog-to-digital converter to obtain the right drive wheel current sampling value to reflect the motion state of the right drive wheel; wherein, the drive wheel current sampling value includes the left drive wheel current sampling value and the right drive wheel current sampling value, the current signal output by the drive motor is a PWM signal, the drive wheel current sampling value can use voltage values ​​to represent current changes, and feedback all types of walking resistance borne by the drive wheel, including torque change interference information output by the drive motor, which is specifically related to factors such as the torque applied to the drive wheel, as well as the resistance influence factors caused by the suction force generated by the fan applied to the drive wheel, and also the friction force determined by the ground medium, and the external resistance introduced by collision with obstacles.

[0094] Based on the above embodiment for calculating the current walking resistance current value and the current relative walking resistance current value, when the wheel PWM value adopts the first PWM value and the drive wheel current sampling value adopts the left drive wheel current sampling value, the left drive wheel current sampling value is subtracted from the power change value caused by the first PWM value in the closed-loop adjustment to obtain a first difference. Then, the first difference is subtracted from the power change value caused by the fan PWM value in the closed-loop adjustment to obtain a second difference. The second difference is then marked as the current walking resistance current value of the robot's left drive wheel; or, the power change value of the left drive wheel current sampling value is subtracted from the relative power change value corresponding to the first PWM value to obtain a first difference. Then, the first difference is subtracted from the relative power change value corresponding to the fan PWM value to obtain a second difference. The second difference is then marked as the current relative walking resistance current value of the robot's left drive wheel.

[0095] When the wheel PWM value uses the first and second PWM values, and the drive wheel current sampling value uses the right drive wheel current sampling value, the change in the power of the right drive wheel current sampling value is subtracted from the change in the power caused by the first and second PWM values ​​in the closed-loop adjustment to obtain a first difference. Then, the first difference is subtracted from the change in the power caused by the fan PWM value in the closed-loop adjustment to obtain a second difference. The second difference is then marked as the current walking resistance current value of the robot's right drive wheel. Alternatively, when the wheel PWM value uses the first and second PWM values, and the drive wheel current sampling value uses the right drive wheel current sampling value, the relative change in the power of the right drive wheel current sampling value is subtracted from the relative change in the power of the first and second PWM values ​​to obtain a first difference. Then, the first difference is subtracted from the relative change in the power of the fan PWM value to obtain a second difference. The second difference is then marked as the current relative walking resistance current value of the robot's right drive wheel.

[0096] It should be noted that PID (Proportional Integral Derivative) control is a fundamental control method in classical control theory, a linear control law with proportional, integral, and derivative actions. It is widely used in industrial process control, especially for deterministic control systems where accurate mathematical models can be established. When the structure and parameters of the controlled object are not fully understood, or an accurate mathematical model is unavailable, and other control theory techniques are difficult to employ, the structure and parameters of the system controller must be determined through experience and on-site debugging. In such cases, PID control is the most convenient approach. In other words, when a system and the controlled object are not fully understood, or when system parameters cannot be obtained through effective measurement methods, PID control is the most suitable option. In practice, PI and PD control are also used. PID control calculates the control quantity based on the system error using proportional, integral, and derivative actions. Increasing the proportional coefficient Kp can reduce the system's steady-state error, but when Kp is too large, it will deteriorate the system's dynamic quality, causing oscillations in the controlled variable, and even leading to instability in the closed-loop system. A large integral coefficient Ti indicates a weak integral action, while a small integral coefficient indicates a strong integral action. Increasing Ti will slow down the process of eliminating steady-state error, but it can reduce overshoot and improve stability. Increasing the derivative coefficient Td strengthens the derivative action, which helps to reduce overshoot, overcome oscillations, stabilize the system, speed up the system's response, reduce settling time, and thus improve the system's dynamic performance.

[0097] Based on the foregoing embodiments, the robot of this application has drive wheels installed on both sides, and drive motors electrically connected to the drive wheels are installed inside the robot to drive the robot to walk. The robot is also equipped with a fan to generate suction on the walking surface. When the robot is a sweeping robot, a left drive wheel is installed on the left side of the sweeping robot and electrically connected to a left drive motor, and a right drive wheel is installed on the right side of the sweeping robot and electrically connected to a right drive motor. A vacuum cleaner fan is installed on the chassis of the sweeping robot, with the suction port facing the walking surface. By providing suction power from the fan, the walking surface is vacuumed. The suction power of the fan is equivalent to the suction power of the vacuum cleaner in the sweeping robot, describing the vacuuming robot's vacuuming ability. The robot is a circular intelligent window cleaning robot with two cleaning discs as its left and right drive wheels. The mobile robot is a square intelligent window cleaning robot with two tracked wheels as its left and right drive wheels. Both intelligent window cleaning robots and sweeping robots can use a fan to adhere to the walking surface (glass or wall) and use the method of adjusting the fan suction power disclosed in any of the foregoing embodiments to adjust the target working suction power to the optimal fan suction power before starting to clean the walking surface.

[0098] The robot combines the PWM values ​​used to control the drive motor and the fan to offset the current changes caused by torque variations in the drive motor and fan suction variations (which can also be considered as torque interference from the fan's active output) in the sampled drive wheel current values. Without using encoder data, it can calculate the relative walking resistance current and the walking resistance current, which are unaffected by torque variations actively generated by the robot. These relative and walking resistance current values ​​are then used to adjust the fan suction. Combined with closed-loop regulation, this dynamically obtains a wide range of applicable fan suction. It overcomes the effects of torque interference from the motor and resistance factors introduced by fan suction variations, and adapts to different types of machine walking motors, main fans, mold structures, and walking surfaces with varying friction. This improves the robot's adaptability to complex environments, making it more efficient and intelligent.

[0099] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.

[0100] The above embodiments are only for illustrating the technical concept and features of the present invention, and are intended to enable those skilled in the art to understand the content of the present invention and implement it accordingly. They should not be construed as limiting the scope of protection of the present invention. All equivalent transformations or modifications made in accordance with the spirit and essence of the present invention should be covered within the scope of protection of the present invention.

Claims

1. A method for adjusting the suction force of a fan in a robot, wherein drive wheels are installed on both sides of the robot, and a drive motor electrically connected to the drive wheels is installed inside the robot; the robot is also equipped with a fan to generate suction force on the robot's walking surface; characterized in that, Methods for adjusting the suction power of a robot include: The robot performs closed-loop adjustment of the PWM value used to control the fan so that the absolute value of the air pressure difference between the fan suction force and the target working suction force measured by the robot in real time is within the preset air pressure error range, and obtains the fan PWM value in real time during the closed-loop adjustment process. The robot performs closed-loop adjustment of the PWM value used to control the drive motor so that the absolute value of the angle difference between the heading angle measured by the robot in real time and the target navigation angle is within the preset angle error range, and obtains the wheel PWM value in real time during the closed-loop adjustment process; after transmitting the wheel PWM value to the drive motor, the robot samples the current signal output by the drive motor to obtain the drive wheel current sampling value. Based on the driving wheel current sampling value, wheel PWM value and fan PWM value, the robot's current walking resistance current value and / or current relative walking resistance current value are calculated. The target working suction force is adjusted based on the calculated relationship between the robot's current relative walking resistance current value and a preset relative value; or the target working suction force is adjusted based on the calculated relationship between the robot's current walking resistance current value and a preset value.

2. The method for adjusting the suction force of a robot fan according to claim 1, characterized in that, Adjusting the target working suction force based on the calculated relationship between the robot's current walking resistance current value and a preset value includes: When the robot's current walking resistance current value is greater than a preset value, the target working suction force is reduced to reduce the real-time measured fan suction force and fan PWM value. When the robot's current walking resistance current value is less than a preset value, the target working suction force is increased until the current walking resistance current value equals the preset value.

3. The method for adjusting the suction force of a robot according to claim 2, characterized in that, When the current walking resistance current value of the robot is greater than the preset value, if the current walking resistance current value of the robot increases, it is determined that the external resistance borne by the robot on the current walking surface has increased, and the reduction of the target working suction force is set to be greater. When the current walking resistance current value of the robot is less than or equal to the preset value, if the current walking resistance current value of the robot decreases, it is determined that the external resistance borne by the robot on the current walking surface has decreased, and the increase of the target working suction force is set to be greater.

4. The method for adjusting the suction force of a robot according to claim 2, characterized in that, The method for calculating the robot's current walking resistance current value based on the drive wheel current sampling value, wheel PWM value, and fan PWM value includes: after the robot starts walking on the current walking surface, the current sampling value of the drive wheel is controlled by subtracting the power change value caused by the PWM value used to control the drive motor in the closed-loop adjustment and the power change value caused by the PWM value used to control the fan in the closed-loop adjustment in sequence to obtain the robot's current walking resistance current value. The current sampling value of the drive wheel and the power change value caused by the PWM value used to control the drive motor in the closed-loop regulation both come from the drive wheel connected to the same drive motor, so as to obtain the current walking resistance current value of the drive wheel installed on the same side of the robot.

5. The method for adjusting the suction force of a robot according to claim 4, characterized in that, The method for calculating the robot's current walking resistance current value based on the drive wheel current sampling value, wheel PWM value, and fan PWM value specifically includes: Before the robot starts walking, there is static friction between the robot and the walking surface it is in contact with, and the drive motor is started until the robot starts walking on the current walking surface from a standstill to overcome the static friction. As the robot walks on the current walking surface, it marks the real-time wheel PWM value as the first PWM value to be measured and the real-time fan PWM value as the second PWM value to be measured. The robot marks the product of the first PWM value to be measured and the first conversion coefficient as the power change value caused by the PWM value used to control the drive motor in the closed-loop adjustment, and marks the product of the second PWM value to be measured and the second conversion coefficient as the power change value caused by the PWM value used to control the fan in the closed-loop adjustment. Then, the robot control subtracts the power change caused by the PWM value used to control the drive motor in the closed-loop adjustment from the real-time sampled value of the drive wheel current to obtain a first power difference value. Then, the first power difference value is subtracted from the power change caused by the PWM value used to control the fan in the closed-loop adjustment to obtain a second power difference value. The second power difference value is then marked as the robot's current walking resistance current value.

6. The method for adjusting the suction force of a robot according to claim 4, characterized in that, The method for calculating the robot's current walking resistance current value based on the drive wheel current sampling value, wheel PWM value, and fan PWM value specifically includes: Before the robot starts walking, there is static friction between the robot and the walking surface it is in contact with, and the drive motor is started until the robot starts walking on the current walking surface from a standstill, so that the robot's drive wheel overcomes the static friction. Then, within a preset sampling time, the robot calculates a first reference PWM value based on all obtained wheel PWM values, a second reference PWM value based on all obtained fan PWM values, and a drive wheel reference current value based on all obtained drive wheel current sampling values. The robot marks the product of the first reference PWM value and the first conversion coefficient as the power change value caused by the PWM value used to control the drive motor in closed-loop regulation, and marks the product of the second reference PWM value and the second conversion coefficient as the power change value caused by the PWM value used to control the fan in closed-loop regulation. Then, the reference current value of the robot control drive wheel is subtracted from the power change value caused by the PWM value used to control the drive motor in the closed-loop adjustment to obtain a first power difference value. The first power difference value is then subtracted from the power change value caused by the PWM value used to control the fan in the closed-loop adjustment to obtain a second power difference value. The second power difference value is then marked as the current walking resistance current value of the robot.

7. The method for adjusting the suction force of a robot fan according to claim 1, characterized in that, Adjusting the target working suction force based on the calculated relationship between the robot's current relative walking resistance current value and a preset relative value includes: When the robot's current relative walking resistance current value is greater than a preset relative value, the target working suction force is reduced to reduce the fan suction force and fan PWM value measured by the robot in real time. When the robot's current relative walking resistance current value is less than a preset relative value, the target working suction force is increased until the robot's current relative walking resistance current value equals the preset relative value.

8. The method for adjusting the suction force of a robot according to claim 7, characterized in that, The step of adjusting the target working suction force based on the calculated relationship between the robot's current relative walking resistance current value and a preset relative value further includes: When the robot's current relative walking resistance current value is less than or equal to a preset collision current threshold, the target working suction force is adjusted. When the robot's current relative walking resistance current value is greater than the preset collision current threshold, the target working suction force is not adjusted, and it is determined that the robot is currently in a collision. Among them, the preset collision current threshold is greater than the preset relative value.

9. The method for adjusting the suction force of a robot according to claim 7, characterized in that, When the medium of the walking surface traversed by the robot within a preset sampling time is the same as the medium at the preset starting position, the current relative walking resistance current value of the robot is used to represent the current value corresponding to the difference between the external resistance borne by the robot when walking on the current walking surface and the external resistance borne by the robot on the walking surface in contact with the robot at the preset starting position; wherein, the robot maintains walking on the walking surface of the same medium within the preset sampling time. Alternatively, if the medium of the walking surface traversed by the robot within the preset sampling time is different from the medium at the preset starting position, the robot's current relative walking resistance current value is used to represent the current value corresponding to the difference between the external resistance borne by the robot when walking on the current walking surface and the external resistance borne by the robot on the reference walking surface, wherein the robot maintains walking on the reference walking surface within the preset sampling time. The preset starting position is the starting position of the robot after it starts moving from a standstill, so that the robot can start moving in a straight line from the preset starting position; the reference walking surface is the walking surface that the robot has walked on within a preset sampling time.

10. The method for adjusting the suction force of a robot according to claim 9, characterized in that, The method for calculating the robot's current relative walking resistance current value based on the drive wheel current sampling value, wheel PWM value, and fan PWM value includes: after the robot starts walking on the current walking surface, controlling the relative power change value of the drive wheel current sampling value to successively subtract the relative power change value corresponding to the wheel PWM value and the relative power change value corresponding to the fan PWM value to obtain the robot's current relative walking resistance current value. Among them, the relative power change value of the drive wheel current sampling value and the relative power change value corresponding to the wheel PWM value both come from the drive wheel connected to the same drive motor, so as to obtain the current relative walking resistance current value of the drive wheel installed on the same side of the robot. The robot's current relative walking resistance current value is expressed in terms of electrical quantity.

11. The method for adjusting the suction force of a fan by a robot according to claim 10, characterized in that, The method for calculating the robot's current relative walking resistance current value based on the drive wheel current sampling value, wheel PWM value, and fan PWM value specifically includes: Before the robot starts walking, there is static friction between the robot and the walking surface it is in contact with, and the drive motor is started until the robot starts walking on the current walking surface from a standstill, so that the robot's drive wheel overcomes the static friction. Then, within a preset sampling time, the robot calculates the first reference PWM value based on all the obtained wheel PWM values, the second reference PWM value based on all the obtained fan PWM values, and the drive wheel reference current value based on all the obtained drive wheel current sampling values. After the preset sampling time, the robot marks the real-time wheel PWM value as the first PWM value to be tested, the real-time fan PWM value as the second PWM value to be tested, and the real-time drive wheel current sampling value as the drive wheel current value to be tested. Then, the difference between the current value of the drive wheel to be measured and the reference current value of the drive wheel is marked as the relative power change value of the drive wheel current sampling value, and the product of the difference between the first PWM value to be measured and the first reference PWM value and the first conversion coefficient is marked as the relative power change value corresponding to the wheel PWM value, and the product of the difference between the second PWM value to be measured and the second reference PWM value and the second conversion coefficient is marked as the relative power change value corresponding to the fan PWM value; Then, the relative power change value of the control drive wheel current sampling value is subtracted from the relative power change value corresponding to the wheel PWM value to obtain the first difference. The first difference is then subtracted from the relative power change value corresponding to the fan PWM value to obtain the second difference. The second difference is then marked as the robot's current relative walking resistance current value.

12. The method for adjusting the suction force of a fan by a robot according to claim 6 or 11, characterized in that, The method for calculating the first reference PWM value based on all obtained wheel PWM values ​​within the preset sampling time includes: averaging all obtained wheel PWM values ​​within the preset sampling time to obtain the first reference PWM value; or, selecting the wheel PWM value with the largest value from all obtained wheel PWM values ​​within the preset sampling time to obtain the first reference PWM value. The method for calculating the second reference PWM value based on all obtained wind turbine PWM values ​​within the preset sampling time includes: averaging all obtained wind turbine PWM values ​​within the preset sampling time to obtain the second reference PWM value; or, selecting the wind turbine PWM value with the largest value from all obtained wind turbine PWM values ​​within the preset sampling time to obtain the second reference PWM value. The method for calculating the drive wheel reference current value based on all obtained drive wheel current sampling values ​​within the preset sampling time includes: averaging all obtained drive wheel current sampling values ​​within the preset sampling time to obtain the drive wheel reference current value; or, selecting the drive wheel current sampling value with the largest value from all obtained drive wheel current sampling values ​​within the preset sampling time to obtain the drive wheel reference current value.

13. The method for adjusting the suction force of a fan by a robot according to claim 1, characterized in that, The method for closed-loop adjustment of the PWM value used to control the drive motor includes: When the absolute value of the angle difference between the robot's real-time measured heading angle and the target navigation angle within the current adjustment cycle is not within the preset angle error range, the robot will use the absolute value of the angle difference between the real-time measured heading angle and the target navigation angle within the current adjustment cycle, or configure the robot's real-time measured heading angle as the feedback input for the next adjustment cycle, to perform PID adjustment on the PWM value used to control the drive motor. The real-time feedback adjustment result of the PWM value used to control the drive motor will be set as the wheel PWM value, and then the wheel PWM value will be input to the drive motor to adjust the robot's heading angle in real time until the absolute value of the angle difference between the robot's real-time measured heading angle and the target navigation angle changes within the preset angle error range or remains constant within the preset angle error range. The latest obtained wheel PWM value will then be input to the drive motor to guide the robot to walk along the direction corresponding to the target navigation angle. The target navigation angle is used to guide the robot along a pre-planned work path; the robot's heading angle is measured in real time by the robot's built-in gyroscope.

14. The method for adjusting the suction force of a fan by a robot according to claim 1, characterized in that, The method for closed-loop adjustment of the PWM value used to control the fan includes: When the absolute value of the pressure difference between the real-time measured fan suction and the target working suction within the current adjustment cycle is not within the preset pressure error range, the robot configures the absolute value of the pressure difference between the real-time measured fan suction and the target working suction within the current adjustment cycle, or the real-time measured fan suction, as the feedback input for the next adjustment cycle. This is used to perform PID adjustment on the PWM value used to control the fan, and the real-time feedback adjustment result of the PWM value used to control the fan is set as the fan PWM value. The fan PWM value is then input to the fan to adjust the fan suction in real time until the absolute value of the pressure difference between the real-time measured fan suction and the target working suction within the current adjustment cycle changes within the preset pressure error range or remains constant within the preset pressure error range. A pressure sensor is installed at the air inlet of the robot's fan to monitor the fan suction in real time.

Citation Information

Patent Citations

  • Methods for adjusting fan suction in extreme situations

    CN111852925B

  • Method for dynamically adjusting suction force of window cleaning robot

    CN107205594A

  • Method for determining dust collection wind power and controlling dust collection by sweeping robot

    CN111887768A