Method and device for compensating precision of humanoid robot encoder and medium
By using external high-precision sensors and temperature monitoring, we constructed the initialization and error compensation models of the humanoid robot encoder, which solved the problem of the existing technology not fully considering the error factors, and achieved the improvement of robot control accuracy and the acceleration of response speed.
Patent Information
- Application Number
- CN202511164869.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-20
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2045-08-20
AI Technical Summary
Existing robot control accuracy compensation technology fails to fully consider the factors affecting errors, resulting in insufficient control accuracy and excessively long control time. In particular, when the joints of humanoid robots rotate, the impact of gravity and rotation direction on the motor current demand is not fully considered.
The rotation angle and joint temperature of the humanoid robot are monitored by external high-precision sensors, and the initial compensation model and error compensation model are constructed. The encoder accuracy is compensated by combining the monitoring compensation parameters and the control compensation parameters, and the influence of the joint rotation direction and temperature on the error is considered.
The accuracy and efficiency of humanoid robot control compensation are improved, and it can respond in milliseconds. The compensation value is closer to the real value and the computing power requirement is lower.
Smart Images

Figure CN120715908A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of robot control precision compensation, and in particular to a method, device and medium for compensating the precision of a humanoid robot encoder. Background Art
[0002] Robot control precision compensation technology refers to a technical system that actively detects, models and offsets various errors in the robot system through software and hardware means, so that the actual adjusted parameters are close to the theoretical instruction values. Its core is to regard errors as quantifiable systematic problems rather than random noise.
[0003] With the development of humanoid robot technology, the requirements for robot motion accuracy are constantly increasing. The encoder is the main sensor for joint angle measurement, and its accuracy directly affects the accuracy of robot motion control. However, due to the structural characteristics of the encoder itself and its installation method, the encoder often has certain errors, resulting in inaccurate joint angle measurement, thereby affecting the stability and response performance of the robot. However, the existing robot control accuracy compensation technology usually directly compensates for it by constructing an error prediction model through historical data or test data, but does not fully consider the factors that affect the error, such as gravity. The direction of joint rotation is different, and under the action of gravity, the power required for its control is also different, which has a great impact on control accuracy and measurement accuracy. At the same time, the analysis process of some existing robot control accuracy compensation technologies is too complicated and can only be applied to fixed work. Mode of robot, while humanoid robots can complete more tasks, and the adjustment of joints is uncertain. If the algorithm is too complicated, it will lead to a long control time, and the robot cannot quickly adjust to the specified posture. For example, in the patent application with publication number CN113752250A, a "control method, device, robot and storage medium for robot joints" is disclosed. This solution controls and compensates the robot's joints through parameters such as angular velocity and acceleration. The underlying logic is to control the current of the motor, and the same acceleration and angular velocity output the same current. However, when the joint rotates up and down, errors will occur, resulting in insufficient control accuracy of the robot. The existing robot control accuracy compensation technology still has the problems of insufficient consideration of factors affecting the error and overly complicated algorithms, resulting in insufficient control accuracy of the robot and excessive control time. Summary of the Invention
[0004] The present invention aims to solve one of the technical problems in the prior art to at least a certain extent. It monitors the rotation angle of a humanoid robot through external high-precision sensors and encoders, and monitors the joint temperature of the humanoid robot at the same time. Then, based on the rotation angle, an initial compensation model of the encoder in the humanoid robot is analyzed and constructed. Then, based on the joint temperature, an error compensation model of the encoder in the humanoid robot is constructed. Then, the monitoring compensation parameters and control compensation parameters of the humanoid robot are calculated through the error compensation model. Finally, based on the monitoring compensation parameters and the control compensation parameters, the accuracy of the encoder of the humanoid robot is compensated in combination with the initial compensation model, so as to solve the problems in the existing robot control accuracy compensation technology that the factors affecting the error are not fully considered and the algorithm is too complicated, resulting in insufficient control accuracy of the robot and excessive control time.
[0005] To achieve the above objectives, in a first aspect, the present application provides a method for compensating encoder accuracy of a humanoid robot, comprising the following steps: The rotation angle of the humanoid robot is monitored through external high-precision sensors and encoders, and the joint temperature of the humanoid robot is also monitored; Analyze and construct an initial compensation model for the encoder inside the humanoid robot based on the rotation angle; Constructing an error compensation model for encoders in humanoid robots based on joint temperature; The accuracy of the encoder of the humanoid robot is compensated through the error compensation model and the initial compensation model.
[0006] Furthermore, monitoring the rotation angle of the humanoid robot by an external high-precision sensor and encoder, and monitoring the joint temperature of the humanoid robot at the same time includes the following sub-steps: Set up external high-precision sensors to monitor the joints of the humanoid robot, and the collected rotation angle is named the external monitoring angle; An encoder is installed inside the humanoid robot, which can monitor the rotation angle of the joints of the humanoid robot, which is named as the self-monitoring angle; The external monitoring angle and the self-monitoring angle have positive and negative values. When the joint rotates upward, the external monitoring angle and the self-monitoring angle are positive, and when the joint rotates downward, the external monitoring angle and the self-monitoring angle are negative. A temperature sensor is also installed at each joint of the humanoid robot to collect joint temperature.
[0007] Furthermore, analyzing and constructing an initial compensation model for the encoder inside the humanoid robot based on the rotation angle includes the following sub-steps: Constructing an initial compensation model, which receives the external monitoring angle and the internal monitoring angle, and also receives the control angle of this rotation, where the control angle is the desired rotation angle output by the encoder; The control angle, external monitoring angle, and self-monitoring angle are labeled CA, OA, and SA, respectively; Calculate OA-SA to get the monitoring error, and calculate CA-OA to get the control error; A two-dimensional coordinate system is established with the control angle as the X-axis and the monitoring error and control error as the Y-axis, respectively named the monitoring correction coordinate system and the control compensation coordinate system. The monitoring correction coordinate system and the control compensation coordinate system are the initial compensation models. The monitoring error and control error are entered into the monitoring correction coordinate system and the control compensation coordinate system respectively according to the corresponding control angle.
[0008] Furthermore, constructing an error compensation model for the encoder inside the humanoid robot based on joint temperature includes the following sub-steps: Count the number of times different control angles appear, name it angle control amount, and name the control angle corresponding to the largest angle control amount as the test angle; The monitoring errors of the control angle equal to the test angle are grouped based on the joint temperature to obtain a monitoring data group; The joint temperature of the monitoring data group is named monitoring group temperature, and the monitoring group temperatures are sorted and numbered in ascending order, and the symbol TM is used to identify the joint temperature of the monitoring data group. i Indicates that, where i is a positive integer and i is the serial number of TM, the monitoring group temperature is TM i The j-th monitoring error in the monitoring data set is marked as RM(i,j); The control errors whose control angles are equal to the test angles are grouped based on the joint temperature to obtain a control data group; The joint temperature of the control data group is named the control group temperature, and the control group temperatures are sorted and numbered in ascending order, using the symbol TC i Indicates that the control group temperature is TC i The j-th control error in the control data set is marked as RC(i,j), where j is a positive integer and (i,j) is the sequence number of RM and RC; An error compensation model for the encoder inside the humanoid robot is constructed based on the monitoring data set and the control data set.
[0009] Furthermore, constructing an error compensation model for an encoder within a humanoid robot based on the monitoring data set and the control data set includes the following sub-steps: A two-dimensional coordinate system is constructed with the monitoring group temperature as the horizontal axis and the monitoring error as the vertical axis, named the monitoring error compensation model. The coordinate (TM i,RM(i,j)) is input into the monitoring error compensation model, discrete regression analysis is performed on the coordinate points in the monitoring error compensation model, and the monitoring error compensation curve is obtained; Obtain the minimum and maximum values of the vertical axis in the monitoring error compensation curve, marked as MEI and MEA respectively; Get the control accuracy of the humanoid robot, marked as CLY, starting from TM1 and moving towards TM max(i) direction, mark a compensation point every CLY interval until the compensation point is aligned with TM max(i) Overlapping or in TM max(i) on the right side, and then TM max(i) and TM1 are marked as compensation points, and max(i) represents the maximum value of i; A two-dimensional coordinate system is constructed with the control group temperature as the horizontal axis and the control error as the vertical axis, named the control error compensation model. The coordinate (TC i ,RC(i,j)) is input into the control error compensation model, discrete regression analysis is performed on the coordinate points in the control error compensation model, and the control error compensation curve is obtained; Obtain the minimum and maximum values of the vertical axis of the control error compensation curve, marked as CEI and CEA respectively; Since the monitoring error and the control error come from the same set of data, the temperature ranges of the monitoring group and the control group are exactly the same, so the compensation point is applicable to both the monitoring error compensation model and the control error compensation model; The compensation points are numbered from left to right, using the symbol CP n Represents, where n is a positive integer and n is the serial number of CP.
[0010] Furthermore, compensating the accuracy of the encoder of the humanoid robot by using the error compensation model and the initial compensation model includes the following sub-steps: Calculating monitoring compensation parameters and control compensation parameters of the humanoid robot through the error compensation model; Based on the monitoring compensation parameters and the control compensation parameters, the accuracy of the encoder of the humanoid robot is compensated in combination with the initial compensation model.
[0011] Furthermore, calculating the monitoring compensation parameters and the control compensation parameters of the humanoid robot through the error compensation model includes the following sub-steps: Real-time monitoring of the humanoid robot's joint temperature, named real-time temperature; Substitute the real-time temperature into the monitoring error compensation model, find the compensation point closest to the real-time temperature, name it the target point, mark the value of the horizontal axis corresponding to the target point as N, and obtain the value of the compensation point at CP. N-1 To CP N+1The average values of the vertical axes of the coordinate points between the monitoring error compensation model and the control error compensation model are marked as MW and CW respectively; Calculate MW / MEI and MW / MEA, and mark the calculation results as MHI and MHA respectively, where MHI and MHA are monitoring compensation parameters; CW / CEI and CW / CEA are calculated, and the calculation results are marked as CHI and CHA, respectively. The CHI and CHA are control compensation parameters.
[0012] Furthermore, based on the monitoring compensation parameters and the control compensation parameters, the accuracy of the encoder of the humanoid robot is compensated in combination with the initial compensation model, including the following sub-steps: Get the angle that the humanoid robot expects to adjust the joints, named as the preset angle; Find the coordinate point with the pre-adjusted X angle in the monitoring calibration coordinate system, name it the monitoring reference point, and obtain the minimum and maximum Y-axis values of the monitoring reference point, marking them as MKI and MKA respectively. Calculate (MHI×MKI+MHA×MKA) / 2 and name the result as monitoring compensation value; Find the coordinate point with the preset X angle in the control compensation coordinate system, name it the control reference point, and obtain the minimum and maximum Y-axis values of the control reference point, marking them as CKI and CKA respectively. Calculate (CHI × CKI + CHA × CKA) / 2 and name the result as the control compensation value; Before adjusting the joint, add the pre-adjusted angle and the control compensation value to obtain the corrected angle, and adjust the joint according to the corrected angle; After the joint is adjusted, the monitoring angle is added to the monitoring compensation value to obtain the actual monitoring angle.
[0013] In a second aspect, the present application provides an electronic device comprising a processor and a memory, wherein the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the steps in the above method are performed.
[0014] In a third aspect, the present application provides a storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in the above method are performed.
[0015] The beneficial effects of the present invention are as follows: the rotation angle of the humanoid robot is monitored by external high-precision sensors and encoders, and the joint temperature of the humanoid robot is monitored at the same time. Then, based on the rotation angle analysis, an initial compensation model of the encoder inside the humanoid robot is constructed. The advantage is that the direction of joint rotation is distinguished during monitoring. When rotating upward, the motor requires a larger current to reduce the influence of gravity, while when rotating downward, the motor can use less current to achieve the desired angle. Most compensation models only consider the rotation angle of the joint when constructing them, but do not consider the direction of rotation. This improves the accuracy and rationality of the control compensation of the humanoid robot. The present invention constructs an error compensation model of the encoder in the humanoid robot based on the joint temperature, then calculates the monitoring compensation parameters and control compensation parameters of the humanoid robot through the error compensation model, and finally compensates the accuracy of the encoder of the humanoid robot based on the monitoring compensation parameters and the control compensation parameters in combination with the initial compensation model. The advantage is that temperature will also have a great impact on the control accuracy of the robot. Therefore, the temperature is included in the reference range, and the initial compensation model is further compensated by the temperature, so that the compensation value is closer to the true value, and the computing power requirement is low, and millisecond-level response can be achieved, thereby improving the accuracy and efficiency of the control compensation of the humanoid robot. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is a flow chart of the steps of the method of the present invention; Figure 2 A monitoring and calibration coordinate system for the present invention; Figure 3 is the control compensation coordinate system of the present invention; Figure 4 Schematic diagram of a control error compensation model and a control error compensation curve of the present invention; Figure 5 Schematic diagram of the structure of the electronic device of the present invention. DETAILED DESCRIPTION
[0017] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0018] Example 1, please refer to Figure 1 As shown, the present application provides a method for compensating the accuracy of an encoder for a humanoid robot, comprising the following steps: Step S1, monitoring the rotation angle of the humanoid robot and the joint temperature of the humanoid robot by using an external high-precision sensor and encoder; Step S1 includes the following sub-steps: Step S101: Setting up external high-precision sensors to monitor the joints of the humanoid robot, and naming the collected rotation angles as external monitoring angles; Step S102: An encoder is installed inside the humanoid robot, and the encoder can monitor the rotation angle of the joints of the humanoid robot, which is named as the self-monitoring angle; Step S103: The external monitoring angle and the self-monitoring angle are positive or negative. When the joint rotates upward, the external monitoring angle and the self-monitoring angle are positive. When the joint rotates downward, the external monitoring angle and the self-monitoring angle are negative. Step S104: A temperature sensor is installed at each joint of the humanoid robot to collect the joint temperature; In a specific implementation, each joint in the humanoid robot is analyzed independently. This embodiment only takes the process of constructing a compensation model for a certain joint as an example. The external high-precision sensor uses an existing high-precision IMU. The external high-precision sensor is only used to obtain the external monitoring angle required for constructing the compensation model. After the construction is completed, there is no need to use an external high-precision sensor to monitor the humanoid robot. A horizontal plane is defined at the rotation axis of the joint, and the horizontal plane is parallel to the ground. The joint usually controls a mechanical component, and there is an angle between the mechanical component and the horizontal plane, which is temporarily named the horizontal angle. When the joint is regulated, an increase in the horizontal angle indicates that the joint is rotating upward, and a decrease in the horizontal angle indicates that the joint is rotating downward. For example, at this time, the joint needs to be rotated 45° upward, and the monitored external monitoring angle and self-monitoring angle are 44.4° and 44.8°, respectively. Due to the upward rotation, 44.4° and 44.8° remain positive values. If a downward rotation of 45° is required, 44.4° and 44.8° need to be changed to -44.4° and -44.8.
[0019] Step S2, analyzing and constructing an initial compensation model of the encoder inside the humanoid robot based on the rotation angle; Step S2 includes the following sub-steps: Step S201: construct an initial compensation model. The initial compensation model receives the external monitoring angle and the internal monitoring angle, and also receives the control angle of the current rotation. The control angle is the desired rotation angle output by the encoder. Step S202: Mark the control angle, external monitoring angle, and self-monitoring angle as CA, OA, and SA, respectively; Step S203, calculate OA-SA to obtain monitoring error, calculate CA-OA to obtain control error; See also Figures 2 to 3As shown, in step S204, a two-dimensional coordinate system is established with the control angle as the X-axis and the monitoring error and the control error as the Y-axis, respectively named as the monitoring correction coordinate system and the control compensation coordinate system. The monitoring correction coordinate system and the control compensation coordinate system are the initial compensation model; Step S205: Enter the monitoring error and the control error into the monitoring correction coordinate system and the control compensation coordinate system respectively according to the corresponding control angles; In the specific implementation, for example, the control angle CA is 45°, the external monitoring angle OA is 44.4°, the self-monitoring angle SA is 45.2°, the monitoring error is calculated to be -0.8°, the control error is 0.6°, and the monitoring correction coordinate system and the control compensation coordinate system are constructed as follows: Figure 2 and Figure 3 shown.
[0020] Step S3, constructing an error compensation model for the encoder inside the humanoid robot based on the joint temperature; Step S3 includes the following sub-steps: Step S301: Count the number of times different control angles appear, name them as angle control amounts, and name the control angle corresponding to the largest angle control amount as the test angle; Step S302, grouping the monitoring errors where the control angle is equal to the test angle based on the joint temperature to obtain a monitoring data group; Step S303: Name the joint temperature of the monitoring data group as monitoring group temperature, sort and number the monitoring group temperatures in ascending order, and use the symbol TM i Indicates that, where i is a positive integer and i is the serial number of TM, the monitoring group temperature is TM i The j-th monitoring error in the monitoring data set is marked as RM(i,j); Step S304, grouping the control errors whose control angles are equal to the test angles based on the joint temperature to obtain a control data group; Step S305: Name the joint temperature of the control data group as the control group temperature, sort the control group temperatures in ascending order, and use the symbol TC i Indicates that the control group temperature is TC i The j-th control error in the control data set is marked as RC(i,j), where j is a positive integer and (i,j) is the sequence number of RM and RC; In a specific implementation, the test angle is usually the most commonly adjusted control angle in daily use of a humanoid robot. In this embodiment, the test angle is 45°. The monitoring errors with the same joint temperature and a control angle of 45° are grouped into the same monitoring data group. Thus, different monitoring data groups are obtained based on the difference in joint temperature. The same applies to the control data groups. The definitions of the numbers have been given in detail and will not be repeated here. Step S306, constructing an error compensation model of the encoder inside the humanoid robot based on the monitoring data set and the control data set; Step S306 includes the following sub-steps: See also Figure 4 As shown in step S306.1, a two-dimensional coordinate system is constructed with the monitoring group temperature as the horizontal axis and the monitoring error as the vertical axis, named the monitoring error compensation model, and the coordinates (TM i ,RM(i,j)) is input into the monitoring error compensation model, discrete regression analysis is performed on the coordinate points in the monitoring error compensation model, and the monitoring error compensation curve is obtained; Step S306.2, obtaining the minimum and maximum values of the vertical axis of the monitoring error compensation curve, marked as MEI and MEA respectively; Step S306.3, obtain the control accuracy of the humanoid robot, marked as CLY, starting from TM1 and moving towards TM max(i) direction, mark a compensation point every CLY interval until the compensation point is aligned with TM max(i) Overlapping or in TM max(i) on the right side, and then TM max(i) and TM1 are marked as compensation points, and max(i) represents the maximum value of i; Step S306.4, construct a two-dimensional coordinate system with the control group temperature as the horizontal axis and the control error as the vertical axis, named the control error compensation model, and transform the coordinate (TC i ,RC(i,j)) is input into the control error compensation model, discrete regression analysis is performed on the coordinate points in the control error compensation model, and the control error compensation curve is obtained; Step S306.5, obtaining the minimum and maximum values of the vertical axis of the control error compensation curve, marked as CEI and CEA respectively; Step S306.6: Since the monitoring error and the control error are derived from the same set of data, and the temperature ranges of the monitoring group and the control group are exactly the same, the compensation point is applicable to both the monitoring error compensation model and the control error compensation model. Step S306.7: Number the compensation points from left to right, using the symbol CP n Denotes, where n is a positive integer and n is the serial number of CP; In the specific implementation, since the analysis and processing process of the monitoring error compensation curve and the control error compensation curve are exactly the same, this embodiment only takes the control error compensation curve as an example for explanation; the control error compensation model and the control error compensation curve are constructed as follows: Figure 4 As shown, TM1 is 1°C, TM max(i)The control accuracy CLY of the humanoid robot is 0.1, so starting from X=1, a compensation point is marked every 0.1 in the positive direction of the X axis, and a total of 571 compensation points are marked and numbered as CP. n , 1≤n≤571, and at the same time, the MEI and MEA were obtained to be -1.34 and -0.72, respectively, and the CEI and CEA were 0.23 and 0.64, respectively.
[0021] Step S4, compensating the accuracy of the encoder of the humanoid robot using the error compensation model and the initial compensation model; Step S4 includes the following sub-steps: Step S401, calculating monitoring compensation parameters and control compensation parameters of the humanoid robot through an error compensation model; Step S401 includes the following sub-steps: Step S401.1, real-time monitoring of the joint temperature of the humanoid robot, named real-time temperature; Step S401.2: Substitute the real-time temperature into the monitoring error compensation model, find the compensation point closest to the real-time temperature, name it the target point, mark the value of the horizontal axis corresponding to the target point as N, and obtain the value of the compensation point at CP. N-1 To CP N+1 The average values of the vertical axes of the coordinate points between the monitoring error compensation model and the control error compensation model are marked as MW and CW respectively; Step S401.3, calculate MW / MEI and MW / MEA, and mark the calculation results as MHI and MHA respectively. MHI and MHA are monitoring compensation parameters; Step S401.4, calculate CW / CEI and CW / CEA, and mark the calculation results as CHI and CHA respectively. CHI and CHA are control compensation parameters; In the specific implementation, the real-time temperature is monitored to be 10℃, and the target point is CP 91 , that is, N=91, CP N-1 To CP N+1 The coordinate point between them is CP 90 To CP 91 The coordinate points between 9.9℃ and 10.1℃ correspond to the X-axis value range of 9.9℃ to 10.1℃. The average value of the Y-axis values of the coordinate points whose X lies between 9.9℃ and 10.1℃ in the monitoring error compensation model is found, and the MW is -0.84. The average value of the Y-axis values of the coordinate points whose X lies between 9.9℃ and 10.1℃ in the monitoring error compensation model is found, and the CW is 0.51. The MHI and MHA are calculated to be 0.63 and 1.17, respectively, and the CHI and CHA are 2.22 and 0.57, respectively. Step S402 , compensating the accuracy of the encoder of the humanoid robot based on the monitoring compensation parameter and the control compensation parameter in combination with the initial compensation model; Step S402 includes the following sub-steps: Step S402.1, obtaining the angle at which the humanoid robot's joints are expected to be adjusted, which is named the preset angle; Step S402.2: Find the coordinate point with the pre-adjusted X angle in the monitoring calibration coordinate system, name it the monitoring reference point, and obtain the minimum and maximum Y-axis values of the monitoring reference point, marking them as MKI and MKA respectively. Step S402.3, calculate (MHI×MKI+MHA×MKA) / 2, and name the calculation result as the monitoring compensation value; Step S402.4: Find the coordinate point with the preset X angle in the control compensation coordinate system, name it the control reference point, and obtain the minimum and maximum Y-axis values of the control reference point, marking them as CKI and CKA respectively; Step S402.5, calculate (CHI × CKI + CHA × CKA) / 2, and name the calculation result as the control compensation value; Step S402.6: Before adjusting the joint, add the pre-adjusted angle to the control compensation value to obtain the corrected angle, and adjust the joint based on the corrected angle; Step S402.7, after the joint is adjusted, the monitoring angle is added to the monitoring compensation value to obtain the actual monitoring angle; In the specific implementation, since the analysis process of the monitoring correction coordinate system and the control compensation coordinate system is exactly the same, this embodiment only takes the analysis process of the monitoring correction coordinate system as an example; the pre-adjustment angle of 50° is obtained, and the coordinate point with X of 50 in the monitoring correction coordinate system is found to obtain the monitoring reference point, that is, the minimum and maximum values of Y in the coordinate point (50, Y) are found, and MKI and MKA are obtained as -1.42 and -0.91 respectively. The monitoring compensation value is further calculated to be -1.0, and the calculation result is retained to one decimal place. At this time, the monitoring angle is 50.9°, and the actual monitoring angle is added to 49.9°. The pre-adjustment angle is 50°. It can be concluded that the monitoring error is reduced to 0.1° after compensation, and after the model is built, the calculation of the monitoring compensation value and the control compensation value is very fast, and the control angle and the monitoring angle can be compensated within milliseconds.
[0022] Example 2, please refer to Figure 5 As shown, Figure 5A schematic diagram of the structure of an electronic device is provided. The electronic device may include: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus. The memory stores computer-readable instructions, and the processor can call the instructions from the memory. When the computer-readable instructions are executed by the processor, the steps of a method for compensating the accuracy of a humanoid robot encoder are executed to achieve the following functions: monitoring the rotation angle of the humanoid robot using an external high-precision sensor and encoder, and simultaneously monitoring the joint temperature of the humanoid robot; analyzing and constructing an initial compensation model for the humanoid robot's internal encoder based on the rotation angle; constructing an error compensation model for the humanoid robot's internal encoder based on the joint temperature; and compensating the accuracy of the humanoid robot's encoder using the error compensation model and the initial compensation model.
[0023] In addition, the logical instructions in the above-mentioned memory can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application, or the part that contributes to the existing technology, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program code.
[0024] Example 3. The present application also provides a computer program product, which includes a computer program stored on a computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute a method for compensating for the accuracy of a humanoid robot encoder provided by the above methods, the method including: monitoring the rotation angle of the humanoid robot through an external high-precision sensor and encoder, and monitoring the joint temperature of the humanoid robot at the same time; analyzing and constructing an initial compensation model of the encoder in the humanoid robot based on the rotation angle; constructing an error compensation model of the encoder in the humanoid robot based on the joint temperature; and compensating for the accuracy of the encoder of the humanoid robot through the error compensation model and the initial compensation model.
[0025] Example 4. The present application also provides a computer-readable storage medium. The present application provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method for compensating the accuracy of a humanoid robot encoder are executed to achieve the following functions: monitoring the rotation angle of the humanoid robot through external high-precision sensors and encoders, and monitoring the joint temperature of the humanoid robot at the same time; analyzing and constructing an initial compensation model of the encoder in the humanoid robot based on the rotation angle; constructing an error compensation model of the encoder in the humanoid robot based on the joint temperature; and compensating for the accuracy of the encoder of the humanoid robot through the error compensation model and the initial compensation model.
[0026] Through the description of the above embodiments, the embodiments of the present invention can be provided as methods, systems, or computer program products. Based on this understanding, the essence of the above technical solutions or the portion that contributes to the prior art can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for enabling a computer device (such as a personal computer, server, or network device) to execute the methods described in various embodiments or certain portions of the embodiments.
[0027] In the embodiments provided in this application, it should be understood that the disclosed system or method can be implemented in other ways. The embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or units can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of systems, modules and units can be electrical, mechanical or other forms.
[0028] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for compensating the accuracy of an encoder for a humanoid robot, characterized in that: The steps include: The rotation angle of the humanoid robot is monitored through external high-precision sensors and encoders, and the joint temperature of the humanoid robot is also monitored; Analyze and construct an initial compensation model for the encoder inside the humanoid robot based on the rotation angle; Constructing an error compensation model for encoders in humanoid robots based on joint temperature; The accuracy of the encoder of the humanoid robot is compensated through the error compensation model and the initial compensation model.
2. A method for compensating encoder accuracy for a humanoid robot according to claim 1, characterized in that: Monitoring the rotation angle of the humanoid robot using external high-precision sensors and encoders, and monitoring the joint temperature of the humanoid robot, includes the following sub-steps: Set up external high-precision sensors to monitor the joints of the humanoid robot, and the collected rotation angle is named the external monitoring angle; An encoder is installed inside the humanoid robot, which can monitor the rotation angle of the joints of the humanoid robot, which is named as the self-monitoring angle; The external monitoring angle and the self-monitoring angle have positive and negative values. When the joint rotates upward, the external monitoring angle and the self-monitoring angle are positive, and when the joint rotates downward, the external monitoring angle and the self-monitoring angle are negative. A temperature sensor is also installed at each joint of the humanoid robot to collect joint temperature.
3. The method for compensating the encoder accuracy of a humanoid robot according to claim 2, characterized in that: Analyzing and building an initial compensation model for the encoder inside the humanoid robot based on the rotation angle includes the following sub-steps: Constructing an initial compensation model, which receives the external monitoring angle and the internal monitoring angle, and also receives the control angle of this rotation, where the control angle is the desired rotation angle output by the encoder; The control angle, external monitoring angle, and self-monitoring angle are labeled CA, OA, and SA, respectively; Calculate OA-SA to get the monitoring error, and calculate CA-OA to get the control error; A two-dimensional coordinate system is established with the control angle as the X-axis and the monitoring error and control error as the Y-axis, respectively named the monitoring correction coordinate system and the control compensation coordinate system. The monitoring correction coordinate system and the control compensation coordinate system are the initial compensation models. The monitoring error and control error are entered into the monitoring correction coordinate system and the control compensation coordinate system respectively according to the corresponding control angle.
4. The method for compensating encoder accuracy of a humanoid robot according to claim 3, characterized in that: Constructing an error compensation model for the encoder inside a humanoid robot based on joint temperature includes the following sub-steps: Count the number of times different control angles appear, name it angle control amount, and name the control angle corresponding to the largest angle control amount as the test angle; The monitoring errors of the control angle equal to the test angle are grouped based on the joint temperature to obtain a monitoring data group; The joint temperature of the monitoring data group is named monitoring group temperature, and the monitoring group temperatures are sorted and numbered in ascending order, and the symbol TM is used to identify the joint temperature of the monitoring data group. i Indicates that, where i is a positive integer and i is the serial number of TM, the monitoring group temperature is TM i The j-th monitoring error in the monitoring data set is marked as RM(i,j); The control errors whose control angles are equal to the test angles are grouped based on the joint temperature to obtain a control data group; The joint temperature of the control data group is named the control group temperature, and the control group temperatures are sorted and numbered in ascending order, using the symbol TC i Indicates that the control group temperature is TC i The j-th control error in the control data set is marked as RC(i,j), where j is a positive integer and (i,j) is the sequence number of RM and RC; An error compensation model for the encoder inside the humanoid robot is constructed based on the monitoring data set and the control data set.
5. The method for compensating the encoder accuracy of a humanoid robot according to claim 4, characterized in that: Constructing an error compensation model for the encoder inside the humanoid robot based on the monitoring data set and the control data set includes the following sub-steps: A two-dimensional coordinate system is constructed with the monitoring group temperature as the horizontal axis and the monitoring error as the vertical axis, named the monitoring error compensation model. The coordinate (TM i ,RM(i,j)) is input into the monitoring error compensation model, discrete regression analysis is performed on the coordinate points in the monitoring error compensation model, and the monitoring error compensation curve is obtained; Obtain the minimum and maximum values of the vertical axis in the monitoring error compensation curve, marked as MEI and MEA respectively; Get the control accuracy of the humanoid robot, marked as CLY, starting from TM1 and moving towards TM max(i) direction, mark a compensation point every CLY interval until the compensation point is aligned with TM max(i) Overlapping or in TM max(i) on the right side, and then TM max(i) and TM1 are marked as compensation points, and max(i) represents the maximum value of i; A two-dimensional coordinate system is constructed with the control group temperature as the horizontal axis and the control error as the vertical axis, named the control error compensation model. The coordinate (TC i ,RC(i,j)) is input into the control error compensation model, discrete regression analysis is performed on the coordinate points in the control error compensation model, and the control error compensation curve is obtained; Obtain the minimum and maximum values of the vertical axis of the control error compensation curve, marked as CEI and CEA respectively; Since the monitoring error and the control error come from the same set of data, and the temperature ranges of the monitoring group and the control group are exactly the same, the compensation point is applicable to both the monitoring error compensation model and the control error compensation model; The compensation points are numbered from left to right, using the symbol CP n Represents, where n is a positive integer and n is the serial number of CP.
6. The method for compensating the encoder accuracy of a humanoid robot according to claim 5, characterized in that: Compensating the accuracy of the encoder of the humanoid robot using the error compensation model and the initial compensation model includes the following sub-steps: Calculating monitoring compensation parameters and control compensation parameters of the humanoid robot through the error compensation model; Based on the monitoring compensation parameters and the control compensation parameters, the accuracy of the encoder of the humanoid robot is compensated in combination with the initial compensation model.
7. The method for compensating the encoder accuracy of a humanoid robot according to claim 6, characterized in that: Calculating the monitoring compensation parameters and control compensation parameters of the humanoid robot through the error compensation model includes the following sub-steps: Real-time monitoring of the humanoid robot's joint temperature, named real-time temperature; Substitute the real-time temperature into the monitoring error compensation model, find the compensation point closest to the real-time temperature, name it the target point, mark the value of the horizontal axis corresponding to the target point as N, and obtain the value of the CP N-1 To CP N+1 The average values of the vertical axes of the coordinate points between the monitoring error compensation model and the control error compensation model are marked as MW and CW respectively; Calculate MW / MEI and MW / MEA, and mark the calculation results as MHI and MHA respectively, where MHI and MHA are monitoring compensation parameters; CW / CEI and CW / CEA are calculated, and the calculation results are marked as CHI and CHA, respectively. The CHI and CHA are control compensation parameters.
8. The method for compensating encoder accuracy for a humanoid robot according to claim 7, characterized in that: Based on the monitoring compensation parameters and the control compensation parameters, the accuracy of the encoder of the humanoid robot is compensated in combination with the initial compensation model, including the following sub-steps: Get the angle that the humanoid robot expects to adjust the joints, named as the preset angle; Find the coordinate point with the pre-adjusted X angle in the monitoring calibration coordinate system, name it the monitoring reference point, and obtain the minimum and maximum Y-axis values of the monitoring reference point, marking them as MKI and MKA respectively. Calculate (MHI×MKI+MHA×MKA) / 2 and name the result as monitoring compensation value; Find the coordinate point with the preset X angle in the control compensation coordinate system, name it the control reference point, and obtain the minimum and maximum Y-axis values of the control reference point, marking them as CKI and CKA respectively. Calculate (CHI × CKI + CHA × CKA) / 2 and name the result as the control compensation value; Before adjusting the joint, add the pre-adjusted angle and the control compensation value to obtain the corrected angle, and adjust the joint according to the corrected angle; After the joint is adjusted, the monitoring angle is added to the monitoring compensation value to obtain the actual monitoring angle.
9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the steps in the method according to any one of claims 1 to 8 are executed.
10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are executed.
Citation Information
Patent Citations
Robot joint control method and device, robot and storage medium
CN113752250A
Numerical control machine tool thermal error external compensation control method based on auxiliary encoder
CN103513609A
Method for compensating error of encoder
JP2010078340A
Self-compensating angular encoder
US20110282612A1
Temperature compensated linear actuator and encoder
US20180091017A1