Disclosure of Invention
Aiming at the defects of the prior art, the technical problems to be solved by the invention are as follows: how to provide a method for quickly identifying geometric errors of a large gantry five-surface machining center, which has the advantages of good robustness, strong group search capability, high solving speed and good stability and can avoid falling into a local minimum value.
In order to solve the technical problems, the invention adopts the following technical scheme:
a method for quickly identifying geometric errors of a large gantry five-surface machining center comprises the steps of firstly establishing a geometric error model of a machine tool, adopting a ball bar instrument to carry out measurement analysis on the machine tool, substituting measurement data of the ball bar instrument into the geometric error model, and obtaining an overdetermined equation set of multiple geometric error parameters; solving the overdetermined equation set to obtain each geometric error value; the method is characterized in that a group optimal solution is obtained by adopting a simulated annealing particle swarm algorithm, and then the group optimal solution is used as an initial value of an LM algorithm to carry out simulation solution on the overdetermined equation set.
Further, when solving the over-determined equation set, the following steps are specifically adopted:
s1, randomly initializing the position and the speed of each particle in the population;
s2, evaluating the fitness value of each particle, storing the position and the fitness value of each current particle in Pi of each particle, and storing the position and the fitness value of the individual with the optimal fitness value in all Pbest in Pg;
s3, determining the initial temperature;
s4, determining the fitting value of each Pi at the current temperature according to the following formula:
s5, determining a global optimal substitute value Pg from all Pi by using the roulette strategy, and updating the speed and position of each particle by the following formula:
xij(t+1)=xij(t)+Vij(t+1)
s6, calculating the target value of each particle, and updating the Pi value of each particle and the Pg value of the population;
s7, calculating a temperature reduction operation;
s8, judging whether the iteration reaches a termination condition according to the preset operation precision or program iteration times, if so, stopping searching and outputting the result, and performing subsequent steps, otherwise, repeating the steps S4-S8;
s9, taking the optimal solution Pg of the population as an initial value of an LM algorithm;
s10, let k equal to 0, calculate
If g (x)
k) Stopping calculation and outputting x
kIs an approximate minimum point;
s11, solving an equation set
Solved to d
k;
S12, let m
kTo satisfy
M, let α be a minimum non-negative integer of
k=β
mk,x
k+1=x
k+α
kd
k;
S13, update mukK is made k +1, go to step S10;
wherein
c
1And c
2Is an acceleration factor; r is
1And r
2Is a random number between 0 and 1; t is the number of iterations; n is the number of particles; beta and sigma are parameters between 0 and 1; mu.s
0Greater than 0; ε is the tolerance error.
Further, the geometric error model of the machine tool is established by adopting the following steps:
the geometric errors of the machine tool are first determined, wherein,
the errors in the movement along the X axis are: positioning error deltaxStraightness error delta in the (X) and Y directionsyStraightness error delta in the (X) and Z directionsz(X), roll error εx(X), yaw error εy(X) and Pitch error εz(X);
The errors of the movement along the Y axis are: positioning error deltay(Y), straightness error delta in X directionx(Y), straightness error delta in Z directionz(Y), rolling error εy(Y), yaw error εx(Y) and pitch error εz(Y);
The errors of the movement along the Z axis are: positioning error deltaz(Z), straightness error delta in X directionx(Z), straightness error delta in Y directiony(Z), roll error εz(Z), yaw error εx(Z) and Pitch error εy(Z);
Moving along the W-axisThe errors are respectively: positioning error deltaz(W), straightness error in X direction δx(W), straightness error in Y direction δy(W), rolling error εz(W), yaw error εx(W) and pitch error εy(W);
Determining X, Y, Z, W perpendicularity errors due to orthogonality between coordinate axes, including perpendicularity error S between the X-axis and the Y-axisxyError of perpendicularity S between Y-axis and Z-axisyzError of perpendicularity S between Z axis and X axiszxError of perpendicularity S between W axis and Y axisywAnd the perpendicularity error S between the W axis and the X axiswx;
Dividing the machine tool into a workpiece branch and a cutter branch, respectively obtaining a position matrix of the workpiece relative to the machine tool and a position matrix of the cutter equivalent to the machine tool, wherein the difference value of the two matrixes is a relative displacement error matrix of the cutter and the workpiece, namely a geometric error matrix of the machine tool.
Further, the position matrix of the workpiece with respect to the machine tool is obtained as follows:
the homogeneous transformation matrix containing geometric errors of the X-axis with respect to the bed R is:
then the homogeneous coordinate transformation matrix containing geometric errors of the bed R to X axis coordinate system is:
if the position coordinate vector of the theoretical processing point of the workpiece in the workpiece coordinate system is as follows:
TB=[XB YB ZB 1]T
the homogeneous coordinate transformation matrix of the workpiece B relative to the bed R, which contains geometric errors, is:
the position matrix of the tool corresponding to the machine tool is obtained as follows:
fixing the Z axis, and obtaining homogeneous coordinate transformation from the R axis of the lathe bed to the W axis, homogeneous coordinate transformation from the W axis to the Y axis, and homogeneous coordinate transformation from the Y axis to the cutter respectively as follows:
if the position coordinate vector of the machine tool tip in the tool coordinate system is:
Tt=[0 0 0 1]T
the homogeneous transformation matrix containing the geometric errors of the tool nose T relative to the lathe bed R is as follows:
fixing the W shaft, and obtaining homogeneous coordinate transformation from the bed body R to the Y shaft, homogeneous coordinate transformation from the Y shaft to the Z shaft and homogeneous coordinate transformation from the Y shaft to the cutter respectively as follows:
if the position coordinate vector of the machine tool tip in the tool coordinate system is:
Tt=[0 0 0 1]T
the homogeneous transformation matrix containing the geometric errors of the tool nose T relative to the lathe bed R is as follows:
homogeneous coordinate transformation matrix for making tool equivalent to machine tool
Subtracting a homogeneous coordinate transformation matrix of the workpiece relative to the machine tool
Obtaining a relative displacement error matrix of the tool nose and the workpiece, namely a geometric error matrix of the machine tool:
to pair
And (5) asking for help, and removing the error cubic term and the high-order term to obtain a simplified geometric error model moving along the X, Y, Z coordinate axis.
In conclusion, the method has the advantages of good robustness, strong group search capability, high solving speed, good stability, capability of avoiding falling into a local minimum value and the like.
Detailed Description
The present invention will be described in further detail with reference to examples.
In the specific implementation: as shown in figure 1, a large gantry five-surface machining center is composed of a lathe bed 1, an X axis, a Y axis, a Z axis, a W axis, a cutter 3, a workbench, a workpiece 2 and the like. The machine tool structure has two branches, namely a branch from the machine tool body to a workpiece, namely a machine tool body-X-axis-workpiece, and a branch from the machine tool body to a cutter, namely a machine tool body-W-Y-axis-Z-axis-cutter.
1. Geometric error analysis of large gantry five-surface machining center
In the machine tool structure, a moving pair consists of a guide rail and a slide carriage for a translation shaft. Ideally, the slide carriage only reciprocates in a specified direction, but in actual conditions, the slide carriage and the guide rail have errors such as manufacturing, size, assembly and the like. In addition, errors in the geometric dimensions of the guide surfaces of the guide rails, errors in the parallelism of the guide surfaces, differences in the clearance between the guide rails and the slide carriage, and errors in the shape of the rolling bodies all affect the accuracy of the sliding pairs. Thus, moveThe kinematic pair has errors in directions of various degrees of freedom during the motion process. A kinematic pair has six errors, wherein the six errors comprise 3 translation errors and 3 rotation errors. When moving along the X axis, three translational errors are respectively: positioning error deltaxStraightness error delta in the (X) and Y directionsyStraightness error delta in the (X) and Z directionsz(X); the three rotation errors are respectively: roll error epsilonx(X), yaw error εy(X) and Pitch error εz(X). As can be seen from fig. 1, the W axis specific to the large gantry five-surface machining center is a vertical motion, and the same can be seen: the six errors for the Y axis are: positioning error deltay(Y), straightness error delta in X directionx(Y), straightness error delta in Z directionz(Y), rolling error εy(Y), yaw error εx(Y) and pitch error εz(Y); the six errors for the Z axis are: positioning error deltaz(Z), straightness error delta in X directionx(Z), straightness error delta in Y directiony(Z), roll error εz(Z), yaw error εx(Z) and Pitch error εy(Z); the six errors for the W axis are: positioning error deltaz(W), straightness error in X direction δx(W), straightness error in Y direction δy(W), rolling error εz(W), yaw error εx(W) and pitch error εy(W)。
There are also 5 perpendicularity errors, which refer to errors between the X, Y, Z, W coordinate axes due to orthogonality. In an ideal state, coordinate axes are mutually perpendicular in pairs (except for a Z axis and a W axis), and the two perpendicular axes are not completely perpendicular due to factors such as assembly, so that small-angle deviation is caused. SxyIndicating the error in perpendicularity between the X-axis and the Y-axis, SyzIndicating the error in perpendicularity between the Y axis and the Z axis, SzxIndicating the error in perpendicularity between the Z axis and the X axis, SywIndicating the perpendicularity error between the W and Y axes, SwxIndicating the perpendicularity error between the W axis and the X axis.
2. Large-scale gantry five-surface machining center geometric error rapid identification method combining Simulated Annealing Particle Swarm Optimization (SAPSO) and Levenberg-Marquardt (L-M) algorithm
2.1 modeling of geometric error of large gantry five-surface machining center based on multi-body system
Establishing a universal geometric error model of the machine tool, dividing the machine tool into a workpiece branch and a cutter branch on the basis of a multi-body system theory and a secondary coordinate transformation theory to obtain a position matrix of the cutter relative to the machine tool body and a position matrix of the workpiece relative to the machine tool body, and respectively establishing the position matrix of the cutter relative to the workpiece under an ideal condition and an error state to obtain the universal error model of the machine tool.
2.1.1 homogeneous coordinate transformation of workpiece kinematic chain
(1) Homogeneous coordinate transformation from bed R to X axis
When the X axis moves on the machine tool, 6 geometric errors exist: deltax(X)、δy(X)、δz(X)、εx(X)、εy(X)、εz(X), then the homogeneous transformation matrix containing geometric errors of the X-axis with respect to the bed R is:
then the homogeneous coordinate transformation matrix containing geometric errors of the bed R to X axis coordinate system is:
setting the position coordinate vector of the theoretical processing point of the workpiece in the workpiece coordinate system as follows: t isB=[XB YB ZB 1]T. The homogeneous coordinate transformation matrix of the workpiece B with respect to the machine bed R, containing geometrical errors, is then:
2.1.2 homogeneous coordinate transformation of tool kinematic chain
The Z axis and the W axis of the large gantry five-surface machining center move in the vertical direction, so that the Z axis and the W axis are respectively fixed for modeling.
(1) Fixed Z axis
The homogeneous coordinate transformation from the lathe bed R to the W axis, the homogeneous coordinate transformation from the W axis to the Y axis and the homogeneous coordinate transformation from the Y axis to the cutter can be respectively as follows:
assuming that the position coordinate vector of the machine tool tip in the tool coordinate system is: t ist=[0 0 0 1]TThen the homogeneous transformation matrix containing geometric errors of the tool nose T relative to the bed R is:
(2) fixed W shaft
The homogeneous coordinate transformation from the bed body R to the Y axis, the homogeneous coordinate transformation from the Y axis to the Z axis and the homogeneous coordinate transformation from the Y axis to the cutter can be respectively as follows:
assuming that the position coordinate vector of the machine tool tip in the tool coordinate system is: t ist=[0 0 0 1]TThen the homogeneous transformation matrix containing geometric errors of the tool nose T relative to the bed R is:
2.1.3 geometric error model of large gantry five-surface machining center
Obtaining a homogeneous coordinate transformation matrix of a workpiece relative to a machine tool
Homogeneous coordinate transformation matrix equivalent to machine tool with cutter
And then, the difference value of the two matrixes is a relative displacement error matrix of the tool nose and the workpiece, namely a geometric error matrix of the machine tool:
solving for
When the error cubic term and the higher terms are omitted, a geometric error model which is simplified and moves along the X, Y, Z coordinate axis can be obtained.
2.2 error rapid identification of five-face machining center of large gantry
2.2.1 error identification principle based on ball arm instrument
The research of the geometric error parameter identification method is an important content of the geometric error detection of the numerical control machine tool, and a large amount of research is carried out by scholars at home and abroad. At present, the main methods for identifying relatively mature geometric error parameters include: 9-line method, 12-line method and club instrument identification method.
The ball bar instrument is standard equipment for machine tool precision analysis, and utilizes two shafts of a machine tool to perform circular interpolation by means of a high-precision displacement sensor, analyzes the radius change of a circular arc and the track characteristics of an arc line, and analyzes data by analysis software. The machine tool is measured and analyzed by using a QC20 ball bar instrument of Renishaw, and the QC20 ball bar instrument is arranged on a workbench, and care should be taken to avoid collision during installation, otherwise, the measurement precision is seriously influenced. Adjusting the room temperature to the working temperature of the machine tool, and respectively making circular arc motion in an X-Y, X-Z, Y-Z, X-W, Y-W plane in an unloaded state.
The XY, XZ, YZ, XW, YW plane radial error data are obtained as shown in Table 1.
TABLE 1 XY, XZ, YZ, XW, YW plane radial error values
And substituting the measured data of the ball arm instrument into a geometric error model of the machine tool to obtain an overdetermined equation set about 21 geometric error parameters. The overdetermined equation set refers to an equation set in which the number of the equation sets is more than the number of unknowns. The overdetermined system of equations generally has no exact solution, and in most cases, an approximate solution in some sense is solved. Each geometric error value can be calculated by solving the over-determined equation set. The key point of geometric error identification based on ball bar instrument measurement lies in accurate and rapid solution of an over-determined equation set, the existing ball bar instrument over-determined equation set solving method is a pure particle swarm algorithm which can effectively solve the solution of the equation set, but the algorithm easily falls into a local optimal solution and is slow in solving speed.
2.2.2 geometric error identification algorithm of numerical control machine tool
The particle swarm optimization algorithm is an evolutionary computing technology and is derived from the research on the behavior of predation of birds and animals. The particle updates its velocity and new position according to the following formula.
xij(t+1)=xij(t)+Vij(t+1)
The particle swarm algorithm has the advantages of memorability, high searching speed, few parameters, simple structure and the like, but is easy to fall into local optimum, so that the convergence precision is low and the convergence is difficult.
The simulated annealing algorithm is a general probability algorithm and is used for finding the optimal solution of the problem in a large search space. The idea is derived from the annealing process of the solid, i.e. the solid is heated to a sufficiently high temperature and then slowly cooled, and finally reaches the ground state at normal temperature, with the internal energy minimized. The simulated annealing algorithm has the advantages of simple calculation process, strong universality and robustness, and can be used for solving the complex nonlinear optimization problem but has the defects of low convergence speed, long execution time and the like.
The L-M algorithm is a combination of the gradient descent method and the Gauss-Newton method. When mu is increased, the algorithm is similar to a gradient descent method, and the global characteristic of the algorithm is exerted; when mu is reduced, the algorithm approaches the Gauss-Newton method and exerts the local convergence characteristic. The L-M algorithm adopts approximate second derivative information, so that the required iteration time is short, the convergence is very quick, the stability of the algorithm is good, and the local minimum value is avoided. The iterative formula is as follows:
μk+1=μk-(Ak TAk+μl)-1Ak Tek
the L-M algorithm has local convergence of the Gaussian Newton method and the global characteristic of the gradient descent method, but has extremely high requirements on initial values.
Aiming at the advantages and disadvantages of the algorithm, the simulated annealing particle swarm algorithm is combined with the L-M algorithm, and the advantages of the simulated annealing particle swarm algorithm and the L-M algorithm are combined, so that the hybrid algorithm for solving the nonlinear equation set is provided. The mixed algorithm component exerts the group searching capability of the particle swarm algorithm, the simulated annealing algorithm has the probability jump capability in the searching process, and the local minimum solution and the local fine searching performance of the L-M algorithm can be effectively avoided in the searching process.
The algorithm steps combined with the above requirements are as follows:
s1, randomly initializing the position and the speed of each particle in the population;
s2, evaluating the fitness of each particle, storing the position and the fitness value of each current particle in Pi of each particle, and storing the position and the fitness value of the individual with the optimal fitness value in all Pbest in Pg;
s3, determining the initial temperature, specifically:
s4, determining the fitting value of each Pi at the current temperature according to the following formula:
s5, determining a global optimal substitute value Pg from all Pi by using the roulette strategy, and updating the speed and position of each particle by the following formula:
xij(t+l)=xij(t)+Vj(t+1)
s6, calculating the target value of each particle, and updating the Pi value of each particle and the Pg value of the population;
s7, calculating the temperature reduction operation, specifically Tk+1=CTkC belongs to (0.5,0.99), and the value determines the cooling process;
s8, if the stop condition is met, stopping searching and outputting the result, and performing subsequent steps, otherwise, repeating the steps S4-S8;
s9, taking the optimal solution Pg of the population as an initial value of an LM algorithm;
s10, let k equal to 0, calculate
If g (x)
k) Stopping calculation and outputting x
kIs an approximate minimum point;
s11, solving an equation set
Solved to d
k;
S12, let m
kTo satisfy
M, let α be a minimum non-negative integer of
k=β
mk,x
k+1=x
k+α
kd
k;
S13, update mukK is made k +1, go to step S10;
wherein
c
1And c
2Is an acceleration factor; r is
1And r
2Is a random number between 0 and 1; t is the number of iterations; n is the number of particles; beta and sigma are parameters between 0 and 1; mu.s
0Greater than 0; ε is the tolerance error.
3. Experiments and analyses
3.1 geometric error of five-face machining center of large gantry
Various geometric error coefficients of the large gantry five-surface machining center can be obtained by writing an MATLAB program by combining simulated annealing particle swarm with an L-M algorithm to solve an overdetermined equation set as shown in a table 2.
TABLE 2 geometric error of five-surface machining center of large gantry solved by SAPSO-LM algorithm
And (3) comparison and analysis: the verticality error in the geometric error of the large-scale gantry pentahedral machining center can be obtained in the measurement of the ball bar instrument QC20, and the results of the simplex particle swarm algorithm and the results of the SAPSO-LM algorithm are respectively compared and shown in the table 3.
TABLE 3 comparison of perpendicularity error obtained by two algorithms with the error measured by a ball arm instrument
From table 3, fig. 2 and fig. 3 can be obtained, and it is obvious that the verticality error identified by the SAPSO-LM algorithm is smaller than the difference of the simplex particle swarm algorithm.
3.2 post-compensation experimental verification
And respectively substituting the identification result of the simplex particle swarm algorithm and the identification result of the SAPSO-LM into the error compensation model to respectively obtain the compensated numerical control program. And then respectively substituting three programs (a pre-compensation program, a compensation program after simplex particle swarm algorithm identification and an SAPSO-LM algorithm identification compensation program) into the machine tool and operating to obtain a ball bar instrument result.
The measured results of the geometrical error compensation front ball arm instrument of the large gantry five-surface machining center are shown in figure 4, figure 5 and table 4,
TABLE 4 Compensation of Forward cue Meter operational error data
The geometrical errors of the large gantry five-surface machining center are compensated by a simplex particle swarm algorithm, and the measured results of the ball arm instrument are shown in figure 6, figure 7 and table 5,
TABLE 5 simplex particle swarm algorithm compensated post-cue instrument operation error data
The measured results of the ball arm instrument after the geometric errors of the large gantry five-surface machining center are compensated by adopting the SAPSO-LM algorithm are shown in figure 8, figure 8 and table 6,
TABLE 6 SAPSO-LM Algorithm compensated post-ball rod instrument operational error data
Comparing fig. 4, fig. 5, fig. 6, fig. 7, fig. 8 and fig. 9, it can be known that the simplex particle swarm algorithm can effectively compensate the geometric error of the numerical control machine, but the compensation effect under the identification of the SAPSO-LM algorithm is obviously better than that of the simplex particle swarm algorithm.
4. Conclusion
In order to improve the geometric precision of the large-scale gantry five-surface machining center, a geometric error model of a machine tool is established, a geometric error coefficient of the machine tool is identified by an SAPSO-LM algorithm, and an error compensation model of the machine tool is established. The effectiveness of the algorithm is determined and is superior to the simplex particle swarm algorithm through the dynamic performance test of the ball arm instrument.
The above description is only exemplary of the present invention and should not be taken as limiting, and any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.