Machine tool response modeling method, system and response prediction method based on transfer learning

Through transfer learning technology, the migration method of source domain and target domain data is used to solve the problem of low efficiency in establishing machine tool response models under changes in process conditions, achieve efficient modeling and accurate prediction under new working conditions, and reduce experimental costs. .

CN114239733BActive Publication Date: 2024-09-06HUAZHONG UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111570003.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-21
Publication Date
2024-09-06
Estimated Expiration
2041-12-21

AI Technical Summary

Technical Problem

The existing technology requires remodeling when process conditions change, which results in the establishment of a machine tool response prediction model being inefficient and time-consuming. It is especially difficult to apply to other conditions under various cutting conditions.

Method used

Using a method based on transfer learning, by acquiring source domain and target domain data, training the source domain response prediction model and adding an adaptive layer, performing domain adaptation adjustments to form a domain adaptation model, and then using auxiliary training data to train the target domain response prediction model, Reduce data distribution differences and improve modeling efficiency.

Benefits of technology

Efficiently establishing prediction models under new working conditions reduces the need for new data, reduces experimental costs, and significantly improves modeling effects, allowing source domain data to be reused in the target domain and improving prediction accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114239733B
    Figure CN114239733B
Patent Text Reader

Abstract

The present invention discloses a machine tool response modeling method, a modeling system and a response prediction method based on transfer learning, the modeling method comprising: training a source domain response prediction model using source domain data; adding an adaptive layer to the source domain response prediction model, so that the loss function is less than a preset value, reversely adjusting the parameters of the source domain response prediction model as a target, and obtaining a domain adaptation initial model, wherein the loss function comprises a classification loss and a domain adaptation loss; inputting the target domain data into the domain adaptation initial model for fine-tuning, and obtaining a domain adaptation model; inputting the source domain data into the domain adaptation model, and obtaining auxiliary training data; and training the target domain response prediction model using the auxiliary training data and the target domain data. The method combines model migration and sample migration to realize the reuse of source domain data, and reduces the demand for new data for model establishment under new working conditions, thereby reducing the experimental cost of data collection in actual production under various working conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of neural network learning, and more specifically, relates to a machine tool response modeling method, a modeling system and a response prediction method based on transfer learning. Background Art

[0002] In modern machining processes, the use of computer technology to establish a machine tool response model can quickly predict the machine tool response under the corresponding process parameter conditions. Today, data-driven modeling is one of the most commonly used methods to predict machine tool responses. Establishing a model with excellent performance can quickly predict the machine tool response. Many researchers have been committed to the study of specific scenario modeling. However, when the working conditions change, it is necessary to re-model according to the new process conditions. For example, when predicting spindle power through cutting modeling, different machining conditions have different coefficients and parameters for the model. Therefore, the model under one cutting condition is difficult to apply to another cutting condition. For example, the cutting power model for machining aluminum cannot be used to predict the power of cutting steel. In this case, the only feasible method is to rebuild the model according to the new cutting conditions. However, this is a time-consuming and tedious process, especially for milling operations with a large number of cutting condition combinations. How to efficiently and conveniently establish a prediction model under new machining conditions is an urgent and challenging problem. Summary of the invention

[0003] In response to the above defects or improvement needs of the prior art, the present invention provides a machine tool response modeling method, a modeling system and a response prediction method based on transfer learning, which aims to combine existing data sets under different working conditions for modeling, thereby solving the technical problems of low efficiency and long time consumption caused by re-acquisition of experimental data under current working conditions for modeling.

[0004] To achieve the above object, according to one aspect of the present invention, a machine tool response modeling method based on transfer learning is provided, comprising:

[0005] Acquire source domain data and target domain data, wherein the source domain data is sample data under a first working condition, and the target domain data is sample data under a second working condition;

[0006] Using the source domain data to train a source domain response prediction model;

[0007] An adaptive layer is added to the source domain response prediction model, the source domain data is input into the source domain response prediction model, a loss function is calculated based on the adaptive layer, and parameters of the source domain response prediction model are reversely adjusted to make the loss function less than a preset value, so as to obtain a domain adaptation initial model, wherein the loss function includes a classification loss and a domain adaptation loss, and the domain adaptation loss includes a maximum mean difference loss between the source domain data and the target domain data;

[0008] Inputting the target domain data into the domain adaptation initial model, and reversely fine-tuning the parameters of the domain adaptation initial model with the classification loss function being less than a preset value as a goal, to obtain a domain adaptation model;

[0009] Inputting the source domain data into the domain adaptation model to obtain auxiliary training data;

[0010] The target domain response prediction model is trained using the auxiliary training data and the target domain data.

[0011] In one embodiment,

[0012] The source domain data includes:

[0013]

[0014] The target domain data includes:

[0015]

[0016] Among them, x i represents the process parameter feature vector in the i-th sample data, y i represents the response feature corresponding to the process parameter feature vector in the i-th sample data; n represents the number of samples in the source domain data, m represents the number of samples in the target domain, and k represents the feature dimension in each sample;

[0017] The loss function including classification loss and domain adaptation loss is:

[0018]

[0019] in, Indicates that The result obtained by inputting the source domain response prediction model is as follows, and λ is the weight.

[0020] In one embodiment, the neural network structure of the domain adaptation initial model includes first to fourth layers connected sequentially, wherein the first layer is an input layer, the second and third layers are hidden layers, and the fourth layer is an output layer.

[0021] In one embodiment, the step of performing reverse fine-tuning includes:

[0022] Freeze the neural network structure of the initial model and the coefficients of its first and second layers, and determine the mapping of the third layer

[0023] sp=σ 3 (W 3 x 3 +b 3 )

[0024] Among them, sp is the output result of the output layer, x 3 is the vector of the third layer, W 3 and b 3 is the coefficient of the third layer, σ 3 is the activation function of the third layer;

[0025] The target domain data is used to train the domain adaptation initial model, and the classification loss function is less than the preset value and the target training coefficient W is set. 3 and b 3 , and obtain the domain adaptation model.

[0026] In one embodiment, the learning rate when the source domain data is used to train the source domain response prediction model is c, and the learning rate when the target domain data is used to train the domain adaptation initial model is less than or equal to

[0027] In one embodiment, training a target domain response prediction model using the auxiliary training data and the target domain data includes:

[0028] Step S1: Initialize the weight vector Among them, the weight of the i-th sample is

[0029]

[0030] Step S2: For the tth iteration, call the base learner and calculate the merged data set T = T s ′∪T t and T = T s ′∪T t The weight distribution w on t , get a base learner h t :X→Y;

[0031] Step S3: Calculate the base learner h t Adjusted error for each sample in the dataset T:

[0032]

[0033] Among them, E t Denotes the target domain dataset T t The maximum value of the sample error in , and

[0034]

[0035] Step S4: Calculate h t In the target domain dataset T t Adjustment error on:

[0036]

[0037] Step S5: Determine ∈ t Is it less than the set threshold? If not, jump to step S2. If so, the weight vector of the t+1th iteration can be updated as:

[0038]

[0039] Among them, β t =ε t / (1-ε t ), N is the preset number of iterations;

[0040] Step S6: Determine whether the number of iterations reaches the preset number of iterations. If not, continue iterating until the number of iterations reaches the preset number of iterations to generate a set of base learners {h 1 ,h 2 ,…,h N}, take the last P base learners and integrate them to get the final target domain response prediction model:

[0041]

[0042] In one of the embodiments, the neural network structure based on which the target domain response prediction model is trained is the same as the neural network structure based on which the source domain response prediction model is trained.

[0043] In one of the embodiments, the source domain data is the milling spindle power sample data under the first machining condition, the target domain data is the milling spindle power sample data under the second machining condition, the source domain response prediction model is the source domain milling spindle power prediction model, and the target domain response prediction model is the target domain milling spindle power prediction model.

[0044] To achieve the above object, according to another aspect of the present invention, a machine tool response modeling system based on transfer learning is proposed, comprising:

[0045] A data acquisition unit, used to acquire source domain data and target domain data, wherein the source domain data is sample data under a first working condition, and the target domain data is sample data under a second working condition;

[0046] A source domain modeling unit, used for training a source domain response prediction model using the source domain data;

[0047] an adaptive adjustment unit, configured to input the source domain data into the source domain response prediction model, calculate a loss function, and reversely adjust the parameters of the source domain response prediction model as a target to make the loss function less than a preset value, so as to obtain a domain adaptation initial model, wherein the loss function includes a classification loss and a domain adaptation loss, and the domain adaptation loss includes a maximum mean difference loss between the source domain data and the target domain data;

[0048] A fine-tuning unit, configured to input the target domain data into the domain adaptation initial model, and reversely fine-tune the parameters of the domain adaptation initial model with the classification loss function being less than a preset value, so as to obtain a domain adaptation model;

[0049] a data migration unit, configured to input the source domain data into the domain adaptation model to obtain auxiliary training data;

[0050] The target domain modeling unit is used to train a target domain response prediction model using the auxiliary training data and the target domain data.

[0051] To achieve the above object, according to another aspect of the present invention, a response prediction method based on transfer learning is proposed, comprising:

[0052] Acquire a target domain response prediction model, wherein the target domain response prediction model is a target domain response prediction model obtained according to the above-mentioned machine tool response modeling method based on transfer learning;

[0053] The known parameters are input into the target domain response prediction model to obtain prediction information corresponding to the known parameters.

[0054] In general, this application proposes a transfer learning method that is a hybrid of model migration and sample migration, which reuses the source domain data samples under the first working condition that have been historically saved to the second working condition to reduce the demand for target domain data samples under the second working condition. First, a domain adaptation model neural network is established based on the model migration method, that is, the trained source domain response prediction model is reused, and the source domain response prediction model is adjusted to a domain adaptation model through adaptive adjustment and fine-tuning techniques. Then, auxiliary training data is obtained based on the sample migration method, that is, the source domain data is input into the domain adaptation model to obtain auxiliary training data. The domain adaptation model can realize domain adaptation of data under two different working conditions, reduce data distribution differences, and enable a large number of data samples in the source domain to be reused in the modeling process of the target domain.

[0055] Compared with directly using source domain data without domain adaptation, the source domain auxiliary training data obtained through domain adaptation is closer to the target domain data, and using it in the migration modeling process significantly improves the modeling effect. In addition, when sufficient data has been collected for one working condition, by migrating the data samples of this working condition, only a small amount of new data is needed to establish a spindle power prediction model with good performance in other similar processing conditions, reducing the demand for new data for model establishment under new working conditions, thereby reducing the experimental cost of data collection for various working conditions in actual production. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 A flowchart of the steps of a machine tool response modeling method based on transfer learning in one embodiment of the present application;

[0057] Figure 2 A flowchart of a method for modeling milling spindle power based on transfer learning in one embodiment of the present application;

[0058] Figure 3 A neural network structure diagram of a source domain response prediction model in an embodiment of the present application;

[0059] Figure 4 This is a schematic diagram of a structure after an adaptive layer is added to a source domain response prediction model in an embodiment of the present application;

[0060] Figure 5 The figure is a flowchart of the specific steps of obtaining auxiliary training data in one embodiment of the present application;

[0061] Figure 6 A flow chart for constructing a target domain response prediction model in one embodiment of the present application;

[0062] Figure 7 A diagram showing the result of domain adaptation of source domain and target domain data by a domain adaptation model in one embodiment of the present application;

[0063] Figure 8 The prediction effect of the prediction model obtained by the migration modeling method in one embodiment of the present application on a partial test set of the target domain;

[0064] Fig. 9 A prediction error curve diagram of the prediction model obtained by using the migration modeling method in one embodiment of the present application on all test sets in the target domain;

[0065] Fig.10 The proportion of the prediction error distribution of the prediction model obtained by the migration modeling method in one embodiment of the present application on all test sets in the target domain;

[0066] Fig.11The prediction effect diagram of the spindle power model trained separately using 192 sets of data in the target domain for this application;

[0067] Fig.12 This is a prediction effect diagram of the prediction model obtained by using the migration modeling method in one embodiment of the present application. DETAILED DESCRIPTION

[0068] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0069] Figure 1 is a flow chart of the steps of a machine tool response modeling method based on transfer learning in one embodiment of the present application, Figure 2 FIG. 1 is a flowchart of a method for modeling milling spindle power based on transfer learning in an embodiment of the present application. Figure 1 and Figure 2 As shown, the method comprises the following steps:

[0070] Step S100: Acquire source domain data and target domain data, wherein the source domain data is sample data under a first working condition, and the target domain data is sample data under a second working condition.

[0071] The processing parameters of the first working condition and the second working condition are different.

[0072] The source domain data can be the historical data samples under the first working condition that have been saved, and the target domain data can be the new data samples that are currently retrieved through experiments. The sample data in the target domain data is much smaller than the number of samples in the source domain data, that is, the sample data of the reused source domain data accounts for a larger proportion of the data samples used for training the target domain response prediction model. Among them, each sample contains feature values ​​of multiple dimensions, specifically process parameter features and response features corresponding to the process parameter features. Usually, there is one response feature, and there can be multiple process parameter features. When there are multiple process parameter features, a multi-dimensional process parameter feature vector is formed.

[0073] Take cutting processing as an example. Figure 2As shown in FIG. 1 , sufficient spindle power data samples under source domain milling tools and materials are obtained through cutting processing experiments as source domain data samples. Among them, the spindle power data samples contain various different process parameter combinations (process parameter features) and their corresponding spindle power values ​​(response features). A small number of spindle power data samples under target domain tools and materials are obtained through a small number of cutting processing experiments. For example, the process parameters in each milling sample include feed rate F, cutting depth a a , cutting width a r and spindle speed S, and the corresponding response characteristic is cutting power SP.

[0074] Step S200: using source domain data to train a source domain response prediction model.

[0075] The source domain response prediction model is built as a multi-hidden layer neural network, and the process parameter characteristics in each sample are used as input and the response characteristics are used as output to train the source domain response prediction model.

[0076] Figure 3 FIG. 1 is a diagram of the neural network structure of the source domain response prediction model in an embodiment of the present application. In order to obtain the best neural network structure, based on the source domain data samples established above, the hyperparameters, such as the number of hidden layers and the number of neurons, are determined by trial and error. The final structure is as follows: Figure 3 As shown in FIG. 1 , it includes the first to fourth layers connected sequentially, wherein the first layer is the input layer, the second and third layers are hidden layers, and the fourth layer is the output layer. Taking cutting processing as an example, given the cutting conditions under specific tool, workpiece and cooling conditions, the cutting power of milling is affected by the feed rate F, cutting depth a a , cutting width a r The influence of machining parameters such as the spindle speed S is taken into consideration. With the four machining parameters as input and the cutting power as output, the cutting power is modeled as a multi-hidden layer neural network. The proposed neural network has 4 neurons in the input layer and 1 neuron in the output layer; in addition, each of the two hidden layers has 10 neurons.

[0077] Step S300: adding an adaptive layer to the source domain response prediction model, inputting the source domain data into the source domain response prediction model, calculating the loss function based on the adaptive layer and reversely adjusting the parameters of the source domain response prediction model to make the loss function less than a preset value, and obtaining a domain adaptation initial model. The loss function includes classification loss and domain adaptation loss, and the domain adaptation loss includes the maximum mean difference loss between the source domain data and the target domain data.

[0078] In order to make transfer learning more effective, we first need to solve the problem that the source domain and target domain samples do not follow the same distribution. Before modeling, we need to reduce the difference in data distribution. Figure 4FIG. 1 is a schematic diagram of a structure after adding an adaptive layer to a source domain response prediction model in an embodiment of the present application. Figure 4 As shown, the present invention proposes a domain adaptation neural network structure suitable for regression problems by reusing the source domain response prediction model in S200 and adding an adaptive layer. The maximum mean difference (MMD) is used as a metric to learn the knowledge in the source domain spindle power data and simultaneously reduce the distribution difference between the source domain data and the target domain data, thereby obtaining a domain adaptation initial model.

[0079] Figure 5 FIG. 1 is a flowchart showing the steps of obtaining auxiliary training data in an embodiment of the present application. Figure 5 As shown,

[0080] The source domain data sample is represented as:

[0081]

[0082] The target domain data sample is represented as:

[0083]

[0084] Among them, x i represents the process parameter feature vector in the i-th sample data, y i represents the response feature corresponding to the process parameter feature vector in the i-th sample data; n represents the number of samples in the source domain data, m represents the number of samples in the target domain, and k represents the feature dimension in each sample. For example, when the feed rate F and cutting depth a a , cutting width a r When the machining parameters of spindle speed S are input and cutting power is output, each sample contains 5-dimensional features, k=5.

[0085] The source domain data is fed into the domain adaptation neural network for training, with the goal of minimizing the loss function.

[0086]

[0087] Among them, l represents the final loss of the network, Represents the conventional classification loss of the network on labeled data, represents the domain adaptation loss of the network, and λ is a weight parameter that weighs the two parts. The value of λ can be determined by trial and error, with the difference between the auxiliary training data and the target domain data being small.

[0088] Step S400: Input the target domain data into the domain adaptation initial model, reversely fine-tune the parameters of the domain adaptation initial model with the classification loss function being less than a preset value, and obtain the domain adaptation model.

[0089] It should be noted that the preset values ​​in different steps may be the same or different.

[0090] Since the loss function in step S300 includes Auxiliary training data obtained by domain adaptation network transfer The distribution of T cannot be completely close to t Therefore, it is necessary to train the domain adaptation initial model with the target domain data to achieve fine-tuning.

[0091] In one embodiment, Figure 3 Taking the neural network in as an example, the model fine-tuning process includes:

[0092] First, the neural network structure of the initial model and its coefficients of the first layer (input layer) and the second layer are frozen. For the mapping of the third layer, that is, sp = σ 3 (W 3 x 3 +b 3 )(where x 3 is the vector of the third layer, W 3 and b 3 is the coefficient, σ 3 is the activation function);

[0093] Then, through the target domain data T t Using loss function Further training model coefficient W 3 and b 3 During fine-tuning, a smaller learning rate of 0.001 is used, while the learning rate for training in step S300 is 0.01.

[0094] The final domain adaptation model is obtained through the above fine-tuning, that is, the domain adaptation neural network (DaNN) is obtained.

[0095] Step S500: input source domain data into the domain adaptation model to obtain auxiliary training data.

[0096] Specifically, Figure 5 As shown, the source domain data T s After being sent to the trained domain adaptation neural network for domain adaptation, auxiliary training data T′ that is more similar to the target domain data is obtained. s .

[0097] Step S600: training a target domain response prediction model using auxiliary training data and target domain data.

[0098] Among them, the target domain response prediction model can be directly trained by auxiliary training data and target domain data. The auxiliary training data T′ obtained after the data from the source domain is domain adapteds and the target domain training data T t The difference is already small, but there are still some differences to a certain extent. Therefore, the auxiliary training data and the target domain data can also be processed differently during training to generate a target domain response prediction model with good performance in the target domain.

[0099] In one embodiment, the neural network structure based on which the target domain response prediction model is trained is the same as the neural network structure based on which the source domain response prediction model is trained. Figure 3 The neural network structure shown.

[0100] Figure 6 A flow chart for constructing a target domain response prediction model in one embodiment of the present application. Figure 6 As shown, the training process includes:

[0101] Step S1: Initialize the weight vector Among them, the weight of the i-th sample is

[0102]

[0103] Among them, the weights of i=1,…,n correspond to the auxiliary training data, and the weights of i=n+1,…,n+m correspond to the target domain data.

[0104] Step S2: For the tth iteration, call the base learner and calculate the merged data set T = T′ s ∪T t and T = T s ′∪T t The weight distribution w on t , get a base learner h t :X→Y;

[0105] Step S3: Calculate the base learner h t Adjusted error for each sample in the dataset T:

[0106]

[0107] Among them, E t Denotes the target domain dataset T t The maximum value of the sample error in , and

[0108]

[0109] Step S4: Calculate h t In the target domain dataset T t Adjustment error on:

[0110]

[0111] Step S5: Determine ∈ t Is it less than the set threshold? If not, jump to step S2. If so, the weight vector of the t+1th iteration can be updated as:

[0112]

[0113] Among them, β t =ε t / (1-ε t ), N is the preset number of iterations; specifically, the threshold value may be set to 0.5;

[0114] Step S6: Determine whether the number of iterations reaches the preset number of iterations. If not, continue iterating until the number of iterations reaches the preset number of iterations to generate a set of base learners {h 1 ,h 2 ,…,h N}, take the last P base learners and integrate them to get the final target domain response prediction model:

[0115]

[0116] Specifically, P may be equal to N / 2.

[0117] In order to further verify the effect of the present application, a specific example is described below.

[0118] Step S101: obtaining spindle power training samples of the source domain and the target domain for transfer learning through cutting experiments.

[0119] The embodiment of the present invention is carried out on a three-axis vertical machining center, and the migrated working conditions include different tool types and blank materials.

[0120] (1) Set the following cutting conditions as the source domain:

[0121] 6mm diameter, HRC 50, carbide 3-edge flat bottom milling cutter T 1 , cutting 7075 aluminum;

[0122] (2) Set the following cutting conditions as the target domain:

[0123] 6mm diameter, HRC 60, carbide 3-edge flat bottom milling cutter T 2 , cutting 45 steel;

[0124] (3) Milling spindle power data collection experiments are carried out for source domain working conditions and target domain working conditions to obtain spindle power training samples.

[0125] The experimental parameters of source domain cutting are shown in Table 1.

[0126] Table 1 Source domain cutting experiment parameters

[0127]

[0128] The experiment obtained a total of 2400 groups of spindle power samples in the source domain, all of which were used for training.

[0129] The experimental parameters of the target domain cutting process are shown in Table 2.

[0130] Table 2 Target domain cutting experimental parameters

[0131]

[0132] There are 1536 groups of spindle power samples in the target domain, only 192 of which are used for training, and the rest are used for testing.

[0133] Step S201: construct a source domain spindle power prediction model

[0134] Given the cutting conditions of a specific tool, workpiece and cooling conditions, the cutting power of milling is affected by the feed rate F, the cutting depth a a , cutting width a r The influence of machining parameters such as spindle speed S is taken into account. The four machining parameters are taken as input and cutting power is taken as output. The cutting power is modeled as a multi-hidden layer neural network. The proposed neural network structure is as follows: Figure 3 In order to obtain the best neural network structure, based on the source domain data samples established above, the hyperparameters, such as the number of hidden layers and the number of neurons, are determined by trial and error. The final structure is as follows Figure 2 As shown: The proposed neural network has 4 neurons in the input layer and 1 neuron in the output layer; in addition, it has 2 hidden layers, each of which has 10 neurons.

[0135] Step S301 : preliminary domain adaptation of the spindle power data of the source domain and the target domain, migrating the source domain spindle power prediction model into a pre-adapted initial model.

[0136] Step S401, fine-tune the pre-adapted initial model to obtain a domain adaptation model.

[0137] Among them, the steps of adaptation and fine-tuning have been introduced above and will not be repeated here.

[0138] Step S501: source domain data T s After the trained domain adaptation model is sent to the domain adaptation model, auxiliary training data T′ that is more similar to the target domain data is obtained. s .

[0139] Figure 7FIG. 1 is a diagram showing the result of domain adaptation of source domain and target domain data by the domain adaptation model in one embodiment of the present application. Figure 7 As shown in the figure, after domain adaptation, the distribution difference between 2400 sets of source domain data and target domain data is significantly reduced, and 2400 sets of auxiliary training samples are obtained.

[0140] Step S601: construct a target domain spindle power model.

[0141] During the training process, 2400 sets of source domain auxiliary training samples and 192 sets of target domain data samples obtained in S501 will be used, and the base learning algorithm used is Figure 3 The source domain neural network shown generates the number of base learners N=10, and obtains the final target domain spindle power model. The specific steps have been introduced above and will not be repeated here.

[0142] The remaining 1344 groups of spindle power samples that are not used for training in the target domain are used as test sets to test the target domain spindle power model. Figure 8 The prediction effect of the prediction model obtained by the migration modeling method in one embodiment of the present application on a partial test set of the target domain. Fig. 9 This is a prediction error curve graph of the prediction model obtained by using the migration modeling method in one embodiment of the present application on all test sets in the target domain. Fig.10 This is the proportion of the prediction error distribution of the prediction model obtained by the migration modeling method in one embodiment of the present application on all test sets in the target domain. The test results show that in the prediction results of 1344 groups of data in the target domain test set, 97% of the samples have a prediction error within ±10%, 81% of the samples have a prediction error within ±5%, and the average prediction error is 3.13%, which meets the accuracy requirements.

[0143] Fig.11 This application uses 192 sets of data in the target domain to train the spindle power model separately for prediction effect diagram. Fig.12 This is a prediction model prediction effect diagram obtained by using the migration modeling method in an embodiment of the present application. In order to further verify the difference between the prediction results without using migration and with using migration, only 192 groups of spindle power models in the target domain are used to train the model. The trained model neural network structure is the same as above. The training results are shown in Fig.11 As shown, its prediction error is as high as 17.39%. Fig.11 and Fig.12As shown in the figure, the effect of not using transfer learning is significantly worse than the prediction effect of transfer learning. Only using about 10% of the target domain data for training cannot train a good model. When the proportion of target domain data samples used for training was increased to 60%, that is, 922 sets of target domain data, an average prediction error of 5.16% was obtained. When the proportion of target domain data samples used for training was increased to 80%, that is, 1229 sets of target domain data, an average prediction error of 3.71% was obtained. This shows that the performance level of the transfer model has at least reached the prediction accuracy that can be achieved by the non-transfer model using 80% of the data for training, and the amount of training data for the transfer model is only 1 / 8 of that, indicating that the degree of reduction in data volume is at least 85%.

[0144] Accordingly, the present application also protects a machine tool response modeling system based on transfer learning corresponding to the above method, which comprises:

[0145] A data acquisition unit, used to acquire source domain data and target domain data, wherein the source domain data is sample data under a first working condition, and the target domain data is sample data under a second working condition;

[0146] A source domain modeling unit, used for training a source domain response prediction model using source domain data;

[0147] An adaptive adjustment unit, used for inputting source domain data into a source domain response prediction model, calculating a loss function and reversely adjusting parameters of the source domain response prediction model as a target to make the loss function less than a preset value, so as to obtain a domain adaptation initial model, wherein the loss function includes a classification loss and a domain adaptation loss, and the domain adaptation loss includes a maximum mean difference loss between the source domain data and the target domain data;

[0148] A fine-tuning unit is used to input the target domain data into the domain adaptation initial model, and reversely fine-tune the parameters of the domain adaptation initial model with the classification loss function being less than a preset value, so as to obtain a domain adaptation model;

[0149] A data migration unit, used to input source domain data into a domain adaptation model to obtain auxiliary training data;

[0150] The target domain modeling unit is used to train a target domain response prediction model using auxiliary training data and target domain data.

[0151] The above-mentioned machine tool response modeling system based on transfer learning is used to implement the above-mentioned machine tool response modeling method based on transfer learning. Each unit is used to execute the corresponding steps of the modeling method. The specific process of each unit executing the corresponding steps can be referred to the above introduction and will not be repeated here.

[0152] Correspondingly, the present application also protects a response prediction method based on transfer learning, which includes:

[0153] Obtaining a target domain response prediction model, where the target domain response prediction model is a target domain response prediction model obtained according to any of the above transfer learning-based machine tool response modeling methods;

[0154] The known parameters are input into the target domain response prediction model to obtain the prediction information corresponding to the known parameters.

[0155] In summary, the present application combines a model migration and a sample migration to reuse the source domain data samples under the first working condition that have been historically saved to the second working condition to reduce the demand for the target domain data samples under the second working condition. Among them, a domain adaptation model neural network is established based on the model migration method, and then, auxiliary training data is obtained based on the sample migration method. The domain adaptation model can realize the domain adaptation of data under two different working conditions, reduce the difference in data distribution, and enable a large number of data samples in the source domain to be reused in the modeling process of the target domain. Compared with directly using the source domain data that has not been processed by domain adaptation, the source domain auxiliary training data that is more similar to the target domain data obtained through domain adaptation is used in the migration modeling process to significantly improve the modeling effect. In addition, when sufficient data has been collected for one working condition, by migrating the data samples of the working condition, only a small amount of new data is needed to establish a spindle power prediction model with good performance in other similar processing conditions, reducing the demand for new data for model establishment under new working conditions, thereby reducing the experimental cost of data collection in the face of multiple different working conditions in actual production.

[0156] It will be easily understood by those skilled in the art that the above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A machine tool response modeling method based on transfer learning, It is characterized in that include: Acquire source domain data and target domain data, wherein the source domain data is sample data under a first working condition, and the target domain data is sample data under a second working condition; Using the source domain data to train a source domain response prediction model; An adaptive layer is added to the source domain response prediction model, the source domain data is input into the source domain response prediction model, a loss function is calculated based on the adaptive layer, and parameters of the source domain response prediction model are reversely adjusted to make the loss function less than a preset value, so as to obtain a domain adaptation initial model, wherein the loss function includes a classification loss and a domain adaptation loss, and the domain adaptation loss includes a maximum mean difference loss between the source domain data and the target domain data; Inputting the target domain data into the domain adaptation initial model, and reversely fine-tuning the parameters of the domain adaptation initial model with the classification loss function being less than a preset value as a goal, to obtain a domain adaptation model; Inputting the source domain data into the domain adaptation model to obtain auxiliary training data; The target domain response prediction model is trained using the auxiliary training data and the target domain data.

2. The machine tool response modeling method based on transfer learning as claimed in claim 1, It is characterized in that The source domain data includes: The target domain data includes: Among them, x i represents the process parameter feature vector in the i-th sample data, y i represents the response feature corresponding to the process parameter feature vector in the i-th sample data; n represents the number of samples in the source domain data, m represents the number of samples in the target domain, and k represents the feature dimension in each sample; The loss function including classification loss and domain adaptation loss is: in, Indicates that The result obtained by inputting the source domain response prediction model is as follows, and λ is the weight.

3. The machine tool response modeling method based on transfer learning as claimed in claim 1, It is characterized in that The neural network structure of the domain adaptation initial model includes first to fourth layers connected in sequence, wherein the first layer is an input layer, the second and third layers are hidden layers, and the fourth layer is an output layer.

4. The machine tool response modeling method based on transfer learning as claimed in claim 3, It is characterized in that The steps to perform reverse fine-tuning include: Freeze the neural network structure of the initial model and the coefficients of its first and second layers, and determine the mapping of the third layer sp=σ 3 (W 3 x 3 +b 3 ) Among them, sp is the output result of the output layer, x 3 is the vector of the third layer, W 3 and b 3 is the coefficient of the third layer, σ 3 is the activation function of the third layer; The target domain data is used to train the domain adaptation initial model, and the classification loss function is less than the preset value and the target training coefficient W is set. 3 and b 3 , and obtain the domain adaptation model.

5. The machine tool response modeling method based on transfer learning as claimed in claim 4, It is characterized in that The learning rate when the source domain data is used to train the source domain response prediction model is c, and the learning rate when the target domain data is used to train the domain adaptation initial model is less than or equal to 6. The machine tool response modeling method based on transfer learning as claimed in claim 2, It is characterized in that Training a target domain response prediction model using the auxiliary training data and the target domain data includes: Step S1: Initialize the weight vector Among them, the weight of the i-th sample is Step S2: For the tth iteration, call the base learner and calculate the merged data set T = T s ′∪T t and T = T s ′∪T t The weight distribution w on t , get a base learner h t :X→Y; Step S3: Calculate the base learner h t Adjusted error for each sample in the dataset T: Among them, E t Denotes the target domain dataset T t The maximum value of the sample error in , and Step S4: Calculate h t In the target domain dataset T t Adjustment error on: Step S5: Determine ∈ t Is it less than the set threshold? If not, jump to step S2. If so, the weight vector of the t+1th iteration can be updated as: Among them, β t =ε t / (1-ε t ), N is the preset number of iterations; Step S6: Determine whether the number of iterations reaches the preset number of iterations. If not, continue iterating until the number of iterations reaches the preset number of iterations to generate a set of base learners {h 1 ,h 2 ,…,h N }, take the last P base learners and integrate them to get the final target domain response prediction model:

7. The machine tool response modeling method based on transfer learning as claimed in claim 1, It is characterized in that The neural network structure based on which the target domain response prediction model is trained is the same as the neural network structure based on which the source domain response prediction model is trained.

8. The machine tool response modeling method based on transfer learning according to any one of claims 1 to 6, It is characterized in that The source domain data is the milling spindle power sample data under the first machining condition, the target domain data is the milling spindle power sample data under the second machining condition, the source domain response prediction model is the source domain milling spindle power prediction model, and the target domain response prediction model is the target domain milling spindle power prediction model.

9. A machine tool response modeling system based on transfer learning, It is characterized in that include: A data acquisition unit, used to acquire source domain data and target domain data, wherein the source domain data is sample data under a first working condition, and the target domain data is sample data under a second working condition; A source domain modeling unit, used for training a source domain response prediction model using the source domain data; an adaptive adjustment unit, configured to input the source domain data into the source domain response prediction model, calculate a loss function, and reversely adjust the parameters of the source domain response prediction model as a target to make the loss function less than a preset value, so as to obtain a domain adaptation initial model, wherein the loss function includes a classification loss and a domain adaptation loss, and the domain adaptation loss includes a maximum mean difference loss between the source domain data and the target domain data; A fine-tuning unit, configured to input the target domain data into the domain adaptation initial model, and reversely fine-tune the parameters of the domain adaptation initial model with the classification loss function being less than a preset value, so as to obtain a domain adaptation model; a data migration unit, configured to input the source domain data into the domain adaptation model to obtain auxiliary training data; The target domain modeling unit is used to train a target domain response prediction model using the auxiliary training data and the target domain data.

10. A response prediction method based on transfer learning, It is characterized in that include: Acquire a target domain response prediction model, wherein the target domain response prediction model is a target domain response prediction model obtained by the machine tool response modeling method based on transfer learning according to any one of claims 1 to 8; The known parameters are input into the target domain response prediction model to obtain prediction information corresponding to the known parameters.