RELIABILITY CALCULATION METHOD OF THE THERMAL ERROR MODEL OF A MACHINE TOOL BASED ON DEEP NEURAL NETWORK AND THE MONTE CARLO METHOD

Information

  • Patent Application
  • 20210064988
  • Publication Number
    20210064988
  • Date Filed
    February 26, 2019
    5 years ago
  • Date Published
    March 04, 2021
    3 years ago
Abstract
A method for calculating the reliability of the thermal error model of a machine tool based on deep neural network (DNN) and the Monte Carlo method, which belongs to the field of the thermal error compensation of computer numerical control (CNC) machine tools. Firstly, according to the probability distribution of the thermal parameters and thermal error model, a set of data for training the DNN is generated. Next, the DNN is constructed based on the deep belief networks (DBNs) and trained with the training data. Then, a group of random sampling data is obtained according to the probability distribution of the thermal characteristic parameters of the machine tool, and the group of random sampling is taken as the input and the output is obtained by the trained depth neural network. Finally, the reliability of the thermal error model is calculated based on the Monte Carlo method.
Description
TECHNICAL FIELD

The present invention belongs to the field of the thermal error compensation of computer numerical control (CNC) machine tools, in particular, relates to a method for calculating the reliability of the thermal error model of machine tools based on deep neural network (DNN) and the Monte Carlo method.


BACKGROUND

In the running process of CNC machine tools, screw nuts, bearings, motors, and other components produce a lot of heat. Such heat causes the thermal deformation of the machine tool. Because of the thermal error caused by the thermal deformation of machine tools, the machining accuracy and accuracy consistency of machine tools will be poor. The thermal errors of the machine tool mainly include the feed shaft thermal error and spindle thermal error. Among them, the variation law of the thermal error of spindle is simpler, and it can be eliminated by the tool setting at every other period of time. In contrast, the change of the thermal error of the spindle is time-varying and strongly nonlinear, and it cannot be eliminated by the tool setting. Therefore, scholars have conducted much research on the thermal error modeling and compensation technology of the feed shaft. In the patent A prediction method of thermal deformation of feeding axis (Application NO. CN201711475441.7), aimed at the characteristics of energy consumption, temperature rise, and heat dissipation of the feed shaft movement, a prediction method of thermal deformation of the feed shaft was designed based on the principle of energy conservation. In the patent A thermal error prediction method for ball screw driven axis of CNC machine tools (Application NO. CN201810039994.6), the thermal error of the ball screw feed system could be predicted based on the adaptive real-time model (ARTM).


According to the characteristics of the controlled system in reality, the control model mainly includes the data-driven model and the physical driven model. In recent years, research on the thermal error modeling of the machine tool feed has shown that the physical modeling method is better than the data-driven modeling method. The thermal error model based on physics includes the thermal characteristic parameters of the screw nut pair, which are obtained by the parameter identification experiment. However, when the thermal characteristics of the machine tools change, it is not known whether the thermal error model with fixed thermal parameters is still valid. For example, (1) when the lubrication state of the lead screw changes, the calorific value of unit friction must change accordingly, but there is the question as to whether the prediction effect of the thermal error model is still accurate. (2) To facilitate the test, the protective cover of the machine tool is opened during the parameter identification test while the protective cover is closed during real-time compensation. It is unknown whether the convective heat dissipation coefficient identified when the protective cover is opened is still valid for the closed state of the protective cover. (3) According to the Stribeck friction model, the friction heat per unit length is different at different speeds. Besides, due to the different wind speed, the convective heat dissipation coefficient is also different at different moving speeds. Therefore, it is unknown whether the parameter identification test under specific speed is suitable for various speeds.


The above problems are all about the reliability of model prediction. In the reliability analysis for a general model, if the function is known, then the first and second order moments can be directly applied. However, the thermal error model of the feed shaft based on physics is very complex. The difficulty of the reliability calculation lies in that the function of the model is implicit and there is no explicit analytical expression. The traditional first and second order moment methods cannot be directly applied. Therefore, a reliability calculation method based on DNN and the Monte Carlo method is proposed to solve the reliability calculation problem of the thermal error model of the feed shaft based on physics.


SUMMARY OF THE INVENTION

The present invention provides a method for calculating the reliability of the thermal error model of machine tools based on DNN and the Monte Carlo method given the current situation that there is no method for predicting the reliability of the thermal error model of machine tools. Using this method, the failure probability of the thermal error model of the machine tool can be calculated when the thermal characteristic parameters change.


The technical solution of the invention: Firstly, according to the probability distribution of the thermal parameters and the thermal error model, a set of data for training the DNN is generated. Then, the DNN is constructed based on the deep belief networks (DBN) and trained with the training data. Then, a group of random sampling data is obtained according to the probability distribution of the thermal characteristic parameters of the machine tool, and the group of random sampling is taken as the input and the output is obtained by the trained depth neural network. Finally, the reliability of the thermal error model can be calculated based on the Monte Carlo method. The specific steps are given below.


The first step is to generate data for training depth neural network.


(1) Generating Input Data for Training


Based on the mean value M and the coefficient C of variation of the thermal characteristic parameters of the machine tool, the standard deviation S is calculated according to Equation (1).






S=M×C  (1)


According to the probability distribution of the thermal characteristic parameters of machine tools, the mean value M, and the standard deviation S, a group of random sampling of the thermal characteristic parameters x(i), i=1, 2, . . . , n; are selected. The random sampling is the input data for training.


(2) Generating Output Data for Training


According to Equation (2), the thermal characteristic parameters of the machine tool are calculated, and the mean value is taken, the average prediction residual E of the thermal error model of the machine tool is as follows:






Ē=[Σn=2PΣm=1J|Ec(n,m)|]/[(p−1)×J]  (2)


In Equation (2), P is the total number of the machine tool thermal error tests, J is the number of points for each test of the feed shaft of the machine tool, and Ec (n,m) is the predicted residual value of the m-th test point in the n-th thermal error test when the thermal characteristic parameter is taken as the mean value.


When the value of thermal characteristic parameter x(i) is calculated according to Equation (3), the average predicted residual error ĒRes(i) of the thermal error model of machine tool feed shaft is as follows:






Ē
Res(i)=[Σn=2P|ERes(n,m,i)|]/[(P−1)×J], i=1,2, . . . ,n  (3)


In Equation (3), ERes(n, m, i) is the predicted residual value of the m-th test point in the n-th thermal error test when the thermal characteristic parameter is x(i).


Supposing that function Z(i) is






Z(i)=N−(ĒRes(i)−Ē), i=1,2, . . . ,n  (4)


then, N is the tolerance coefficient, and if [N−(ĒRes(i)−Ē)]≤0, then it can be judged that the thermal error model of the machine tool feed shaft is “reliable”; if [N−(ĒRes(i)−Ē)]>0, then it can be judged that the thermal error model of machine tool feed shaft is “failure”.


The indicator function of this function is






Z
I(i)=I[Z(i)], i=1,2, . . . ,n  (5)


where ZI(i), i=1, 2, . . . , and n is the output data for training.


Then, the second step is the construction and training of the DNN.


The DNN is constructed based on the DBN, and the DNN consists of an M-layer restricted Boltzmann machine (RBM) and a BP network.


The constructed DNN is trained based on the data {x(i),ZI(i)}, i=1, 2, . . . , n. Firstly, the greedy algorithm is used to train the RBM of each layer without supervision.


Then, the feature vector of the RBM in the last layer is used as the input vector for supervised training of the BP network.


In the third step, the thermal characteristic parameters of the machine tool are randomly sampled, and the corresponding network output is calculated.


According to the probability distribution form, the mean value M and the standard deviation S of thermal characteristic parameters of machine tool, xs(i), i=1, 2, . . . , m is generated by random sampling of these parameters, and the value of m is not less than 107.


Taking xs(i) as the input, the output ZsI(i), i=1, 2, . . . , and m is calculated by the trained DNN.


The fourth step is to calculate the reliability of the thermal error model based on the Monte Carlo method.


Based on data ZSI(i), i=1, 2, . . . , m, and according to Equation (6), the failure probability {circumflex over (p)}f of the thermal error model of machine tool is











p
^

f

=


1
m






i
=
1

m




Z
s
I



(
i
)








(
6
)







This invention has the advantages that the influence of the change of the thermal characteristic parameters on the prediction effect of the thermal error model of the machine tool can be quantitatively analyzed, the long-term prediction effect of the thermal error model can be predicted, and the scrap rate can be reduced. Through this method, the thermal characteristic parameters that have a great influence on the prediction effect of thermal error model can be found, the design and operation conditions of machine tool can be optimized, the variation amplitude of the thermal characteristic parameters can be reduced, the prediction stability of the thermal error model can be improved, and the machining accuracy and precision stability of machine tool can be improved.


Compared with the prior art, the present invention is suitable for machine tool thermal error models that have no explicit analytic expression. It provides a scientific method for analyzing and calculating the influence of the change of thermal characteristic parameters on the prediction effect of the thermal error model, and the prediction reliability calculation problem of this kind of model is solved.custom-character





DESCRIPTION OF THE DRAWINGS

The sole FIGURE is a calculation flow chart.





DETAILED DESCRIPTION

To make the object, technical solutions, and advantages of the invention clearer, the invention will be described in detail in combination with the attached drawings. Taking the thermal error model of machine tool feed shaft shown in Equation (7) as an example, the influence of some thermal characteristic parameters changes in the model on the prediction effect can be calculated. The thermal error model of the feed axis discretizes the lead screw into M segments, and each segment length is L. For any element Li of the lead screw, the heat balance equation is as follows:











Δ






Q


(
t
)



=


Q


(
t
)


-


Q
c



(
t
)


-


Q
t



(
t
)











Δ






Q


(
t
)



=

c





ρ






L
i


S





Δ







T

L
i




(
t
)










Q
=

0.12

π






f
w



υ
0



nM
w











Q
c



(
t
)


=

h
×

S


×

(



T

L
i




(
t
)


-


T
f



(
t
)



)

×
Δ





t










Q
t



(
t
)


=

λ
×
S
×



(



T

L
i




(
t
)


-


T

L

i
+
1





(
t
)



)

+

(



T

L
i




(
t
)


-


T

L

i
-
1





(
t
)



)


L

×
Δ





t






(
7
)







In these equations, Q is the heat generated by friction of Li at time t, Qc is the heat exchange between Li and surrounding air at time t, Qt is the heat transfer between Li and microelements at both sides at time t, ΔQ is the difference between the heat generated and heat dissipation of Li, c is the specific heat capacity of lead screw, ρ is the density of lead screw, S is the equivalent cross-sectional area of lead screw, ΔL,(t) is the temperature rise of Li at time t, fw is the coefficient related to the type of nut and the lubrication method, υ0 is the kinematic viscosity of the lubricant, n is the rotating speed of the lead screw, Mw is the total friction moment of the lead screw, h is the heat exchange coefficient, S′ is the cooling area of Li, Tf(t) is the air temperature in contact with the lead screw surface, and λ is the heat conduction coefficient of the lead screw.


When the machine tool is worn, the airflow around the lead screw and the lubrication changes, and the thermal characteristic parameters Q, h, and λ, may change. Therefore, the influence of these parameters' changes on the prediction effect of the thermal error model of the machine tool feed shaft is calculated.


The calculation flow is shown in the FIGURE, and the specific implementation is given below.


The first step is to generate data for training the DNN.


(1) Generating Input Data for Training


The input of the depth neural network is the thermal characteristic parameters Q, h, and λ. Let the changes of Q, h, and λ conform to the normal distribution, and their mean values are 1.04J, 15.14 W/(m2*° C.), and 4.90×10−5 W/(m*° C.), respectively. The coefficients of the variation are 0.08, 0.12, and 0.005. According to Equation (1), the standard deviations of Q, h, and λ, are SQ=0.08J, Sh=1.82 W/(m2*° C.), and Sλ=2.45×10−5 W/(m*° C.), respectively.


Based on the premise of a normal distribution, according to the mean and standard deviation of Q, h, and λ, 2,000 groups of random sampling are obtained {q(i),h(i),λ(i)}(i=1, 2, . . . , 2000), that is, the input data for network training.


(2) Generating Output Data for Training


Based on the thermal error model of the machine tool feed axis, according to Equation (2), the average prediction residual Ē of the thermal error model of the feed shaft is calculated when Q, h, and λ are taken as the mean values.


According to Equation (3), the average residual ĒRes (i), i=1, 2, . . . , 2000, corresponding to each group {q(i),h(i),A(i)}, is calculated.


According to Equation (3), the average residuals ĒRes (i), i=1, 2, . . . , 2000, corresponding to each group {q(i),h(i),λ(i)} are calculated.


According to Equation (4) and Equation (5), the indicator function of the thermal error model function of the feed shaft of the machine tool ZI(i), i=1, 2, . . . , 2000 is calculated, that is, the output data for network training.


The second step is constructing and training deep neural network.


The DNN is constructed based on the DBN. The network consists of a five-layer RBM) and a BP network. In the first RBM, there are 3 neurons in the explicit layer and 9 neurons in the implicit layer. There are 9 neurons in the explicit and implicit layers remaining in the RBM. The output vector of the RBM in the last layer is the input vector of the BP network. The BP network consists of one input layer, one hidden layer, and one output layer. The input layer contains 9 neurons, the hidden layer contains 5 neurons, and the output layer contains 2 neurons.


Based on the data {q(i),h(i),A(i),ZI(i)}, i=1, 2, . . . , 2000, and the constructed deep confidence network is trained. Firstly, the gradient descent method is used for unsupervised training in the RBM of each layer, and then the eigenvector of the upper layer is used as the input vector for supervised training of the BP network.


In the third step, the thermal characteristic parameters are randomly sampled, and the corresponding network output is calculated.


Based on the premise of a normal distribution, 107 groups of random sampling {qs(i),hs(i),λs(i)}(i=1, 2, . . . , 107) can be obtained according to the mean and standard deviation of Q, h, and λ. Taking the random sampling as the input, the trained depth confidence network is applied to calculate the output ZsI(i), i=1, 2, . . . , 107.


The fourth step is to calculate the reliability of the thermal error model based on the Monte Carlo method.


Based on data ZsI(i), i=1, 2, . . . , 107, and, according to Equation (6), the failure probability of the thermal error model of the machine tool. The final calculation result is {circumflex over (p)}f=0.0609.

Claims
  • 1. A method for calculating the reliability of the thermal error model of a machine tool based on deep neural network DNN and Monte Carlo method, wherein, firstly, according to the probability distribution of the thermal parameters and thermal error model, a set of data for training the DNN is generated; next, the DNN is constructed based on the deep belief networks DBNs and trained with the training data; then, a group of random sampling data is obtained according to the probability distribution of the thermal characteristic parameters of the machine tool, and the group of random sampling is taken as the input and the output is obtained by the trained depth neural network; finally, the reliability of the thermal error model is calculated based on the Monte Carlo method; the specific steps are given below: the first step is to generate data for training depth neural network;(1) generating input data for trainingbased on the mean value M and the coefficient C of variation of the thermal characteristic parameters of the machine tool, the standard deviation S is calculated according to Equation (1); S=M×C  (1)according to the probability distribution of the thermal characteristic parameters of machine tools, the mean value M, and the standard deviation S, a group of random sampling of the thermal characteristic parameters x(i), i=1, 2, . . . , n;are selected; the random sampling is the input data for training;(2) generating output data for trainingaccording to Equation (2), the thermal characteristic parameters of the machine tool are calculated, and the mean value is taken, the average prediction residual Ē of the thermal error model of the machine tool is as follows: Ē=[Σn=2PΣm=1J|Ec(n,m)|]/[(P−1)×J]  (2)in Equation (2), P is the total number of the machine tool thermal error tests, J is the number of points for each test of the feed shaft of the machine tool, and Ec (n,m) is the predicted residual value of the m-th test point in the n-th thermal error test when the thermal characteristic parameter is taken as the mean value;when the value of thermal characteristic parameter x(i) is calculated according to Equation (3), the average predicted residual error ĒRes(i) of the thermal error model of machine tool feed shaft is as follows: ĒRes(i)=[Σn=2PΣm=1J|ERes(n,m,i)|]/[(P−1)×J], i=1,2, . . . ,n  (3)in Equation (3), ERes(n, m, i) is the predicted residual value of the m-th test point in the n-th thermal error test when the thermal characteristic parameter is x(i);supposing that function Z(i) is Z(i)=N−(ĒRes(i)−Ē), i=1,2, . . . ,n  (4)then, N is the tolerance coefficient, and if [N−(ĒRes(i)−Ē)]≤0, then it can be judged that the thermal error model of the machine tool feed shaft is “reliable”; if [N−(ĒRes(i)−Ē)]>0, then it can be judged that the thermal error model of machine tool feed shaft is “failure”;The indicator function of this function is ZI(i)=I[Z(i)], i=1,2, . . . ,n  (5)
Priority Claims (1)
Number Date Country Kind
201910125065.1 Feb 2019 CN national
PCT Information
Filing Document Filing Date Country Kind
PCT/CN2019/076112 2/26/2019 WO 00