Five-axis turning and milling composite machining contour error online estimation and compensation methodTechnical Field
The invention relates to a method for estimating and compensating a contour error during five-axis turning and milling combined machining of a mechanical part, and belongs to the technical field of dynamic error compensation of numerical control machine tools.
Background
The multi-shaft turning and milling composite processing technology can finish all the processing of turning, milling, drilling, boring, tapping and the like through one-time clamping, has wide process range and strong capability, and becomes one of the most advanced mechanical processing technologies in equipment manufacturing technologies. The processing contour error and compensation technology for the two-axis and three-axis linkage machine tool is perfect, and the five-axis contour error not only comprises the tool tip contour error but also comprises the tool orientation contour error, and the two are mutually coupled, so that the estimation and compensation of the five-axis contour error are more difficult compared with the three-axis contour control. In particular to a contour error estimation and compensation technology for multi-axis turning and milling combination, the current research is less and the difficulty is higher. Therefore, the on-line estimation and compensation method for the five-axis turning and milling composite machining contour error is studied, and the method has important significance for improving the precision of the five-axis turning and milling composite machining, improving the performance of a five-axis turning and milling composite machining center and the like.
In the aspect of improving the machining precision, five-axis turning and milling compounding mainly machines some complex curved surface parts, and related researches mainly focus on space error control of a machine tool, but have less research on precision control of a track during machining of the complex curved surface parts. The disclosed technical literature (lathe and hydraulic pressure, 2023,51 (24): 157-163) of the lathe and milling composite numerical control machine tool space error modeling and compensation realizes the offline compensation of five-axis lathe and milling composite machining errors, improves the flexible machining manufacturing and flexible error compensation of the lathe, solves the limitations of the existing method, but does not consider how to improve the precision of the machining track of the complex curved surface part.
The Chinese patent document CN116859821A discloses a post-processing method for optimizing a four-axis turning and milling composite processing track, and a tool position point sparsification processing algorithm for sparsifying a tool position track optimized by a tool position track optimization algorithm is constructed by taking an included angle between adjacent tool positions as a constraint, so that the processing precision can be effectively improved, but the method only compensates the generated contour error, cannot estimate and compensate the error on line in real time, and cannot optimize the five-axis turning and milling composite processing track with a B swinging head.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides an online estimation and compensation method for the five-axis turning and milling composite machining contour error so as to improve the machining contour precision of the five-axis turning and milling composite to the complex curved surface part.
The invention discloses an online estimation and compensation method for five-axis turning and milling composite machining contour errors, which comprises the following steps:
(1) Constructing and solving a motion chain model of the five-axis turning and milling composite numerical control machine tool based on a rotation theory, and further deducing forward and reverse motion dynamic solutions of a cutter point and a cutter shaft direction to realize synchronous motion of straight line and rotation;
(2) Estimating tracking errors of all active drivers through interpolation position commands according to the inverse Jacobian matrix to obtain a contour error estimated value at the next moment, and feeding back estimated axis components of the contour errors to the position commands of all closed-loop servo drivers through proportional gains;
(3) Substituting the predicted compensation quantity of each axis profile error into the ideal motion position of the corresponding feed axis to obtain a compensated tool position point, converting tool position track data of the part to be processed into NC codes which can be recognized by a five-axis turning and milling compound numerical control machine tool through a post processor, replacing each feed axis coordinate in the original NC codes, and then using the NC codes for actual processing, thereby improving the profile precision of the tool processing track and finally improving the profile precision of the complex curved surface part.
The step (1) specifically comprises the following steps:
① Establishing a machine tool coordinate system, a workpiece coordinate system and a tool coordinate system;
② Establishing a direction vector of each moving part of the five-axis turning and milling compound numerical control machine tool;
③ Establishing a kinematic chain model of the cutter to the workpiece;
④ Constructing a positive kinematic model of the five-axis turning and milling composite numerical control machine based on the rotation theory;
⑤ Deducing the inverse kinematics solution of the moving direction of the cutter point and the inverse kinematics solution of the rotating direction of the cutter shaft.
The process for establishing the direction vector of each moving part of the five-axis turning and milling composite numerical control machine tool by ② is as follows:
setting a five-axis turning and milling compound numerical control machine tool, wherein the direction change of a cutter is realized by the rotation of a swinging head B, the position change of the cutter is realized by the movement of X, Y, Z, a C-axis drives a workpiece to rotate, and the direction of a workpiece coordinate system is consistent with that of a machine tool coordinate system;
Machine tool coordinate system (Xb,Yb,Zb), tool coordinate system (Xt,Yt,Zt), workpiece coordinate system (Xw,Yw,Zw), let p= (Px,Py,Pz)T represent the position of the tool tip point, o= (Oi,Oj,Ok)T represent the arbor vector, (vx,vy,vz) and (ωb,ωc) represent the unit vectors of the positive directions of the moving axis and the rotating axis, respectively, qb and qc are the points on the corresponding rotating axis, respectively.
The ③ process of establishing the kinematic chain model from the cutter to the workpiece is as follows:
Using the mathematical modeling theory of the robot, the relative position and direction of the nth joint with respect to the base coordinate system are represented by a 4×4 homogeneous transformation matrix:
According to the spin theory, for a rotary joint:
Wherein omegai is a unit vector of a rotary joint, qi is a point on a rotary shaft, and for a five-axis turning and milling compound numerical control machine tool, the unit vectors of the rotary joint are respectively expressed as omegab=[0 1 0]T and omegac=[0 0 1]T on a B axis and a C axis;
For a mobile joint:
The homogeneous transformation matrix of the workpiece chain is as follows:
and (5) obtaining a homogeneous transformation matrix of the cutter chain by the same method:
Because the workpiece chain and the cutter chain are analytically represented, the homogeneous transformation matrix of the workpiece chain and the homogeneous transformation matrix (the two formulas above) of the cutter chain are combined to obtain the full-motion chain model of the five-axis turning and milling composite numerical control machine tool:
The ④ process for constructing the positive kinematic model of the five-axis turning and milling composite numerical control machine tool based on the rotation theory is as follows:
Assuming that the position vector and the direction vector of the tool relative to the tool coordinate system are rpt and rot respectively, the positive kinematics of the five-axis turning and milling compound numerical control machine tool is expressed as follows:
Where P and O represent the position and orientation of the tool relative to the workpiece, after solving for the positive kinematics, building an inverse kinematics model, solving for the reference position command (θc,x,y,z,θb), removing the term with the moving joint from the equation, further obtaining the positive kinematics solution of the direction vector:
The ⑤ deduces the process of inverse kinematics of the moving direction of the cutter point and the rotating direction of the cutter shaft, which is:
For the inverse kinematics solution, let u=rot, v=o, the unit vectors of the B and C axes and their vector products are all linearly independent, then a new variable z is defined as:
z=k1ωc+k2ωb+k3(ωc×ωb);
Solving the rotation angle of a B, C-axis turning and milling compound numerical control machine tool under given CL data:
solving the inverse kinematics of the mobile joint, simplifying the formula:
Command for the movement axis:
Sp=[SxSySz]T;
then rewrite
Finally, the kinematic inverse solution of the translational motion is obtained:
The derivation process of the inverse jacobian matrix in the step (2) is as follows:
According to the spin theory, the instantaneous space velocity of the tool relative to the workpiece is:
In the workpiece coordinate system, the position of the knife point:
Will beCarry-inObtaining a jacobian matrix:
deducing a jacobian matrix of the five-axis turning and milling composite numerical control machine tool:
In the step (2), the specific process of estimating the tracking error of each active driver by interpolating the position command to obtain the contour error estimated value at the next moment is as follows:
The general expression for the z-domain transfer function G (z) of the digitally controlled feed system is:
Wherein n is the system order, a1,a2,…,an and b1,b2,…,bn are system parameters, and accordingly, the actual motion position estimated value of the physical axis in the next sampling period is obtained:
According to known forward and reverse kinematics solutions of each transmission shaft, calculating an actual tool position vector estimated value of the next sampling period:
recording the contour error vector of the next sampling period asWherein the method comprises the steps ofRepresenting the contour error of the knife point,Representing the direction error of the cutter shaft, and calculating the prediction compensation quantity of each physical shaft profile error according to the jacobian matrix of the five-shaft turning and milling composite numerical control machine tool:
The method disclosed by the invention is used for constructing and solving a motion chain model of the five-axis turning and milling compound numerical control machine tool based on a rotation theory, deducing forward and backward motion solutions of a tool point and a tool axis direction, estimating tracking errors of all active drivers through interpolation position commands, calculating a tool machining track contour error compensation value by utilizing components of a contour error vector on all machining feed axes, generating a compensated numerical control machining code, and further effectively improving the machining contour precision of the five-axis turning and milling compound pair complex curved surface parts.
The invention constructs and solves the motion chain model of the five-axis turning and milling compound numerical control machine based on the rotation theory, reduces the number of matrix multiplications of the system kinematic solution and is not influenced by numerical morbidity or singular points in view of the advantages of the rotation theory, so that the calculated amount is small, the system has strong anti-interference capability, the synchronous and accurate calculation of the cutter point and the cutter shaft direction errors can be realized, the tracking error of each active driver is estimated on line through interpolation position commands, the contour error pre-estimated value of the next moment can be obtained, the contour error of the cutter processing track can be compensated, the contour precision of the complex curved surface part processing by the five-axis turning and milling compound with the B swinging head can be obviously improved, and the calculation process is stable.
Drawings
FIG. 1 is a flow chart of the five-axis turning and milling composite machining contour error online estimation and compensation method of the invention.
Fig. 2 is a schematic diagram of a kinematic chain model of a five-axis turning and milling compound numerical control machine tool, wherein a curve 1 represents a workpiece kinematic chain, a curve 2 represents a complete kinematic chain, and a curve 3 represents a cutter kinematic chain.
Fig. 3 is a simplified model schematic diagram of a kinematic chain of a five-axis turn-milling compound numerically controlled machine tool.
Fig. 4 is a view of the point position profile error obtained by the method of the present invention. Wherein the axis B1 represents processing time in s, the axis B2 represents the point position profile error value in mm, the curve 1 represents the point position profile error value, and the curve 2 represents the average error value of the point position profile error.
Fig. 5 is a plot of arbor pose profile error obtained using the method of the present invention. Wherein, the B1 axis represents processing time with the unit of s, the B2 axis represents the cutter shaft gesture profile error value with the unit of rad, the curve 1 represents the cutter shaft gesture profile error value, and the curve 2 represents the average error value of the cutter shaft gesture profile error.
Detailed Description
Fig. 1 shows a flow chart of the five-axis turning and milling composite machining contour error online estimation and compensation method of the invention. Fig. 2 illustrates in detail a kinematic chain model of the present invention, using a horizontal five-axis turning and milling compound numerical control machine as an example, wherein curve 1 represents a workpiece kinematic chain, curve 2 represents a complete kinematic chain, and curve 3 represents a tool kinematic chain. Fig. 3 gives a simplified model of the kinematic chain for a better understanding of the model.
The invention relates to an online estimation and compensation method for five-axis turning and milling composite machining contour errors, which is shown in fig. 1 and comprises the following specific steps.
And constructing and solving a motion chain model of the five-axis turning and milling composite numerical control machine tool based on the rotation theory, and further deducing forward and reverse motion solutions of the cutter point and the cutter shaft direction, so as to realize synchronous motion of straight line and rotation.
Because the five-axis turning and milling composite machining contour error online estimation method needs to estimate the tracking error of each active driver through interpolation position commands, forward and backward kinematics solution of the tool tip point and the cutter shaft direction is a precondition, and comprises the following steps:
Establishing a machine tool coordinate system (Xb,Yb,Zb), a workpiece coordinate system (Xw,Yw,Zw) and a tool coordinate system (Xt,Yt,Zt);
Establishing a direction vector of each moving part of the five-axis turning and milling compound numerical control machine tool;
establishing a kinematic chain model of the cutter to the workpiece;
constructing a positive kinematic model of the five-axis turning and milling composite numerical control machine based on the rotation theory;
deducing the inverse kinematics solution of the moving direction of the cutter point and the inverse kinematics solution of the rotating direction of the cutter shaft.
Taking a horizontal five-axis turning and milling compound numerical control machine as an example, setting that the rotation center of a swinging head B attached to a Z axis is parallel to a Y axis, the direction change of a cutter is realized by the rotation of the swinging head B, the position change of the cutter is realized by the movement of X, Y, Z, and a C axis drives a workpiece to rotate, and the direction of a workpiece coordinate system is consistent with that of a machine tool coordinate system.
Let P= (Px,Py,Pz)T, representing the position of the knife tip point; O= (Oi,Oj,Ok)T, representing the knife axis vector; vx,vy,vz) and (ωb,ωc) represent the unit vectors of the positive directions of the moving axis and the rotating axis, respectively, qb and qc are the points on the corresponding rotating axis, respectively.
From the theory of rotation, it is known that for a rotary joint:
Where ωi is the unit vector of the revolute joint and qi is a point on the rotation axis. For a five-axis turn-milling compound numerically controlled machine tool, the unit vectors of the rotary joints are denoted ωb=[0 1 0]T and ωc=[0 0 1]T on the B-axis and C-axis, respectively. For a mobile joint:
The homogeneous transformation matrix of the workpiece chain is as follows:
and similarly, obtaining a homogeneous transformation matrix of the cutter chain:
Because the workpiece chain and the cutter chain are analytically represented, a full-motion chain model of the five-axis turning and milling compound numerical control machine tool can be obtained by combining the formula (4) and the formula (5):
Assuming that the position vector and the direction vector of the tool relative to the tool coordinate system are rpt and rot respectively, the positive kinematics of the five-axis turning and milling compound numerical control machine tool can be expressed as follows:
here P and O denote the position and orientation of the tool relative to the workpiece. After solving the positive kinematics, an inverse kinematics model may be built to find the reference position command for (θc,x,y,z,θb). It is known from studies that the moving joints do not change the direction vector regardless of the position and sequence of the individual moving joints. Thus, the term with the moving joint is removed from the equation, further yielding a positive kinematic solution of the direction vector:
For the inverse kinematics solution, let u=rot, v=o, the unit vectors of the B and C axes and their vector products are all linearly independent, a new variable z can be defined as:
z=k1ωc+k2ωb+k3(ωc×ωb) (9)
Solving the rotation angle of a B, C-axis turning and milling compound numerical control machine tool under given CL data:
solving for inverse kinematics of the mobile joint can simplify the equation:
Command for the movement axis:
Sp=[SxSySz]T (13)
then, equation (12) can be rewritten, resulting in a kinematic inverse solution of the translational motion:
and secondly, solving a reverse jacobian matrix by using the established forward and backward kinematics solutions of the cutter point and the cutter shaft direction, estimating tracking errors of all active drivers by interpolating position commands to obtain a contour error estimated value at the next moment, and feeding back an estimated shaft component of the contour error to the position command of each closed-loop servo driver by using proportional gain.
According to the spin theory, the instantaneous space velocity of the tool relative to the workpiece is:
In the workpiece coordinate system, the position of the knife point:
Bringing equation (15) into equation (16) yields a jacobian matrix:
deducing a jacobian matrix of the five-axis turning and milling composite numerical control machine tool:
The general expression for the z-domain transfer function G (z) of the digitally controlled feed system is:
Wherein n is the system order, a1,a2,…,an and b1,b2,…,bn are system parameters, and accordingly, the actual motion position estimated value of the physical axis in the next sampling period is obtained:
According to known forward and reverse kinematics solutions of each transmission shaft, calculating an actual tool position vector estimated value of the next sampling period:
recording the contour error vector of the next sampling period asWherein the method comprises the steps ofRepresenting the contour error of the knife point,Representing the direction error of the cutter shaft, and calculating the prediction compensation quantity of each physical shaft profile error according to the jacobian matrix of the five-shaft turning and milling composite numerical control machine tool:
Substituting the predicted compensation quantity of the profile error of each shaft into the ideal motion position of the corresponding feed shaft to obtain a compensated tool position point, converting tool position track data of the part to be processed into NC codes which can be recognized by a five-shaft turning and milling compound numerical control machine tool through a post processor, replacing the coordinates of each feed shaft in the original NC codes, and then using the NC codes for actual processing, thereby improving the profile precision of the tool processing track and finally improving the profile precision of the part with a complex curved surface.
FIG. 4 shows a point position profile error map obtained by the method of the present invention, wherein the B1 axis represents the processing time in s, the B2 axis represents the point position profile error value in mm, the curve 1 represents the point position profile error value obtained by the method of the present invention, and the curve 2 represents the point position profile error average value obtained by the method of the present invention, and it can be seen that the point position profile error maximum value obtained by the method of the present invention is about 11x10-3 mm, and the point position profile error average value is about 4.5x10-3 mm.
Fig. 5 shows a diagram of a contour error of a arbor posture obtained by the method of the present invention, wherein the B1 axis represents processing time in s, the B2 axis represents a contour error of a arbor posture in rad, the curve 1 represents a contour error of a arbor posture obtained by the method of the present invention, and the curve 2 represents an average value of a contour error of a arbor posture obtained by the method of the present invention, and it is seen that the maximum value of a contour error of a arbor posture obtained by the method of the present invention is about 9.1x-3 rad, and the average value of a contour error of a arbor posture is about 3.6x-3 rad.
As can be seen from the comprehensive drawings, the method can effectively reduce the contour errors of the cutter point and the cutter shaft in the process of the combined machining of the five-axis turning and milling, and improve the tracking precision of the contour of the combined machining of the five-axis turning and milling. On the basis of realizing synchronous and accurate calculation of the tool tip and the tool shaft attitude errors, the calculated amount is small, the anti-interference capability of the system is strong, the contour errors of the tool processing track can be compensated, and the method has important significance for improving the contour accuracy of complex curved surface part processing by five-axis turning and milling compounding with B swinging heads.