Position detection method and device, electronic equipment and computer readable storage medium
By calculating the actual position of the actuator output using two single-turn encoders, the problem that the multi-turn absolute position encoder cannot be used normally after a long shutdown is solved, which improves the reliability and accuracy of position detection, and reduces the system's volume and cost.
Patent Information
- Application Number
- CN202411562613.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-11-04
AI Technical Summary
The existing multi-turn absolute position encoder cannot be used normally due to battery energy exhaustion after a long shutdown. It is expensive and large in size, which affects the high-integrated design of joint actuators.
The actual position of the actuator output is calculated by two single-turn encoders, and the actual position of the actuator output is obtained by using the maximum number of output turns, the position sequence of the first encoder and the position sequence of the second encoder.
Improves the reliability and accuracy of the actual position of the actuator output, avoids the problem of multi-turn encoder being unavailable due to battery exhaustion, and reduces the system size and cost.
Smart Images

Figure CN119526482A_ABST
Abstract
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 robot motion joints need to be equipped with integrated actuators to complete the motion commands of the master control unit. For joint actuators, in addition to providing sufficient torque, humanoid robots have higher requirements for the motion accuracy, size, structural stability, etc. of joint actuators. The motion accuracy of humanoid robots 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 encoder's precise position feedback of the motion to obtain high-precision motion of the robot as a whole.
[0003] The position information of the output end of the joint actuator can be obtained by the encoder. Encoders are divided into incremental encoders and absolute encoders based on the signal principle. Each position of the absolute encoder corresponds to a certain digital code, so its indication is only related to the starting and ending positions of the measurement, but not to the intermediate process of the measurement. The incremental encoder can output the incremental changes of the encoder from the predefined starting position. Therefore, the output end of the joint actuator usually needs to use an absolute encoder to obtain position information. According to the test range, the absolute position encoder can be divided into a single-turn absolute position encoder and a multi-turn position encoder. For a single-turn absolute position encoder, when the rotation exceeds 360°, the encoding returns to the origin, which does not conform to the principle of absolute encoding only. Therefore, such encoding can only be used for measurements within a rotation range of 360°. If you want to measure the rotation range exceeding 360°, you must use a multi-turn absolute encoder. Although the multi-turn absolute encoder can realize the measurement of position information within a multi-turn range, it will usually add additional power supply circuits and batteries, resulting in an increase in the size of the joint actuator, which is not conducive to the high integration design of the joint actuator. Since multi-turn absolute position encoders usually require continuous power supply to record the current absolute position, when the joint actuator is shut down for a long time and the battery in the multi-turn absolute encoder is exhausted, it will not be able to work properly and cannot meet the increasingly diverse usage scenarios of robots. In addition, the price of multi-turn absolute position encoders is also higher than that of single-turn encoders. 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 comprising: calculating a first position sequence of an actuator output terminal based on a current position of a first encoder and a pre-calculated maximum number of output turns, the maximum number of output turns being 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 and the second encoder being exactly equal, the actuator output terminal being connected to the first encoder and the second encoder respectively; calculating a second position sequence of the actuator output terminal based on the current position and the maximum number of output turns of the second encoder; obtaining an actual position of the actuator output terminal 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, which includes: a first sequence calculation unit, configured to calculate a first position sequence of an actuator output terminal based on a current position of a first encoder and a pre-calculated maximum number of output turns, the maximum number of output turns being 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 and the second encoder being exactly equal, and the actuator output terminal being connected to the first encoder and the second encoder respectively; a second sequence calculation unit, configured to calculate a second position sequence of the actuator output terminal based on the current position of the second encoder and the maximum number of output turns; and an obtaining unit, configured to obtain the actual position of the actuator output terminal 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, comprising 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 a method as described in any one of the first aspects.
[0008] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, where the computer instructions are used to cause a computer to execute any method 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 number of turns, the maximum output number of turns is the number of turns of the actuator output end that makes the first encoder and the second encoder rotate equal, and the actuator output end is connected to the first encoder and the second encoder respectively; secondly, based on the current position and the maximum output number of turns of the second encoder, the second position sequence of the actuator output end is calculated; finally, based on the first position sequence and the second position sequence, the actual position of the actuator output end is obtained. Thus, the actual position of the actuator output end is obtained through the maximum output number of the actuator output end, the first position sequence of the first encoder, and the second position sequence of the second encoder, which provides a reliable implementation method for two single-turn encoders to calculate the actual position of the actuator output end, and improves 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 section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended 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 accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0012] Figure 1 is a flow chart of an embodiment of a position detection method according to the present disclosure;
[0013] Figure 2a is an isometric view of a first encoder, a second encoder and an actuator connected in an embodiment of the present disclosure;
[0014] Figure 2b is the above Figure 2a sectional view of
[0015] Figure 3 is another structural schematic diagram of the first encoder, the second encoder and the actuator connected in the embodiment of the present disclosure;
[0016] Figure 4a is another structural schematic diagram of the first encoder, the second encoder and the actuator connected in the embodiment of the present disclosure;
[0017] Figure 4b is the above Figure 4a A cross-sectional view of
[0018] Figure 5 is a schematic structural diagram of an embodiment of a position detection device according to the present disclosure;
[0019] Figure 6is a block diagram of an electronic device for implementing the position detection method according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0020] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may 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 in this document have the same meanings as those generally understood by technicians in the technical field to which this application belongs; the terms used in this document are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.
[0022] In the description of the embodiments of the present application, the term "at least one" refers to one or more, and "plurality" refers to more than two (including two).
[0023] In the description of the embodiments of the present application, the technical terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, which are only for the convenience of describing the embodiments of the present application and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the embodiments of the present application.
[0024] The present disclosure proposes a position detection method that can effectively calculate the actual position of the actuator output through two encoders. Figure 1 A process 100 according to an embodiment of a position detection method of the present disclosure is shown. The position detection method comprises the following steps:
[0025] Step 101, calculating a first position sequence of an output end of an actuator based on a current position of a first encoder and a pre-calculated maximum number of output turns.
[0026] In this embodiment, the maximum output number of revolutions is the number of revolutions of the actuator output end at which the second encoder and the first encoder rotate an integer number of revolutions, and the number of revolutions of the actuator output end corresponding to the first encoder and the second encoder is exactly equal, and the actuator output end is connected to the first encoder and the second encoder respectively.
[0027] In this embodiment, the first encoder and the second encoder are both encoders, and the encoder is a sensor that converts mechanical motion into electrical signals. It is mainly used to measure and detect parameters such as the rotation angle, linear displacement, speed, acceleration, etc. of an object. Its role and functions include: 1. Counting: The encoder can count by converting motion into electrical signals. By processing the electrical signals, 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 time. 3. Positioning: The encoder can determine the exact position of the object and help the machine system achieve precise positioning and motion control.
[0028] In this embodiment, two encoders (first encoder 1 and first encoder 2) are used to calculate the absolute position of the output end of the actuator. The first encoder and the second encoder have a corresponding positional relationship, and 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), and the stator 12 of the first encoder 1 and the output end 3 of the actuator remain relatively stationary as a whole; 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), and the stator 22 of the second encoder 2 and the output end 3 of the actuator remain relatively stationary as a whole. The isometric view and cross-sectional view of the structure are shown in FIG. Figure 2a and Figure 2b shown.
[0030] (2) The first encoder 1' and the second encoder 2' are both located on the output side of the actuator. The first encoder 1' is connected to the output end 3' of the actuator via 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) remains relatively stationary with the actuator as a whole. The second encoder 2' is connected to the output end 3' of the actuator via 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) remains relatively stationary with the actuator as a whole. The isometric view of the structure is shown in FIG. 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 reducer Q rotor; 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 reducer rotor (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 output end of the actuator and the second reduction ratio g2 between the second encoder and the output end of the actuator. The structural schematic diagram and cross-sectional view of the structure are shown in FIG. Figure 4a and 4b shown.
[0032] In this embodiment, 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 position values is less than the maximum output number of turns, that is, the first position sequence includes: the first position, the second position, the third position...the nth position, n<N, N is the maximum output number of turns, and when the first initial position is zero, the current position of the first encoder is divided by the first reduction ratio to obtain the first position of the first position sequence, the first position is added with 360 degrees to obtain the second position, and the n-1th position is added with 360 degrees to obtain the nth position.
[0033] Step 102: Calculate 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.
[0034] In this embodiment, the second position sequence is a position sequence of the actuator recorded by the second encoder, and the second position sequence includes multiple position values of the actuator, and the number of position values is less than the maximum output number of turns, that is, the second position sequence includes: the first position, the second position, the third position ... the mth position, m<N, N is the maximum output number of turns. When the second initial position is zero, the current position of the second encoder is divided by the second reduction ratio to obtain the first position of the second position sequence, the second position is added by 360 degrees to obtain the second position, and the m-1th position is added by 360 degrees to obtain the mth position.
[0035] Step 103: obtaining the actual position of the output end of the actuator based on the first position sequence and the second position sequence.
[0036] In this embodiment, the actual position of the output end of the actuator is also the absolute position of the output end of the actuator. When the first encoder and the second encoder both output absolute positions, the actual position of the output end of the actuator 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 and the value in the second position sequence is the actual position of the output end of the actuator.
[0038] The position detection method provided by the embodiment of the present disclosure first obtains the first rotation number of the first encoder and the second rotation number of the second encoder; secondly, based on the first rotation number and the second rotation number, the maximum output number of the actuator output terminal connected to the first encoder and the second encoder is calculated; thirdly, based on the current position and the maximum output number of the first encoder, the first position sequence of the actuator output terminal is calculated; thirdly, based on the current position and the maximum output number of the second encoder, the second position sequence of the actuator output terminal is calculated; finally, based on the first position sequence and the second position sequence, the actual position of the actuator output terminal is obtained. Thus, the actual position of the actuator output terminal is obtained by the maximum output number of the actuator output terminal, the first position sequence of the first encoder, and the second position sequence of the second encoder, which provides a reliable implementation method for calculating the actual position of the actuator output terminal by two single-turn encoders, and improves the reliability and accuracy of obtaining the actual position of the actuator output terminal.
[0039] In some optional implementations of the present disclosure, the maximum output number of revolutions is calculated using the following steps: obtaining a first number of revolutions of the first encoder and a second number of revolutions of the second encoder; and calculating the maximum output number of revolutions of the actuator output end based on the first number of revolutions and the second number of revolutions.
[0040] In this optional implementation, the first encoder and the second encoder may be single-turn encoders, and the single-turn encoder may be an incremental encoder or an absolute encoder.
[0041] In this optional implementation, the first number of rotations is the number of rotations of the first encoder when it is driven by the actuator connected to the first encoder. The value of the first rotation can be one or more rotations, and the value of the first number of rotations 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. The first initial position can be 0. The first initial position is divided by the first reduction ratio to obtain the initial position of the actuator relative to the first encoder, wherein the reduction ratio is the transmission ratio of the reduction device, which is a type of transmission ratio; the first reduction ratio is the reduction ratio between the first encoder and the actuator.
[0042] In this optional implementation, the second number of rotations is the number of rotations that the second encoder has made when it is driven by an actuator connected to the second encoder. The value of the second number of rotations can be one or more turns, and the value of the second number of rotations is a positive integer. The second encoder has a second initial position, which is the position of the second encoder itself that is recorded when it is powered on. The second initial position can be 0. The second initial position is divided by the second reduction ratio to obtain the initial position of the actuator relative to the second encoder, wherein the second reduction ratio is the reduction ratio between the second encoder and the actuator.
[0043] In this optional implementation, the first number of rotations can be directly obtained from the first encoder; the second number of rotations can be directly obtained from the second encoder.
[0044] In this optional 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 is connected to the first encoder and the second encoder respectively.
[0045] In this optional implementation, the maximum output number of turns is the number of turns when the number of turns of the actuator converted by the first encoder is equal to the number of turns of the actuator converted by the second encoder.
[0046] In this optional implementation, the above-mentioned calculation of the maximum output number of revolutions of the actuator output end based on the first number of revolutions and the second number of revolutions includes: multiplying the first number of revolutions by the second reduction ratio to obtain a first reduced number of revolutions; multiplying the second number of revolutions by the first reduction ratio to obtain a second reduced number of revolutions; real-time detection of whether the first reduced number of revolutions is equal to the second reduced number of revolutions; in response to detecting that the first reduced number of revolutions is equal to the second reduced number of revolutions, dividing the first reduced number of revolutions or the second reduced number of revolutions by the comprehensive reduction ratio as the maximum output number of revolutions of the actuator output end, wherein the comprehensive reduction ratio is equal to the first reduction ratio multiplied by the second reduction ratio.
[0047] The method for calculating the maximum output number of revolutions provided by this optional implementation obtains the first number of rotations of the first encoder and the second number of rotations of the second encoder; based on the first number of rotations and the second number of rotations, the maximum output number of revolutions of the output end of the actuator is calculated, providing a reliable implementation method for obtaining the maximum output number of revolutions and improving the accuracy of obtaining the maximum output number of revolutions.
[0048] In some optional implementations of the present disclosure, the above-mentioned calculation of the maximum output number of revolutions of the actuator output end which is respectively connected to the first encoder and the second encoder based on the first number of rotations and the second number of rotations includes: obtaining the first number of execution revolutions of the actuator output end based on the first number of rotations and the first reduction ratio between the first encoder and the actuator output end; obtaining the second number of execution revolutions of the actuator output end based on the second number of rotations and the second reduction ratio between the second encoder and the actuator output end; and determining the maximum output number of the actuator output end based on the first number of execution revolutions and the second number of execution revolutions.
[0049] In this optional implementation, the first execution number of revolutions is the number of running revolutions of the actuator output end obtained based on the first rotation number of the first encoder, and due to the first reduction ratio between the actuator output end and the first encoder, the first execution number of revolutions is obtained by dividing the first rotation number by the first reduction ratio; the second execution number of revolutions is the number of running revolutions of the actuator output end obtained based on the second rotation number of the second encoder, and due to the second reduction ratio between the actuator output end and the second encoder, the second execution number of revolutions is obtained by dividing the second rotation number by the second reduction ratio.
[0050] In this optional implementation, the first execution number of turns is compared with the second execution number of turns, and when the two are equal, the maximum output number of turns of the actuator output end equal to the first execution number of turns or the second execution number of turns is obtained.
[0051] The method for calculating the maximum output number of turns provided by this optional implementation first calculates the first execution number of turns, and then calculates the second execution number of turns; based on the first execution number of turns and the second execution number of turns, the maximum output number of turns at the output end of the actuator is obtained, which provides a reliable implementation method for obtaining the maximum output number of turns at the output end of the actuator and improves the accuracy of obtaining the maximum output number of turns.
[0052] Optionally, the above-mentioned calculation of the maximum output number of turns of the actuator output end which is respectively connected to the first encoder and the second encoder based on the first number of rotations and the second number of rotations includes: obtaining a first converted number of turns based on the first number of rotations; and obtaining the maximum output number of turns of the actuator output end based on the first converted number of turns and the second converted number of turns based on the second number of rotations.
[0053] In some optional implementations of the present disclosure, the above-mentioned obtaining the first number of execution revolutions of the actuator output end based on the first number of rotations and the first reduction ratio between the first encoder and the actuator output end includes: dividing the first number of rotations by the first reduction ratio between the first encoder and the actuator output end to obtain the first number of execution revolutions of the actuator output end.
[0054] The method for obtaining the first execution number of revolutions provided by this optional implementation manner divides the first rotation number by the first reduction ratio between the first encoder and the output end of the actuator, so that the output number of revolutions of the first encoder can be converted into the number of revolutions of the output end of the actuator, thereby improving the reliability of obtaining the maximum output number of revolutions of the output end of the actuator.
[0055] In some optional implementations of the present disclosure, 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 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, using the first execution number of turns as the maximum output number of turns of the actuator output terminal.
[0056] In this optional 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 number of revolutions n1, the number of revolutions of 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 number of revolutions n2, the number of revolutions of the output end of the actuator is N2 = n2 / g2.
[0058] If the first encoder rotates an integer number of circles t1 (t1 is a positive integer) and the second encoder rotates an integer number of circles t2 (t2 is a positive integer), the number of circles rotated by the actuator output end is exactly the same, and N1=N2=N, then N is the maximum number of output circles that the absolute position detection system can detect.
[0059] The method for determining the maximum output number of turns of the actuator output end provided by this optional implementation method detects whether the first execution number of turns is equal to the second execution number of turns, and determines the maximum output number of turns of the actuator output end when the first execution number of turns is equal to the second execution number of turns, thereby providing a reliable implementation method for obtaining the maximum output number of turns and improving the reliability of obtaining the maximum output number of turns.
[0060] Optionally, the above-mentioned determination of the maximum output number of turns of the actuator output end based on the first execution number of turns and the second execution number of turns includes: detecting whether the first folded number of turns is equal to the second folded number of turns; in response to the first folded number of turns being equal to the second folded number of turns, obtaining the maximum output number of turns of the actuator output end based on the first folded number of turns or the second folded number of turns.
[0061] In some optional implementations of the present disclosure, the above-mentioned calculation of the first position sequence of the actuator output end based on the current position and the maximum output number of circles of the first encoder 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 rotation circles of the actuator output end, the maximum number of output circles and the first calculated position.
[0062] In this optional implementation, the positions of the first encoder, the second encoder, and the output end of the actuator all start to move 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.
[0063] In this optional implementation, the current position of the first encoder may be the current rotation position output by the first encoder.
[0064] In this optional 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. The first initial position is divided by the first reduction ratio to obtain the first calculated position.
[0065] In this optional implementation, the position of the actuator output end can be calculated from the current position of the first encoder, as shown in formula (1). According to the current position enc1_pos of the first encoder, the number of rotations n of the actuator output end and the maximum number of output rotations 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 by this optional implementation first obtains the first calculated position based on the current position of the first encoder; and obtains the first position sequence based on the first calculated position, the number of rotations of the actuator output end, and the maximum number of output rotations. For this purpose, the first position sequence of the actuator output end is determined at the angle of the first encoder, thereby improving the reliability of obtaining the first position sequence.
[0068] In some optional implementations of the present disclosure, the above-mentioned calculation of the second position sequence of the actuator output end based on the current position and the maximum output number of circles of the second encoder 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 rotation circles of the actuator output end, the maximum number of output circles and the second calculated position.
[0069] In this optional implementation, the positions of the first encoder, the second encoder, and the output end of the actuator all start to move 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 optional implementation, the current position of the second encoder may be the current rotation position output by the second encoder.
[0071] In this optional implementation, the second calculated position is the position of the actuator output end relative to the second encoder, that is, the position of the actuator output end mapped by the current position of the second encoder. The second initial position is divided by the second reduction ratio to obtain the second calculated position.
[0072] In this optional implementation, the position of the actuator output end can be calculated from the current position of the second encoder, as shown in formula (2). According to the current position enc2_pos of the second encoder, the number of rotations n of the actuator output end and the maximum number of output rotations N, the second position sequence end_pos_2_list of the actuator output end 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 optional implementation first obtains the second calculated position based on the current position of the second encoder; and obtains the second position sequence based on the second calculated position, the number of rotations of the actuator output end, and the maximum number of output rotations. For this purpose, the second position sequence of the actuator output end is determined from the perspective of the second encoder, thereby improving the reliability of obtaining the second position sequence.
[0075] In some optional implementations of the present disclosure, the above-mentioned obtaining of the actual position of the actuator output end 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 value 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 actuator output end.
[0076] In this optional implementation, the unit in the first position sequence refers to the position in the first position sequence. For example, if the first position sequence has five positions, the unit in the first position sequence is the position, and each unit is a position.
[0077] In this optional implementation, the unit in the second position sequence refers to the position in the second position sequence. For example, if the second position sequence has five positions, then the unit in the second position sequence is the position, and each unit is a position.
[0078] The method for obtaining the actual position of the output end of the actuator provided by this optional implementation compares the units in the first position sequence with the units in the second position sequence respectively. When the unit in the first position sequence is equal to any one of the units in the second position sequence, the value of the unit is used as the actual position of the output end of the actuator, thereby providing a reliable implementation method for obtaining the actual position of the output end of the actuator and improving the accuracy of obtaining the actual position of the output end of the actuator.
[0079] In some optional implementations of the present disclosure, the above-mentioned obtaining of the actual position of the actuator output end based on the first position sequence and the second position sequence includes: 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 unit is equal to the value of the unit in the first position sequence, using the value of the unit as the actual position of the actuator output end.
[0080] The method for obtaining the actual position of the actuator output terminal provided by this optional implementation method compares the units in the second position sequence with the units in the first position sequence respectively. When the unit in the second position sequence is equal to any one of the units in the first position sequence, the value of the unit is used as the actual position of the actuator output terminal, thereby providing another reliable implementation method for obtaining the actual position of the actuator output terminal and improving the accuracy of obtaining the actual position of the actuator output terminal.
[0081] Further references Figure 5 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a position detection device, which is similar to Figure 5 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0082] like Figure 5 As shown, 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. The 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 number of circles, the maximum output number of circles is the number of rotations of the actuator output end when the second encoder and the first encoder rotate an integer number of circles, and the number of rotations of the actuator output end corresponding to the first encoder and the second encoder is exactly equal, and the actuator output end is connected to the first encoder and the second encoder respectively. The 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 number of circles. The 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, the specific processing of the first sequence calculation unit 501, the second sequence calculation unit 502, and the obtaining unit 503 and the technical effects thereof can be referred to respectively. Figure 1 The relevant descriptions of step 101, step 102, and step 103 in the corresponding embodiment are not repeated here.
[0084] In some optional implementations of the present disclosure, the maximum output number of revolutions is calculated by the following units: an acquisition unit (not shown in the figure) and a revolution calculation unit (not shown in the figure), wherein the acquisition unit is configured to: acquire a first number of revolutions of the first encoder and a second number of revolutions of the second encoder. The revolution calculation unit is configured to: calculate the maximum output number of revolutions of the output end of the actuator based on the first number of revolutions and the second number of revolutions.
[0085] In some optional implementations of the present disclosure, the above-mentioned number of revolutions calculation unit is further configured to: obtain a first number of execution revolutions of the actuator output end based on the first number of rotation revolutions and a first reduction ratio between the first encoder and the actuator output end; obtain a second number of execution revolutions of the actuator output end based on the second number of rotation revolutions and a second reduction ratio between the second encoder and the actuator output end; determine the maximum output number of revolutions of the actuator output end based on the first number of execution revolutions and the second number of execution revolutions.
[0086] In some optional implementations of the present disclosure, the number of revolutions calculation unit is further configured to: divide the first number of rotations by the first reduction ratio between the first encoder and the output end of the actuator to obtain the first number of execution revolutions of the output end of the actuator.
[0087] In some optional implementations of the present disclosure, the above-mentioned 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 actuator output end.
[0088] In some optional implementations of the present disclosure, the above-mentioned first sequence calculation unit 501 is configured to: obtain 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; obtain the first position sequence of the actuator output end based on the number of rotations of the actuator output end, the maximum number of output circles and the first calculated position.
[0089] In some optional implementations of the present disclosure, the above-mentioned second sequence calculation unit 502 is configured to: obtain 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; obtain the second position sequence of the actuator output end based on the number of rotations of the actuator output end, the maximum number of output rotations and the second calculated position.
[0090] In some optional implementations of the present disclosure, the obtaining unit 503 is configured to: for a unit in the first position sequence, respectively detect 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 unit is equal to the value of the unit in the second position sequence, use the value of the unit as the actual position of the output end of the actuator.
[0091] In some optional implementations of the present disclosure, the obtaining unit 503 is configured to include: for a 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 unit is equal to the value of the unit in the first position sequence, using the value of the unit as the actual position of the output end of the actuator.
[0092] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[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 example electronic device 600 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, 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 required herein.
[0095] like Figure 6As shown, the 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] A number of 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 disk, an optical disk, 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 through a computer network such as the Internet and / or various telecommunication networks.
[0097] The computing unit 601 may be a variety of general and / or special 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, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 601 performs the various methods and processes described above, such as the position detection method. For example, in some embodiments, the position detection method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on 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 may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the position detection method in any other appropriate manner (e.g., by means of firmware).
[0098] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0099] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable position detection device, so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0100] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk 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 (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types 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 input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0102] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0103] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0104] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0105] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A position detection method, characterized in that: The method comprises: Calculating a first position sequence of the output end of the actuator based on the current position of the first encoder and a pre-calculated maximum number of output turns, wherein the maximum number of output turns is the number of turns of the actuator output end at which 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, and the actuator output end is connected to the first encoder and the second encoder respectively; 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; Based on the first position sequence and the second position sequence, an actual position of the output end of the actuator is obtained.
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 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.
8. 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.
9. A position detection device, characterized in that: The device comprises: a first sequence calculation unit, configured to calculate a first position sequence of the output end of the actuator 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 output end of the actuator corresponding to the first encoder and the second encoder is exactly equal, and the output end of the actuator is connected to the first encoder and the second encoder respectively; 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 obtaining unit is configured to obtain an actual position of the output end of the actuator based on the first position sequence and the second position sequence.
10. 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 8.
11. 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 8.
Citation Information
Patent Citations
Actuator motor end position determination method, device and equipment and storage medium
CN114310882A
Drive device and robot having same
CN117798884A
Control apparatus for controlling rotation of joints of robot
US20150048724A1
Electric motor, robot, and method for measuring position of output end of electric motor
WO2023221050A1