An online prediction method for multi-condition surface roughness in CNC milling based on SSAE

By constructing a CNC milling multi-case surface roughness online prediction method based on SSAE, combining milling force signals and offline process parameters, using model migration and fine-tuning strategies, the problems of poor generalization capabilities and large data demand in the existing technology are solved, and efficient and accurate prediction under multiple conditions are achieved.

CN116415191BActive Publication Date: 2025-08-22CHONGQING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310394896.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-13
Publication Date
2025-08-22
Estimated Expiration
2043-04-13

AI Technical Summary

Technical Problem

The existing CNC milling surface roughness prediction model has poor generalization ability when working conditions change and the data demand is large, resulting in high cost of experiments and modeling and inability to respond to dynamic evolution trends in real time.

Method used

The surface roughness online prediction method based on stacked sparse self-encoding network (SSAE) is adopted, and the joint feature data set is constructed in combination with offline process parameters and milling force signals, and the prediction performance under multiple operating conditions is improved through model migration and fine-tuning strategies.

Benefits of technology

It realizes efficient and accurate surface roughness prediction in multi-condition scenarios of tool and workpiece material transformation, reduces the cost of repeated tests and modeling, and improves the generalization ability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116415191B_ABST
    Figure CN116415191B_ABST
Patent Text Reader

Abstract

The present invention relates to an online prediction method for multi-working condition surface roughness of CNC milling based on SSAE, which belongs to the field of mechanical processing technology and comprises the following steps: S1: collecting and processing milling force signals; S2: constructing a joint feature data set based on "online signal features + offline process parameters"; S3: establishing and training an online surface roughness prediction model based on a stacked sparse autoencoder network (SSAE); S4: designing a transfer learning framework based on a model transfer and fine-tuning strategy; S5: simulating a scenario with a limited number of samples in a target working condition under a multi-working condition scenario with a change in tool and workpiece material; S6: realizing online prediction of multi-working condition surface roughness under a change in tool and workpiece material.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of mechanical processing and relates to an online prediction method for multi-working condition surface roughness of CNC milling based on SSAE. Background Art

[0002] In CNC machining, workpiece surface quality is closely related to the contact stiffness, fatigue strength, and fit quality of components, which directly impacts the product's performance and service life. Surface roughness is a key indicator of workpiece surface quality and one of the most fundamental technical requirements for finishing parts. Traditional surface roughness measurement involves inspecting the workpiece after machining, a method characterized by low efficiency and high cost. Therefore, achieving rapid and accurate prediction of workpiece surface roughness is crucial for controlling machine tool stability, improving machining quality, and reducing measurement costs.

[0003] Currently, surface roughness prediction methods primarily fall into two categories: offline and online. Offline prediction involves constructing a prediction model based on known information such as cutting parameters, tool information, and workpiece material. Methods such as mathematical regression analysis or neural networks are often employed. While offline surface roughness prediction models have laid the foundation for process parameter design, these studies fail to account for various uncertainties in the machining process, such as vibration and chip residue, and thus fail to reflect the dynamic evolution of workpiece surface roughness during actual CNC machine tool machining. Therefore, online prediction methods, which utilize dynamic information from the machining process as input, have become widely adopted in recent years. The essence of online prediction is to utilize feature data containing more dynamic information about the machining process, such as vibration, force, and acoustic signals, to more realistically fit a CNC machining system. Thanks to the rapid development of sensor technology and deep learning in recent years, neural network models based on deep learning have garnered significant attention for their excellent ability to fit nonlinear systems, offering new insights into the field of surface roughness prediction.

[0004] Although the establishment of an online surface roughness prediction model based on deep learning can timely discover the dynamic evolution trend of the surface roughness of the machined surface during the actual milling process of CNC machine tools and provide a theoretical reference for the subsequent design and modification of the processing plan, there are still the following deficiencies in current research: (1) The prediction model is only constructed under fixed working conditions, such as fixed tools, workpiece materials and milling parameters. When these working conditions change, the prediction performance of the model will drop significantly, and its generalization ability is poor; (2) The prediction model is mostly a regression model constructed by fitting a large amount of data, which requires a large amount of data collection and processing, roughness measurement, etc. When faced with changes in working conditions, if re-experiments and modeling are carried out, the time and economic costs of experiments and modeling will be further increased. Summary of the Invention

[0005] In view of this, the purpose of the present invention is to address the problems existing in existing milling surface roughness prediction technologies, such as the large amount of data required for modeling and insufficient model generalization. This paper provides an online prediction method for multi-condition surface roughness in CNC milling based on a stacked sparse autoencoder (SSAE) network. The method mainly solves the following two technical problems:

[0006] (1) The large amount of data required to build a regression model leads to high experimental and modeling costs. This paper constructs an online surface roughness prediction model based on SSAE by combining the relevant features of offline process parameters and milling force signals to form a joint feature dataset as input and surface roughness grade classification as output. The deep network is used to further mine the deep features hidden in the data, and the surface roughness grade is output in combination with the classifier to specifically judge whether the surface quality of the workpiece meets the technical requirements.

[0007] (2) Aiming at the problem that the surface roughness prediction model trained in the original working condition has significantly reduced prediction performance when facing new working conditions, the present invention designs a transfer learning framework based on model migration and fine-tuning strategy, which migrates the surface roughness online prediction model constructed in the original working condition to the target working condition with tool and workpiece material transformation, and then fine-tunes the model with limited target working condition labeled data to improve the prediction performance in the target working condition, thereby achieving accurate prediction of the surface roughness of the target working condition.

[0008] In order to achieve the above object, the present invention provides the following technical solutions:

[0009] An online prediction method for multi-condition surface roughness of CNC milling based on SSAE includes the following steps:

[0010] S1: collects and processes milling force signals;

[0011] S2: Construct a joint feature dataset based on "online signal features + offline process parameters";

[0012] S3: Build and train an online surface roughness prediction model based on a stacked sparse autoencoder (SSAE) network.

[0013] S4: Design a transfer learning framework based on model transfer and fine-tuning strategies;

[0014] S5: In a multi-working scenario with tool and workpiece material changes, the number of samples in the target working condition is limited;

[0015] S6: Realize online prediction of surface roughness under multiple working conditions with changes in tool and workpiece materials.

[0016] Furthermore, step S1 specifically includes:

[0017] S11: The milling force signals in the X and Y directions during milling are collected by a Kistler dynamometer and a computer system.

[0018] S12: Cut off the head and tail parts of the original measurement signal, and keep the stable milling part for subsequent processing.

[0019] Furthermore, step S2 specifically includes the following steps:

[0020] S21: extracting time domain features for the force signals of the stable milling parts retained in the X and Y directions, respectively, and extracting frequency domain features in combination with fast Fourier transform; the time domain features include signal mean, signal standard deviation, signal root mean square value, signal peak-to-peak value, signal skewness, signal kurtosis, and signal margin; the frequency domain features include signal frequency centroid, signal mean square frequency, and signal frequency variance;

[0021] S22: Constructing a joint feature dataset based on offline process parameters; the offline process parameters include spindle speed, feed per tooth, cutting width, and cutting depth; a sample in the dataset includes 24-dimensional features and a surface roughness grade label.

[0022] Furthermore, step S3 establishes and trains an online surface roughness prediction model based on a stacked sparse autoencoder network (SSAE), specifically including:

[0023] S31: Based on the autoencoder, we improve it by adding sparsity constraints to obtain a sparse autoencoder. We then train it in a greedy unsupervised hierarchical manner, add a softmax layer as the classification output layer, and establish an online surface roughness prediction model based on a stacked sparse autoencoder network.

[0024] S32: The model is trained using the joint feature dataset of the original working condition to achieve online prediction of the surface roughness under the working condition.

[0025] Furthermore, the network propagation formula of the autoencoder is shown in formula (1):

[0026]

[0027] In the formula, h represents the hidden layer feature; f represents the activation function; x and y represent the input and output; W x and b x Represents the weight matrix and bias matrix of the encoding network; W y and b y Represents the weight matrix and bias matrix of the decoding network;

[0028] The added sparsity constraint is used to suppress most of the nodes in the hidden layer at the same time, so that the network can only rely on a small number of unsuppressed hidden layer nodes for calculation. j (x) represents the activation degree of the jth neuron in the hidden layer of the entire data sample, and its calculation formula is shown in formula (2):

[0029]

[0030] Where, represents the average activation level of the jth neuron; N d Indicates the number of input samples; x (i) Represents the dataset of the i-th sample.

[0031] Further, step S4 specifically includes the following steps:

[0032] S41: Using model-based transfer learning methods to transfer the constructed prediction model to the target working condition of tool and workpiece material transformation;

[0033] S42: Fine-tune the migrated model using labeled samples from the target working condition, and design a transfer learning framework based on model migration and fine-tuning strategies.

[0034] Furthermore, the migration described in step S41 is as shown in formula (3):

[0035]

[0036] Where W sl and W tl are the weight matrices of the original working condition model and the target working condition model at the first layer; b sl and b tl are the bias matrices of the lth layer of the original working condition model and the target working condition model respectively; l represents the number of network layers;

[0037] In step S42, the model is fine-tuned using the labeled target working condition data, and the back propagation algorithm of stochastic gradient descent is used to minimize the error between the predicted surface roughness level and the actual level in the target working condition. The parameter update process of the target working condition prediction model is shown in formula (4):

[0038]

[0039] Where η is the learning rate; x is the input data of the target working condition sample; g is the surface roughness grade label corresponding to the input data.

[0040] Furthermore, in step S5, in a multi-working condition scenario where the tool and workpiece material are transformed, the number of labeled samples in the target working condition that can be used for fine-tuning is controlled to simulate a scenario where the number of samples in the target working condition is limited. Specifically, the samples in the target working condition are insufficient and limited compared to the original working condition, and an SSAE surface roughness online prediction model with good prediction performance cannot be directly trained in the target working condition.

[0041] Furthermore, step S6 is specifically as follows: gradually increase the number of fine-tuning samples from a small number, adopt the transfer learning framework shown in step S4, migrate the prediction model of the original working condition in step S3 to the new working condition where the tool and workpiece materials are transformed, and use step S5 to simulate the scenario where the target working condition samples are limited, and detect the prediction performance of the migration model in the target working condition.

[0042] The beneficial effects of the present invention include: It proposes an online surface roughness prediction method for CNC milling under multiple working conditions based on SSAE, constructs an online surface roughness prediction model for the original working condition, and achieves accurate surface roughness prediction. Furthermore, for multi-working conditions involving tool and workpiece material changes, a model-based transfer learning method is used to achieve online surface roughness prediction under multiple working conditions with limited labeled samples of the target working condition. This avoids repeated testing and modeling, reducing the time and cost required to obtain a high-performance surface roughness prediction model.

[0043] Other advantages, objects, and features of the present invention will be described in part in the following description and, in part, will be apparent to those skilled in the art upon examination of the following description or may be learned from practice of the present invention. The objects and other advantages of the present invention may be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below with reference to the accompanying drawings, in which:

[0045] Figure 1 It is a schematic diagram of the process of the present invention;

[0046] Figure 2 Figure 1 is an example of milling force signal processing; (a) is an example of X-direction force signal processing, and (b) is an example of Y-direction force signal processing;

[0047] Figure 3 Figure 1 is an example of the fast Fourier transform of the milling force signal; (a) is an example of the fast Fourier transform of the X-direction force signal, and (b) is an example of the fast Fourier transform of the Y-direction force signal;

[0048] Figure 4The following are the prediction results of the SSAE model in the original working condition; (a) is the prediction result of the training data set, and (b) is the prediction result of the test data set;

[0049] Figure 5 This is a diagram of the transfer learning framework based on model transfer and fine-tuning strategies;

[0050] Figure 6 Schematic diagram of working condition migration;

[0051] Figure 7 This is a comparison chart of the classification accuracy of each model in target condition 1;

[0052] Figure 8 This is a comparison chart of the classification accuracy of each model in target condition 2. DETAILED DESCRIPTION

[0053] The following describes the embodiments of the present invention by means of specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and the following embodiments and features in the embodiments can be combined with each other without conflict.

[0054] Among them, the accompanying drawings are only for illustrative purposes and represent only schematic diagrams rather than actual pictures, and should not be understood as limiting the present invention. In order to better illustrate the embodiments of the present invention, some parts of the accompanying drawings may be omitted, enlarged or reduced, and do not represent the dimensions of actual products. For those skilled in the art, it is understandable that some well-known structures and their descriptions may be omitted in the accompanying drawings.

[0055] The same or similar numbers in the drawings of the embodiments of the present invention correspond to the same or similar parts; in the description of the present invention, it should be understood that if there are terms such as "upper", "lower", "left", "right", "front", "back", etc. indicating directions or positional relationships, they are based on the directions or positional relationships shown in the drawings. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific direction, be constructed and operate in a specific direction. Therefore, the terms describing the positional relationship in the drawings are only used for illustrative purposes and cannot be understood as limiting the present invention. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.

[0056] To address the difficulties in predicting multi-condition surface roughness in CNC milling and the shortcomings of existing methods, the present invention provides an online prediction method for multi-condition surface roughness in CNC milling based on SSAE. The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only some of the embodiments of the present invention, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0057] like Figure 1 As shown, the present invention provides an online prediction method for multi-condition surface roughness of CNC milling based on SSAE, comprising the following steps:

[0058] (1) Collect and process the milling force signal, as follows:

[0059] A multi-condition experimental scheme was designed for different combinations of tool diameters (12 mm and 16 mm) and workpiece materials (6061 aluminum alloy and 45 steel). Milling force signals in the X and Y directions were collected during the milling process using a Kistler dynamometer and a supporting computer system. To minimize the influence of minor tool vibrations that may occur just after tool contact and just before tool separation on the workpiece surface, the leading and trailing portions of all raw milling force signals in the X and Y directions were removed. Only the intermediate milling force signals, measured during stable milling, were retained for subsequent processing. This retained length accounted for approximately two-thirds of the total raw measurement signal length.

[0060] It should be noted that the length of the retained portion of the signal is not fixed, but is intended to remove the unstable parts at the beginning and end of the signal. The specific retained length depends on the situation, but generally accounts for about two-thirds of the length of the original measured signal.

[0061] In this embodiment, the processing process for a set of milling force signals is as follows: Figure 2 As shown, the head and tail parts of the signal are cut off, and the stable part is retained for subsequent processing. Figure 2 In the figure, (a) is an example of X-direction force signal processing, and (b) is an example of Y-direction force signal processing.

[0062] (2) Construct a joint feature dataset based on “online signal features + offline process parameters”, as follows:

[0063] (2.1) For the force signals of the stable milling parts retained in the X and Y directions, seven time domain features are extracted, including signal mean, signal standard deviation, signal root mean square value, signal peak-to-peak value, signal skewness, signal kurtosis, and signal margin. Combined with fast Fourier transform, three frequency domain features are extracted, including signal frequency center of gravity, signal mean square frequency, and signal frequency variance. A total of 10 signal features are extracted in each direction, and a set of online signal feature data totals 20 items.

[0064] In this embodiment, the fast Fourier transform process for a set of milling force signals is exemplified as follows: Figure 3 As shown, the retained stable part is used for fast Fourier transform to obtain the spectrum of the signal. Figure 3 (a) is an example of the fast Fourier transform of the X-direction force signal, and (b) is an example of the fast Fourier transform of the Y-direction force signal.

[0065] (2.2) A total of four offline process parameters, including spindle speed, feed per tooth, cutting width and cutting depth, are combined to construct a joint feature dataset, in which one sample contains 24-dimensional features and a surface roughness grade label.

[0066] (3) Establish and train an online surface roughness prediction model based on SSAE, as follows:

[0067] (3.1) First, a sparsity constraint is added to the autoencoder to construct a sparse autoencoder (SAE). The network propagation formula of the autoencoder is shown in formula (1):

[0068]

[0069] In the formula, h represents the hidden layer feature; f represents the activation function; x and y represent the input and output; W x and b x Represents the weight matrix and bias matrix of the encoding network; W y and b y Represents the weight matrix and bias matrix of the decoding network.

[0070] Sparsity restriction will suppress most of the nodes in the hidden layer at the same time, so that the network can only rely on a small number of unsuppressed hidden layer nodes for calculation, which improves the sparsity of the extracted features and the computational efficiency of the network. j (x) represents the activation degree of the jth neuron in the hidden layer of the entire data sample, and its calculation formula is shown in formula (2):

[0071]

[0072] Where, represents the average activation level of the jth neuron; N d Indicates the number of input samples; x (i) Represents the dataset of the i-th sample.

[0073] Secondly, based on the sparse autoencoder, a greedy unsupervised hierarchical training method is used to train it. The hidden layer of the previous SAE is used as the input of the next SAE, and a Softmax layer is added as the classification output layer to establish an online surface roughness prediction model based on the stacked sparse autoencoder (SSAE) network.

[0074] The topology of the SSAE model in this embodiment is [24-18-12-6-4], where 24 is the input feature, 4 is the output category, and 28, 12, and 6 are the number of neurons in the hidden layer of the neural network. The Softmax layer uses the output of the last hidden layer as input and the surface roughness level labels {1, 2, 3, 4} as output for training. The labels represent the range of surface roughness values ​​of the workpiece in the milling test corresponding to the data set. Label 1 represents the surface roughness R a ≥1.2, label 2 indicates surface roughness R a In the interval [0.8, 1.2), label 3 indicates the surface roughness R a In the interval [0.4, 0.8), label 4 indicates the surface roughness R a ≤0.4.

[0075] (3.2) Taking the working condition where the tool diameter is 16 mm and the workpiece material is 6061 aluminum alloy as the original working condition, the model is first trained using the joint feature dataset constructed in this working condition to achieve online prediction of the surface roughness under this working condition.

[0076] In this embodiment, the SSAE model has 80 sets of training data and 20 sets of test data. The classification results of the training data set and the test data set are as follows: Figure 4 As shown, Figure 4 (a) is the prediction result of the training data set, and (b) is the prediction result of the test data set.

[0077] (4) Design a transfer learning framework based on model transfer and fine-tuning strategies, as follows:

[0078] (4.1) Using the model-based transfer learning method, the constructed prediction model is transferred to the target working condition where the tool and workpiece material are transformed. First, the network topology and parameters of the SSAE prediction model in the original working condition are transferred, as shown in formula (3):

[0079]

[0080] (4.2) After the model is transferred to the target working condition, its prediction performance in the target working condition is often insufficient. In this case, it is necessary to fine-tune the model using labeled target working condition data to improve the prediction performance of the model in the target working condition. By using the back propagation algorithm of stochastic gradient descent to minimize the error between the predicted surface roughness level and the actual level in the target working condition, the parameter update process of the target working condition prediction model is shown in formula (4):

[0081]

[0082] Design a transfer learning framework based on model transfer and fine-tuning strategies, such as Figure 5 shown.

[0083] (5) In the multi-working condition scenario where the tool and workpiece material are transformed, the scenario with a limited number of samples in the target working condition is simulated as follows:

[0084] In the multi-condition scenario where the tool and workpiece material are transformed, the prediction model in the original working condition is migrated to other target working conditions, including target working condition 1 (tool diameter 12mm, workpiece material is 6061 aluminum alloy) and target working condition 2 (tool diameter 12mm, workpiece material is 45 steel). The schematic diagram of the working condition migration is shown in the figure. Figure 6 At the same time, the number of labeled samples N that can be used for fine-tuning in the target working condition is controlled t , simulate the scenario with limited number of samples in the target working condition and test the prediction performance of the migrated prediction model in the target working condition.

[0085] (6) Realize online prediction of surface roughness under multiple working conditions with tool and workpiece material changes, as follows:

[0086] The number of fine-tuning samples N t In the interval [5, 80], the value is gradually increased with a step size of 5, and the transfer learning framework designed in step (4) is used to construct an online prediction model of surface roughness in the target working condition.

[0087] At the same time, compared with the scenario without using the transfer learning method, the SSAE prediction model directly trained using the limited fine-tuning samples in the target working condition is called Model 1, the SSAE prediction model trained using the original working condition samples + the limited fine-tuning samples in the target working condition is called Model 2, and the prediction model using the method proposed in this invention is called the transfer model.

[0088] In this embodiment, the comparison results of migrating to target working condition 1 are as follows Figure 7 As shown in the figure, the comparison results of migrating to target working condition 2 are as follows: Figure 8The number of fine-tuning samples was divided into three stages. Experimental results showed that in stages 1 and 2, the prediction performance of the transfer model constructed based on the proposed method had significant advantages. When the number of fine-tuning samples was 40, the classification accuracy of the transfer model exceeded 90%, and it further improved with the increase of fine-tuning samples, verifying the effectiveness of the transfer learning framework.

[0089] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not limiting. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solutions, which should all be included in the scope of the claims of the present invention.

Claims

1. An online prediction method for multi-condition surface roughness in CNC milling based on SSAE, characterized by: The following steps are involved: S1: collects and processes milling force signals; S2: Construct a joint feature dataset based on "online signal features + offline process parameters"; S3: Establishing and training an online surface roughness prediction model based on a stacked sparse autoencoder network SSAE; Step S3 of establishing and training an online surface roughness prediction model based on a stacked sparse autoencoder network SSAE specifically includes: S31: Based on the autoencoder, we improve it by adding sparsity constraints to obtain a sparse autoencoder. We then train it in a greedy unsupervised hierarchical manner, add a softmax layer as the classification output layer, and establish an online surface roughness prediction model based on a stacked sparse autoencoder network. S32: The model is trained using the joint feature dataset of the original working condition to achieve online prediction of surface roughness under the working condition; S4: Design a transfer learning framework based on model transfer and fine-tuning strategy; Step S4 specifically includes the following steps: S41: Using model-based transfer learning methods to transfer the constructed prediction model to the target working condition of tool and workpiece material transformation; S42: Fine-tune the transferred model using labeled samples from the target working condition and design a transfer learning framework based on model transfer and fine-tuning strategies; S5: In a multi-working scenario where the tool and workpiece material are changing, a scenario where the number of samples in the target working condition is limited is simulated. In step S5, in a multi-working scenario where the tool and workpiece material are changing, the number of labeled samples in the target working condition that can be used for fine-tuning is controlled to simulate a scenario where the number of samples in the target working condition is limited. Specifically, the target working condition has insufficient samples, which is limited compared to the original working condition, and it is impossible to directly train an SSAE surface roughness online prediction model with good prediction performance in the target working condition. S6: Realize online prediction of surface roughness under multiple working conditions with changes in tool and workpiece materials.

2. The online prediction method for multi-condition surface roughness of CNC milling based on SSAE according to claim 1 is characterized in that: Step S1 specifically includes: S11: The milling force signals in the X and Y directions during milling are collected by a Kistler dynamometer and a computer system. S12: Cut off the head and tail parts of the original measurement signal, and keep the stable milling part for subsequent processing.

3. The online prediction method for multi-condition surface roughness of CNC milling based on SSAE according to claim 1 is characterized in that: Step S2 specifically includes the following steps: S21: extracting time domain features for the force signals of the stable milling parts retained in the X and Y directions, respectively, and extracting frequency domain features in combination with fast Fourier transform; the time domain features include signal mean, signal standard deviation, signal root mean square value, signal peak-to-peak value, signal skewness, signal kurtosis, and signal margin; the frequency domain features include signal frequency centroid, signal mean square frequency, and signal frequency variance; S22: Constructing a joint feature dataset based on offline process parameters; the offline process parameters include spindle speed, feed per tooth, cutting width, and cutting depth; a sample in the dataset includes 24-dimensional features and a surface roughness grade label.

4. The online prediction method for multi-condition surface roughness of CNC milling based on SSAE according to claim 1 is characterized in that: The network propagation formula of the autoencoder is shown in formula (1): Where h represents the hidden layer feature; f represents the activation function; x and y represent the input and output; W x and b x Represents the weight matrix and bias matrix of the encoding network; W y and b y Represents the weight matrix and bias matrix of the decoding network; The added sparsity constraint is used to suppress most of the nodes in the hidden layer at the same time, so that the network can only rely on a small number of unsuppressed hidden layer nodes for calculation. j (x) represents the activation degree of the jth neuron in the hidden layer of the entire data sample, and its calculation formula is shown in formula (2): Where, represents the average activation level of the jth neuron; N d Indicates the number of input samples; x (i) Represents the dataset of the i-th sample.

5. The online prediction method for multi-condition surface roughness of CNC milling based on SSAE according to claim 1 is characterized in that: The migration described in step S41 is shown in formula (3): Where W sl and W tl are the weight matrices of the original working condition model and the target working condition model at the first layer; b sl and b tl are the bias matrices of the lth layer of the original working condition model and the target working condition model respectively; l represents the number of network layers; In step S42, the model is fine-tuned using the labeled target working condition data, and the back propagation algorithm of stochastic gradient descent is used to minimize the error between the predicted surface roughness level and the actual level in the target working condition. The parameter update process of the target working condition prediction model is shown in formula (4): Where η is the learning rate; x is the input data of the target working condition sample; g is the surface roughness grade label corresponding to the input data.

6. The online prediction method for multi-condition surface roughness of CNC milling based on SSAE according to claim 1 is characterized in that: Step S6 is specifically as follows: gradually increase the number of fine-tuning samples from a small number, adopt the transfer learning framework shown in step S4, migrate the prediction model of the original working condition in step S3 to the new working condition where the tool and workpiece materials are transformed, use step S5 to simulate the scenario where the target working condition samples are limited, and test the prediction performance of the migration model in the target working condition.