Detailed Description
The present invention will be described in detail with reference to the accompanying drawings.
Example 1
In the existing numerical control machining, the quality of a workpiece machined by a numerical control machine tool is difficult to predict, and the setting of the technological parameters of the numerical control machine tool is often dependent on the traditional experience. The flat plate slot antenna is a typical thin plate part, is used as key equipment for communication, broadcasting, radar, guidance, early warning, radar and missile resisting antennas, has excellent electrical properties such as high radiation efficiency, high power, light structure, small thickness, light weight and the like, is particularly suitable for airborne equipment requiring light weight and small size, has extremely high processing precision requirement and complex processing process, only depends on the traditional experience to guide the processing process, can generate abnormal phenomena of low processing precision and unstable processing process, seriously influences the processing quality and causes material waste; based on the problems of difficulty in processing quality prediction and inaccurate process parameter setting in the existing flat plate slot antenna processing process, the invention provides a multi-quality target prediction and process parameter optimization recommendation method for multi-processing characteristic sheet part numerical control processing through research and experiments.
The invention relates to a multi-quality target prediction and process parameter optimization recommendation method for numerical control machining of a sheet part with multiple machining characteristics, which takes a machined part flat plate slot antenna as a machining object, wherein the flat plate slot antenna consists of thin-wall cavities with different slotting modes, the flat plate slot antenna is mainly formed by connecting multiple layers of a coupling layer, a feed layer, a radiation layer and the like, and the structural design of different layers has certain difference in order to meet the requirements of actual electrical performance and mechanical performance, but three machining characteristics, specifically a rectangle, a slot and a round hole, are generally arranged on a rectangular flat plate-shaped workpiece to serve as a high-frequency element sample of the flat plate slot antenna, the following specific flat plate slot antenna is taken as an example for explanation, the machined workpiece is a rectangular machined workpiece, and the 3 machining characteristics, namely the rectangle, the slot and the round hole, on the flat plate, Crack and round hole, the direction of following the flat board of rectangle is long on the dull and stereotyped surface of flat board in proper order respectively independent be equipped with the closed groove of 4 rectangles forms, the crack of 1 rectangle form and the through-hole of 4 the same circular forms, wherein the centre of rectangular channel is link up, the length direction of crack is parallel with the length direction of flat board, the through-hole of 4 circular forms is put in a rectangular channel, when numerical control machine tool adds, mill processing according to the order of rectangle, crack and round hole, see figure 1, including following step:
step (1) collecting and arranging a processing technology and a working medium adding data set: the technical parameter data of the flat plate slot antenna of the machined part is collected through a numerical control machine tool, no matter the flat plate slot antenna is formed into different layers, the structure in each layer has no three machining characteristics of rectangle, slot and round hole, and the technical parameters also comprise rotating speed, cutting depth and feeding. The processing quality data of the flat plate slot antenna is collected through a three-coordinate measuring instrument, then the data of three processing characteristics, namely the rectangle, the slot and the round hole of the flat plate slot antenna, are extracted and are respectively corresponding to the process parameter rotating speed, the cutting depth and the feeding one by one, namely the processing quality data of the processing characteristic rectangle is corresponding to the process parameter rotating speed, the cutting depth and the feeding, the slot data is corresponding to the process parameter rotating speed, the cutting depth and the feeding, the data of the round hole is corresponding to the process parameter rotating speed, the cutting depth and the feeding, and all the data are arranged into a flat plate slot antenna processing quality prediction and process parameter optimization data set classified according to the processing characteristics. The processing quality data comprises data of processing characteristic rectangles, cracks and round holes, the processing quality data of the processing characteristic rectangles refer to processing errors of the length and the width of the rectangular closed groove, the data of the cracks refer to processing errors of the width of the cracks, and the data of the round holes refer to processing errors of the diameter of the round holes.
And (2) replacing an abnormal value with the mean value to perform data preprocessing: abnormal values contained in three processing characteristic data, namely rectangle, crack and round hole, of the flat plate crack antenna processing quality prediction and process parameter optimization data set are detected by using a box separation method, and the detected abnormal values are replaced by mean values of corresponding processing characteristics to obtain a preprocessed data set.
And (3) sorting the importance of the multidimensional features of the data: aiming at the data set preprocessed in the step (2), respectively using a recursive feature elimination algorithm, a random forest algorithm and an XGboost algorithm to establish regression models of the process parameters and the processing features of the flat plate slot antenna, obtaining the regression models corresponding to the three algorithms, respectively using the respective regression models established by the three algorithms to calculate the importance of the rotation speed, the cutting depth and the feeding of the process parameters relative to the rectangle, the slot and the round hole of the processing features, sequencing the importance of the process parameters, obtaining the sequencing results of the importance of the process parameters of each processing feature under different algorithms, taking intersection of the sequencing results of the importance of the same processing feature under different algorithms, obtaining the sequencing results of the importance of each processing feature, and taking intersection of the sequencing results of the importance of all the processing features to obtain the sequencing results of the importance of the process parameters of the processed parts.
And (4) carrying out correlation analysis on data characteristics and deleting redundant characteristics: and (3) aiming at the preprocessed data set obtained in the step (2), performing correlation analysis on the rotating speed, the cutting depth and the feeding of the process parameters of the flat plate slot antenna by using a correlation analysis method, calculating to obtain correlation coefficients among the process parameters, judging the correlation coefficients among the first three process parameters in the importance ranking by combining the correlation coefficients of the process parameters with the process parameter importance ranking result of the processed part, judging whether linear correlation exists between the two process parameters with the highest correlation coefficients, and keeping one of the two linearly correlated characteristics, or keeping the two process parameters at the same time, and finally obtaining respective correlation analysis data sets of the processed characteristic rectangle, the slot and the round hole of the processed part respectively.
And (5) respectively carrying out training set and test set division on the correlation analysis data set: the method comprises the steps of dividing a training set and a test set of correlation analysis data sets of a processing characteristic rectangle, a crack and a round hole of the flat plate crack antenna according to the proportion of 7:3, wherein the correlation analysis data sets of the processing characteristic rectangle, the crack and the round hole of a processing part have 70% of the respective training sets and 30% of the respective test sets, namely 70% of the respective data sets of the processing characteristic rectangle, the crack and the round hole are used as the training sets corresponding to processing characteristics, and the rest 30% of the respective data sets of the processing characteristic rectangle, the crack and the round hole are used as the test sets corresponding to the processing characteristics. The division ratio of the training set and the test set needs to be adjusted according to the size of actual data volume, the ratio of the training set to the test set can be set to be 7:3 or 8:2 generally, the ratio of the training set to the test set can be set to be 8:2 when the data volume is small, and due to the fact that the data volume of the machining characteristics of the flat plate slot antenna is moderate, the 7:3 division ratio is suitable, and the fitting capability of the prediction model is improved.
And (6) constructing a multi-quality target prediction model by using a machine learning algorithm: aiming at the respective correlation analysis data sets of the processing characteristic rectangles, the cracks and the round holes of the processing parts, an XGboost algorithm is used for respectively training the respective training sets of the processing characteristic rectangles, the cracks and the round holes, respective quality prediction models of the processing characteristic rectangles, the cracks and the round holes are respectively constructed, the technological parameters of the processing parts, such as rotating speed, cutting depth and feeding, in the prediction models are used as a group of prediction models for inputting, the respective quality data of the processing characteristic rectangles, the cracks and the round holes are used as output, the max _ depth parameter in the XGboost algorithm needs to be adjusted in the construction process of the prediction models to enable the model accuracy to be optimal, the respective prediction models of the processing characteristic rectangles, the cracks and the round holes are adjusted and optimized one by one according to 5-fold cross verification results, the respective test sets of the processing characteristic rectangles, the cracks and the round holes are used for evaluating the accuracy of the prediction models, and the rectangles, the cracks and the round holes are finished, And constructing a multi-quality target prediction model of the crack and the round hole. The multi-quality target in the invention refers to the processing quality of a rectangle, a crack and a round hole, and the establishment of the multi-quality target prediction model is to establish a respective quality prediction model for each processing characteristic by using an XGboost algorithm.
And (7) constructing a multi-process parameter synchronous optimization recommendation model based on the processing characteristic multi-quality target prediction model weighted improved genetic algorithm, and completing multi-process parameter synchronous optimization recommendation of the processed parts: the method comprises the steps of weighting and summing a multi-quality target prediction model of a rectangle, a crack and a round hole to serve as a part quality target function, using process parameter rotating speed, cutting depth and feeding as input variables, using a genetic algorithm to construct a multi-process parameter synchronous optimization recommendation model taking part quality as a target, optimizing the rotating speed, cutting depth and feeding of process parameters through the model to obtain an optimal process parameter combination, and completing multi-process parameter synchronous optimization recommendation of a machined part.
In the existing research method, the selection of process parameters and cutter parameters in the numerical control machining process cannot realize self-adaptive control analysis. The invention provides a multi-quality target prediction and process parameter optimization recommendation method oriented to multi-processing characteristic sheet part numerical control processing in order to change the current situation that the process parameter optimization is carried out by using the traditional empirical formula and the orthogonal experiment method in the prior art but the optimal result is not obtained actually in the process of the numerical control processing, relieves the problems of low processing quality prediction precision and inaccurate process parameter optimization, and effectively improves the prediction precision of the processing quality and the reliability of the process parameter optimization. Selecting the characteristics of data to obtain a correlation analysis data set of each processing characteristic, dividing the correlation analysis data set of each processing characteristic into 70% of training sets and 30% of testing sets corresponding to the processing characteristics, training each processing characteristic training set by adopting a machine learning algorithm XGboost, constructing quality prediction models of processing characteristic rectangles, cracks and round holes respectively, adjusting and optimizing each prediction model, evaluating the precision of each optimized prediction model by using each processing characteristic testing set to obtain a multi-quality target prediction model of the processing characteristic rectangles, cracks and round holes with higher precision, weighting and summing the multi-quality target prediction models of the processing characteristic rectangles, cracks and round holes to obtain a part quality objective function, constructing a multi-process parameter synchronous optimization recommendation model taking the part quality as the target by adopting a genetic algorithm to obtain a process parameter optimization result with high reliability, and completing the synchronous optimization recommendation of the multiple process parameters of the machined part.
Example 2
The method for predicting the multi-quality target and optimizing and recommending the process parameters for the numerical control machining of the multi-machining-characteristic thin plate part is the same as that in the embodiment 1, the machining process and the working medium adding data set are collected and sorted in the step (1), and the process for collecting and sorting the machining process and the working medium adding data set comprises the following steps:
(1.1) acquiring a data set: the cutter parameter information of the numerical control machine tool is an end mill, the diameter is 1, and the clamping length is 17; the processing characteristics are as follows: rectangles, slits and circular holes; the technological parameters are as follows: the numerical control machine tool conducts milling according to the sequence of the rectangle, the crack and the round hole, technological parameter data of the flat plate crack antenna are collected through an MDC module of the numerical control machine tool, machining quality data of the machining characteristic rectangle, the crack and the round hole of the flat plate crack antenna are collected through a three-coordinate measuring instrument, the machining quality data of the machining characteristic rectangle refer to machining errors of the length and the width of a rectangular closed groove, the data of the crack refer to machining errors of the width of the crack, and the data of the round hole refer to machining errors of the diameter of the round hole.
(1.2) sorting the data sets: the method comprises the steps of extracting data of three machining characteristics of a rectangle, a crack and a round hole of the flat plate crack antenna, wherein the data corresponds to process parameters of rotating speed, cutting depth and feeding one by one, enabling the rectangle to correspond to the process parameters of rotating speed, cutting depth and feeding, enabling the crack to correspond to the process parameters of rotating speed, cutting depth and feeding, enabling the round hole to correspond to the process parameters of rotating speed, cutting depth and feeding, and finally forming a flat plate crack antenna machining quality prediction and process parameter optimization data set classified according to the machining characteristics.
In the data acquisition and arrangement, aiming at three processing characteristics of a rectangle, a crack and a round hole on the surface of a flat plate crack antenna of a processing workpiece, a strategy of classifying a processing technology and a working medium adding data set according to the processing characteristics is adopted, the data of the rectangle, the crack and the round hole of the processing characteristics are corresponding to the process parameters of rotating speed, cutting depth and feeding one by one, the importance of the processing characteristics to the whole flat plate crack antenna of the processing workpiece is tightly grasped, a prediction model is respectively constructed for each processing characteristic, the construction complexity of the prediction model is reduced, and optimization preparation is also made for subsequent process parameters.
Example 3
The multi-quality target prediction and process parameter optimization recommendation method for multi-machining-feature sheet part numerical control machining is the same as that in embodiment 1-2, the mean value is used for replacing the abnormal value to perform data preprocessing in step (2), and the data preprocessing process comprises the following steps:
(2.1) statistics calculation for data set: and carrying out statistic calculation on the processing process data of the rectangle, the crack and the round hole of the flat plate crack antenna, wherein the statistic calculation comprises a lower quartile, a median, an upper quartile and a quartile interval.
(2.2) abnormal value judgment of data set: and (3) judging abnormal values of the processing characteristic rectangle, crack and round hole data of the processed part according to the following formula:
value>QU+1.5IQR or value<QL-1.5IQR
here, value indicates an abnormal value in each machining feature data, the abnormal value is data located outside a section between QU +1.5IQR and QL-1.5IQR, QU indicates an upper quartile of each machining feature data, QL indicates a lower quartile of each machining feature data, and IQR indicates a quartile pitch of each machining feature data, that is, IQR is QU-QL.
(2.3) outlier replacement of data set: and replacing the detected abnormal value with the average value of the data of the corresponding processing characteristic rectangle, the crack and the round hole to obtain a preprocessed data set.
The invention uses the box-dividing method to detect the mean value, the three-sigma principle can also be used for detecting the abnormal value, the three-sigma principle is more accurate when the data volume is large and requires that the data distribution is close to the normal distribution, the data set capacity of the flat plate slot antenna is smaller, the box-dividing method is more suitable to select, when the abnormal value is replaced, the mean value is used for replacing the abnormal value, the data set capacity can be ensured to be unchanged, and enough training data is provided for the prediction model.
Example 4
The method for predicting multiple quality targets and optimizing and recommending process parameters for numerical control machining of thin plate parts with multiple machining characteristics is the same as that in the embodiment 1-3, the correlation analysis and the redundant characteristic deletion of the data characteristics are described in the step (4), and the correlation analysis process of the data characteristics comprises the following steps:
(4.1) calculation of correlation coefficient of data characteristics: the relationship between two consecutive variables was analyzed using the pearson correlation coefficient, which was calculated as follows:
wherein x
i,y
iThe ith sample representing the continuity variable x sample set and y sample set,
is the mean of a sample set of continuous variables x,
is the mean value of a sample set of continuous variable y, r represents the correlation coefficient of the variable x and the variable y, the range of the correlation coefficient r is-1 ≦ r ≦ 1, r>0 is a positive correlation, r<0 is negative correlationThe linear correlation does not exist if r is less than or equal to 0.3, the R is not Y>And 0.8 is highly linear correlation, and a correlation coefficient matrix is constructed by calculating the Pearson correlation coefficient between every two of the process parameters of the rotating speed, the cutting depth and the feeding of the processed part based on the formula.
(4.2) judging the relevance of the data features: judging the correlation coefficient among the first three process parameters in the importance ranking result, judging whether the two process parameters with the highest correlation coefficient have linear correlation, reserving the parameters with the correlation coefficient smaller than 0.3, when the correlation coefficient of the two parameters is smaller than 0.3, the two parameters do not have linear correlation, and reserving all the process parameters according to the fact that the maximum correlation coefficient among all the obtained process parameters does not exceed 0.12.
The method uses the Pearson coefficient to carry out correlation analysis, which is very important for carrying out correlation analysis on the characteristics of the data, if two linear correlation characteristics exist, a method of only reserving one characteristic can be adopted, the problem of overfitting caused by leading the two linear correlation characteristics into a prediction model is avoided, the data is more in line with the data condition which is well processed by a machine learning algorithm, meanwhile, unnecessary calculation processing is avoided, and the training efficiency and precision of the prediction model are improved.
Example 5
The multi-quality target prediction and process parameter optimization recommendation method for multi-machining characteristic sheet part numerical control machining is the same as that in the embodiment 1-4, and the step (6) of constructing the multi-quality target prediction model by using a machine learning algorithm comprises the following steps:
(6.1) selection of a multi-quality target prediction model: the multi-quality target refers to the processing quality of a rectangle, a crack and a round hole, and the multi-quality target prediction model can use a machine to learn a random forest algorithm and an XGboost algorithm in the multi-quality target prediction model; the random forest is an integrated learning algorithm and consists of a plurality of weak learners, strong dependence does not exist among the weak learners, and the training results are voted by simultaneously training the weak learners, so that the performance of the random forest is generally superior to that of a single learner; the XGboost is also an integrated learning algorithm, but each weak learner has a strong dependency relationship, different weights are distributed to each weak learner according to the learning effect of each weak learner, then a plurality of learners are weighted and summed to construct a strong learner for training, and the strong learner can obtain better effect than a single learner; the method comprises the steps of using training sets of machining feature rectangles, cracks and round holes of machined parts to respectively construct prediction models by means of a random forest algorithm and an XGboost algorithm, then respectively inputting test sets of all machining features into the random forest prediction model and the XGboost prediction model, comparing mean square errors and fitting errors output by the two prediction models, and obtaining the XGboost prediction model with higher precision, so that the XGboost algorithm is used for constructing the prediction models.
(6.2) optimizing a multi-quality target prediction model: respectively introducing training sets of processing characteristic rectangles, cracks and round holes of a processed part into an XGboost algorithm for training, setting a traversing list of max _ depth parameters of the XGboost algorithm as [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15], traversing each parameter in the list of max _ depth parameters by using a for-loop, constructing an XGboost model corresponding to each max _ depth parameter, evaluating the precision of each quality prediction model by using a mean square error and a fitting error obtained by 5-fold cross verification, comparing the precision of each model, selecting the max _ depth parameter corresponding to the model with the highest precision, realizing the search of the optimal max _ depth parameter, and finishing the tuning of a multi-quality target prediction model.
(6.3) evaluation of the multi-quality target prediction model: respectively leading training sets of processing characteristic rectangles, cracks and round holes of the processed parts into XGboost quality prediction models under respective optimal max _ depth parameters, using mean square error and fitting error to evaluate the model performance to obtain the training error of the models, leading test sets into XGboost prediction models corresponding to the optimal max _ depth parameters, using mean square error and fitting error to evaluate the model performance to obtain the test error of the models, using the test error as the performance evaluation of the multi-quality target prediction models, and finally completing the construction of the multi-quality target prediction models.
The invention establishes a quality prediction model for each processing characteristic, namely respectively constructs a rectangular processing quality prediction model, a crack processing quality prediction model and a round hole processing quality prediction model, the three machining quality prediction models adopt a machine learning algorithm, the XGboost algorithm is often used as a recommendation algorithm of the prediction model in machine learning and is widely applied, the XGboost can deeply mine the relation between the process parameters and the machining characteristics, the value of the machining workpiece data is effectively utilized, the accuracy of the prediction model reaches a higher level, the machining characteristic prediction model with high accuracy can avoid using a complex formula to express the relation between the process parameters and the machining characteristics, the designed process parameters can be imported into the prediction model to predict the data of the machining characteristics of the parts to be machined, and early warning of future abnormal data is realized.
Example 6
The multi-quality target prediction and process parameter optimization recommendation method for multi-machining-feature sheet part numerical control machining is the same as that in the embodiment 1-5, the multi-process parameter synchronous optimization recommendation model is constructed by the processing-feature-based multi-quality target prediction model weighted improved genetic algorithm in the step (7), and multi-process parameter synchronous optimization recommendation of the machined part is completed, wherein the construction of the multi-process parameter synchronous optimization recommendation model comprises the following steps:
(7.1) determining an objective function F (x) to be optimized: multiplying the multi-target prediction models of the machining characteristic rectangles, the cracks and the round holes of the machined part by the same weight coefficient respectively to obtain weighted multi-target prediction models of the rectangles, the cracks and the round holes, and then taking the weighted multi-target prediction models of the rectangles, the cracks and the round holes as a part quality objective function to be optimized, wherein the formula of the part quality objective function is as follows:
F(x1,x2,x3)=w·F1(x1,x2,x3)+w·F2(x1,x2,x3)+w·F3(x1,x2,x3)
wherein x1,x2,x3Respectively, the process parameters of speed, depth of cut and feed, F1 (x)1,x2,x3)、F2(x1,x2,x3) And F3 (x)1,x2,x3) Prediction models for rectangle, round hole and crack respectively, w is weight coefficient, F (x)1,x2,x3) Is a part quality objective function.
(7.2) determining design variables and ranges of the genetic algorithm: the design variables of the genetic algorithm are the rotating speed, the cutting depth and the feeding of the process parameters to be optimized, the rotating speed of the process parameters to be optimized ranges from [30000(rpm) to 40000(rpm) ], the cutting depth ranges from [0(mm) to 0.3(mm) ], and the feeding range from [2800(mm) to 4000(mm) ].
(7.3) determining parameter settings of the genetic algorithm: determining to use Gray codes for genetic algorithm coding; determining the number of population individuals to be 20; determining the maximum genetic algebra to be 200; determining to adopt random sampling selection as a selection mode; determining to adopt two-point intersection as an intersection mode; determining a fitness calculation mode to be fitness distribution calculation based on grade division; and determining to adopt a binary mutation operator as a mutation mode to complete the construction of the multi-process parameter synchronous optimization recommendation model.
(7.3) initializing population: the technological parameters of rotating speed, cutting depth and feeding are used as a group of technological parameter combinations, a plurality of groups of technological parameters are randomly generated in the range of technological parameters to be optimized, the technological parameters of rotating speed, cutting depth and feeding of one group are a group individual, the plurality of groups of technological parameter combinations are equivalent to a group, and the initialization of the group is completed.
(7.4) calculating the fitness of the initial population: giving a fitness threshold condition f1, calculating the fitness of the initial population individuals according to a part quality objective function of the initial population individuals and a fitness distribution calculation method based on grade division, wherein the fitness calculation of the population individuals can be represented by the following formula:
f=ranking(F(x1,x2,x3))
wherein f represents the fitness of the population individual, and ranking () represents a fitness distribution calculation method based on grade division;
obtaining the fitness f of the initial population individuals according to a fitness calculation formula of the population individuals0And compared with the set fitness threshold condition f1 if f0>f1, the initial population is the optimal population, otherwise, f0<f1, executing the step (7.5) and carrying out evolution on the initial population.
(7.5) evolving population: for a population to be evolved, a fitness limit value f2 which allows evolution is given, the fitness limit value which allows evolution is smaller than a fitness threshold condition, namely f2< f1, the fitness f of an individual of the population to be evolved is compared with the fitness limit value f2 which allows evolution, the population individual of f > f2 is selected to be used for generating a next generation population, the next generation population is population filial generation, the population individual of which the fitness is larger than f2 has a character which enables a part quality objective function value to reach a high-quality objective function value, then population filial generation individuals are recombined by using crossover and variation operators to obtain an evolved population individual, and the quality objective function corresponding to the evolved population individual is better compared with the previous generation so that the population filial generation inherits the good character of the previous generation population to complete the population evolution.
(7.6) calculating the fitness of the population after evolution: using a given fitness threshold condition f1, using a determined maximum genetic algebra 200, calculating the fitness of the evolved (current population) population individuals according to a fitness calculation formula of the population individuals, judging whether the fitness f of the evolved population individuals is greater than the fitness threshold condition f1, if f is greater than f1, determining that the evolved population is an optimal population, namely a process parameter combination which enables the quality of the parts to be optimal, and otherwise, re-evolving the evolved population, and returning to the step (7.5) to execute the next round of evolution; or directly judging whether the evolution algebra reaches the maximum genetic algebra, if the evolution algebra reaches the maximum genetic algebra, obtaining a process parameter combination which enables the part quality to reach the optimum, and completing the optimization of the process parameters, otherwise, the evolved population needs to be re-evolved, and the next round of evolution is executed by returning to the execution step (7.5) until the individual fitness value of the evolved population is greater than the fitness threshold condition or the evolution algebra reaches the maximum genetic algebra, and finally realizing the optimization of the process parameter rotating speed, the cutting depth and the feeding, obtaining the optimum process parameter combination, and completing the synchronous optimization recommendation of the multiple process parameters of the processed parts.
The invention uses a genetic algorithm based on processing characteristic multi-quality target prediction model weighted improvement to synchronously optimize and recommend the multi-process parameters of the parts to obtain a highly reliable parameter optimization result, the genetic algorithm is one of evolutionary algorithms, an optimal solution is found by simulating the mechanism of selection and inheritance in nature, and the genetic algorithm has three basic genetic operators: the method has the advantages that the problems that general numerical solution is easy to fall into local tiny traps are solved through selection, intersection and variation, global optimal solution search is achieved, the genetic algorithm is used for optimizing the process parameters, the search capability of the genetic algorithm on the optimal solution is also utilized, the population is continuously evolved through the action of a genetic operator, the optimal process parameters are obtained, in addition, the quality objective function obtained through weighted summation of the multi-quality target prediction model with high-precision processing characteristics is more accurate, and the reliability of process parameter optimization is improved.
The invention relates to a multi-quality target prediction and technological parameter optimization recommendation method for multi-machining-characteristic sheet part numerical control machining, which solves the problems of multi-quality target prediction and multi-technological parameter synchronous optimization recommendation of part machining characteristics, and comprises the following implementation steps: collecting and sorting a data set; preprocessing the sorted data; sorting the feature importance of the data; dividing a correlation analysis data set into a training set and a test set; constructing a multi-target prediction model by using a machine learning algorithm; and (5) constructing a technological parameter optimization model by using a genetic algorithm to complete the technological parameter optimization of the machined part. The invention uses machine learning method to predict the processing characteristics with multi-quality targets, and uses improved genetic algorithm to optimize the technological parameters, so as to obtain the optimal technological parameters. The whole scheme is rigorous and complete, high in prediction precision and good in parameter optimization effect, is used for adaptive recommendation of process parameters and cutter parameters, and effectively improves the machining quality.
The invention will be further illustrated by the following detailed example
Example 7
The method for predicting the multi-quality target and optimizing and recommending the process parameters for the numerical control machining of the multi-machining-characteristic sheet part is the same as the embodiment 1-6, and referring to fig. 1, the implementation steps of the invention are as follows:
step one, collecting and arranging a processing technology and a working medium adding data set: the cutter parameter information of the numerical control machine tool is an end mill, the diameter is 1, and the clamping length is 17; the processing characteristics are as follows: rectangles, slits and circular holes; the technological parameters are as follows: the method comprises the steps of collecting technological parameter data of a flat plate slot antenna through a numerical control machine tool, collecting machining quality data of machining characteristics of the flat plate slot antenna through a three-coordinate measuring instrument, then extracting the data of three machining characteristics of a rectangle, a slit and a round hole of the flat plate slot antenna to correspond to the technological parameter rotating speed, the cutting depth and the feeding one by one, enabling the rectangle to correspond to the technological parameter rotating speed, the cutting depth and the feeding, enabling the slit to correspond to the technological parameter rotating speed, the cutting depth and the feeding, enabling the round hole to correspond to the technological parameter rotating speed, the cutting depth and the feeding, and finally arranging the data into a flat plate slot antenna machining quality prediction and technological parameter optimization data set classified according to the machining characteristics. The processing quality data of the processing characteristic rectangle refers to the processing errors of the length and the width of the rectangular closed groove, the processing quality data of the crack refers to the processing errors of the width of the crack, and the processing quality data of the round hole refers to the processing errors of the diameter of the round hole.
Step two: preparation work of the multi-quality target prediction model and a model construction process are as follows: preprocessing a processing technology data set of a processing characteristic rectangle, a crack and a round hole of the flat plate crack antenna to obtain a preprocessed data set; carrying out feature importance ranking on the preprocessed data set to obtain an importance ranking result of the features; performing correlation analysis on the preprocessed data set, and then performing feature selection by combining feature importance ranking results to obtain respective correlation analysis data sets of the processed feature rectangle, the crack and the round hole; dividing the data sets according to the ratio of 7:3 by the respective correlation analysis data sets of the processing feature rectangles, the cracks and the round holes, so that each processing feature has a respective training set of 70% and a respective testing set of 30%; the method comprises the steps of introducing a training set of each machining feature into an XGboost algorithm for training, respectively constructing quality prediction models of a machining feature rectangle, a crack and a round hole, traversing a max _ depth parameter list in the XGboost algorithm, evaluating the precision of the prediction models of each machining feature by using a mean square error and a fitting error obtained by 5-fold cross validation, respectively finding a max _ depth parameter value which enables the precision of the prediction models of each machining feature to reach the highest, and then taking the prediction model corresponding to the parameter as an optimal prediction model to complete the construction of a multi-quality target prediction model of the machining feature rectangle, the crack and the round hole.
Step three: adopting a genetic algorithm of weighted improvement of a multi-quality target prediction model of processing characteristics to construct a multi-process parameter synchronous optimization recommendation model: the method comprises the steps of weighting and summing a multi-target prediction model of a rectangle, a crack and a round hole to serve as a part quality target function, using process parameter rotating speed, cutting depth and feeding as input variables, constructing a multi-process parameter synchronous optimization recommendation model taking part quality as a target based on a genetic algorithm, optimizing the rotating speed, cutting depth and feeding of the process parameters through the model to obtain the combination of the optimal process parameters, and completing multi-quality target prediction and process parameter optimization recommendation for multi-processing characteristic sheet part numerical control processing.
Referring to fig. 2, the step two implementation can be divided into the following steps:
(2a) data preprocessing, replacing detected outliers with mean values of data:
first, statistics calculation for the dataset: and carrying out statistic calculation on the processing process data of the characteristic rectangle, the crack and the round hole of the planar slot antenna, wherein the processing process data comprises a lower quartile, a median, an upper quartile and a quartile interval.
Secondly, judging abnormal values of the data set: and (3) judging abnormal values of the processing characteristic rectangle, the crack and the round hole data according to the following formula:
value>QU+1.5IQR or value<QL-1.5IQR
here, value indicates an abnormal value in each machining feature data, the abnormal value is data located outside a section between QU +1.5IQR and QL-1.5IQR, QU indicates an upper quartile of each machining feature data, QL indicates a lower quartile of each machining feature data, and IQR indicates a quartile pitch of each machining feature data, that is, IQR is QU-QL.
Thirdly, abnormal value replacement of the data set: and replacing the detected abnormal value with the average value of the data of the corresponding processing characteristic rectangle, the crack and the round hole to obtain a preprocessed data set.
(2b) Multidimensional feature importance ranking of data: aiming at a preprocessed data set, respectively using a recursive feature elimination algorithm, a random forest algorithm and an XGboost algorithm to establish regression models of technological parameters and processing features of the flat plate slot antenna, obtaining the regression models corresponding to the three algorithms, respectively using the regression models established by the three algorithms to calculate the importance of the technological parameters of rotating speed, cutting depth and feeding relative to processing feature rectangles, slots and round holes, sequencing the importance of the technological parameters, obtaining the sequencing results of the importance of the technological parameters of each processing feature under different algorithms, taking an intersection from the sequencing results of the importance of the same processing feature under different algorithms, obtaining the sequencing result of the importance of each processing feature, and then taking an intersection from the sequencing results of the importance of all processing features to obtain the final feature importance sequencing result.
(2c) Correlation analysis of data features:
firstly, calculating a correlation coefficient of data characteristics: and constructing a correlation coefficient matrix by calculating correlation coefficients between every two of the process parameters of rotating speed, cutting depth and feeding, and obtaining that the maximum correlation coefficient between the process parameters is not more than 0.12.
And secondly, judging the correlation of the data characteristics: and judging the correlation coefficient among the first three process parameters of the feature importance degree sorting result, reserving the parameters of which the correlation coefficient is less than 0.2 (nonlinear correlation among the parameters), and reserving all the process parameters according to the correlation coefficient matrix, wherein the maximum correlation coefficient among all the process parameters is not more than 0.12.
(2d) A multi-quality target prediction model of the processing characteristics is constructed by using a machine learning algorithm:
step one, optimizing a multi-target prediction model: respectively introducing training sets of machining feature rectangles, cracks and round holes into an XGboost prediction model for training, respectively constructing quality prediction models of the rectangles, the cracks and the round holes, needing to adjust max _ depth parameters of an XGboost algorithm to finish tuning of the quality prediction models of all machining features, setting traversing lists of the max _ depth parameters of all machining feature XGboost prediction models as [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15], traversing each parameter in a max _ depth parameter list by using a for-loop, constructing XGboost models corresponding to each max _ depth parameter, evaluating the precision of each model by using a mean square error and a fitting error obtained by 5-fold cross verification, comparing the precision of each model, selecting the max _ depth parameter corresponding to the model with the highest precision, and finding the optimal max _ depth parameter, and taking the XGboost model corresponding to the optimal max _ depth parameter as the optimized prediction model to realize the tuning of the multi-quality target prediction model.
And secondly, evaluating a multi-quality target prediction model: respectively leading training sets of the processing characteristic rectangle, the crack and the round hole into an XGboost prediction model under the optimal max _ depth parameter, evaluating the model performance by using a mean square error and a fitting error to obtain a training error of the model, leading a test set into the XGboost prediction model under the optimal max _ depth parameter, evaluating the model performance by using an output mean square error and an output fitting error, and completing the construction of the multi-quality target prediction model of the processing characteristic rectangle, the crack and the round hole.
Referring to fig. 3, the third step can be divided into the following steps:
(3a) determining an objective function to be optimized: and respectively setting the same weight coefficients of the quality prediction models of the processing characteristic rectangle, the crack and the round hole, and then weighting and summing the multi-quality target prediction models of the processing characteristic rectangle, the crack and the round hole to be used as a part quality target function.
(3b) Determining design variables and parameters of a genetic algorithm, and constructing a process parameter optimization model: the design variables of the genetic algorithm are process parameter rotating speed, cutting depth and feeding, the range of the process parameter rotating speed is 30000(rpm) and 40000(rpm), the range of the cutting depth is 0(mm) and 0.3(mm), and the range of the feeding is 2800(mm) and 4000 (mm); and determining a coding method, a selection mode, a maximum genetic algebra, a fitness calculation mode, a cross mode and a variation mode of the genetic algorithm, and completing the construction of a multi-process-parameter optimization recommendation model.
(3c) Initializing a population: the technological parameters of rotating speed, cutting depth and feeding are used as a group of technological parameter combinations, a plurality of groups of technological parameters are randomly generated within the range of technological parameters to be optimized, the technological parameters of rotating speed, cutting depth and feeding of one group are a group individual, and the initialization of the group is completed by the combination of the plurality of groups of technological parameters.
(3d) Calculating the fitness of the initial population: and (3) giving a fitness threshold condition, calculating the fitness of the initial population individuals according to the part quality objective function and the fitness calculation mode of the initial population individuals, comparing the calculated fitness of the population individuals with the set fitness threshold condition, if the population fitness is greater than the set fitness threshold condition, the initial population is the optimal population, otherwise, the fitness is less than the set fitness threshold condition, and executing the step (3e) to evolve the initial population.
(3e) Carrying out evolution operation on the population, and searching the optimal solution by adopting operators of selection, intersection and variation: the method comprises the steps of giving a population evolution fitness limit value, selecting population individuals larger than the population evolution fitness limit value to generate a next generation, eliminating the population individuals smaller than the fitness limit value, using a next generation population as population filial generations, recombining the population filial generations by using a crossover and mutation operator, enabling the population individuals with high fitness to have the character that a quality objective function reaches the optimum, enabling the population filial generations to inherit the excellent character of the previous generation population through evolution operation, and enabling the population after evolution to gradually advance towards the direction of optimum solution.
(3f) And (3) evaluating the fitness of the evolved population: judging whether the population fitness after evolution is greater than a fitness threshold condition or whether the current algebra is greater than the maximum genetic algebra, if the population fitness is greater than the fitness threshold condition or the current evolutionary algebra is greater than the maximum genetic algebra, searching successfully, otherwise, carrying out a new round of evolution, returning to execute the step (3e) to carry out evolution operation on the population until the population fitness after evolution is greater than the fitness threshold condition or the current algebra is greater than the maximum genetic algebra, obtaining an optimal solution of a process parameter optimization problem, namely obtaining an optimal combination of the process parameter rotating speed, the cutting depth and the feeding, and enabling the quality of parts to be optimal.
The invention uses the machine learning method for multi-quality target prediction of the processing characteristics of the processing workpiece, and combines with the process parameter optimization, the multi-target prediction model of the processing characteristics has higher precision, the weighted summation of the multi-quality target prediction model is used as a target function to improve the genetic algorithm, so that the reliability of the process parameter optimization is higher, and in the actual processing, if the unreasonable parameter setting occurs, the prediction model can carry out early warning and timely processing on the future data, thereby ensuring the stability of the processing process.
The technical effects of the present invention will be further explained by experiments, data and visualization results thereof
Example 8
The method for predicting the multi-quality target and optimizing and recommending the process parameters for the numerical control machining of the multi-machining-characteristic thin plate part is the same as the embodiment 1-7, and the technical effects of the method are as follows:
simulation conditions and contents:
1) simulation conditions are as follows: the modeling experiment is completed on a Spyder (anaconda) running platform under an Intel (R) core (TN) i3-4170CPU @3.70GHz and a Windows 10 (multiplied by 64) system;
2) simulation content: based on the data of the processing characteristics of the flat plate slot antenna, the construction of a multi-quality target prediction model of a processing characteristic rectangle, a slot and a round hole is completed, and the performance and the predicted visual effect of each processing characteristic quality prediction model are output; aiming at the processing characteristic rectangles 1,2,3,4, cracks and round holes on the flat plate crack antenna, an optimization model of the process parameters is constructed by using a genetic algorithm, optimization of the process parameter rotating speed, the cutting depth and the feeding is completed, the optimal combination of the process parameter rotating speed, the cutting depth and the feeding is obtained, the processing quality of the processing characteristics corresponding to the optimized process parameters is compared with the processing quality of the processing characteristics corresponding to the process parameters before optimization, and the improvement effect of the optimized processing quality is shown.
Experimental results and analysis:
1) predicting the performance index and the visualization effect of the model:
the performance indexes of the prediction model obtained by simulation in the invention are shown in table 1, the table 1 is a performance index table of the XGboost prediction model obtained by aiming at the processing characteristics in the invention,
TABLE 1 performance index of XGboost prediction model
Machining features
|
MSE (mean square error)
|
R2 (error of fit)
|
Round hole
|
2.315e(-6)
|
0.579
|
Rectangle
|
4.38e(-7)
|
0.991
|
Crack (crack)
|
3.732e(-7)
|
0.995 |
From the model performance indexes in the table, the minimum mean square error of the processing characteristic cracks reaches 0.995, the closer the fitting error is to 1, the better the prediction effect is, the closer the fitting error is to 1, the fitting errors of the rectangle and the cracks are to 1, the mean square error of the round holes is lower than that of the rectangle and the cracks, the fitting error is lower, but the reasonable range is reached, and the prediction model precision of the three processing characteristics is higher overall.
The prediction curve of the invention can also be visually displayed, the curve of the true value and the predicted value of the rectangular error is shown in fig. 4, the curve of the true value and the predicted value of the round hole error is shown in fig. 5, the curve of the true value and the predicted value of the crack error is shown in fig. 6, the abscissa of fig. 4, fig. 5 and fig. 6 is the number of the processed workpiece, the ordinate is the processing error corresponding to the processing characteristic, the types of the prediction curves in the graph are all broken lines, and the types of the true data curves of the processed parts are all solid lines. The processing error fitting effect of the rectangular prediction curve in fig. 4 and the crack prediction curve in fig. 6 is the best, the prediction curves are almost close to the real curves, the fitting effect of the processing error prediction curve of the circular holes in fig. 5 is poorer than that of the other two processing characteristics, the prediction curves and the real curves have larger deviation at individual points, but the prediction curves of the circular holes are close to the variation trend of the real curves in the whole view, the mean square error and the fitting error of the whole are in reasonable ranges, and the prediction curves of the rectangular prediction curves, the cracks and the circular holes are close to the real curves to a greater extent and the prediction effects are better.
2) The process parameter optimization effect is good:
comparing the optimization effects of the process parameters, after the optimization of the process parameters with the part quality as the target is completed, comparing the processing quality after the optimization of the process parameters with the processing quality before the optimization in order to clear the optimization effect of the process parameters, and selecting the optimized parameters: [ rotational speed: 30000(rpm), cut depth: 0.15(mm), feed: 3400(mm), calculating the machining quality of each machining feature according to the optimized parameters, and referring to Table 2 for comparison of the machining quality before and after optimization,
TABLE 2 comparison of processing quality before and after optimization
Machining features
|
Before optimization
|
After the invention is optimized
|
Improved effect after optimization
|
Rectangle 1 Long error (mm)
|
0.013
|
0.002
|
84.6%
|
Rectangle 1 width error (mm)
|
0.010
|
0.009
|
10%
|
Rectangle 2 Long error (mm)
|
0.006
|
0.002
|
66.7%
|
Rectangle 2 width error (mm)
|
0.011
|
0.003
|
72.7%
|
Rectangle |
3 Long error (mm)
|
0.063
|
0.002
|
96.9%
|
Rectangle |
3 width error (mm)
|
0.012
|
0.004
|
66.7%
|
Rectangle 4 long error (mm)
|
0.029
|
0.003
|
89.7%
|
Rectangle 4 width error (mm)
|
0.011
|
0.001
|
91%
|
Crack width error (mm)
|
0.011
|
0.008
|
27.3%
|
Round hole diameter error (mm)
|
0.018
|
0.013
|
27.8% |
The data in the comprehensive table show that the processing quality of the rectangle is obviously improved after the technological parameters are optimized, the processing quality of the rectangle 3 with the length is improved by 96.9%, the processing quality of the rectangle 3 with the width is improved by 66.7%, the processing quality of the crack with the width is improved by 27.3%, and the processing quality of the circular hole with the diameter is improved by 27.8% aiming at the processing characteristics of the flat plate crack antenna. After the optimization of the technological parameters, the best lifting effect is the processing quality with the length of the rectangle 3, the lifting effect reaches 96.9 percent, the lowest lifting effect is the width of the rectangle 1 and also reaches 10 percent, the lifting effects of the processing quality with the length and the width of the other rectangles reach more than 60 percent, and the processing quality of all the processing characteristics is obviously improved.
In summary, the invention discloses a multi-quality target prediction and technological parameter optimization recommendation method for numerical control machining of a multi-machining-characteristic thin plate part, which solves the problems of multi-quality target prediction and technological parameter optimization of the machining characteristics of the part, and the implementation steps comprise: collecting and sorting a data set; preprocessing the sorted data; sorting the feature importance of the data; dividing a correlation analysis data set into a training set and a test set; constructing a multi-target prediction model by using a machine learning algorithm; and (5) constructing a technological parameter optimization model by using a genetic algorithm to complete the technological parameter optimization of the machined part. The invention uses machine learning method to predict the processing characteristics with multi-quality targets, and uses improved genetic algorithm to optimize the technological parameters, so as to obtain the optimal technological parameters. The whole scheme is rigorous and complete, high in prediction precision and good in parameter optimization effect, is used for adaptive recommendation of process parameters and cutter parameters, and effectively improves the machining quality.