Position Detection Method and Device, Electronic Device, Computer Readable Storage Medium

The position sequence at the output end of the actuator is calculated by two single-turn encoders, which solves the problem that the multi-turn absolute position encoder cannot be used normally after a long shutdown, and achieves a high accuracy and low-cost position detection method.

CN119526482BActive Publication Date: 2025-06-10PNDBOTICS (NINGBO) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411562613.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-04
Publication Date
2025-06-10
Estimated Expiration
2044-11-04

AI Technical Summary

Technical Problem

The existing multi-turn absolute position encoder cannot be used normally due to battery energy exhaustion after a long shutdown, and is relatively expensive, which affects the high-integration design and use scenarios of the robot.

Method used

By using two single-turn encoders (first encoder and second encoder), the position sequence of the actuator output is calculated based on their current position and the pre-calculated maximum number of output turns, thereby obtaining the actual position of the actuator output.

Benefits of technology

It realizes accurate calculation of the actual position of the actuator output without the need for additional power supply circuits and batteries, improving the reliability and accuracy of position detection, and reducing system complexity and cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119526482B_ABST
    Figure CN119526482B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the field of robotics, and particularly to a position detection method. Specifically, it includes: calculating a first position sequence of the output end of the actuator based on the current position of the first encoder and the pre-calculated maximum number of output turns; calculating a second position sequence of the output end of the actuator based on the current position of the second encoder and the maximum number of output turns; obtaining the actual position of the output end of the actuator based on the first position sequence and the second position sequence, reducing the cost of the joint actuator.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of robotics, and in particular, to a position detection method and device, an electronic device, and a computer-readable storage medium. Background Art

[0002] The robotic motion joints need to be installed with integrated actuators to complete the motion commands of the master control unit. For the joint actuators, in addition to providing sufficient torque, humanoid robots have higher requirements for the motion accuracy, size, structural stability, etc. of the joint actuators. The motion accuracy of a humanoid robot depends on the accuracy of each actuator. On the basis of having the best-precision mechanical parts, the control accuracy of each actuator must rely on the accurate position feedback of the encoder for the motion in order to obtain the high-precision motion of the overall robot.

[0003] The position information of the output end of the joint actuator can be obtained by an encoder. According to the signal principle, the encoders are divided into incremental encoders and absolute encoders. Each position of the absolute encoder corresponds to a definite digital code. Therefore, its indication value is only related to the starting and ending positions of the measurement, and has nothing to do with the intermediate process of the measurement. The incremental encoder can output the incremental change of the encoder from the predefined starting position. Therefore, an absolute encoder is usually required at the output end of the joint actuator to obtain the position information. The absolute position encoder can be divided into a single-turn absolute position encoder and a multi-turn position encoder according to the test range. For the single-turn absolute position encoder, when the rotation exceeds 360°, the encoding returns to the origin, which does not conform to the principle of the uniqueness of the absolute encoding. Therefore, such encoding can only be used for measurements within the rotation range of 360°. If it is necessary to measure the rotation range exceeding 360°, a multi-turn absolute value encoder is required. Although the multi-turn absolute value encoder can realize the measurement of the position information within the multi-turn range, it usually adds an additional power supply circuit and a storage battery, resulting in an increase in the volume of the joint actuator, which is not conducive to the highly integrated design of the joint actuator. Since the multi-turn absolute position encoder usually needs to be continuously powered to record the current absolute position, it cannot be used normally when the joint actuator stops for a long time and the energy of the storage battery in the multi-turn absolute encoder is exhausted, and it cannot meet the increasingly rich usage scenarios of the robot. In addition, the price of the multi-turn absolute position encoder is relatively high compared with that of the single-turn encoder. Summary of the Invention

[0004] The present disclosure provides a position detection method and device, an electronic device, and a computer-readable storage medium.

[0005] According to one aspect of the present disclosure, a position detection method is provided. The method includes: calculating a first position sequence of an actuator output end based on the current position of a first encoder and a pre-calculated maximum output number of turns, where the maximum output number of turns is the number of turns of the actuator output end when the second encoder and the first encoder rotate an integer number of turns and the number of turns of the actuator output end corresponding to the first encoder and the second encoder is exactly the same, and the actuator output end is respectively connected to the first encoder and the second encoder; calculating a second position sequence of the actuator output end based on the current position of the second encoder and the maximum output number of turns; and obtaining the actual position of the actuator output end based on the first position sequence and the second position sequence.

[0006] According to a second aspect of the present disclosure, a position detection device is provided. The device includes: a first sequence calculation unit configured to calculate a first position sequence of an actuator output end based on the current position of a first encoder and a pre-calculated maximum output number of turns, where the maximum output number of turns is the number of turns of the actuator output end when the second encoder and the first encoder rotate an integer number of turns and the number of turns of the actuator output end corresponding to the first encoder and the second encoder is exactly the same, and the actuator output end is respectively connected to the first encoder and the second encoder; a second sequence calculation unit configured to calculate a second position sequence of the actuator output end based on the current position of the second encoder and the maximum output number of turns; and an obtaining unit configured to obtain the actual position of the actuator output end based on the first position sequence and the second position sequence.

[0007] According to a third aspect of the present disclosure, an electronic device is provided, including at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method according to any one of the first aspect.

[0008] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, and the computer instructions are used to cause a computer to execute the method according to any one of the first aspect.

[0009] The position detection method provided by the present disclosure first calculates the first position sequence of the actuator output end based on the current position of the first encoder and the pre-calculated maximum output turns. The maximum output turns are the turns of the actuator output end that make the rotation turns of the first encoder and the second encoder equal. The actuator output end is respectively connected to the first encoder and the second encoder. Secondly, the second position sequence of the actuator output end is calculated based on the current position of the second encoder and the maximum output turns. Finally, the actual position of the actuator output end is obtained based on the first position sequence and the second position sequence. Thus, through the maximum output turns of the actuator output end, the first position sequence of the first encoder, and the second position sequence of the second encoder, the actual position of the actuator output end is obtained, providing a reliable implementation method for calculating the actual position of the actuator output end by two single-turn encoders, and improving the reliability and accuracy of obtaining the actual position of the actuator output end.

[0010] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The drawings are used to better understand the solution and do not constitute a limitation to the present disclosure. Among them:

[0012] Figure 1 is a flowchart according to an embodiment of the position detection method of the present disclosure;

[0013] Figure 2a is an isometric view of the first encoder, the second encoder and the actuator connected in an embodiment of the present disclosure;

[0014] Figure 2b is the above Figure 2a sectional view;

[0015] Figure 3 is another structural schematic diagram of the first encoder, the second encoder and the actuator connected in an embodiment of the present disclosure;

[0016] Figure 4a is still another structural schematic diagram of the first encoder, the second encoder and the actuator connected in an embodiment of the present disclosure;

[0017] Figure 4b is the above Figure 4a sectional view;

[0018] Figure 5 is a structural schematic diagram according to an embodiment of the position detection device of the present disclosure;

[0019] Figure 6It is a block diagram of an electronic device for implementing the position detection method of the embodiments of the present disclosure. Detailed implementation manners

[0020] The following describes exemplary embodiments of the present disclosure with reference to the accompanying drawings. Various details of the embodiments of the present disclosure are included to facilitate understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0021] All technical terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" and any variations thereof in the specification and claims of this application and the above drawings are intended to cover non-exclusive inclusion.

[0022] In the description of the embodiments of this application, the term "at least one" refers to one or more, and "a plurality" refers to two or more (including two).

[0023] In the description of the embodiments of this application, the orientation or positional relationship indicated by technical terms such as "center", "longitudinal", "transverse", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc. is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the embodiments of this application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as a limitation on the embodiments of this application.

[0024] The present disclosure proposes a position detection method, which can effectively calculate the actual position output by the actuator through two encoders. Figure 1 Flow 100 according to an embodiment of the position detection method of the present disclosure is shown. The above position detection method includes the following steps:

[0025] Step 101, calculate a first position sequence at the output end of the actuator based on the current position of the first encoder and the pre-calculated maximum number of output turns.

[0026] In this embodiment, the maximum number of output turns is the number of turns of the output end of the actuator when the second encoder and the first encoder rotate an integer number of turns, and the number of turns of the output end of the actuator corresponding to the first encoder and the second encoder is exactly equal. The output end of the actuator is respectively connected to the first encoder and the second encoder.

[0027] In this embodiment, both the first encoder and the second encoder are encoders. An encoder is a sensor that converts mechanical motion into an electrical signal. It is mainly used to measure and detect parameters such as the rotational angle, linear displacement, speed, and acceleration of an object. Its functions and roles include: 1. Counting: The encoder can count by converting motion into an electrical signal. By processing the electrical signal, the position and speed of the object can be accurately determined. 2. Feedback: The encoder can provide accurate position and speed feedback so that the machine system can be adjusted and controlled in a timely manner. 3. Positioning: The encoder can determine the accurate position of the object, helping the machine system to achieve precise positioning and motion control.

[0028] In this embodiment, two encoders (the first encoder 1 and the second encoder 2) are used to calculate the absolute position of the output end of the actuator. The first encoder and the second encoder have corresponding positional relationships. Three specific structural examples are given below:

[0029] (1) The first encoder 1 is located on one side of the motor, and the first reduction ratio between the rotor 11 of the first encoder 1 and the output end of the actuator is g1 (i.e., the reduction ratio of the reducer). The stator 12 of the first encoder 1 and the output end 3 of the actuator as a whole remain relatively stationary. The second encoder 2 is located on the other side of the output end 3 of the actuator, and the reduction ratio between the rotor 21 of the second encoder 2 and the output end 3 of the actuator is g2 (i.e., the reduction ratio of the transmission belt 4). The stator 22 of the second encoder 2 and the output end 3 of the actuator as a whole remain relatively stationary. The isometric view and cross-sectional view of this structure are as shown in Figure 2a and Figure 2b shown.

[0030] (2) Both the first encoder 1' and the second encoder 2' are located on the output side of the actuator. The first encoder 1' is connected to the output end 3' of the actuator through a transmission belt, and the reduction ratio between the rotor 11' of the first encoder 1' and the output end 3' of the actuator is g1. The stator of the first encoder 1' (not shown in the figure) and the actuator as a whole remain relatively stationary. The second encoder 2' is connected to the output end 3' of the actuator through a transmission belt 4', and the reduction ratio between the rotor 21' of the second encoder 2' and the output end 3' of the actuator is g2. The stator of the second encoder 2' (not shown in the figure) and the actuator as a whole remain relatively stationary. The isometric view of this structure is as shown in Figure 3 shown.

[0031] (3) The encoder rotor M1 of the first encoder M and the encoder rotor B1 of the second encoder B are both connected to the motor rotor D1 of the motor D. The encoder stator M2 of the first encoder M is connected to the motor stator D2 of the motor, and the encoder stator B2 of the second encoder B is connected to the rotor of the reducer Q; or the encoder rotor of the first encoder and the encoder stator of the second encoder are both connected to the motor rotor, and the encoder rotor of the second encoder is connected to the rotor of the reducer (not shown in the figure). For this connection method, there is a fixed relationship between the first reduction ratio g1 between the first encoder and the actuator output end and the second reduction ratio g2 between the second encoder and the actuator output end. The schematic diagram and cross-sectional view of this structure are as shown in Figure 4a and 4b shown.

[0032] In this embodiment, the first position sequence is the position sequence of the actuator recorded by the first encoder. The first position sequence includes multiple position values of the actuator, and the number of position values is less than the maximum output rotation. That is, the first position sequence includes: the first position, the second position, the third position... the nth position, where n < N and N is the maximum output rotation. When the first initial position is zero, divide the current position of the first encoder by the first reduction ratio to obtain the first position of the first position sequence, add 360 degrees to the first position to obtain the second position, and add 360 degrees to the (n - 1)th position to obtain the nth position.

[0033] Step 102: Calculate the second position sequence of the actuator output end based on the current position of the second encoder and the maximum output rotation.

[0034] In this embodiment, the second position sequence is the position sequence of the actuator recorded by the second encoder. The second position sequence includes multiple position values of the actuator, and the number of position values is less than the maximum output rotation. That is, the second position sequence includes: the first position, the second position, the third position... the mth position, where m < N and N is the maximum output rotation. When the second initial position is zero, divide the current position of the second encoder by the second reduction ratio to obtain the first position of the second position sequence, add 360 degrees to the second position to obtain the second position, and add 360 degrees to the (m - 1)th position to obtain the mth position.

[0035] Step 103: Obtain the actual position of the actuator output end based on the first position sequence and the second position sequence.

[0036] In this embodiment, the actual position of the actuator output end is also the absolute position of the actuator output end. When both the first encoder and the second encoder output absolute positions, the actual position of the actuator output end is obtained.

[0037] In this embodiment, each value in the first position sequence is compared with each value in the second position sequence, and the unit of the value in the first position sequence that is the same as the value in the second position sequence is the actual position of the actuator output end.

[0038] The position detection method provided by the embodiment of the present disclosure first obtains the first number of rotation turns of the first encoder and the second number of rotation turns of the second encoder; secondly, based on the first number of rotation turns and the second number of rotation turns, calculates the maximum number of output turns of the actuator output end that is respectively connected to the first encoder and the second encoder; thirdly, based on the current position of the first encoder and the maximum number of output turns, calculates the first position sequence of the actuator output end; fourthly, based on the current position of the second encoder and the maximum number of output turns, calculates the second position sequence of the actuator output end; finally, based on the first position sequence and the second position sequence, obtains the actual position of the actuator output end. Thus, through the maximum number of output turns of the actuator output end, the first position sequence of the first encoder, and the second position sequence of the second encoder, the actual position of the actuator output end is obtained, providing a reliable implementation method for calculating the actual position of the actuator output end by two single-turn encoders, and improving the reliability and accuracy of obtaining the actual position of the actuator output end.

[0039] In some optional implementation manners of the present disclosure, the maximum number of output turns is calculated by the following steps: obtaining the first number of rotation turns of the first encoder and the second number of rotation turns of the second encoder; based on the first number of rotation turns and the second number of rotation turns, calculating the maximum number of output turns of the actuator output end.

[0040] In this optional implementation manner, the first encoder and the second encoder may be single-turn encoders, and the single-turn encoders may be incremental encoders or absolute encoders.

[0041] In this optional implementation manner, the first number of rotation turns is the number of turns rotated by the first encoder when it is driven by the actuator connected to the first encoder. The value of the first rotation turn may be one turn or multiple turns, and the value of the first number of rotation turns is a positive integer. The first encoder has a first initial position, which is the position of the first encoder itself recorded when it is powered on. This first initial position may be 0. Dividing the first initial position by the first reduction ratio obtains the initial position of the actuator relative to the first encoder, where the reduction ratio is the transmission ratio of the reduction device and is a type of transmission ratio; the first reduction ratio is the reduction ratio between the first encoder and the actuator.

[0042] In this alternative implementation, the second number of rotation cycles is the number of cycles rotated when the second encoder is driven by an actuator having a connection relationship with the second encoder. The value of the second number of rotation cycles can be one cycle or multiple cycles, and the value of the second number of rotation cycles is a positive integer. The second encoder has a second initial position, which is the position of the second encoder itself recorded when it is powered on. This second initial position can be 0. Divide the second initial position by the second reduction ratio to obtain the initial position of the actuator relative to the second encoder, where the second reduction ratio is the reduction ratio between the second encoder and the actuator.

[0043] In this alternative implementation, the first number of rotation cycles can be directly obtained from the first encoder; the second number of rotation cycles can be directly obtained from the second encoder.

[0044] In this alternative implementation, the output end of the actuator is generally the output end of the reducer. The output end of the reducer can be connected to the first encoder or the second encoder through a transmission mechanism, or the output end of the reducer can be connected to the first encoder or the second encoder through a mechanical structure, so that the output end of the actuator has a connection relationship with the first encoder and the second encoder respectively.

[0045] In this alternative implementation, the maximum output number of cycles is the number of cycles when the number of cycles of the actuator equivalent to the first encoder is equal to the number of cycles of the actuator equivalent to the second encoder.

[0046] In this alternative implementation, calculating the maximum output number of cycles of the output end of the actuator based on the first number of rotation cycles and the second number of rotation cycles includes: multiplying the first number of rotation cycles by the second reduction ratio to obtain the first equivalent number of cycles; multiplying the second number of rotation cycles by the first reduction ratio to obtain the second equivalent number of cycles; detecting in real time whether the first equivalent number of cycles is equal to the second equivalent number of cycles; in response to detecting that the first equivalent number of cycles is equal to the second equivalent number of cycles, dividing the first equivalent number of cycles or the second equivalent number of cycles by the comprehensive reduction ratio as the maximum output number of cycles of the output end of the actuator, where the comprehensive reduction ratio is equal to the product of the first reduction ratio and the second reduction ratio.

[0047] The method for calculating the maximum output number of cycles provided by this alternative implementation obtains the first number of rotation cycles of the first encoder and the second number of rotation cycles of the second encoder; calculating the maximum output number of cycles of the output end of the actuator based on the first number of rotation cycles and the second number of rotation cycles provides a reliable implementation for obtaining the maximum output number of cycles and improves the accuracy of obtaining the maximum output number of cycles.

[0048] In some alternative implementations of the present disclosure, calculating the maximum output turns of the actuator output end respectively connected to the first encoder and the second encoder based on the first number of rotation turns and the second number of rotation turns includes: obtaining the first execution turns of the actuator output end based on the first number of rotation turns and the first reduction ratio between the first encoder and the actuator output end; obtaining the second execution turns of the actuator output end based on the second number of rotation turns and the second reduction ratio between the second encoder and the actuator output end; determining the maximum output turns of the actuator output end based on the first execution turns and the second execution turns.

[0049] In this alternative implementation, the first execution turns are the operating turns of the actuator output end obtained based on the first number of rotation turns of the first encoder. Due to the first reduction ratio between the actuator output end and the first encoder, the first execution turns are obtained by dividing the first number of rotation turns by the first reduction ratio; the second execution turns are the operating turns of the actuator output end obtained based on the second number of rotation turns of the second encoder. Due to the second reduction ratio between the actuator output end and the second encoder, the second execution turns are obtained by dividing the second number of rotation turns by the second reduction ratio.

[0050] In this alternative implementation, compare the first execution turns with the second execution turns. When they are equal, obtain the maximum output turns of the actuator output end equal to the first execution turns or the second execution turns.

[0051] The method for calculating the maximum output turns provided in this alternative implementation first calculates the first execution turns, and then calculates the second execution turns; based on the first execution turns and the second execution turns, obtains the maximum output turns of the actuator output end, providing a reliable implementation for obtaining the maximum output turns of the actuator output end and improving the accuracy of obtaining the maximum output turns.

[0052] Optionally, calculating the maximum output turns of the actuator output end respectively connected to the first encoder and the second encoder based on the first number of rotation turns and the second number of rotation turns includes: obtaining the first reduced turns based on the first number of rotation turns; obtaining the maximum output turns of the actuator output end based on the second number of rotation turns, the first reduced turns and the second reduced turns.

[0053] In some alternative implementations of the present disclosure, obtaining the first execution turns of the actuator output end based on the first number of rotation turns and the first reduction ratio between the first encoder and the actuator output end includes: dividing the first number of rotation turns by the first reduction ratio between the first encoder and the actuator output end to obtain the first execution turns of the actuator output end.

[0054] The method for obtaining the first execution number of turns provided by this alternative implementation divides the first rotation number of turns by the first reduction ratio between the first encoder and the output end of the actuator, which can convert the output number of turns of the first encoder into the number of turns of the output end of the actuator, improving the reliability of obtaining the maximum output number of turns of the output end of the actuator.

[0055] In some alternative implementations of the present disclosure, determining the maximum output number of turns of the output end of the actuator based on the first execution number of turns and the second execution number of turns includes: detecting whether the first execution number of turns is equal to the second execution number of turns; in response to the first execution number of turns being equal to the second execution number of turns, taking the first execution number of turns as the maximum output number of turns of the output end of the actuator.

[0056] In this alternative implementation, since the first reduction ratio between the first encoder and the output end of the actuator is g1, when the first encoder rotates the first rotation number of turns n1, the number of turns N1 passed by the output end of the actuator is N1 = n1 / g1.

[0057] Since the second reduction ratio between the second encoder and the output end of the actuator is g2, when the second encoder rotates the second rotation number of turns n2, the number of turns N2 passed by the output end of the actuator is N2 = n2 / g2.

[0058] If the first encoder rotates an integer number of turns t1 (t1 is a positive integer) and the second encoder rotates an integer number of turns t2 (t2 is a positive integer), and the number of turns passed by the output end of the actuator is exactly equal, denoting N1 = N2 = N, then N is the maximum output number of turns that this absolute position detection system can detect.

[0059] The method for determining the maximum output number of turns of the output end of the actuator provided by this alternative implementation detects whether the first execution number of turns is equal to the second execution number of turns, and when the first execution number of turns is equal to the second execution number of turns, determines the maximum output number of turns of the output end of the actuator, providing a reliable implementation for obtaining the maximum output number of turns and improving the reliability of obtaining the maximum output number of turns.

[0060] Optionally, determining the maximum output number of turns of the output end of the actuator based on the first execution number of turns and the second execution number of turns includes: detecting whether the first converted number of turns is equal to the second converted number of turns; in response to the first converted number of turns being equal to the second converted number of turns, obtaining the maximum output number of turns of the output end of the actuator based on the first converted number of turns or the second converted number of turns.

[0061] In some alternative implementations of the present disclosure, calculating the first position sequence of the actuator output end based on the current position of the first encoder and the maximum number of output turns includes: obtaining the first calculated position of the actuator output end based on the current position of the first encoder and the first reduction ratio between the first encoder and the actuator output end; obtaining the first position sequence of the actuator output end based on the number of turns of the actuator output end, the maximum number of output turns, and the first calculated position.

[0062] In this alternative implementation, the positions of the first encoder, the second encoder, and the actuator output end all start moving from the zero position; when the position of the actuator output end is at the zero position, the position readings of the first encoder and the second encoder are also 0.

[0063] In this alternative implementation, the current position of the first encoder can be the current self-rotating position output by the first encoder.

[0064] In this alternative implementation, the first calculated position is the position of the actuator output end relative to the first encoder, that is, the position of the actuator output end mapped by the current position of the first encoder. Divide the first initial position by the first reduction ratio to obtain the first calculated position.

[0065] In this alternative implementation, the position of the actuator output end can be calculated from the current position of the first encoder. As shown in Equation (1), according to the current position enc1_pos of the first encoder, the number of turns n of the actuator output end, and the maximum number of output turns N, the first position sequence end_pos_1_list of the actuator output end can be calculated:

[0066] end_pos_1_list = enc1_pos / g1 + n * 2π (n = 0, 1, 2…, n < N) (1)

[0067] The method for obtaining the first position sequence provided in this alternative implementation first obtains the first calculated position based on the current position of the first encoder; based on the first calculated position, the number of turns of the actuator output end, and the maximum number of output turns, the first position sequence is obtained. Therefore, the first position sequence of the actuator output end is determined from the perspective of the first encoder, improving the reliability of obtaining the first position sequence.

[0068] In some alternative implementations of the present disclosure, calculating the second position sequence of the actuator output end based on the current position of the second encoder and the maximum number of output turns includes: obtaining the second calculated position of the actuator output end based on the current position of the second encoder and the second reduction ratio between the second encoder and the actuator output end; obtaining the second position sequence of the actuator output end based on the number of turns of the actuator output end, the maximum number of output turns, and the second calculated position.

[0069] In this alternative implementation, the positions of the first encoder, the second encoder, and the output end of the actuator all start moving from the zero position; when the position of the output end of the actuator is at the zero position, the position readings of the first encoder and the second encoder are also 0.

[0070] In this alternative implementation, the current position of the second encoder can be the current self-rotating position output by the second encoder.

[0071] In this alternative implementation, the second calculated position is the position of the output end of the actuator relative to the second encoder, that is, the position of the output end of the actuator mapped by the current position of the second encoder. Divide the second initial position by the second reduction ratio to obtain the second calculated position.

[0072] In this alternative implementation, the position of the output end of the actuator can be calculated from the current position of the second encoder, as shown in Equation (2). According to the current position enc2_pos of the second encoder, the number of turns n of the output end of the actuator, and the maximum number of output turns N, the second position sequence end_pos_2_list of the output end of the actuator can be calculated:

[0073] end_pos_2_list = enc2_pos / g1 + n * 2π (n = 0, 1, 2…, n < N) (2)

[0074] The method for obtaining the second position sequence provided by this alternative implementation first obtains the second calculated position based on the current position of the second encoder; based on the second calculated position, the number of turns of the output end of the actuator, and the maximum number of output turns, the second position sequence is obtained. Therefore, the second position sequence of the output end of the actuator is determined from the perspective of the second encoder, improving the reliability of obtaining the second position sequence.

[0075] In some alternative implementations of the present disclosure, obtaining the actual position of the output end of the actuator based on the first position sequence and the second position sequence includes: for each unit in the first position sequence, detecting whether the value of the unit is equal to the values of each unit in the second position sequence; in response to detecting that the value of the unit is equal to the value of the unit in the second position sequence, using the value of the unit as the actual position of the output end of the actuator.

[0076] In this alternative implementation, a unit in the first position sequence refers to a position in the first position sequence. For example, if the first position sequence has five positions, then the units in the first position sequence are positions, and each unit is a position.

[0077] In this alternative implementation, a unit in the second position sequence refers to a position in the second position sequence. For example, if the second position sequence has five positions, then the units in the second position sequence are positions, and each unit is a position.

[0078] The method for obtaining the actual position of the actuator output end provided by this alternative implementation compares the units in the first position sequence with each unit in the second position sequence respectively. When the unit in the first position sequence is equal to any unit in the second position sequence, the value of this unit is used as the actual position of the actuator output end, providing a reliable implementation for obtaining the actual position of the actuator output end and improving the accuracy of obtaining the actual position of the actuator output end.

[0079] In some alternative implementations of the present disclosure, obtaining the actual position of the actuator output end based on the first position sequence and the second position sequence includes: respectively detecting whether the value of each unit in the second position sequence is equal to the value of each unit in the first position sequence; in response to detecting that the value of this unit is equal to the value of the unit in the first position sequence, using the value of this unit as the actual position of the actuator output end.

[0080] The method for obtaining the actual position of the actuator output end provided by this alternative implementation compares the units in the second position sequence with each unit in the first position sequence respectively. When the unit in the second position sequence is equal to any unit in the first position sequence, the value of this unit is used as the actual position of the actuator output end, providing another reliable implementation for obtaining the actual position of the actuator output end and improving the accuracy of obtaining the actual position of the actuator output end.

[0081] Further referring to Figure 5 , as an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a position detection device. This device embodiment corresponds to the method embodiment shown in Figure 5 , and this device can be specifically applied to various electronic devices.

[0082] As shown in Figure 5 , the position detection device 500 provided in this embodiment includes: a first sequence calculation unit 501, a second sequence calculation unit 502, and an obtaining unit 503. Among them, the above first sequence calculation unit 501 can be configured to calculate the first position sequence of the actuator output end based on the current position of the first encoder and the pre-calculated maximum output turns. The maximum output turns is the number of turns of the actuator output end when the second encoder and the first encoder rotate an integer number of turns, and the number of turns of the actuator output end corresponding to the first encoder and the second encoder is exactly equal. The actuator output end is respectively connected to the first encoder and the second encoder. The above second sequence calculation unit 502 can be configured to calculate the second position sequence of the actuator output end based on the current position of the second encoder and the maximum output turns. The above obtaining unit 503 can be configured to obtain the actual position of the actuator output end based on the first position sequence and the second position sequence.

[0083] In this embodiment, in the position detection device 500: for the first sequence calculation unit 501 and the second sequence calculation unit 502, the specific processing of the obtaining unit 503 and the technical effects brought thereby can be respectively referred to Figure 1 the relevant descriptions of steps 101, 102, and 103 in the corresponding embodiments, which will not be elaborated here.

[0084] In some alternative implementation manners of the present disclosure, the maximum output number of turns is calculated by the following units: an obtaining unit (not shown in the figure) and a number-of-turns calculation unit (not shown in the figure). Among them, the obtaining unit is configured to: obtain the first number of turns of rotation of the first encoder and the second number of turns of rotation of the second encoder. The number-of-turns calculation unit is configured to: calculate the maximum output number of turns of the output end of the actuator based on the first number of turns of rotation and the second number of turns of rotation.

[0085] In some alternative implementation manners of the present disclosure, the number-of-turns calculation unit is further configured to: obtain the first execution number of turns of the output end of the actuator based on the first number of turns of rotation and the first reduction ratio between the first encoder and the output end of the actuator; obtain the second execution number of turns of the output end of the actuator based on the second number of turns of rotation and the second reduction ratio between the second encoder and the output end of the actuator; determine the maximum output number of turns of the output end of the actuator based on the first execution number of turns and the second execution number of turns.

[0086] In some alternative implementation manners of the present disclosure, the number-of-turns calculation unit is further configured to: divide the first number of turns of rotation by the first reduction ratio between the first encoder and the output end of the actuator to obtain the first execution number of turns of the output end of the actuator.

[0087] In some alternative implementation manners of the present disclosure, the number-of-turns calculation unit is further configured to: detect whether the first execution number of turns is equal to the second execution number of turns; in response to the first execution number of turns being equal to the second execution number of turns, use the first execution number of turns as the maximum output number of turns of the output end of the actuator.

[0088] In some alternative implementation manners of the present disclosure, the first sequence calculation unit 501 is configured to: obtain the first calculated position of the output end of the actuator based on the current position of the first encoder and the first reduction ratio between the first encoder and the output end of the actuator; obtain the first position sequence of the output end of the actuator based on the number of turns of rotation of the output end of the actuator, the maximum output number of turns, and the first calculated position.

[0089] In some alternative implementations of the present disclosure, the above-mentioned second sequence calculation unit 502 is configured to: obtain a second calculated position of the actuator output end based on the current position of the second encoder and the second reduction ratio between the second encoder and the actuator output end; obtain a second position sequence of the actuator output end based on the number of rotation turns of the actuator output end, the maximum output turns, and the second calculated position.

[0090] In some alternative implementations of the present disclosure, the above-mentioned obtaining unit 503 is configured to: respectively detect whether the value of a unit in the first position sequence is equal to the values of each unit in the second position sequence; in response to detecting that the value of the unit is equal to the value of a unit in the second position sequence, use the value of the unit as the actual position of the actuator output end.

[0091] In some alternative implementations of the present disclosure, the above-mentioned obtaining unit 503 is configured to include: respectively detect whether the value of a unit in the second position sequence is equal to the values of each unit in the first position sequence; in response to detecting that the value of the unit is equal to the value of a unit in the first position sequence, use the value of the unit as the actual position of the actuator output end.

[0092] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision, and disclosure of the user's personal information involved all comply with the provisions of relevant laws and regulations and do not violate public order and good customs.

[0093] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0094] Figure 6 A schematic block diagram of an exemplary electronic device 600 that can be used to implement the embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, a personal digital processor, a cellular phone, a smart phone, a wearable device, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0095] As Figure 6As shown, device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0096] Multiple components in the device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a magnetic disk, an optical disc, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0097] The computing unit 601 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 601 include but are not limited to a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 601 executes the various methods and processes described above, such as the position detection method. For example, in some embodiments, the position detection method can be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as the storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the position detection method described above can be executed. Alternatively, in other embodiments, the computing unit 601 can be configured to execute the position detection method by any other appropriate means (e.g., by means of firmware).

[0098] The various embodiments of the systems and techniques described above in this specification can be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems-on-chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that receives data and instructions from, and transmits data and instructions to, a storage system, at least one input device, and at least one output device.

[0099] The program code for implementing the methods of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable location detection device, such that the program codes, when executed by the processor or controller, cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on the remote machine or server.

[0100] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, 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 foregoing.

[0101] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and the input received from the user can be in any form (including acoustic input, speech input, or tactile input).

[0102] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), and the Internet.

[0103] A computer system can include a client and a server. The client and the server are generally far from each other and typically interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, or a server of a distributed system, or a server incorporating a blockchain.

[0104] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in this disclosure can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and no limitation is imposed herein.

[0105] The above specific embodiments do not constitute a limitation on the protection scope of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the protection scope of this disclosure.

Claims

1. A position detection method, characterized in that: The method comprises: Based on the current position of the first encoder and the pre-calculated maximum number of output turns, a first position sequence of the actuator output end is calculated, wherein the maximum number of output turns is the number of turns of the actuator output end when the second encoder and the first encoder rotate an integer number of turns, and the number of turns of the actuator output end corresponding to the first encoder is exactly equal to the number of turns of the actuator output end corresponding to the second encoder, and the actuator output end is connected to the first encoder and the second encoder respectively; the first position sequence is a position sequence of the actuator recorded by the first encoder, and the first position sequence includes multiple position values ​​of the actuator, and the number of the position values ​​is less than the maximum number of output turns; Based on the current position of the second encoder and the maximum number of output turns, a second position sequence of the output end of the actuator is calculated; the second position sequence is a position sequence of the actuator recorded by the second encoder, the second position sequence includes a plurality of position values ​​of the actuator, and the number of the position values ​​is less than the maximum number of output turns; Based on the first position sequence and the second position sequence, obtaining an actual position of the output end of the actuator; The obtaining the actual position of the output end of the actuator based on the first position sequence and the second position sequence comprises: For each unit in the first position sequence, detecting whether the value of the unit is equal to the value of each unit in the second position sequence; In response to detecting that the value of the cell is equal to the value of the cell in the second position sequence, the value of the cell is used as the actual position of the output of the actuator.

2. The method according to claim 1, wherein: The maximum output number of turns is calculated using the following steps: Obtain a first rotation number of the first encoder and a second rotation number of the second encoder; The maximum output number of the actuator output end is calculated based on the first number of rotations and the second number of rotations.

3. The method according to claim 2, characterized in that The calculating, based on the first rotation number and the second rotation number, of the maximum output number of the output terminal of the actuator respectively connected to the first encoder and the second encoder comprises: Based on the first rotation number and a first reduction ratio between the first encoder and the output end of the actuator, obtaining a first execution number of the output end of the actuator; Based on the second rotation number and a second reduction ratio between the second encoder and the output end of the actuator, obtaining a second execution number of the output end of the actuator; Based on the first execution number of turns and the second execution number of turns, a maximum output number of turns at the output end of the actuator is determined.

4. The method according to claim 3, characterized in that The determining the maximum output number of turns of the actuator output terminal based on the first execution number of turns and the second execution number of turns comprises: Detecting whether the first execution number of turns is equal to the second execution number of turns; In response to the first execution number of turns being equal to the second execution number of turns, the first execution number of turns is used as the maximum output number of turns of the output end of the actuator.

5. The method according to claim 1, characterized in that The step of calculating the first position sequence of the output end of the actuator based on the current position of the first encoder and the maximum number of output turns comprises: Obtaining a first calculated position of the output end of the actuator based on a current position of the first encoder and a first reduction ratio between the first encoder and the output end of the actuator; A first position sequence of the actuator output end is obtained based on the number of rotations of the actuator output end, the maximum number of output rotations, and the first calculated position.

6. The method according to claim 1, characterized in that The step of calculating the second position sequence of the output end of the actuator based on the current position of the second encoder and the maximum number of output turns comprises: Obtaining a second calculated position of the output end of the actuator based on a current position of the second encoder and a second reduction ratio between the second encoder and the output end of the actuator; A second position sequence of the actuator output end is obtained based on the number of rotations of the actuator output end, the maximum number of output rotations, and the second calculated position.

7. The method according to claim 1, characterized in that The obtaining the actual position of the output end of the actuator based on the first position sequence and the second position sequence comprises: For each unit in the second position sequence, detecting whether the value of the unit is equal to the value of each unit in the first position sequence; In response to detecting that the value of the cell is equal to the value of the cell in the first position sequence, the value of the cell is used as the actual position of the output end of the actuator.

8. A position detection device, characterized in that: The device comprises: a first sequence calculation unit, configured to calculate a first position sequence of an actuator output terminal based on a current position of the first encoder and a pre-calculated maximum number of output turns, wherein the maximum number of output turns is an integer number of turns of the second encoder and the first encoder, and the number of turns of the actuator output terminal corresponding to the first encoder is exactly equal to the number of turns of the actuator output terminal corresponding to the second encoder, and the actuator output terminal is connected to the first encoder and the second encoder respectively; the first position sequence is a position sequence of the actuator recorded by the first encoder, and the first position sequence includes a plurality of position values ​​of the actuator, and the number of the position values ​​is less than the maximum number of output turns; A second sequence calculation unit is configured to calculate a second position sequence of the output end of the actuator based on the current position of the second encoder and the maximum output number of turns; the second position sequence is a position sequence of the actuator recorded by the second encoder, the second position sequence includes a plurality of position values ​​of the actuator, and the number of the position values ​​is less than the maximum output number of turns; an obtaining unit configured to obtain an actual position of an output end of the actuator based on the first position sequence and the second position sequence; The obtaining the actual position of the output end of the actuator based on the first position sequence and the second position sequence comprises: For each unit in the first position sequence, detecting whether the value of the unit is equal to the value of each unit in the second position sequence; In response to detecting that the value of the cell is equal to the value of the cell in the second position sequence, the value of the cell is used as the actual position of the output of the actuator.

9. An electronic device, characterized in that: include: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method according to any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable the computer to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Actuator motor end position determination method, device and equipment and storage medium

    CN114310882A

  • Drive device and robot having same

    CN117798884A