Robot joint motor output position evaluation method and device and storage medium
By installing encoders on the main gear and driven gear, and combining forward and reverse rotation with angular difference correction, the problem of insufficient position accuracy of robot joint output axis in the prior art is solved, and higher position reliability and system stability are achieved.
Patent Information
- Application Number
- CN202511482291.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-16
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2045-10-16
AI Technical Summary
Existing methods for obtaining the position of robot joint output axes suffer from insufficient accuracy and high cost. In particular, when using magnetic encoders, the interaction between permanent magnet magnetic fields and gear precision affect position accuracy, leading to unstable posture of legged robots and compromised system safety.
The method involves installing encoders on the main gear and the driven gear respectively. By driving the main gear to rotate a certain number of revolutions in both directions, and combining the initial relative position of the two gears with the current rotation position, the method calculates the multi-revolution value and single-revolution position reconstruction value of the main gear. The reliability of the multi-revolution value is judged by correcting the angle difference, and alarm information or correction position data is generated.
It improves the accuracy and reliability of the joint motor output position, eliminates the influence of factors such as encoder accuracy and gear accuracy, and ensures the stability of the legged robot posture and the safety of the system.
Smart Images

Figure CN121374558A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of robot joints, in particular to a robot joint motor output position evaluation method, device and storage medium. BACKGROUND
[0002] With the development of artificial intelligence, legged robots have become a research hotspot in embodied intelligence. The joint module is the core component of the legged robot, which contains two position information, the position information of the motor shaft and the position of the joint output shaft, which determines the joint foot posture. The position of the joint output shaft directly determines the posture of the robot foot end and is a key parameter to ensure the stable operation of the robot.
[0003] Currently, there are mainly two ways to obtain the position of the joint output shaft. One is to directly install an encoder on the joint output shaft to obtain the position information, which is relatively accurate, but the structure is complex and the cost is high. The other is to indirectly obtain the position of the joint output shaft by dividing the motor end position by the reduction ratio, which has a large position error, but the structure is simple and the cost is low. This method requires the encoder installed at the motor end to accurately record the number of motor rotations without external power supply. However, due to cost constraints, two gear position sensors are generally selected as magnetic encoders, a single-pole permanent magnet is installed at the center of the gear shaft, and a magnetic induction chip is suspended above the permanent magnet to obtain the position information of the permanent magnet by detecting the magnetic field direction. The absolute position accuracy is low. At the same time, the interaction between the magnetic fields of the two permanent magnets on the gears further reduces the position accuracy detected by the magnetic induction chip. In addition, the machining accuracy of the gears and the gear backlash will affect the accuracy of the motor shaft rotation. The inaccurate motor shaft rotation may seriously affect the stability of the legged robot posture and system safety. For example, in the prior art (patent publication number CN118721266A), a method for calculating the number of rotations is introduced, but it cannot determine whether the obtained number of rotations is accurate, lacks a judgment mechanism for the accuracy of the number of rotations, and cannot meet the application requirements of the legged robot for position accuracy. SUMMARY
[0004] The present application provides a robot joint motor output position evaluation method to overcome the shortcomings of the prior art. The joint motor has a main gear installed on the motor shaft and a slave gear meshing with the main gear. A first encoder is installed on the main gear to monitor the rotation position of the main gear, and a second encoder is installed on the slave gear to monitor the rotation position of the slave gear. The method includes the following steps:
[0005] S1, drive the main gear to rotate forward by at least a first number of rotations and reverse by at least a first number of rotations, the first number of rotations being a calculated value obtained by dividing the number of teeth of the slave gear by the difference between the number of teeth of the slave gear and the number of teeth of the main gear, and the number of teeth of the slave gear being greater than the number of teeth of the main gear;
[0006] S2, obtaining the rotating position of the main gear from the first encoder and the rotating position of the slave gear from the second encoder during the rotating process of the main gear, determining the multi-turn value and the single-turn position reconstruction value of the main gear rotation according to the initial relative position and the current rotating position of the main gear and the slave gear;
[0007] S3, calculating the angle difference value between the current rotating position of the main gear and the single-turn position reconstruction value, correcting the multi-turn value and the angle difference value according to the deviation of the angle difference value relative to the set threshold value, and obtaining the corresponding multi-turn correction value and angle difference correction value;
[0008] S4, judging whether the angle difference correction value is within the preset reliability interval, if yes, taking the cumulative value of the multi-turn correction value and the current rotating position of the main gear as the joint motor rotation data, otherwise, generating an alarm information.
[0009] Preferably, the determination of the multi-turn value and the single-turn position reconstruction value of the main gear rotation according to the initial relative position and the current rotating position of the main gear and the slave gear specifically comprises:
[0010] S21, obtaining the rotating position of the main gear from the first encoder and the rotating position of the slave gear from the second encoder during the rotating process of the main gear according to a preset period;
[0011] S22, calculating the current rotating position difference of the two gears according to the current rotating position of the main gear and the rotating position of the slave gear, and calculating the cumulative rotating position positive difference of the two gears until the current rotating process according to the stored initial relative position of the main gear and the slave gear;
[0012] S23, calculating the multi-turn value and the single-turn position reconstruction value of the current main gear according to the cumulative rotating position positive difference and the tooth number relationship of the main gear and the slave gear, wherein the multi-turn value is the cumulative rotation number of the main gear, and the single-turn position reconstruction value is the rotating position of the current main gear.
[0013] Preferably, the determination of the multi-turn value and the single-turn position reconstruction value of the main gear rotation according to the initial relative position and the current rotating position of the main gear and the slave gear specifically comprises:
[0014] During the rotating process of the main gear, the rotating position P1 of the main gear is obtained from the first encoder and the rotating position P2 of the slave gear is obtained from the second encoder according to a preset period, wherein the value range of P1 and P2 is 0 to 360 degrees;
[0015] calculating the current rotating position difference dp of the two gears according to the current rotating position of the main gear and the rotating position of the slave gear, and obtaining the initial relative position value offp of the stored main gear and slave gear, wherein wherein P 10P is the initial position of the master gear 20 P is the initial position of the slave gear
[0016] Calculate the positive difference dp1 of the cumulative rotation positions of the two gears until the current rotation process, wherein
[0017] Calculate the multi-turn value PS1 of the current rotation of the master gear and the single-turn position reconstruction value P3, wherein P3 = PS2*360, PS1 is the integer part value of PS, and PS2 is the decimal part value of PS, , wherein g1 is the number of teeth of the master gear, and g2 is the number of teeth of the slave gear.
[0018] Preferably, the calculation of the angle difference between the current rotation position of the master gear and the single-turn position reconstruction value, and the correction of the multi-turn value according to the deviation of the angle difference relative to the set threshold value specifically includes:
[0019] Calculate the angle difference between the current rotation position of the master gear and the single-turn position reconstruction value, and correct the multi-turn value according to the deviation of the angle difference relative to the set threshold value; if the angle difference is less than the set threshold value, increase the original multi-turn value by one turn and correspondingly increase the original angle difference by 360 degrees, otherwise decrease the original multi-turn value by one turn and correspondingly decrease the original angle difference by 360 degrees; obtain the corrected multi-turn correction value and the angle difference correction value after this correction.
[0020] Preferably, the calculation of the angle difference between the current rotation position of the master gear and the single-turn position reconstruction value, and the correction of the multi-turn value according to the deviation of the angle difference relative to the set threshold value specifically includes:
[0021] Calculate the angle difference between the current rotation position P1 of the master gear and the single-turn position reconstruction value P3, and correct the multi-turn value according to the deviation of the angle difference relative to the set threshold value.
[0022] Calculate the angle difference dp2 between the current rotation position P1 of the master gear and the single-turn position reconstruction value P3, and correct the multi-turn value PS1 and the angle difference dp2 according to the comparison of the angle difference with two set threshold values 180 and -180, to obtain the corrected multi-turn correction value PS 10 and the angle difference correction value dp20, wherein
[0023]
[0024] Obtain the cumulative rotation position value P4 of the master gear containing multi-turn information, wherein P4 = PS 10 *360 + P1.
[0025] Preferably, the judging whether the angle difference value is in a preset reliability interval, if in the reliability interval, taking the multiple-turn correction value and the accumulated value of the current rotation position of the main gear as the joint motor rotation data specifically comprises:
[0026] judging whether the angle difference correction value dp20 is in a preset reliability interval, if in the reliability interval, taking the multiple-turn correction value PS 10 and the accumulated rotation position value P4 of the current rotation position of the main gear as the joint motor rotation data, wherein the preset reliability interval is (-x, x), wherein x is a value greater than 0 and less than 180.
[0027] The application also discloses a robot joint motor device, comprising:
[0028] a joint motor, having a main gear installed on a motor shaft, and a slave gear meshing with the main gear, wherein a first encoder for monitoring the rotation position of the main gear is installed on the main gear, and a second encoder for monitoring the rotation position of the slave gear is installed on the slave gear,
[0029] a motion controller connected with the joint motor, configured to be able to drive the main gear to rotate forward by at least a first number of turns and to rotate reversely by at least the first number of turns, the first number of turns being a calculated value obtained by dividing the number of teeth of the slave gear by the difference between the number of teeth of the slave gear and the number of teeth of the main gear, the number of teeth of the slave gear being greater than the number of teeth of the main gear; during the rotation of the main gear, the rotation position of the main gear is obtained from the first encoder, and the rotation position of the slave gear is obtained from the second encoder, according to the initial relative position and the current rotation position of the main gear and the slave gear, the multiple-turn value of the main gear rotation and the single-turn position reconstruction value are determined; the angle difference value between the current rotation position of the main gear and the single-turn position reconstruction value is calculated, according to the deviation of the angle difference value relative to the set threshold, the multiple-turn value and the angle difference value are corrected to obtain the corresponding multiple-turn correction value and angle difference correction value; judging whether the angle difference correction value is in a preset reliability interval, if in the reliability interval, taking the multiple-turn correction value and the accumulated value of the current rotation position of the main gear as the joint motor rotation data.
[0030] Preferably, the motion controller is further configured to obtain the main gear rotation position from the first encoder and the slave gear rotation position from the second encoder at a preset period during the rotation of the main gear; calculate the current rotation position difference between the two gears according to the current main gear rotation position and the slave gear rotation position, and calculate the cumulative rotation position forward difference between the two gears in the current rotation process according to the stored initial relative position between the main gear and the slave gear; and calculate the current main gear multi-turn value and single-turn position reconstruction value according to the cumulative rotation position forward difference and the tooth number relationship between the main gear and the slave gear, wherein the multi-turn value is the cumulative rotation number of the main gear, and the single-turn position reconstruction value is the rotation position of the current main gear.
[0031] The application further discloses a robot joint motor output position evaluation system, including a controller and a memory, the controller is connected with a robot joint motor, and the memory is used for storing a computer program executable by the processor, wherein the processor is configured to execute the computer program in the memory to realize the method in any one of the above.
[0032] The application further discloses a computer readable storage medium, when the executable computer program in the storage medium is executed by the processor, the method in any one of the above can be realized.
[0033] The application discloses a robot joint motor output position evaluation method, device and storage medium, the rotation number and the reconstruction position of the main gear are obtained by reconstructing the encoder positions of the two meshing gears, the angle difference value is extracted as an evaluation index of the reliability of the multi-turn value by comparing the difference between the reconstruction position of the main gear and the encoder position of the main gear, and the smaller the absolute value of the angle difference value is, the more reliable the multi-turn value is. Then, whether the multi-turn value of the main gear is absolutely reliable can be judged by judging the reliability index in the rotation process, so that the influence of the encoder accuracy, the gear accuracy and the gear backlash on the analysis of the multi-turn value is eliminated, and the product consistency and the reliability margin can be judged in the production process.
[0034] Additional aspects and advantages of the application will be set forth in part in the description which follows, and in part will become apparent to those skilled in the art upon examination of the following and / or can be learned by practice of the application. BRIEF DESCRIPTION OF DRAWINGS
[0035] The drawings described herein are used to provide further understanding of the application, and constitute a part of the application. The illustrative embodiments of the application and their descriptions are used to explain the application, and do not constitute an improper limitation on the application. In the drawings:
[0036] Figure 1 A schematic diagram of the double gear installation of the joint motor disclosed in an embodiment of the application is shown in the figure.
[0037] Figure 2 A flowchart of a robot joint motor output position evaluation method disclosed in an embodiment of the present application is shown.
[0038] Figure 3 A specific flowchart of step S2 disclosed in an embodiment of the present application is shown.
[0039] Figure 4 A structural diagram of a robot joint motor device disclosed in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0040] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions of the embodiments of the present application will be described clearly and completely below with reference to the drawings of the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. Based on the described embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort belong to the scope of the present application.
[0041] Unless otherwise defined, technical terms or scientific terms used herein should be understood as having the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terms "first", "second", and similar terms used in the specification and claims of the present patent application do not necessarily denote any order, quantity, or importance, but are used to distinguish different components. Similarly, the terms "one" or "a" or "an" do not denote a quantity of one, but rather denote the presence of at least one.
[0042] With the development of artificial intelligence, legged robots have become a research hotspot of embodied intelligence. Among them, the joint module is the core component of the legged robot, generally including a motor, a reducer, a driver, an encoder, etc. The joint module contains two position information, the position information of the motor shaft and the position of the joint output shaft, which determines the joint foot posture. There are mainly two ways to obtain the position of the joint output shaft. One is to directly install an encoder on the joint output shaft to obtain the position information, which is relatively accurate, but the structure is complex and the cost is high. The other is to indirectly obtain the position of the joint output shaft by dividing the motor end position by the reduction ratio, which has a large position error, but the structure is simple and the cost is low. This method requires the motor end encoder to accurately record the number of motor revolutions without external power supply. One method of recording the number of motor revolutions is to install a gear at the end of the motor shaft as a driving gear, and install a driven gear beside it. The driving gear drives the driven gear to move through meshing, and the number of motor revolutions can be obtained through the positional relationship of the two gears by reasonably setting the gear ratio of the driving and driven gears.
[0043] Two gear position sensors are generally selected as magnetic encoders, a single pole permanent magnet is installed at the center of the gear shaft, and a magnetic induction chip is suspended above the permanent magnet. The position information of the permanent magnet is obtained by detecting the magnetic field direction. The absolute position accuracy is low. At the same time, the interaction between the permanent magnets on the two gears further reduces the position accuracy detected by the magnetic induction chip. In addition, the machining accuracy of the gear and the gear backlash will affect the multi-turn accuracy of the motor shaft. The inaccurate multi-turn value of the motor shaft may seriously affect the stability of the attitude of the legged robot and the safety of the system. Based on the method of recording the multi-turn value of the mechanical double gear, a robot joint motor output position evaluation method is proposed.
[0044] Specifically, the embodiment discloses a robot joint motor output position evaluation method, as shown in the accompanying drawings Figure 1 The joint motor has a main gear 2 installed on the motor shaft 1 and a slave gear 3 engaged with the main gear 2. A first encoder is installed on the main gear for monitoring the rotation position of the main gear. A second encoder is installed on the slave gear for monitoring the rotation position of the slave gear, as shown in the accompanying drawings Figure 2 The method can include the following steps.
[0045] Step S1, driving the main gear to rotate forward at least a first number of turns, and driving the main gear to rotate reversely at least a first number of turns, the first number of turns being a calculated value obtained by dividing the number of teeth of the slave gear by the difference between the number of teeth of the slave gear and the number of teeth of the main gear, and the number of teeth of the slave gear being greater than the number of teeth of the main gear.
[0046] Specifically, the main gear is driven to rotate forward and reversely at least a first number of turns n1, which is determined by the relationship between the number of teeth of the main gear and the number of teeth of the slave gear, Wherein g1 is the number of teeth of the main gear, g2 is the number of teeth of the slave gear, n1, g1, g2 are all positive integers, and the number of teeth of the slave gear is more than the number of teeth of the main gear. In one embodiment, for example, the number of teeth of the main gear g1=10, the number of teeth of the slave gear g2=20, the main gear is driven to rotate forward at least 2 turns, i.e. the first number of turns n1=2, and then reversely at least 2 turns. Because the system rotation position has periodicity, in the complete coverage of the periodic interval of the system rotation, since the main gear rotates the number of turns, the relative position of the main gear and the slave gear will return to the periodic state consistent with the initial state, so that all possible relative position combinations in the meshing transmission process of the main gear and the slave gear can be traversed.
[0047] Step S2, obtaining the rotation position of the main gear from the first encoder and obtaining the rotation position of the slave gear from the second encoder during the rotation of the main gear, determining the multi-turn value of the main gear rotation and the single-turn position reconstruction value according to the initial relative position and the current rotation position of the main gear and the slave gear.
[0048] Specifically, the initial relative position of the main gear and the driven gear is obtained by a first encoder installed on the main gear to obtain the current rotation position of the main gear and a second encoder installed on the driven gear to obtain the current rotation position of the driven gear when the device is first operated; the position difference between the rotation positions of the main gear and the driven gear is obtained by subtracting the rotation position of the driven gear from the rotation position of the main gear; if the position difference is negative, the difference is added to the upper limit value of the corresponding angle range to adjust it to a positive difference; finally, the adjusted positive difference is stored in a storage unit with power-off saving function in the device, and the stored positive difference is the initial relative position of the main gear and the driven gear, which can be read from the storage unit and assigned to a corresponding variable as a reference for subsequent position calculation before the device is powered on and operated.
[0049] Specifically, when the device is first operated, dp=P 10 -P 20 When dp<0, dp=P 10 -P 20 +360, wherein P 10 is the initial position of the main gear, and P 20 is the initial position of the driven gear; dp is saved in a storage unit with power-off saving function, and the value in the storage unit is read into a variable offp before the device is powered on and operated.
[0050] In the embodiment, the rotation positions of the main gear and the driven gear are obtained from the two encoders in real time, so that the dynamic position information in the gear meshing transmission process can be directly captured, and the evaluation deviation caused by data loss can be avoided; the initial relative position of the main gear and the driven gear is introduced as a reference, so that the initial state and the current state can be effectively associated, the problem of loss of position reference after initial operation or restart of the device can be eliminated, and the continuity of position calculation can be ensured; based on the above position information, the multi-turn value and the single-turn position reconstruction value of the main gear are determined, so that the cumulative rotation turns and the current single-turn orientation of the main gear can be completely restored, and the deficiency that the number of turns and the single-turn position cannot be simultaneously obtained by a single encoder can be made up.
[0051] In the embodiment, as shown in FIG. 2, the step S2 can specifically include the following contents. Figure 3
[0052] In the step S21, the rotation position of the main gear is obtained from the first encoder and the rotation position of the driven gear is obtained from the second encoder at a preset period during the rotation of the main gear.
[0053] Specifically, the rotation position P1 of the main gear is obtained from the first encoder and the rotation position P2 of the driven gear is obtained from the second encoder at a preset period during the rotation of the main gear, wherein the value range of P1 and P2 is 0 to 360 degrees.
[0054] In the embodiment, according to the rotating speed range of the joint motor in actual operation and the demand of the leg robot on the joint position accuracy, a fixed position acquisition time interval, i.e., a preset period, is set in advance, which needs to consider the data integrity and redundancy, so as to avoid missing the key position information in the rotating process of the main gear due to too long interval, and to prevent increasing the processing burden due to too short interval. In the process of continuous rotation of the main gear, the first encoder and the second encoder are triggered synchronously according to the preset period to detect the positions, the current rotating position of the main gear is read by the first encoder in real time, and the current rotating position of the driven gear is read by the second encoder in real time, so as to ensure that the position data of the main gear and the driven gear at the same time point form an accurate corresponding relationship, and to avoid the position correlation deviation caused by asynchronous acquisition.
[0055] In the embodiment, the position data of the double encoders is acquired according to the preset period. In the process of forward and reverse rotation of the main gear, the position data is acquired synchronously according to the preset period, which can be adjusted according to the motor rotating speed and the accuracy demand. The current rotating position P1 of the main gear is acquired by the first encoder installed on the main gear, and the current rotating position P2 of the driven gear is acquired by the second encoder installed on the driven gear, and the value range of P1 and P2 is 0°~360°. For example, at a certain acquisition time, P1=30° and P2=60°, and at the next acquisition time, P1=50° and P2=100°, so as to ensure that the position data of the main gear and the driven gear in the same period correspond to each other. The double encoder data is acquired synchronously according to the preset period, so as to completely restore the dynamic position change of the meshing transmission of the main gear and the driven gear, to establish the position correspondence of the two gears at the same time, and to eliminate the calculation deviation caused by data lag or misplacement. The position correlation data acquired by the double encoders can support the subsequent analysis of gear accuracy, backlash and other error factors, and lay a foundation for the subsequent accurate calculation of multiple turns.
[0056] In step S22, the current rotating position difference of the two gears is calculated according to the current rotating positions of the main gear and the driven gear, and the cumulative rotating position forward difference of the two gears in the current rotating process is calculated according to the stored initial relative positions of the main gear and the driven gear.
[0057] Specifically, the current rotating position difference dp of the two gears is calculated according to the current rotating positions of the main gear and the driven gear, and the initial relative position value offp of the main gear and the driven gear is acquired, wherein
[0058] P 10 is the initial position of the main gear, P 20 is the initial position of the driven gear; and the cumulative rotating position forward difference dpi of the two gears in the current rotating process is calculated, wherein .
[0059] Specifically, based on the current rotation positions of the main gear and the slave gear collected in the preset period in the preceding step S21, the rotation position difference between the two gears at the current time is calculated by comparing the position information of the two gears; the initial relative position value of the main gear and the slave gear stored when the device is first run is called from the power-off savable storage unit of the device; the initial relative position value called is taken as a reference, and the position difference between the two gears at each time obtained in the current rotation process of the main gear is gradually accumulated to calculate the rotation position difference value of the two gears from the current rotation of the main gear to the current time, and the negative difference value that may occur in the calculation process is positively processed, that is, if the difference value at a certain time is negative, it is converted into a positive value through a preset adjustment rule, and finally the accumulated rotation position positive difference value that can accurately reflect the total position change amount of the two gears from the current rotation to the present time is obtained.
[0060] Specifically, in the present embodiment, the initial relative position offp is obtained: when the device is first run, the initial relative position of the main gear and the slave gear needs to be determined first. A group of initial state P1 is collected as P 10 , and P2 is collected as P 20 , the initial position difference dp=P 10 -P 20 is calculated; if dp<0, it needs to be converted into a positive difference value by adding 360°.
[0061] For example, P 10 =20°, P20=50°, dp=20-50=-30°, and the adjusted dp=330°. The adjusted dp is stored in the power-off savable storage unit, and before the subsequent device is powered on, the value is read from the storage unit and assigned to the variable offp as the reference for subsequent position calculation.
[0062] Calculate the current position difference: in each collection period of the rotation of the main gear, subtract the current P2 from the current P1 to obtain the current rotation position difference dp of the two gears, such as P1=80°, P2=120°, dp=80-120=-40°.
[0063] Calculate the accumulated rotation position positive difference value dp1: subtract the initial relative position offp from the current position difference dp to obtain a preliminary difference value; if the preliminary difference value is less than 0, add 360° to convert it into a positive difference value, that is, the accumulated rotation position positive difference value dp1 until the current period. For example, offp=330°, current dp=-40°, preliminary difference value=-40-330=-370°, and after adding 360°, dp1=350°, which reflects the total positive position change amount of the main gear and the slave gear from the current rotation to the present.
[0064] By introducing the initial relative position value as a reference, the problem of loss of position reference after device restart or power failure is effectively solved, and the calculation deviation of position difference caused by reference fault is avoided. At the same time, the cumulative difference is processed in a positive direction, which can eliminate the interference caused by the positive and negative fluctuations of the difference when the main gear rotates forward and backward alternately, and ensure that the positive difference of the cumulative rotation position can accurately reflect the total amount of actual position change of the meshing transmission of the two gears.
[0065] In step S23, according to the cumulative rotation position positive difference and the tooth number relationship of the main gear and the driven gear, the multi-turn value of the current main gear and the single-turn position reconstruction value are calculated and obtained, wherein the multi-turn value is the cumulative rotation number of the main gear, and the single-turn position reconstruction value is the rotation position of the current main gear.
[0066] Specifically, the multi-turn value PS1 of the current main gear rotation and the single-turn position reconstruction value P3 are calculated and obtained, wherein P3=PS2*360, PS1 is the integer part value of PS, and PS2 is the decimal part value of PS. Wherein g1 is the tooth number of the main gear, and g2 is the tooth number of the driven gear.
[0067] In this embodiment, the tooth number of the main gear and the tooth number of the driven gear are confirmed and called, and the cumulative rotation position positive difference of the two gears calculated in step S22 is obtained. Then, according to the tooth number relationship of the main gear and the driven gear, the cumulative rotation position positive difference is processed and converted into a comprehensive value PS which contains both the rotation number information of the main gear and the single-turn position information. Then, the comprehensive value PS is split into an integer part and a decimal part, wherein the integer part is the cumulative rotation number of the current main gear, that is, the required multi-turn value PS1; finally, the decimal part obtained by splitting is multiplied by the upper limit value of the angle range, and the specific rotation position of the current main gear is determined by the operation result, which is the single-turn position reconstruction value P3, so that the multi-turn value and the single-turn position reconstruction value of the current main gear are obtained.
[0068] Specifically, in this embodiment, according to the cumulative rotation position positive difference dp1 and the maximum multi-turn value n1=2, the comprehensive value PS is calculated, and the formula is PS=dp1*n1 / 360°.
[0069] Split the PS into an integer part PS1 and a decimal part PS2, wherein PS1 is the completed cumulative rotation number of the main gear, i.e. the multiple circle value, and the decimal part PS2 is used to calculate the single circle position reconstruction value P3, the formula is P3=PS2*360°. For example, if a certain period dp1=360°, then PS=360°*2 / 360°=2, after splitting, PS1=2, i.e. the main gear has accumulated 2 rotations, PS2=0, and the single circle position reconstruction value P3=0*360°=0°. By combining the cumulative rotation position forward difference value with the main and slave gear tooth number relationship, the accurate separation of the main gear multiple circle value and the single circle position information is successfully realized, and the defect that the single encoder in the prior art cannot accurately obtain the cumulative circle number and the real-time single circle position of the main gear at the same time is solved.
[0070] Step S3, calculate the angle difference value between the current rotation position of the main gear and the single circle position reconstruction value, and correct the multiple circle value and the angle difference value according to the deviation of the angle difference value relative to the set threshold value, to obtain the corresponding multiple circle correction value and the angle difference correction value.
[0071] In the embodiment, the step S3 specifically includes: calculating the angle difference value between the current rotation position of the main gear and the single circle position reconstruction value, and correcting the multiple circle value according to the deviation of the angle difference value relative to the set threshold value; if the angle difference value is less than the set threshold value, the original multiple circle value is increased by 1 circle, and the original angle difference value is correspondingly increased by 360 degrees, otherwise the original multiple circle value is reduced by 1 circle, and the original angle difference value is also reduced by 360 degrees; to obtain the multiple circle correction value and the angle difference correction value after this correction.
[0072] In the embodiment, the current rotation position of the main gear is obtained from step S21, and the single circle position reconstruction value of the main gear calculated in step S23 is called, the difference between the two position data is calculated to obtain the angle difference value between the current rotation position of the main gear and the single circle position reconstruction value; then the set threshold value for judging the deviation is determined; then the calculated angle difference value is compared with the set threshold value, if the angle difference value is less than the set threshold value, it means that the current multiple circle value is undercounted, the original multiple circle value obtained in step S23 needs to be increased by 1 circle, and to make the angle difference value return to a reasonable range, the original angle difference value is correspondingly increased by the upper limit value of the corresponding angle range; if the angle difference value is greater than the set threshold value, it means that the current multiple circle value is overcounted, the original multiple circle value needs to be reduced by 1 circle, and the original angle difference value is correspondingly reduced by the upper limit value of the corresponding angle range; after the above adjustment, the multiple circle correction value of the main gear after this correction and the corrected angle difference correction value are finally obtained.
[0073] Specifically, in the embodiment, the angle difference dp2 is calculated, the main gear rotation position P1 of the current period and the single-turn position reconstruction value P3 are called, and the angle difference dp2=P1-P3 is calculated. According to the ±180° threshold correction of the multi-turn value and the angle difference, dp2 is compared with the set threshold 180°, -180°, and the correction operation is performed: if dp2<-180°, it indicates that the main gear multi-turn value PS1 is undercounted, and PS1 needs to be increased by one turn to obtain the corrected multi-turn value PS 10 , and dp2 is increased by 360° to obtain the corrected angle difference dp20.
[0074] For example, P1=10°, P3=350°, dp2=10-350=-340°<-180°, and the original PS1=2. Then PS 10 =2+1=3, and dp20=-340+360=20°; if dp2>180°, it indicates that the main gear multi-turn value PS1 is overcounted, and PS1 needs to be reduced by one turn to obtain PS 10 , and dp2 is reduced by 360° to obtain dp20.
[0075] For example, P1=350°, P3=10°, dp2=350-10=340°>180°, and the original PS1=3. Then PS 10 =3-1=2, and dp20=340-360=-20°; if-180°<dp2<180°, it indicates that the multi-turn value is not deviated, PS 10 =PS1, and dp20=dp2; the main gear cumulative rotation position value P4 is calculated, after the correction is completed, the corrected multi-turn value PS 10 is combined with the current main gear rotation position P1, and the cumulative rotation position value P4 is calculated according to the formula P4=PS 10 *360°+P1. The value integrates the multi-turn rotation information and the current single-turn position information of the main gear, and can reflect the real output position of the joint motor.
[0076] For example, PS 10 =3, P1=10°, and P4=3*360°+10°=1090°. Through the calculation of the angle difference and the correction of the multi-turn value according to the set threshold, the corrected multi-turn value can more accurately match the actual rotation of the main gear, and the real output position of the joint motor can be completely restored by combining the current rotation position of the main gear, which effectively makes up for the defects that the multi-turn value lacks a correction link after calculation and is easily disturbed by error factors in the prior art.
[0077] In the embodiment, the step S3 specifically includes:
[0078] Step S101, calculate the angle difference between the current rotation position P1 of the main gear and the single-turn position reconstruction value P3, and correct the multi-turn value according to the deviation of the angle difference from the set threshold value.
[0079] Step S102, calculate the angle difference dp2 between the current rotation position P1 of the main gear and the single-turn position reconstruction value P3, and correct the multi-turn value PS1 and the angle difference dp2 according to the comparison between the angle difference and the two set threshold values 180 and -180, to obtain the corrected multi-turn value PS 10 and the angle difference dp20, wherein
[0080] .
[0081] Step S103, obtain the cumulative rotation position value P4 of the main gear containing multi-turn information, wherein P4 = PS 10 *360 + P1.
[0082] Specifically, the key position data is obtained from the previous steps: first, the current rotation position P1 of the main gear obtained by the first encoder installed on the main gear, and second, the single-turn position reconstruction value P3 of the main gear calculated in step S23; P1 is subtracted from P3 to calculate the angle difference dp2 between them; then, the calculated angle difference dp2 is compared with the two preset threshold values 180 and -180 one by one, and the corresponding correction operation is performed according to the comparison result.
[0083] If the angle difference dp2 is less than -180, it means that the current multi-turn value PS1 is undercounted, and the original multi-turn value PS1 needs to be increased by 1 to obtain the corrected multi-turn value PS 10 , and the original angle difference dp2 is increased by 360 to obtain the corrected angle difference dp20. If the angle difference dp2 is greater than 180, it means that the current multi-turn value PS1 is overcounted, and the original multi-turn value PS1 needs to be reduced by 1 to obtain PS 10 , and the original angle difference dp2 is reduced by 360 to obtain dp20. If the angle difference dp2 is between -180 and 180, the multi-turn value and the angle difference do not need to be adjusted, and PS 10 is the original PS1, and dp20 is the original dp2. Finally, according to the corrected multi-turn value PS 10 , combined with the current rotation position P1 of the main gear, the PS 10The accumulated rotation position value P4 capable of completely reflecting the multi-turn rotation information of the main gear is calculated by multiplying 360 and adding P1. The step forms a standardization logic with 180 and -180 as correction thresholds, which can eliminate the multi-turn value deviation caused by gear accuracy, gear backlash and magnetic encoder permanent magnet magnetic field interference, so that the corrected multi-turn value accurately matches the actual rotation turns of the main gear; at the same time, the angle difference value is limited to a reasonable range, which provides accurate basis for subsequent multi-turn value reliability judgment, and the calculated accumulated rotation position value completely integrates the multi-turn and single-turn position information, restores the real output position of the joint motor, solves the defect of small confidence interval of the multi-turn value in the prior art, and provides accurate support for the reliability evaluation of the joint motor output position.
[0084] In step S4, it is judged whether the angle difference value is within a preset reliability interval. If it is within the reliability interval, the multi-turn correction value and the accumulated value of the current rotation position of the main gear are taken as the joint motor rotation data, otherwise an alarm information is generated.
[0085] Specifically, it can be judged whether the angle difference correction value dp20 is within a preset reliability interval. If it is within the reliability interval, the multi-turn correction value PS 10 The accumulated rotation position value P4 of the current rotation position of the main gear is taken as the joint motor rotation data, wherein the preset reliability interval is (-x, x), and x is a value greater than 0 and less than 180.
[0086] Specifically, the corrected angle difference value dp20 and the accumulated rotation position value P4 integrating the multi-turn correction value and the current rotation position of the main gear are retrieved from the correction result of step S3. Then, according to the actual demand of the joint of the legged robot for position accuracy, the gear transmission characteristics and the detection accuracy of the encoder, the boundary value x of the reliability interval is preset, which needs to meet the range of greater than 0 and less than 180, to ensure that the interval can effectively screen out the reliable position data, so as to determine the complete preset reliability interval as (-x, x), wherein the smaller the value of x, the more reliable the multi-turn value. Subsequently, the retrieved angle difference value dp2 is compared with the preset reliability interval to determine whether dp2 falls within the range of (-x, x). If dp2 is within the interval, it means that the multi-turn value and the accumulated rotation position value P4 of the current main gear can accurately reflect the actual output position of the joint motor, and at this time the accumulated rotation position value P4 is taken as the joint motor rotation data for subsequent legged robot joint posture control or position monitoring. If dp2 exceeds the interval, it is determined that the current multi-turn value is unreliable, and the accumulated rotation position value P4 cannot accurately represent the actual output position of the motor, so the corresponding abnormal processing mechanism needs to be triggered, and it is not taken as effective rotation data.
[0087] Specifically, in the embodiment, the reliability interval can be preset according to the joint position accuracy requirement of the leg robot, and the reliability interval is (-x, x), where 0 < x < 180°, and x is recommended to be 0.3*180° to 0.7*180°, that is, 54° to 126°. Here, x can be selected as 126°, and the reliability interval is (-126°, 126°). The reliability is judged and the data is output. The corrected angle difference dp20 is compared with the reliability interval (-126°, 126°): if dp20 falls within the interval, such as dp20=20°, it indicates that the current main gear multi-turn value is reliable, and the cumulative rotation position value P4 can accurately reflect the actual output position of the joint motor. P4 is used as the joint motor rotation data for subsequent leg robot joint posture control; if dp20 exceeds the interval, such as dp20=150°, it is determined that the current multi-turn value is unreliable, and P4 cannot represent the actual output position of the motor. The abnormal processing mechanism is triggered, and the rotation data is not output. It is considered that the system multi-turn value is unreliable, and an alarm signal is generated. By presetting a reasonable reliability interval and screening the angle difference dp2, the high accuracy of the final output joint motor rotation data is ensured. At the same time, the interval judgment is used to realize the quantitative evaluation of the reliability of the multi-turn value, and the deviation caused by the subjective experience is avoided.
[0088] The robot joint motor output position evaluation method disclosed in the above example can obtain the rotation number and the reconstructed position of the main gear by reconstructing the positions of the two meshing gears. The reconstructed position of the main gear is compared with the position of the main gear encoder, and the angle difference is extracted as an evaluation index of the reliability of the multi-turn value. The smaller the absolute value of the angle difference is, the more reliable the multi-turn value is, and the higher the reliability margin is. Then, the reliability index in the rotation process can be judged to determine whether the multi-turn value of the main gear is reliable. Finally, whether the multi-turn value resolved by the two gear encoder positions is absolutely reliable can eliminate the influence of encoder accuracy, gear accuracy, gear backlash and other factors on the resolution of the multi-turn value, and can judge the product consistency and reliability margin in the production process.
[0089] In another embodiment, as shown in FIG. 8, the main gear 2 is replaced by a main gear 2' and a main gear 2''. Figure 4The robot joint motor device is also disclosed, comprising: a joint motor 4, a motion controller 5. The joint motor 4 has a main gear installed on a motor shaft, and a slave gear engaged with the main gear, wherein a first encoder for monitoring the rotation position of the main gear is installed on the main gear, and a second encoder for monitoring the rotation position of the slave gear is installed on the slave gear. The motion controller 2 is connected with the joint motor and is configured to drive the main gear to rotate forward by at least a first number of turns and to rotate reversely by at least the first number of turns, the first number of turns being a calculated value obtained by dividing the number of teeth of the slave gear by the difference between the number of teeth of the slave gear and the number of teeth of the main gear, and the number of teeth of the slave gear being greater than the number of teeth of the main gear; the rotation position of the main gear is obtained from the first encoder and the rotation position of the slave gear is obtained from the second encoder during the rotation of the main gear, and the number of turns of the rotation of the main gear and the single-turn position reconstruction value are determined according to the initial relative position and the current rotation position of the main gear and the slave gear; the angle difference between the current rotation position of the main gear and the single-turn position reconstruction value is calculated, the number of turns and the angle difference are corrected according to the deviation of the angle difference relative to the set threshold value, and the corresponding number of turns correction value and angle difference correction value are obtained; it is judged whether the angle difference correction value is within a preset reliability interval, and if yes, the cumulative value of the number of turns correction value and the current rotation position of the main gear is taken as the rotation data of the joint motor.
[0090] In the embodiment, the motion controller 5 is also configured to obtain the rotation position of the main gear from the first encoder and the rotation position of the slave gear from the second encoder at a preset period during the rotation of the main gear; the current rotation position difference between the main gear and the slave gear is calculated, and the cumulative rotation position forward difference between the main gear and the slave gear during the current rotation process is calculated according to the stored initial relative position of the main gear and the slave gear; the number of turns of the main gear and the single-turn position reconstruction value are calculated according to the cumulative rotation position forward difference and the tooth number relationship between the main gear and the slave gear, wherein the number of turns is the cumulative number of rotation turns of the main gear, and the single-turn position reconstruction value is the rotation position of the current main gear.
[0091] It should be noted that the embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts of each embodiment can be referred to each other. For the robot joint motor output position evaluation system disclosed in the embodiments, since it corresponds to the robot joint motor output position evaluation method disclosed in the embodiments, the description is relatively simple, and the relevant parts are described in the method part.
[0092] In some other embodiments, a robot joint motor output position evaluation system is also provided, comprising a controller connected with a robot joint motor and a memory for storing a computer program executable by the processor, wherein the processor is configured to execute the computer program in the memory to implement the robot joint motor output position evaluation method as disclosed in any of the preceding embodiments.
[0093] The robot joint motor output position evaluation system described above, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on this understanding, all or part of the processes in the above-mentioned embodiments can also be completed by instructing related hardware through a computer program, and the computer program can be stored in a computer readable storage medium. The computer program can implement the steps of each robot joint motor output position evaluation method embodiment described above when executed by a processor. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or some intermediate forms, etc. The computer readable medium can include any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory, random access memory, electrical carrier signal, telecommunication signal, and software distribution medium, etc.
[0094] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements for some technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
[0095] In summary, the above is only the preferred embodiment of the present application, and any equivalent changes and modifications made within the scope of the patent application of the present application shall be covered by the scope of the present application.
Claims
1. A method for evaluating an output position of a robot joint motor, the joint motor having a main gear attached to a motor shaft, and a slave gear engaged with the main gear, wherein a first encoder for monitoring a rotational position of the main gear is attached to the main gear, and a second encoder for monitoring a rotational position of the slave gear is attached to the slave gear, characterized in that, The method comprises the following steps: S1, driving the main gear to rotate forward at least a first number of turns and to rotate reversely at least the first number of turns, the first number of turns being a calculated value obtained by dividing the number of gear teeth by the difference between the number of gear teeth and the number of main gear teeth, the number of gear teeth being greater than the number of main gear teeth; S2, acquiring the rotating position of the main gear from the first encoder and the rotating position of the gear from the second encoder during the rotation of the main gear, determining the number of turns of the main gear and the single-turn position reconstruction value according to the initial relative position and the current rotating position of the main gear and the gear; S3, calculating the angle difference value between the current rotating position of the main gear and the single-turn position reconstruction value, correcting the number of turns and the angle difference value according to the deviation of the angle difference value relative to the set threshold value, and obtaining the corresponding number of turns correction value and angle difference correction value; S4, judging whether the angle difference correction value is within the preset reliability interval, if yes, taking the cumulative value of the number of turns correction value and the current rotating position of the main gear as the joint motor rotation data, otherwise, generating an alarm information.
2. The robot joint motor output position evaluation method according to claim 1, characterized by, The step S2 specifically comprises: S21, acquiring the rotating position of the main gear from the first encoder and the rotating position of the gear from the second encoder at a preset period during the rotation of the main gear; S22, calculating the current rotating position difference of the two gears according to the current rotating position of the main gear and the rotating position of the gear, and calculating the cumulative rotating position forward difference of the two gears until the current rotating position during the current rotation according to the stored initial relative position of the main gear and the gear; S23, calculating the number of turns of the main gear and the single-turn position reconstruction value according to the cumulative rotating position forward difference and the gear number relationship of the main gear and the gear, wherein the number of turns is the cumulative rotation number of the main gear, and the single-turn position reconstruction value is the rotating position of the current main gear.
3. The robot joint motor output position evaluation method according to claim 1, characterized by, The step S2 specifically comprises: acquiring the rotating position P1 of the main gear from the first encoder and the rotating position P2 of the gear from the second encoder at a preset period during the rotation of the main gear, wherein the value range of P1 and P2 is 0 to 360 degrees; The current difference dp between the rotation positions of the two gears is calculated according to the current rotation position of the master gear and the rotation position of the slave gear, and the initial relative position value offp of the master gear and the slave gear is stored, wherein Where P 10 is the initial position of the master gear, P 20 is the initial position of the slave gear; The cumulative rotational position difference dp1 of the two gears until the current rotation process is calculated, wherein A multi-turn value PS1 of the current main gear rotation and a single-turn position reconstruction value P3, where P3 = PS2*360, are calculated, with PS1 being the integer part value of PS and PS2 being the decimal part value of PS, where g1 is the number of main gear teeth and g2 is the number of slave gear teeth.
4. The robot joint motor output position evaluation method according to claim 3, characterized by, The step S3 specifically comprises: calculating the angle difference value between the current rotating position of the main gear and the single-turn position reconstruction value, correcting the number of turns according to the deviation of the angle difference value relative to the set threshold value; if the angle difference value is less than the set threshold value, the original number of turns is increased by one turn, and the original angle difference value is increased by 360 degrees accordingly, otherwise, the original number of turns is reduced by one turn, and the original angle difference value is also reduced by 360 degrees; obtaining the number of turns correction value and the angle difference correction value after the correction.
5. The robot joint motor output position evaluation method according to claim 4, characterized by, The step S3 specifically comprises: calculating the angle difference value between the current rotating position P1 of the main gear and the single-turn position reconstruction value P3, and correcting the number of turns according to the deviation of the angle difference value relative to the set threshold value; calculating an angle difference dp2 between the current rotation position P1 of the main gear and the single-turn position reconstruction value P3, correcting the multi-turn value PS1 and the angle difference dp2 according to a comparison between the angle difference and two set threshold values 180 and -180, to obtain a corrected multi-turn correction value PS 10 and an angle difference correction value dp20, wherein The cumulative rotation position value P4 of the master gear, which contains the number of revolutions information, is obtained, where P4 = PS 10 *360 + P1.
6. The robot joint motor output position evaluation method according to claim 5, characterized by, The step S4 specifically comprises: determining whether the angle difference correction value dp20 is within a preset reliability interval, and if within the reliability interval, correcting the multi-turn correction value PS 10 cumulative rotation position value P4 of the current rotation position of the main gear as the joint motor rotation data, wherein the preset reliability interval is (-x, x), and x is a value greater than 0 and less than 180.
7. A robot joint motor arrangement, characterized by including: Joint motor, having a main gear installed on a motor shaft, and a slave gear engaged with the main gear, wherein a first encoder for monitoring the rotation position of the main gear is installed on the main gear, and a second encoder for monitoring the rotation position of the slave gear is installed on the slave gear, A motion controller connected with the joint motor, configured to drive the main gear to rotate forward at least a first number of turns and to rotate reversely at least the first number of turns, the first number of turns being a calculated value obtained by dividing the number of teeth of the slave gear by the difference between the number of teeth of the slave gear and the number of teeth of the main gear, the number of teeth of the slave gear being greater than the number of teeth of the main gear; obtaining the rotation position of the main gear from the first encoder and obtaining the rotation position of the slave gear from the second encoder during the rotation of the main gear, determining the number of turns of the main gear and the single-turn position reconstruction value according to the initial relative position and the current rotation position of the main gear and the slave gear; calculating the angle difference value between the current rotation position of the main gear and the single-turn position reconstruction value, correcting the number of turns and the angle difference value according to the deviation of the angle difference value relative to the set threshold value to obtain the corresponding number of turns correction value and the angle difference correction value; judging whether the angle difference correction value is within a preset reliability interval, and if it is within the reliability interval, taking the cumulative value of the number of turns correction value and the current rotation position of the main gear as the rotation data of the joint motor.
8. The robotic joint motor device of claim 7, wherein, The motion controller is further configured to obtain the rotation position of the main gear from the first encoder and obtain the rotation position of the slave gear from the second encoder at a preset period during the rotation of the main gear; calculate the current rotation position difference of the two gears according to the current rotation position of the main gear and the rotation position of the slave gear, and calculate the cumulative rotation position forward difference of the two gears until the current rotation process according to the stored initial relative position of the main gear and the slave gear; calculate the number of turns of the main gear and the single-turn position reconstruction value according to the cumulative rotation position forward difference and the tooth number relationship of the main gear and the slave gear, wherein the number of turns is the cumulative number of turns of the main gear completed, and the single-turn position reconstruction value is the rotation position of the current main gear.
9. A robot joint motor output position evaluation system, characterized by, A controller connected with a robot joint motor, and a memory for storing a computer program executable by the processor, wherein the processor is configured to execute the computer program in the memory to implement the method of any one of claims 1-6.
10. A computer-readable storage medium, characterized in that, When the executable computer program in the storage medium is executed by the processor, the method of any one of claims 1-6 can be implemented.
Citation Information
Patent Citations
Robot joint and low-speed end position judgment method thereof
CN118721266A
Encoder data correction method
CN116007667A
Fault detection method and device for joint module and electronic equipment
CN120721361A
Multiturn-Drehgeber
DE202020107063U1
Cited By
A method for detecting joint parameters of a robot, the robot, and a storage medium.
CN122275023A
Joint parameter detection method of robot, robot and storage medium
CN122275023B