A motor locked-rotor processing method, device, equipment and storage medium

By dynamically adjusting the current threshold and combining multiple sampling periods with attitude judgment, the problem of inaccurate motor stall detection is solved, and accurate detection and safety protection of motor stall status are achieved.

CN114172444BActive Publication Date: 2026-05-19GUANGDONG KEYSTAR INTELLIGENCE ROBOT CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGDONG KEYSTAR INTELLIGENCE ROBOT CO LTD
Filing Date
2021-12-10
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing technology cannot accurately detect the stall state of a motor, which may cause the motor to be damaged due to excessive stall current.

Method used

By acquiring the actual active current of the motor and dynamically adjusting the current threshold based on the current threshold and the current attitude of the motor, and combining the position value change to determine whether the motor is in a stalled state, the detection accuracy is improved by using multiple sampling cycles and attitude judgment.

Benefits of technology

It improves the accuracy of detecting motor stall conditions, avoids motor damage, and ensures safe motor operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114172444B_ABST
    Figure CN114172444B_ABST
Patent Text Reader

Abstract

The application provides a motor stall processing method, device and equipment and a storage medium, and relates to the technical field of motors. The method comprises the following steps: acquiring an actual active current of a motor according to a first preset sampling period; if the number of times that the actual active current of the motor continuously increases exceeds a first preset number threshold, determining a current threshold corresponding to a current posture of an object on which the motor is installed; and determining whether the motor is in a stall state according to the current threshold and the actual active current of the motor. By applying the embodiment of the application, the accuracy of determining that the motor is in a stall state can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of motor technology, and more specifically, to a method, apparatus, device, and storage medium for handling motor stall. Background Technology

[0002] In practical applications of motors, if the motor is not detected to be in a stalled state in time, it will burn out after a period of time because the stall current will always be greater than the rated current. Therefore, in order to ensure the safe use of motors, motor control systems usually have the function of detecting motor stall.

[0003] Currently, the determination of whether a motor is stalled is mainly based on the relationship between the motor's current, speed, and a preset current threshold. Specifically, if the current value of the motor exceeds the preset current threshold after a preset number of consecutive determinations at its real-time speed, the motor is determined to be in a stalled state.

[0004] However, existing methods may result in inaccurate detection of motor stall. Summary of the Invention

[0005] The purpose of this application is to address the shortcomings of the prior art by providing a method, apparatus, device, and storage medium for handling motor stall, which can accurately detect motor stall.

[0006] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows:

[0007] In a first aspect, embodiments of this application provide a method for handling motor stall, the method comprising:

[0008] The actual active current of the motor is obtained according to the first preset sampling period;

[0009] If the number of times the actual active current of the motor increases continuously exceeds a first preset number threshold, then the current threshold corresponding to the current posture of the object on which the motor is installed is determined.

[0010] Based on the current threshold and the actual active current of the motor, determine whether the motor is in a stalled state.

[0011] Optionally, determining whether the motor is in a stalled state based on the current threshold and the actual active current of the motor includes:

[0012] The actual active current of the motor is obtained according to a second preset sampling period, wherein the duration of the second preset sampling period is less than the duration of the first preset sampling period.

[0013] If the number of times the actual active current of the motor exceeds the current threshold exceeds the second preset threshold, then the motor is determined to be in a stalled state.

[0014] Optionally, determining whether the motor is in a stalled state based on the current threshold and the actual active current of the motor includes:

[0015] The actual active current of the motor is obtained according to the first preset sampling period;

[0016] If the number of times the actual active current of the motor exceeds the current threshold exceeds a third preset threshold, then the motor is determined to be in a stalled state.

[0017] Optionally, determining whether the motor is in a stalled state based on the current threshold and the actual active current of the motor includes:

[0018] Based on the current threshold and the actual active current of the motor, determine whether the motor is in a standby stall state;

[0019] If the motor is in a standby stall state, the maximum current of the motor is adjusted to a first preset current, and it is determined whether the position value of the motor has changed. The first preset current is less than the preset maximum current of the motor.

[0020] If the position value of the motor does not change, then the motor is determined to be in a stalled state.

[0021] Optionally, the method further includes:

[0022] If the position value of the motor changes, it is determined whether the number of consecutive changes in the position value of the motor is greater than a fourth preset threshold number.

[0023] If so, then the motor is determined to be in a stalled state.

[0024] Optionally, the method further includes:

[0025] Determine whether the object is in a climbing state based on the current posture of the object on which the motor is installed;

[0026] If so, and the actual active current of the motor is less than the current threshold, then determine whether the actual active current of the motor continues to decrease;

[0027] If so, and the actual active current of the motor decreases to the normal preset current range, then determine whether the object has completed the climb based on the object's current posture.

[0028] Optionally, the method further includes:

[0029] If the motor is in a stalled state, stop the motor from rotating and adjust the maximum current of the motor to the second preset current;

[0030] Drive the motor to move in the opposite direction and determine whether the position value of the motor has changed;

[0031] If the position value of the motor does not change, the maximum current of the motor is adjusted to the third preset current, and the object is controlled to enter a sleep state.

[0032] Optionally, the method further includes:

[0033] If the position value of the motor changes, the object is controlled to move to a preset position and then enter a sleep state.

[0034] Secondly, embodiments of this application also provide a motor stall handling device, the device comprising:

[0035] The acquisition module is used to acquire the actual active current of the motor according to the first preset sampling period;

[0036] The first determining module is used to determine the current threshold corresponding to the current posture of the object on which the motor is installed if the number of times the actual active current of the motor increases continuously exceeds a first preset number threshold.

[0037] The second determining module is used to determine whether the motor is in a stalled state based on the current threshold and the actual active current of the motor.

[0038] Optionally, the second determining module is specifically used to obtain the actual active current of the motor according to a second preset sampling period, the duration of the second preset sampling period being less than the duration of the first preset sampling period; if the number of times the actual active current of the motor is greater than the current threshold exceeds the second preset number threshold, then it is determined that the motor is in a stalled state.

[0039] Optionally, the second determining module is further configured to obtain the actual active current of the motor according to the first preset sampling period; if the number of times the actual active current of the motor is greater than the current threshold exceeds a third preset number threshold, then the motor is determined to be in a stalled state.

[0040] Optionally, the second determining module is further configured to determine whether the motor is in a candidate stall state based on the current threshold and the actual active current of the motor; if the motor is in a candidate stall state, the maximum current of the motor is adjusted to a first preset current, and it is determined whether the position value of the motor has changed, wherein the first preset current is less than the preset maximum current of the motor; if the position value of the motor has not changed, it is determined that the motor is in a stall state.

[0041] Optionally, the second determining module is further configured to determine whether the number of consecutive changes in the position value of the motor is greater than a fourth preset number threshold if the position value of the motor changes; if so, determine that the motor is in a stalled state.

[0042] Optionally, the first determining module is further configured to determine whether the object is in a climbing state based on the current posture of the object on which the motor is installed; if so, and the actual active current of the motor is less than the current threshold, then determine whether the actual active current of the motor continues to decrease; if so, and the actual active current of the motor decreases to a normal preset current range, then determine whether the object has completed the climbing based on the current posture of the object.

[0043] Optionally, the device further includes a control module;

[0044] The control module is configured to, if the motor is in a stall state, stop the motor from rotating and adjust the maximum current of the motor to a second preset current; drive the motor to move in the opposite direction and determine whether the position value of the motor has changed; if the position value of the motor has not changed, adjust the maximum current of the motor to a third preset current and control the object to enter a sleep state.

[0045] Optionally, the control module is further configured to control the object to move to a preset position and control the object to enter a sleep state if the position value of the motor changes.

[0046] Thirdly, embodiments of this application provide an electronic device, including: a processor, a storage medium, and a bus. The storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the motor stall handling method described in the first aspect above.

[0047] Fourthly, embodiments of this application provide a storage medium storing a computer program, which, when executed by a processor, performs the steps of the motor stall handling method described in the first aspect.

[0048] The beneficial effects of this application are:

[0049] This application provides a method, apparatus, device, and storage medium for handling motor stall. The method includes: acquiring the actual active current of the motor according to a first preset sampling period; if the number of times the actual active current of the motor increases continuously exceeds a first preset number threshold, determining the current threshold corresponding to the current posture of the object on which the motor is installed; and determining whether the motor is in a stall state based on the current threshold and the actual active current of the motor.

[0050] The motor stall handling method provided in this application can, when the actual active current of the motor increases more than a first preset threshold number of times (i.e., when the actual active current of the motor is abnormal), acquire the current posture of the object on which the motor is installed. Based on the comparison between the current threshold corresponding to the current posture and the actual active current of the motor, it can be determined whether the motor is in a stall state. In other words, the current threshold is dynamically changing and related to the current posture of the object on which the motor is installed. Using a matched current threshold to determine whether the motor is in a stall state improves the accuracy of determining whether the motor is in a stall state. Attached Figure Description

[0051] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0052] Figure 1 A schematic flowchart illustrating a motor stall handling method provided in an embodiment of this application;

[0053] Figure 2 A schematic flowchart illustrating another method for handling motor stall provided in this application embodiment;

[0054] Figure 3 A flowchart illustrating another method for handling motor stall provided in this application embodiment;

[0055] Figure 4 A schematic flowchart illustrating another method for handling motor stall provided in this application embodiment;

[0056] Figure 5 A flowchart illustrating another method for handling motor stall provided in this application embodiment;

[0057] Figure 6 This is a schematic flowchart of a motor stall handling device provided in an embodiment of this application;

[0058] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0059] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of this application, but not all embodiments.

[0060] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.

[0061] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0062] The following is an example illustration of the motor stall handling method mentioned in this application, with reference to the accompanying drawings. Figure 1 This is a flowchart illustrating a method for handling motor stall provided in an embodiment of this application, as shown below. Figure 1 As shown, the method may include:

[0063] S101. Obtain the actual active current of the motor according to the first preset sampling period.

[0064] The controller can be connected to the motor via a motor driver. The motor driver can drive the motor to run based on the instructions sent by the controller. During the operation of the motor, the current sampling unit in the motor driver can sample the operating current of the motor according to a first preset sampling period to obtain the actual active current of the motor. The first preset sampling period is, for example, 200ms, which can be set according to actual needs. This application does not limit it.

[0065] S102. If the number of times the actual active current of the motor increases continuously exceeds the first preset number threshold, then determine the current threshold corresponding to the current posture of the object on which the motor is installed.

[0066] The first preset threshold number of times can be set according to actual needs, such as 5 times or 6 times; this application does not limit it. The actual active current of the motor currently sampled is compared with the actual active current of the motor sampled previously. If the comparison result indicates that the current actual active current is greater than the previous actual active current, the current increase count can be incremented by 1. If the comparison result indicates that the current actual active current is less than the previous actual active current, the current increase count can be reset to zero.

[0067] When the number of times the current increases is greater than or equal to a first preset threshold, meaning the number of times the actual active current of the motor continuously increases exceeds the first preset threshold, it indicates an abnormality in the actual active current of the motor. In the event of an abnormality in the actual active current of the motor, the current posture of the object (such as a walking robot) can be obtained through an attitude sensor installed on the object. The current posture may include climbing, flat road conditions, etc., and this application does not limit this. The correspondence between the object's posture and the current threshold can be pre-stored in the memory. After the object's posture is determined, the current threshold can be obtained based on this correspondence.

[0068] S103. Based on the current threshold and the actual active current of the motor, determine whether the motor is in a stalled state.

[0069] Once the current threshold is determined, it can be compared with the actual active current of the motor. The comparison result determines whether the motor is in a stalled state. In one feasible embodiment, when the comparison result indicates that the actual active current of the motor is greater than the current threshold, it means the motor is in a stalled state; when the comparison result indicates that the actual active current of the motor is not greater than the current threshold, it means the motor is not in a stalled state. In another feasible embodiment, the stalled state can be determined based on the comparison result and the number of times the motor is stalled.

[0070] For example, suppose the current threshold corresponding to the climbing state is 8A and the current threshold corresponding to the flat road state is 3A. When the attitude sensor indicates that the current attitude of the walking robot is climbing, then 8A can be used as the current threshold, and the actual active current of the motor can be compared with 8A to obtain the comparison result. When the attitude sensor indicates that the current attitude of the walking robot is flat road, then 3A can be used as the current threshold, and the actual active current of the motor can be compared with 3A to obtain the comparison result.

[0071] In summary, the motor stall handling method provided in this application, when the actual active current of the motor increases more than a first preset threshold number of times (i.e., when the actual active current of the motor is abnormal), acquires the current posture of the object on which the motor is installed. Based on the comparison between the current threshold corresponding to the current posture and the actual active current of the motor, it is determined whether the motor is in a stall state. In other words, the current threshold is dynamically changing and related to the current posture of the object on which the motor is installed. Using a matched current threshold to determine whether the motor is in a stall state improves the accuracy of determining whether the motor is in a stall state.

[0072] Figure 2 This is a schematic flowchart illustrating another method for handling motor stall provided in an embodiment of this application. Optionally, as... Figure 2 As shown, the above method of determining whether the motor is in a stalled state based on the current threshold and the actual active current of the motor includes:

[0073] S201. Obtain the actual active current of the motor according to the second preset sampling period.

[0074] The duration of the second preset sampling period is shorter than that of the first preset sampling period. For example, the second preset sampling period can be 100ms and the first preset sampling period can be 200ms. It should be noted that this application does not limit the second preset sampling period and the first preset sampling period, as long as the above relationship is satisfied.

[0075] For example, the actual active current of the motor can be sampled in the first preset sampling period and compared with the first preset number threshold to determine whether the actual active current of the motor is abnormal. If the actual active current is abnormal, the first preset sampling period can be adjusted to the second preset sampling period, and the actual active current of the motor can be sampled using the second preset sampling period. That is, the actual active current of the motor is sampled with more fine granularity. This can avoid the phenomenon of missing the detection of motor stall and improve the accuracy of determining that the motor is in a stall state.

[0076] S202. If the number of times the actual active current of the motor exceeds the current threshold exceeds the second preset number threshold, then the motor is determined to be in a stalled state.

[0077] In one feasible embodiment, the actual active current of the motor currently sampled can be compared with the current threshold corresponding to the current attitude. If the comparison result indicates that the actual active current of the motor is greater than the current threshold, the counter is incremented by 1. If the comparison result indicates that the actual active current of the motor is less than the current threshold, the counter is cleared to zero.

[0078] It is understood that the counter value can be used to indicate the number of times the actual active current of the motor is continuously greater than the current threshold. When the counter value is greater than or equal to the second preset number threshold, it means that the motor is in a stalled state. The second preset number threshold may be the same as or different from the first preset number threshold mentioned above. This application does not limit this.

[0079] It can be seen that by adjusting the first preset sampling period to the second preset sampling period and adding the number of times judgment, the omission or misjudgment of motor stall can be effectively avoided.

[0080] Figure 3 This is a schematic flowchart illustrating another method for handling motor stall provided in an embodiment of this application. Optionally, as... Figure 3 As shown, the above method of determining whether the motor is in a stalled state based on the current threshold and the actual active current of the motor includes:

[0081] S301. Obtain the actual active current of the motor according to the first preset sampling period.

[0082] S302. If the number of times the actual active current of the motor exceeds the current threshold exceeds the third preset number threshold, then the motor is determined to be in a stalled state.

[0083] As described above, if the number of times the actual active current of the motor sampled using the first preset sampling period increases exceeds the first preset number threshold, it indicates that the actual active current of the motor is abnormal. Then, the actual active current of the motor can be obtained again using the first preset sampling period, and then the number of times can be judged to determine whether the motor is in a stalled state. Specifically, the counter value mentioned above can be compared with the third preset number threshold, which can effectively avoid misjudging the motor stall.

[0084] It should be noted that the third preset number of times threshold may be the same as or different from the first preset number of times threshold mentioned above, and this application does not limit it.

[0085] Figure 4 This is a schematic flowchart illustrating another method for handling motor stall provided in an embodiment of this application. Optionally, as... Figure 4 As shown, the above method of determining whether the motor is in a stalled state based on the current threshold and the actual active current of the motor includes:

[0086] S401. Based on the current threshold and the actual active current of the motor, determine whether the motor is in a standby stall state.

[0087] The actual active current of the motor can be obtained according to the first preset sampling period or the second preset sampling period, and this application does not limit it.

[0088] In one feasible embodiment, the motor can be determined to be in a candidate stall state when the actual active current of the motor is greater than the current threshold. In another feasible embodiment, a count determination is introduced; the motor can be determined to be in a candidate stall state when the number of times the actual active current of the motor is greater than the current threshold exceeds a second preset count threshold.

[0089] S402. If the motor is in a standby stall state, adjust the maximum current of the motor to the first preset current and determine whether the position value of the motor has changed.

[0090] When the motor is in the standby stall state, the controller can limit the maximum current of the motor to a first preset current through the motor driver. It is understood that different motors correspond to different preset maximum currents. For example, the first preset current can be 70% of the preset maximum current. This application does not limit it. When the motor is in the standby stall state, by reducing the maximum current of the motor, the motor enters the protection state, which can avoid damage to the motor.

[0091] The position value of a motor can be described by the number of revolutions it has made, which can be obtained through a motor driver. In one feasible embodiment, the number of motor revolutions, i.e., the position value of the motor, can be obtained according to a second preset sampling period, and the position value of the motor can be determined based on a comparison between the current position value and the previous position value.

[0092] S403. If the position value of the motor does not change, then the motor is determined to be in a stalled state.

[0093] If the comparison between the current motor position value and the previous motor position value indicates that the current motor position value is the same as the previous motor position value, it means that the position value of the motor has not changed. In other words, the motor is no longer rotating, and it can be determined that the motor is in a stalled state.

[0094] It can be seen that incorporating the motor's position value into the mechanism for determining motor stall can improve the accuracy of motor stall detection.

[0095] Optionally, the method may further include: if the position value of the motor changes, determining whether the number of consecutive changes in the position value of the motor is greater than a fourth preset number threshold; if so, determining that the motor is in a stalled state.

[0096] If the comparison result between the current motor position value and the previous motor position value indicates that the current motor position value is different from the previous motor position value, it means that the position value of the motor has changed. Then, the number of consecutive changes in the position value of the motor can be counted and compared with the fourth preset number threshold. If the number is greater than the fourth preset number threshold, then it can be determined that the motor is in a stalled state.

[0097] The fourth preset number of times threshold is generally greater than the first preset number of times threshold, the second preset number of times threshold and the third preset number of times threshold mentioned above, such as 20 times.

[0098] It can be seen that incorporating the motor's position value and the number of consecutive changes in the position value into the judgment mechanism for motor stall can improve the accuracy of motor stall judgment.

[0099] Optionally, the method may further include: determining whether the object is in a climbing state based on the current posture of the object on which the motor is installed; if so, and the actual active current of the motor is less than the current threshold, then determining whether the actual active current of the motor continues to decrease; if so, and the actual active current of the motor decreases to a normal preset current range, then determining whether the object has completed the climbing based on the current posture of the object.

[0100] Specifically, the current attitude of the object can be determined based on the angle information obtained from the attitude sensor installed on the object. When the angle information indicates that the current attitude is in a climbing state, it can be determined that the object is in a climbing state. When the object is in a climbing state, the actual active current of the motor is compared with the current threshold (e.g., 8A) corresponding to the climbing state. If it is less than 8A, the currently sampled actual active current of the motor is compared with the previously sampled actual active current of the motor. If the number of times the actual active current of the motor decreases continuously exceeds a first preset number threshold, it is determined that the actual active current of the motor is continuously decreasing.

[0101] When the actual active current of the motor continues to decrease, the currently sampled actual active current of the motor can be compared with the normal preset current range. The normal preset current range can be related to the current threshold (e.g., 3A) corresponding to the flat road state mentioned above. That is, when the currently sampled actual active current of the motor is 3A, it indicates that the object is in a state of waiting to complete the climb. Then, the current attitude is determined by the angle information obtained from the current attitude sensor. If the current attitude indicates whether the object has completed the climb, then the object in the state of waiting to complete the climb is determined to have completed the climb.

[0102] It can be seen that by comprehensively judging whether the object has completed the climb by combining the actual active current and the current attitude, the accuracy of determining the current attitude of the object can be improved.

[0103] The following examples illustrate how to handle a stalled motor.

[0104] Figure 5 This is a flowchart illustrating another method for handling motor stall provided in an embodiment of this application.

[0105] Optionally, such as Figure 5 As shown, the method may further include:

[0106] S501. If the motor is in a stalled state, stop the motor from rotating and adjust the maximum current of the motor to the second preset current.

[0107] When the motor is in a stalled state, the motor can be stopped by the motor driver. As can be seen from the above description, different motors correspond to different preset maximum currents. For example, the second preset current can be 50% of the preset maximum current, but this application does not impose any limitation on it.

[0108] When a motor is in a stalled state, reducing the maximum current of the motor will put it into a protective state, thus preventing damage to the motor.

[0109] S502, Drive the motor to move in the opposite direction and determine whether the position value of the motor has changed.

[0110] Based on the maximum current of the motor being the second preset current, and simultaneously sending a reverse motion command to the motor through the motor driver, during the reverse motion of the motor, the number of motor revolutions, i.e. the position value of the motor, can be obtained through the motor driver. Based on the comparison result between the current position value of the motor and the previous position value of the motor, it is determined whether the position value of the motor has changed.

[0111] S503. If the position value of the motor does not change, adjust the maximum current of the motor to the third preset current and control the object to enter the sleep state.

[0112] If the comparison between the current motor position value and the previous motor position value indicates that the current motor position value is the same as the previous motor position value, it means that the motor position value has not changed, i.e., the motor is not rotating in reverse. In other words, if the motor is not rotating in either direction, the maximum current of the motor can be further limited, adjusted to a third preset current. This third preset current is related to the maximum current of the motor and can be a range, i.e., a pre-set safe current value range. The third preset current can be less than the second preset current mentioned above.

[0113] After adjusting the motor's maximum current to the third preset current, the object can be controlled to enter a sleep state via the motor driver.

[0114] It can be seen that the method of limiting the current value and moving in reverse after the motor is stalled can ensure that the motor current will not remain at the high current state when stalled. At the same time, during reverse movement, it is necessary to continue to judge whether there is a stall situation. If so, the motor current is further limited to ensure the safety of the motor.

[0115] Optionally, the method may further include: if the position value of the motor changes, controlling the object to move to a preset position and controlling the object to enter a sleep state.

[0116] If the comparison result between the current motor position value and the previous motor position value indicates that the current motor position value is different from the previous motor position value, it means that the position value of the motor has changed. The object can be controlled to move to the preset position through the motor driver. When the object moves to the preset position, the object can be controlled to enter the sleep state.

[0117] Figure 6 This is a schematic flowchart of a motor stall handling device provided in an embodiment of this application. Optionally, as... Figure 6 As shown, the device may include:

[0118] The acquisition module 601 is used to acquire the actual active current of the motor according to the first preset sampling period;

[0119] The first determining module 602 is used to determine the current threshold corresponding to the current posture of the object on which the motor is installed if the number of times the actual active current of the motor increases continuously exceeds a first preset number threshold.

[0120] The second determining module 603 is used to determine whether the motor is in a stalled state based on the current threshold and the actual active current of the motor.

[0121] Optionally, the second determining module 603 is specifically used to obtain the actual active current of the motor according to a second preset sampling period, the duration of which is less than the duration of the first preset sampling period; if the number of times the actual active current of the motor is greater than the current threshold exceeds the second preset number threshold, then the motor is determined to be in a stalled state.

[0122] Optionally, the second determining module 603 is further specifically used to obtain the actual active current of the motor according to the first preset sampling period; if the number of times the actual active current of the motor is greater than the current threshold exceeds the third preset number threshold, then the motor is determined to be in a stalled state.

[0123] Optionally, the second determining module 603 is further specifically used to determine whether the motor is in a candidate stall state based on the current threshold and the actual active current of the motor; if the motor is in a candidate stall state, the maximum current of the motor is adjusted to the first preset current, and it is determined whether the position value of the motor has changed, wherein the first preset current is less than the preset maximum current of the motor; if the position value of the motor has not changed, it is determined that the motor is in a stall state.

[0124] Optionally, the second determining module 603 is further configured to determine whether the number of consecutive changes in the position value of the motor is greater than a fourth preset number threshold if the position value of the motor changes; if so, determine that the motor is in a stalled state.

[0125] Optionally, the first determining module 602 is further configured to determine whether the object is in a climbing state based on the current posture of the object on which the motor is installed; if so, and the actual active current of the motor is less than the current threshold, then determine whether the actual active current of the motor continues to decrease; if so, and the actual active current of the motor decreases to the normal preset current range, then determine whether the object has completed the climbing based on the current posture of the object.

[0126] Optionally, the device also includes a control module;

[0127] This control module is used to stop the motor from rotating if the motor is in a stalled state, and adjust the maximum current of the motor to a second preset current; drive the motor to move in the opposite direction, and determine whether the position value of the motor has changed; if the position value of the motor has not changed, adjust the maximum current of the motor to a third preset current, and control the object to enter a sleep state.

[0128] Optionally, the control module is also used to move the controlled object to a preset position and put the controlled object into a sleep state if the position value of the motor changes.

[0129] The above-described device is used to execute the method provided in the foregoing embodiments, and its implementation principle and technical effect are similar, so they will not be described again here.

[0130] These modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more Digital Signal Processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs). Alternatively, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these modules can be integrated together as a system-on-a-chip (SoC).

[0131] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, such as... Figure 7 As shown, the electronic device may include a processor 701, a storage medium 702, and a bus 703. The storage medium 702 stores machine-readable instructions executable by the processor 701. When the electronic device is running, the processor 701 communicates with the storage medium 702 via the bus 703, and the processor 701 executes the machine-readable instructions to perform the steps of the above method embodiment. The specific implementation and technical effects are similar and will not be described in detail here.

[0132] Optionally, this application also provides a storage medium storing a computer program, which is executed by a processor to perform the steps of the above method embodiments.

[0133] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the indirect coupling or communication connection of the apparatus or units can be electrical, mechanical, or other forms.

[0134] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0135] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in a combination of hardware and software functional units.

[0136] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0137] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0138] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application. It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need further definition and explanation in subsequent figures. The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for handling motor stall, characterized in that, The method includes: The actual active current of the motor is obtained according to the first preset sampling period; If the number of times the actual active current of the motor increases continuously exceeds the first preset number threshold, the current posture of the object on which the motor is installed is obtained, and the current threshold corresponding to the current posture of the object on which the motor is installed is determined according to the pre-stored correspondence between posture and current threshold. Based on the current threshold and the actual active current of the motor, determine whether the motor is in a stalled state.

2. The method according to claim 1, characterized in that, The step of determining whether the motor is in a stalled state based on the current threshold and the actual active current of the motor includes: The actual active current of the motor is obtained according to a second preset sampling period, wherein the duration of the second preset sampling period is less than the duration of the first preset sampling period. If the number of times the actual active current of the motor exceeds the current threshold exceeds the second preset threshold, then the motor is determined to be in a stalled state.

3. The method according to claim 1, characterized in that, The step of determining whether the motor is in a stalled state based on the current threshold and the actual active current of the motor includes: The actual active current of the motor is obtained according to the first preset sampling period; If the number of times the actual active current of the motor exceeds the current threshold exceeds a third preset threshold, then the motor is determined to be in a stalled state.

4. The method according to claim 1, characterized in that, The step of determining whether the motor is in a stalled state based on the current threshold and the actual active current of the motor includes: Based on the current threshold and the actual active current of the motor, determine whether the motor is in a standby stall state; If the motor is in a standby stall state, the maximum current of the motor is adjusted to a first preset current, and it is determined whether the position value of the motor has changed. The first preset current is less than the preset maximum current of the motor. If the position value of the motor does not change, then the motor is determined to be in a stalled state.

5. The method according to claim 4, characterized in that, The method further includes: If the position value of the motor changes, it is determined whether the number of consecutive changes in the position value of the motor is greater than a fourth preset threshold number. If so, then the motor is determined to be in a stalled state.

6. The method according to claim 1, characterized in that, The method further includes: Determine whether the object is in a climbing state based on the current posture of the object on which the motor is installed; If so, and the actual active current of the motor is less than the current threshold, then determine whether the actual active current of the motor continues to decrease; If so, and the actual active current of the motor decreases to the normal preset current range, then determine whether the object has completed the climb based on the object's current posture.

7. The method according to any one of claims 1-6, characterized in that, The method further includes: If the motor is in a stalled state, stop the motor from rotating and adjust the maximum current of the motor to the second preset current; Drive the motor to move in the opposite direction and determine whether the position value of the motor has changed; If the position value of the motor does not change, the maximum current of the motor is adjusted to the third preset current, and the object is controlled to enter a sleep state.

8. The method according to claim 7, characterized in that, The method further includes: If the position value of the motor changes, the object is controlled to move to a preset position and then enter a sleep state.

9. A motor stall handling device, characterized in that, The device includes: The acquisition module is used to acquire the actual active current of the motor according to the first preset sampling period; The first determining module is used to obtain the current posture of the object on which the motor is installed if the number of times the actual active current of the motor increases continuously exceeds a first preset number threshold, and determine the current threshold corresponding to the current posture of the object on which the motor is installed according to the pre-stored correspondence between posture and current threshold. The second determining module is used to determine whether the motor is in a stalled state based on the current threshold and the actual active current of the motor.

10. An electronic device, characterized in that, include: The electronic device includes a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the motor stall handling method as described in any one of claims 1-8.

11. A storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, performs the steps of the motor stall handling method as described in any one of claims 1-8.