A cutting force monitoring method and device based on unsupervised domain adversarial algorithm

The cutting force monitoring method constructed through the unsupervised domain adversarial algorithm solves the problem of cutting force monitoring at different speeds, realizes efficient and accurate monitoring in complex environments, reduces costs and improves the adaptability of the model.

CN117086696BActive Publication Date: 2025-09-23HUAZHONG UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311087952.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-28
Publication Date
2025-09-23
Estimated Expiration
2043-08-28

AI Technical Summary

Technical Problem

Existing technologies make it difficult to accurately monitor cutting forces at different speeds, especially in the processing of large-sized parts and complex processes. Traditional methods are costly and difficult to adapt to harsh environments, and traditional machine learning algorithms have poor generalization capabilities.

Method used

An unsupervised domain adversarial algorithm is adopted to build an unsupervised domain adversarial model, use the inherent signal of the machine tool to monitor the cutting force, use pseudo labels and kernel density estimation methods to extract features and align distributions, and realize cutting force prediction at different speeds.

Benefits of technology

The cutting force monitoring at different rotation speeds without external sensors is realized, which reduces the modeling cost, improves the monitoring accuracy and generalization ability, and is suitable for actual industrial applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117086696B_ABST
    Figure CN117086696B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field related to CNC machine tool processing state monitoring, and discloses a cutting force monitoring method and device based on an unsupervised domain adversarial algorithm, comprising the following steps: (1) collecting machine tool monitoring signals and cutting force signals under different speed conditions to construct a source domain speed experimental data set; (2) processing the signals in the source domain speed experimental data set; (3) selecting a source domain from the obtained source domain data set and assigning a pseudo label to the target domain; (4) constructing an unsupervised domain adversarial model, training the unsupervised domain adversarial model, and updating the parameters of the unsupervised domain adversarial model based on the minimized regression loss, weight difference constraint loss, consistency loss and adversarial loss obtained during the training process to obtain a cutting force prediction model corresponding to the target speed, and further using the cutting force prediction model to monitor the cutting force at the target speed. The present invention realizes the prediction of cutting force at a new speed without labels.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field related to CNC machine tool processing state monitoring, and more specifically, relates to a cutting force monitoring method and equipment based on an unsupervised domain adversarial algorithm. Background Art

[0002] With the increasing demands of modern processing industries for product quality, efficiency, and economy, processing status monitoring is of great significance for the processing of high-quality products and intelligent manufacturing. Metal cutting processing is widely used in the fields of aerospace, automobiles, ships, and petrochemicals. Cutting force is generated by the interaction between the cutting tool and the material. Compared with vibration and sound signals, it can directly reflect the status of the processing system more sensitively and quickly. Therefore, cutting force is used as the most valuable signal in processing status monitoring, tool wear and damage, chatter and vibration characteristics, processing load control, and process parameter optimization.

[0003] Large, complex parts are machined through multiple steps, each employing different cutting speeds. Accurately monitoring cutting forces at these speeds is crucial. Currently, mainstream methods for monitoring cutting forces include direct measurement with a dynamometer, indirect measurement using spindle-integrated sensors, and indirect measurement using internal machine tool signals. Benchtop dynamometers are unsuitable for monitoring cutting forces on parts larger than the dynamometer's dimensions, while rotary dynamometers offer limited flexibility and reconfigurability. While spindle-integrated sensors offer greater flexibility, installation requires modifications to the spindle system, making modification and maintenance difficult. Furthermore, these methods are expensive and struggle to maintain optimal performance in harsh environments exposed to chips, cutting fluids, and vibration. Accelerometer-based force measurement requires measuring the frequency response functions (FRFs) between the tool head and the spindle on which the accelerometer is mounted. Other force measurement tools indirectly measure cutting forces using spindle and feed drive current signals. However, their applicability is limited by the bandwidth of the spindle and feed drive systems, requiring complex compensation strategies for accurate force measurement.

[0004] Data-driven methods can use the obtained data to learn end-to-end relationships and establish models to map the relationship between machine tool monitoring signals and cutting forces. However, the establishment of traditional machine learning algorithm models requires that the data be identically distributed. Cutting at different speeds has different tooth pass frequencies (TPFs), generating excitations of different frequencies. Due to the irregular nonlinear frequency response of the machine tool system, the responses caused by cutting force excitations of different frequencies are different. The prediction force model established for a single speed has poor generalization ability for other speeds, and it is unrealistic to establish a cutting force prediction model for continuous speeds. Therefore, there is an urgent need for a method that can quickly and conveniently realize cutting force monitoring at different speeds of CNC machine tools. Summary of the Invention

[0005] In response to the above defects or improvement needs of the prior art, the present invention provides a cutting force monitoring method and device based on an unsupervised domain adversarial algorithm, which realizes the cutting force prediction of new speeds without labels, effectively reducing the modeling cost of different distribution data at different speeds.

[0006] To achieve the above object, according to one aspect of the present invention, a cutting force monitoring method based on an unsupervised domain adversarial algorithm is provided, the method comprising the following steps:

[0007] (1) A cutting experiment is conducted using a series of machining process parameters with set speed intervals, and machine tool monitoring signals and cutting force signals are collected to construct a source domain speed experimental dataset;

[0008] (2) Processing the signal data in the source domain speed experimental data set to obtain the source domain data set;

[0009] (3) The source domain is selected from the source domain dataset by calculating the maximum mean difference distance, and the target domain is assigned a pseudo label by the kernel density estimation method. The pseudo label and the target domain monitoring data are processed together to form the multi-dimensional input data of the target domain;

[0010] (4) An unsupervised domain adversarial model is constructed, and the unsupervised domain adversarial model is trained based on the selected source domain data and target domain data. The parameters of the unsupervised domain adversarial model are updated based on the minimized regression loss, weight difference constraint loss, consistency loss, and adversarial loss obtained during the training process to obtain a cutting force prediction model corresponding to the target speed. The cutting force prediction model is further used to monitor the cutting force at the target speed.

[0011] Furthermore, the relationship between the inherent monitoring signal of the servo drive system of the feed axis and the cutting force is:

[0012]

[0013] In the formula, k represents the current moment, F a (k) represents the cutting force in the feed axis direction at the current moment, i(kj), ω(kj), Represent the feed axis drive current, feed speed and feed acceleration at the previous and current moments, j = 0, 1, ..., n; F a (kl) represents the predicted value of the cutting force of the feed axis at the previous moment, n and l represent the time lag order related to the input and output, respectively, and f represents the nonlinear relationship between input and output.

[0014] Furthermore, the input data distribution difference between each source domain data and the target domain data is calculated based on MMD, and the smallest one is selected as the source domain data. The MMD distance used to evaluate the distribution difference is defined as:

[0015]

[0016] in, represents the reproducing kernel Hilbert space with characteristic kernel κ, p s ,q t are the distributions satisfied by the source domain and the target domain, φ represents the feature map that maps the original sample to the RKHS, and κ represents κ(x s ,x t )=<φ(x s ),φ(x t )>, where <, > represent vector inner products.

[0017] Furthermore, before training, pseudo labels are assigned to the unlabeled data in the target domain, and the kernel density estimation method is used to generate pseudo labels for the unlabeled data in the target domain. The unknown probability density function is estimated directly from the original data without any prior distribution assumptions, and a set of probability density values ​​is generated as pseudo labels based on the probability density function; the estimated probability density Obtained from the target domain input with N sample data:

[0018]

[0019] Where x i is the sample point data, h is the bandwidth, and K is the kernel function;

[0020] Cross-validation is used to evaluate the performance under each parameter to search for the bandwidth that maximizes the log-likelihood of the probability density; non-parametric estimation methods use the density distribution of the input data in the target domain to generate pseudo labels and infer the underlying data distribution from unlabeled data.

[0021] Furthermore, the unsupervised domain adversarial model includes a feature extractor, two regressors and a domain discriminator; the selected source domain data and target domain data are input into the feature extractor for feature extraction, and then the extracted source domain features are input into two regressors with the same structure to obtain the prediction power and source domain regression loss, the weight difference constraint loss is calculated using the weight vector of the first hidden layer of the two regressors, and the extracted target domain features are input into the dual regressor, and the consistency loss is calculated using the feature vector output by the second hidden layer of the regressor; the extracted source domain and target domain features are also used as inputs of the domain discriminator to align the source domain and target domain distributions and generate adversarial Wasserstein loss, finally, the parameters of the unsupervised domain adversarial model are updated by minimizing the regression loss, weight difference constraint loss, consistency loss and adversarial loss to obtain a cutting force prediction model corresponding to the target speed, and the cutting force prediction model is further used to monitor the cutting force under the target speed.

[0022] Furthermore, both the source domain and target domain feature extractors are composed of multiple layers of fully connected layers with shared weights to achieve feature extraction of the input signal, which can be expressed as:

[0023]

[0024] Among them G s and G t are the extracted features of the source domain and the target domain respectively, x s ,x t is the input data, Θ f Parameters of the feature extraction network.

[0025] Furthermore, the regression loss is defined as:

[0026]

[0027] Among them, n s is the number of samples in the source domain, r = 1, 2, represents the regression loss of the first and second regressors, Θ R are the parameters of the regressor, is the error metric; the weight difference constraint loss is defined as:

[0028]

[0029] in, and are the weight vectors of the first hidden layer of the two regressors respectively;

[0030] The consistency loss is:

[0031]

[0032] Where C represents the measurement of the two vectors, f1 and f2 represent the hidden layer feature vectors extracted from the two regressors;

[0033] Wasserstein loss is expressed as:

[0034]

[0035] in represents the Wasserstein distance, represents the source domain and target domain distribution, represents the set of joint distributions γ(x s ,x t );

[0036] Source domain feature G s and target domain features G t The Wasserstein distance difference between is described as:

[0037]

[0038] in and Represent the feature distribution of the source domain and the target domain respectively, Θ D are the domain discriminator network parameters.

[0039] Furthermore, the expression of the cutting force prediction model is:

[0040] g(x)=F R (F f (x t ;Θ f );Θ R ).

[0041] The present invention also provides a computer-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the cutting force monitoring method based on the unsupervised domain adversarial algorithm as described above.

[0042] The present invention also provides a cutting force monitoring system based on an unsupervised domain adversarial algorithm, the system comprising a memory and a processor, the memory storing a computer program, and the processor executing the cutting force monitoring method based on the unsupervised domain adversarial algorithm as described above when executing the computer program.

[0043] In general, compared with the prior art, the cutting force monitoring method and device based on the unsupervised domain adversarial algorithm provided by the present invention have the following beneficial effects:

[0044] 1. The monitoring method uses the inherent signal of the machine tool to monitor the cutting force, realizing the cutting force monitoring at different spindle speeds without the need for external sensors, and has the potential to be promoted to actual industrial applications.

[0045] 2. The method uses a data-driven model to construct a mapping management between machine tool monitoring signals and cutting forces, without the need for complex parameter identification processes or compensation strategies.

[0046] 3. The method adopts an unsupervised domain adversarial regression algorithm to use labeled data under a limited speed to predict the cutting force under a large range of target speeds. There is no need to establish a prediction model for new speeds, which greatly reduces the number of experiments and thus reduces the workpiece material, cutting tool and time costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 1 is a flow chart of a cutting force monitoring method based on an unsupervised domain adversarial algorithm provided by the present invention;

[0048] Figure 2 Schematic diagram of a cutting force prediction model at a target speed based on an unsupervised domain adversarial regression algorithm according to the present invention;

[0049] Figure 3 (a) and (b) are schematic diagrams and partial enlarged views of the comparison between the cutting force measurement and prediction values ​​when the source domain is 1600 rpm and the target domain is 1550 rpm under linear trajectory milling with the same feed depth of cut;

[0050] Figure 4 (a) and (b) are schematic diagrams and partial enlarged views of the comparison between the cutting force measurement and prediction values ​​when the source domain is 3800 rpm and the target domain is 3700 rpm under linear trajectory milling with the same feed depth of cut;

[0051] Figure 5 (a), (b), (c), and (d) are schematic diagrams and partial enlargements of the comparison between the cutting force measurement and prediction values ​​under arc trajectory milling with the source domain at 2600rpm and the target domain at 2500rpm and the same feed cutting depth. Figure 1-3 ;

[0052] Figure 6 (a), (b), (c), and (d) are schematic diagrams and partial enlargements of the comparison of cutting force measurement and prediction values ​​under arc trajectory milling with a source domain of 4800rpm and a target domain of 4850rpm at different feed cutting depths. Figure 1-3 ;

[0053] Figure 7 (a) and (b) are the cutting force measurements under linear trajectory milling with the source domain at 3800 rpm and the target domain at 3700 rpm, respectively, and the comparison between the predicted values ​​of the proposed method and the predicted values ​​of the network trained directly using the source domain;

[0054] Figure 8 (a), (b), (c), and (d) are the cutting force measurements under arc trajectory milling with the source domain at 4600rpm and the target domain at 4500rpm, respectively, and the comparison diagrams and local enlargements of the predicted values ​​of the proposed method and the predicted values ​​of the network directly trained using the source domain. Figure 1-3 ;

[0055] Figure 9 (a) and (b) are the cutting force measurements under linear trajectory milling with the source domain at 3800 rpm and the target domain at 3700 rpm, respectively, and the comparison diagrams and partial enlarged views of the predicted values ​​of the proposed method and the predicted values ​​of the network trained with the data of the same speed as the target domain;

[0056] Figure 10 (a), (b), (c), and (d) are the cutting force measurements under arc trajectory milling with the source domain at 4800rpm and the target domain at 4850rpm at different feed depths, and the comparison diagrams and partial enlargements of the predicted values ​​of the proposed method and the predicted values ​​of the network trained with the data of the same speed as the target domain. Figure 1-3 . DETAILED DESCRIPTION

[0057] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely for the purpose of explaining 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 may be combined with each other as long as they do not conflict with each other.

[0058] The present invention provides a cutting force monitoring method based on an unsupervised domain adversarial algorithm. The method establishes a source domain dataset by conducting a series of milling experiments at different speed intervals, collecting the drive current, feed speed, and feed acceleration signals of the machine tool feed axis servo motor as input, and the cutting force signal as output. For a new target speed to be predicted, the source domain is selected through maximum mean difference distance calculation, and a pseudo-label is assigned to the target domain through kernel density estimation. The monitoring data of the pseudo-labeled target domain is processed to form multidimensional input data for the target domain, meeting the dimensionality requirements of the network input data. The obtained source and target domain data are input into a feature extractor for feature extraction. After feature extraction, a dual regressor fits the mapping relationship of the source domain, extracts a locally consistent representation using weight difference constraints and feature vector consistency loss, and transfers the cutting force prediction knowledge learned in the source domain to the target domain. A domain discriminator aligns the data distribution by adversarially training the features of the source and target domains, generating an adversarial Wasserstein loss. Finally, the network is trained by minimizing the regression loss, weight difference constraint loss, consistency loss, and adversarial loss, transferring the source domain knowledge to the target domain.

[0059] The method mainly comprises the following steps:

[0060] In step 1, a cutting experiment is performed using a series of set machining process parameters with speed intervals, and machine tool monitoring signals and cutting force signals are collected to construct a source domain speed experimental dataset.

[0061] The external PC communicates with the machine tool in real time. During the cutting experiment, the CNC inherent signal monitoring software is used to collect machine tool monitoring signals such as the drive current, feed speed and feed acceleration signals of the servo motors of each feed axis of the machine tool during the milling process. The dynamometer system is used to measure the cutting force signal during the milling process.

[0062] Step 2: Process the signal data in the source domain speed experimental data set to obtain the source domain data set.

[0063] Among them, the non-cutting segment data at the beginning and end of the original signal collected at different speeds are first removed. For the cutting force signal with a high sampling frequency, it is necessary to synchronize it with the cutting starting point of the monitoring signal, and then perform a downsampling operation to make it have the same time series data length as the machine tool monitoring signal as the output data. The relationship between the inherent monitoring signal of the servo drive system of the feed axis and the cutting force is represented as follows:

[0064]

[0065] Among them, k represents the current moment, F a (k) represents the cutting force in the feed axis direction at the current moment, i(kj), ω(kj), Represent the feed axis drive current, feed speed and feed acceleration at the previous and current moments, j = 0, 1, ..., n; F a (kl) represents the predicted cutting force of the feed axis at a previous moment, n and l represent the order of the time lag associated with the input and output, respectively, and f represents the nonlinear relationship between the input and output. f is constructed using a data-driven model. During unsupervised adversarial model training, the time-aligned data is converted to multidimensional data using the above formula.

[0066] In step three, the source domain is selected from the source domain dataset by calculating the maximum mean difference distance, and the target domain is assigned a pseudo label through the kernel density estimation method. The pseudo label and the target domain monitoring data are processed together to form the multi-dimensional input data of the target domain.

[0067] After obtaining the source domain dataset, for the new target domain speed, it is necessary to select the source domain speed that is most conducive to target domain prediction in the source domain dataset. The input data distribution difference between each source domain data and the target domain data is calculated based on MMD, and the smallest one is selected as the source domain data. The MMD distance used to evaluate the distribution difference is defined as:

[0068]

[0069] in, represents the reproducing kernel Hilbert space (RKHS) with characteristic kernel κ, p s ,q t are the distributions satisfied by the source domain and the target domain, φ represents the feature map that maps the original sample to the RKHS, and κ represents κ(x s ,x t )=<φ(x s ),φ(x t)>, where <,> represents the vector inner product.

[0070] In order to meet the size of the input dimension of the unsupervised domain adversarial model, it is necessary to assign pseudo labels to the unlabeled data in the target domain before training. The general method is to use the model trained in the source domain data to assign pseudo labels to the target domain data. However, when the distribution difference between the target domain data and the source domain data is large, the accuracy of the assigned pseudo labels may be low, which will introduce incorrect guidance signals, reduce the accuracy of feature extraction, and lead to negative transfer. Here, the kernel density estimation method is used to generate pseudo labels for the unlabeled data in the target domain. It directly estimates the unknown probability density function from the original data without any prior distribution assumptions, and generates a set of probability density values ​​as pseudo labels based on the probability density function. The estimated probability density Obtained from the target domain input with N sample data:

[0071]

[0072] Where x i is the sample point data, h is the bandwidth, and K is the kernel function. Using the Gaussian kernel function, it is expressed as:

[0073]

[0074] The selection of bandwidth is crucial for constructing a KDE. The optimal bandwidth can be selected using a grid search method. Specifically, cross-validation is used to evaluate the performance under each parameter to search for the bandwidth that maximizes the log-likelihood of the probability density. Nonparametric estimation methods use the density distribution of the input data in the target domain to generate pseudo-labels, inferring the underlying data distribution from unlabeled data. Pseudo-labels are more closely related to the input data, ensuring that the generated labels more accurately reflect the inherent structure of the data.

[0075] Step 4: Construct an unsupervised domain adversarial model, train the unsupervised domain adversarial model based on the selected source domain data and target domain data, and update the parameters of the unsupervised domain adversarial model based on the minimized regression loss, weight difference constraint loss, consistency loss and adversarial loss obtained during the training process to obtain a cutting force prediction model corresponding to the target speed. The cutting force prediction model is further used to monitor the cutting force at the target speed.

[0076] Specifically, the unsupervised domain adversarial model includes a feature extractor, two regressors and a domain discriminator; the selected source domain data and target domain data are input into the feature extractor for feature extraction, and then the extracted source domain features are input into two regressors with the same structure to obtain the prediction power and source domain regression loss. The weight difference constraint loss is calculated using the weight vector of the first hidden layer of the two regressors, and the extracted target domain features are input into the dual regressor, and the consistency loss is calculated using the feature vector output by the second hidden layer of the regressor; the extracted source domain and target domain features are also used as input to the domain discriminator to align the source domain and target domain distributions and generate adversarial Wasserstein loss. Finally, the parameters of the unsupervised domain adversarial model are updated by minimizing the regression loss, weight difference constraint loss, consistency loss and adversarial loss to obtain the cutting force prediction model corresponding to the target speed. The cutting force prediction model is further used to monitor the cutting force under the target speed.

[0077] In this embodiment, the selected source domain data and the obtained target domain data are input into the feature extractor for feature extraction, wherein both the source domain and target domain feature extractors are composed of multiple layers of fully connected layers with shared weights to achieve feature extraction of the input signal, which can be expressed as:

[0078]

[0079] Among them G s and G t are the extracted features of the source domain and the target domain respectively, x s ,x t is the input data, Θ f Parameters of the feature extraction network.

[0080] The extracted source domain features are then input into two regressors with the same structure to obtain the prediction power and source domain regression loss, where each regressor consists of multiple fully connected layers and the output dimension is 1. The regression loss is defined as:

[0081]

[0082] Among them, n s is the number of samples in the source domain, r = 1, 2, represents the regression loss of the first and second regressors, Θ R are the parameters of the regressor, is the error measure.

[0083] By maximizing the difference between the weight vectors of the first hidden layer of the two regressors, two orthogonal complementary subspaces can be established to decouple features and extract local consistency representations, that is, instances with similar features tend to have similar target variable values. During the minimization process, the angle between the hidden layer weight vectors tends to be 90°. Regressors R1 and R2 will construct two orthogonal and independent feature spaces, project the original features into different sub-feature spaces, and find independent features in the subspaces. The purpose is to reduce feature redundancy and enhance data discriminability by expressing data in different feature spaces. Feature decoupling can decompose time series into feature representations with different frequencies, which helps to capture local features and periodic changes. Through the complementarity in these two subspaces, the original features can be decoupled and any related features can be captured, that is, the feature representation in the source domain that is closest to the target domain. This feature decoupling method improves the effectiveness and comprehensiveness of the extracted features, thereby promoting local consistency of features in different domains. In addition, the orthogonality of the hidden layer weight vectors can also reduce overfitting and improve the generalization ability of the model. The weight difference constraint loss is defined as:

[0084]

[0085] in, and are the weight vectors of the first hidden layer of the two regressors respectively.

[0086] The extracted target domain features are input into two regressors, and the consistency loss is calculated based on the output feature vectors of the second hidden layer of the two regressors. Prediction consistency loss can be used to measure the consistency of data in two different feature spaces. This consistency can promote the model to learn features with local consistency between the target domain and the source domain, thereby improving the prediction performance of the unsupervised domain adversarial model. Measuring the similarity between the prediction results of similar data in the two feature spaces can help the model optimize the representation of similar features in two different feature spaces, thereby extracting the local consistency of features from different domains. The unsupervised domain adversarial model belongs to a deep neural network model. Its feature extraction and representation capabilities can map similar features in the two feature spaces to the same hidden layer representation space, thereby mapping data between different planes to the same linear space, and making different feature spaces have local consistency, that is, having similar vector representations. Similar feature representations will help the deep neural network model to better generalize to new data sets, and can also effectively alleviate the impact of data domain differences. Consistency loss can improve the generalization ability of the model in an unsupervised situation, which can be expressed as:

[0087]

[0088] Where C represents the measurement of the two vectors, f1 and f2 represent the hidden layer feature vectors extracted from the two regressors. When the consistency loss approaches zero, the similarity converges to 1, indicating that the hidden layer output features of the two regressors are very similar. The target domain regressor trained in the source domain obtains relatively similar results, indicating that it conforms to the feature representation of the source domain. By applying dual regressors, the target domain features are inclined to their corresponding cutting force prediction relationship. The consistency loss is based on the similarity representation of the feature vectors and uses the input features of the target domain for adaptive transformation, enabling the unsupervised domain adversarial model to fully utilize the information in the input data without the need for real labels to fit and establish the cutting force prediction model. The use of consistency loss can help transfer the cutting force prediction knowledge learned from the source domain to the target domain through domain adaptation.

[0089] The extracted force prediction-related features of the source and target domains also serve as input to the gradient reversal layer and domain discriminator, aligning the distributions of the source and target domains. The generator is a feature extractor, and the discriminator is a domain discriminator. It also generates an adversarial Wasserstein loss, which can improve learning stability and prevent the loss from falling into a local optimum. During the training process, the domain discriminator's loss function needs to be maximized in order to distinguish the source and target domains as much as possible. The generator is expected to map the source and target domain data into a common latent space and make the distributions of the source and target domains in this latent space as similar as possible, thus deceiving the discriminator and making it unable to accurately distinguish the source and target domain data, i.e., domain invariance.

[0090] Wasserstein loss can be expressed as:

[0091]

[0092] in represents the Wasserstein distance, represents the source domain and target domain distribution, represents the set of joint distributions γ(x s ,x t ).

[0093] Source domain feature G s and target domain features G t The Wasserstein distance difference between can be described as:

[0094]

[0095] in and Represent the feature distribution of the source domain and the target domain respectively, Θ D are the domain discriminator network parameters.

[0096] Finally, the network parameters are updated by minimizing the regression loss, weighted difference constraint loss, consistency loss, and domain adversarial loss to obtain a cutting force prediction model for the target speed. When the speed is changed during actual machining, the monitored drive current, velocity, and acceleration signals are fed into the established prediction model for training and iterative prediction to obtain the real-time cutting force at the new speed.

[0097] The present invention is further described in detail with the following example.

[0098] See also Figure 1 and Figure 2 A cutting force monitoring method based on an unsupervised domain adversarial regression algorithm at different milling speeds is proposed. In the machine tool feed drive system, the motor shaft is subject to disturbances including friction torque and cutting torque from the guide rail, ball screw, and bearing. The driving torque generated by the motor current overcomes the disturbance torque and uses the inertia torque to drive the machine tool feed motion. The driving torque is proportional to the motor current i, the friction torque is related to the motor angular velocity ω, and the inertia torque is related to the motor angular acceleration Therefore, by monitoring the motor current i, motor angular velocity ω and angular acceleration Signal, the dynamic nonlinear relationship between machine tool monitoring signal and cutting force can be established using data-driven method.

[0099] In the nonlinear dynamic prediction model, the relationship between the servo system monitoring signal of a feed axis and the cutting force is represented by the following discrete time dynamic system model:

[0100]

[0101] Among them, k represents the current moment, F a (k) represents the cutting force in the feed axis direction at the current moment, i(kj), ω(kj), (j=0,1,...,n) represents the feed axis drive current, feed speed and feed acceleration at the previous and current moments, F a (kj), (j = 1, 2, ..., l) represents the predicted value of the cutting force of the feed axis at previous moments, n and l represent the order of time lag related to the input and output, respectively. Taking n = 8 and l = 7 as an example, f represents the nonlinear relationship between input and output, and f is constructed using a data-driven model.

[0102] Three-axis milling experiments were conducted on a MIKRON UCP 800Duro machining center according to the proposed process parameters. Cutting force signals were measured using a Kistler 9129AA high-precision tabletop dynamometer mounted on the machine table, with the workpiece mounted on top. Heidenhain-developed Tncscope software communicated with the CNC in real time via TNC Ethernet to collect monitoring signals from each feed axis during milling, including velocity, acceleration, and current. The sampling interval for the monitoring signals was 0.6 ms, and the cutting force acquisition frequency could reach tens of kHz, with higher frequencies being preferred. The cutting force sampling frequency was set at 25 kHz, and the data set was sampled at 1.67 kHz.

[0103] In a typical embodiment of this application, linear and circular milling experiments were conducted. The workpiece was aluminum alloy 7075, and the tool was a solid carbide end mill with a diameter of 12 mm. The machining parameters are shown in Table 1. Multiple cutting experiments were conducted at different spindle speeds, ranging from 1200 rpm to 5000 rpm, in 200 rpm increments, to construct the source domain dataset. Increasing the spindle speed increased the material removal rate, feed rate, and depth of cut.

[0104] Table 1 Milling process parameters

[0105]

[0106]

[0107] Taking the collected signal of the Y-axis feed direction as an example, the data processing flow of the collected monitoring signal and cutting force signal is described:

[0108] First, find the starting and ending data points of the original signal based on the cutting force signal, remove the non-cutting segment data at the beginning and end, and eliminate outliers. For cutting force signals with high sampling frequency, the data needs to be downsampled. Here, the sampling is downsampled by 15 times so that the cutting force signal and the machine tool monitoring signal have the same length as the output data to meet the time series data requirements of the data-driven model.

[0109] The source dataset consists of 20 sets of milling data with different machining parameters and a rotational speed interval of 200 rpm. The target domain contains 12 sets of milling data with rotational speeds between those in the source dataset. There are six different rotational speeds, and two milling experiments with different machining parameters are performed for each speed.

[0110] In both the linear and circular trajectory target domains, two target speeds were used as examples for unsupervised domain adversarial regression prediction. For the linear trajectory experiment, 1550 rpm and 3700 rpm were selected as target speeds. Based on the MMD calculation, 1600 rpm and 3800 rpm data were selected as labeled source domains. For the circular trajectory experiment, 2500 rpm and 4850 rpm were selected as target speeds. Based on the MMD calculation, 2600 rpm and 4800 rpm data were selected as labeled source domains. Kernel density estimation was then used to assign pseudo labels to the selected target domains.

[0111] Before model training, each sample point in the input monitoring signal of the source domain data is converted from 3-dimensional to 3×9+7=34-dimensional according to the time lag order. That is, the input signal is transformed into the monitoring signals at the current moment and the previous moment, as well as the cutting force signal at the previous moment. The output signal remains unchanged and is still the cutting force value at the current moment that needs to be predicted.

[0112] The selected source domain data and target domain data are input into the unsupervised domain adversarial regression model. First, the feature extractor is input for feature extraction. The source domain and target domain feature extractors are composed of four fully connected layers with shared weights. The number of neurons is 32, 64, 64, and 32 respectively. The feature extraction of source domain and target domain data can be expressed as:

[0113]

[0114] Among them G s and G t are the extracted features of the source domain and the target domain respectively, x s ,x t is the input data, Θ f Parameters of the feature extraction network.

[0115] The extracted source domain features are then input into two regressors with the same structure to obtain the prediction power and regression loss. The regressors are composed of two fully connected layers with 32 and 16 neurons respectively and an output dimension of 1. The regression loss is defined as:

[0116]

[0117] Among them, Θ R represents the regressor parameters, is the regression loss, r=1,2, represents the regression loss of the first and second regressors, is the mean square error:

[0118] By maximizing the difference between the weight vectors of the first hidden layer of the two regressors, two orthogonal complementary subspaces can be established to decouple features and extract local consistency representations, that is, instances with similar features tend to have similar target variable values. During the minimization process, the angle between the hidden layer weight vectors tends to be 90°. Regressors R1 and R2 will construct two orthogonal and independent feature spaces, project the original features into different sub-feature spaces, and search for independent features in the subspaces. The purpose is to reduce feature redundancy and enhance data discriminability by expressing data in different feature spaces. Feature decoupling can decompose time series into feature representations with different frequencies, which helps to capture local features and periodic changes. Through the complementarity in these two subspaces, the original features can be decoupled and any related features can be captured, that is, the feature representation in the source domain that is closest to the target domain. The weight difference constraint loss is defined as:

[0119]

[0120] in, and are the weight vectors of the first hidden layer of the two regressors respectively.

[0121] The extracted target domain features are input into two regressors, and the consistency loss is calculated based on the output feature vectors of the second hidden layer of the two networks. Prediction consistency loss can be used to measure the consistency of data in two different feature spaces. This consistency can promote the model to learn features with local consistency between the target domain and the source domain, thereby improving the prediction performance of the model. Measuring the similarity between the prediction results of similar data in the two feature spaces can help the model optimize the representation of similar features in two different feature spaces, thereby extracting the local consistency of features from different domains. The feature extraction and representation capabilities of deep networks can map similar features in the two feature spaces to the same hidden layer representation space, thereby mapping data between different planes to the same linear space, and making different feature spaces have local consistency, that is, similar vector representations. Similar feature representations will help the unsupervised domain adversarial regression model belonging to the deep neural network model to better generalize to new data sets, and can also effectively alleviate the impact of data domain differences. Consistency loss can improve the generalization ability of the model in unsupervised situations, which can be expressed as:

[0122]

[0123] Where C represents the measurement of the two vectors, f1 and f2 represent the hidden layer feature vectors extracted from the two regressors. When the consistency loss approaches zero, the similarity converges to 1, indicating that the hidden layer output features of the two regressors are very similar. The target domain regressor trained in the source domain obtains relatively similar results, indicating that it conforms to the feature representation of the source domain. By applying dual regressors, the target domain features are inclined to their corresponding cutting force prediction relationship. The consistency loss is based on the similarity representation of the feature vector and uses the input features of the target domain for adaptive transformation, enabling the model to fully utilize the information in the input data without the need for real labels to fit and establish the cutting force prediction model. The use of consistency loss can help transfer the cutting force prediction knowledge learned from the source domain to the target domain through domain adaptation.

[0124] The extracted features related to force prediction of the source domain and target domain are also used as inputs to the gradient reversal layer and the domain discriminator to align the distributions of the source domain and the target domain. The generator is a feature extractor, and the discriminator is a domain discriminator. It consists of two fully connected layers with 32 and 16 neurons respectively, and an output dimension of 1. It also generates adversarial Wasserstein loss, which can improve the stability of learning and prevent the loss from falling into local optimality. During the training process, for the training of the domain discriminator, in order to distinguish the source domain and the target domain as much as possible, it is necessary to maximize the loss function of the domain discriminator, and it is hoped that the generator can map the source domain and target domain data to a common latent space, and make the distribution of the source domain and the target domain in this latent space as similar as possible, that is, deceive the discriminator, so that the discriminator cannot accurately distinguish the source domain and target domain data, that is, domain invariance. Since the task feature extractor and the representation distribution discriminator are in a game state during the training process, the knowledge transfer between the source domain and the target domain is promoted. The Wasserstein distance is used as the loss function of the domain discriminator, which represents the loss from the source distribution. To the target distribution The minimum cost of conversion, which can be used to measure the distance between distributions with large differences, avoiding the problems of gradient disappearance and gradient explosion.

[0125] Wasserstein loss can be expressed as:

[0126]

[0127] in represents the Wasserstein distance, Represent the source domain and target domain distribution respectively, represents the set of joint distributions γ(x s ,x t ).

[0128] Source domain feature G s and target domain features G tThe Wasserstein distance difference between can be described as:

[0129]

[0130] in and Represent the feature distribution of the source domain and the target domain respectively, Θ D are the network parameters of the domain discriminator.

[0131] The final total loss is expressed as:

[0132]

[0133] Where α, β and λ are the weights of weight difference constraint loss, consistency loss and domain adversarial loss.

[0134] The network parameters are updated by minimizing the regression loss, weight difference constraint loss, consistency loss, and domain adversarial loss. The number of iterations is 1000. The initial learning rate of the feature extractor is set to 0.0005, and the initial learning rate of the regressor and domain discriminator is set to 0.001. The decay rate is multiplied by 0.5 every 200 iterations. The network parameters are updated using the RMSprop optimizer. First, the gradient of the weighted loss function equivalent to the network parameters is calculated at the kth iteration:

[0135]

[0136]

[0137]

[0138] in, and are the gradients of the loss functions of the feature extraction network, regressor, and domain discriminator relative to the network parameters at the kth iteration; x s represents the input features of the regressor from the source domain, and denotes the feature vector of the first hidden layer in the first and second regressors, respectively, x 1_t and x 2-t denote the input features of the first and second regressors from the target domain in the regressor, respectively.

[0139] Therefore, at the kth iteration, the accumulated squared gradient can be calculated as:

[0140]

[0141] Among them, the subscript k represents the kth iteration, v krepresents the exponentially weighted average of the square of the historical gradient, and β represents the attenuation coefficient, which can effectively smooth the fluctuation of the gradient calculation and make the optimization results more accurate and stable; represent and

[0142] Finally, update the network parameters:

[0143]

[0144] Where Θ k is the network parameter vector, η is the learning rate, and the initial learning rate can be set. After a certain number of iterations, the learning rate can be automatically updated according to the number of program iterations. This learning rate optimization strategy is conducive to the rapid convergence of the training model and the improvement of model performance; ε represents a small constant, equal to 10e -8 , to avoid the denominator being equal to 0; the network parameters are continuously updated until the maximum number of iterations is reached.

[0145] After the iteration is completed, the cutting force prediction model of the target speed is obtained as follows:

[0146] g(x)=F R (F f (x t ;Θ f );Θ R ).

[0147] According to the above training process, the unsupervised domain adversarial regression prediction model established by the target speed data selected from the linear trajectory and circular trajectory cutting experiments is evaluated. The processing method of the test set samples is different from that of the training data. The input signal of the test set is also 34-dimensional, but different from the training data, under the initial conditions, it is composed of the monitoring signals of the current moment and the previous moment and the given initial random cutting force data. After iteration, the input signal is composed of the monitoring signals of the current moment and the previous moment and the predicted cutting force value of the previous moment. After all the input signals are iterated, all the force prediction values ​​are obtained. Figure 3-6 As shown in the figure, the cutting force curve predicted by the proposed method fits well within the tool rotation cycle time, and the overall envelope line is consistent with the envelope contour of the measured value, that is, the cutting force peak and phase are consistent well, which is of great significance for cutting force monitoring at different speeds.

[0148] In order to verify the superiority of the proposed model, two methods are selected to compare the cutting force prediction effect: (1) compared with the neural network trained directly using the source domain data, called benchmark-1; (2) compared with the neural network trained using labeled data with the same rotation speed as the target domain, called benchmark-2.

[0149] Select the source domain of linear trajectory milling as 3800rpm, the target domain as 3700rpm, and the same feed depth parameters. Select the source domain of circular trajectory milling as 4600rpm, the target domain as 4500rpm, and the same feed depth parameters for comparison with benchmark-1. The results are as follows Figure 7 and Figure 8 The results show that this method can effectively improve the prediction accuracy compared to the network directly trained from the source domain. Compared with the prediction results of the network directly trained from the source domain, the root mean square error of the predicted straight line and circular arc trajectories by this method is reduced by 57.6% and 25.1%, respectively.

[0150] The source domain is 3800rpm and the target domain is 3700rpm under linear trajectory milling, with the same feed depth parameters. The source domain is 4800rpm and the target domain is 4850rpm under arc trajectory milling, with different feed depth parameters compared with benchmark-2. Since only one set of data is selected as the target domain data at each target speed, another set of labeled data is used as the training set to train the network and then predict the selected target speed. The results are shown in the figure below. Figure 9 and Figure 10 It can be seen that the prediction accuracy of the method provided in this embodiment is comparable to that of the network trained with labeled data of the same speed as the target domain.

[0151] The comparison results with the two methods show that the proposed method has higher prediction accuracy than the network directly trained using the source domain, and the prediction accuracy is close to the prediction accuracy of the network trained using labeled data with the same speed as the target domain, which verifies the effectiveness and advantages of the proposed method.

[0152] The present invention also provides a computer-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the cutting force monitoring method based on the unsupervised domain adversarial algorithm as described above.

[0153] The present invention also provides a cutting force monitoring system based on an unsupervised domain adversarial algorithm, the system comprising a memory and a processor, the memory storing a computer program, and the processor executing the cutting force monitoring method based on the unsupervised domain adversarial algorithm as described above when executing the computer program.

[0154] It will be easily understood by those skilled in the art that the above description is merely a preferred embodiment of the present invention and is 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 scope of protection of the present invention.

Claims

1. A cutting force monitoring method based on an unsupervised domain adversarial algorithm, characterized in that: The method comprises the following steps: (1) A cutting experiment is conducted using a series of machining process parameters with set speed intervals, and machine tool monitoring signals and cutting force signals are collected to construct a source domain speed experimental dataset; (2) Processing the signal data in the source domain speed experimental data set to obtain the source domain data set; (3) The source domain is selected from the source domain dataset by calculating the maximum mean difference distance, and the target domain is assigned a pseudo label by the kernel density estimation method. The pseudo label and the target domain monitoring data are processed together to form the multi-dimensional input data of the target domain; (4) constructing an unsupervised domain adversarial model, training the unsupervised domain adversarial model based on the selected source domain data and target domain data, and updating the parameters of the unsupervised domain adversarial model based on the minimized regression loss, weight difference constraint loss, consistency loss, and adversarial loss obtained during the training process to obtain a cutting force prediction model corresponding to the target speed, and further using the cutting force prediction model to monitor the cutting force at the target speed; The MMD distance used to evaluate the distribution difference between the input data of each source domain data and the target domain data is calculated, and the smallest one is selected as the source domain data. The MMD distance used to evaluate the distribution difference is defined as: in, represents the reproducing kernel Hilbert space with characteristic kernel κ, p s ,q t are the distributions satisfied by the source domain and the target domain, φ represents the feature map that maps the original sample to the RKHS, and κ represents κ(x s ,x t )=<φ(x s ),φ(x t )>, where <,> represents the vector inner product; Before training, the unlabeled data in the target domain are given pseudo labels, and the kernel density estimation method is used to generate pseudo labels for the unlabeled data in the target domain. The unknown probability density function is estimated directly from the original data without any prior distribution assumptions, and a set of probability density values ​​is generated as pseudo labels based on the probability density function; the estimated probability density Obtained from the target domain input with N sample data: Where x i is the sample point data, h is the bandwidth, and K is the kernel function; Cross-validation is used to evaluate the performance under each parameter to search for the bandwidth that maximizes the log-likelihood of the probability density; non-parametric estimation methods use the density distribution of the input data in the target domain to generate pseudo labels and infer the underlying data distribution from unlabeled data.

2. The cutting force monitoring method based on the unsupervised domain adversarial algorithm according to claim 1, characterized in that: The relationship between the inherent monitoring signal of the servo drive system of the feed axis and the cutting force is: In the formula, k represents the current moment, F a (k) represents the cutting force in the feed axis direction at the current moment; i(kj), ω(kj), Represent the feed axis drive current, feed speed and feed acceleration at the previous and current moments, j = 0, 1, ..., n; F a (kl) represents the predicted value of the cutting force of the feed axis at the previous moment, n and l represent the time lag order related to the input and output, respectively, and f represents the nonlinear relationship between input and output.

3. The cutting force monitoring method based on the unsupervised domain adversarial algorithm according to any one of claims 1 to 2, characterized in that: The unsupervised domain adversarial model includes a feature extractor, two regressors and a domain discriminator; the selected source domain data and target domain data are input into the feature extractor for feature extraction, and then the extracted source domain features are input into two regressors with the same structure to obtain the prediction power and source domain regression loss. The weight vector of the first hidden layer of the two regressors is used to calculate the weight difference constraint loss, and the extracted target domain features are input into the dual regressor, and the consistency loss is calculated using the feature vector output by the second hidden layer of the regressor; the extracted source domain and target domain features are also used as input to the domain discriminator to align the source domain and target domain distributions and generate adversarial Wasserstein loss. Finally, the parameters of the unsupervised domain adversarial model are updated by minimizing the regression loss, weight difference constraint loss, consistency loss and adversarial loss to obtain the cutting force prediction model corresponding to the target speed. The cutting force prediction model is further used to monitor the cutting force under the target speed.

4. The cutting force monitoring method based on the unsupervised domain adversarial algorithm according to claim 3 is characterized in that: Both the source domain and target domain feature extractors are composed of multiple layers of fully connected layers with shared weights to extract the features of the input signal, which can be expressed as: Among them G s and G t are the extracted features of the source domain and the target domain respectively, x s ,x t is the input data, Θ f Parameters of the feature extraction network.

5. The cutting force monitoring method based on the unsupervised domain adversarial algorithm according to claim 3 is characterized in that: The regression loss is defined as: Among them, n s is the number of samples in the source domain, r = 1, 2, represents the regression loss of the first and second regressors, Θ R are the parameters of the regressor, is the error measure; The weight difference constrained loss is defined as: in, and are the weight vectors of the first hidden layer of the two regressors respectively; The consistency loss is: Where C represents the measurement of the two vectors, f1 and f2 represent the hidden layer feature vectors extracted from the two regressors; Wasserstein loss is expressed as: in represents the Wasserstein distance, represents the source domain and target domain distribution, represents the set of joint distributions γ(x s ,x t ); Source domain feature G s and target domain features G t The Wasserstein distance difference between is described as: in and Represent the feature distribution of the source domain and the target domain respectively, Θ D are the domain discriminator network parameters.

6. The cutting force monitoring method based on the unsupervised domain adversarial algorithm according to claim 5, characterized in that: The expression of the cutting force prediction model is: g(x)=F R (F f (x t ;I f );I R )。 7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by the processor, the machine-executable instructions prompt the processor to implement the cutting force monitoring method based on the unsupervised domain adversarial algorithm described in any one of claims 1 to 6.

8. A cutting force monitoring system based on an unsupervised domain adversarial algorithm, characterized by: The system includes a memory and a processor, the memory stores a computer program, and the processor executes the cutting force monitoring method based on the unsupervised domain adversarial algorithm described in any one of claims 1 to 6 when executing the computer program.

Citation Information

Patent Citations

  • Cutter wear monitoring and predicting method

    CN113780153A

  • Dynamic cutting force monitoring method and system in cutting process

    CN114970718A