Method for detecting a walking resistance current value by a robot
By adjusting the PWM values of the drive motor and fan in a closed loop, interference from changes in motor torque and fan suction is eliminated, enabling the cleaning robot to accurately detect resistance in different media and environments, suitable for both straight-line and turning movements.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- AMICRO SEMICONDUCTOR CO LTD
- Filing Date
- 2022-10-31
- Publication Date
- 2026-05-05
AI Technical Summary
The cleaning robot cannot effectively detect the walking resistance caused by the external environment. It is affected by the current interference caused by changes in the suction force of the fan and the torque of the drive motor, resulting in inaccurate resistance information.
By adjusting the PWM values of the drive motor and fan in a closed loop, sampling the drive wheel current signal in real time, eliminating the interference of changes in motor torque and fan suction, the robot's walking resistance current value is calculated.
It accurately detects the external resistance of robots in different media and environments, distinguishes the resistance changes caused by media type and obstacle collisions, and is applicable to straight-line and turning walking.
Smart Images

Figure CN115656607B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of mobile robots, and more particularly to a method for detecting the value of walking resistance current in a robot. Background Technology
[0002] Cleaning robots that use inertial sensors for navigation include robotic vacuum cleaners, window cleaning robots, and floor scrubbing robots. In robotic vacuum cleaners, the suction power configuration of the fans that perform the vacuuming function, and in window cleaning robots, the suction power configuration of the fans that perform the adsorption function, is often unreasonable. Excessive suction power increases the walking resistance experienced by the drive wheels and causes interference in the corresponding current changes. Furthermore, the walking resistance information fed back by the cleaning robot through current sampling includes not only passively applied external resistance (such as surface friction and resistance caused by collisions with external obstacles), but also the current changes caused by the changes in fan suction power (reflecting the resistance formed by the drive motor to overcome the suction applied to the drive wheels) and the current changes caused by the active torque output of the drive wheel motor (reflecting the force required to start the drive wheels rotating). Therefore, the cleaning robot cannot effectively detect the walking resistance caused by the external environment. Summary of the Invention
[0003] This application discloses a method for detecting the walking resistance current value of a robot, and the specific technical solution includes:
[0004] A method for detecting the walking resistance current value of a robot includes: the robot has drive wheels mounted on both sides, and drive motors electrically connected to the drive wheels are installed inside the robot; the robot also has a fan installed to generate suction on the walking surface; the method for detecting the walking resistance current value of the robot includes: the robot performing closed-loop adjustment of the PWM value used to control the drive motors, and determining that a first PWM value is obtained in real time during the closed-loop adjustment process; the robot performing closed-loop adjustment of the PWM value used to control the fan, and determining that a second PWM value is obtained in real time during the closed-loop adjustment process; after transmitting the first PWM value to the drive motors, the robot samples the current signal of the drive motors to obtain the drive wheel current sampling value; based on the drive wheel current sampling value, the first PWM value, and the second PWM value, the robot's current walking resistance current value and / or current relative walking resistance current value are calculated; wherein, the first PWM value is used to control the output torque change of the drive motors to form one type of electrical change value in the drive wheel current sampling value; the second PWM value is used to control the fan suction change to form another type of electrical change value in the drive wheel current sampling value.
[0005] Furthermore, the method for calculating the robot's current walking resistance current value based on the drive wheel current sampling value, the first PWM value, and the second PWM value includes: after the robot starts walking on the current walking surface, the current sampling value of the control drive wheel is successively subtracted from 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 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.
[0006] Further, the method for calculating the robot's current walking resistance current value based on the drive wheel current sampling value, the first PWM value, and the second 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 to overcome the static friction; during the robot's walking on the current walking surface, the robot marks the real-time obtained first PWM value as the first PWM value to be measured and the real-time obtained second 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.
[0007] Further, the method for calculating the robot's current walking resistance current value based on the drive wheel current sampling value, the first PWM value, and the second 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 first PWM values, calculates a second reference PWM value based on all obtained second PWM values, and calculates a drive wheel reference current value based on all obtained drive wheel current sampling values; the robot will then calculate the first reference PWM value. The product of the quasi-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; 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.
[0008] Furthermore, the method for calculating the robot's current relative walking resistance current value based on the drive wheel current sampling value, the first PWM value, and the second 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 first PWM value and the relative power change value corresponding to the second 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 first 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 power.
[0009] Further, the method for calculating the robot's current relative walking resistance current value based on the drive wheel current sampling value, the first PWM value, and the second 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 first PWM values, and calculates a second reference PWM value based on all obtained second 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 first PWM value as the first PWM value to be measured, and marks the real-time obtained second PWM value as the first PWM value to be measured. The value is marked as the second PWM value to be tested. Then, the difference between the real-time obtained drive wheel current sampling value and the drive wheel reference current value is marked 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 tested and the first reference PWM value and the first conversion coefficient is marked as the relative power change value corresponding to the first PWM value. The product of the difference between the second PWM value to be tested and the second reference PWM value and the second conversion coefficient is marked as the relative power change value corresponding to the second 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 first PWM value to obtain the first difference. Then, the relative power change value corresponding to the second PWM value is subtracted from the first difference to obtain the second difference. The second difference is then marked as the current relative walking resistance current value of the robot.
[0010] Further, within the preset sampling time, the method for calculating the first reference PWM value based on all obtained first PWM values includes: averaging all obtained first PWM values within the preset sampling time to obtain the first reference PWM value; or, selecting the first PWM value with the largest value from all obtained first 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 second PWM values includes: averaging all obtained second PWM values within the preset sampling time to obtain the second reference PWM value; or, selecting the first reference PWM value with the largest value from all obtained second PWM values within the preset sampling time. The second PWM value is used 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. The first PWM value is used to control the output torque change of the drive motor to feed back one type of electrical change value among the drive wheel current sampling values; the second PWM value is used to control the fan suction change generated by the fan to feed back another type of electrical change value among the drive wheel current sampling values.
[0011] 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 in contact with the robot 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 a reference walking surface; wherein, the robot maintains walking on the reference walking surface within the preset sampling time; wherein, 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; wherein, the robot's drive wheels are in contact with the walking surface so that the robot experiences external resistance from the walking surface.
[0012] Furthermore, when the robot's current relative walking resistance current value increases or the robot's current walking resistance current value increases, it is determined that the external resistance borne by the robot on the current walking surface increases; when the robot's current relative walking resistance current value decreases or the robot's current walking resistance current value decreases, it is determined that the external resistance borne by the robot on the current walking surface decreases.
[0013] 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 first PWM value, and then inputs the first 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 newly obtained first 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 pre-planned by the robot 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.
[0014] Furthermore, 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 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 pressure error range, the robot configures the absolute value of the pressure difference between the fan suction force and the target working suction force within the current adjustment cycle, or the real-time measured fan suction force, 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 a second PWM value, and then inputs the second PWM value into the fan to adjust the fan suction force in real time, until the absolute value of the 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 pressure error range or remains constant within a preset pressure error range; wherein, the target working suction force is preset by the robot to adapt to the working surface where the robot is currently located; a pressure sensor is installed at the air inlet of the robot's fan to monitor the fan suction force in real time.
[0015] The technical advantage of this application lies in that, in order to detect the relative walking resistance current value and the walking resistance current value, this application does not simply and isolatedly judge only the sudden change in motor current or only the change in mileage data recorded by the encoder. Instead, it combines the PWM value used to control the drive motor and the PWM value used to control the fan to offset the influence of the torque interference actively generated by the motor and the resistance factor introduced by the change in fan suction in the current sampling value of the drive wheel. Moreover, it can calculate the walking resistance value that is not affected by the current change value actively generated by the robot (including the current change value applied by the change in fan suction and the current change value caused by the change in torque output by the drive motor) without using encoder measurement data. The current value is used to calibrate the PWM value and the current sampling PWM value on the walking surface (considered as the reference walking surface) traversed within the preset sampling time to obtain a reference PWM value. Then, the relative walking resistance current value between the robot and the reference walking surface is calculated. It is also 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 of the drive motor). Therefore, the external resistance situation experienced by the robot on the current walking surface is extracted to determine the resistance constrained by the medium type of the current walking surface and the walking resistance caused by the robot's collision with external obstacles.
[0016] This allows us to determine whether the walking resistance experienced by the robot on a current medium type walking surface is greater or less than that experienced on a previously traversed medium type walking surface. This effectively distinguishes between walking surfaces with different media on which the robot has walked. When the medium of the walking surface the robot is in contact with changes, the walking resistance it experiences 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 difference in external resistance between the two different media walking surfaces that the robot has walked on. This at least identifies the two different media walking surfaces that the robot has walked on and determines the change in the external resistance (degree of obstruction) experienced by the currently traversed walking surface relative to the previously traversed walking surface.
[0017] During unobstructed walking on the same walking surface, the robot of this application calculates the current relative walking resistance current value and the current walking resistance current value without being affected by the current change caused by the change in the PWM value used to control the drive motor, nor by the current change caused by the change in the PWM value used to control the fan. This overcomes the interference of the current change caused by the change in the suction force generated by the fan and the current change caused by the change in the torque output of the drive wheel motor. Therefore, the speed difference between the left and right drive wheels of the robot (controlled by the drive wheel motor and positively correlated with the PWM value of the drive motor used to control the corresponding drive wheel) does not affect the accurate detection of the current relative walking resistance current value and the current walking resistance current value. This makes the method of detecting the walking resistance current value applicable not only to the straight walking state where the left and right drive wheels have the same degree of slippage, but also to the straight walking state where the robot turns or the left and right drive wheels have different degrees of slippage. That is, it takes into account the speed difference of the two drive wheels and improves the adaptability of the current relative walking resistance current value and the current walking resistance current value in various medium walking surfaces and various robot movement states. Attached Figure Description
[0018] Figure 1 This is a flowchart illustrating a method for detecting the walking resistance current value of a robot, according to an embodiment of the present invention. Detailed Implementation
[0019] 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.
[0020] 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 or resistance caused by external collisions. Therefore, the reason the sweeping robot stops moving is not due to the surface material or external obstacles. Similarly, if the suction power of a window cleaning robot is very strong, the increased pressure between the drive wheels and the surface creates excessive resistance from the cleaning cloth, increasing the driving resistance and preventing the window cleaning robot from moving. In this case, the detected resistance information is not solely due to friction determined by the surface material or resistance caused by external collisions. Therefore, the reason the window cleaning robot stops moving is not due to the surface material or external obstacles. Therefore, in cleaning robots equipped with motors for fans and drive wheels, eliminating interference from current changes caused by torque variations in the motor outputs and current changes caused by fan suction is crucial for subsequent detection of passively received external resistance.
[0021] The external resistance disclosed in this application includes the frictional force generated by the robot's drive wheels contacting the walking surface and the hindering force (which may be a contact force) caused by colliding with external obstacles. However, it does not include 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).
[0022] 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.
[0023] 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.
[0024] 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.
[0025] As one embodiment, a method for detecting the walking resistance current value of a robot is disclosed. This method reflects the external resistance experienced by the robot on the current walking surface and its changes. The main body executing this method 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 cleaning robots equipped with fans and drive motors. Drive wheels are installed on both sides of the robot, generally one drive wheel on each side of the chassis. The robot's interior is equipped with drive motors electrically connected to the drive wheels. Each drive wheel is connected to a corresponding drive motor, thus the robot has two drive motors for controlling the rotational speed of the drive wheels to control the robot's walking speed on the walking surface. The difference in rotational speed between the two drive wheels can control the robot's walking direction. The robot's drive wheels can contact the walking surface to generate frictional force that hinders the robot's movement. The robot is also equipped with a fan to generate suction on the robot's walking surface. The robot disclosed in this application can be installed without an encoder, meaning that no encoder is installed in the drive wheels on either side, so the robot does not receive the travel distance feedback from the encoder. Of course, the robot of this application can also be equipped with an encoder to obtain the travel distance feedback from the encoder. In short, whether the robot is equipped with an encoder or not does not affect the execution of the method for detecting the walking resistance current value of the robot. When the robot is a sweeping robot, the vacuum fan inside the sweeping robot is used to vacuum the walking surface; when the robot is a window cleaning robot, the fan inside the window cleaning robot is used to adhere to the walking surface; the walking surface can be the cleaning medium of the robot, which can be a horizontal ground, glass, or wall surface waiting to be cleaned.
[0026] See Figure 1 It can be seen that the method for detecting the walking resistance current value of a robot includes the following steps S1 and S2:
[0027] Step S1: The robot performs closed-loop adjustment of the PWM value used to control the drive motor, and determines that a first 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 wheels. The drive wheels start to rotate with the help of torque, so the drive motor needs to actively adjust the output current. Therefore, due to the change in output torque, a change in current value is actively introduced, which is independent of external environmental factors. The robot performs closed-loop adjustment of the PWM value used to control the fan, and determines that a second PWM value is obtained in real time during the closed-loop adjustment process. This value is provided to the fan to adjust the fan suction. After transmitting the first PWM value to the drive motor, the robot samples the current signal of the drive motor to obtain the current sampling value of the drive wheel. Then, step S2 is executed. It should be noted that in steps S1 and S2, both the drive motor and the fan are controlled by the corresponding PWM values to enter the working state. 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, that is, a voltage signal proportional to the current signal of the drive motor output sampled by the robot. This voltage signal is then amplified by the 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 is subjected to, including actively generated forces and passively received forces. 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, and the change of the output torque of the drive motor.
[0028] In step S1, 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 first PWM value to the drive motor. The drive wheel will change its output speed, and the robot's heading angle corresponding to the changed speed of the drive wheel 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 first PWM value may not be stable at the target PWM value under normal operating conditions. Therefore, it is determined that the real-time obtained first 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 first PWM value, excessive torque output from the drive motor (which can also be considered a torque variation) can cause wheel slippage, while insufficient torque output (also considered a torque variation) can prevent wheel rotation. These changes in the drive motor's output current introduce interference to the detection of external resistance. After transmitting the first 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 walking surface and the collision resistance from external obstacles, the disturbance caused by the torque variation in the drive motor's output needs to be overcome when calculating the walking resistance current value or the relative walking resistance current value.
[0029] 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 optimal 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, it will introduce resistance. In order to overcome this resistance, the drive motor needs to output a larger current, which introduces the current change 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 second PWM value to the fan. The motor inside the fan will change its output speed, which will correspondingly change the output torque. The resulting fan suction force from the changed speed is then used as the feedback input of the pneumatic closed-loop feedback adjustment device to maintain closed-loop regulation, and also indirectly adjust the fan suction force measured by the robot in real time. However, during the aforementioned closed-loop adjustment of the PWM value used to control the fan, the real-time obtained second PWM value may not be stable at the target PWM value under normal suction conditions. Therefore, the real-time obtained second PWM value is determined... The value is prone to fluctuation and causes the motor current of the fan to jump, which may result in excessive suction force generated by the fan in real time. Excessive suction force is applied to the drive wheel and increases the pressure between the drive wheel and the walking surface, resulting in increased walking resistance on both sides of the robot's drive wheel. Compared with the external resistance, this application classifies this change in walking resistance as an interference factor introduced by the change in the 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 the obstruction caused by the collision of external obstacles, it is necessary to overcome the interference of the current change value actively caused by the change in fan suction force when calculating the walking resistance current value or the relative walking resistance current value.
[0030] Therefore, the first PWM value is used to control the output torque change of the drive motor, so as to form a power change value in the drive wheel current sampling value; the second PWM value is used to control the fan suction change generated by the fan, so as to form another power change value in the drive wheel current sampling value. Specifically, after transmitting the first PWM value to the drive motor, the drive wheel begins to be controlled by the first 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 current sampling value of the drive wheel. This current sampling value of the drive wheel is the current sampling value verified by the drive wheel walking on the current walking surface. The current sampling value of the drive wheel carries the torque change information of the drive motor output, which is the current change value generated by the control of the first PWM value (the current change value actively introduced by the robot, which belongs to the interference factor of the torque output of the drive motor on the detection of external resistance, also known as the interference factor caused by the torque change of the drive motor output); the current sampling value of the drive wheel 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 required to overcome the friction force from the walking surface. It also carries the current change value required to overcome the external resistance change introduced by the collision between the robot and the obstacle. 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.
[0031] Step S2: Based on the drive wheel current sampling value, the first PWM value, and the second 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. The current walking resistance current value can represent the combined result of friction constrained by the medium type of the current walking surface and the walking resistance caused by collisions with external obstacles; this combined 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 and the walking resistance caused by collisions with external obstacles; this relative result belongs to the relative external resistance between two walking surfaces.
[0032] 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.
[0033] In step S2, 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 first 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 second 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 be further determined, allowing for the assessment of changes in external resistance experienced by the robot on different walking surfaces, at least the relative magnitudes of the walking resistance current values on the walking surfaces of the two media and the collision situation in the external environment. In some embodiments, if the external resistance influence introduced by the robot colliding with obstacles 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, nor with 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. Thus, the frictional force that is not affected by the change in the output torque of the motor equipment can be restored during unobstructed straight-line walking. The change in frictional force on the surface that the robot has contacted can be measured by the current relative walking resistance current value, that is, the change in external resistance can be 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 change in the first PWM value obtained by real-time adjustment, nor with the change in the second PWM value obtained by real-time adjustment. At least during unobstructed walking, an external resistance that is faithful to the material properties of the walking surface is formed.
[0034] Based on the above embodiments, during unobstructed walking on the same walking surface, the current relative walking resistance current value and the current walking resistance current value calculated by the robot of this application are not affected by the current change value caused by the change in the PWM value used to control the drive motor, nor by the current change value caused by the change in the PWM value used to control the fan. This overcomes the interference of the current change value caused by the change in the suction force generated by the fan and the current change value caused by the change in the torque output of the drive wheel motor. Therefore, the speed difference between the drive wheels on the left and right sides of the robot (controlled by the drive wheel motor and positively correlated with the PWM value of the drive motor used to control the corresponding drive wheel) does not affect the accurate detection of the current relative walking resistance current value and the current walking resistance current value. This makes the method of detecting the walking resistance current value applicable not only to the straight walking state where the left and right drive wheels have the same degree of slippage, but also to the straight walking state where the robot turns or the left and right drive wheels have different degrees of slippage. That is, it takes into account the speed difference of the drive wheels on both sides, and improves the adaptability of the current relative walking resistance current value and the current walking resistance current value in various environmental conditions and various robot movement states.
[0035] As one embodiment, the method for calculating the robot's current walking resistance current value based on the drive wheel current sampling value, the first PWM value, and the second PWM value can be understood as follows: the robot's current walking resistance current value is calculated based on the drive wheel current sampling value, the first PWM value, and the second PWM value obtained in real time in step S1, that is, step S1 is executed synchronously during the execution of step S2. In this embodiment, the method for calculating the robot's current walking resistance current value based on the drive wheel current sampling value, the first PWM value, and the second 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 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 are subtracted sequentially from the drive wheel current sampling value 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 first PWM value obtained in real time. Similarly, 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 second PWM value obtained in real time. This embodiment calculates the current walking resistance current value only after the robot has started walking to reduce the influence of current instability at the beginning of the drive motor's rotation and external static friction. After obtaining stable current outputs from the drive motor and fan, the current 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 controlling the drive motor from the real-time obtained and verified drive wheel current sampling value, and then subtracting the current fluctuations caused by fan control.
[0036] 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.
[0037] It should be noted that since the robot has a drive wheel installed 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 one side, it is necessary to calculate the relative power change value of the drive wheel current sampling value required for the current walking resistance current value of that side's drive wheel, as well as the relative power change value corresponding to the first PWM value.
[0038] 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 first PWM value, and the second PWM value specifically includes:
[0039] Before the robot begins to walk, it starts from a standstill, activating the drive motors and receiving real-time control of the first PWM value. It also activates the fan and receives real-time control of the second PWM value. This standstill state can be the state immediately following a collision with an obstacle, after which the robot brakes and stops moving, and then resumes walking in a new direction. The robot typically starts from a standstill by gradually increasing the current to the drive motors. During this process, even though the robot is stationary, it has a tendency to slide relative to the walking surface. Therefore, static friction exists between the robot and the walking surface until the robot begins to move from a standstill. At the preset start time, the robot reaches the critical state to begin moving. At this moment, the driving force provided by the drive motor just exceeds the static friction to overcome its influence. Under the control of the first PWM value obtained in real time, the output current of the drive motor tends to stabilize so that the speed of the drive motor is linearly related to the first PWM value (referred to as the linear stage of the motor). It is determined that the robot has completed the body start and started walking on the current walking surface. The position where the robot starts walking is the preset starting position, that is, the starting position of walking after the preset start time. It is also the position point where the robot is when the output current of the drive motor tends to stabilize and begins to enter the linear stage. 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.
[0040] 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 first PWM value, the second PWM value, and the drive wheel current sampling value required to calculate the robot's current walking resistance current value during the walking process.
[0041] During the robot's movement on the current walking surface, having overcome static friction and moving in the same direction, the robot maintains closed-loop adjustment of the PWM value used to control the drive motor, and determines that a first 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 a second PWM value is obtained in real time during the closed-loop adjustment process. After transmitting the first PWM value obtained in real time to the drive motor, the robot samples the current signal of the drive motor to obtain the current sampling value of the drive wheel. Specifically, after a preset start-up time, as the robot moves in a straight line without obstacles on the current walking surface from a standstill, the robot marks the first PWM value obtained in real time as the first PWM value to be measured, and the second PWM value obtained in real time as the second 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.
[0042] 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.
[0043] 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.
[0044] 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 first PWM value, and the second PWM value specifically includes:
[0045] Before the robot begins to walk, it starts from a standstill, activating the drive motor and receiving real-time control of the first PWM value. It also activates the fan and receives real-time control of the second PWM value. The standstill state can be the state immediately following a collision with an obstacle, after which the robot brakes and stops moving, and then begins walking in a new direction. The robot starts from a standstill by gradually applying current to the drive motor. During this startup process, the first PWM value is maintained on the drive motor, and the second PWM value is maintained on the fan. This creates a relative sliding tendency between the robot and the walking surface, resulting in static friction. This continues until a preset startup time has elapsed since the robot started from a standstill, at which point the robot is at a preset starting position, and the drive motor provides the current current. The driving force just exceeds the static friction to overcome its influence, and it is determined that the robot has completed its body start-up and started walking on the current walking surface, so that the robot's drive wheels overcome the static friction by rotating. Then, within a preset sampling time, the robot calculates a first reference PWM value based on all the obtained first PWM values, calculates a second reference PWM value based on all the obtained second PWM values, and calculates a drive wheel reference current value based on all the 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 first PWM value obtained in real time in the aforementioned closed-loop regulation within the preset sampling time, or sampling the first PWM value obtained in real time in the aforementioned closed-loop regulation according to a preset time interval and inputting it to the drive motor.
[0046] 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 first PWM value required to calculate the first reference PWM value, the second 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, i.e., 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 robot's left wheel remaining stationary while the robot's right wheel performs forward and reverse rotation for a fixed time; and the robot's right wheel remaining stationary while the robot's left wheel performs 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.
[0047] 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 210ms, the preset sampling time is 100ms, and the preset sampling time is delayed from the preset start time, starting sampling at 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 first PWM value, the second PWM value, and the drive wheel current sampling value obtained in real time in the closed-loop regulation of the corresponding device 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.
[0048] 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 a first 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 a second PWM value is obtained in real time during the closed-loop adjustment process. After transmitting the first PWM value obtained in real time to the drive motor, the robot samples the current signal of the drive motor to obtain the current sampling value of the drive wheel. 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.
[0049] 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, and the resistance force caused by collision with external obstacles, so as to facilitate the robot's motion planning on the current walking surface.
[0050] As one embodiment of calculating the current relative walking resistance current value of the robot, the current relative walking resistance current value of the robot can be understood as the current relative walking resistance current value of the robot being calculated based on the current sampling value of the drive wheel, the first PWM value, and the second PWM value obtained in real time in step S1. That is, step S1 is executed synchronously during the execution of step S2. In some embodiments, it can also be understood as calculating the robot's current relative walking resistance current value based on the difference between two first PWM values obtained during a time period of the robot's walking phase, the difference between two corresponding second PWM values obtained during the same time period of the robot's walking phase, and two corresponding drive wheel current sampling values obtained during the same time period of the robot's walking phase. This value is used to represent 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 when walking on the previous walking surface. Here, the external resistance is the resistance obtained by the robot from the drive wheel current sampling value after excluding the interference caused by the torque change actively generated by the motor (current fluctuation caused by reaching the expected motor speed or predetermined walking direction during the closed-loop adjustment process) and the interference caused by the change in the fan suction force generated by the fan (current fluctuation caused by reaching the expected fan suction force during the closed-loop adjustment process). It can include the friction force affected by the medium of the walking surface and the walking resistance caused by colliding with external obstacles.
[0051] The method for calculating the robot's current relative walking resistance current value based on the drive wheel current sampling value, the first PWM value, and the second 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 first PWM value and the relative power change value corresponding to the second PWM value to obtain the robot's current relative walking resistance current value. The relative power change value corresponding to the first PWM value can be the difference between the power change value caused by the PWM value used to control the drive motor (the first PWM value obtained at a certain moment) in the closed-loop adjustment in one embodiment of the aforementioned calculation of the current walking resistance current value and a reference power change value caused by the first PWM value. The relative power change value corresponding to the second PWM value can also be the difference between the power change value caused by the PWM value used to control the fan (the second PWM value obtained at a certain moment) in the closed-loop adjustment in one embodiment of the aforementioned calculation of the current walking resistance current value and a reference power change value caused by the second PWM value. In this embodiment, there is no restriction on the order of subtracting the relative power change value corresponding to the first PWM value and the relative power change value corresponding to the second PWM value. The robot's current relative walking resistance current value is represented by electrical quantity to achieve the representation of walking resistance information using a digital signal. When the relative power change value is a current change value, the robot's current relative walking resistance current value obtained by subtraction is represented by a current value or a voltage value, which can be a digital signal converted from an analog-to-digital converter. Therefore, the relative power change value corresponding to the first PWM value and the relative power change value corresponding to the second 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.
[0052] 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 first 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 first PWM value required for the current relative walking resistance current value of that side's drive wheel.
[0053] 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, the first PWM value, and the second PWM value specifically includes:
[0054] Before the robot begins to walk, it starts from a standstill, with the drive motor activated and controlled by a first PWM value adjusted in real time. The fan is also activated and controlled by a second PWM value adjusted in real time. 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 loads the current into 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, during the preset start-up 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 first PWM values, calculates a second reference PWM value based on all obtained second PWM values, and calculates a drive wheel reference current value based on all obtained drive wheel current sampling values.
[0055] 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.
[0056] 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.
[0057] 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 first PWM value as the first PWM value to be measured, and the real-time obtained second PWM value as the second PWM value to be measured, and then marks the difference between the real-time obtained drive wheel current sampling value and the drive wheel reference current value as the relative charge change value of the drive wheel current sampling value. This can represent the current value converted from the difference 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 (which can be the total force applied to the drive wheel by the actively input walking resistance and the passively received external resistance), representing the walking resistance formed relative to the reference walking surface. The comparison value is as follows: 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 first 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 active interference of the drive motor relative to the reference walking surface; 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 second 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 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 charge change value of the robot control drive wheel current sampling value is subtracted from the relative charge change value corresponding to the first PWM value to obtain the first difference (the current change value corresponding to the force actively introduced by the torque output of the drive motor applied to the drive wheel), so as to offset the active interference comparison value of the drive motor; then the relative charge change value corresponding to the second PWM value is subtracted from the first difference to obtain the second difference (the change value of the force actively introduced by the fan suction applied to the drive wheel), so as to continue to offset 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 current relative walking resistance current value of the robot 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, which corresponds to the relative resistance current information formed by the walking resistance of the external environment relative to the reference walking surface, 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 the collision with external obstacles (which can be the difference in walking resistance relative to the walking surface without obstacles).
[0058] 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.
[0059] 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. The difference in external resistance and the current value need to be converted using a pre-set conversion coefficient, 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 robot's current relative walking resistance current value is used to represent 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. The walking surface that the robot has walked on within the preset sampling time is defined as the reference walking surface. The reference walking surface can be the same as the current walking surface to detect the change in friction force experienced by the robot on the same medium walking surface. The reference walking surface can also be different from the current walking surface to detect whether the robot is crossing walking surfaces of different media. Generally, there are no obstacles at the reference walking surface. Then, when the current relative walking resistance current value calculated by the robot is too large, it can be determined that the robot has collided with an obstacle on the same medium walking surface (the current walking surface). If no obstacle is collided, the robot is in an obstacle-free walking state. When a robot walks in a straight line without obstacles, it can be determined whether the frictional force (external resistance) experienced by the robot on a walking surface of a certain type of medium is greater or less than that experienced on a walking surface of a different type of medium previously traversed. This allows for effective differentiation of walking surfaces with different frictional forces that the robot has successively traversed. When the medium of the walking surface the robot is in contact with 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 walking surfaces that the robot has traversed. This method can at least determine the two different walking surfaces that the robot has traversed and determine the change in the external resistance (degree of obstruction) experienced by the currently traversed walking surface relative to the previously traversed walking surface.
[0060] 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 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. 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 participation of the torque output by the motor, 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. Then, when the current relative walking resistance current value calculated by the robot is too large, it can be determined that the robot has collided with an obstacle on the walking surface of the same medium (the current walking surface). In this embodiment, after the robot starts walking from a preset starting position and enters the preset sampling time, the robot calculates the first reference PWM value, the second reference PWM value, and the reference current value of the drive wheel after walking through the preset sampling time. The product of the first reference PWM value and the first conversion coefficient is then marked as the effective current change value formed by the first PWM value within the preset sampling time. The first reference PWM value can represent the average resistance information or maximum resistance information (which can represent the maximum static friction force borne when starting from a standstill) of the average resistance applied to the drive wheel by the torque output by the robot's drive motor on the walking surface during the preset sampling time. The PWM value and the current value also have corresponding conversion coefficients, which can also be fine-tuned according to the model of the drive motor or fan.Since the medium on the walking surface traversed by the robot within the preset sampling time is the same as the medium at the preset starting position, the first reference PWM value can represent the effective force information of the torque output by the robot's drive motor applied to the drive wheel at the preset starting position; similarly, the second reference PWM value can represent the effective resistance information of the fan suction force generated by the robot's fan applied to the drive wheel at the preset starting position; the drive wheel reference current value can represent the current sampling value formed by all the force factors existing in the robot's drive wheel's movement at the preset starting position, specifically representing the current change value caused by the change in drive motor torque on the same medium walking surface of the drive wheel within the preset sampling time. The current change caused by the change in fan suction force on the driving wheel on the same medium's walking surface, the current change caused by the friction force exerted on the driving wheel by the medium's walking surface (related to the type of medium for robots of the same mass), and the current change caused by collisions with obstacles that may exist on the same medium's walking surface, can be used to represent the current value corresponding to the difference between the external resistance the robot experiences while walking on the current walking surface and the external resistance the robot experiences at the preset starting position, or the current value corresponding to the difference between the external resistance the robot experiences while walking on the current walking surface and the external resistance the robot experiences at the preset starting position's walking surface.
[0061] Based on the above embodiments, when the medium of the walking surface that the robot comes into contact with changes, the corresponding external resistance also changes. Therefore, when the medium of the walking surface that the robot has just walked on 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 of the walking surface, that is, the difference in external resistance between the surface medium of the working area that the robot is currently traversing and the surface medium of the working area that it traversed last time. The working area that it traversed last time includes the walking surface that the robot traversed within the preset sampling time and the preset starting position.
[0062] 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, 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 the robot experiences on the current walking surface is greater than the walking resistance the robot experiences at the preset starting position; when the robot's current relative walking resistance current value decreases, it is determined that the walking resistance the robot experiences on the current walking surface is less than the walking resistance the robot experiences 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.
[0063] 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.
[0064] 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 first PWM values within the preset sampling time includes: averaging all obtained first PWM values within the preset sampling time to obtain the first reference PWM value. Specifically, the first PWM values sampled sequentially are summed, and then the sum of the first PWM values within the preset sampling time is averaged 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 by the aforementioned closed-loop adjustment. Preferably, the robot continuously sums the first PWM values obtained by the real-time closed-loop adjustment until sampling is not allowed, and then the summation result is divided 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 first PWM values obtained within the preset sampling time, the largest first PWM value is selected as the first reference PWM value. Specifically, the magnitudes of all the obtained first PWM values are compared sequentially, and then the largest first PWM value is set as the first reference PWM value to prevent the drive wheels from not moving; thus, within the preset sampling time, the sampling of the first PWM value can be completed, and the filtering of all the obtained first PWM values can be completed within the same time period.
[0065] Similarly, within the preset sampling time, the method for calculating the second reference PWM value based on all obtained second PWM values includes: averaging all obtained second PWM values within the preset sampling time to obtain the second reference PWM value, so as to avoid sampling a second PWM value that causes excessive suction of the fan (to prevent excessive pressure on the drive wheel, which would prevent the drive wheel from rotating), and also to avoid sampling a second PWM value that causes insufficient suction of the fan (to prevent insufficient pressure on the drive wheel, which would easily cause the drive wheel to slip); or, selecting the second PWM value with the largest value from all obtained second PWM values within the preset sampling time as the second reference PWM value. In this case, even if the largest second PWM value is used, it will be canceled out when calculating the current walking resistance current value or the current relative walking resistance current value.
[0066] 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 the first PWM value and the second PWM value 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.
[0067] In summary, to detect the relative walking resistance current value between the robot's latest traversed walking surface and the preset starting position or reference walking surface, as well as the walking resistance current value of the robot on the latest traversed walking surface, the aforementioned embodiments do not simply isolate and judge only the sudden change in motor current or only the change in mileage data recorded by the encoder. Instead, they combine the PWM values used to control the drive motor and the PWM values used to control the fan to offset the influence of the torque interference actively generated by the motor and the resistance factor introduced by the change in fan suction in the current sampling value of the drive wheel. Furthermore, without using encoder measurement data, they can calculate the current value unaffected by the current change value actively generated by the robot (including the current change value applied by the change in fan suction and the resistance factor introduced by the drive motor). The system calculates the walking resistance current value (the current change value caused by the torque change of the machine output) and calibrates the PWM value and the current sampling PWM value on the walking surface (considered as the reference walking surface) traversed within the preset sampling time to obtain a reference PWM value. Then, it calculates the relative walking resistance current value between the robot on the latest traversed walking surface and the reference walking surface. It is also unaffected by the current change value actively generated by the robot (including the current change value applied by the fan suction change and the current change value caused by the torque change of the drive motor output). Therefore, it extracts the external resistance situation that the robot experiences on the current walking surface to determine the resistance constrained by the medium type of the current walking surface and the walking resistance caused by the robot's collision with external obstacles.
[0068] As one embodiment, in step S1, the robot can adjust the PWM value used to control the drive motor through the angle closed-loop feedback adjustment device, and input the first PWM value adjusted in real time 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 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 first PWM value, so that a first PWM value will be adjusted in each adjustment cycle and acquired externally in real time; then the first 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 newly obtained first PWM value is input to the drive motor. By performing PID adjustment on the first 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 and S2 need to be re-executed. Generally, this occurs in scenarios where the robot collides with an obstacle, stops, or turns around. In such cases, steps S1 and S2 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.
[0069] 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.
[0070] 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.
[0071] 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.
[0072] 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.
[0073] In the foregoing embodiments, the first 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.
[0074] 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 second 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:
[0075] 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 second PWM value. Then, a second PWM value will be adjusted in each adjustment cycle and acquired externally in real time to calculate the current walking resistance current value. Or the current relative walking resistance current value; then input the second PWM value 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 in the current adjustment cycle changes within the preset air pressure error range or remains constant within the preset air pressure error range. Then input the latest obtained second PWM value into the fan, and use PID adjustment of the second PWM value to promote the closed-loop adjustment of the fan suction measured by the robot in real time to approach the target working suction. The target working suction is preset by the robot 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.
[0076] 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 second PWM value, and then inputs the second 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 second 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.
[0077] 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.
[0078] 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.
[0079] Based on the above embodiment for calculating the current walking resistance current value and the current relative walking resistance current value, when the first PWM value is adopted and the drive wheel current sampling value is adopted, 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 second 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 second 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.
[0080] When the first 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 charge of the right drive wheel current sampling value is subtracted from the change in charge 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 charge caused by the second 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 first 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 charge of the right drive wheel current sampling value is subtracted from the relative change in charge corresponding to the first and second PWM values to obtain a first difference. Then, the first difference is subtracted from the relative change in charge corresponding to the second 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.
[0081] Based on the foregoing embodiments, this application also discloses a mobile robot. Drive wheels are mounted on both sides of the mobile robot, and a drive motor electrically connected to the drive wheels is installed inside the mobile robot. The drive motor is used to drive the mobile robot to walk. The mobile robot is also equipped with a fan to generate suction on the walking surface. The mobile robot disclosed in this embodiment does not have an encoder to save mechanical design costs, but an encoder could also be installed. This mobile robot is configured to perform the method for detecting the walking resistance current value disclosed in any of the foregoing embodiments, to calculate the current walking resistance current value and / or the current relative walking resistance current value of the robot, and to detect the external resistance experienced by the mobile robot on the walking surface and its changes.
[0082] When the mobile robot is a sweeping robot, a left drive wheel is installed on the left side of the sweeping robot, electrically connected to a left drive motor, and a right drive wheel is installed on the right side, electrically connected to a right drive motor. A suction fan is installed on the chassis of the sweeping robot, with the suction port facing the walking surface, and the suction power of the fan is used to perform dust removal on the walking surface. The mobile 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 for detecting the robot's walking resistance current value disclosed in any of the aforementioned embodiments to detect changes in external resistance on walking surfaces of different media or on the same media.
[0083] The mobile robot combines the PWM values used to control the drive motor and the fan to offset the current changes caused by the torque changes of the drive motor and the current changes introduced by the fan suction changes (which can also be counted as the torque interference actively output by the fan) in the current sampling value of the drive wheel. Without using encoder measurement data, it can calculate the relative walking resistance current value and the walking resistance current value that are not affected by the torque changes actively generated by the robot. Then, it can extract the external resistance of the robot to determine the resistance constrained by the medium type of the current walking surface and the walking resistance caused by the robot's collision with external obstacles.
[0084] Because the current relative walking resistance current value and the current walking resistance current value calculated by the mobile robot are not affected by changes in the PWM value used to control the drive motor, nor by changes in the PWM value used to control the fan, thus overcoming the interference from changes in fan suction force and changes in the output torque of the drive wheel motor, the speed difference between the left and right drive wheels of the robot (controlled by the drive wheel motor and positively correlated with the PWM value of the drive wheel motor) does not affect the accurate detection of the current relative walking resistance current value and the current walking resistance current value. This makes the method for detecting the walking resistance current value applicable not only to straight-line walking with the same degree of slippage between the left and right drive wheels, but also to straight-line walking with different degrees of slippage between the left and right drive wheels when the robot is turning. In other words, it takes into account the speed difference between the two drive wheels, improving the adaptability of the current relative walking resistance current value and the current walking resistance current value in various walking surfaces and various robot motion states.
[0085] 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.
[0086] 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 detecting the walking resistance current value of 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 on the robot's walking surface; characterized in that, Methods for detecting the walking resistance current value of a robot include: The robot performs closed-loop adjustment of the PWM value used to control the drive motor and determines that the first PWM value is obtained in real time during the closed-loop adjustment process; the robot performs closed-loop adjustment of the PWM value used to control the fan and determines that the second PWM value is obtained in real time during the closed-loop adjustment process; after transmitting the first PWM value to the drive motor, the robot samples the current signal output by the drive motor to obtain the current sampling value of the drive wheel. Based on the drive wheel current sampling value, the first PWM value, and the second PWM value, the robot's current walking resistance current value is calculated, and / or the current relative walking resistance current value is calculated. The first PWM value is used to control the output torque change of the drive motor, so as to form a power change value in the drive wheel current sampling value; the second PWM value is used to control the fan suction force change generated by the fan, so as to form another power change value in the drive wheel current sampling value. The method for calculating the robot's current walking resistance current value based on the drive wheel current sampling value, the first PWM value, and the second 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; The method for calculating the robot's current relative walking resistance current value based on the drive wheel current sampling value, the first PWM value, and the second PWM value includes: after the robot starts walking on the current walking surface, controlling the relative charge change value of the drive wheel current sampling value to successively subtract the relative charge change value corresponding to the first PWM value and the relative charge change value corresponding to the second PWM value to obtain the robot's current relative walking resistance current value; wherein the relative charge change value of the drive wheel current sampling value and the relative charge change value corresponding to the first 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 charge.
2. The method for detecting the walking resistance current value of a robot according to claim 1, characterized in that, The method for calculating the robot's current walking resistance current value based on the drive wheel current sampling value, the first PWM value, and the second 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. During the robot's movement on the current walking surface, the robot marks the first PWM value obtained in real time as the first PWM value to be measured, and the second PWM value obtained in real time 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.
3. The method for detecting the walking resistance current value of a robot according to claim 1, characterized in that, The method for calculating the robot's current walking resistance current value based on the drive wheel current sampling value, the first PWM value, and the second 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 the obtained first PWM values, calculates a second reference PWM value based on all the obtained second PWM values, and calculates a drive wheel reference current value based on all the 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 the 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 the closed-loop regulation. The robot controls the reference current value of the drive wheel, and then subtracts 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 robot's current walking resistance current value.
4. The method for detecting the walking resistance current value of a robot according to claim 1, characterized in that, The method for calculating the robot's current relative walking resistance current value based on the drive wheel current sampling value, the first PWM value, and the second 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 first PWM values, calculates the second reference PWM value based on all the obtained second PWM values, and calculates 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 first PWM value obtained in real time as the first PWM value to be tested, and the second PWM value obtained in real time as the second PWM value to be tested; then, the difference between the real-time obtained drive wheel current sampling value and the drive wheel reference current value 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 tested and the first reference PWM value and the first conversion coefficient is marked as the relative power change value corresponding to the first PWM value, and the product of the difference between the second PWM value to be tested and the second reference PWM value and the second conversion coefficient is marked as the relative power change value corresponding to the second PWM value; Then, the relative energy change value of the control drive wheel current sampling value is subtracted from the relative energy change value corresponding to the first PWM value to obtain the first difference. The first difference is then subtracted from the relative energy change value corresponding to the second PWM value to obtain the second difference. The second difference is then marked as the robot's current relative walking resistance current value.
5. The method for detecting the walking resistance current value of a robot according to claim 3 or 4, characterized in that, The method for calculating a first reference PWM value based on all obtained first PWM values within the preset sampling time includes: averaging all obtained first PWM values within the preset sampling time to obtain a first reference PWM value; or, selecting the first PWM value with the largest value from all obtained first PWM values within the preset sampling time to obtain a first reference PWM value. The method for calculating the second reference PWM value based on all obtained second PWM values within the preset sampling time includes: averaging all obtained second PWM values within the preset sampling time to obtain the second reference PWM value; or, selecting the second PWM value with the largest value from all obtained second 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.
6. The method for detecting the walking resistance current value of a robot according to claim 5, characterized in that, 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 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 that the robot walks through during 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 the robot experiences when walking on the current walking surface and the external resistance the robot experiences on the reference walking surface, wherein the robot maintains walking on the reference walking surface during 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 move in a straight line from the preset starting position; the reference walking surface is the walking surface that the robot has walked on within the preset sampling time. The robot's drive wheels contact the walking surface to allow the robot to withstand external resistance from the walking surface.
7. The method for detecting the walking resistance current value of a robot according to claim 6, characterized in that, When the current relative walking resistance current value of the robot increases or 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 increases. When the current relative walking resistance current value of the robot decreases or the current walking resistance current value of the robot decreases, it is determined that the external resistance experienced by the robot on the current walking surface decreases.
8. The method for detecting the walking resistance current value of 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 first PWM value, and then the first 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 newly obtained first 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 pre-planned by the robot to guide it along the pre-planned work path; the robot's heading angle is measured in real time by the robot's built-in gyroscope.
9. The method for detecting the walking resistance current value of 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 second PWM value. The second 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. The target working suction is preset by the robot to adapt to the working surface where the robot is currently located. 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 adjusting suction of fan under extreme conditions of robot
CN111852925A
Method for detecting walking resistance of mobile robot, chip and robot
CN111880528A