Background technology
One of basic technology that numerical control machining tool heat error control is accurate and ultraprecise is processed.Machine tool thermal error compensation key step is: the execution and the error compensation Evaluation on effect of the foundation of the detection of error source and analysis, error motion comprehensive mathematical model, the identification of error element, error compensation.
In heat error compensation, the foundation of hot error model is committed step.The experiment modeling is a hot error modeling method the most commonly used, promptly utilizes hot error information that experiment records and lathe temperature value and carries out the match modeling with the principle of least square.Yet; Machine tool thermal error depends on such as multiple factors such as the use of processing conditions, process-cycle, liquid coolant and surrounding environment to a great extent; There is reciprocation, sees that from the statistics angle machine tool thermal error presents nonlinear relationship with the variation of temperature and working time; Its distribution then is abnormal, and is jiggly.Therefore adopt the match modeling method to come accurately to set up hot error mathematic model and have suitable limitation.
In recent years, particularly expert system, neural network theory and fuzzy system theory etc. have also applied in the hot error modeling.Hot error model commonly used has multivariate regression analysis model, neural network model, comprehensive least square modeling, Orthogonal Experiment and Design modeling, recursion modeling or the like.Because hot error became when having usually; Multifactor; Characteristics such as operating mode uncertainty; Make the modeling method of development in recent years have certain limitation, and, the LS-SVM method is applied in the numerical control machining tool heat error Study on Forecast based on the method for analyzing and modeling that the machine tool thermal error of least square method supporting vector machine (LS-SVM) is predicted.This new method can overcome the shortcoming of traditional Forecasting Methodology, has very high precision and generalization ability; According to this forecast model, it is more effective that the numerically-controlled machine real-Time Compensation becomes.
Summary of the invention
The object of the present invention is to provide a kind of modeling method of thermal error least squares support vector machine of numerically-controlled machine.
The technical scheme that the present invention adopts comprises the following steps:
(1) parameter is selected:
The LS-SVM algorithm at first will be selected a kernel function, and confirms following correlation parameter: for kernel function, select RBF nuclear: K (xi, xj)=exp [(xi-xj)2/ (2 σ2)] it has only a undetermined parameter to stare at, its value is big more, and speed of convergence is fast more; But the model that obtains thus; When prediction, can make all predicted values trend towards the mean value of span, the square error of this moment can not reflect real each point data, for the LS-SVM that adopts RBF nuclear; Major parameter is regularization parameter γ and kernel function width cs, these two parameter determining study and the generalization ability of LS-SVM; Select RBF nuclear, problem can be simplified to: seek the combination of adjustable parameter γ and σ, make LS-SVM that estimated performance arranged, each a bit of interval of intercepting γ and σ; On these the two sections interval two dimensional surfaces that constitute, be criterion with the accuracy rate, do search fully; Then can confirm unique [σ, a γ] combination, corresponding high-accuracy; Though this accuracy rate is not necessarily in (∞ ,+optimum solution on ∞), but a satisfactory solution;
1. confirm the span of initial parameter: in span, choose parameter value, make up parameter to (γi, σi) the two-dimensional grid plane, i=1 wherein, 2 ... F, j=l, 2 ... G, for example two parameters are respectively chosen 20 numerical value, and it is right to constitute 20 * 20 grid plans and 400 parameters; Selection of parameter has two kinds of methods: the 1st kind is to confirm two parameter range earlier, again parameter is carried out even value; The 2nd kind is to confirm that according to the characteristic and the experience of training sample parameter is to value;
2. import each mesh node parameter to (γi, σi) in LS-SVM, adopt learning sample to train, and output study error, get least error corresponding nodes value (γi, σi)EminFor optimized parameter right;
3. if the precision of training does not reach needed requirement, then with (γi, σi)EminBe the center, make up new two-dimensional network plane, choose the parameter value of close in value and further train, thereby obtain more high-precision training result; By that analogy, can construct multilayer parameter optimization grid plan, continue to optimize the least square method supporting vector machine parameter, up to reaching the precision that needs;
(2) based on the hot error model of least square method supporting vector machine, prediction error value: LS-SVM returns and estimates to be expressed as following form:
(x)=αiK(x,xi)+b.
Kernel function K (x in the formulai, xj) be the RBF nuclear in the step (1),α,bThen solve by following formula:
The beneficial effect that the present invention has is:
Modeling method based on least square method supporting vector machine is different from traditional match modeling; SVMs regression modeling theory is applied to machine tool thermal error modeling field; Model accuracy and generalization ability have been improved, part shortcoming such as it is low to have overcome existing Forecasting Methodology precision, and generalization ability is low.
Based on the modeling method of least square method supporting vector machine hour, have higher forecast precision equally,, also can carry out the prediction of match fast and accurately, reduced dependence experience to it even on small sample data basis in sample size.
Support vector machine method has improved the self-learning capability of system, and the hot error model that training obtains can reflect that the machine tooling process changes, and has adaptivity.
Heat error compensation system hardware demand is lower, and is simple in structure, has good reliability.
Embodiment
Below in conjunction with accompanying drawing and implementation process the present invention is further described.
It is a kind of inference method based on Statistical Learning Theory for a hot error modeling method according to the invention, realizes according to following steps, and is as shown in Figure 1:
At first consider to produce the correlative factor of hot error, need to confirm the measuring point of image data, lathe is carried out the data sample collection.The related data of each measuring point in the harvester bed operating process under the condition of approximate actual condition.The sample data acquisition system is as shown in Figure 2, and is general, and temperature data is obtained by temperature sensor, and thermal deformation is by the laser displacement sensor collection.Repeatedly repeat this process, each time monitoring gained data are carried out modeling on PC.
Modeling process at first carries out parameter and selects.The LS-SVM algorithm at first will be selected a kernel function, and definite correlation parameter.For kernel function, generally select RBF nuclear: K (xi, xj)=exp [(xi-xj)2/ (2 σ2)] it has only a undetermined parameter σ; Its value is big more, and speed of convergence is fast more, but the model that obtains thus; When prediction, can make all predicted values trend towards some values; This is worth the mean value of span often, though the square error of this moment and little but can not reflect real each point data.For adopting the radially LS-SVM of base nuclear, major parameter is regularization parameter γ and kernel function width cs, and these two parameters have determined study and the generalization ability of LS-SVM to a great extent.Select RBF nuclear, problem can be simplified to: seek suitable adjustable parameter γ and the combination of σ, make LS-SVM that best estimated performance arranged.If can intercepting γ and each a bit of interval of σ, on these the two sections interval two dimensional surfaces that constitute, be criterion with the accuracy rate, do search fully, just can confirm only [σ, a γ] combination, correspondence high-accuracy.Though this accuracy rate is not necessarily the optimum solution on (∞ ,+00), but an acceptable satisfactory solution.Here propose a kind of dynamic self-adapting optimized Algorithm, model parameter is selected to be optimized.Concrete steps are following:
1. confirm the span of initial parameter: in span, choose parameter value, make up parameter to (γi, σi) the two-dimensional grid plane, i=1 wherein, 2 ... F, j=1,2 ... G.For example two parameters are respectively chosen 20 numerical value, and it is right to constitute 20 * 20 grid plans and 400 parameters.Selection of parameter has two kinds of methods: the 1st kind is to confirm two parameter range earlier, carries out even value according to the desired parameters logarithm again; The 2nd kind is to confirm that according to the characteristic and the experience of training sample parameter is to value.
2. import each mesh node parameter to (γi, σi) in LS-SVM, adopt learning sample to train, and output study error.Get least error corresponding nodes value (γi, σi)EminFor optimized parameter right.
3. if the precision of training does not reach needed requirement, then with (γ i, σ i)EminBe the center, make up new two-dimensional network plane, choose the parameter value of close in value and further train, thereby obtain more high-precision training result.By that analogy, can construct multilayer parameter optimization grid plan, continue to optimize the least square method supporting vector machine parameter, up to reaching the precision that needs.
After parameter is selected, set up hot error model based on least square method supporting vector machine.LS-SVM returns and estimates to be expressed as following form:
Kernel function K in the formula (x,, x) be the RBF nuclear in the step (1), mouth, 6 are solved by following formula:
For improving the robustness of model, estimate it is to carry out weighted to returning, utilize the error variance ξ of the preceding LS-SVM of weighting of following formula acquisitioniConfirm weighting coefficient νi:
S is the Robust Estimation value of the standard variance of LS-SVM error variance ξ in the formula, and general value is:
MAD in the formula (xf) is the median absolute deviation of data xi.Constant C1, C2Usually value is: C1=2.5 and C2=3.
At last according to weight ν1,, carry out the training of weighted least-squares SVMs, obtain the regression modeling model:
Can calculate the machine tool thermal error predicted value by this formula.According to this predicted value, export it to digital control system, realize error compensation.
Embodiments of the invention are below described.
Embodiment:
An XHK-714F numerical control machining center is carried out hot error modeling analysis.Machine tool chief axis thermal deformation data are gathered through laser displacement sensor (LK-150H).Temperature field measuring system is made up of 14 intelligent temperature sensors, ARM7 embedded system platform (FS44BOXLII) and liquid crystal display.Repeatedly the repeated test machining center moves 6 hours continuously under simulated condition, shuts down 1 hour temperature rise and axial hot error condition of main shaft in the process, obtains 70 groups of data altogether.
According to carrying out data acquisition, get main shaft temperature and change T
0, spindle motor measuring point temperature rise T
1, ball-screw measuring point temperature rise T
2, column measuring point temperature rise T
3, bed piece measuring point temperature rise T
4, environment temperature T
5, with main shaft axial error D
1, main shaft radial error D
2Together, constitute the sample data set, utilize the dynamic self-adapting optimized Algorithm, model parameter is optimized selection.According to the cause and effect dependence between the variable, sample data is carried out initial training, calculate the corresponding respectively ξ of 70 groups of data
i=α
i/ γ.Go out to have the standard deviation of Robust Estimation then according to the Distribution calculation of ξ i
, basis again
And ξ
iConfirm weight ν
i. at last according to weight ν
iSample is carried out LS-SVM training, the hot error model of this machining center main shaft.Shown in Fig. 3 a, provided main machine spindle radially modeling value and comparable situation of measured value axially and shown in Fig. 3 b; The mean absolute percentage error that axial deformation predicts the outcome is 1.33%; The mean absolute percentage error that radial deformation predicts the outcome is 1.62%, proves that this method has good modeling accuracy.