A humanoid robot encoder accuracy compensation method, device and medium
By constructing a compensation model for the humanoid robot encoder using external high-precision sensors and temperature monitoring, the problem of not fully considering error factors in existing technologies is solved, and a fast and accurate compensation effect for robot control is achieved.
Patent Information
- Application Number
- CN202511164869.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-20
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2045-08-20
AI Technical Summary
Existing robot control precision compensation technologies fail to fully consider factors affecting error, resulting in insufficient control precision and complex algorithms, making it impossible to quickly adjust the posture of humanoid robots.
The rotation angle and joint temperature of the humanoid robot are monitored by external high-precision sensors. An initial compensation model and an error compensation model are constructed. The encoder accuracy is compensated by combining the monitoring compensation parameters and the control compensation parameters.
It improves the accuracy and efficiency of humanoid robot control compensation, enabling millisecond-level response, simplifies the algorithm, and enhances the consideration of gravity factors, thereby improving the speed and accuracy of robot control.
Smart Images

Figure CN120715908B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of robot control precision compensation, in particular to a humanoid robot encoder precision compensation method, device and medium. BACKGROUND
[0002] Robot control precision compensation technology refers to a technology system that actively detects, models and offsets various errors in a robot system through software and hardware means, so that the actual adjusted parameters approach the theoretical command values. The core is to regard the error as a quantifiable systematic problem rather than random noise.
[0003] With the development of humanoid robot technology, the requirement for robot motion precision is increasing. As the main sensor for joint angle measurement, the precision of the encoder 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, which leads to inaccurate joint angle measurement, thereby affecting the stability and response performance of the robot. However, the existing robot control precision compensation technology usually directly compensates the error by constructing a prediction model based on historical data or test data, but does not fully consider the factors affecting the error, such as the gravity factor. The direction of joint rotation is different, and under the action of gravity, the required power for control is also different, which has a very high impact on control precision and measurement precision. At the same time, the analysis process of some existing robot control precision compensation technology is too complex and can only be applied to robots with fixed working mode. However, humanoid robots can complete more work, and the adjustment of joints has uncertainty. If the algorithm is too complex, it will lead to a long control time, and the robot cannot quickly adjust to the specified pose. For example, in the patent application with publication number CN113752250A, a "robot joint control method, device, robot and storage medium" is disclosed. The scheme controls and compensates the joints of the robot through parameters such as angular velocity and acceleration. The bottom logic is to control the current of the motor, but the same acceleration and angular velocity output the same current. However, when the joint rotates upward and downward, errors occur, resulting in insufficient control precision of the robot. The existing robot control precision compensation technology still has the problem of not fully considering the factors affecting the error and the algorithm being too complex, which leads to insufficient control precision of the robot and long control time. SUMMARY
[0004] The present application aims to at least solve one of the technical problems in the prior art by monitoring the rotation angle of the humanoid robot through an external high-precision sensor and an encoder, monitoring the joint temperature of the humanoid robot, then analyzing and constructing an initial compensation model of the internal encoder of the humanoid robot based on the rotation angle, constructing an error compensation model of the internal encoder of the humanoid robot based on the joint temperature, then calculating the monitoring compensation parameters and control compensation parameters of the humanoid robot through the error compensation model, and finally compensating the precision of the encoder of the humanoid robot based on the monitoring compensation parameters and control compensation parameters in combination with the initial compensation model, so as to solve the problems of insufficient comprehensive consideration of factors affecting errors and overly complex algorithms in the existing robot control precision compensation technology, resulting in insufficient control precision of the robot and excessively long control time.
[0005] To achieve the above-mentioned purpose, in a first aspect, the present application provides a humanoid robot encoder precision compensation method, comprising the following steps:
[0006] The rotation angle of the humanoid robot is monitored through an external high-precision sensor and an encoder, and the joint temperature of the humanoid robot is monitored at the same time.
[0007] An initial compensation model of the internal encoder of the humanoid robot is constructed based on the rotation angle analysis.
[0008] An error compensation model of the internal encoder of the humanoid robot is constructed based on the joint temperature.
[0009] The precision of the encoder of the humanoid robot is compensated through the error compensation model and the initial compensation model.
[0010] Further, the rotation angle of the humanoid robot is monitored through an external high-precision sensor and an encoder, and the joint temperature of the humanoid robot is monitored at the same time, comprising the following sub-steps:
[0011] An external high-precision sensor is erected to monitor the joints of the humanoid robot, and the collected rotation angle is named as an external monitoring angle.
[0012] An encoder is installed inside the humanoid robot, which can monitor the rotation angle of the joints of the humanoid robot, and is named as a self-monitoring angle.
[0013] 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 take positive values, and when the joint rotates downward, the external monitoring angle and the self-monitoring angle take negative values.
[0014] A temperature sensor is also installed at each joint of the humanoid robot to collect the joint temperature.
[0015] Further, the initial compensation model of the encoder in the humanoid robot based on the rotation angle analysis comprises the following sub-steps:
[0016] The initial compensation model receives the external monitoring angle and the self-monitoring angle, and receives the control angle of this rotation, which is the expected rotation angle output by the encoder;
[0017] The control angle, the external monitoring angle and the self-monitoring angle are marked as CA, OA and SA respectively;
[0018] The OA-SA is calculated to obtain the monitoring error, and the CA-OA is calculated to obtain the control error;
[0019] The control angle is taken as the X axis, and the monitoring error and the control error are taken as the Y axis to establish a two-dimensional coordinate system, which is named as the monitoring correction coordinate system and the control compensation coordinate system, and the monitoring correction coordinate system and the control compensation coordinate system are the initial compensation model;
[0020] The monitoring error and the control error are respectively recorded in the monitoring correction coordinate system and the control compensation coordinate system according to the corresponding control angle.
[0021] Further, the error compensation model of the encoder in the humanoid robot based on the joint temperature comprises the following sub-steps:
[0022] The number of different control angles is counted and named as the angle control quantity, and the control angle corresponding to the maximum angle control quantity is named as the test angle;
[0023] 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;
[0024] The joint temperature of the monitoring data group is named as the monitoring group temperature, and the monitoring group temperature is sorted and numbered in ascending order, and is represented by the symbol TM i , wherein i is a positive integer and i is the serial number of TM i , and the jth monitoring error in the monitoring data group with the monitoring group temperature TM
[0025] The control errors of the control angle equal to the test angle are grouped based on the joint temperature to obtain a control data group;
[0026] The joint temperature of the control data group is named as the control group temperature, and the control group temperature is sorted and numbered in ascending order, and is represented by the symbol TC i , and the jth control error in the control data group with the control group temperature TC i is marked as RC(i,j), wherein j is a positive integer and (i,j) is the serial number of RM and RC.
[0027] constructing an error compensation model of the encoder in the humanoid robot based on the monitoring data set and the control data set.
[0028] Further, constructing the error compensation model of the encoder in the humanoid robot based on the monitoring data set and the control data set comprises the following sub-steps:
[0029] constructing a two-dimensional coordinate system with the monitoring group temperature as the horizontal axis and the monitoring error as the vertical axis, naming it as the monitoring error compensation model, and recording the coordinates (TM(i,j)) into the monitoring error compensation model; i ,RC(i,j)) into the control error compensation model, and performing discrete regression analysis on the coordinate points in the control error compensation model to obtain a control error compensation curve;
[0030] obtaining the minimum value and the maximum value of the vertical axis in the monitoring error compensation curve, and marking them as MEI and MEA respectively;
[0031] obtaining the control accuracy of the humanoid robot, marking it as CLY, and starting from TM1, marking a compensation point every CLY in the direction of TM max(i) , until the compensation point overlaps with TM max(i) or is on the right side of TM max(i) , and then marking TM max(i) and TM1 as compensation points, wherein max(i) represents the maximum value of i;
[0032] constructing a two-dimensional coordinate system with the control group temperature as the horizontal axis and the control error as the vertical axis, naming it as the control error compensation model, and recording the coordinates (TC i ,RC(i,j)) into the control error compensation model, and performing discrete regression analysis on the coordinate points in the control error compensation model to obtain a control error compensation curve;
[0033] obtaining the minimum value and the maximum value of the vertical axis in the control error compensation curve, and marking them as CEI and CEA respectively;
[0034] Since the monitoring error and the control error come from the same data set, the range of the monitoring group temperature and the control group temperature is exactly the same, so the compensation points are applicable to both the monitoring error compensation model and the control error compensation model;
[0035] numbering the compensation points in the order from left to right, and denoting them by the symbol CP n , wherein n is a positive integer and n is the serial number of CP.
[0036] Further, compensating the accuracy of the encoder in the humanoid robot through the error compensation model and the initial compensation model comprises the following sub-steps:
[0037] calculating the monitoring compensation parameters and the control compensation parameters of the humanoid robot through the error compensation model;
[0038] Compensate 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.
[0039] Further, the calculation of the monitoring compensation parameter and the control compensation parameter of the humanoid robot through the error compensation model comprises the following sub-steps:
[0040] Real-time monitor the joint temperature of the humanoid robot, named as real-time temperature;
[0041] Substitute the real-time temperature into the monitoring error compensation model, find the closest compensation point to the real-time temperature, named as target point, mark the value of the horizontal axis corresponding to the target point as N, and obtain the average value of the values of the vertical axis corresponding to the coordinate points between CP N-1 and CP N+1 in the monitoring error compensation model and the control error compensation model, respectively marked as MW and CW;
[0042] Calculate MW / MEI and MW / MEA, and mark the calculation results as MHI and MHA respectively, wherein the MHI and MHA are the monitoring compensation parameter;
[0043] Calculate CW / CEI and CW / CEA, and mark the calculation results as CHI and CHA respectively, wherein the CHI and CHA are the control compensation parameter.
[0044] Further, the compensation of 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 comprises the following sub-steps:
[0045] Obtain the angle that the humanoid robot expects to adjust the joint, named as pre-adjustment angle;
[0046] Find the coordinate point in the monitoring correction coordinate system with X as the pre-adjustment angle, named as monitoring reference point, obtain the minimum value and the maximum value of the Y axis value in the monitoring reference point, respectively marked as MKI and MKA;
[0047] Calculate (MHI×MKI+MHA×MKA) / 2, and name the calculation result as monitoring compensation value;
[0048] Find the coordinate point in the control compensation coordinate system with X as the pre-adjustment angle, named as control reference point, obtain the minimum value and the maximum value of the Y axis value in the control reference point, respectively marked as CKI and CKA;
[0049] Calculate (CHI×CKI+CHA×CKA) / 2, and name the calculation result as control compensation value;
[0050] Before the joint adjustment, the pre-adjusted angle is added with the control compensation value to obtain a corrected angle, and the joint is adjusted through the corrected angle;
[0051] After the joint adjustment, the monitoring angle is added with the monitoring compensation value to obtain an actual monitoring angle.
[0052] In a second aspect, the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores computer readable instructions, and when the computer readable instructions are executed by the processor, the steps in the above method are executed.
[0053] In a third aspect, the present application provides a storage medium, which stores a computer program, and when the computer program is executed by a processor, the steps in the above method are executed.
[0054] The present application has the following advantages: the rotation angle of the humanoid robot is monitored by an external high-precision sensor and an encoder, and the joint temperature of the humanoid robot is monitored, then an initial compensation model of the internal encoder of the humanoid robot is analyzed and constructed based on the rotation angle, and the advantages are that the direction of joint rotation is distinguished during monitoring, the motor needs more current when rotating upward to reduce the influence of gravity, and the motor can use less current to achieve the desired angle when rotating downward, while most of the compensation models only consider the rotation angle of the joint and do not consider the direction of rotation, thereby improving the accuracy and rationality of the control compensation of the humanoid robot.
[0055] The present application constructs an error compensation model of the internal encoder of the humanoid robot based on the joint temperature, then calculates the monitoring compensation parameters and the 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 and the initial compensation model, and the advantages are that temperature also has a great influence on the control accuracy of the robot, so temperature is included in the reference range, the initial compensation model is further compensated by temperature, the compensation value is closer to the true value, the computing power requirement is low, the response can be achieved in milliseconds, and the accuracy and efficiency of the control compensation of the humanoid robot are improved. BRIEF DESCRIPTION OF DRAWINGS
[0056] Figure 1 A step flowchart of the method of the present application;
[0057] Figure 2 A monitoring correction coordinate system of the present application;
[0058] Figure 3 A control compensation coordinate system of the present application;
[0059] Figure 4A schematic diagram of a control error compensation model and a control error compensation curve of the present application;
[0060] Figure 5 A structural schematic diagram of an electronic device of the present application. DETAILED DESCRIPTION
[0061] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all the other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0062] Embodiment 1, please refer to Figure 1 As shown in the figure, the present application provides a human-shaped robot encoder precision compensation method, comprising the following steps:
[0063] Step S1, the rotation angle of the human-shaped robot is monitored by an external high-precision sensor and an encoder, and the joint temperature of the human-shaped robot is monitored at the same time; step S1 comprises the following sub-steps:
[0064] Step S101, an external high-precision sensor is erected to monitor the joint of the human-shaped robot, and the collected rotation angle is named as an external monitoring angle;
[0065] Step S102, an encoder is installed inside the human-shaped robot, which can monitor the rotation angle of the joint of the human-shaped robot, and is named as a self-monitoring angle;
[0066] Step S103, 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 take positive values, and when the joint rotates downward, the external monitoring angle and the self-monitoring angle take negative values;
[0067] Step S104, a temperature sensor is also installed at each joint of the human-shaped robot for collecting joint temperature;
[0068] In a specific implementation, each joint in the humanoid robot is analyzed independently, and the present 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, and 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, the external high-precision sensor is not required 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 is usually controlled by a mechanical component, and there is an included angle between the mechanical component and the horizontal plane, which is temporarily named as the horizontal included angle. When the joint is controlled, the increase of the horizontal included angle indicates that the joint rotates upward, and the decrease of the horizontal included angle indicates that the joint rotates downward. For example, the joint needs to be rotated upward by 45° at this time, and the monitored external monitoring angle and the monitored self-monitoring angle are 44.4° and 44.8° respectively. Since the rotation is upward, 44.4° and 44.8° remain positive. If the joint needs to be rotated downward by 45°, 44.4° and 44.8° need to be changed to -44.4° and -44.8.
[0069] Step S2, constructing an initial compensation model of the encoder in the humanoid robot based on the rotation angle analysis; step S2 includes the following sub-steps:
[0070] Step S201, constructing the initial compensation model. The initial compensation model receives the external monitoring angle and the self-monitoring angle, and simultaneously receives the control angle of this rotation. The control angle is the expected rotation angle output by the encoder;
[0071] Step S202, marking the control angle, the external monitoring angle and the self-monitoring angle as CA, OA and SA respectively;
[0072] Step S203, calculating OA-SA to obtain the monitoring error, and calculating CA-OA to obtain the control error;
[0073] Please refer to Figures 2 to 3 Step S204, establishing a two-dimensional coordinate system with the control angle as the X axis and the monitoring error and the control error as the Y axis respectively, and naming them as the monitoring correction coordinate system and the control compensation coordinate system respectively. The monitoring correction coordinate system and the control compensation coordinate system are the initial compensation model;
[0074] Step S205, recording the monitoring error and the control error in the monitoring correction coordinate system and the control compensation coordinate system respectively according to the corresponding control angle;
[0075] In a specific implementation, for example, the control angle CA is 45°, the external monitoring angle OA is 44.4°, and the self-monitoring angle SA is 45.2°. The monitoring error is -0.8°, and the control error is 0.6°. The monitoring correction coordinate system and the control compensation coordinate system are constructed as shown in Figure 2 and Figure 3as shown.
[0076] Step S3, constructing an error compensation model of the encoder inside the humanoid robot based on the joint temperature; Step S3 includes the following sub-steps:
[0077] Step S301, counting the number of occurrences of different control angles, named as angle control quantity, and naming the control angle corresponding to the maximum angle control quantity as test angle;
[0078] Step S302, grouping the monitoring errors of the control angle equal to the test angle based on the joint temperature, to obtain a monitoring data group;
[0079] Step S303, naming the joint temperature of the monitoring data group as monitoring group temperature, and sorting and numbering the monitoring group temperature in ascending order, denoted by symbol TM i , where i is a positive integer and i is the serial number of TM i , and the jth monitoring error in the monitoring data group with monitoring group temperature TM i is marked as RM(i,j);
[0080] Step S304, grouping the control errors of the control angle equal to the test angle based on the joint temperature, to obtain a control data group;
[0081] Step S305, naming the joint temperature of the control data group as control group temperature, and sorting and numbering the control group temperature in ascending order, denoted by symbol TC i , and the jth control error in the control data group with control group temperature TC i is marked as RC(i,j), where j is a positive integer and (i,j) is the serial number of RM and RC;
[0082] In specific implementation, the test angle is usually the control angle most frequently adjusted in daily use of the humanoid robot, and in this embodiment, the test angle is 45°. The monitoring errors with the same joint temperature and the control angle of 45° are grouped into the same monitoring data group, thereby obtaining different monitoring data groups based on the different joint temperatures, and the control data group is the same. The definition of numbering has been given in detail, and will not be repeated here.
[0083] Step S306, constructing an error compensation model of the encoder inside the humanoid robot based on the monitoring data group and the control data group;
[0084] Step S306 includes the following sub-steps:
[0085] Please refer to Figure 4 as shown, step S306.1, constructing a two-dimensional coordinate system with the monitoring group temperature as the horizontal axis and the monitoring error as the vertical axis, named as monitoring error compensation model, and the coordinates (TM iInput the monitoring error compensation model into RM(i,j), perform discrete regression analysis on the coordinate points in the monitoring error compensation model, and obtain the monitoring error compensation curve.
[0086] Step S306.2: Obtain the minimum and maximum values of the vertical axis in the monitoring error compensation curve, and label them as MEI and MEA, respectively;
[0087] Step S306.3: Obtain the control accuracy of the humanoid robot, denoted as CLY, starting from TM1 and moving towards TM. max(i) In the 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, then put TM max(i) Both TM1 and TM2 are marked as compensation points, and max(i) represents the maximum value of i.
[0088] 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 set the coordinates (TC... i Input the control error compensation model into RC(i,j), perform discrete regression analysis on the coordinate points in the control error compensation model, and obtain the control error compensation curve.
[0089] Step S306.5: Obtain the minimum and maximum values of the vertical axis in the control error compensation curve, and label them as CEI and CEA, respectively;
[0090] Step S306.6: Since the monitoring error and the control error originate 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.
[0091] Step S306.7: Number the compensation points from left to right, using the symbol CP. n This indicates that n is a positive integer and n is the index of CP;
[0092] In practice, since the analysis and processing procedures for monitoring error compensation curves and control error compensation curves are exactly the same, this embodiment only uses the control error compensation curve as an example for illustration; the control error compensation model and control error compensation curve are constructed as follows. Figure 4 As shown, TM1 represents 1℃, and TM... max(i) With a temperature of 58℃, the control precision CLY of the humanoid robot was obtained as 0.1. Therefore, starting from X=1, a compensation point was marked every 0.1 along the positive X-axis, resulting in a total of 571 compensation points, which were then numbered as CP. n1≤n≤571, and the MEI and MEA values are -1.34 and -0.72 respectively, and the CEI and CEA values are 0.23 and 0.64 respectively.
[0093] Step S4 involves compensating for the accuracy of the humanoid robot's encoder using an error compensation model and an initial compensation model. Step S4 includes the following sub-steps:
[0094] Step S401: Calculate the monitoring compensation parameters and control compensation parameters for the humanoid robot using the error compensation model;
[0095] Step S401 includes the following sub-steps:
[0096] Step S401.1: Monitor the joint temperature of the humanoid robot in real time and name it real-time temperature;
[0097] 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 at CP. N-1 To CP N+1 The average values of the coordinate points between them on the vertical axis in the monitoring error compensation model and the control error compensation model are denoted as MW and CW, respectively.
[0098] Step S401.3: Calculate MW / MEI and MW / MEA, and label the calculation results as MHI and MHA respectively. MHI and MHA are the monitoring compensation parameters.
[0099] Step S401.4: Calculate CW / CEI and CW / CEA, and label the calculation results as CHI and CHA respectively. CHI and CHA are the control compensation parameters.
[0100] In practice, the real-time temperature was monitored to be 10℃, and the target point was found to be CP. 91 That is, N=91, CP N-1 To CP N+1 The coordinates between them are CP 90 To CP 91 The coordinates between these points correspond to X-axis values ranging from 9.9℃ to 10.1℃. The average Y-axis value for these X-axis points within the monitoring error compensation model is found to be -0.84. The average CW value for these points is also found to be 0.51. Therefore, MHI and MHA are calculated to be 0.63 and 1.17 respectively, and CHI and CHA are 2.22 and 0.57 respectively.
[0101] Step S402, based on the monitoring compensation parameter and the control compensation parameter, combining the initial compensation model to compensate the accuracy of the encoder of the humanoid robot;
[0102] Step S402 includes the following sub-steps:
[0103] Step S402.1, obtain the angle of the joint adjustment expected by the humanoid robot, named as the pre-adjustment angle;
[0104] Step S402.2, find the coordinate point with X as the pre-adjustment angle in the monitoring correction coordinate system, named as the monitoring reference point, obtain the minimum value and the maximum value of the Y axis value in the monitoring reference point, marked as MKI and MKA respectively;
[0105] Step S402.3, calculate (MHI x MKI + MHA x MKA) / 2, and name the calculation result as the monitoring compensation value;
[0106] Step S402.4, find the coordinate point with X as the pre-adjustment angle in the control compensation coordinate system, named as the control reference point, obtain the minimum value and the maximum value of the Y axis value in the control reference point, marked as CKI and CKA respectively;
[0107] Step S402.5, calculate (CHI x CKI + CHA x CKA) / 2, and name the calculation result as the control compensation value;
[0108] Step S402.6, before the joint adjustment, add the pre-adjustment angle and the control compensation value to obtain the corrected angle, and adjust the joint through the corrected angle;
[0109] Step S402.7, after the joint adjustment, add the monitoring angle and the monitoring compensation value to obtain the actual monitoring angle;
[0110] In the specific implementation, since the analysis processes of the monitoring correction coordinate system and the control compensation coordinate system are completely the same, this embodiment only takes the analysis process of the monitoring correction coordinate system as an example for illustration; the pre-adjustment angle is obtained as 50°, the coordinate point with X as 50 in the monitoring correction coordinate system is found, the monitoring reference point is obtained, that is, the minimum value and the maximum value of Y in the coordinate point (50, Y) are found, MKI and MKA are obtained as -1.42 and -0.91 respectively, the monitoring compensation value is further calculated as -1.0, the calculation result is kept to one decimal place, the monitoring angle at this time is 50.9°, and the actual monitoring angle obtained by adding is 49.9°, the pre-adjustment angle is 50°, it can be concluded that the error of the monitoring after the compensation is reduced to 0.1°, and after the model is constructed, the calculation of the monitoring compensation value and the control compensation value is very rapid, and the control angle and the monitoring angle can be compensated within milliseconds.
[0111] Embodiment 2, please refer to Figure 5 as shown,Figure 5 An example is provided for a structural diagram of an electronic device, which can include a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete the communication among each other through the communication bus. The memory stores computer readable instructions, and the processor can call the instructions in the memory. When the computer readable instructions are executed by the processor, the steps in a method for compensating the accuracy of the encoder of a humanoid robot are executed to realize the following functions: the rotation angle of the humanoid robot is monitored by an external high-precision sensor and an encoder, and the joint temperature of the humanoid robot is monitored; an initial compensation model of the encoder in the humanoid robot is analyzed and constructed based on the rotation angle; an error compensation model of the encoder in the humanoid robot is constructed based on the joint temperature; and the accuracy of the encoder of the humanoid robot is compensated through the error compensation model and the initial compensation model.
[0112] In addition, the logical instructions in the memory described above can be implemented in the form of a software functional unit and sold or used as an independent product, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0113] Embodiment 3, the present application further provides a computer program product, the computer program product includes a computer program stored on a computer readable storage medium, the computer program includes program instructions, when the program instructions are executed by a computer, the computer can execute a method for compensating the accuracy of the encoder of a humanoid robot provided by the above-mentioned method, the method includes: monitoring the rotation angle of the humanoid robot by an external high-precision sensor and an encoder, while monitoring the joint temperature of the humanoid robot; an initial compensation model of the encoder in the humanoid robot is analyzed and constructed based on the rotation angle; an error compensation model of the encoder in the humanoid robot is constructed based on the joint temperature; and the accuracy of the encoder of the humanoid robot is compensated through the error compensation model and the initial compensation model.
[0114] In embodiment 4, the application further provides a computer readable storage medium, and the application provides a storage medium, which stores a computer program, and the computer program is executed by a processor to run the steps in the above method for compensating the accuracy of the encoder of the humanoid robot to realize the following functions: monitoring the rotation angle of the humanoid robot by the external high-precision sensor and the encoder, and monitoring the joint temperature of the humanoid robot; analyzing and constructing the initial compensation model of the encoder in the humanoid robot based on the rotation angle; constructing the error compensation model of the encoder in the humanoid robot based on the joint temperature; and compensating the accuracy of the encoder of the humanoid robot by the error compensation model and the initial compensation model.
[0115] Through the description of the above embodiments, the embodiments of the present application can be provided as a method, a system or a computer program product. Based on such understanding, the above technical solutions can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the method described in each embodiment or some parts of the embodiment.
[0116] In the embodiments provided by the present application, it should be understood that the disclosed system or method can be implemented in other ways. The embodiments described above are only illustrative, for example, the division of the modules or units is only a logical function division, and there can be another division manner in actual implementation, for example, a plurality of modules or units can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed elements can be through some communication interface, indirect coupling or communication connection between systems, modules and units can be electrical, mechanical or other forms.
[0117] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, but not limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement to some technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for humanoid robot encoder accuracy compensation, characterized in that, The method comprises the following steps: monitoring the rotation angle of the humanoid robot through an external high-precision sensor and an encoder, and monitoring the joint temperature of the humanoid robot; constructing an initial compensation model of the internal encoder of the humanoid robot based on the rotation angle analysis; constructing an error compensation model of the internal encoder of the humanoid robot based on the joint temperature; compensating the precision of the encoder of the humanoid robot through the error compensation model and the initial compensation model; monitoring the rotation angle of the humanoid robot through an external high-precision sensor and an encoder, and monitoring the joint temperature of the humanoid robot comprises the following sub-steps: erecting an external high-precision sensor to monitor the joint of the humanoid robot, and naming the collected rotation angle as an external monitoring angle; the humanoid robot is internally provided with an encoder, which monitors the rotation angle of the joint of the humanoid robot, and is named as a self-monitoring angle; the external monitoring angle and the self-monitoring angle are positive and negative, 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 further installed at each joint of the humanoid robot, for collecting the joint temperature; constructing an initial compensation model of the internal encoder of the humanoid robot based on the rotation angle analysis comprises the following sub-steps: constructing an initial compensation model, which receives the external monitoring angle and the self-monitoring angle, and simultaneously receives the control angle of this rotation, the control angle being the expected rotation angle output by the encoder; marking the control angle, the external monitoring angle and the self-monitoring angle as CA, OA and SA respectively; calculating OA-SA to obtain a monitoring error, and calculating CA-OA to obtain a control error; establishing a two-dimensional coordinate system with the control angle as the X axis, and the monitoring error and the control error as the Y axis respectively, and naming them as a monitoring correction coordinate system and a control compensation coordinate system respectively, the monitoring correction coordinate system and the control compensation coordinate system being the initial compensation model; recording the monitoring error and the control error according to the corresponding control angle in the monitoring correction coordinate system and the control compensation coordinate system respectively; constructing an error compensation model of the internal encoder of the humanoid robot based on the joint temperature comprises the following sub-steps: counting the number of different control angles, and naming it as an angle control amount, and naming the control angle corresponding to the maximum angle control amount as a test angle; grouping the monitoring errors of the control angles equal to the test angle based on the joint temperature, to obtain a monitoring data group; The joint temperature of the monitoring data set is named as monitoring set temperature, and the monitoring set temperature is sorted and numbered in ascending order, represented by symbol TM i , where i is a positive integer and i is the serial number of TM, and the jth monitoring error in the monitoring data set with monitoring set temperature TM i is marked as RM(i,j). grouping the control errors of the control angles equal to the test angle based on the joint temperature, to obtain a control data group; The joint temperatures in the control data group are named "Control Group Temperatures," and these temperatures are sorted and numbered in ascending order, using the symbol TC. i This indicates that the temperature of the control group will be set to TC. i The j-th control error in the control data set is labeled RC(i,j), where j is a positive integer and (i,j) is the index of RM and RC; constructing an error compensation model of the internal encoder of the humanoid robot based on the monitoring data group and the control data group.
2. The encoder accuracy compensation method for humanoid robots according to claim 1, wherein, constructing an error compensation model of the internal encoder of the humanoid robot based on the monitoring data group and the control data group comprises 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 as the monitoring error compensation model, and the coordinates (TM i The coordinates (TM , RM(i,j)) are recorded into the monitoring error compensation model, and discrete regression analysis is performed on the coordinate points in the monitoring error compensation model to obtain a monitoring error compensation curve. obtaining the minimum value and the maximum value of the vertical axis in the monitoring error compensation curve, and marking them as MEI and MEA respectively; The control precision of the humanoid robot is marked as CLY, from TM1, a compensation point is marked every CLY in the direction of TM max(i) , until the compensation point overlaps with TM max(i) or is on the right side of TM max(i) , then TM max(i) and TM1 are both marked as compensation points, and max(i) represents the maximum value of i; A two-dimensional coordinate system is constructed with the temperature of the control group as the horizontal axis and the control error as the vertical axis, named the control error compensation model, and the coordinates (TC i ,RC(i,j)) are recorded in the control error compensation model. Discrete regression analysis is performed on the coordinate points in the control error compensation model to obtain a control error compensation curve. obtaining the minimum value and the maximum value of the vertical axis in the control error compensation curve, and marking them as CEI and CEA respectively; Since the monitoring error and the control error are derived from the same set of data, the range of the monitoring group temperature and the control group temperature is exactly the same, so the compensation point is suitable for both the monitoring error compensation model and the control error compensation model; The compensation points are numbered in the order from left to right by the symbol CP n , where n is a positive integer and n is the serial number of the CP.
3. The method for encoder accuracy compensation for humanoid robots according to claim 2, wherein, The precision of the encoder of the humanoid robot is compensated by the error compensation model and the initial compensation model, including the following sub-steps: The monitoring compensation parameters and the control compensation parameters of the humanoid robot are calculated by the error compensation model; The precision of the encoder of the humanoid robot is compensated based on the monitoring compensation parameters and the control compensation parameters, combined with the initial compensation model.
4. The method for encoder accuracy compensation for humanoid robots according to claim 3, wherein, The monitoring compensation parameters and the control compensation parameters of the humanoid robot are calculated by the error compensation model, including the following sub-steps: The joint temperature of the humanoid robot is monitored in real time, named real-time temperature; The real-time temperature is substituted into the monitoring error compensation model, the closest compensation point to the real-time temperature is searched, named as a target point, a value of the horizontal axis corresponding to the target point is marked as N, and an average value of values of the vertical axes corresponding to coordinate points between CP N-1 and CP N+1 in the monitoring error compensation model and the control error compensation model is obtained, and marked as MW and CW respectively. The MW / MEI and the MW / MEA are calculated, and the calculation results are marked as MHI and MHA, which are the monitoring compensation parameters; The CW / CEI and the CW / CEA are calculated, and the calculation results are marked as CHI and CHA, which are the control compensation parameters.
5. The method for encoder accuracy compensation for humanoid robots according to claim 4, wherein, The precision of the encoder of the humanoid robot is compensated based on the monitoring compensation parameters and the control compensation parameters, combined with the initial compensation model, including the following sub-steps: The angle of the joint adjustment expected by the humanoid robot is obtained, named pre-adjustment angle; The coordinate point with X being the pre-adjustment angle in the monitoring correction coordinate system is found, named monitoring reference point, and the minimum value and the maximum value of the Y-axis value in the monitoring reference point are obtained, marked as MKI and MKA respectively; The monitoring compensation value is calculated as (MHI×MKI+MHA×MKA) / 2; The coordinate point with X being the pre-adjustment angle in the control compensation coordinate system is found, named control reference point, and the minimum value and the maximum value of the Y-axis value in the control reference point are obtained, marked as CKI and CKA respectively; The control compensation value is calculated as (CHI×CKI+CHA×CKA) / 2; Before the joint adjustment, the pre-adjustment angle is added to the control compensation value to obtain the corrected angle, and the joint is adjusted by the corrected angle; After the joint adjustment, the monitoring angle is added to the monitoring compensation value to obtain the actual monitoring angle.
6. An electronic device, comprising: The computer readable instructions are executed by the processor to run the steps in the method of any one of claims 1-5.
7. A storage medium having stored thereon a computer program, characterized in that The computer program is executed by the processor to run the steps in the method of any one of claims 1-5.
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