Modeling and compensation method for the spindle's radial thermal drift error in a horizontal CNC lathe

10838392 ยท 2020-11-17

Assignee

Inventors

Cpc classification

International classification

Abstract

The invention provides a method for modeling and compensating for the spindle's radial thermal drift error in a horizontal CNC lathe, which belongs to the field of error compensation technology of CNC machine tools. Firstly, the thermal drift error of two points in the radial direction of the spindle and the corresponding temperature of the key points are tested; then the thermal inclination angle of the spindle is obtained based on the thermal tilt deformation mechanism of the spindle, and the correlation between the thermal inclination angle and the temperature difference between the left and right sides of the spindle box is analyzed. According to the positive or negative thermal drift error of the two points that have been measured and the elongation or shortening of the spindle box on the left and right sides, the thermal deformation of the spindle is then classified and the thermal drift error model under various thermal deformation attitudes is then established. Then the influence of the size of the machine tool's structure on the prediction results of the model is analyzed. In real-time compensation, the thermal deformation attitude of the spindle is automatically judged according to the temperature of the key points, and the corresponding thermal drift error model is automatically selected to apply the compensation to the spindle. The method is used to distinguish the thermal deformation attitude of the spindle in a CNC lathe, and the thermal deformation mechanism is used to predict the radial thermal drift error of the spindle.

Claims

1. The invention relates to a method for modeling and compensating for the spindle's radial thermal drift error in a horizontal CNC lathe, comprising: measuring the radial thermal drift error and the temperature of the key points of the spindle of a CNC; lathe, said measuring the radial thermal drift error comprising: testing the radial thermal drift error and temperature of the spindle of a CNC lathe; using two temperature sensors respectively to measure the temperatures T.sub.1 and T.sub.2 of both the left and right sides of the spindle box, using two displacement sensors to measure the error in the X direction of the two location points of the detecting check bar clamped by the spindle; during the test, heating the spindle by rotating the spindle at a certain speed for a few hours, and then stopping the spindle for a few hours to cool down, wherein the thermal error e.sub.i of the spindle in the vertical direction produces the thermal error component e.sub.i,x in the X direction, and the thermal errors e.sub.1,x and e.sub.2,x of the spindle in the X direction are calculated according to the following formula:
e.sub.2,x=sin(.sub.xdir)e.sub.2(1)
e.sub.1,x=sin(.sub.xdir)e.sub.1(2) wherein in the above formula, .sub.xdir is the tilt angle of the X axis of lathe, i=1 or 2, 1 indicates the right side and 2 indicates the left side; analyzing between the thermal inclination and the temperature difference of the spindle, said analyzing comprising: calculating the thermal dip angle of the spindle, after being heated, using the following formula: s = arctan e 1 , x - e 2 , x sin ( xdir ) L snr ( 3 ) wherein in the above formula, .sub.s is the thermal dip angle of the spindle and L.sub.snr is the distance between the two error measuring points; determining the relation diagram between the thermal dip .sub.s of the spindle and the difference of the two temperatures T is then determined, T=T.sub.1T.sub.2, analyzing the similarity of the two curves; and calculating the correlation between .sub.s and T according to the following formula: R ( s , T ) = Cov ( s , T ) Cov ( s , s ) Cov ( T , T ) ( 4 ) wherein in the above formula, R is the correlation matrix between .sub.s and T, Cov (.sub.s, T) is the covariance matrix between .sub.s and T; setting up the error models of the spindle's radial thermal drift under different thermal deformations, and setting up comprising: according to the sign of the two error data points, e.sub.1,x and e.sub.2,x, and the extension or shortening of the spindle box on the left and right sides, dividing the thermal deformation of the spindle into three categories and ten types; then .sub.1 is the thermal change on the left side of the spindle box and .sub.r is the thermal variation on the right side of the spindle box, both .sub.1 and .sub.r are positive for thermal expansion and negative for thermal contraction; d.sub.crs is the distance from the intersection point of the spindle in the initial state and the deformed spindle to the right side of the spindle box, d.sub.spl is the distance between the left and right ends of the spindle box, d.sub.ss is the horizontal distance between the right end of the spindle box and the left displacement sensor, d.sub.snr is the horizontal distance between the left displacement sensor and the right displacement sensor; when the spindle has the thermal deformation attitude that .sub.l>.sub.r0, and the check bar is close to the left displacement sensor and the right displacement sensor, the relationship between the radial thermal drift error of the spindle and the temperature is then established; the linear relationship between the thermal expansion of the left and right sides of the spindle box and the temperature is expressed by the formulas (5) and (6):
.sub.1(t)=.sub.l1(T.sub.1(t)T.sub.1(0))+.sub.p2(5)
.sub.r(t)=.sub.r1(T.sub.2(t)T.sub.2(0))+.sub.r2(6) wherein in the above formulas, .sub.l1, .sub.l2, .sub.r1 and .sub.r2 are the coefficients to be identified; wherein when the spindle has the thermal deformation attitude that .sub.l>.sub.r0, and the check bar is close to the left displacement sensor and the right displacement sensor, the d.sub.crs(t) for any time t can be calculated from formula (7): d crs ( t ) = r ( t ) l ( t ) - r ( t ) d spl ( 7 ) ; and calculating the thermal drift errors, e.sub.1,x(t) and e.sub.2,x(t), of the spindle in the X direction at any time t by formulas (8) and (9): e 2 , x ( t ) = l ( t ) d ss - r ( t ) d ss - r ( t ) d spl sin ( xdir ) - 1 d spl ( 8 ) e 1 , x ( t ) = ( l ( t ) - r ( t ) ) ( d ss + d snr ) - r ( t ) d spl sin ( xdir ) - 1 d spl ( 9 ) analyzing the influence of the influence of the size of the machine tool's structure on the predicted result of the model, said analyzing comprising: analyzing the influence of the measurement bias of d.sub.spl and d.sub.ss in the thermal drift error model on the predicted results of the model; analyzing the reliability of the fluctuation value of the predicted residuals within a certain allowable deviation range using the asymptotic integration method; the expression of the function Z for the problem is described as:
Z=gx(X)=.sub.a(d.sub.spl,d.sub.ss)(10) wherein in the above formula, X is a random vector composed of d.sub.spl and d.sub.ss, is the allowable deviation index, .sub.a is the fluctuation value of the predicted residuals and is defined as: a ( d spl , d ss ) = .Math. i = 1 N .Math. R ( i ) - R n ( i ) .Math. N ( 11 ) wherein in the above formulas, R is the predicted residual of d.sub.spl and d.sub.ss as random variables, which is a function of d.sub.spl and d.sub.ss, R.sub.n is the predicted residual of the model when d.sub.spl and d.sub.ss are true values, and N is the number of sampling points when the thermal error is measured; wherein if f.sub.x(x) is a joint probability density function of X, then the probability that the fluctuation value of the predicted residuals do not fall within a certain allowable deviation range is calculated from formula (12):
p.sub.f=.sub.gx(x)0 exp [h(x)]dx(12) wherein in the above formulas, h(x)=ln f.sub.x(x); wherein if x*=(d.sub.spl*,d.sub.ss*).sup.T is a point on the surface of the limit state, at this point then h (x) is expanded into a Taylor series and taken to the quadratic term: h ( x ) = h ( x * ) + 1 2 T B - 1 2 ( x - x * - B ) B - 1 ( x - x * - B ) ( 13 ) wherein in the above formulas:
=h(x*)(14)
B=[.sup.2h(x*)].sup.1(15) wherein the limit state surface Z=gx(X)=0 is replaced by a hyperplane at point x* to realize the asymptotic integration of the probability that the fluctuation value of the predicted residual error exceeds the allowable range; wherein the First-order Second-moment Method is used to calculate the reliability index that the fluctuation value of the predicted residuals belongs in a certain allowable deviation range according to formula (16): L = Z L Z L = [ g x ( x * ) ] T B [ g x ( x * ) ] T B g x ( x * ) ( 16 ) wherein the First-order Second-moment Method is used to calculate the failure probability index that the fluctuation value of the predicted residual belongs in a certain allowable deviation range according to formula (17): p fL = ( 2 ) n / 2 det B f x ( x * ) exp ( T B 2 ) ( - L ) ( 17 ) wherein according to the Lagrange multiplier method for solving optimization problems, the multiplier is introduced; From L ( x * , ) x = 0 , which is one of the stationary value conditions of the functional L (x,)=h(x)+gx(x), the following result is then obtained: g x ( x * ) = - 1 h ( x * ) = - ( 18 ) wherein by substituting formula (18) into formula (16), the following result is obtained:
.sub.L={square root over (.sup.TB)}(19) wherein by substituting formula (19) into formula (17), the following result is obtained: p fL ( 2 ) ( n - 1 ) / 2 f x ( x * ) det B T B ( 20 ) , and wherein the reliability that the fluctuating value of the predicted residuals, calculated by the asymptotic integration method, falls within a certain allowable deviation range is then obtained according to (21):
p.sub.r=1p.sub.fL(21) ; and determining of the spindle's thermal deformation attitude and model, said determining comprising: judging the thermal deformation .sub.l, .sub.r and d.sub. of the two sides of the spindle box using the thermal deformation attitude of the spindle (1) which changes irregularly in the processing process; where d.sub. is the distance from the intersection point of the spindle in the initial state and the deformed spindle to the right side of the spindle box (2); calculating, under the various thermal deformation attitudes, the formulas of d.sub. from formula (22): d ( t ) = d spl .Math. r 1 ( T 2 ( t ) - T 2 ( 0 ) ) + r 2 l 1 ( T 1 ( t ) - T 1 ( 0 ) ) - r 1 ( T 2 ( t ) - T 2 ( 0 ) ) + l 2 - r 2 .Math. ( 22 ) wherein the criteria for determining the thermal deformation attitudes of the spindle are set as follows: attitude (1): .sub.l>.sub.r0, d.sub.d.sub.ss attitude (2): .sub.r<0<.sub.l attitude (3): .sub.r.sub.l<0 attitude (4): .sub.l<.sub.r<0, d.sub.ss+d.sub.snr<d.sub. attitude (5): .sub.l>.sub.r0, d.sub.ss<d.sub.<d.sub.ssd.sub.snr attitude (6): .sub.l<.sub.r<0, d.sub.ss<d.sub.d.sub.ss+d.sub.snr attitude (7): .sub.l>.sub.r0, d.sub.ss+d.sub.snr<d.sub. attitude (8): .sub.r>.sub.r0 attitude (9): .sub.l<0<.sub.r attitude (10): .sub.l<.sub.r<0, d.sub.d.sub.ss considering the thermal tilt of the spindle, compensating the different errors for different lengths of the workpieces-; if d.sub.wp is the distance between the processed point on the workpiece and the end face of the chuck, and d.sub.s is the distance between the left displacement sensor and the end face of the chuck; under the various thermal deformation attitudes, whether d.sub.wp<d.sub.s, d.sub.s<d.sub.wp<d.sub.s+d.sub.snr or d.sub.wp>d.sub.s+d.sub.snr, the amount of thermal error compensation e.sub.wp of the machined spot on the workpiece is then calculated in accordance with formula (23): e wp = e 2 , x ( d s + d snr - d wp ) - e 1 , x ( d s - d wp ) d snr ( 23 ) ; and inputting the thermal error's predicted value e.sub.wp is into the CNC system of the machine tool in real time to realize thermal error compensation for the spindle of the CNC lathe at any position or time.

Description

DESCRIPTION OF FIGURES

(1) FIG. 1 shows the configuration of the spindle system and the layout of the temperature sensor.

(2) FIG. 2 shows the error test instrument and its installation diagram.

(3) FIG. 3 shows the decomposition diagram of the radial thermal drift error of the spindle.

(4) FIG. 4 shows the schematic diagram of the spindle in its initial thermal equilibrium state.

(5) FIGS. 5(a)5(d) show the diagram of the spindle's thermal deformation attitude in the CNC lathe;

(6) FIG. 5(a) shows the thermal deformation attitude (1) under the condition of e.sub.1>0, and e.sub.2>0;

(7) FIG. 5(b) shows the thermal deformation attitude (2)-(4) under the condition of e.sub.1>0, and e.sub.2>0;

(8) FIG. 5(c) shows the thermal deformation attitude (5) under the condition of e.sub.1>0, and e.sub.2<0; as well as the thermal deformation attitude (6) under the condition of e.sub.1<0, and e.sub.2>0;

(9) FIG. 5(d) shows the thermal deformation attitude (7)-(10) under the condition of e.sub.1<0, and e.sub.2<0.

(10) FIG. 6 shows the flow chart of the modeling and compensation for the radial thermal drift error of the spindle.

(11) FIGS. 7(a)7(b) show the error and temperature diagram of the spindle at different rotational speeds;

(12) FIG. 7(a) shows the spindle's error values in the X direction;

(13) FIG. 7(b) shows the temperature values on the left and right sides of the spindle box.

(14) FIG. 8 shows the diagram of the relationship between the thermal dip angle and the temperature difference of the spindle.

(15) FIG. 9 shows the transition diagram of the thermal deformation state at 4000 rpm.

(16) FIGS. 10(a)10(c) show the simulation result of the spindle at each of the speeds listed below;

(17) FIG. 10(a) shows the result under the condition of 2000 rpm;

(18) FIG. 10(b) shows the result under the condition of 3000 rpm;

(19) FIG. 10(c) shows the result under the condition of 4000 rpm;

(20) FIG. 11 shows the data diagram before and after compensation for the spindle at 4000 rpm.

(21) FIG. 12 shows the data diagram before and after compensation for the spindle at 3500 rpm.

(22) In the figure: 1 spindle; 2 spindle box; 3 left side temperature sensor; 4 right side temperature sensor; 5 check bar; 6 displacement sensor bracket; 7 left side displacement sensor; 8 right side displacement sensor; 9 chuck.

MODE OF CARRYING OUT THE INVENTION

(23) In order to make the purpose, technical proposal and the advantages of the invention clearer, the present invention is described in detail in combination with a specific embodiment of the measurement, and the modeling and compensation for the spindle's radial thermal drift error, with reference to the drawings.

(24) The description provides a detailed embodiment and a specific operation process based on the technical proposal of the invention, but the scope of the protection of the invention is not limited to the following embodiments.

(25) The X-axis saddle of the horizontal CNC lathe has a tilt angle of 60. The mechanical spindle 1 is installed horizontally on the bed and is driven by a belt; the highest rotational speed of which is 5000 rpm. The distance between the two sides of the spindle box 2 is 356 mm. The distance between the right side of the spindle box 2 and the left side displacement sensor 7 during the test is 251 mm. The distance between the left displacement sensor 7 and the right displacement sensor 8 is 76.2 mm.

(26) The specific steps taken are as follows:

(27) Step one: measurement of the radial thermal drift error and the temperature of the key points of the spindle in the CNC lathe

(28) When testing the radial thermal drift error and temperature of the spindle 1 in the CNC lathe, two temperature sensors are used respectively to measure the temperatures T.sub.1 and T.sub.2 of both the left and right sides of the spindle box 2 (FIG. 1). Two displacement sensors are used to measure the error in the X direction of the two position points of the detecting check bar 5 clamped by the spindle 1 (FIG. 2). During the test, the spindle 1 is first rotated for 4 hours at 4000 rpm, and then the spindle 1 is stopped and left for 3 hours, and the error and the temperature data are then collected. In the same way, the error and temperature data of the spindle at 3000 rpm and 2000 rpm are collected.

(29) Thus, the X direction's thermal drift errors e.sub.1, and e.sub.2, of the two measured points in the process of heating and cooling of the spindle 1 at different rotational speeds, as well as the temperatures of the left and right sides of the spindle box 2 (T.sub.1 and T.sub.2), are obtained. As shown in FIG. 7.

(30) Step two: correlation analysis between the thermal inclination and the temperature difference of the spindle.

(31) The thermal dip angle of the spindle 1 is calculated according to formula (3), and the relationship diagram between the thermal inclination .sub.s and the temperature difference (T=T.sub.1T.sub.2) of the spindle 1 at different rotational speeds is then plotted (FIG. 8). It can be seen that at different speeds, there is a strong correlation between .sub.s and T.

(32) Furthermore, the correlation between .sub.s and T is calculated according to formula (4). At speeds of 4000, 3000 and 2000 rpm, the correlation coefficients between the thermal dip .sub.s and the temperature difference T are 0.898, 0.940 and 0.992, respectively. Through these results, it can be further seen that there is a strong correlation between the thermal dip .sub.s and the temperature difference T at different rotational speeds, which fully shows that the thermal tilt of the spindle is mainly caused by the temperature difference between the two sides of the spindle box.

(33) Step three: the error models of the spindle's radial thermal drift under different thermal deformations.

(34) All possible thermal deformation attitudes of the spindle 1 are analyzed. Then according to the signs of the two error data readings, e.sub.1,x and e.sub.2,x, and the extension or contraction of the spindle box 2 on the left and right sides, the thermal deformation of the spindle 1 is divided into three categories and ten types, as shown in FIG. 5. Taking the thermal deformation attitude (1) in FIG. 5 as an example, the relationship between the radial thermal drift error of the spindle 1 and the temperature is then established. Although the temperatures on the left and right sides of the spindle box are not identical, the temperature field of the spindle box is continuous and approximately linear. Therefore, a linear relationship between the thermal expansion of the two sides of the spindle box and the temperature is then established, and the dynamic change of the thermal expansion of the two sides of the spindle box is characterized by the temperature. The relation model is expressed as formulas (5) and (6).

(35) For the thermal deformation attitude shown in FIG. 5 (1), d.sub.crs(t) for any time t can be calculated by formula (7).

(36) The thermal drift errors, e.sub.1,x(t) and e.sub.2,x(t), of the spindle 1 in the X direction at any time t can be calculated by formulas (8) and (9).

(37) The model of the relation between the thermal error and the temperature of the thermal deformation attitude shown in FIG. 5 is then obtained with reference to FIG. 5 (1).

(38) The thermal variations .sub.l and .sub.r of the two sides of the spindle box 2 are obtained using the test error values, e.sub.1,x and e.sub.2,x, at 4000 rpm, respectively. Thus, from formulas (5) and (6), the independent variables, T.sub.1 and T.sub.2, and the dependent variables, .sub.l and .sub.r, are known, and the least squares method is then used to identify their parameters. The identified parameters are shown in Table 1.

(39) TABLE-US-00001 TABLE 1 Identified parameters Parameters Parameter value .sub.l1 5.26 .sub.l2 2 .sub.r1 4.37 .sub.r2 2

(40) Step four: analysis of the influence of the size of the machine tool's structure on the prediction result of the model.

(41) For this horizontal CNC lathe, d.sub.spl=356 mm, d.sub.ss=251 mm, d.sub.snr=76.2 mm. The measured values of d.sub.spl and d.sub.ss are set to fluctuate within a certain range and they meet the mean values .sub.d.sub.spl=350 and .sub.d.sub.ss=257, with a variance of .sub.d.sub.spl.sup.2=24 and .sub.d.sub.ss.sup.2=19, respectively. As the distribution types of the measured values of d.sub.spl and d.sub.ss are unknown, the asymptotic integral method is then used to analyze the reliability of the fluctuation value of the predicted residual error being less than 1 m. For this problem, the expression of its function Z is defined as in formula (10).

(42) According to formulas (12)-(20), the reliability of the fluctuation value of the predicted residual error being less than 1 m is calculated to be

(43) p r = 1 - ( 2 ) ( n - 1 ) / 2 f x ( x * ) det B v T B 1
using the asymptotic integration method.

(44) As can be seen, p.sub.r is approximately equal to 1, indicating that the fluctuations in d.sub.spl and d.sub.ss have little effect on the predicted results. Therefore, although the values of d.sub.spl and d.sub.ss measured in the test site have errors, they do not affect the prediction accuracy of the model.

(45) Step five: determination of the spindle's thermal deformation attitude and model selection.

(46) The thermal deformations .sub.l, .sub.r and d.sub. of the two sides of the spindle box 2 are used to judge the thermal deformation attitude of the spindle 1 which changes irregularly in the processing process. Where d.sub. is the distance from the intersection point of the spindle 1 in the initial state and the deformed spindle 1 to the right side of the spindle box 2; under various thermal deformation attitudes, the value of d.sub. is calculated from formula (22).

(47) According to the criteria for determining the ten thermal deformation attitude of the spindle 1, FIG. 9 shows the thermal attitude switching diagram obtained by the spindle 1 at 4000 rpm according to the above criteria. It can be seen that, in the time range of 0 to 0.57 h, the spindle has the attitude (1); in the time range of 0.58 and 0.71 h, the spindle has the attitude (5); in the time range of 0.72 h to 4.93 h, the spindle has the attitude (7); in the time range of 4.94 h and 7 h, the spindle has the attitude (8).

(48) Since the spindle 1 generates a thermal tilt error, the amount of compensation required for workpieces of different lengths is different. Setting that d.sub.wp is the distance between the processed point on the workpiece and the end face of the chuck 9, and d.sub.s is the distance between the left displacement sensor 7 and the end face of the chuck 9; for the ten thermal deformation attitudes shown in FIG. 5, when d.sub.wp<d.sub.s, d.sub.s<d.sub.wp<d.sub.s+d.sub.snr and d.sub.wp>d.sub.s+d.sub.snr, the amount of thermal error compensation e.sub.wp of the machined spot on the workpiece is then calculated in accordance with formula (23).

(49) FIG. 10 shows the simulation results for the spindle 1 at different speeds. Where e.sub.1,x,t represents the test value of e.sub.1,x, e.sub.1,x,c, represents the calculated value of e.sub.1,x, e.sub.1,x,r represents the simulated residual value of e.sub.1,x, e.sub.2,x,t represents the test value of e.sub.2,x, e.sub.2,x,c represents the calculated value of e.sub.2,x, and e.sub.2,x,r represents the simulated residual value of e.sub.2,x.

(50) Under the condition of compensation and non-compensation, the experiment is carried out again at 4000 rpm and 3500 rpm on the horizontal CNC lathe, and the two temperature sensors and two displacement sensors are used to collect the temperature and the thermal error of spindle 1 at the same time. The comparison of before and after compensation is shown in FIG. 11 and FIG. 12.

(51) It should be noted that the above specific embodiments of the invention are only used to illustrate the principles and processes of the invention and do not constitute a limitation to the invention. Accordingly any modification and equivalent substitution made without departing from the spirit and scope of the present invention shall be covered by the protection of the present invention.