A method for adjusting hole normal direction based on machine learning

By introducing machine learning into the hole-making normal adjustment, and using the normal sensor and the multiple linear regression model to determine the compensation amount of the joint axis, the problem of low adjustment speed and accuracy in the existing technology is solved, and a more efficient normal adjustment is achieved. Adjustment.

CN115309105BActive Publication Date: 2024-10-25AVIC XIAN AIRCRAFT IND GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210755511.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-29
Publication Date
2024-10-25
Estimated Expiration
2042-06-29

AI Technical Summary

Technical Problem

Due to uncontrollable factors such as manufacturing errors, friction and deformation, the existing hole-making normal adjustment algorithm is difficult to obtain accurate kinematic equations, resulting in low adjustment speed and accuracy, especially under special mechanical structures, which is difficult to achieve in one step.

Method used

A method based on machine learning is used to detect the normal position of the spindle through the pressure foot and normal sensor, and a multiple linear regression model is used to determine the relationship between the normal reading error and angle, clamping force, and Z height, and to calculate the compensation of the joint axis quantity and superimpose it into the theoretical kinematics model to improve the accuracy and speed of adjustment.

Benefits of technology

Through machine learning technology, the influence of mechanical deformation and friction is reduced, the speed and accuracy of normal adjustment are improved, the number of normal adjustments is reduced, and more accurate joint axis coordinate output is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115309105B_ABST
    Figure CN115309105B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for adjusting the hole-making normal based on machine learning. The method mainly adds machine learning to the traditional normal adjustment. The uncontrollable variables of the entire system can be easily listed in the form of parameters by machine learning, and the weight of each parameter is determined by machine learning, so as to determine the compensation amount of each joint, and the compensation amount is superimposed on the joint axis coordinates output by the kinematic equation, thereby reducing the influence of uncontrollable forces such as mechanical deformation and friction, and improving the speed of normal adjustment and the accuracy of single adjustment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of hole making equipment, and in particular to a hole making normal adjustment method based on machine learning. Background Art

[0002] Existing normal adjustment algorithms generally require precise forward and inverse kinematics, and use the target tool tip position to reversely calculate the distance that each joint axis should travel. However, due to the existence of many uncontrollable factors such as manufacturing errors, friction, deformation, etc., it is often difficult to obtain accurate kinematic equations in practical applications. Even in some special mechanical structures, it is impossible to obtain a fixed kinematic equation. It is necessary to constantly change the parameters in the kinematic equation or even switch to different kinematic equations to meet the control requirements of different mechanical forms. This brings great difficulty to motion control development, and because of the existence of uncontrollable factors, even if the theoretical kinematic equation is obtained, it is often difficult to reach the target range in one step, and it often takes multiple attempts to reach the target range. Summary of the invention

[0003] In order to overcome the above-mentioned defects of the existing hole making normal adjustment algorithm, the technical problem to be solved by the present invention is to provide a hole making normal adjustment method based on machine learning that can improve the adjustment speed and accuracy.

[0004] The technical solution adopted by the present invention to solve its technical problem is:

[0005] A method for adjusting the normal direction of hole making based on machine learning, comprising a pressure foot and a universal support foot connected to the spherical surface of the bottom of the pressure foot, wherein three normal sensors are arranged on the pressure foot, and the noses of the three normal sensors are in contact with the positioning surface on the universal support foot, and the distance readings from the bodies of the three normal sensors to the noses are measured to determine whether the main shaft passing through the pressure foot is in the normal position;

[0006] The normal adjustment and learning process includes the following steps:

[0007] Step 1: Use a precise calibration tool to obtain the distance readings of the three nose sensors when the positioning surface on the universal support leg is completely perpendicular to the main axis, and use this value as the theoretical normal direction;

[0008] Step 2: Use a random function to control the coordinate system of the TCP tool tip to leave the theoretical normal position, and record the deviation angle and the measured readings of the three normal sensors;

[0009] Step 3: Use theoretical kinematics to calculate the theoretical estimated readings of the three normal sensors when the XYZAB joint axis is at the same position as in step 2;

[0010] Step 4: By comparing the data of step 2 and step 3, the variation data of the error of the normal reading with the angle are obtained;

[0011] Step 5: Change the clamping force and repeat steps 2 to 3;

[0012] Step 6. Change the Z height and repeat steps 2 to 5;

[0013] Step 7: Arrange the recorded data as a sample set and use the multivariate linear regression method in machine learning to obtain the relationship between the error of the normal reading and the angle, clamping force, and Z height, and obtain a compensation amount suitable for the joint axis coordinates at this time;

[0014] Step 8. Apply the model obtained from the preliminary training to the machine adjustment algorithm, superimpose the compensation amount given by the machine learning model on the target joint axis coordinates calculated by theoretical inverse kinematics and record the remaining actual error each time. Use the data accumulated in the actual trial processing production as the training set of machine learning data to further improve the accuracy of the algorithm model, reduce the remaining actual error each time, and finally solidify it into the final accurate model.

[0015] Furthermore,

[0016] The regression equation in step 7 is as follows:

[0017]

[0018] in, is a constant, is the weight of each variable, It is the component of normal error, including the normal readings of A-axis and B-axis, the current clamping force, the height of z-axis, etc.

[0019] The data recorded in steps 2 to 6 are used as the label value y for machine learning training and organized into the following form:

[0020] Y=Xw

[0021] Among them, Y is a matrix that stores a large amount of y label value data, and X is The known quantity matrix, W is Unknown quantity matrix;

[0022] Therefore, the loss function can be defined as follows:

[0023]

[0024] This equation is used as a loss function model in machine learning. By solving a set of optimal solutions, the value of this function is minimized, that is, a set of W values ​​that minimize the difference between the theoretical normal value and the actual normal value, and then a final error value x is obtained. i w, this error value is the compensation amount to be added to the theoretical kinematic model.

[0025] The beneficial effects of the present invention are as follows: by adding machine learning to traditional normal adjustment, the uncontrollable variables of the entire system can be easily listed in the form of parameters using machine learning, and then the weight of each parameter is determined by machine learning, thereby determining the compensation amount of each joint axis, and superimposing the compensation amount on the joint axis coordinates output by the kinematic equation, thereby reducing the impact of uncontrollable forces such as mechanical deformation and friction, and improving the speed of normal adjustment and the accuracy of a single adjustment. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 It is a schematic diagram of the structure of the normal sensor of the present invention.

[0027] Explanation of numbers in the figure: 1-pressure foot, 2-universal support foot, 3-normal sensor. DETAILED DESCRIPTION

[0028] The present invention is further described below in conjunction with the accompanying drawings.

[0029] The present invention provides a method for adjusting the hole normal direction based on machine learning, wherein the normal direction detection is mainly realized by a pressure foot, and the specific structure is as follows: Figure 1 As shown, it includes a pressure foot 1 and a universal support foot 2 connected to the spherical surface of the bottom of the pressure foot 1, and three normal sensors 3 are provided on the pressure foot 1. The noses of the three normal sensors 3 are in contact with the positioning surface on the universal support foot 2. By measuring the distance readings from the bodies of the three normal sensors 3 to the noses, it is determined whether the main axis passing through the pressure foot 1 is perpendicular to the positioning surface on the universal support foot 2. If it is perpendicular, the main axis is in a normal position.

[0030] The specific normal detection process is: first, the readings of the three normal sensors 3 are measured by precise calibration tools when the universal foot 2 is coaxial with the pressure foot 1. Theoretically, the three readings should be consistent, and this reading is the normal state. Then, during the hole making process, the pressure foot 1 moves with the spindle to the hole making position, and then moves down to make the universal foot 2 contact with the product surface. During this process, the universal foot 2 will deflect with the curvature of the product surface. Since the noses of the three normal sensors 3 are always in contact with the universal foot 2, the readings of the three normal sensors 3 will deviate. Finally, the system calculates the coordinate values ​​of each joint of the spindle through the DH kinematic model based on the difference between the front and back readings of the three normal sensors 3, and adjusts the spindle accordingly to make the pressure foot 1 and the spindle return to the state of being coaxial with the universal foot 2, that is, the normal state relative to the product surface.

[0031] The above process is the normal adjustment process of the spindle, but it is also a theoretical process. In the actual adjustment process, there are still influencing factors such as inaccurate DH kinematic model parameters, insufficient mechanical rigidity, and friction changes, which will lead to reduced adjustment accuracy. It is often difficult to get in place in one step, and it often takes multiple attempts to reach the target range. This application makes up for the defects of the traditional hole-making adjustment algorithm by adding machine learning, as follows:

[0032] The normal adjustment and learning process includes the following steps:

[0033] Step 1: Use the precise calibration tool to obtain the distance readings of the three nose sensors when the positioning surface on the universal foot is completely perpendicular to the main axis, and use this value as the theoretical normal.

[0034] Step 2: Use the random function to control the TCP tool tip coordinate system to leave the theoretical normal position, and record the deviation angle and the measured readings of the three normal sensors. That is, when each joint moves to the position of the random function, the value measured by the normal sensor is correct, that is, when the normal sensor has this reading, it will definitely return to the theoretical normal state if it moves back in the opposite direction according to the above random function.

[0035] Step 3: Use theoretical kinematics to calculate the theoretical estimated readings of the three normal sensors when the five joint axes XYZAB are in the same position as in step 2. XYZ represents movement along the three axes XYZ, A represents rotation around the X axis, and B represents rotation around the Y axis. This reading is an erroneous predicted reading calculated using the inaccurate DH kinematic model using the same joint angle prediction as in step 2. This reading is different from the reading in step 2, which means that the reading in step 3 is incorrect and contains some errors.

[0036] Step 4: By comparing the data of step 2 and step 3, we can get the data of the error of normal reading changing with the angle. Since step 2 is obtained by actual test, the number of tests is limited and it is impossible to cover all possibilities. Therefore, we need to know the gap between the infinite parameter equations obtained by theoretical kinematics in step 3 and the measured values ​​of step 2, and repair the theoretical kinematics so that the results of theoretical kinematics in step 3 are closer to the measured results of step 2.

[0037] Step 5. Change the clamping force and repeat steps 2 to 3. The clamping force is the force applied by the machine to the workpiece during the adjustment process, that is, the pressure of the universal support leg on the product. Different pressures will lead to different deformations, which will also lead to different deflection angles of the universal support leg. A large clamping force will lead to a larger error in step 3, and a small clamping force will have a small error and be closer to the actual measured value.

[0038] Step 6. Change the Z height and repeat steps 2 to 5. The strength of the machine is different at different heights, which is equivalent to the machine extending farther, the softer the strength, and the greater the error. However, from the actual record, the weight of this error is relatively low and can be almost ignored.

[0039] Step 7. Organize the recorded data as a sample set and use the multivariate linear regression method in machine learning to obtain the relationship between the error of the normal reading and the angle, clamping force, and Z height, and obtain a compensation amount suitable for the joint axis coordinates at this time.

[0040] Furthermore,

[0041] The regression equation in step 7 is as follows:

[0042]

[0043] in, is a constant, is the weight of each variable, It is the component of normal error, including the normal readings of A-axis and B-axis, the current clamping force, the height of z-axis, etc.

[0044] The data recorded in steps 2 to 6 are used as the label value y for machine learning training and organized into the following form:

[0045] Y=Xw

[0046] Among them, Y is a matrix that stores a large amount of y label value data, and X is The known quantity matrix, W is Unknown quantity matrix;

[0047] Therefore, the loss function can be defined as follows:

[0048]

[0049] This equation is used as a loss function model in machine learning. By solving a set of optimal solutions, the value of this function is minimized, that is, a set of W values ​​that minimize the difference between the theoretical normal value and the actual normal value, and then a final error value x is obtained. i w, this error value is the compensation amount to be added to the theoretical kinematic model.

[0050] Step 7 is the main process of machine learning. In more general terms, we need to find a set of weight values ​​W for various errors so that various errors can be added in a reasonable distribution and weight ratio to obtain a final error value x. i w, adding this error value to the estimated reading given by the DH kinematic model can make the estimated reading plus the error value closer to the measured reading. The closer to the measured reading, yi -x i The smaller the w error is, the smaller the loss function is. Therefore, by finding the W weight value that minimizes the loss function, we can get a compensation method that is closest to the reading in step 2. For example, when the clamping force is 0, the predicted value of the phase sensor and the measured value in step 2 differ by only 200 readings. When the clamping force is 100Kg, the error becomes 300 readings. Assuming that the Z height is changed, when the clamping force is 0, the error is still around 200, so it can be considered that the weight of the Z height is W. z is a very small value close to 0, but the clamping force causes the error to change, so the clamping force weight is not 0. The discrete compensation amount obtained in step 4 is used through regression method to obtain a continuous equation. The input of this equation is the position of each joint axis, and the output is the compensation value at this time. Because there are other variables such as clamping force and Z height, it is also necessary to obtain the output compensation value of each joint axis position under different clamping forces. At this time, by inputting the angle of each joint axis, a compensation value suitable for the joint axis coordinate and clamping force at this time can be obtained by enlarging and reducing the weight obtained by the least squares method, and adding it to the predicted value predicted by the DH model, so that the model prediction value and the measured value are basically equal. Under the premise that the DH forward kinematics is already accurate, the coordinate values ​​of each joint axis can be deduced from the inverse kinematics through the value of the normal sensor, so that accurate motion adjustment can be achieved.

[0051] Step 8. Apply the model obtained from the preliminary training to the machine's adjustment algorithm, superimpose the compensation amount given by the machine learning model on the target joint axis coordinates calculated by theoretical inverse kinematics and record the remaining actual error each time. Use the data accumulated in the actual trial processing and production as the training set of machine learning data to further improve the accuracy of the algorithm model, reduce the remaining actual error each time, and finally solidify it into the final accurate model. The compensation amount is actually the value of step four under different clamping forces or Z-axis heights. If there are one hundred clamping forces, there are one hundred values. Step four is a variable with XYZAB five-axis input. For the sake of simplicity, assume that there are only two inputs X and Y, and use Z to represent the error. Then the error value is a surface in the XYZ three-dimensional space. The height of a point Z1 on this surface is the compensation amount of the corresponding X1Y1 value. Similarly, the compensation amount of XYZAB is a surface in the 6-dimensional space. A rough compensation of step 4 has been added in step 7, so the remaining actual error of step 8 is already a very small amount. It can be understood that the error remaining after compensation can be basically ignored. Of course, if the error is still large after step 7, step 8 is needed to further optimize the W weight so that the compensated value is closer to the correct measurement value.

Claims

1. A method for adjusting the hole normal direction based on machine learning, characterized in that: The invention comprises a pressure foot (1) and a universal support foot (2) connected to the bottom spherical surface of the pressure foot (1). The pressure foot (1) is provided with three normal sensors (3). The noses of the three normal sensors (3) are in contact with the positioning surface on the universal support foot (2). By measuring the distance readings from the body of the three normal sensors (3) to the noses, it is determined whether the main axis passing through the pressure foot (1) is in the normal position. The normal adjustment and learning process comprises the following steps: Step 1: Determine the theoretical normal direction; Step 2: Use a random function to control the coordinate system of the TCP tool tip to leave the theoretical normal position, and record the deviation angle and the measured readings of the three normal sensors; Step 3: Use theoretical kinematics to calculate the theoretical estimated readings of the three normal sensors when the joint axes XYZAB are at the same position as in step 2, where XYZ represents movement along the XYZ axes, A represents rotation around the X axis, and B represents rotation around the Y axis; Step 4: By comparing the data of step 2 and step 3, the variation data of the error of the normal reading with the angle are obtained; Step 5: Change the clamping force and repeat steps 2 to 3; Step 6. Change the Z height and repeat steps 2 to 5; Step 7. Arrange the recorded data as a sample set and use the multivariate linear regression method in machine learning to obtain the relationship between the error of the normal reading and the angle, clamping force, and Z height. The regression equation is as follows: in, is a constant, is the weight of each variable, It is the component of normal error, including the normal readings of A-axis and B-axis, the current clamping force, the height of z-axis, etc. The data recorded in steps 2 to 6 are used as the label value y for machine learning training and organized into the following form: Y=Xw Among them, Y is a matrix that stores a large amount of y label value data, and X is The known quantity matrix, W is Unknown quantity matrix; Therefore, the loss function is defined as follows: This equation is used as a loss function model in machine learning. By solving a set of optimal solutions, the value of this function is minimized, that is, a set of W values ​​that minimize the difference between the theoretical normal value and the actual normal value, and then a final error value x is obtained. i w, this error value is the compensation amount to be added to the theoretical kinematic model to obtain a compensation amount suitable for the joint axis coordinates at this time; Step 8: Solidify into the final accurate model.

2. The method for adjusting the hole normal direction based on machine learning according to claim 1, characterized in that The determination of the theoretical normal direction is as follows: the distance readings of the three nose sensors when the positioning surface on the universal support leg is completely perpendicular to the main axis are obtained by a precise calibration tool, and this value is used as the theoretical normal direction.

3. The method for adjusting the hole normal direction based on machine learning according to claim 1, characterized in that The specific process of solidifying the final precise model in step eight is as follows: applying the model obtained from the preliminary training to the machine adjustment algorithm, superimposing the compensation amount given by the machine learning model on the target joint axis coordinates calculated by theoretical inverse kinematics and recording the remaining actual error each time, and using the data accumulated in the actual trial processing production as a training set of machine learning data to further improve the accuracy of the algorithm model, reduce the remaining actual error each time, and finally solidify it into the final precise model.