Working Component Control Method, Self-Mobile Device and Medium of Self-Mobile Device

By identifying the status abnormality of the sensor from the mobile device and determining the initial height, the problem of sensor abnormality causing the height of the working component cannot be controlled, and normal height adjustment in abnormal situations is achieved.

CN115657668BActive Publication Date: 2025-06-24ECOFLOW INC

Patent Information

Application Number
CN202211255304.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-13
Publication Date
2025-06-24
Estimated Expiration
2042-10-13

AI Technical Summary

Technical Problem

In abnormal situations, sensors from mobile devices cannot control the height of the working components normally.

Method used

By receiving the height adjustment command, the feedback data of the preset sensor is obtained and the status of the sensor is identified. If the status is abnormal, the initial height of the working component is determined according to the abnormal type, the number of pulses corresponding to the height difference is calculated, and the control signal is generated to control the motor to drive the working component to move to the target height.

Benefits of technology

In the event of abnormal sensors, the initial height can be accurately determined and the height of the working component can be adjusted based on the height and target height to achieve normal control from the mobile device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115657668B_ABST
    Figure CN115657668B_ABST
Patent Text Reader

Abstract

The present application provides a method for controlling a working component of a self - moving device, a self - moving device, and a medium. The method for controlling the working component includes: receiving a height adjustment instruction; the height adjustment instruction includes a target height; obtaining feedback data of a preset sensor of the self - moving device; the preset sensor is used to detect the height of the working component; identifying the state of the preset sensor according to the feedback data; when the state of the preset sensor is abnormal, determining the initial height of the working component according to the type of abnormality; determining a first height difference according to the target height and the initial height; determining the number of pulses corresponding to the first height difference according to the first height difference and a preset mapping relationship; generating a first pulse control signal according to the number of pulses, and the first pulse control signal is used to control a motor to drive the working component to move to the target height. The present application can normally control the height of the working component when the sensor of the self - moving device is abnormal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of automatic control technology, and particularly relates to a method for controlling a working component of a self-moving device, a self-moving device, and a medium. Background Art

[0002] For some self-moving devices, it is often necessary to control the height of the working component. Currently, generally, a sensor is used to detect the height at which the working component is currently located, and based on the currently located height, the height of the working component in the self-moving device is gradually adjusted through closed-loop control. In such self-moving devices, the sensor is easily affected by factors such as its own installation angle, installation position gap, and environmental interference, resulting in abnormalities. In the event of an abnormality, the data detected by the sensor becomes invalid, and as a result, the self-moving device cannot normally control the height of the working component. Summary of the Invention

[0003] The purpose of the present application is to provide a method for controlling a working component of a self-moving device, a self-moving device, and a medium, so as to solve the technical problem that the self-moving device cannot normally control the height of the working component in the case of sensor abnormalities.

[0004] Other features and advantages of the present application will become apparent through the following detailed description, or will be partially learned through the practice of the present application.

[0005] According to one aspect of the embodiments of the present application, there is provided a method for controlling a working component of a self-moving device, where the working component is driven by a motor to rise or fall, including:

[0006] Receiving a height adjustment instruction; the height adjustment instruction includes a target height;

[0007] Obtaining feedback data of a preset sensor of the self-moving device; the preset sensor is used to detect the height of the working component;

[0008] Identifying the state of the preset sensor according to the feedback data;

[0009] When the state of the preset sensor is abnormal, determining the initial height of the working component according to the type of abnormality;

[0010] Determining a first height difference according to the target height and the initial height;

[0011] Determining the number of pulses corresponding to the first height difference according to the first height difference and a preset mapping relationship;

[0012] Generating a first pulse control signal according to the number of pulses, where the first pulse control signal is used to control the motor to drive the working component to move to the target height.

[0013] In one embodiment of the present application, based on the above technical solution, identifying the state of the preset sensor according to the feedback data includes:

[0014] When the self - moving device is powered on, if the feedback data is detected to be incomplete for a preset number of consecutive times, it is determined that the state of the preset sensor is abnormal, and the abnormal type is the first abnormal type.

[0015] In one embodiment of the present application, based on the above technical solution, determining the initial height of the working component according to the abnormal type includes:

[0016] If the abnormal type of the preset sensor is the first abnormal type, the height stored when the self - moving device was shut down last time is determined as the initial height.

[0017] In one embodiment of the present application, based on the above technical solution, identifying the state of the preset sensor according to the feedback data includes:

[0018] When the self - moving device is working, monitor the preset status bit in the feedback data; the preset status bit is used to indicate that the preset sensor is in the in - place state or the lost state;

[0019] When the preset sensor enters the lost state from the in - place state, it is determined that the state of the preset sensor is abnormal, and the abnormal type is the second abnormal type;

[0020] When the preset sensor has been in the lost state all the time, it is determined that the state of the preset sensor is abnormal, and the abnormal type is the third abnormal type.

[0021] In one embodiment of the present application, based on the above technical solution, determining the initial height of the working component according to the abnormal type includes:

[0022] If the abnormal type of the preset sensor is the second abnormal type, determine the initial height according to the last feedback data before the preset sensor enters the lost state;

[0023] If the abnormal type of the preset sensor is the third abnormal type, use the previous target height as the initial height.

[0024] In one embodiment of the present application, based on the above technical solution, monitoring the preset status bit in the feedback data includes:

[0025] Monitor the value of the preset status bit in the feedback data;

[0026] If the value of the preset status bit is the first preset value, it is determined that the preset sensor is in the in - place state;

[0027] If the value of the preset status bit is the second preset value and lasts for a preset duration, it is determined that the preset sensor enters the lost state.

[0028] In an embodiment of the present application, based on the above technical solution, after identifying the state of the preset sensor according to the feedback data, the method further includes:

[0029] If the state of the preset sensor is normal, determine the real-time height of the working component according to the feedback data of the preset sensor;

[0030] When the real-time height is inconsistent with the target height, continuously send a second pulse control signal to the motor, and the second pulse control signal is used to control the motor to drive the working component to rise or fall.

[0031] In an embodiment of the present application, based on the above technical solution, the method further includes:

[0032] In response to the shutdown instruction, store the current height of the working component;

[0033] Turn off the self-mobile device.

[0034] In an embodiment of the present application, based on the above technical solution, storing the current height of the working component includes:

[0035] If the state of the preset sensor is normal, determine and store the current height of the working component according to the feedback data of the preset sensor.

[0036] In an embodiment of the present application, based on the above technical solution, storing the current height of the working component includes:

[0037] If the state of the preset sensor is abnormal, determine a second height difference according to the number of pulses sent and the preset mapping relationship;

[0038] Determine and store the current height of the working component according to the initial height and the second height difference.

[0039] According to one aspect of the embodiments of the present application, a self-mobile device is provided, and the self-mobile device includes a working component, a connecting rod, a motor, a preset sensor, a processor, and a storage device;

[0040] The connecting rod connects the working component and the motor;

[0041] The motor is used to drive the working component to rise or fall through the connecting rod;

[0042] The preset sensor is used to detect the height of the working component;

[0043] The processor is communicatively connected to the motor and the preset sensor;

[0044] The storage device is configured to store one or more programs, which, when executed by the one or more processors, cause the self - moving device to implement the working component control method described in any one of the above.

[0045] According to one aspect of the embodiments of the present application, there is provided a computer - readable medium having a computer program stored thereon, and when the computer program is executed by a processor, the working component control method in the above - mentioned technical solution is implemented.

[0046] In the technical solution provided by the embodiments of the present application, by receiving a height adjustment instruction including a target height and identifying the state of the preset sensor according to the feedback data of the preset sensor of the self - moving device, if it is detected according to the feedback data that the preset sensor of the self - moving device is abnormal, then according to the type of abnormality, the initial height of the working component is determined, and based on the initial height and the target height, the number of pulses corresponding to the height difference is obtained. A first pulse control signal is generated based on the number of pulses to control the motor to drive the working component to move to the target height. In this way, when the preset sensor is abnormal, after determining the initial height based on the type of abnormality, on the basis of this initial height, it is still possible to determine the corresponding number of pulses based on the height difference between the initial height and the target height, and based on the number of pulses, the height of the working component of the self - moving device is adjusted in an open - loop control manner, so as to realize the normal control of the height of the working component of the self - moving device when the sensor is abnormal. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] By referring to the accompanying drawings and describing its exemplary embodiments in detail, the above and other objectives, features, and advantages of the present application will become more apparent.

[0048] Figure 1 FIG. 1 shows a schematic structural diagram of a self - moving device according to an embodiment of the present application.

[0049] Figure 2 FIG. 2 shows a schematic flow diagram of a control method for a working component of a self - moving device according to an embodiment of the present application.

[0050] Figure 3 FIG. 3 shows a schematic diagram of the height relationship between components of a self - moving device.

[0051] Figure 4 FIG. 4 shows a schematic overall flow diagram of height control of a lawn mower in a specific embodiment.

[0052] Figure 5 FIG. 5 shows a schematic architecture diagram of a self - moving device according to an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0053] Example embodiments will now be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; rather, these example embodiments are provided so that this application will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The drawings are merely schematic illustrations of the present application and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus repeated descriptions thereof will be omitted.

[0054] In addition, the described features, structures, or characteristics may be combined in any suitable manner in one or more example embodiments. In the following description, numerous specific details are provided to give a thorough understanding of the example embodiments of the present application. However, those skilled in the art will recognize that one or more of the specific details may be omitted in practicing the technical solutions of the present application, or other methods, components, steps, etc. may be employed. In other cases, well-known structures, methods, implementations, or operations are not shown or described in detail to avoid obscuring aspects of the present application.

[0055] Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0056] The flowcharts shown in the drawings are merely illustrative and do not necessarily include all of the content and operations / steps, nor are they necessarily executed in the order described. For example, some operations / steps may be decomposed, while some operations / steps may be combined or partially combined, so the actual execution order may change according to the actual situation.

[0057] Referring to Figure 1 as shown, the self - moving device includes a working component 101, a connecting rod 102, a preset sensor 103, and a motor (not shown in the figure). Among them, the connecting rod 102 connects the working component 101 and the motor, and the motor is used to drive the working component 101 to rise or fall through the connecting rod 102; the preset sensor 103 is used to detect the height of the working component 101.

[0058] In some embodiments, the motor is disposed in the control support block 104, and the control support block 104 further includes a controller unit and a coupling structure for realizing the lifting control of the connecting rod 102 and the working component 101.

[0059] It can be understood that Figure 1 the structure of the self - moving device shown is only an illustrative description. In some other embodiments, the structure of the self - moving device may be the same asFigure 1 Different from what is shown, each component can be increased or decreased, and the connection relationships between components can also be different.

[0060] In some embodiments, the preset sensor 103 is a magnetic encoder. The magnetic encoder is used to detect the rotation angle of the connecting rod 102 and calculate the height of the working component 101 based on the rotation angle.

[0061] In other embodiments, the preset sensor 103 can also be a distance sensor, which can directly detect the height of the working component 101.

[0062] It can be understood that the self - moving device can be a device with a self - moving assistance function. Among them, the self - moving assistance function can be implemented by an in - vehicle terminal, and the corresponding self - moving device can be a vehicle with the in - vehicle terminal. The self - moving device can also be a semi - self - moving device or a fully autonomous moving device. Exemplarily, the self - moving device can be a lawn mower, a floor sweeper, a robot with navigation function, etc.

[0063] In some embodiments, the self - moving device is a lawn mower, and the working component 101 includes components such as a cutter head, a drive motor, and a protective housing.

[0064] The following makes a detailed description of the working component control method of the self - moving device provided by the present application in combination with specific embodiments.

[0065] Figure 2 FIG. shows a working component control method of a self - moving device according to an embodiment of the present application. The method includes steps S201 to S207. The following makes a detailed description of each step.

[0066] Step S201, receive a height adjustment instruction.

[0067] In this embodiment, the execution subject is the self - moving device. The self - moving device can control the working component to rise or fall to control the working component to perform different tasks. For example, the self - moving device can be a lawn mower, and the working component can include a cutter head. During the lawn mowing process, by adjusting the height of the cutter head, the lawn mowing task at different lawn heights can be performed.

[0068] The height adjustment instruction is an instruction indicating the target height to which the working component needs to be adjusted, and the height adjustment instruction includes the target height.

[0069] In some embodiments, the self - moving device receives the height adjustment instruction input by the operator through the input unit to obtain the target height from the height adjustment instruction.

[0070] For example, in one example, the self - moving device can be connected to a mobile terminal such as a mobile phone through a wireless connection. At this time, after the user inputs a height adjustment instruction on the mobile terminal, the self - moving device can receive the height adjustment instruction sent by the mobile terminal through this wireless connection.

[0071] In another example, the self - moving device can obtain the above - mentioned height adjustment instruction in response to a touch operation of the user on the input unit (such as a physical button, a touch screen, etc.) of the self - moving device.

[0072] Step S202, obtain the feedback data of the preset sensor of the self - moving device.

[0073] The preset sensor is used to detect the height of the working component. As mentioned above, the preset sensor can be a distance sensor or an angle sensor such as a magnetic encoder. The distance sensor is used to directly detect the height of the working component, and the angle sensor is used to detect the angle between the connecting rod connected to the working component and the motor, and calculate the height of the working component based on the angle.

[0074] The feedback data is the data generated during the detection process of the preset sensor. The feedback data can specifically include the detected height or angle, or can also include the data indicating the working state of the preset sensor itself. For example, indicating that the preset sensor is in an online state or indicating that the preset sensor is in a lost state.

[0075] In some embodiments, the preset sensor is an angle sensor. The angle sensor is arranged between the connecting rod and the motor. The connecting rod is connected to the working component, and the motor drives the working component to rise or fall through the connecting rod. By calculating the corresponding relationship between the rotation angle of the connecting rod and the height of the working component, and based on the angle detected by the preset sensor and the corresponding relationship, the height of the working component is determined.

[0076] Taking the preset sensor as an angle sensor as an example, the following takes Figure 3 the shown structure as an example to illustrate the corresponding relationship between the rotation angle of the connecting rod and the height of the working component.

[0077] Refer to Figure 3 the schematic diagram of the height relationship between the components shown. Among them, the self - moving device includes a working component 301, a connecting rod 302, an angle sensor 303, and a control support block 304. The control support block 304 can include a motor, a coupling structure, and a controller. H is the height from the center of the coupling point of the connecting rod and the angle sensor to the ground. b is the height from the connection point of the connecting rod and the working component to the ground. h is the height of the working component to the horizontal ground. L is the length of the connecting rod.

[0078] The vertical angle agl_0 between the connecting rod 302 and the ground when it is stationary is: agl_0 = arccos((H - b) / L);

[0079] The distance bb2b from the end of the connecting rod 302 to the working component 301 is: bb2b = b – h;

[0080] The theoretical maximum height h_up_lim of the working component 301 from the ground is: h_up_lim = H + L - bb2b;

[0081] The theoretical minimum height h_down_lim of the working component 301 from the ground is:

[0082] h_down_lim = H - L - bb2b.

[0083] When the connecting rod 302 moves downward across the zero point, causing the height of the working component 301 from the horizontal ground to become h1, the height from the connection point of the connecting rod 302 to the working component 301 to the ground is b1. The angle agl_1 that the connecting rod 302 should move is:

[0084] agl_1 = agl_0 - arccos((H - b1) / L) = agl_0 - arccos((H – (h1 + bb2b)) / L);

[0085] When the connecting rod 302 moves upward across the zero point, causing the height of the working component 301 from the horizontal ground to become h2, the height from the connection point of the connecting rod 302 to the working component 301 to the ground is b2. The angle agl_2 that the connecting rod 302 should move is:

[0086] agl_2 = arccos((H - b2) / L) - agl_0 = arccos((H – (h2 + bb2b)) / L) - agl_0.

[0087] Define the zero point position as 0 degree, upward as + degree, and downward as - degree, with the value range between -180 degrees and +180 degrees. Accordingly, the angle difference agl_diff is:

[0088] agl_diff = agl_aim – agl_current.

[0089] As can be seen from the above process, by obtaining the current rotation angle agl through the angle sensor 303, the corresponding relationship between the height h and the angle agl can be obtained through calculation, and then the conversion between the angle and the height of the working component can be carried out. In this way, the current height of the working component can be detected through the angle sensor.

[0090] It can be understood that in other embodiments, if the preset sensor is a distance sensor, the current height of the working component can be directly detected.

[0091] Step S203: Identify the state of the preset sensor according to the feedback data.

[0092] The states of the preset sensor include an abnormal state and a normal state. The abnormal state refers to the state where the preset sensor is in a certain fault and cannot detect the height of the working component. The normal state refers to the state where the preset sensor can detect the height of the working component.

[0093] In some embodiments, identifying the state of the preset sensor according to the feedback data includes: if the height detection information in the feedback data is detected to be complete, the state of the preset sensor is the online state; if the height detection information in the feedback data is detected to be incomplete, the state of the preset sensor is the lost state. The height detection information is the information used to indicate the height state, which can be a height value or an angle information used to calculate the height.

[0094] In some other embodiments, the feedback data includes a preset status bit. Identifying the state of the preset sensor according to the feedback data includes: if the value of the preset status bit in the feedback data is detected to be the first preset value, the state of the preset sensor is the online state; if the value of the preset status bit in the feedback data is detected to be the second preset value, the state of the preset sensor is the lost state.

[0095] By using the above method, the state of the preset sensor can be detected efficiently.

[0096] Step S204: When the state of the preset sensor is abnormal, determine the initial height of the working component according to the abnormal type.

[0097] The abnormal state of the preset sensor can be divided into different abnormal types. For example, if the preset sensor is detected to be faulty since the self - moving device is powered on, that is, the preset sensor cannot provide height data since it is powered on, this abnormal type is the first abnormal type. If when the self - moving device receives a height adjustment instruction, the preset sensor is in the online state, but during the operation of the working component to the target height, the preset sensor changes from the online state to the lost state, resulting in an abnormality, it means that the preset sensor can provide height data before it is lost, and this abnormal type is the second abnormal type. If the preset sensor of the self - moving device is in the online state when it is powered on, but when it receives a height adjustment instruction, the preset sensor is already in the lost state, it means that the preset sensor has been in the lost state during the operation of this height adjustment, and this abnormal type is the third abnormal type.

[0098] Obtain the initial height of the working component corresponding to the abnormal type under different abnormal types to obtain an accurate initial height. The initial height is the height at which the working component is located before adjusting the height. Since it is necessary to move the working component by a certain height difference to move the working component to the target height, it is necessary to select the initial height as accurately as possible to avoid a large deviation from the target height after moving a certain height difference in the case of inaccurate initial height.

[0099] In some embodiments, identifying the state of the preset sensor according to the feedback data includes: when the self-moving device is powered on, if the feedback data is detected to be incomplete for a continuous preset number of times, it is determined that the state of the preset sensor is abnormal, and the abnormal type is the first abnormal type. If the feedback data is detected to be complete for a continuous preset number of times, it is determined that the state of the preset sensor is normal.

[0100] When the abnormal type of the preset sensor is the first abnormal type, the self-moving device can output an error flag and an error code to remind the operator to correct the abnormality.

[0101] In some embodiments, identifying the state of the preset sensor according to the feedback data includes: when the self-moving device is working, monitoring the preset status bit in the feedback data, and the preset status bit is used to indicate that the preset sensor is in the in-position state or the lost state. When the preset sensor enters the lost state from the in-position state, it is determined that the state of the preset sensor is abnormal, and the abnormal type is the second abnormal type; when the preset sensor has been in the lost state, it is determined that the state of the preset sensor is abnormal, and the abnormal type is the third abnormal type; when the preset sensor is in the in-position state, the state of the preset sensor is normal.

[0102] In this way, it is possible to distinguish whether the preset sensor has been in the lost state all the time or has entered the lost state from the in-position state, and different methods are respectively adopted based on different situations to determine the initial height of the working component.

[0103] In some embodiments, determining the initial height of the working component according to the abnormal type includes: if the abnormal type of the preset sensor is the first abnormal type, the height stored when the self-moving device was shut down last time is determined as the initial height.

[0104] By using this method, if the feedback data is detected to be incomplete after the preset sensor is powered on, it indicates that complete feedback data cannot be obtained through the preset sensor after this startup. Since the self-moving device has just been powered on and the current height of the working component has not changed after the last shutdown, the height stored when the self-moving device was shut down last time can represent the current height of the working component. Therefore, determining the height stored when the self-moving device was shut down last time as the initial height can obtain an accurate initial height.

[0105] In some embodiments, determining the initial height of the working component according to the type of anomaly includes: if the type of anomaly of the preset sensor is the second type of anomaly, determining the initial height according to the last feedback data before the preset sensor enters the lost state; if the type of anomaly of the preset sensor is the third type of anomaly, using the previous target height as the initial height.

[0106] When the type of anomaly is the second type of anomaly, the preset sensor changes from the in-place state to the lost state. Since complete feedback data can be obtained during the in-place state of the preset sensor, accurate height data can be determined according to the last feedback data before the state is lost and used as the initial height for height adjustment after the current sensor anomaly, so that an accurate initial height can be obtained.

[0107] When the type of anomaly is the third type of anomaly, the preset sensor has been in the lost state during the operation of the self-moving device since startup, and complete feedback data cannot be obtained. To obtain an accurate initial height, the previous target height is used as the initial height. The previous target height can be the target height that was last saved in the memory during the historical operation of the self-moving device. During the operation of the self-moving device, after adjusting the height of the working component each time, the adjusted target height is saved to the memory. For example, after the self-moving device is powered on and executes the first task, the preset sensor works normally, and the self-moving device adjusts the working component to the target height, which is stored as the historical height. After the first task is completed and the task is executed again, when a new target height is received and the preset sensor has been in an abnormal state all the time, the previously stored target height can be used as the initial height for the current height adjustment, and on this basis, the working component is adjusted to reach the new target height.

[0108] In some embodiments, detecting the preset status bit in the feedback data includes: detecting the value of the preset status bit in the feedback data; if the value of the preset status bit is the first preset value, determining that the preset sensor is in the in-place state; if the value of the preset status bit is the second preset value and lasts for a preset duration, determining that the preset sensor is in the lost state.

[0109] It can be understood that the first preset value is different from the second preset value. The first preset value is used to indicate that the preset sensor is online, and the second preset value is used to indicate that the preset sensor is offline. The first preset value is, for example, 1, and the second preset value is, for example, 0. To accurately determine that the preset sensor is in the lost state, that is, the working state is lost, after detecting that the value of the preset status bit is the second preset value, it is continued to detect whether it lasts for a preset duration. If it lasts for a preset duration, it is determined that the preset sensor is in the lost state.

[0110] By using this method, it is possible to accurately monitor whether the preset sensor is in the in-place state or the lost state.

[0111] Step S205: Determine the first height difference based on the target height and the initial height.

[0112] In some embodiments, the first height difference is the difference obtained by subtracting the initial height from the target height. When the difference is a positive number, the working component is controlled to rise; when the difference is a negative number, the working component is controlled to descend.

[0113] Step S206: Determine the number of pulses corresponding to the first height difference according to the first height difference and the preset mapping relationship.

[0114] The preset mapping relationship can be the corresponding relationship between the preset measured height difference and the number of pulses. This corresponding relationship can be determined by pre-testing according to the structure of the self-moving device and the relative positions between the working component and the motor. The preset mapping relationship can be:

[0115] Y = k × (high_expect – last_ctrl_high);

[0116] Where Y is the number of pulses, high_expect is the target height, and last_ctrl_high is the height of the working component before adjustment, which can specifically be the real-time height detected by the preset sensor when the state of the preset sensor is normal, or the initial height determined according to the abnormal type when the preset sensor is abnormal. Among them, the coefficient k is a value obtained through experimental testing. In this application, k = 20. The coefficient k can be replaced with other determined values according to the structure of the self-moving device and the type of the motor.

[0117] Step S207: Generate a first pulse control signal according to the number of pulses. The first pulse control signal is used to control the motor to drive the working component to move to the target height.

[0118] Specifically, the first control signal includes the number of pulse signals corresponding to the number of pulses of the first height difference. Since the number of pulses is calculated based on the first height difference, the first pulse control signal issued based on this number of pulses can accurately control the motor to rotate by a corresponding angle or run a preset stroke, and then drive the working component to move to the target height.

[0119] In this way, when the preset sensor is abnormal, after determining the initial height based on the abnormal type, on the basis of this initial height, it is still possible to adjust the height of the working component of the self-moving device based on the height difference and the mapping relationship, so as to realize the normal control of the height of the working component of the self-moving device when the sensor is abnormal.

[0120] In some embodiments, after identifying the state of a preset sensor according to feedback data, the working component control method further includes: if the state of the preset sensor is normal, determining the real-time height of the working component according to the feedback data of the preset sensor, and when the real-time height is inconsistent with the target height, continuously sending a second pulse control signal to the motor, where the second pulse control signal is used to control the motor to drive the working component to rise or fall.

[0121] It can be understood that when the state of the preset sensor is normal, the real-time height of the working component can be obtained. When the real-time height is inconsistent with the target height, continuously determining a third height difference according to the real-time height and the target height. According to the third height difference, closed-loop control can be performed through a deviation adjustment algorithm, and a second pulse control signal is continuously sent to the motor to control the working component to gradually rise or fall. After each adjustment, a new real-time height and a new height difference are obtained. In this way, continuous adjustment realizes closed-loop control.

[0122] Among them, the second pulse control signal includes a pulse signal with a preset number of pulses. Here, the preset pulse can be set according to needs and is the height adjustment step of the working component. The third height difference can be the difference between the target height and the real-time height. If this difference is positive, the working component is controlled to rise; if this difference is negative, the working component is controlled to fall.

[0123] It can be understood that the deviation adjustment algorithm can be a proportional control algorithm, a proportional integral control algorithm, or a proportional integral derivative control algorithm, and the present application does not limit this.

[0124] Adopting this method can accurately adjust the working component to the target height according to the real-time height when the state of the preset sensor is normal.

[0125] In some embodiments, after identifying the state of a preset sensor according to feedback data, the working component control method further includes: in response to a shutdown instruction, storing the current height of the working component and shutting down the self-mobile device.

[0126] Adopting this method can store the height of the working component when the self-mobile device shuts down. After the self-mobile device is restarted later, if the preset sensor cannot normally detect the height of the working component, the height of the working component stored when the self-mobile device shuts down can be used as the initial height before adjusting the height of the working component, so as to ensure that the working component can be controlled under any circumstances and ensure the normal operation of the self-mobile device.

[0127] In some embodiments, storing the current height of the working component includes: if the state of the preset sensor is normal, determining and storing the current height of the working component according to the feedback data of the preset sensor.

[0128] In this way, when the preset sensor is normal, the current actual height of the working component can be determined according to the feedback data of the preset sensor, so as to obtain the accurate height of the working component by means of the preset sensor.

[0129] In some embodiments, storing the current height of the working component includes: if the state of the preset sensor is abnormal, determining a second height difference according to the number of pulses sent and a preset mapping relationship, and determining and storing the current height of the working component according to the initial height and the second height difference. The number of pulses sent is the number of pulse signals sent during the process of adjusting the height of the working component last time.

[0130] In this way, if the adjustment of the working component is forcibly interrupted during the process of the self - moving device adjusting the height of the working component to the target height, in order to avoid the inconsistency between the height of the working component and the actual height, the actually adjusted height is obtained by using the number of pulses sent, rather than obtaining the height difference by using the number of pulses corresponding to the adjusted target height. Thus, even if the adjustment is not completed, the stored height can be accurate and consistent with the actual height of the working component.

[0131] In some embodiments, in response to a shutdown instruction, storing the current height of the working component includes: in response to the shutdown instruction, detecting whether the self - moving device has completed adjusting the height of the working component. If the self - moving device has not completed adjusting the height of the working component, obtaining a first pulse control signal or a second pulse control signal according to the feedback data, controlling the motor to drive the working component to move to the target height. After the adjustment of the height of the working component is completed, storing the current height of the working component and shutting down the self - moving device; if the self - moving device has completed adjusting the height of the working component, storing the current height of the working component and shutting down the self - moving device.

[0132] In this way, it is possible to avoid the situation where the device is shut down during the process of the self - moving device controlling the movement of the working component, resulting in the interruption of the movement of the working component. It can make the height of the working component successfully move to the target height and make the current height saved by the self - moving device consistent with the height that actually needs to be adjusted.

[0133] Next, with reference to Figure 4 , taking the self - moving device as a lawn mower and the preset sensor as a magnetic encoder as an example, combined with the height control process of the cutter head of the lawn mower in a specific embodiment, the above - mentioned technical solutions of the present application will be described.

[0134] Step S401, after the lawn mower is powered on, self - check whether the feedback data of the magnetic encoder lacks angle information; if the angle information is missing, execute step S402; if the angle information is not missing, execute step S404.

[0135] Step S402: Check whether the number of consecutive detections of missing angle information reaches 5 times. If it does not reach 5 times, continue with self-check (return to execute Step S401). If it reaches 5 times, proceed to Step S403.

[0136] Step S403: Report the error flag and error code, and read the height stored in the memory as the initial height. Then execute Step S409.

[0137] In the case where the self-check of the feedback data is abnormal 5 times in a row, it is determined that the magnetic encoder is abnormal. At this time, report the error flag and error code to the server and issue an error prompt. At the same time, read the height stored in the memory as the initial height.

[0138] Step S404: Check whether the status bit of the magnetic encoder is missing. If the status bit of the magnetic encoder is not missing, execute Step S405; if the status bit of the magnetic encoder is missing, execute Step S406.

[0139] That is, whether the magnetic encoder is still in place currently. If the status bit is not missing, that is, the magnetic encoder is in the in-place state, it means that the angle data in the feedback data is real-time and valid, and the real-time height can be further determined based on this angle data.

[0140] Step S405: If the status bit is not missing, perform closed-loop control to adjust the height of the cutter head.

[0141] If the status bit is not missing, perform closed-loop adjustment of the cutter head height through the deviation adjustment algorithm based on the real-time height and the target height.

[0142] Step S406: If the status bit is missing, check whether it enters the missing state from the in-place state. If so, execute Step S407; if not, execute Step S408.

[0143] Determining the current abnormal state can further distinguish different heights as the initial height to ensure the accuracy of subsequent open-loop adjustment.

[0144] Step S407: If it enters the missing state from the in-place state, determine the initial height based on the last feedback data before the magnetic encoder enters the missing state. Then execute Step S409.

[0145] Step S408: If it does not enter the missing state from the in-place state, use the previous target height as the initial height. Then execute Step S409.

[0146] If it does not enter the missing state from the in-place state, it means that the magnetic encoder has been in the missing state, and the mower has not obtained accurate height data feedback from the magnetic encoder during this cutter head control. Then, directly use the previous target height as the initial height.

[0147] Step S409: Based on the above initial height and the target height, combined with the height fitting curve, set the step distance and adjust the height of the cutter head.

[0148] Here, setting the step distance means the step distance of the motor. It can be understood that for each pulse sent, the motor rotates or moves by one step length. According to the initial height and the target height, the height difference that the cutter head needs to move can be determined. Combining with the height fitting curve, the number of step lengths corresponding to this height difference, that is, the step distance, can be determined. Then, the corresponding number of pulses is sent to the motor to drive the motor to rotate or move.

[0149] Step S410: In response to the shutdown instruction, write the current height into the memory.

[0150] During the process of adjusting the height or after adjusting the height to the target height, when the shutdown instruction is received, write the current height into the memory.

[0151] By adopting the above method, whether the state of the magnetic encoder is normal or abnormal, the height of the cutter head can be accurately controlled.

[0152] Next, refer to Figure 5 to describe the self - moving device 50 according to the embodiments of the present application. Figure 5 The self - moving device 50 shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present application.

[0153] As Figure 5 shown, the self - moving device 50 is presented in the form of a general - purpose computing device. The components of the self - moving device 50 may include, but are not limited to: the above - mentioned at least one processing unit 510, the above - mentioned at least one storage unit 520, and a bus 530 connecting different system components (including the storage unit 520 and the processing unit 510).

[0154] Among them, the storage unit stores program codes, and the program codes can be executed by the processing unit 510, so that the processing unit 510 executes the steps according to various exemplary embodiments of the present invention described in the description part of the above - mentioned exemplary methods in this specification. For example, the processing unit 510 can execute the respective steps as Figure 2 shown.

[0155] The storage unit 520 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 5201 and / or a cache storage unit 5202, and may further include a read - only storage unit (ROM) 5203.

[0156] The storage unit 520 may also include a program / utilities 5204 having a set (at least one) of program modules 5205. Such program modules 5205 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment.

[0157] The bus 530 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus structures.

[0158] The self - mobile device 50 may also communicate with one or more external devices 600 (such as a keyboard, a pointing device, a Bluetooth device, etc.), may also communicate with one or more devices that enable a user to interact with the self - mobile device 50, and / or may communicate with any device that enables the self - mobile device 50 to communicate with one or more other computing devices (such as a router, a modem, etc.). Such communication may be through an input / output (I / O) interface 550. The input / output (I / O) interface 550 is connected to the display unit 540. Also, the self - mobile device 50 may communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 560. As shown in the figure, the network adapter 560 communicates with other modules of the self - mobile device 50 through the bus 530.

[0159] It should be understood that, although not shown in the figures, other hardware and / or software modules may be used in conjunction with the self - mobile device 50, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0160] Through the description of the above - mentioned embodiments, those skilled in the art can easily understand that the exemplary embodiments described herein can be implemented by software or by a combination of software and necessary hardware. Therefore, the technical solutions according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non - volatile storage medium (which can be a CD - ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a self - mobile device to execute the method according to the embodiments of the present application.

[0161] In an exemplary embodiment of the present application, there is also provided a computer - readable storage medium having computer - readable instructions stored thereon. When the computer - readable instructions are executed by a processor of a computer, the computer is enabled to execute the method described in the method embodiment part above.

[0162] According to an embodiment of the present application, there is also provided a program product for implementing the method in the above method embodiment. It can be a portable compact disc read-only memory (CD-ROM), include program code, and can run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, apparatus, or device.

[0163] The program product can adopt any combination of one or more readable media. The readable media can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0164] The computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, in which the readable program code is carried. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable signal medium can also be any readable medium other than the readable storage medium, and this readable medium can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device.

[0165] The program code contained on the readable medium can be transmitted by any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.

[0166] The program code for performing the operations of the present invention can be written in any combination of one or more programming languages, including object-oriented programming languages such as JAVA, C++, etc., and also including conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, executed as a stand-alone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device can be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., by connecting through the Internet using an Internet service provider).

[0167] It should be noted that although several modules or units of a device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of the two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0168] In addition, although the steps of the methods in the present application are described in a specific order in the drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additionally or alternatively, some steps can be omitted, multiple steps can be combined into one step for execution, and / or one step can be decomposed into multiple steps for execution, etc.

[0169] From the description of the above embodiments, those skilled in the art can easily understand that the example embodiments described herein can be implemented by software, or by a combination of software and necessary hardware. Therefore, the technical solutions according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a portable hard drive, etc.) or on a network, including several instructions to enable a self-mobile device to execute the method according to the embodiments of the present application.

[0170] Other embodiments of the present application will be readily apparent to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application, which follow the general principles of the present application and include known common knowledge or conventional technical means in the technical field not disclosed in the present application. The specification and examples are only regarded as exemplary, and the true scope and spirit of the present application are pointed out by the appended claims.

Claims

1. A method for controlling a working component of a self - moving device, characterized in that, The working component is driven by a motor to rise or fall, and includes: Receiving a height adjustment instruction; the height adjustment instruction includes a target height; Obtaining feedback data from a preset sensor of the self - moving device; the preset sensor is used to detect the height of the working component; Identifying the state of the preset sensor according to the feedback data; wherein, when the preset sensor has been in a lost state all the time, it is determined that the state of the preset sensor is abnormal, and the abnormal type is the third abnormal type; When the state of the preset sensor is abnormal, determining the initial height of the working component according to the abnormal type; wherein, if the abnormal type of the preset sensor is the third abnormal type, the previous target height is used as the initial height; Determining a first height difference according to the target height and the initial height; Determining the number of pulses corresponding to the first height difference according to the first height difference and a preset mapping relationship; Generating a first pulse control signal according to the number of pulses, and the first pulse control signal is used to control the motor to drive the working component to move to the target height.

2. The working component control method according to claim 1, wherein The identifying the state of the preset sensor according to the feedback data further includes: When the self - moving device is powered on, if the feedback data is detected to be incomplete for a continuous preset number of times, it is determined that the state of the preset sensor is abnormal, and the abnormal type is the first abnormal type.

3. The working component control method according to claim 2, characterized in that The determining the initial height of the working component according to the abnormal type further includes: If the abnormal type of the preset sensor is the first abnormal type, the height stored when the self - moving device was shut down last time is determined as the initial height.

4. The working component control method according to claim 1, characterized in that, The identifying the state of the preset sensor according to the feedback data further includes: When the self - moving device is working, monitoring a preset status bit in the feedback data; the preset status bit is used to indicate that the preset sensor is in an in - place state or a lost state; When the preset sensor changes from the in - place state to the lost state, it is determined that the state of the preset sensor is abnormal, and the abnormal type is the second abnormal type.

5. The working component control method according to claim 4, wherein The determining the initial height of the working component according to the abnormal type further includes: If the abnormal type of the preset sensor is the second abnormal type, the initial height is determined according to the last feedback data before the preset sensor enters the lost state.

6. The working component control method according to claim 4, characterized in that The monitoring the preset status bit in the feedback data includes: Monitoring the value of the preset status bit in the feedback data; If the value of the preset status bit is the first preset value, it is determined that the preset sensor is in the in - place state; If the value of the preset status bit is the second preset value and lasts for a preset duration, it is determined that the preset sensor enters the lost state.

7. The working component control method according to claim 1, characterized in that After identifying the state of the preset sensor according to the feedback data, the method further includes: If the state of the preset sensor is normal, determining the real - time height of the working component according to the feedback data of the preset sensor; When the real - time height is inconsistent with the target height, continuously sending a second pulse control signal to the motor, and the second pulse control signal is used to control the motor to drive the working component to rise or fall.

8. The working component control method according to claim 1, characterized in that The method further includes: In response to a shutdown instruction, store the current height of the working component; Shut down the self - moving device.

9. A self - moving device, characterized in that, The self - moving device includes a working component, a connecting rod, a motor, a preset sensor, a processor, and a storage device; The connecting rod connects the working component and the motor; The motor is used to drive the working component to rise or fall through the connecting rod; The preset sensor is used to detect the height of the working component; The processor is communicatively connected to the motor and the preset sensor; The storage device is used to store one or more programs, which, when executed by the one or more processors, cause the self - moving device to implement the working component control method according to any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that, It stores computer - readable instructions, which, when executed by a processor, implement the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Method and device for controlling sensor data, equipment and storage medium

    CN108022383A

  • Offline operation method and device

    CN110244769A

Cited By

  • Height sensor failure detection and processing method

    CN121894580A